atmNutUWallFunctionFvPatchScalarField Class Reference

This boundary condition provides a wall constraint on the turbulent viscosity (i.e. nut) based on velocity (i.e. U) for atmospheric boundary layer modelling. It is designed to be used in conjunction with the atmBoundaryLayerInletVelocity boundary condition. More...

Inheritance diagram for atmNutUWallFunctionFvPatchScalarField:
[legend]
Collaboration diagram for atmNutUWallFunctionFvPatchScalarField:
[legend]

Public Member Functions

 TypeName ("atmNutUWallFunction")
 Runtime type information. More...
 
 atmNutUWallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 atmNutUWallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 atmNutUWallFunctionFvPatchScalarField (const atmNutUWallFunctionFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 
 atmNutUWallFunctionFvPatchScalarField (const atmNutUWallFunctionFvPatchScalarField &)
 Construct as copy. More...
 
virtual tmp< fvPatchScalarFieldclone () const
 Construct and return a clone. More...
 
 atmNutUWallFunctionFvPatchScalarField (const atmNutUWallFunctionFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual tmp< fvPatchScalarFieldclone (const DimensionedField< scalar, volMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
virtual void autoMap (const fvPatchFieldMapper &)
 Map (and resize as needed) from self given a mapping object. More...
 
virtual void rmap (const fvPatchScalarField &, const labelList &)
 Reverse map the given fvPatchField onto this fvPatchField. More...
 
virtual void write (Ostream &) const
 Write. More...
 
- Public Member Functions inherited from nutUWallFunctionFvPatchScalarField
 TypeName ("nutUWallFunction")
 Runtime type information. More...
 
 nutUWallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 nutUWallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 nutUWallFunctionFvPatchScalarField (const nutUWallFunctionFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 
 nutUWallFunctionFvPatchScalarField (const nutUWallFunctionFvPatchScalarField &)
 Construct as copy. More...
 
virtual tmp< fvPatchScalarFieldclone () const
 Construct and return a clone. More...
 
 nutUWallFunctionFvPatchScalarField (const nutUWallFunctionFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual tmp< fvPatchScalarFieldclone (const DimensionedField< scalar, volMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
virtual tmp< scalarFieldyPlus () const
 Calculate and return the yPlus at the boundary. More...
 
virtual void write (Ostream &os) const
 Write. More...
 
- Public Member Functions inherited from nutWallFunctionFvPatchScalarField
 TypeName ("nutWallFunction")
 Runtime type information. More...
 
 nutWallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 nutWallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 nutWallFunctionFvPatchScalarField (const nutWallFunctionFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 
 nutWallFunctionFvPatchScalarField (const nutWallFunctionFvPatchScalarField &)
 Construct as copy. More...
 
 nutWallFunctionFvPatchScalarField (const nutWallFunctionFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual tmp< scalarFieldyPlus () const =0
 Calculate and return the yPlus at the boundary. More...
 
const wallFunctionCoefficientswallCoeffs () const noexcept
 Return wallFunctionCoefficients. More...
 
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field. More...
 
virtual void write (Ostream &) const
 Write. More...
 

Protected Member Functions

virtual tmp< scalarFieldcalcNut () const
 Calculate the turbulent viscosity. More...
 
void writeLocalEntries (Ostream &) const
 Write local wall function variables. More...
 
- Protected Member Functions inherited from nutUWallFunctionFvPatchScalarField
virtual tmp< scalarFieldcalcNut () const
 Calculate the turbulent viscosity. More...
 
tmp< scalarFieldcalcYPlus (const scalarField &magUp) const
 Calculate yPlus. More...
 
void writeLocalEntries (Ostream &) const
 Write local wall function variables. More...
 
- Protected Member Functions inherited from nutWallFunctionFvPatchScalarField
virtual const volVectorFieldU (const turbulenceModel &turb) const
 
virtual void checkType ()
 Check the type of the patch. More...
 
virtual tmp< scalarFieldcalcNut () const =0
 Calculate the turbulent viscosity. More...
 
void writeLocalEntries (Ostream &) const
 Write local wall function variables. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from nutWallFunctionFvPatchScalarField
static const nutWallFunctionFvPatchScalarFieldnutw (const turbulenceModel &turbModel, const label patchi)
 Return the nut patchField for the given wall patch. More...
 
- Protected Attributes inherited from nutWallFunctionFvPatchScalarField
word UName_
 Name of velocity field. More...
 
wallFunctionCoefficients wallCoeffs_
 Wall-function coefficients. More...
 

Detailed Description

This boundary condition provides a wall constraint on the turbulent viscosity (i.e. nut) based on velocity (i.e. U) for atmospheric boundary layer modelling. It is designed to be used in conjunction with the atmBoundaryLayerInletVelocity boundary condition.

The governing equation of the boundary condition:

\[ u = \frac{u^*}{\kappa} ln \left(\frac{z + z_0}{z_0}\right) \]

where

\( u^* \) = Friction velocity
\( \kappa \) = von Kármán constant
\( z_0 \) = Surface roughness length [m]
\( z \) = Ground-normal coordinate

Required fields:

      nut     | Turbulent viscosity         [m2/s]
      U       | Velocity                    [m/s]
Usage
Example of the boundary condition specification:
<patchName>
{
    // Mandatory entries
    type            atmNutUWallFunction;
    z0              <PatchFunction1<scalar>>;

    // Optional entries
    boundNut        true;

    // Inherited entries
    ...
}

where the entries mean:

Property Description Type Reqd Deflt
type Type name: atmNutUWallFunction word yes -
z0 Surface roughness length [m] PatchFunction1<scalar> yes -
boundNut Flag: zero-bound nut near wall bool no true

The inherited entries are elaborated in:

Source files

Definition at line 147 of file atmNutUWallFunctionFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ atmNutUWallFunctionFvPatchScalarField() [1/5]

atmNutUWallFunctionFvPatchScalarField ( const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF 
)

Construct from patch and internal field.

Definition at line 118 of file atmNutUWallFunctionFvPatchScalarField.C.

◆ atmNutUWallFunctionFvPatchScalarField() [2/5]

atmNutUWallFunctionFvPatchScalarField ( const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF,
const dictionary dict 
)

Construct from patch, internal field and dictionary.

Definition at line 144 of file atmNutUWallFunctionFvPatchScalarField.C.

◆ atmNutUWallFunctionFvPatchScalarField() [3/5]

atmNutUWallFunctionFvPatchScalarField ( const atmNutUWallFunctionFvPatchScalarField ptf,
const fvPatch p,
const DimensionedField< scalar, volMesh > &  iF,
const fvPatchFieldMapper mapper 
)

Construct by mapping given atmNutUWallFunctionFvPatchScalarField onto a new patch

Definition at line 130 of file atmNutUWallFunctionFvPatchScalarField.C.

◆ atmNutUWallFunctionFvPatchScalarField() [4/5]

◆ atmNutUWallFunctionFvPatchScalarField() [5/5]

Construct as copy setting internal field reference.

Definition at line 168 of file atmNutUWallFunctionFvPatchScalarField.C.

Member Function Documentation

◆ calcNut()

tmp< scalarField > calcNut ( ) const
protectedvirtual

Calculate the turbulent viscosity.

Reimplemented from nutUWallFunctionFvPatchScalarField.

Definition at line 42 of file atmNutUWallFunctionFvPatchScalarField.C.

References e, Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, IOobject::groupName(), wallFunctionCoefficients::kappa(), Foam::log(), Foam::mag(), Foam::max(), Time::New(), nutWallFunctionFvPatchScalarField::nutw(), fvPatchField< Type >::patchInternalField(), turbulenceModel::propertiesName, Foam::sqr(), U, nutWallFunctionFvPatchScalarField::wallCoeffs_, and y.

Here is the call graph for this function:

◆ writeLocalEntries()

void writeLocalEntries ( Ostream os) const
protected

Write local wall function variables.

Definition at line 102 of file atmNutUWallFunctionFvPatchScalarField.C.

References os(), and Ostream::writeEntryIfDifferent().

Referenced by atmNutUWallFunctionFvPatchScalarField::write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TypeName()

TypeName ( "atmNutUWallFunction"  )

Runtime type information.

◆ clone() [1/2]

virtual tmp< fvPatchScalarField > clone ( ) const
inlinevirtual

Construct and return a clone.

Reimplemented from nutUWallFunctionFvPatchScalarField.

Definition at line 213 of file atmNutUWallFunctionFvPatchScalarField.H.

◆ clone() [2/2]

virtual tmp< fvPatchScalarField > clone ( const DimensionedField< scalar, volMesh > &  iF) const
inlinevirtual

Construct and return a clone setting internal field reference.

Reimplemented from nutUWallFunctionFvPatchScalarField.

Definition at line 229 of file atmNutUWallFunctionFvPatchScalarField.H.

◆ autoMap()

void autoMap ( const fvPatchFieldMapper m)
virtual

Map (and resize as needed) from self given a mapping object.

Definition at line 182 of file atmNutUWallFunctionFvPatchScalarField.C.

References atmBoundaryLayer::autoMap().

Here is the call graph for this function:

◆ rmap()

void rmap ( const fvPatchScalarField ptf,
const labelList addr 
)
virtual

Reverse map the given fvPatchField onto this fvPatchField.

Definition at line 196 of file atmNutUWallFunctionFvPatchScalarField.C.

References atmBoundaryLayer::rmap().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Reimplemented from nutUWallFunctionFvPatchScalarField.

Definition at line 214 of file atmNutUWallFunctionFvPatchScalarField.C.

References os(), ObukhovLength::write(), and atmNutUWallFunctionFvPatchScalarField::writeLocalEntries().

Here is the call graph for this function:

The documentation for this class was generated from the following files: