42 inletOutletFvPatchScalarField(
p, iF),
44 UName_(
dict.lookupOrDefault<
word>(
"U",
"U"))
46 this->phiName_ =
dict.lookupOrDefault<
word>(
"phi",
"phi");
48 if (intensity_ < 0 || intensity_ > 1)
51 <<
"Turbulence intensity should be specified as a fraction 0-1 "
52 "of the mean velocity\n"
53 " value given is " << intensity_ <<
nl
54 <<
" on patch " << this->patch().name()
55 <<
" of field " << this->internalField().name()
56 <<
" in file " << this->internalField().objectPath()
65 this->refValue() = 0.0;
66 this->refGrad() = 0.0;
67 this->valueFraction() = 0.0;
80 inletOutletFvPatchScalarField(ptf,
p, iF, mapper),
81 intensity_(ptf.intensity_),
93 inletOutletFvPatchScalarField(ptf, iF),
94 intensity_(ptf.intensity_),
115 this->refValue() = 1.5*
sqr(intensity_)*
magSqr(Up);
116 this->valueFraction() =
neg(phip);
118 inletOutletFvPatchScalarField::updateCoeffs();
129 writeEntryIfDifferent<word>(os,
"U",
"U", UName_);
130 writeEntryIfDifferent<word>(os,
"phi",
"phi", this->phiName_);
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...
const dimensionSet & dimensions() const
Return dimensions.
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 any number of values (e....
Abstract base class for field mapping.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Write.
friend Ostream & operator(Ostream &, const fvPatchField< Type > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
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 > &, const dictionary &)
Construct from patch, internal field and dictionary.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
VolField< vector > volVectorField
dimensionedSymmTensor sqr(const dimensionedVector &dv)
SurfaceField< scalar > surfaceScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
dimensionedScalar neg(const dimensionedScalar &ds)
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
dimensioned< scalar > magSqr(const dimensioned< Type > &)
const unitConversion unitFraction