Go to the documentation of this file.
41 fixedValueFvPatchScalarField(
p, iF),
58 fixedValueFvPatchScalarField(
p, iF),
59 UName_(
dict.lookupOrDefault<
word>(
"U",
"U")),
60 phiName_(
dict.lookupOrDefault<
word>(
"phi",
"phi")),
61 rhoName_(
dict.lookupOrDefault<
word>(
"rho",
"none")),
62 psiName_(
dict.lookupOrDefault<
word>(
"psi",
"none")),
64 p0_(
"p0",
dict,
p.size())
66 if (
dict.found(
"value"))
88 fixedValueFvPatchScalarField(ptf,
p, iF, mapper),
103 fixedValueFvPatchScalarField(tppsf),
119 fixedValueFvPatchScalarField(tppsf, iF),
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")
208 <<
" rho or psi set inconsistently, rho = " << rhoName_
209 <<
", psi = " << psiName_ <<
".\n"
210 <<
" Set either rho or psi or neither depending on the "
211 "definition of total pressure." <<
nl
212 <<
" Set the unused variable(s) to 'none'.\n"
213 <<
" on patch " << this->patch().name()
219 fixedValueFvPatchScalarField::updateCoeffs();
228 patch().lookupPatchField<volVectorField, vector>(
UName())
236 writeEntryIfDifferent<word>(os,
"U",
"U", UName_);
237 writeEntryIfDifferent<word>(os,
"phi",
"phi", phiName_);
241 p0_.writeEntry(
"p0", os);
242 writeEntry(
"value", os);
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Write.
A class for handling words, derived from string.
scalarField p0_
Total pressure.
scalar gamma_
Heat capacity ratio.
rDeltaT dimensionedInternalField()
word UName_
Name of the velocity field.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
This boundary condition provides a total pressure condition. Four variants are possible:
Pre-declare SubField and related Field type.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
const word & UName() const
Return the name of the velocity field.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
A list of keyword definitions, which are a keyword followed by any number of values (e....
Macros for easy insertion into run-time selection tables.
makePatchTypeField(fvPatchVectorField, SRFFreestreamVelocityFvPatchVectorField)
const scalarField & p0() const
Return the total pressure.
errorManipArg< error, int > exit(error &err, const int errNo=1)
word psiName_
Name of the compressibility field used to calculate the wave speed.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
word rhoName_
Name of the density field used to normalise the mass flux.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
volScalarField scalarField(fieldObject, mesh)
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
word phiName_
Name of the flux transporting the field.
virtual void write(Ostream &) const
Write.
Foam::fvPatchFieldMapper.
totalPressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
dimensioned< scalar > magSqr(const dimensioned< Type > &)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
dimensionedScalar pos(const dimensionedScalar &ds)