turbulentKineticEnergyFvScalarFieldSource Class Reference

This source condition provides a turbulent kinetic energy based on user-supplied turbulence intensity, defined as a fraction of the mean velocity: More...

Inheritance diagram for turbulentKineticEnergyFvScalarFieldSource:
Collaboration diagram for turbulentKineticEnergyFvScalarFieldSource:

Public Member Functions

 TypeName ("turbulentKineticEnergy")
 Runtime type information. More...
 
 turbulentKineticEnergyFvScalarFieldSource (const DimensionedField< scalar, fvMesh > &, const dictionary &dict)
 Construct from internal field and dictionary. More...
 
 turbulentKineticEnergyFvScalarFieldSource (const turbulentKineticEnergyFvScalarFieldSource &, const DimensionedField< scalar, fvMesh > &)
 Copy constructor setting internal field reference. More...
 
virtual autoPtr< fvScalarFieldSource > clone (const DimensionedField< scalar, fvMesh > &iF) const
 Construct and return a clone setting internal field reference. More...
 
virtual ~turbulentKineticEnergyFvScalarFieldSource ()
 Destructor. More...
 
virtual tmp< DimensionedField< scalar, fvMesh > > sourceValue (const fvSource &model, const DimensionedField< scalar, fvMesh > &source) const
 Return the source value. More...
 
virtual tmp< scalarFieldsourceValue (const fvSource &model, const scalarField &source, const labelUList &cells) const
 Return the source value. More...
 
virtual tmp< DimensionedField< scalar, fvMesh > > internalCoeff (const fvSource &model, const DimensionedField< scalar, fvMesh > &source) const
 Return the internal coefficient. More...
 
virtual tmp< scalarFieldinternalCoeff (const fvSource &model, const scalarField &source, const labelUList &cells) const
 Return the internal coefficient. More...
 
virtual void write (Ostream &) const
 Write. More...
 

Detailed Description

This source condition provides a turbulent kinetic energy based on user-supplied turbulence intensity, defined as a fraction of the mean velocity:

\[ k = 1.5 (I |U|)^2 \]

where

$ k $ = kinetic energy values
$ I $ = turbulence intensity
$ U $ = velocity field

In the case of a sink, the current cell values are used instead.

Usage
Property Description Required Default value
intensity fraction of mean field [0-1] yes
U velocity field name no U

Example of the boundary condition specification:

    <sourceName>
    {
        type        turbulentKineticEnergy;
        intensity   0.05;           // 5% turbulence
    }
Source files

Definition at line 107 of file turbulentKineticEnergyFvScalarFieldSource.H.

Constructor & Destructor Documentation

◆ turbulentKineticEnergyFvScalarFieldSource() [1/2]

turbulentKineticEnergyFvScalarFieldSource ( const DimensionedField< scalar, fvMesh > &  iF,
const dictionary dict 
)

Construct from internal field and dictionary.

Definition at line 33 of file turbulentKineticEnergyFvScalarFieldSource.C.

◆ turbulentKineticEnergyFvScalarFieldSource() [2/2]

Copy constructor setting internal field reference.

Definition at line 46 of file turbulentKineticEnergyFvScalarFieldSource.C.

◆ ~turbulentKineticEnergyFvScalarFieldSource()

Member Function Documentation

◆ TypeName()

TypeName ( "turbulentKineticEnergy"  )

Runtime type information.

◆ clone()

virtual autoPtr<fvScalarFieldSource> clone ( const DimensionedField< scalar, fvMesh > &  iF) const
inlinevirtual

Construct and return a clone setting internal field reference.

Definition at line 145 of file turbulentKineticEnergyFvScalarFieldSource.H.

◆ sourceValue() [1/2]

Foam::tmp< Foam::DimensionedField< Foam::scalar, Foam::fvMesh > > sourceValue ( const fvSource model,
const DimensionedField< scalar, fvMesh > &  source 
) const
virtual

Return the source value.

Definition at line 69 of file turbulentKineticEnergyFvScalarFieldSource.C.

References Foam::magSqr(), and Foam::sqr().

Here is the call graph for this function:

◆ sourceValue() [2/2]

Foam::tmp< Foam::scalarField > sourceValue ( const fvSource model,
const scalarField source,
const labelUList cells 
) const
virtual

Return the source value.

Definition at line 83 of file turbulentKineticEnergyFvScalarFieldSource.C.

References cells, Foam::magSqr(), and Foam::sqr().

Here is the call graph for this function:

◆ internalCoeff() [1/2]

Foam::tmp< Foam::DimensionedField< Foam::scalar, Foam::fvMesh > > internalCoeff ( const fvSource model,
const DimensionedField< scalar, fvMesh > &  source 
) const
virtual

Return the internal coefficient.

Definition at line 98 of file turbulentKineticEnergyFvScalarFieldSource.C.

References Foam::neg0().

Here is the call graph for this function:

◆ internalCoeff() [2/2]

Foam::tmp< Foam::scalarField > internalCoeff ( const fvSource model,
const scalarField source,
const labelUList cells 
) const
virtual

Return the internal coefficient.

Definition at line 109 of file turbulentKineticEnergyFvScalarFieldSource.C.

References Foam::neg0().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Definition at line 120 of file turbulentKineticEnergyFvScalarFieldSource.C.

References Foam::vtkWriteOps::write(), and Foam::writeEntry().

Here is the call graph for this function:

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