diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C index c86986f711090937b0ad9552b6dfde32f32df278..5ea2c2c823780709cb7f2b9587398a5990284ee1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C @@ -53,7 +53,7 @@ prghPressureFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - rhoName_(dict.lookupOrDefault<word>("rhoName", "rho")), + rhoName_(dict.lookupOrDefault<word>("rho", "rho")), p_("p", dict, p.size()) { if (dict.found("value")) @@ -171,11 +171,7 @@ void Foam::prghPressureFvPatchScalarField::updateCoeffs() void Foam::prghPressureFvPatchScalarField::write(Ostream& os) const { fvPatchScalarField::write(os); - if (rhoName_ != "rho") - { - os.writeKeyword("rhoName") - << rhoName_ << token::END_STATEMENT << nl; - } + writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_); p_.writeEntry("p", os); writeEntry("value", os); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.H index bad53659f0059939a2515f2de75c86b988a77553..06cbd5dcf2b983cdb097d9bdd1829070f58e3c2f 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.H @@ -49,7 +49,7 @@ Description \table Property | Description | Required | Default value - rhoName | rho field name | no | rho + rho | rho field name | no | rho p | static pressure | yes | \endtable @@ -58,7 +58,7 @@ Description myPatch { type prghPressure; - rhoName rho; + rho rho; p uniform 0; value uniform 0; // optional initial value } @@ -174,18 +174,6 @@ public: // Access - //- Return the rhoName - const word& rhoName() const - { - return rhoName_; - } - - //- Return reference to the rhoName to allow adjustment - word& rhoName() - { - return rhoName_; - } - //- Return the static pressure const scalarField& p() const {