37Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField::
38turbulentIntensityKineticEnergyInletFvPatchScalarField
44 inletOutletFvPatchScalarField(
p, iF),
48 this->refValue() = 0.0;
49 this->refGrad() = 0.0;
50 this->valueFraction() = 0.0;
53Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField::
54turbulentIntensityKineticEnergyInletFvPatchScalarField
62 inletOutletFvPatchScalarField(ptf,
p, iF, mapper),
63 intensity_(ptf.intensity_),
67Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField::
68turbulentIntensityKineticEnergyInletFvPatchScalarField
75 inletOutletFvPatchScalarField(
p, iF),
76 intensity_(
dict.get<scalar>(
"intensity")),
77 UName_(
dict.getOrDefault<
word>(
"U",
"U"))
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() = 0.0;
97 this->refGrad() = 0.0;
98 this->valueFraction() = 0.0;
101Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField::
102turbulentIntensityKineticEnergyInletFvPatchScalarField
107 inletOutletFvPatchScalarField(ptf),
108 intensity_(ptf.intensity_),
113Foam::turbulentIntensityKineticEnergyInletFvPatchScalarField::
114turbulentIntensityKineticEnergyInletFvPatchScalarField
120 inletOutletFvPatchScalarField(ptf, iF),
121 intensity_(ptf.intensity_),
142 this->refValue() = 1.5*
sqr(intensity_)*
magSqr(Up);
143 this->valueFraction() = 1.0 -
pos0(phip);
145 inletOutletFvPatchScalarField::updateCoeffs();
158 writeEntry(
"value",
os);
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...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
virtual bool write()
Write the output fields.
A FieldMapper for finite-volume patch fields.
virtual void operator=(const UList< scalar > &)
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 updateCoeffs()
Update the coefficients associated with the patch field.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
GeometricField< vector, fvPatchField, volMesh > volVectorField
dimensionedScalar pos0(const dimensionedScalar &ds)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
constexpr char nl
The newline '\n' character (0x0a)