39 const label patchi =
patch().index();
46 internalField().
group()
70 const label patchi =
patch().index();
77 internalField().
group()
93 auto& uTaup = tuTaup.ref();
97 const scalar
kappa = wallCoeffs_.kappa();
98 const scalar E = wallCoeffs_.E();
102 scalar ut =
sqrt((nutw[facei] + nuw[facei])*magGradU[facei]);
103 if (
mag(ut) > ROOTVSMALL)
105 scalar
error = GREAT;
107 while (iter++ < 10 &&
error > 0.001)
109 const scalar
yPlus =
y[facei]*ut/nuw[facei];
111 const scalar uTauLog =
115 pow(
pow(uTauVis, n_) +
pow(uTauLog, n_), 1.0/n_);
116 error =
mag(ut - utNew)/(ut + ROOTVSMALL);
117 ut = 0.5*(ut + utNew);
173 n_(
dict.getOrDefault<scalar>(
"n", 4.0))
205 const label patchi =
patch().index();
212 internalField().
group()
224 return y*calcUTau(magGradU)/nuw;
234 writeLocalEntries(
os);
246 nutUBlendedWallFunctionFvPatchScalarField
virtual tmp< scalarField > calcNut() const
Calculate the turbulent viscosity.
virtual void write(Ostream &os) const
Write.
virtual const volVectorField & U(const turbulenceModel &turb) const
Helper to return the velocity field either from the turbulence model (default) or the mesh database...
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)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
dimensionedScalar sqrt(const dimensionedScalar &ds)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
nutUBlendedWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
Abstract base class for turbulence models (RAS, LES and laminar).
This boundary condition provides a wall function for the turbulent viscosity (i.e. nut) based on velocity (i.e. U) using a binomial-function wall-function blending method between the viscous and inertial sublayer predictions of nut for low- and high-Reynolds number applications.
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
constexpr const char *const group
Group name for atomic constants.
Class to handle errors and exceptions in a simple, consistent stream-based manner.
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
tmp< scalarField > calcUTau(const scalarField &magGradU) const
Calculate the friction velocity.
The class nutWallFunction is an abstract base class that hosts calculation methods and common functi...
const dimensionedScalar e
Elementary charge.
fvPatchField< scalar > fvPatchScalarField
static const word propertiesName
Default name of the turbulence properties dictionary.
A FieldMapper for finite-volume patch fields.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual void write(Ostream &) const
Write.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch.
OBJstream os(runTime.globalPath()/outputName)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
A class for managing temporary objects.
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
void writeLocalEntries(Ostream &) const
Write local wall function variables.
static constexpr const zero Zero
Global zero (0)