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]);
159 const fvsPatchField<scalar>&
phi =
169 const fluidThermo* thermoPtr =
175 const vectorField UbOld(
U.oldTime().boundaryField()[patchi]);
178 Ub = relax_*UbOld + (1 - relax_)*Ub;
182 const fvPatchField<scalar>&
rho =
203 <<
"Pelase specify M in the dictionary" 210 if (A1_ == 0.0 || c1_ == 0.0)
224 if (
M[i] < 0 || r[i] >=1)
227 <<
"or pBack/ptot ratio is larger then one" 239 pbNew = relax_*pb + (1 -relax_)*pbNew;
243 fixedValueFvPatchScalarField::updateCoeffs();
261 writeEntry(
"value",
os);
272 outletMachNumberPressureFvPatchScalarField
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
word dictName() const
The local dictionary name (final part of scoped name)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
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.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void write(Ostream &) const
Write.
GeometricField< vector, fvPatchField, volMesh > volVectorField
virtual void write(Ostream &os) const
Write.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Type gSum(const FieldField< Field, Type > &f)
fvPatchField< scalar > fvPatchScalarField
const wordList area
Standard area field types (scalar, vector, tensor, etc)
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.
This boundary condition maintains a certain subsonic Mach number at an outlet patch by dynamically ad...
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...
OBJstream os(runTime.globalPath()/outputName)
const dimensionSet dimDensity
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
#define WarningInFunction
Report a warning using Foam::Warning.
Type gAverage(const FieldField< Field, Type > &f)
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.
Field< vector > vectorField
Specialisation of Field<T> for vector.
outletMachNumberPressureFvPatchScalarField(const fvPatch &p, const DimensionedField< scalar, volMesh > &iF)
Construct from patch and internal field.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
const dimensionSet dimArea(sqr(dimLength))
const dimensionSet dimVelocity