Loading...
Searching...
No Matches
nutkRoughWallFunctionFvPatchScalarField Class Reference

This boundary condition provides a wall-function for the turbulent viscosity (i.e. nut) when using wall functions for rough walls, based on the turbulent kinetic energy (i.e. k). The condition manipulates the wall roughness parameter (i.e. E) to account for roughness effects. More...

#include <nutkRoughWallFunctionFvPatchScalarField.H>

Inheritance diagram for nutkRoughWallFunctionFvPatchScalarField:
Collaboration diagram for nutkRoughWallFunctionFvPatchScalarField:

Public Member Functions

 TypeName ("nutkRoughWallFunction")
 Runtime type information.
 nutkRoughWallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field.
 nutkRoughWallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary.
 nutkRoughWallFunctionFvPatchScalarField (const nutkRoughWallFunctionFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given nutkRoughWallFunctionFvPatchScalarField onto a new patch.
 nutkRoughWallFunctionFvPatchScalarField (const nutkRoughWallFunctionFvPatchScalarField &)
 Construct as copy.
 nutkRoughWallFunctionFvPatchScalarField (const nutkRoughWallFunctionFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Construct as copy setting internal field reference.
virtual tmp< fvPatchField< scalar > > clone () const
 Return a clone.
virtual tmp< fvPatchField< scalar > > clone (const DimensionedField< scalar, volMesh > &iF) const
 Clone with an internal field reference.
scalarFieldKs ()
 Return Ks.
scalarFieldCs ()
 Return Cs.
virtual void autoMap (const fvPatchFieldMapper &)
 Map (and resize as needed) from self given a mapping object.
virtual void rmap (const fvPatchScalarField &, const labelList &)
 Reverse map the given fvPatchField onto this fvPatchField.
virtual void write (Ostream &) const
 Write.
Public Member Functions inherited from nutkWallFunctionFvPatchScalarField
 TypeName ("nutkWallFunction")
 Runtime type information.
 nutkWallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field.
 nutkWallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary.
 nutkWallFunctionFvPatchScalarField (const nutkWallFunctionFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given nutkWallFunctionFvPatchScalarField onto a new patch.
 nutkWallFunctionFvPatchScalarField (const nutkWallFunctionFvPatchScalarField &)
 Construct as copy.
 nutkWallFunctionFvPatchScalarField (const nutkWallFunctionFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Construct as copy setting internal field reference.
virtual tmp< scalarFieldyPlus () const
 Calculate and return the yPlus at the boundary.
Public Member Functions inherited from nutWallFunctionFvPatchScalarField
 TypeName ("nutWallFunction")
 Runtime type information.
 nutWallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field.
 nutWallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary.
 nutWallFunctionFvPatchScalarField (const nutWallFunctionFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given nutWallFunctionFvPatchScalarField onto a new patch.
 nutWallFunctionFvPatchScalarField (const nutWallFunctionFvPatchScalarField &)
 Construct as copy.
 nutWallFunctionFvPatchScalarField (const nutWallFunctionFvPatchScalarField &, const DimensionedField< scalar, volMesh > &)
 Construct as copy setting internal field reference.
const wallFunctionCoefficientswallCoeffs () const noexcept
 Return wallFunctionCoefficients.
virtual void updateCoeffs ()
 Update the coefficients associated with the patch field.

Protected Member Functions

virtual scalar fnRough (const scalar KsPlus, const scalar Cs) const
 Compute the roughness function.
virtual tmp< scalarFieldcalcNut () const
 Calculate the turbulent viscosity.
void writeLocalEntries (Ostream &os) const
 Write local wall function variables.
Protected Member Functions inherited from nutkWallFunctionFvPatchScalarField
void writeLocalEntries (Ostream &) const
 Write local wall function variables.
Protected Member Functions inherited from nutWallFunctionFvPatchScalarField
virtual const volVectorFieldU (const turbulenceModel &turb) const
 Helper to return the velocity field either from the turbulence model (default) or the mesh database.
virtual void checkType ()
 Check the type of the patch.
void writeLocalEntries (Ostream &) const
 Write local wall function variables.

Protected Attributes

scalarField Ks_
 Roughness height.
scalarField Cs_
 Roughness constant.
Protected Attributes inherited from nutWallFunctionFvPatchScalarField
word UName_
 Name of velocity field.
wallFunctionCoefficients wallCoeffs_
 Wall-function coefficients.

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.

Detailed Description

This boundary condition provides a wall-function for the turbulent viscosity (i.e. nut) when using wall functions for rough walls, based on the turbulent kinetic energy (i.e. k). The condition manipulates the wall roughness parameter (i.e. E) to account for roughness effects.

Parameter ranges:

  • roughness height (i.e. Ks)= sand-grain roughness (0 for smooth walls)
  • roughness constant (i.e. Cs) = 0.5-1.0
Usage
Example of the boundary condition specification:
<patchName>
{
    // Mandatory entries
    type            nutkRoughWallFunction;
    Ks              uniform 0;
    Cs              uniform 0.5;

    // Inherited entries
    ...
}

where the entries mean:

Property Description Type Reqd Dflt
type Type name: nutkRoughWallFunction word yes -
Ks Sand-grain roughness height scalarField yes -
Cs Roughness constant scalarField yes -

The inherited entries are elaborated in:

Source files

Definition at line 108 of file nutkRoughWallFunctionFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ nutkRoughWallFunctionFvPatchScalarField() [1/5]

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

Construct from patch and internal field.

Definition at line 135 of file nutkRoughWallFunctionFvPatchScalarField.C.

References Cs_, Ks_, nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField(), p, and Foam::Zero.

Referenced by nutkRoughWallFunctionFvPatchScalarField(), nutkRoughWallFunctionFvPatchScalarField(), nutkRoughWallFunctionFvPatchScalarField(), and TypeName().

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

◆ nutkRoughWallFunctionFvPatchScalarField() [2/5]

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

Construct from patch, internal field and dictionary.

Definition at line 163 of file nutkRoughWallFunctionFvPatchScalarField.C.

References Cs_, dict, Ks_, nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField(), and p.

Here is the call graph for this function:

◆ nutkRoughWallFunctionFvPatchScalarField() [3/5]

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

Construct by mapping given nutkRoughWallFunctionFvPatchScalarField onto a new patch.

Definition at line 148 of file nutkRoughWallFunctionFvPatchScalarField.C.

References Cs_, Ks_, nutkRoughWallFunctionFvPatchScalarField(), nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField(), and p.

Here is the call graph for this function:

◆ nutkRoughWallFunctionFvPatchScalarField() [4/5]

nutkRoughWallFunctionFvPatchScalarField ( const nutkRoughWallFunctionFvPatchScalarField & rwfpsf)

Construct as copy.

Definition at line 177 of file nutkRoughWallFunctionFvPatchScalarField.C.

References Cs_, Ks_, nutkRoughWallFunctionFvPatchScalarField(), and nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField().

Here is the call graph for this function:

◆ nutkRoughWallFunctionFvPatchScalarField() [5/5]

nutkRoughWallFunctionFvPatchScalarField ( const nutkRoughWallFunctionFvPatchScalarField & rwfpsf,
const DimensionedField< scalar, volMesh > & iF )

Construct as copy setting internal field reference.

Definition at line 189 of file nutkRoughWallFunctionFvPatchScalarField.C.

References Cs_, Ks_, nutkRoughWallFunctionFvPatchScalarField(), and nutkWallFunctionFvPatchScalarField::nutkWallFunctionFvPatchScalarField().

Here is the call graph for this function:

Member Function Documentation

◆ fnRough()

Foam::scalar fnRough ( const scalar KsPlus,
const scalar Cs ) const
protectedvirtual

Compute the roughness function.

Definition at line 30 of file nutkRoughWallFunctionFvPatchScalarField.C.

References Cs(), Foam::log(), Foam::pow(), and Foam::sin().

Referenced by calcNut().

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

◆ calcNut()

◆ writeLocalEntries()

void writeLocalEntries ( Ostream & os) const
protected

Write local wall function variables.

Definition at line 123 of file nutkRoughWallFunctionFvPatchScalarField.C.

References Cs_, Ks_, and os().

Referenced by write().

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

◆ TypeName()

TypeName ( "nutkRoughWallFunction" )

Runtime type information.

References nutkRoughWallFunctionFvPatchScalarField().

Here is the call graph for this function:

◆ clone() [1/2]

virtual tmp< fvPatchField< scalar > > clone ( ) const
inlinevirtual

Return a clone.

Reimplemented from nutkWallFunctionFvPatchScalarField.

Definition at line 207 of file nutkRoughWallFunctionFvPatchScalarField.H.

References fvPatchField< Type >::Clone().

Here is the call graph for this function:

◆ clone() [2/2]

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

Clone with an internal field reference.

Reimplemented from nutkWallFunctionFvPatchScalarField.

Definition at line 215 of file nutkRoughWallFunctionFvPatchScalarField.H.

References fvPatchField< Type >::Clone().

Here is the call graph for this function:

◆ Ks()

scalarField & Ks ( )
inline

Return Ks.

Definition at line 231 of file nutkRoughWallFunctionFvPatchScalarField.H.

References Ks_.

◆ Cs()

scalarField & Cs ( )
inline

Return Cs.

Definition at line 239 of file nutkRoughWallFunctionFvPatchScalarField.H.

References Cs_.

Referenced by fnRough().

Here is the caller graph for this function:

◆ autoMap()

void autoMap ( const fvPatchFieldMapper & m)
virtual

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

Definition at line 204 of file nutkRoughWallFunctionFvPatchScalarField.C.

References Cs_, and Ks_.

◆ rmap()

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

Reverse map the given fvPatchField onto this fvPatchField.

Definition at line 215 of file nutkRoughWallFunctionFvPatchScalarField.C.

References Cs_, Ks_, and Foam::refCast().

Here is the call graph for this function:

◆ write()

void write ( Ostream & os) const
virtual

Write.

Reimplemented from nutkWallFunctionFvPatchScalarField.

Definition at line 231 of file nutkRoughWallFunctionFvPatchScalarField.C.

References os(), nutWallFunctionFvPatchScalarField::write(), writeLocalEntries(), and fvPatchField< Type >::writeValueEntry().

Here is the call graph for this function:

Member Data Documentation

◆ Ks_

◆ Cs_


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