44 inletOutletFvPatchScalarField(
p, iF),
48 this->refValue() =
Zero;
49 this->refGrad() =
Zero;
50 this->valueFraction() = 0.0;
62 inletOutletFvPatchScalarField(ptf,
p, iF, mapper),
63 intensity_(ptf.intensity_),
75 inletOutletFvPatchScalarField(
p, iF),
76 intensity_(
dict.get<scalar>(
"intensity")),
77 UName_(
dict.getOrDefault<
word>(
"U",
"U"))
80 this->phiName_ =
dict.getOrDefault<
word>(
"phi",
"phi");
82 if (intensity_ < 0 || intensity_ > 1)
85 <<
"Turbulence intensity should be specified as a fraction 0-1 "
86 "of the mean velocity\n"
87 " value given is " << intensity_ <<
nl
88 <<
" on patch " << this->patch().name()
89 <<
" of field " << this->internalField().name()
90 <<
" in file " << this->internalField().objectPath()
96 this->refValue() =
Zero;
97 this->refGrad() =
Zero;
98 this->valueFraction() = 0.0;
107 inletOutletFvPatchScalarField(ptf),
108 intensity_(ptf.intensity_),
120 inletOutletFvPatchScalarField(ptf, iF),
121 intensity_(ptf.intensity_),
143 this->valueFraction() =
neg(phip);
145 inletOutletFvPatchScalarField::updateCoeffs();
155 os.writeEntry(
"intensity", intensity_);
156 os.writeEntryIfDifferent<
word>(
"U",
"U", UName_);
157 os.writeEntryIfDifferent<
word>(
"phi",
"phi", this->phiName_);
169 turbulentIntensityKineticEnergyInletFvPatchScalarField
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...
@ MUST_READ
Reading required.
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,...
virtual void readDict(const dictionary &dict)
Read dictionary entries.
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 provides a turbulent kinetic energy condition, based on user-supplied turbule...
virtual void write(Ostream &) const
Write.
turbulentIntensityKineticEnergyInletFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
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,...
GeometricField< vector, fvPatchField, volMesh > volVectorField
dimensionedSymmTensor sqr(const dimensionedVector &dv)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
dimensionedScalar neg(const dimensionedScalar &ds)
static constexpr const zero Zero
Global zero (0).
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)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
fvPatchField< scalar > fvPatchScalarField
constexpr char nl
The newline '\n' character (0x0a).