TurbulenceModel Class Reference

AMR-Wind API: amr_wind::turbulence::TurbulenceModel Class Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches
amr_wind::turbulence::TurbulenceModel Class Referenceabstract

#include <TurbulenceModel.H>

Inheritance diagram for amr_wind::turbulence::TurbulenceModel:
[legend]
Collaboration diagram for amr_wind::turbulence::TurbulenceModel:
[legend]

Public Types

using CoeffsDictType = std::unordered_map<std::string, amrex::Real>
 Default identifier used by factor methods.
 

Public Member Functions

 ~TurbulenceModel () override=default
 
virtual void update_turbulent_viscosity (const FieldState fstate, const DiffusionType diff_type)=0
 
virtual void post_advance_work ()=0
 Do any post advance actions for the turbulence model.
 
virtual void register_mueff_field (Field &mueff)=0
 Register the effective viscosity (for momentum field)
 
virtual void register_alphaeff_field (Field &alphaeff)=0
 Register the thermal diffusivity field.
 
virtual std::string model_name () const =0
 String representation of this turbulence model for I/O.
 
virtual std::unique_ptr< ScratchFieldmu ()=0
 Return the dynamic viscosity (laminar) field.
 
virtual std::unique_ptr< ScratchFieldalpha ()=0
 Return the thermal diffusivity (laminar) field for enthalpy/temperature.
 
virtual std::unique_ptr< ScratchFieldscalar_diffusivity (const std::string &name)=0
 Return the scalar diffusivity field.
 
virtual Fieldmu_turb ()=0
 Return the turbulent dynamic viscosity field.
 
virtual Fieldalpha_turb ()=0
 Return the turbulent dynamic viscosity field.
 
virtual Fieldmueff ()=0
 Return the effective dynamic viscosity field.
 
virtual Fieldalphaeff ()=0
 Return the effective thermal diffusivity field.
 
virtual bool is_turbulent () const
 Flag indicating whether the model is turbulent.
 
virtual void update_mueff (Field &mueff)=0
 
virtual void update_alphaeff (Field &alphaeff)=0
 Interface to update effective thermal diffusivity.
 
virtual void update_scalar_diff (Field &deff, const std::string &name)=0
 Interface to update scalar diffusivity based on Schmidt number.
 
virtual void parse_model_coeffs ()=0
 Parse turbulence model coefficients.
 
virtual CoeffsDictType model_coeffs () const =0
 Return model coefficients dictionary.
 
- Public Member Functions inherited from amr_wind::Factory< TurbulenceModel, CFDSim & >
virtual ~Factory ()=default
 

Static Public Member Functions

static std::string base_identifier ()
 
- Static Public Member Functions inherited from amr_wind::Factory< TurbulenceModel, CFDSim & >
static std::unique_ptr< TurbulenceModel > create (const std::string &key, Args... args)
 
static void print (std::ostream &os)
 

Additional Inherited Members

- Public Attributes inherited from amr_wind::Factory< TurbulenceModel, CFDSim & >
friend Base
 

Detailed Description

Abstract representation of a turbulence model

This class is an abstract representation of a turbulence model used in AMR-Wind. Subclasses must implement the methods defined in this class to interact with Equation Systems.

Member Typedef Documentation

◆ CoeffsDictType

using amr_wind::turbulence::TurbulenceModel::CoeffsDictType = std::unordered_map<std::string, amrex::Real>

Default identifier used by factor methods.

Constructor & Destructor Documentation

◆ ~TurbulenceModel()

amr_wind::turbulence::TurbulenceModel::~TurbulenceModel ( )
overridedefault

Member Function Documentation

◆ alpha()

virtual std::unique_ptr< ScratchField > amr_wind::turbulence::TurbulenceModel::alpha ( )
pure virtual

Return the thermal diffusivity (laminar) field for enthalpy/temperature.

Implemented in amr_wind::turbulence::TurbModel< Transport >.

◆ alpha_turb()

virtual Field & amr_wind::turbulence::TurbulenceModel::alpha_turb ( )
pure virtual

Return the turbulent dynamic viscosity field.

Implemented in amr_wind::turbulence::Laminar< Transport >, and amr_wind::turbulence::TurbModelBase< Transport >.

