102 if (isA<nutkWallFunctionFvPatchScalarField>(nutWall))
104 const label patchi(
patch().index());
118 refCast<nutWallFunctionFvPatchScalarField>(nutWall);
120 const scalar Cmu = wallCoeffs.
Cmu();
121 const scalar
kappa = wallCoeffs.kappa();
122 const scalar E = wallCoeffs.E();
123 const scalar yPlusLam = wallCoeffs.yPlusLam();
125 const scalar Cmu25 =
pow025(Cmu);
140 const scalar sqrtkCell(
sqrt(
k[celli]));
141 const scalar
yPlus = Cmu25*
y[facei]*sqrtkCell/nuw[facei];
142 if (yPlusLam <
yPlus)
144 const scalar logEyPlus =
log(E*
yPlus);
145 const scalar dnut_dyPlus =
146 nuw[facei]*
kappa*(logEyPlus - 1)/
sqr(logEyPlus);
147 const scalar dyPlus_dk =
148 Cmu25*
y[facei]/(2*nuw[facei]*sqrtkCell);
149 const scalar dnut_dk = dnut_dyPlus*dyPlus_dk;
150 source[celli] -= dJdnut[facei]*dnut_dk*magSf[facei];
171 kaqRWallFunctionFvPatchScalarField
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
const objectRegistry & db() const
The associated objectRegistry.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
dimensionedScalar log(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const scalarField & magSf() const
Return face area magnitudes, like the fvMesh::magSf() method.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const fvPatch & patch() const noexcept
Return the patch.
const wallFunctionCoefficients & wallCoeffs() const noexcept
Return wallFunctionCoefficients.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual tmp< volScalarField > nu() const =0
Return the laminar viscosity.
dimensionedScalar sqrt(const dimensionedScalar &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
dimensionedScalar pow025(const dimensionedScalar &ds)
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
label k
Boltzmann constant.
Smooth ATC in cells next to a set of patches supplied by type.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
Abstract base class for turbulence models (RAS, LES and laminar).
Macros for easy insertion into run-time selection tables.
virtual tmp< volScalarField > k() const =0
Return the turbulence kinetic energy.
#define forAll(list, i)
Loop across all elements in list.
constexpr const char *const group
Group name for atomic constants.
virtual void write(Ostream &) const
Write.
This boundary condition provides a simple wrapper around the zero-gradient condition, which can be used for the turbulent kinetic energy (i.e. k), square-root of turbulent kinetic energy (i.e. q) and Reynolds stress symmetric-tensor fields (i.e. R) for the cases of high Reynolds number flow using wall functions. It is not a wall-function condition.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
The class nutWallFunction is an abstract base class that hosts calculation methods and common functi...
autoPtr< boundaryAdjointContribution > boundaryContrPtr_
Engine to manage contributions of the objective functions to the adjoint boundary conditions...
kaqRWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
fvPatchField< scalar > fvPatchScalarField
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from Foam::string.
virtual const labelUList & faceCells() const
Return faceCells.
A FieldMapper for finite-volume patch fields.
const nearWallDist & y() const
Return the near wall distances.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
virtual void write(Ostream &) const
Write.
OBJstream os(runTime.globalPath()/outputName)
scalar Cmu() const noexcept
Return the object: Cmu.
Field< Type > & source() noexcept
virtual void manipulateMatrix(fvMatrix< scalar > &matrix)
Add source terms to the rhs of the first cell centre.
Base class for solution control classes.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const DimensionedField< scalar, volMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
A class for managing temporary objects.
Class to host the wall-function coefficients being used in the wall function boundary conditions...
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)