buoyantPressureFvPatchScalarField: added support for pmh (pressure - hydrostatic) which is the new name for pd.

This commit is contained in:
henry
2010-01-28 16:04:36 +00:00
parent 4561d95209
commit b1b7fbec65

View File

@ -117,10 +117,14 @@ void buoyantPressureFvPatchScalarField::updateCoeffs()
const fvPatchField<scalar>& rho =
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
// If the variable name is "pd" assume it is p - rho*g.h
// If the variable name is "pmh" or "pd" assume it is p - rho*g.h
// and set the gradient appropriately.
// Otherwise assume the variable is the static pressure.
if (dimensionedInternalField().name() == "pd")
if
(
dimensionedInternalField().name() == "pmh"
|| dimensionedInternalField().name() == "pd"
)
{
gradient() = -rho.snGrad()*(g.value() & patch().Cf());
}