44 inletOutletFvPatchScalarField(
p, iF),
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()
97 this->refGrad() =
Zero;
98 this->valueFraction() = 0.0;
107 inletOutletFvPatchScalarField(ptf),
108 intensity_(ptf.intensity_),
120 inletOutletFvPatchScalarField(ptf, iF),
121 intensity_(ptf.intensity_),
142 this->refValue() = 1.5*
sqr(intensity_)*
magSqr(Up);
143 this->valueFraction() =
neg(phip);
145 inletOutletFvPatchScalarField::updateCoeffs();
169 turbulentIntensityKineticEnergyInletFvPatchScalarField
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
errorManipArg< error, int > exit(error &err, const int errNo=1)
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)
constexpr char nl
The newline '\n' character (0x0a)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void write(Ostream &) const
Write.
virtual void readDict(const dictionary &dict)
Read dictionary entries.
This boundary condition provides a turbulent kinetic energy condition, based on user-supplied turbule...
GeometricField< vector, fvPatchField, volMesh > volVectorField
dimensionedScalar neg(const dimensionedScalar &ds)
Macros for easy insertion into run-time selection tables.
fvPatchField< scalar > fvPatchScalarField
A class for handling words, derived from Foam::string.
A FieldMapper for finite-volume patch fields.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
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)
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.
virtual void write(Ostream &) const
Write.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
turbulentIntensityKineticEnergyInletFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
static constexpr const zero Zero
Global zero (0)