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)),
73 const turbulentInletFvPatchField<Type>& ptf,
75 const DimensionedField<Type, volMesh>& iF,
76 const fvPatchFieldMapper& mapper
79 fixedValueFvPatchField<Type>(ptf,
p, iF, mapper),
81 fluctuationScale_(ptf.fluctuationScale_),
82 referenceField_(ptf.referenceField_, mapper),
96 fluctuationScale_(ptf.fluctuationScale_),
97 referenceField_(ptf.referenceField_),
111 ranGen_(ptf.ranGen_),
112 fluctuationScale_(ptf.fluctuationScale_),
113 referenceField_(ptf.referenceField_),
128 referenceField_.autoMap(m);
142 refCast<const turbulentInletFvPatchField<Type>>(ptf);
144 referenceField_.
rmap(tiptf.referenceField_, addr);
156 if (curTimeIndex_ != this->db().time().
timeIndex())
158 Field<Type>& patchField = *
this;
160 Field<Type> randomField(this->size());
164 ranGen_.randomise01<Type>(randomField[facei]);
169 scalar rmsCorr =
sqrt(12*(2*alpha_ -
sqr(alpha_)))/alpha_;
172 (1 - alpha_)*patchField
178 randomField - 0.5*pTraits<Type>::one,
180 )*
mag(referenceField_)
183 curTimeIndex_ = this->db().time().timeIndex();
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
bool readValueEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "value" entry into *this.
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
dimensionedSymmTensor sqr(const dimensionedVector &dv)
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...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void write(Ostream &) const
Write.
virtual void write(Ostream &) const
Write.
#define forAll(list, i)
Loop across all elements in list.
turbulentInletFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
This boundary condition produces spatiotemporal-variant field by summing a set of pseudo-random numbe...
A FieldMapper for finite-volume patch fields.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
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 > &)
OBJstream os(runTime.globalPath()/outputName)
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void operator=(const UList< Type > &)
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
static constexpr const zero Zero
Global zero (0)