◆ alphaeff()

virtual Field & amr_wind::turbulence::TurbulenceModel::alphaeff ( )
pure virtual

Return the effective thermal diffusivity field.

Implemented in amr_wind::turbulence::TurbModel< Transport >.

◆ base_identifier()

static std::string amr_wind::turbulence::TurbulenceModel::base_identifier ( )
inlinestatic

◆ is_turbulent()

virtual bool amr_wind::turbulence::TurbulenceModel::is_turbulent ( ) const
inlinevirtual

Flag indicating whether the model is turbulent.

Reimplemented in amr_wind::turbulence::Laminar< Transport >.

◆ model_coeffs()

◆ model_name()

◆ mu()

virtual std::unique_ptr< ScratchField > amr_wind::turbulence::TurbulenceModel::mu ( )
pure virtual

Return the dynamic viscosity (laminar) field.

Implemented in amr_wind::turbulence::TurbModel< Transport >.

◆ mu_turb()

virtual Field & amr_wind::turbulence::TurbulenceModel::mu_turb ( )
pure virtual

Return the turbulent dynamic viscosity field.

Implemented in amr_wind::turbulence::Laminar< Transport >, and amr_wind::turbulence::TurbModelBase< Transport >.

◆ mueff()

virtual Field & amr_wind::turbulence::TurbulenceModel::mueff ( )
pure virtual

Return the effective dynamic viscosity field.

Implemented in amr_wind::turbulence::TurbModel< Transport >.

◆ parse_model_coeffs()

◆ post_advance_work()

◆ register_alphaeff_field()

virtual void amr_wind::turbulence::TurbulenceModel::register_alphaeff_field ( Field & alphaeff)
pure virtual

Register the thermal diffusivity field.

Implemented in amr_wind::turbulence::TurbModel< Transport >.

◆ register_mueff_field()

virtual void amr_wind::turbulence::TurbulenceModel::register_mueff_field ( Field & mueff)
pure virtual

Register the effective viscosity (for momentum field)

Implemented in amr_wind::turbulence::TurbModel< Transport >.

◆ scalar_diffusivity()

virtual std::unique_ptr< ScratchField > amr_wind::turbulence::TurbulenceModel::scalar_diffusivity ( const std::string & name)
pure virtual

Return the scalar diffusivity field.

Implemented in amr_wind::turbulence::TurbModel< Transport >.

◆ update_alphaeff()

virtual void amr_wind::turbulence::TurbulenceModel::update_alphaeff ( Field & alphaeff)
pure virtual

◆ update_mueff()

virtual void amr_wind::turbulence::TurbulenceModel::update_mueff ( Field & mueff)
pure virtual

Interface to update effective viscosity

\(\mu_\mathrm{eff} = \mu + \mu_t\)

Implemented in amr_wind::turbulence::Laminar< Transport >, and amr_wind::turbulence::TurbModelBase< Transport >.

◆ update_scalar_diff()

virtual void amr_wind::turbulence::TurbulenceModel::update_scalar_diff ( Field & deff,
const std::string & name )
pure virtual

◆ update_turbulent_viscosity()

virtual void amr_wind::turbulence::TurbulenceModel::update_turbulent_viscosity ( const FieldState fstate,
const DiffusionType diff_type )
pure virtual

Update the turbulent viscosity field

This method is called at the beginning of each predictor/corrector step to update the turbulent viscosity field. The exact effective viscosity for each equation system is handled by the concrete implementation of PDESystem.

Parameters
fstateState used for updates to differentiate logic in predictor and corrector steps.
diff_typediffusion solve type

Implemented in amr_wind::turbulence::AMD< Transport >, amr_wind::turbulence::AMDNoTherm< Transport >, amr_wind::turbulence::KLAxell< Transport >, amr_wind::turbulence::KOmegaSST< Transport >, amr_wind::turbulence::KOmegaSSTIDDES< Transport >, amr_wind::turbulence::Kosovic< Transport >, amr_wind::turbulence::Laminar< Transport >, amr_wind::turbulence::OneEqKsgsM84< Transport >, amr_wind::turbulence::OneEqKsgsS94< Transport >, and amr_wind::turbulence::Smagorinsky< Transport >.


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