58 if (isA<omegaWallFunctionFvPatchScalarField>(bf[
patchi]))
105 if (isA<omegaWallFunctionFvPatchScalarField>(bf[
patchi]))
112 label celli = faceCells[i];
142 refCast<const omegaWallFunctionFvPatchScalarField>(bf[
patchi]);
216 const scalar Cmu5 =
sqrt(nutw.
Cmu());
222 const scalar w = cornerWeights[facei];
224 const scalar
Rey =
y[facei]*
sqrt(
k[celli])/nuw[facei];
230 const scalar lamFrac =
exp(-
Rey/11);
231 const scalar turbFrac = 1 - lamFrac;
233 const scalar uStar =
sqrt
235 lamFrac*nuw[facei]*magGradUw[facei] + turbFrac*Cmu5*
k[celli]
238 const scalar omegaVis = 6*nuw[facei]/(
beta1_*
sqr(
y[facei]));
239 const scalar omegaLog = uStar/(Cmu5*nutw.
kappa()*
y[facei]);
241 omega0[celli] += w*(lamFrac*omegaVis + turbFrac*omegaLog);
249 *
sqr(uStar*magGradUw[facei]*
y[facei]/
uPlus)
257 const scalar omegaVis = 6*nuw[facei]/(
beta1_*
sqr(
y[facei]));
259 omega0[celli] += w*omegaVis;
261 G0[celli] += w*
G[celli];
265 const scalar uStar =
sqrt(Cmu5*
k[celli]);
266 const scalar omegaLog = uStar/(Cmu5*nutw.
kappa()*
y[facei]);
268 omega0[celli] += w*omegaLog;
272 sqr(uStar*magGradUw[facei]*
y[facei]/
uPlus)
290 beta1_(
dict.lookupOrDefault<scalar>(
"beta1", 0.075)),
291 blended_(
dict.lookupOrDefault<
Switch>(
"blended", false)),
313 blended_(ptf.blended_),
329 beta1_(owfpsf.beta1_),
330 blended_(owfpsf.blended_),
408 scalar& w = weights[facei];
414 const scalar w = weights[facei];
417 G[celli] = (1 - w)*
G[celli] + w*
G0[celli];
418 omega[celli] = (1 - w)*
omega[celli] + w*omega0[celli];
442 scalar& w = weights[facei];
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
Generic GeometricBoundaryField class.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
label size() const
Return the number of elements in the UList.
void setSize(const label)
Reset size of List.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
bool empty() const
Return true if the UList is empty (ie, size() is zero)
label size() const
Return the number of elements in the UPtrList.
A list of keyword definitions, which are a keyword followed by any number of values (e....
const word & name() const
Return const reference to name.
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
virtual void write(Ostream &) const
Write.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
void setValues(const labelUList &cells, const ListType< Type > &values)
Set solution in given cells to the specified values.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
Foam::fvPatchFieldMapper.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
bool manipulatedMatrix() const
Return true if the matrix has already been manipulated.
const DimensionedField< Type, volMesh > & internalField() const
Return dimensioned internal field reference.
virtual void operator==(const fvPatchField< Type > &)
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch as patch field.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
const objectRegistry & db() const
Return local objectRegistry.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void manipulateMatrix(fvMatrix< Type > &matrix)
Manipulate matrix.
const fvPatch & patch() const
Return patch.
bool updated() const
Return true if the boundary condition has already been updated.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
label index() const
Return the index of this patch in the fvBoundaryMesh.
virtual const labelUList & faceCells() const
Return faceCells.
Abstract base class for turbulence models (RAS, LES and laminar).
virtual tmp< volScalarField > k() const =0
Return the turbulence kinetic energy.
word GName() const
Helper function to return the name of the turbulence G field.
const volVectorField & U() const
Access function to velocity field.
const volScalarField::Boundary & y() const
Return the near wall distance.
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions,...
static scalar yPlusLam(const scalar kappa, const scalar E)
Calculate the Y+ at the edge of the laminar sublayer.
scalar kappa() const
Return kappa.
scalar E() const
Return E.
static const nutWallFunctionFvPatchScalarField & nutw(const momentumTransportModel &turbModel, const label patchi)
Return the nut patchField for the given wall patch.
scalar Cmu() const
Return Cmu.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
const Type & lookupType(const word &group=word::null) const
Lookup and return the object of the given Type.
This boundary condition provides a wall constraint on turbulnce specific dissipation,...
scalarField & omega(bool init=false)
Return non-const access to the master's omega field.
virtual void calculate(const momentumTransportModel &turbModel, const List< scalar > &cornerWeights, const fvPatch &patch, scalarField &G, scalarField &omega)
Calculate the omega and G.
scalarField G_
Local copy of turbulence G field.
List< List< scalar > > cornerWeights_
List of averaging corner weights.
Switch blended_
Blending switch (defaults to false)
virtual label & master()
Return non-const access to the master patch ID.
virtual void write(Ostream &) const
Write.
virtual void calculateTurbulenceFields(const momentumTransportModel &turbModel, scalarField &G0, scalarField &omega0)
Main driver to calculate the turbulence fields.
static scalar tolerance_
Tolerance used in weighted calculations.
virtual void manipulateMatrix(fvMatrix< scalar > &matrix)
Manipulate matrix.
bool initialised_
Initialised flag.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void createAveragingWeights()
Create the averaging weights for cells which are bounded by.
scalar beta1_
beta1 coefficient
label master_
Master patch ID.
scalarField & G(bool init=false)
Return non-const access to the master's G field.
omegaWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
virtual omegaWallFunctionFvPatchScalarField & omegaPatch(const label patchi)
Helper function to return non-const access to an omega patch.
scalarField omega_
Local copy of turbulence omega field.
virtual void setMaster()
Set the master patch - master is responsible for updating all.
bool changing() const
Is mesh changing.
A class for managing temporary objects.
const dimensionedScalar G0
Conductance quantum: default SI units: [S].
dimensionedScalar exp(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimless
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar log(const dimensionedScalar &ds)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< scalar > mag(const dimensioned< Type > &)
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
dimensionedScalar pow025(const dimensionedScalar &ds)