Go to the documentation of this file.
45 referenceField_(
p.size()),
80 referenceField_(
"referenceField",
dict,
p.size()),
138 referenceField_.autoMap(m);
152 refCast<const turbulentInletFvPatchField<Type> >(ptf);
166 if (curTimeIndex_ != this->db().time().
timeIndex())
174 ranGen_.randomise(randomField[facei]);
179 scalar rmsCorr =
sqrt(12*(2*alpha_ -
sqr(alpha_)))/alpha_;
182 (1 - alpha_)*patchField
190 )*
mag(referenceField_)
193 curTimeIndex_ = this->db().time().timeIndex();
206 referenceField_.writeEntry(
"referenceField", os);
208 this->writeEntry(
"value", os);
virtual void write(Ostream &) const
Write.
virtual void operator==(const fvPatchField< Type > &)
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
#define forAll(list, i)
Loop across all elements in list.
Field< Type > referenceField_
Reference field.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
turbulentInletFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
dimensioned< scalar > mag(const dimensioned< Type > &)
scalar alpha_
Fraction of RMS component to apply to last time step values.
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
virtual void write(Ostream &) const
Write.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Type fluctuationScale_
Fluctuation scake.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
A list of keyword definitions, which are a keyword followed by any number of values (e....
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Random ranGen_
Random number generator.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
This boundary condition generates a fluctuating inlet condition by adding a random component to a ref...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensionedScalar sqrt(const dimensionedScalar &ds)
Traits class for primitives.
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
Foam::fvPatchFieldMapper.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...