CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Variable Cp in twoPhaseMixtureThermo! (https://www.cfd-online.com/Forums/openfoam-solving/199187-variable-cp-twophasemixturethermo.html)

godfatherBond February 27, 2018 23:36

Variable Cp in twoPhaseMixtureThermo!
 
Hi FOAMers,
I was going through the source code for compressibleInterFoam , saw the twoPhaseMixtureThermo class used with it.
I looked at the source code of the energy equation
Code:

{
    fvScalarMatrix TEqn
    (
        fvm::ddt(rho, T)
      + fvm::div(rhoPhi, T)
      - fvm::laplacian(mixture.alphaEff(turbulence->mut()), T)
      + (
            fvc::div(fvc::absolute(phi, U), p)
          + fvc::ddt(rho, K) + fvc::div(rhoPhi, K)
        )
      *(
          alpha1/mixture.thermo1().Cv()
        + alpha2/mixture.thermo2().Cv()
        )
    );

    TEqn.relax();
    TEqn.solve();

    mixture.correct();

    Info<< "min(T) " << min(T).value() << endl;
}

Now, it seems that this particular solver has a constant Cp type energy equation(correct me if I'm wrong). But the tutorial of it has an option of variable Cp such as polynomial, janaf tables etc selectable at runtime.
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  3.0.x                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "constant";
    object      thermophysicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    type            heRhoThermo;
    mixture        pureMixture;
    transport      const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

My question is:
If I choose the variable Cp option, the will the solver use Newton-Raphson to solve the non-linear form of equation formed using the polynomial expression for Cp as done in all other solvers such as rhoPimpleFoam(these use energy equation in form of enthalpy). As in the other compressible solvers, we solve an equation for enthalpy(or I.E.) and then we find temperature from the non-linear polynomial formed from
h = integral(cp * dT) solved for Temperature T.

Looking at the form of Energy equation it seems that a constant Cp form is used. Please enlighten me on this!
Thanks


All times are GMT -4. The time now is 05:58.