41 referenceField_(
"referenceField", iF.dimensions(),
dict,
p.size()),
42 alpha_(
dict.lookupOrDefault<scalar>(
"alpha", units::
fraction, 0.1)),
45 if (
dict.found(
"value"))
70 fluctuationScale_(ptf.fluctuationScale_),
71 referenceField_(mapper(ptf.referenceField_)),
86 fluctuationScale_(ptf.fluctuationScale_),
87 referenceField_(ptf.referenceField_),
105 refCast<const turbulentInletFvPatchField<Type>>(ptf);
107 mapper(referenceField_, tiptf.referenceField_);
120 refCast<const turbulentInletFvPatchField<Type>>(ptf);
122 referenceField_.
reset(tiptf.referenceField_);
142 randomField[facei] = ranGen_.sample01<Type>();
147 scalar rmsCorr =
sqrt(12*(2*alpha_ -
sqr(alpha_)))/alpha_;
150 (1 - alpha_)*patchField
158 )*
mag(referenceField_)
161 curTimeIndex_ = this->
time().timeIndex();
172 writeEntry(os,
"fluctuationScale", fluctuationScale_);
173 writeEntry(os,
"referenceField", referenceField_);
#define forAll(list, i)
Loop across all elements in list.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const dimensionSet & dimensions() const
Return dimensions.
Pre-declare SubField and related Field type.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Abstract base class for field mapping.
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Write.
virtual void operator==(const fvPatchField< Type > &)
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void reset(const fvPatchField< Type > &)
Reset the fvPatchField to the given fvPatchField.
virtual void map(const fvPatchField< Type > &, const fieldMapper &)
Map the given fvPatchField onto this fvPatchField.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Traits class for primitives.
This boundary condition generates a fluctuating inlet condition by adding a random component to a ref...
virtual void write(Ostream &) const
Write.
turbulentInletFvPatchField(const fvPatch &, const DimensionedField< Type, fvMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void reset(const fvPatchField< Type > &)
Reset the fvPatchField to the given fvPatchField.
virtual void map(const fvPatchField< Type > &, const fieldMapper &)
Map the given fvPatchField onto this fvPatchField.
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< DimensionedField< Type, GeoMesh, Field > > cmptMultiply(const DimensionedField< Type, GeoMesh, PrimitiveField1 > &df1, const DimensionedField< Type, GeoMesh, PrimitiveField2 > &df2)
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
tmp< DimensionedField< scalar, GeoMesh, Field > > mag(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)
void writeEntry(Ostream &os, const word &key, const DimensionedFieldFunction< DimensionedFieldType > &f)