41 inletOutletFvPatchScalarField(p, iF),
45 this->refValue() = 0.0;
46 this->refGrad() = 0.0;
47 this->valueFraction() = 0.0;
59 inletOutletFvPatchScalarField(p, iF),
60 intensity_(dict.
lookup<scalar>(
"intensity")),
65 if (intensity_ < 0 || intensity_ > 1)
68 <<
"Turbulence intensity should be specified as a fraction 0-1 " 69 "of the mean velocity\n" 70 " value given is " << intensity_ <<
nl 71 <<
" on patch " << this->patch().name()
72 <<
" of field " << this->internalField().name()
73 <<
" in file " << this->internalField().objectPath()
79 this->refValue() = 0.0;
80 this->refGrad() = 0.0;
81 this->valueFraction() = 0.0;
94 inletOutletFvPatchScalarField(ptf, p, iF, mapper),
95 intensity_(ptf.intensity_),
107 inletOutletFvPatchScalarField(ptf, iF),
108 intensity_(ptf.intensity_),
129 this->refValue() = 1.5*
sqr(intensity_)*
magSqr(Up);
130 this->valueFraction() = 1.0 -
pos0(phip);
132 inletOutletFvPatchScalarField::updateCoeffs();
143 writeEntryIfDifferent<word>(os,
"U",
"U", UName_);
144 writeEntryIfDifferent<word>(os,
"phi",
"phi", this->phiName_);
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Write.
This boundary condition provides a turbulent kinetic energy condition, based on user-supplied turbule...
GeometricField< vector, fvPatchField, volMesh > volVectorField
Macros for easy insertion into run-time selection tables.
A class for handling words, derived from string.
Foam::fvPatchFieldMapper.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual label size() const
Return size.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
volScalarField scalarField(fieldObject, mesh)
dimensionedScalar pos0(const dimensionedScalar &ds)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual void write(Ostream &) const
Write.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
turbulentIntensityKineticEnergyInletFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.