ENH: Integration updates

This commit is contained in:
Andrew Heather
2016-04-28 09:57:03 +01:00
parent f0b404748d
commit af14c117a9
3 changed files with 23 additions and 19 deletions

View File

@ -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;
}