Public Member Functions | Private Member Functions | Private Attributes
svenssonHaggkvistCanopySource Class Reference

Momentum and turbulence source/sink-terms for tree canopy according to Svensson & Häggkvist (1990), with parameters adjusted according t o Mochida et al. (2008). More...

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

Public Member Functions

 TypeName ("svenssonHaggkvistCanopySource")
 Runtime type information. More...
 
 svenssonHaggkvistCanopySource (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 Construct from components. More...
 
virtual ~svenssonHaggkvistCanopySource ()
 Destructor. More...
 
dimensionedScalar CpEps1 () const
 
void addSup (fvMatrix< vector > &eqn, const label fieldi)
 Source term to momentum equation. More...
 
void addSup (fvMatrix< scalar > &eqn, const label fieldi)
 Source term to scalar equations (k & epsilon) More...
 
void addSup (const volScalarField &rho, fvMatrix< vector > &eqn, const label fieldi)
 Source term to compressible momentum equation. More...
 
void addSup (const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldi)
 Source term to compressible scalar equation (k & epsilon) More...
 
 TypeName ("svenssonHaggkvistCanopySource")
 Runtime type information. More...
 
 svenssonHaggkvistCanopySource (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 Construct from components. More...
 
virtual ~svenssonHaggkvistCanopySource ()
 Destructor. More...
 
dimensionedScalar CpEps1 () const
 
void addSup (fvMatrix< vector > &eqn, const label fieldi)
 Source term to momentum equation. More...
 
void addSup (fvMatrix< scalar > &eqn, const label fieldi)
 Source term to scalar equations (k & epsilon) More...
 
void addSup (const volScalarField &rho, fvMatrix< vector > &eqn, const label fieldi)
 Source term to compressible momentum equation. More...
 
void addSup (const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldi)
 Source term to compressible scalar equation (k & epsilon) More...
 
- Public Member Functions inherited from canopySource
 TypeName ("canopySource")
 Runtime type information. More...
 
 canopySource (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 Construct from components. More...
 
virtual ~canopySource ()
 Destructor. More...
 
bool read (const dictionary &dict)
 Read dictionary. More...
 
 TypeName ("canopySource")
 Runtime type information. More...
 
 canopySource (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 Construct from components. More...
 
virtual ~canopySource ()
 Destructor. More...
 
bool read (const dictionary &dict)
 Read dictionary. More...
 
- Public Member Functions inherited from option
 TypeName ("option")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, option, dictionary,(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh),(name, modelType, dict, mesh))
 
 option (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 Construct from components. More...
 
autoPtr< optionclone () const
 Return clone. More...
 
virtual ~option ()
 Destructor. More...
 
const wordname () const
 Return const access to the source name. More...
 
const fvMeshmesh () const
 Return const access to the mesh database. More...
 
const dictionarycoeffs () const
 Return dictionary. More...
 
bool active () const
 Return const access to the source active flag. More...
 
void setApplied (const label fieldI)
 Set the applied flag to true for field index fieldI. More...
 
Switchactive ()
 Return access to the source active flag. More...
 
virtual bool isActive ()
 Is the source active? More...
 
virtual label applyToField (const word &fieldName) const
 Return index of field name if found in fieldNames list. More...
 
virtual void checkApplied () const
 Check that the source has been applied. More...
 
virtual void addSup (fvMatrix< symmTensor > &eqn, const label fieldI)
 
virtual void addSup (fvMatrix< sphericalTensor > &eqn, const label fieldI)
 
virtual void addSup (fvMatrix< tensor > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &rho, fvMatrix< symmTensor > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &rho, fvMatrix< sphericalTensor > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &rho, fvMatrix< tensor > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< vector > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< symmTensor > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< sphericalTensor > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< tensor > &eqn, const label fieldI)
 
virtual void constrain (fvMatrix< scalar > &eqn, const label fieldI)
 
virtual void constrain (fvMatrix< vector > &eqn, const label fieldI)
 
virtual void constrain (fvMatrix< sphericalTensor > &eqn, const label fieldI)
 
virtual void constrain (fvMatrix< symmTensor > &eqn, const label fieldI)
 
virtual void constrain (fvMatrix< tensor > &eqn, const label fieldI)
 
virtual void correct (volScalarField &field)
 
virtual void correct (volVectorField &field)
 
virtual void correct (volSphericalTensorField &field)
 
virtual void correct (volSymmTensorField &field)
 
virtual void correct (volTensorField &field)
 
virtual void writeHeader (Ostream &) const
 Write the source header information. More...
 
virtual void writeFooter (Ostream &) const
 Write the source footer information. More...
 
virtual void writeData (Ostream &) const
 Write the source properties. More...
 

Private Member Functions

 svenssonHaggkvistCanopySource (const svenssonHaggkvistCanopySource &)
 Disallow default bitwise copy construct. More...
 
void operator= (const svenssonHaggkvistCanopySource &)
 Disallow default bitwise assignment. More...
 
template<class RhoFieldType >
void addSup (const RhoFieldType &rho, fvMatrix< vector > &eqn, const label fieldi)
 Source term to momentum equation. More...
 
template<class RhoFieldType >
void addSup (const RhoFieldType &rho, fvMatrix< scalar > &eqn, const label fieldi)
 
 svenssonHaggkvistCanopySource (const svenssonHaggkvistCanopySource &)
 Disallow default bitwise copy construct. More...
 
void operator= (const svenssonHaggkvistCanopySource &)
 Disallow default bitwise assignment. More...
 
template<class RhoFieldType >
void addSup (const RhoFieldType &rho, fvMatrix< vector > &eqn, const label fieldi)
 Source term to momentum equation. More...
 
template<class RhoFieldType >
void addSup (const RhoFieldType &rho, fvMatrix< scalar > &eqn, const label fieldi)
 

Private Attributes

dimensionedScalar CpEps1_
 

Additional Inherited Members

- Static Public Member Functions inherited from option
static autoPtr< optionNew (const word &name, const dictionary &dict, const fvMesh &mesh)
 Return a reference to the selected fvOption model. More...
 
- Protected Member Functions inherited from canopySource
 canopySource (const canopySource &)
 Disallow default bitwise copy construct. More...
 
void operator= (const canopySource &)
 Disallow default bitwise assignment. More...
 
void checkData () const
 
Raster readRaster (fileName rasterPath)
 
void calculatePatchDistance (label patch, volScalarField &d)
 
void setPatchLanduse (label patch, volScalarField &landuse, volScalarField &LAD, volScalarField &z0, volScalarField &nut, volScalarField &d)
 
void calculateCanopy ()
 
void readLanduseClasses ()
 
 canopySource (const canopySource &)
 Disallow default bitwise copy construct. More...
 
void operator= (const canopySource &)
 Disallow default bitwise assignment. More...
 
void checkData () const
 
Raster readRaster (fileName rasterPath)
 
void calculatePatchDistance (label patch, volScalarField &d)
 
void setPatchLanduse (label patch, volScalarField &landuse, volScalarField &LAD, volScalarField &z0, volScalarField &nut, volScalarField &d)
 
void calculateCanopy ()
 
void readLanduseClasses ()
 
- Protected Attributes inherited from canopySource
wordList sourcePatches_
 
autoPtr< volScalarFieldcanopy_
 
HashTable< landuseClass, labellanduseTable_
 
HashTable< landuseClass, labelpatchLanduseTable_
 
Switch readFromDisk_
 
Switch readLanduseFromRaster_
 
Raster landuseRaster_
 
Switch readCanopyHeightFromRaster_
 
Raster canopyHeightRaster_
 
vector translateRaster
 
Switch writeFields_
 
bool LAD_from_disk_
 
bool landuse_from_disk_
 
bool z0_from_disk_
 
- Protected Attributes inherited from option
const word name_
 Source name. More...
 
const word modelType_
 Model type. More...
 
const fvMeshmesh_
 Reference to the mesh database. More...
 
dictionary dict_
 Top level source dictionary. More...
 
dictionary coeffs_
 Dictionary containing source coefficients. More...
 
Switch active_
 Source active flag. More...
 
wordList fieldNames_
 Field names to apply source to - populated by derived models. More...
 
List< bool > applied_
 Applied flag list - corresponds to each fieldNames_ entry. More...
 

Detailed Description

Momentum and turbulence source/sink-terms for tree canopy according to Svensson & Häggkvist (1990), with parameters adjusted according t o Mochida et al. (2008).

Author David Segersson, Swedish Meteorological and Hydrological Institute david.nosp@m..seg.nosp@m.ersso.nosp@m.n@sm.nosp@m.hi.se

Momentum source term is expressed as:

\[ S_u = -\rho C_d \alpha u^2 \]

Source term for k is expressed as:

\[ S_k = \rho C_d \alpha u^3 \]

Source term for epsilon is expressed as:

\[ S_{\epsilon} = \rho C_d \alpha C_{p \epsilon 1} \frac{\epsilon}{k} u^3 \]

where

$ \rho $ = density
$ u $ = magnitude of velocity
$ k $ = turbulent kinetic energy
$ \alpha $ = leaf area density [m]
$ C_d $ = tree canopy drag coefficient
$ C_{p \epsilon 1} $ = coefficient with value 1.8 (Mochida et al. 2008)

Use with any variant of the k-\epsilon turbulence model.

Reference: Mochida A., Tabata Y., Iwata T., Yoshino H., Examining tree canopy models for CFD prediction of wind environment at pedestrian level, J. Wind Eng. Ind. Aerodyn. 96 (2008) 1667-1677.

Svensson, U., Häggkvist, K. A two-equation turbulence model for canopy flows. J. Wind Eng. Ind. Aerodyn. 35 (1990) 201–211.

Usage
Example usage:
SBM
{
    type            svenssonHaggkvistCanopySource;
    active          on;
}
Source files

Author David Segersson, Swedish Meteorological and Hydrological Institute david.nosp@m..seg.nosp@m.ersso.nosp@m.n@sm.nosp@m.hi.se

Momentum source term is expressed as:

\[ S_u = -\rho C_d \alpha u^2 \]

Source term for k is expressed as:

\[ S_k = \rho C_d \alpha u^3 \]

Source term for epsilon is expressed as:

\[ S_{\epsilon} = \rho C_d \alpha C_{p \epsilon 1} \frac{\epsilon}{k} u^3 \]

where

$ \rho $ = density
$ u $ = magnitude of velocity
$ k $ = turbulent kinetic energy
$ \alpha $ = leaf area density [m]
$ C_d $ = tree canopy drag coefficient
$ C_{p \epsilon 1} $ = coefficient with value 1.8 (Mochida et al. 2008)

Use with any variant of the k-\epsilon turbulence model.

Reference: Mochida A., Tabata Y., Iwata T., Yoshino H., Examining tree canopy models for CFD prediction of wind environment at pedestrian level, J. Wind Eng. Ind. Aerodyn. 96 (2008) 1667-1677.

Svensson, U., Häggkvist, K. A two-equation turbulence model for canopy flows. J. Wind Eng. Ind. Aerodyn. 35 (1990) 201–211.

Usage
Example usage:
SBM
{
    type            svenssonHaggkvistCanopySource;
    active          on;
}
Source files

Definition at line 135 of file svenssonHaggkvistCanopySource.H.

Constructor & Destructor Documentation

◆ svenssonHaggkvistCanopySource() [1/4]

Disallow default bitwise copy construct.

◆ svenssonHaggkvistCanopySource() [2/4]

svenssonHaggkvistCanopySource ( const word name,
const word modelType,
const dictionary dict,
const fvMesh mesh 
)

Construct from components.

Definition at line 52 of file svenssonHaggkvistCanopySource.C.

◆ ~svenssonHaggkvistCanopySource() [1/2]

virtual ~svenssonHaggkvistCanopySource ( )
inlinevirtual

Destructor.

Definition at line 192 of file svenssonHaggkvistCanopySource.H.

◆ svenssonHaggkvistCanopySource() [3/4]

Disallow default bitwise copy construct.

◆ svenssonHaggkvistCanopySource() [4/4]

svenssonHaggkvistCanopySource ( const word name,
const word modelType,
const dictionary dict,
const fvMesh mesh 
)

Construct from components.

◆ ~svenssonHaggkvistCanopySource() [2/2]

virtual ~svenssonHaggkvistCanopySource ( )
inlinevirtual

Destructor.

Definition at line 192 of file svenssonHaggkvistCanopySource.H.

Member Function Documentation

◆ operator=() [1/2]

void operator= ( const svenssonHaggkvistCanopySource )
private

Disallow default bitwise assignment.

◆ addSup() [1/12]

void addSup ( const RhoFieldType &  rho,
fvMatrix< vector > &  eqn,
const label  fieldi 
)
private

Source term to momentum equation.

◆ addSup() [2/12]

void addSup ( const RhoFieldType &  rho,
fvMatrix< scalar > &  eqn,
const label  fieldi 
)
private

◆ TypeName() [1/2]

TypeName ( "svenssonHaggkvistCanopySource"  )

Runtime type information.

◆ CpEps1() [1/2]

dimensionedScalar CpEps1 ( ) const
inline

◆ addSup() [3/12]

void addSup ( fvMatrix< vector > &  eqn,
const label  fieldi 
)
virtual

Source term to momentum equation.

Reimplemented from canopySource.

Definition at line 78 of file svenssonHaggkvistCanopySource.C.

References Foam::mag(), fvMatrix::psi(), Foam::fvc::Sp(), and U.

Here is the call graph for this function:

◆ addSup() [4/12]

void addSup ( fvMatrix< scalar > &  eqn,
const label  fieldi 
)
virtual

Source term to scalar equations (k & epsilon)

Reimplemented from option.

Definition at line 123 of file svenssonHaggkvistCanopySource.C.

References epsilon, k, Foam::mag(), Foam::pow(), fvMatrix::psi(), Foam::fvc::Sp(), and U.

Here is the call graph for this function:

◆ addSup() [5/12]

void addSup ( const volScalarField rho,
fvMatrix< vector > &  eqn,
const label  fieldi 
)
virtual

Source term to compressible momentum equation.

Reimplemented from canopySource.

Definition at line 98 of file svenssonHaggkvistCanopySource.C.

References Foam::mag(), fvMatrix::psi(), rho, Foam::fvc::Sp(), and U.

Here is the call graph for this function:

◆ addSup() [6/12]

void addSup ( const volScalarField rho,
fvMatrix< scalar > &  eqn,
const label  fieldi 
)
virtual

Source term to compressible scalar equation (k & epsilon)

Reimplemented from option.

Definition at line 153 of file svenssonHaggkvistCanopySource.C.

References epsilon, k, Foam::mag(), Foam::pow(), fvMatrix::psi(), rho, Foam::fvc::Sp(), and U.

Here is the call graph for this function:

◆ operator=() [2/2]

void operator= ( const svenssonHaggkvistCanopySource )
private

Disallow default bitwise assignment.

◆ addSup() [7/12]

void addSup ( const RhoFieldType &  rho,
fvMatrix< vector > &  eqn,
const label  fieldi 
)
private

Source term to momentum equation.

◆ addSup() [8/12]

void addSup ( const RhoFieldType &  rho,
fvMatrix< scalar > &  eqn,
const label  fieldi 
)
private

◆ TypeName() [2/2]

TypeName ( "svenssonHaggkvistCanopySource"  )

Runtime type information.

◆ CpEps1() [2/2]

dimensionedScalar CpEps1 ( ) const
inline

◆ addSup() [9/12]

void addSup ( fvMatrix< vector > &  eqn,
const label  fieldi 
)
virtual

Source term to momentum equation.

Reimplemented from canopySource.

◆ addSup() [10/12]

void addSup ( fvMatrix< scalar > &  eqn,
const label  fieldi 
)
virtual

Source term to scalar equations (k & epsilon)

Reimplemented from option.

◆ addSup() [11/12]

void addSup ( const volScalarField rho,
fvMatrix< vector > &  eqn,
const label  fieldi 
)
virtual

Source term to compressible momentum equation.

Reimplemented from canopySource.

◆ addSup() [12/12]

void addSup ( const volScalarField rho,
fvMatrix< scalar > &  eqn,
const label  fieldi 
)
virtual

Source term to compressible scalar equation (k & epsilon)

Reimplemented from option.

Field Documentation

◆ CpEps1_

dimensionedScalar CpEps1_
private

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