44 fixedValueFvPatchScalarField(
p, iF),
61 fixedValueFvPatchScalarField(
p, iF,
dict, false),
62 UName_(
dict.getOrDefault<
word>(
"U",
"U")),
63 phiName_(
dict.getOrDefault<
word>(
"phi",
"phi")),
64 rhoName_(
dict.getOrDefault<
word>(
"rho",
"rho")),
65 psiName_(
dict.getOrDefault<
word>(
"psi",
"none")),
66 gamma_(psiName_ !=
"none" ?
dict.
get<scalar>(
"gamma") : 1),
67 p0_(
"p0",
dict,
p.size())
69 if (
dict.found(
"value"))
85 const totalPressureFvPatchScalarField& ptf,
87 const DimensionedField<scalar, volMesh>& iF,
88 const fvPatchFieldMapper& mapper
91 fixedValueFvPatchScalarField(ptf,
p, iF, mapper),
93 phiName_(ptf.phiName_),
94 rhoName_(ptf.rhoName_),
95 psiName_(ptf.psiName_),
106 fixedValueFvPatchScalarField(tppsf),
107 UName_(tppsf.UName_),
108 phiName_(tppsf.phiName_),
109 rhoName_(tppsf.rhoName_),
110 psiName_(tppsf.psiName_),
111 gamma_(tppsf.gamma_),
122 fixedValueFvPatchScalarField(tppsf, iF),
123 UName_(tppsf.UName_),
124 phiName_(tppsf.phiName_),
125 rhoName_(tppsf.rhoName_),
126 psiName_(tppsf.psiName_),
127 gamma_(tppsf.gamma_),
139 fixedValueFvPatchScalarField::autoMap(m);
150 fixedValueFvPatchScalarField::rmap(ptf, addr);
153 refCast<const totalPressureFvPatchScalarField>(ptf);
155 p0_.
rmap(tiptf.p0_, addr);
170 const fvsPatchField<scalar>& phip =
175 if (psiName_ ==
"none")
179 const fvPatchField<scalar>&
rho =
188 const fvPatchField<scalar>& psip =
193 scalar gM1ByG = (gamma_ - 1)/gamma_;
200 (1.0 + 0.5*psip*gM1ByG*(1.0 -
pos0(phip))*
magSqr(Up)),
220 <<
" Incorrect pressure dimensions " << internalField().dimensions()
223 <<
" for compressible/variable density flow" <<
nl 225 <<
" for incompressible flow," <<
nl 226 <<
" on patch " << this->
patch().name()
227 <<
" of field " << this->internalField().name()
228 <<
" in file " << this->internalField().objectPath()
232 fixedValueFvPatchScalarField::updateCoeffs();
241 patch().lookupPatchField<volVectorField, vector>(
UName())
255 writeEntry(
"value",
os);
266 totalPressureFvPatchScalarField
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const word UName(propsDict.getOrDefault< word >("U", "U"))
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
constexpr char nl
The newline '\n' character (0x0a)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
virtual void write(Ostream &) const
Write.
virtual void write(Ostream &) const
Write.
Macros for easy insertion into run-time selection tables.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
fvPatchField< scalar > fvPatchScalarField
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A FieldMapper for finite-volume patch fields.
const dimensionSet dimPressure
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
dimensionedScalar pos0(const dimensionedScalar &ds)
OBJstream os(runTime.globalPath()/outputName)
const dimensionSet dimDensity
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
totalPressureFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual void operator=(const UList< Type > &)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
const volScalarField & p0
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)
This boundary condition provides a total pressure condition. Four variants are possible: ...