45 fixedValueFvPatchScalarField(
p, iF),
66 fixedValueFvPatchScalarField(
p, iF,
dict),
67 M_(
dict.getOrDefault<scalar>(
"M", 0)),
68 pBack_(
dict.get<scalar>(
"pBack")),
69 c1_(
dict.getOrDefault<scalar>(
"c1", 0)),
70 A1_(
dict.getOrDefault<scalar>(
"A1", 0)),
71 phiName_(
dict.getOrDefault<
word>(
"phi",
"phi")),
72 rhoName_(
dict.getOrDefault<
word>(
"rho",
"rho")),
73 UName_(
dict.getOrDefault<
word>(
"U",
"U")),
75 relax_(
dict.getOrDefault<scalar>(
"relax", 0))
88 fixedValueFvPatchScalarField(ptf,
p, iF, mapper),
93 phiName_(ptf.phiName_),
94 rhoName_(ptf.rhoName_),
107 fixedValueFvPatchScalarField(tppsf),
109 pBack_(tppsf.pBack_),
112 phiName_(tppsf.phiName_),
113 rhoName_(tppsf.rhoName_),
114 UName_(tppsf.UName_),
115 choked_(tppsf.choked_),
127 fixedValueFvPatchScalarField(tppsf, iF),
129 pBack_(tppsf.pBack_),
132 phiName_(tppsf.phiName_),
133 rhoName_(tppsf.rhoName_),
134 UName_(tppsf.UName_),
135 choked_(tppsf.choked_),
152 this->internalField().name()
155 const label patchi = patch().index();
157 const scalarField pb(
p.oldTime().boundaryField()[patchi]);
168 const fluidThermo* thermoPtr =
174 const vectorField UbOld(
U.oldTime().boundaryField()[patchi]);
177 Ub = relax_*UbOld + (1 - relax_)*Ub;
201 <<
"Pelase specify M in the dictionary"
208 if (A1_ == 0.0 || c1_ == 0.0)
222 if (
M[i] < 0 || r[i] >=1)
225 <<
"or pBack/ptot ratio is larger then one"
237 pbNew = relax_*pb + (1 -relax_)*pbNew;
241 fixedValueFvPatchScalarField::updateCoeffs();
248 os.writeEntry(
"pBack", pBack_);
249 os.writeEntryIfDifferent<scalar>(
"c1", 0, c1_);
250 os.writeEntryIfDifferent<scalar>(
"A1", 0, A1_);
251 os.writeEntry(
"choked", choked_);
252 os.writeEntryIfDifferent<scalar>(
"relax", 0, relax_);
254 os.writeEntryIfDifferent<
word>(
"phi",
"phi", phiName_);
255 os.writeEntryIfDifferent<
word>(
"rho",
"rho", rhoName_);
256 os.writeEntryIfDifferent<
word>(
"U",
"U", UName_);
257 os.writeEntryIfDifferent<scalar>(
"M", 0, M_);
270 outletMachNumberPressureFvPatchScalarField
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...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
static const word dictName
The dictionary name ("thermophysicalProperties").
virtual tmp< volScalarField > gamma() const =0
Gamma = Cp/Cv [].
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Fundamental fluid thermodynamic properties.
A FieldMapper for finite-volume patch fields.
virtual void write(Ostream &) const
Write.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
This boundary condition maintains a certain subsonic Mach number at an outlet patch by dynamically ad...
outletMachNumberPressureFvPatchScalarField(const fvPatch &p, const DimensionedField< scalar, volMesh > &iF)
Construct from patch and internal field.
virtual void write(Ostream &os) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A class for handling words, derived from Foam::string.
#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,...
#define WarningInFunction
Report a warning using Foam::Warning.
const wordList area
Standard area field types (scalar, vector, tensor, etc).
const std::string patch
OpenFOAM patch number as a std::string.
Type gAverage(const FieldField< Field, Type > &f, const label comm)
The global arithmetic average of a FieldField.
Type gSum(const FieldField< Field, Type > &f)
GeometricField< vector, fvPatchField, volMesh > volVectorField
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Field< vector > vectorField
Specialisation of Field<T> for vector.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
fvPatchField< scalar > fvPatchScalarField
#define forAll(list, i)
Loop across all elements in list.