44 fixedValueFvPatchScalarField(
p, iF),
63 UName_(
dict.getOrDefault<
word>(
"U",
"U")),
64 phiName_(
dict.getOrDefault<
word>(
"phi",
"phi")),
65 rhoName_(
dict.getOrDefault<
word>(
"rho",
"rho")),
66 psiName_(
dict.getOrDefault<
word>(
"psi",
"none")),
67 gamma_(psiName_ !=
"none" ?
dict.get<scalar>(
"gamma") : 1),
70 if (!this->readValueEntry(
dict))
72 const scalar t = this->db().time().timeOutputValue();
81 const uniformTotalPressureFvPatchScalarField& ptf,
83 const DimensionedField<scalar, volMesh>& iF,
84 const fvPatchFieldMapper& mapper
87 fixedValueFvPatchScalarField(
p, iF),
89 phiName_(ptf.phiName_),
90 rhoName_(ptf.rhoName_),
91 psiName_(ptf.psiName_),
95 patchType() = ptf.patchType();
99 const scalar t = this->db().time().timeOutputValue();
110 fixedValueFvPatchScalarField(ptf),
112 phiName_(ptf.phiName_),
113 rhoName_(ptf.rhoName_),
114 psiName_(ptf.psiName_),
127 fixedValueFvPatchScalarField(ptf, iF),
129 phiName_(ptf.phiName_),
130 rhoName_(ptf.rhoName_),
131 psiName_(ptf.psiName_),
149 scalar
p0 = p0_->value(this->db().time().timeOutputValue());
155 if (psiName_ ==
"none")
173 scalar gM1ByG = (gamma_ - 1)/gamma_;
180 (1.0 + 0.5*psip*gM1ByG*(
neg(phip))*
magSqr(Up)),
200 <<
" Incorrect pressure dimensions " << internalField().dimensions()
203 <<
" for compressible/variable density flow" <<
nl
205 <<
" for incompressible flow," <<
nl
206 <<
" on patch " << this->
patch().name()
207 <<
" of field " << this->internalField().name()
208 <<
" in file " << this->internalField().objectPath()
212 fixedValueFvPatchScalarField::updateCoeffs();
218 updateCoeffs(patch().lookupPatchField<volVectorField>(UName_));
225 os.writeEntryIfDifferent<
word>(
"U",
"U", UName_);
226 os.writeEntryIfDifferent<
word>(
"phi",
"phi", phiName_);
227 os.writeEntry(
"rho", rhoName_);
228 os.writeEntry(
"psi", psiName_);
229 os.writeEntry(
"gamma", gamma_);
242 uniformTotalPressureFvPatchScalarField
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A FieldMapper for finite-volume patch fields.
virtual void write(Ostream &) const
Write.
virtual void operator==(const fvPatchField< scalar > &)
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A class for handling words, derived from Foam::string.
const volScalarField & p0
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
const std::string patch
OpenFOAM patch number as a std::string.
const dimensionSet dimPressure
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
dimensionedScalar neg(const dimensionedScalar &ds)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
const dimensionSet dimDensity
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
fvPatchField< scalar > fvPatchScalarField
constexpr char nl
The newline '\n' character (0x0a).