mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: pressure FO - corrected handling of enumeration in calcPressure function. See #1356
This commit is contained in:
@ -146,16 +146,15 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::pressure::calcPressure
|
||||
const tmp<volScalarField>& tp
|
||||
) const
|
||||
{
|
||||
switch (mode_)
|
||||
{
|
||||
case TOTAL:
|
||||
if (mode_ & TOTAL)
|
||||
{
|
||||
return
|
||||
tp
|
||||
+ dimensionedScalar("pRef", dimPressure, pRef_)
|
||||
+ rhoScale(p, 0.5*magSqr(lookupObject<volVectorField>(UName_)));
|
||||
}
|
||||
case ISENTROPIC:
|
||||
|
||||
if (mode_ & ISENTROPIC)
|
||||
{
|
||||
const basicThermo* thermoPtr =
|
||||
p.mesh().lookupObjectPtr<basicThermo>(basicThermo::dictName);
|
||||
@ -177,13 +176,8 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::pressure::calcPressure
|
||||
|
||||
return tp()*(pow(1 + (gamma - 1)/2*sqr(Mb), gamma/(gamma - 1)));
|
||||
}
|
||||
default:
|
||||
{
|
||||
return
|
||||
tp
|
||||
+ dimensionedScalar("pRef", dimPressure, pRef_);
|
||||
}
|
||||
}
|
||||
|
||||
return tp + dimensionedScalar("pRef", dimPressure, pRef_);
|
||||
}
|
||||
|
||||
|
||||
@ -207,11 +201,9 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::pressure::coeff
|
||||
|
||||
return tpCoeff;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
return std::move(tp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
Reference in New Issue
Block a user