Public Member Functions | Protected Member Functions | Protected Attributes
v2WallFunctionFvPatchScalarField Class Reference

This boundary condition provides a turbulence stress normal to streamlines wall function condition for low- and high-Reynolds number, turbulent flow cases. More...

Inheritance diagram for v2WallFunctionFvPatchScalarField:
Inheritance graph
[legend]
Collaboration diagram for v2WallFunctionFvPatchScalarField:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("v2WallFunction")
 Runtime type information. More...
 
 v2WallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 v2WallFunctionFvPatchScalarField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 v2WallFunctionFvPatchScalarField (const v2WallFunctionFvPatchScalarField &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping given v2WallFunctionFvPatchScalarField. More...
 
 v2WallFunctionFvPatchScalarField (const v2WallFunctionFvPatchScalarField &)
 Construct as copy. More...
 
virtual tmp< fvPatchScalarFieldclone () const
 Construct and return a clone. More...
 
 v2WallFunctionFvPatchScalarField (const v2WallFunctionFvPatchScalarField &, 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 evaluate (const Pstream::commsTypes)
 Evaluate the patchField. More...
 
virtual void write (Ostream &) const
 Write. More...
 
- Public Member Functions inherited from fixedValueFvPatchField< scalar >
 TypeName ("fixedValue")
 Runtime type information. More...
 
 fixedValueFvPatchField (const fvPatch &, const DimensionedField< scalar, volMesh > &)
 Construct from patch and internal field. More...
 
 fixedValueFvPatchField (const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 fixedValueFvPatchField (const fixedValueFvPatchField< scalar > &, const fvPatch &, const DimensionedField< scalar, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping the given fixedValueFvPatchField<Type> More...
 
 fixedValueFvPatchField (const fixedValueFvPatchField< scalar > &)
 Construct as copy. More...
 
 fixedValueFvPatchField (const fixedValueFvPatchField< scalar > &, const DimensionedField< scalar, volMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual tmp< fvPatchField< scalar > > clone () const
 Construct and return a clone. More...
 
virtual bool fixesValue () const
 Return true if this patch field fixes a value. More...
 
virtual tmp< Field< scalar > > valueInternalCoeffs (const tmp< scalarField > &) const
 Return the matrix diagonal coefficients corresponding to the. More...
 
virtual tmp< Field< scalar > > valueBoundaryCoeffs (const tmp< scalarField > &) const
 Return the matrix source coefficients corresponding to the. More...
 
virtual tmp< Field< scalar > > gradientInternalCoeffs () const
 Return the matrix diagonal coefficients corresponding to the. More...
 
virtual tmp< Field< scalar > > gradientBoundaryCoeffs () const
 Return the matrix source coefficients corresponding to the. More...
 
virtual void operator= (const UList< scalar > &)
 
virtual void operator= (const fvPatchField< scalar > &)
 
virtual void operator= (const scalar &)
 
virtual void operator+= (const fvPatchField< scalar > &)
 
virtual void operator+= (const Field< scalar > &)
 
virtual void operator+= (const scalar &)
 
virtual void operator-= (const fvPatchField< scalar > &)
 
virtual void operator-= (const Field< scalar > &)
 
virtual void operator-= (const scalar &)
 
virtual void operator*= (const fvPatchField< scalar > &)
 
virtual void operator*= (const Field< scalar > &)
 
virtual void operator*= (const scalar)
 
virtual void operator/= (const fvPatchField< scalar > &)
 
virtual void operator/= (const Field< scalar > &)
 
virtual void operator/= (const scalar)
 
- Public Member Functions inherited from fvPatchField< scalar >
 TypeName ("fvPatchField")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (tmp, fvPatchField, patch,(const fvPatch &p, const DimensionedField< Type, volMesh > &iF),(p, iF))
 
 declareRunTimeSelectionTable (tmp, fvPatchField, patchMapper,(const fvPatchField< Type > &ptf, const fvPatch &p, const DimensionedField< Type, volMesh > &iF, const fvPatchFieldMapper &m),(dynamic_cast< const fvPatchFieldType & >(ptf), p, iF, m))
 
 declareRunTimeSelectionTable (tmp, fvPatchField, dictionary,(const fvPatch &p, const DimensionedField< Type, volMesh > &iF, const dictionary &dict),(p, iF, dict))
 
 fvPatchField (const fvPatch &, const DimensionedField< Type, volMesh > &)
 Construct from patch and internal field. More...
 
 fvPatchField (const fvPatch &, const DimensionedField< Type, volMesh > &, const word &patchType)
 Construct from patch and internal field and patch type. More...
 
 fvPatchField (const fvPatch &, const DimensionedField< Type, volMesh > &, const Field< Type > &)
 Construct from patch and internal field and patch field. More...
 
 fvPatchField (const fvPatch &, const DimensionedField< Type, volMesh > &, const dictionary &, const bool valueRequired=false)
 Construct from patch, internal field and dictionary. More...
 
 fvPatchField (const fvPatchField< Type > &, const fvPatch &, const DimensionedField< Type, volMesh > &, const fvPatchFieldMapper &)
 Construct by mapping the given fvPatchField onto a new patch. More...
 
 fvPatchField (const fvPatchField< Type > &)
 Construct as copy. More...
 
 fvPatchField (const fvPatchField< Type > &, const DimensionedField< Type, volMesh > &)
 Construct as copy setting internal field reference. More...
 
virtual tmp< fvPatchField< Type > > clone (const DimensionedField< Type, volMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
Foam::tmp< Foam::fvPatchField< Type > > NewCalculatedType (const fvPatch &p)
 
Foam::tmp< Foam::fvPatchField< Type > > NewCalculatedType (const fvPatchField< Type2 > &pf)
 
virtual ~fvPatchField ()
 Destructor. More...
 
const objectRegistrydb () const
 Return local objectRegistry. More...
 
const fvPatchpatch () const
 Return patch. More...
 
const DimensionedField< Type, volMesh > & dimensionedInternalField () const
 Return dimensioned internal field reference. More...
 
const Field< Type > & internalField () const
 Return internal field reference. More...
 
const wordpatchType () const
 Optional patch type. More...
 
wordpatchType ()
 Optional patch type. More...
 
virtual bool coupled () const
 Return true if this patch field is coupled. More...
 
bool updated () const
 Return true if the boundary condition has already been updated. More...
 
bool manipulatedMatrix () const
 Return true if the matrix has already been manipulated. More...
 
virtual void autoMap (const fvPatchFieldMapper &)
 Map (and resize as needed) from self given a mapping object. More...
 
virtual void rmap (const fvPatchField< Type > &, const labelList &)
 Reverse map the given fvPatchField onto this fvPatchField. More...
 
virtual tmp< Field< Type > > snGrad () const
 Return patch-normal gradient. More...
 
virtual tmp< Field< Type > > snGrad (const scalarField &deltaCoeffs) const
 Return patch-normal gradient for coupled-patches. More...
 
virtual void updateCoeffs (const scalarField &weights)
 Update the coefficients associated with the patch field. More...
 
virtual tmp< Field< Type > > patchInternalField () const
 Return internal field next to patch as patch field. More...
 
virtual void patchInternalField (Field< Type > &) const
 Return internal field next to patch as patch field. More...
 
virtual tmp< Field< Type > > patchNeighbourField () const
 Return patchField on the opposite patch of a coupled patch. More...
 
virtual void initEvaluate (const Pstream::commsTypes commsType=Pstream::blocking)
 Initialise the evaluation of the patch field. More...
 
virtual tmp< Field< Type > > gradientInternalCoeffs (const scalarField &deltaCoeffs) const
 Return the matrix diagonal coefficients corresponding to the. More...
 
virtual tmp< Field< Type > > gradientBoundaryCoeffs (const scalarField &deltaCoeffs) const
 Return the matrix source coefficients corresponding to the. More...
 
virtual void manipulateMatrix (fvMatrix< Type > &matrix)
 Manipulate matrix. More...
 
virtual void manipulateMatrix (fvMatrix< Type > &matrix, const scalarField &weights)
 Manipulate matrix with given weights. More...
 
void writeEntryIfDifferent (Ostream &os, const word &entryName, const EntryType &value1, const EntryType &value2) const
 Helper function to write the keyword and entry only if the. More...
 
void check (const fvPatchField< Type > &) const
 Check fvPatchField<Type> against given fvPatchField<Type> More...
 
virtual void operator= (const UList< Type > &)
 
virtual void operator= (const fvPatchField< Type > &)
 
virtual void operator= (const Type &)
 
virtual void operator+= (const fvPatchField< Type > &)
 
virtual void operator+= (const Field< Type > &)
 
virtual void operator+= (const Type &)
 
virtual void operator-= (const fvPatchField< Type > &)
 
virtual void operator-= (const Field< Type > &)
 
virtual void operator-= (const Type &)
 
virtual void operator== (const fvPatchField< Type > &)
 
virtual void operator== (const Field< Type > &)
 
virtual void operator== (const Type &)
 

Protected Member Functions

virtual void checkType ()
 Check the type of the patch. More...
 
virtual void writeLocalEntries (Ostream &) const
 Write local wall function variables. More...
 
scalar yPlusLam (const scalar kappa, const scalar E)
 Calculate the Y+ at the edge of the laminar sublayer. More...
 

Protected Attributes

scalar Cmu_
 Cmu coefficient. More...
 
scalar kappa_
 Von Karman constant. More...
 
scalar E_
 E coefficient. More...
 
scalar yPlusLam_
 Y+ at the edge of the laminar sublayer. More...
 

Additional Inherited Members

- Public Types inherited from fvPatchField< scalar >
typedef fvPatch Patch
 
- Static Public Member Functions inherited from fvPatchField< scalar >
static tmp< fvPatchField< Type > > New (const word &, const fvPatch &, const DimensionedField< Type, volMesh > &)
 Return a pointer to a new patchField created on freestore given. More...
 
static tmp< fvPatchField< Type > > New (const word &, const word &actualPatchType, const fvPatch &, const DimensionedField< Type, volMesh > &)
 Return a pointer to a new patchField created on freestore given. More...
 
static tmp< fvPatchField< Type > > New (const fvPatchField< Type > &, const fvPatch &, const DimensionedField< Type, volMesh > &, const fvPatchFieldMapper &)
 Return a pointer to a new patchField created on freestore from. More...
 
static tmp< fvPatchField< Type > > New (const fvPatch &, const DimensionedField< Type, volMesh > &, const dictionary &)
 Return a pointer to a new patchField created on freestore. More...
 
static tmp< fvPatchField< Type > > NewCalculatedType (const fvPatch &)
 Return a pointer to a new calculatedFvPatchField created on. More...
 
static tmp< fvPatchField< Type > > NewCalculatedType (const fvPatchField< Type2 > &)
 Return a pointer to a new calculatedFvPatchField created on. More...
 
static const wordcalculatedType ()
 Return the type of the calculated for of fvPatchField. More...
 
- Static Public Attributes inherited from fvPatchField< scalar >
static int disallowGenericFvPatchField
 Debug switch to disallow the use of genericFvPatchField. More...
 

Detailed Description

This boundary condition provides a turbulence stress normal to streamlines wall function condition for low- and high-Reynolds number, turbulent flow cases.

The model operates in two modes, based on the computed laminar-to-turbulent switch-over y+ value derived from kappa and E.


Patch usage

Property Description Required Default value
Cmu model coefficient no 0.09
kappa Von Karman constant no 0.41
E model coefficient no 9.8

Example of the boundary condition specification:

    myPatch
    {
        type            v2WallFunction;
    }
See also
Foam::fixedValueFvPatchField
Source files

Definition at line 99 of file v2WallFunctionFvPatchScalarField.H.

Constructor & Destructor Documentation

◆ v2WallFunctionFvPatchScalarField() [1/5]

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

Construct from patch and internal field.

Definition at line 84 of file v2WallFunctionFvPatchScalarField.C.

Referenced by v2WallFunctionFvPatchScalarField::clone().

Here is the caller graph for this function:

◆ v2WallFunctionFvPatchScalarField() [2/5]

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

Construct from patch, internal field and dictionary.

Definition at line 118 of file v2WallFunctionFvPatchScalarField.C.

◆ v2WallFunctionFvPatchScalarField() [3/5]

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

Construct by mapping given v2WallFunctionFvPatchScalarField.

onto a new patch

Definition at line 100 of file v2WallFunctionFvPatchScalarField.C.

◆ v2WallFunctionFvPatchScalarField() [4/5]

Construct as copy.

Definition at line 135 of file v2WallFunctionFvPatchScalarField.C.

◆ v2WallFunctionFvPatchScalarField() [5/5]

Construct as copy setting internal field reference.

Definition at line 150 of file v2WallFunctionFvPatchScalarField.C.

Member Function Documentation

◆ checkType()

void checkType ( )
protectedvirtual

Check the type of the patch.

Definition at line 42 of file v2WallFunctionFvPatchScalarField.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, fvPatch::name(), Foam::nl, and fvPatchField< scalar >::patch().

Here is the call graph for this function:

◆ writeLocalEntries()

void writeLocalEntries ( Ostream os) const
protectedvirtual

Write local wall function variables.

Definition at line 56 of file v2WallFunctionFvPatchScalarField.C.

References v2WallFunctionFvPatchScalarField::Cmu_, v2WallFunctionFvPatchScalarField::E_, token::END_STATEMENT, v2WallFunctionFvPatchScalarField::kappa_, Foam::nl, and Ostream::writeKeyword().

Referenced by v2WallFunctionFvPatchScalarField::write().

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

◆ yPlusLam()

scalar yPlusLam ( const scalar  kappa,
const scalar  E 
)
protected

Calculate the Y+ at the edge of the laminar sublayer.

Definition at line 65 of file v2WallFunctionFvPatchScalarField.C.

References Foam::constant::electromagnetic::kappa, Foam::log(), and Foam::max().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "v2WallFunction"  )

Runtime type information.

◆ clone() [1/2]

virtual tmp<fvPatchScalarField> clone ( ) const
inlinevirtual

Construct and return a clone.

Definition at line 172 of file v2WallFunctionFvPatchScalarField.H.

References v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField().

Here is the call graph for this function:

◆ 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 fixedValueFvPatchField< scalar >.

Definition at line 189 of file v2WallFunctionFvPatchScalarField.H.

References v2WallFunctionFvPatchScalarField::v2WallFunctionFvPatchScalarField().

Here is the call graph for this function:

◆ updateCoeffs()

void updateCoeffs ( )
virtual

◆ evaluate()

void evaluate ( const Pstream::commsTypes  commsType)
virtual

Evaluate the patchField.

Reimplemented from fvPatchField< scalar >.

Definition at line 227 of file v2WallFunctionFvPatchScalarField.C.

References fvPatchField< Type >::evaluate().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Reimplemented from fixedValueFvPatchField< scalar >.

Definition at line 235 of file v2WallFunctionFvPatchScalarField.C.

References fixedValueFvPatchField< Type >::write(), and v2WallFunctionFvPatchScalarField::writeLocalEntries().

Here is the call graph for this function:

Field Documentation

◆ Cmu_

scalar Cmu_
protected

◆ kappa_

scalar kappa_
protected

◆ E_

scalar E_
protected

E coefficient.

Definition at line 114 of file v2WallFunctionFvPatchScalarField.H.

Referenced by v2WallFunctionFvPatchScalarField::writeLocalEntries().

◆ yPlusLam_

scalar yPlusLam_
protected

Y+ at the edge of the laminar sublayer.

Definition at line 117 of file v2WallFunctionFvPatchScalarField.H.

Referenced by v2WallFunctionFvPatchScalarField::updateCoeffs().


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