39 fluctuationScale_(
Zero),
40 referenceField_(p.
size()),
56 fluctuationScale_(
pTraits<Type>(dict.lookup(
"fluctuationScale"))),
57 referenceField_(
"referenceField", dict, p.
size()),
58 alpha_(dict.lookupOrDefault<scalar>(
"alpha", 0.1)),
61 if (dict.found(
"value"))
86 fluctuationScale_(ptf.fluctuationScale_),
87 referenceField_(ptf.referenceField_, mapper),
100 ranGen_(ptf.ranGen_),
101 fluctuationScale_(ptf.fluctuationScale_),
102 referenceField_(ptf.referenceField_),
116 ranGen_(ptf.ranGen_),
117 fluctuationScale_(ptf.fluctuationScale_),
118 referenceField_(ptf.referenceField_),
133 referenceField_.autoMap(m);
147 refCast<const turbulentInletFvPatchField<Type>>(ptf);
149 referenceField_.
rmap(tiptf.referenceField_, addr);
161 if (curTimeIndex_ != this->db().time().
timeIndex())
169 ranGen_.randomise(randomField[facei]);
174 scalar rmsCorr =
sqrt(12*(2*alpha_ -
sqr(alpha_)))/alpha_;
177 (1 - alpha_)*patchField
185 )*
mag(referenceField_)
188 curTimeIndex_ = this->db().time().timeIndex();
200 << fluctuationScale_ << token::END_STATEMENT <<
nl;
201 referenceField_.writeEntry(
"referenceField", os);
203 this->writeEntry(
"value", os);
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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A list of keyword definitions, which are a keyword followed by any number of values (e...
dimensionedSymmTensor sqr(const dimensionedVector &dv)
void size(const label)
Override size to be inconsistent with allocated storage.
dimensionedScalar sqrt(const dimensionedScalar &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Write.
Pre-declare SubField and related Field type.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
turbulentInletFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
This boundary condition generates a fluctuating inlet condition by adding a random component to a ref...
Foam::fvPatchFieldMapper.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
dimensioned< scalar > mag(const dimensioned< Type > &)