41 inletOutletFvPatchScalarField(p, iF),
45 this->refValue() = 0.0;
46 this->refGrad() = 0.0;
47 this->valueFraction() = 0.0;
59 inletOutletFvPatchScalarField(ptf, p, iF, mapper),
60 intensity_(ptf.intensity_),
72 inletOutletFvPatchScalarField(p, iF),
78 if (intensity_ < 0 || intensity_ > 1)
81 <<
"Turbulence intensity should be specified as a fraction 0-1 " 82 "of the mean velocity\n" 83 " value given is " << intensity_ <<
nl 84 <<
" on patch " << this->patch().name()
85 <<
" of field " << this->internalField().name()
86 <<
" in file " << this->internalField().objectPath()
92 this->refValue() = 0.0;
93 this->refGrad() = 0.0;
94 this->valueFraction() = 0.0;
103 inletOutletFvPatchScalarField(ptf),
104 intensity_(ptf.intensity_),
116 inletOutletFvPatchScalarField(ptf, iF),
117 intensity_(ptf.intensity_),
138 this->refValue() = 1.5*
sqr(intensity_)*
magSqr(Up);
139 this->valueFraction() = 1.0 -
pos0(phip);
141 inletOutletFvPatchScalarField::updateCoeffs();
152 writeEntryIfDifferent<word>(os,
"U",
"U", UName_);
153 writeEntryIfDifferent<word>(os,
"phi",
"phi", this->phiName_);
154 writeEntry(
"value", os);
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.
makePatchTypeField(fvPatchVectorField, SRFFreestreamVelocityFvPatchVectorField)
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)
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
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
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.