102 if (isA<nutkWallFunctionFvPatchScalarField>(nutWall))
104 const label patchi(patch().index());
111 internalField().group()
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];
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...
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Base class for solution control classes.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Smooth ATC in cells next to a set of patches supplied by type.
virtual bool write()
Write the output fields.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Field< Type > & source() noexcept
A FieldMapper for finite-volume patch fields.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void manipulateMatrix(fvMatrix< scalar > &matrix)
Add source terms to the rhs of the first cell centre.
This boundary condition provides a simple wrapper around the zero-gradient condition,...
The class nutWallFunction is an abstract base class that hosts calculation methods and common functi...
const wallFunctionCoefficients & wallCoeffs() const noexcept
Return wallFunctionCoefficients.
A class for managing temporary objects.
Abstract base class for turbulence models (RAS, LES and laminar).
static const word propertiesName
Default name of the turbulence properties dictionary.
virtual tmp< volScalarField > k() const =0
Return the turbulence kinetic energy.
virtual tmp< volScalarField > nu() const =0
Return the laminar viscosity.
const nearWallDist & y() const
Return the near wall distances.
Class to host the wall-function coefficients being used in the wall function boundary conditions.
scalar kappa() const noexcept
Return the object: kappa.
scalar E() const noexcept
Return the object: E.
scalar yPlusLam() const noexcept
Return the object: yPlusLam.
scalar Cmu() const noexcept
Return the object: Cmu.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar log(const dimensionedScalar &ds)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
dimensionedScalar pow025(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.