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_);
151 turbulentIntensityKineticEnergyInlet
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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
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.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
turbulentKineticEnergyFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, fvMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
errorManipArg< error, int > exit(error &err, const int errNo=1)
VolField< vector > volVectorField
addNamedToRunTimeSelectionTable(fvPatchScalarField, turbulentKineticEnergyFvPatchScalarField, dictionary, turbulentIntensityKineticEnergyInlet)
makePatchTypeField(fvPatchScalarField, atmosphericBoundaryLayerTurbulentEpsilonFvPatchScalarField)
SurfaceField< scalar > surfaceScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
dimensionedScalar neg(const dimensionedScalar &ds)
tmp< DimensionedField< scalar, GeoMesh, Field > > magSqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
void writeEntry(Ostream &os, const word &key, const DimensionedFieldFunction< DimensionedFieldType > &f)