void Foam::DCPP::correct()
{
    // Velocity gradient tensor
    volTensorField L = fvc::grad(U());

    // Upper convected derivate term
    volTensorField Cupper = S_ & L;

    // Lower convected derivate term
    volTensorField Clower = L & S_;

    // Twice the rate of deformation tensor
    volSymmTensorField twoD = twoSymm(L);


    // Evolution of orientation
    fvSymmTensorMatrix SEqn
    (
        fvm::ddt(S_)
      + fvm::div(phi(), S_)
     ==
        (1 - zeta_/2)*twoSymm(Cupper)
      - (zeta_/2)*twoSymm(Clower)
      - (1 - zeta_)*fvm::Sp((twoD && S_), S_)
      - fvm::Sp(1/lambdaOb_/Foam::sqr(Lambda_), S_)
      + 1/lambdaOb_/Foam::sqr(Lambda_)/3*I_
    );

    SEqn.relax();
    SEqn.solve();

     // Evolution of the backbone stretch
    fvScalarMatrix lambdaEqn
    (
        fvm::ddt(Lambda_)
      + fvm::div(phi(), Lambda_)
     ==
        fvm::Sp((twoD && S_)/2 , Lambda_)
      - fvm::Sp(Foam::exp(2/q_*(Lambda_ - 1))/lambdaOs_ , Lambda_)
      + Foam::exp( 2/q_*(Lambda_ - 1))/lambdaOs_
    );

    lambdaEqn.relax();
    lambdaEqn.solve();

    // Viscoelastic stress
    tau_ = etaP_/lambdaOb_/(1 - zeta_) * (3*Foam::sqr(Lambda_)*S_ - I_);
}
void thixotropicViscosity::correct
(
    const volScalarField& p,
    const volScalarField& T
)
{
    const kinematicSingleLayer& film = filmType<kinematicSingleLayer>();

    // references to film fields
    const volVectorField& U = film.U();
    const volVectorField& Uw = film.Uw();
    const volScalarField& delta = film.delta();
    const volScalarField& deltaRho = film.deltaRho();
    const surfaceScalarField& phi = film.phi();

    // gamma-dot (shear rate) raised to the power d
    volScalarField gDotPowD
    (
        "gDotPowD",
        pow(mag(U - Uw)/(delta + film.deltaSmall()), d_)
    );

    dimensionedScalar c0("SMALL", dimMass/sqr(dimLength)/dimTime, SMALL);
    volScalarField coeff(-deltaRho*c_*gDotPowD + c0);

    fvScalarMatrix lambdaEqn
    (
        fvm::ddt(deltaRho, lambda_)
      + fvm::div(phi, lambda_)
      - fvm::Sp(fvc::div(phi), lambda_)
      ==
        deltaRho*a_*pow((1.0 - lambda_), b_)
      + fvm::SuSp(coeff, lambda_)
    );

    lambdaEqn.relax();

    lambdaEqn.solve();

    lambda_.min(1.0);
    lambda_.max(0.0);

    updateMu();
}
Exemplo n.º 3
0
void thixotropicViscosity::correct
(
    const volScalarField& p,
    const volScalarField& T
)
{
    const kinematicSingleLayer& film = filmType<kinematicSingleLayer>();

    const volVectorField& U = film.U();
    const volVectorField& Uw = film.Uw();
    const volScalarField& delta = film.delta();
    const volScalarField& deltaRho = film.deltaRho();
    const surfaceScalarField& phi = film.phi();
    const volScalarField& alpha = film.alpha();
    const Time& runTime = this->film().regionMesh().time();

    // Shear rate
    const volScalarField gDot
    (
        "gDot",
        alpha*mag(U - Uw)/(delta + film.deltaSmall())
    );

    if (debug && runTime.writeTime())
    {
        gDot.write();
    }

    const dimensionedScalar deltaRho0
    (
        "deltaRho0",
        deltaRho.dimensions(),
        rootVSmall
    );

    const surfaceScalarField phiU(phi/fvc::interpolate(deltaRho + deltaRho0));

    const dimensionedScalar c0("c0", dimless/dimTime, rootVSmall);
    const volScalarField coeff("coeff", -c_*pow(gDot, d_) + c0);

    fvScalarMatrix lambdaEqn
    (
        fvm::ddt(lambda_)
      + fvm::div(phiU, lambda_)
      - fvm::Sp(fvc::div(phiU), lambda_)
      ==
        a_*pow((1 - lambda_), b_)
      + fvm::SuSp(coeff, lambda_)

        // Include the effect of the impinging droplets added with lambda = 0
      - fvm::Sp
        (
            max
            (
               -film.rhoSp(),
                dimensionedScalar(film.rhoSp().dimensions(), 0)
            )/(deltaRho + deltaRho0),
            lambda_
        )
    );

    lambdaEqn.relax();
    lambdaEqn.solve();

    lambda_.min(1);
    lambda_.max(0);

    mu_ = muInf_/(sqr(1 - K_*lambda_) + rootVSmall);
    mu_.correctBoundaryConditions();
}
void thixotropicViscosity::correct
(
    const volScalarField& p,
    const volScalarField& T
)
{
    const kinematicSingleLayer& film = filmType<kinematicSingleLayer>();

    // references to film fields
    const volVectorField& U = film.U();
    const volVectorField& Uw = film.Uw();
    const volScalarField& delta = film.delta();
    const volScalarField& deltaRho = film.deltaRho();
    const surfaceScalarField& phi = film.phi();
    const volScalarField& alpha = film.alpha();
    const Time& runTime = this->owner().regionMesh().time();

    // Shear rate
    volScalarField gDot("gDot", alpha*mag(U - Uw)/(delta + film.deltaSmall()));

    if (debug && runTime.outputTime())
    {
        gDot.write();
    }

    dimensionedScalar deltaRho0("deltaRho0", deltaRho.dimensions(), ROOTVSMALL);
    surfaceScalarField phiU(phi/fvc::interpolate(deltaRho + deltaRho0));

    dimensionedScalar c0("c0", dimless/dimTime, ROOTVSMALL);
    volScalarField coeff("coeff", -c_*pow(gDot, d_) + c0);

    // Limit the filmMass and deltaMass to calculate the effect of the added
    // droplets with lambda = 0 to the film
    const volScalarField filmMass
    (
        "thixotropicViscosity:filmMass",
        film.netMass() + dimensionedScalar("SMALL", dimMass, ROOTVSMALL)
    );
    const volScalarField deltaMass
    (
        "thixotropicViscosity:deltaMass",
        max(dimensionedScalar("zero", dimMass, 0), film.deltaMass())
    );

    fvScalarMatrix lambdaEqn
    (
        fvm::ddt(lambda_)
      + fvm::div(phiU, lambda_)
      - fvm::Sp(fvc::div(phiU), lambda_)
      ==
        a_*pow((1.0 - lambda_), b_)
      + fvm::SuSp(coeff, lambda_)
      - fvm::Sp(deltaMass/(runTime.deltaT()*filmMass), lambda_)
    );

    lambdaEqn.relax();
    lambdaEqn.solve();

    lambda_.min(1.0);
    lambda_.max(0.0);

    mu_ = muInf_/(sqr(1.0 - K_*lambda_) + ROOTVSMALL);
    mu_.correctBoundaryConditions();
}