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_(mapper(ptf.referenceField_)),
101 ranGen_(ptf.ranGen_),
102 fluctuationScale_(ptf.fluctuationScale_),
103 referenceField_(ptf.referenceField_),
118 m(referenceField_, referenceField_);
132 refCast<const turbulentInletFvPatchField<Type>>(ptf);
134 referenceField_.
rmap(tiptf.referenceField_, addr);
146 if (curTimeIndex_ != this->db().time().
timeIndex())
154 randomField[facei] = ranGen_.sample01<Type>();
159 scalar rmsCorr =
sqrt(12*(2*alpha_ -
sqr(alpha_)))/alpha_;
162 (1 - alpha_)*patchField
170 )*
mag(referenceField_)
173 curTimeIndex_ = this->db().time().timeIndex();
184 writeEntry(os,
"fluctuationScale", fluctuationScale_);
185 writeEntry(os,
"referenceField", referenceField_);
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.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
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 > &)