41 fixedValueFvPatchScalarField(p, iF),
58 fixedValueFvPatchScalarField(p, iF),
64 p0_(
"p0", dict, p.
size())
66 if (dict.
found(
"value"))
88 fixedValueFvPatchScalarField(ptf, p, iF, mapper),
90 phiName_(ptf.phiName_),
91 rhoName_(ptf.rhoName_),
92 psiName_(ptf.psiName_),
103 fixedValueFvPatchScalarField(tppsf),
104 UName_(tppsf.UName_),
105 phiName_(tppsf.phiName_),
106 rhoName_(tppsf.rhoName_),
107 psiName_(tppsf.psiName_),
108 gamma_(tppsf.gamma_),
119 fixedValueFvPatchScalarField(tppsf, iF),
120 UName_(tppsf.UName_),
121 phiName_(tppsf.phiName_),
122 rhoName_(tppsf.rhoName_),
123 psiName_(tppsf.psiName_),
124 gamma_(tppsf.gamma_),
136 fixedValueFvPatchScalarField::autoMap(m);
147 fixedValueFvPatchScalarField::rmap(ptf, addr);
150 refCast<const totalPressureFvPatchScalarField>(ptf);
152 p0_.
rmap(tiptf.p0_, addr);
166 if (psiName_ ==
"none" && rhoName_ ==
"none")
170 else if (rhoName_ ==
"none")
177 scalar gM1ByG = (gamma_ - 1.0)/gamma_;
184 (1.0 + 0.5*psip*gM1ByG*(1.0 -
pos(phip))*
magSqr(Up)),
194 else if (psiName_ ==
"none")
205 "totalPressureFvPatchScalarField::updateCoeffs()"
206 ) <<
" rho or psi set inconsistently, rho = " << rhoName_
207 <<
", psi = " << psiName_ <<
".\n"
208 <<
" Set either rho or psi or neither depending on the "
209 "definition of total pressure." <<
nl
210 <<
" Set the unused variable(s) to 'none'.\n"
211 <<
" on patch " << this->patch().name()
212 <<
" of field " << this->dimensionedInternalField().name()
213 <<
" in file " << this->dimensionedInternalField().objectPath()
223 updateCoeffs(patch().lookupPatchField<volVectorField, vector>(UName_));
230 writeEntryIfDifferent<word>(os,
"U",
"U", UName_);
231 writeEntryIfDifferent<word>(os,
"phi",
"phi", phiName_);
235 p0_.writeEntry(
"p0", os);
236 writeEntry(
"value", os);