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);
170 if (psiName_ ==
"none" && rhoName_ ==
"none")
174 else if (rhoName_ ==
"none")
181 scalar gM1ByG = (gamma_ - 1.0)/gamma_;
188 (1.0 + 0.5*psip*gM1ByG*(1.0 -
pos(phip))*
magSqr(Up)),
198 else if (psiName_ ==
"none")
209 "totalPressureFvPatchScalarField::updateCoeffs()" 210 ) <<
" rho or psi set inconsistently, rho = " << rhoName_
211 <<
", psi = " << psiName_ <<
".\n" 212 <<
" Set either rho or psi or neither depending on the " 213 "definition of total pressure." <<
nl 214 <<
" Set the unused variable(s) to 'none'.\n" 215 <<
" on patch " << this->patch().name()
221 fixedValueFvPatchScalarField::updateCoeffs();
230 patch().lookupPatchField<volVectorField, vector>(
UName())
238 writeEntryIfDifferent<word>(os,
"U",
"U", UName_);
239 writeEntryIfDifferent<word>(os,
"phi",
"phi", phiName_);
244 writeEntry(
"value", os);
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
virtual void write(Ostream &) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
A class for handling words, derived from string.
This boundary condition provides a total pressure condition. Four variants are possible: ...
errorManipArg< error, int > exit(error &err, const int errNo=1)
Foam::fvPatchFieldMapper.
A list of keyword definitions, which are a keyword followed by any number of values (e...
totalPressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void write(Ostream &) const
Write.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
Macros for easy insertion into run-time selection tables.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
rDeltaT dimensionedInternalField()
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
const scalarField & p0() const
Return the total pressure.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
dimensionedScalar pos(const dimensionedScalar &ds)
makePatchTypeField(fvPatchVectorField, SRFFreestreamVelocityFvPatchVectorField)
volScalarField scalarField(fieldObject, mesh)
virtual label size() const
Return size.
const word & UName() const
Return the name of the velocity field.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...