mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Integration updates
This commit is contained in:
@ -148,20 +148,26 @@ Foam::tmp<Foam::volScalarField> Foam::pressureTools::convertToCoeff
|
||||
const volScalarField& p
|
||||
) const
|
||||
{
|
||||
tmp<volScalarField> tCoeff(p);
|
||||
|
||||
if (calcCoeff_)
|
||||
{
|
||||
tCoeff.ref() -= dimensionedScalar("pInf", dimPressure, pInf_);
|
||||
tmp<volScalarField> tCoeff(new volScalarField("pCoeff", p));
|
||||
volScalarField& coeff = tCoeff.ref();
|
||||
|
||||
coeff -= dimensionedScalar("pInf", dimPressure, pInf_);
|
||||
|
||||
const dimensionedScalar p0("p0", dimPressure, SMALL);
|
||||
const dimensionedVector U("U", dimVelocity, UInf_);
|
||||
const dimensionedScalar rho("rho", dimDensity, rhoInf_);
|
||||
|
||||
tCoeff.ref() /= 0.5*rho*magSqr(U) + p0;
|
||||
coeff /= 0.5*rho*magSqr(U) + p0;
|
||||
|
||||
return tCoeff;
|
||||
}
|
||||
else
|
||||
{
|
||||
return p;
|
||||
}
|
||||
|
||||
return tCoeff;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user