diff --git a/src/finiteVolume/fields/fvPatchFields/derived/buoyantPressure/buoyantPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/buoyantPressure/buoyantPressureFvPatchScalarField.C index a6ae6f1ee6..82604d781d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/buoyantPressure/buoyantPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/buoyantPressure/buoyantPressureFvPatchScalarField.C @@ -117,10 +117,14 @@ void buoyantPressureFvPatchScalarField::updateCoeffs() const fvPatchField& rho = patch().lookupPatchField(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()); }