CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   rho1 and rho2 of compressibleInterFoam solver (https://www.cfd-online.com/Forums/openfoam-programming-development/231661-rho1-rho2-compressibleinterfoam-solver.html)

ndtrong November 13, 2020 04:37

rho1 and rho2 of compressibleInterFoam solver
 
Hi everyone,

I am confusing the way to compute rho1 and rho2 of solver compressibleInterFoam. In createFields, they are declared as:
const volScalarField& rho1 = mixture.thermo1().rho();
const volScalarField& rho2 = mixture.thermo2().rho();

and mixture is an object derived from twoPhaseMixtureThermo class as:
twoPhaseMixtureThermo mixture(U, phi);
when I look back the twoPhaseMixtureThermo class, I found the rhoThermo class inside.
So, I am confusing that:
  • rho1 and rho2 of each phase are computed in this class?
  • If it is true, how we compute deltaRho in class rhoThermo that is specify by:
    void Foam::rhoThermo::correctRho(const Foam::volScalarField& deltaRho)
    {
    rho_ += deltaRho;
    }
Could someone help me to make them clear?
I thank you very much in advance.

tian_lei November 16, 2020 02:40

Hi, ndtrong.

The rho is computed by EOS in "specie/equationOfState". The perfectGas is usually for idea gas, and perfectFluid is for water.

Best.


All times are GMT -4. The time now is 08:38.