atmAlphatkWallFunctionFvPatchScalarField Class Reference

This boundary condition provides a wall constraint on the kinematic turbulent thermal conductivity (i.e. alphat) for atmospheric boundary layer modelling. It assumes a logarithmic distribution of the potential temperature within the first cell. More...

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

Public Member Functions

 TypeName ("atmAlphatkWallFunction")
 Runtime type information. More...
 
 atmAlphatkWallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 atmAlphatkWallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 atmAlphatkWallFunctionFvPatchScalarField (const atmAlphatkWallFunctionFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 
 atmAlphatkWallFunctionFvPatchScalarField (const atmAlphatkWallFunctionFvPatchScalarField &)
 Construct as copy. More...
 
virtual tmp< fvPatchScalarFieldclone () const
 Construct and return a clone. More...
 
 atmAlphatkWallFunctionFvPatchScalarField (const atmAlphatkWallFunctionFvPatchScalarField &, 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 updateCoeffs ()
 Update the coefficients associated with the patch field. 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...
 

Protected Member Functions

virtual void checkType ()
 Check the type of the patch. More...
 
void writeLocalEntries (Ostream &) const
 Write local wall function variables. More...
 

Protected Attributes

const scalar Cmu_
 Empirical model constant. More...
 
const scalar kappa_
 von Kármán constant More...
 
autoPtr< Function1< scalar > > Pr_
 Molecular Prandtl number. More...
 
autoPtr< PatchFunction1< scalar > > Prt_
 Turbulent Prandtl number field. More...
 
autoPtr< PatchFunction1< scalar > > z0_
 Surface roughness length [m]. More...
 

Static Protected Attributes

static scalar tolerance_ = 0.01
 Solution parameters. More...
 
static label maxIters_ = 10
 

Detailed Description

This boundary condition provides a wall constraint on the kinematic turbulent thermal conductivity (i.e. alphat) for atmospheric boundary layer modelling. It assumes a logarithmic distribution of the potential temperature within the first cell.

Required fields:

  alphat    | Kinematic turbulent thermal conductivity    [m2/s]
Usage
Example of the boundary condition specification:
<patchName>
{
    // Mandatory entries
    type            atmAlphatkWallFunction;
    Pr              <Function1<scalar>>;
    Prt             <PatchFunction1<scalar>>;
    z0              <PatchFunction1<scalar>>;

    // Optional entries
    Cmu             <scalar>;
    kappa           <scalar>;

    // Inherited entries
    ...
}

where the entries mean:

Property Description Type Reqd Deflt
type Type name: atmAlphatkWallFunction word yes -
Pr Molecular Prandtl number Function1<scalar> yes -
Prt Turbulent Prandtl number PatchFunction1<scalar> yes -
z0 Surface roughness length [m] PatchFunction1<scalar> yes -
Cmu Empirical model constant scalar no 0.09
kappa von Kármán constant scalar no 0.41

The inherited entries are elaborated in:

Source files

Definition at line 144 of file atmAlphatkWallFunctionFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ atmAlphatkWallFunctionFvPatchScalarField() [1/5]

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

Construct from patch and internal field.

Definition at line 87 of file atmAlphatkWallFunctionFvPatchScalarField.C.

References atmAlphatkWallFunctionFvPatchScalarField::checkType().

Here is the call graph for this function:

◆ atmAlphatkWallFunctionFvPatchScalarField() [2/5]

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

Construct from patch, internal field and dictionary.

Definition at line 125 of file atmAlphatkWallFunctionFvPatchScalarField.C.

References atmAlphatkWallFunctionFvPatchScalarField::checkType().

Here is the call graph for this function:

◆ atmAlphatkWallFunctionFvPatchScalarField() [3/5]

Construct by mapping given atmAlphatkWallFunctionFvPatchScalarField onto a new patch

Definition at line 105 of file atmAlphatkWallFunctionFvPatchScalarField.C.

References atmAlphatkWallFunctionFvPatchScalarField::checkType().

Here is the call graph for this function:

◆ atmAlphatkWallFunctionFvPatchScalarField() [4/5]

Construct as copy.

Definition at line 160 of file atmAlphatkWallFunctionFvPatchScalarField.C.

References atmAlphatkWallFunctionFvPatchScalarField::checkType().

Here is the call graph for this function:

◆ atmAlphatkWallFunctionFvPatchScalarField() [5/5]

Construct as copy setting internal field reference.

Definition at line 177 of file atmAlphatkWallFunctionFvPatchScalarField.C.

References atmAlphatkWallFunctionFvPatchScalarField::checkType().

Here is the call graph for this function:

Member Function Documentation

◆ checkType()

void checkType ( )
protectedvirtual

Check the type of the patch.

Definition at line 48 of file atmAlphatkWallFunctionFvPatchScalarField.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.

Referenced by Foam::atan2(), atmAlphatkWallFunctionFvPatchScalarField::atmAlphatkWallFunctionFvPatchScalarField(), Foam::hypot(), Foam::max(), Foam::min(), Foam::operator+(), and Foam::operator-().

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

◆ writeLocalEntries()

void writeLocalEntries ( Ostream os) const
protected

Write local wall function variables.

Definition at line 62 of file atmAlphatkWallFunctionFvPatchScalarField.C.

References atmAlphatkWallFunctionFvPatchScalarField::Cmu_, atmAlphatkWallFunctionFvPatchScalarField::kappa_, os(), atmAlphatkWallFunctionFvPatchScalarField::Pr_, atmAlphatkWallFunctionFvPatchScalarField::Prt_, Ostream::writeEntryIfDifferent(), and atmAlphatkWallFunctionFvPatchScalarField::z0_.

Referenced by atmAlphatkWallFunctionFvPatchScalarField::write().

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

◆ TypeName()

TypeName ( "atmAlphatkWallFunction"  )

Runtime type information.

◆ clone() [1/2]

virtual tmp< fvPatchScalarField > clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 224 of file atmAlphatkWallFunctionFvPatchScalarField.H.

◆ clone() [2/2]

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

Construct and return a clone setting internal field reference.

Definition at line 240 of file atmAlphatkWallFunctionFvPatchScalarField.H.

◆ updateCoeffs()

◆ autoMap()

void autoMap ( const fvPatchFieldMapper m)
virtual

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

Definition at line 280 of file atmAlphatkWallFunctionFvPatchScalarField.C.

References atmAlphatkWallFunctionFvPatchScalarField::Prt_, and atmAlphatkWallFunctionFvPatchScalarField::z0_.

◆ rmap()

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

◆ write()

void write ( Ostream os) const
virtual

Write.

Definition at line 320 of file atmAlphatkWallFunctionFvPatchScalarField.C.

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

Here is the call graph for this function:

Member Data Documentation

◆ Cmu_

◆ kappa_

◆ Pr_

◆ Prt_

◆ z0_

◆ tolerance_

scalar tolerance_ = 0.01
staticprotected

Solution parameters.

Definition at line 170 of file atmAlphatkWallFunctionFvPatchScalarField.H.

◆ maxIters_

label maxIters_ = 10
staticprotected

Definition at line 171 of file atmAlphatkWallFunctionFvPatchScalarField.H.


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