repo.or.cz
/
foam-extend-3.2.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Forward compatibility: flex
[foam-extend-3.2.git]
/
applications
/
solvers
/
compressible
/
steadyCompressibleSRFFoam
/
rhoFromP.H
blob
31278008edabacd6858eae8c8a54c12fc3d5f4ae
1
{
2
// Calculate density from pressure
3
rho.storePrevIter();
4
rho = thermo.rho()();
5
6
// Bound rho
7
volScalarField R = thermo.Cp() - thermo.Cv();
8
9
volScalarField rhoMin = pMin/(R*TMax);
10
volScalarField rhoMax = pMax/(R*TMin);
11
12
rho = Foam::min(rho, rhoMax);
13
rho = Foam::max(rho, rhoMin);
14
rho.relax();
15
}