Forward compatibility: flex
[foam-extend-3.2.git] / applications / solvers / compressible / steadyCompressibleSRFFoam / rhoFromP.H
blob31278008edabacd6858eae8c8a54c12fc3d5f4ae
2     // Calculate density from pressure
3     rho.storePrevIter();
4     rho = thermo.rho()();
6     // Bound rho
7     volScalarField R = thermo.Cp() - thermo.Cv();
9     volScalarField rhoMin = pMin/(R*TMax);
10     volScalarField rhoMax = pMax/(R*TMin);
12     rho = Foam::min(rho, rhoMax);
13     rho = Foam::max(rho, rhoMin);
14     rho.relax();