Go to the documentation of this file.
41 fluctuationScale_(
Zero),
42 referenceField_(
p.size()),
58 fluctuationScale_(
dict.get<Type>(
"fluctuationScale")),
59 referenceField_(
"referenceField",
dict,
p.size()),
60 alpha_(
dict.getOrDefault<scalar>(
"alpha", 0.1)),
63 if (
dict.found(
"value"))
88 fluctuationScale_(ptf.fluctuationScale_),
89 referenceField_(ptf.referenceField_, mapper),
102 ranGen_(ptf.ranGen_),
103 fluctuationScale_(ptf.fluctuationScale_),
104 referenceField_(ptf.referenceField_),
118 ranGen_(ptf.ranGen_),
119 fluctuationScale_(ptf.fluctuationScale_),
120 referenceField_(ptf.referenceField_),
135 referenceField_.autoMap(m);
149 refCast<const turbulentInletFvPatchField<Type>>(ptf);
151 referenceField_.
rmap(tiptf.referenceField_, addr);
163 if (curTimeIndex_ != this->db().time().
timeIndex())
171 ranGen_.randomise01<Type>(randomField[facei]);
176 scalar rmsCorr =
sqrt(12*(2*alpha_ -
sqr(alpha_)))/alpha_;
179 (1 - alpha_)*patchField
187 )*
mag(referenceField_)
190 curTimeIndex_ = this->db().time().timeIndex();
201 os.writeEntry(
"fluctuationScale", fluctuationScale_);
202 referenceField_.writeEntry(
"referenceField",
os);
203 os.writeEntry(
"alpha", alpha_);
204 this->writeEntry(
"value",
os);
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
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 > &)
static constexpr const zero Zero
Global zero (0)
turbulentInletFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
#define forAll(list, i)
Loop across all elements in list.
virtual void write(Ostream &) const
Write.
Generic templated field type.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
This boundary condition produces spatiotemporal-variant field by summing a set of pseudo-random numbe...
dimensionedScalar sqrt(const dimensionedScalar &ds)
A traits class, which is primarily used for primitives.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
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.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...