Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
DATurbulenceModel Class Referenceabstract
Inheritance diagram for DATurbulenceModel:
Inheritance graph
[legend]
Collaboration diagram for DATurbulenceModel:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("DATurbulenceModel")
 
 declareRunTimeSelectionTable (autoPtr, DATurbulenceModel, dictionary,(const word modelType, const fvMesh &mesh, const DAOption &daOption),(modelType, mesh, daOption))
 
 DATurbulenceModel (const word modelType, const fvMesh &mesh, const DAOption &daOption)
 
virtual ~DATurbulenceModel ()
 
void correctWallDist ()
 update wall distance for d_. Note: y_ will be automatically updated in mesh_ object More...
 
void correctAlphat ()
 update alphat More...
 
virtual void correctNut ()=0
 update nut based on other turbulence variables and update the BCs More...
 
virtual void correctModelStates (wordList &modelStates) const =0
 update the turbulence state for DAStateInfo::regStates_ More...
 
virtual void correctBoundaryConditions ()=0
 update turbulence variable boundary values More...
 
virtual void updateIntermediateVariables ()=0
 update any intermediate variables that are dependent on state variables and are used in calcResiduals More...
 
virtual void correctStateResidualModelCon (List< List< word >> &stateCon) const =0
 update the original variable connectivity for the adjoint state residuals in stateCon More...
 
virtual void addModelResidualCon (HashTable< List< List< word >>> &allCon) const =0
 add the model residual connectivity to stateCon More...
 
virtual void calcResiduals (const dictionary &options)=0
 compute the turbulence residuals More...
 
virtual void correct (label printToScreen)=0
 solve the residual equations and update the state More...
 
virtual void getTurbProdTerm (volScalarField &prodTerm) const
 return the value of the production term from the turbulence model More...
 
virtual void getTurbProdOverDestruct (volScalarField &PoD) const
 return the ratio of the production over destruction term from the turbulence model More...
 
virtual void getTurbConvOverProd (volScalarField &CoP) const
 return the value of the convective over production term from the turbulence model More...
 
tmp< volSymmTensorField > devRhoReff () const
 dev terms More...
 
tmp< fvVectorMatrix > divDevRhoReff (volVectorField &U)
 divDev terms More...
 
tmp< fvVectorMatrix > divDevReff (volVectorField &U)
 divDev terms More...
 
tmp< volScalarField > nuEff () const
 return effective viscosity More...
 
tmp< volScalarField > nut ()
 get the nut field More...
 
tmp< volScalarField > alphaEff ()
 return effective thermal diffusivity More...
 
tmp< volScalarField > nu () const
 get the nu field More...
 
tmp< volScalarField > alpha () const
 get alpha field More...
 
tmp< volScalarField > rho () const
 get the density field More...
 
dimensionSet rhoDimensions () const
 return the dimension of rho More...
 
tmp< volScalarField > phase ()
 get the phase field More...
 
scalar prt ()
 get the turbulent Prandtl number More...
 
tmp< Foam::volScalarField > mu () const
 get mu More...
 
bool writeData (Ostream &os) const
 this is a virtual function for regIOobject More...
 
void printYPlus (const label printToScreen) const
 print the min max and mean yPlus to screen More...
 
word getTurbModelType () const
 
label isPrintTime (const Time &runTime, const label printInterval) const
 
virtual void invTranProdNuTildaEqn (const volScalarField &mySource, volScalarField &pseudoNuTilda)
 Inverse transpose product, M_nuTilda^(-T) More...
 
virtual void constructPseudoNuTildaEqn ()
 
virtual void rhsSolvePseudoNuTildaEqn (const volScalarField &nuTildaSource)
 
virtual void calcLduResidualTurb (volScalarField &nuTildaRes)
 calculate the turbulence residual using LDU matrix More...
 
virtual void getFvMatrixFields (const word varName, scalarField &diag, scalarField &upper, scalarField &lower)
 return the diag(), upper(), and lower() scalarFields from the turbulence model's fvMatrix More...
 
virtual void solveAdjointFP (const word varName, const scalarList &rhs, scalarList &dPsi)
 solve the fvMatrixT field with given rhs and solution More...
 

Static Public Member Functions

static autoPtr< DATurbulenceModelNew (const word modelType, const fvMesh &mesh, const DAOption &daOption)
 

Protected Attributes

const fvMesh & mesh_
 fvMesh More...
 
const DAOptiondaOption_
 DAOption object. More...
 
const dictionary & allOptions_
 all DAFoam options More...
 
DAGlobalVardaGlobalVar_
 global variable More...
 
volScalarField & nut_
 turbulence viscosity More...
 
volVectorField & U_
 velocity More...
 
surfaceScalarField & phi_
 face flux More...
 
volScalarField phase_
 phase field More...
 
surfaceScalarField & phaseRhoPhi_
 phase*phi*density field More...
 
volScalarField rhoOne_
 an uniform rho field with ones More...
 
word turbModelType_ = "None"
 whether the turbulence model is incompressible or compressible More...
 
IOdictionary turbDict_
 turbulence model property dict More...
 
dictionary coeffDict_
 turbulence model parameters dict More...
 
dimensionedScalar kMin_
 Lower limit of k. More...
 
dimensionedScalar epsilonMin_
 Lower limit of epsilon. More...
 
dimensionedScalar omegaMin_
 Lower limit for omega. More...
 
dimensionedScalar nuTildaMin_
 Lower limit for nuTilda. More...
 
scalar Pr_
 Prandtl number. More...
 
scalar Prt_ = -9999.0
 turbulent Prandtl number More...
 

Detailed Description

Definition at line 52 of file DATurbulenceModel.H.

Constructor & Destructor Documentation

◆ DATurbulenceModel()

DATurbulenceModel ( const word  modelType,
const fvMesh &  mesh,
const DAOption daOption 
)

◆ ~DATurbulenceModel()

virtual ~DATurbulenceModel ( )
inlinevirtual

Definition at line 152 of file DATurbulenceModel.H.

Member Function Documentation

◆ TypeName()

TypeName ( "DATurbulenceModel"  )

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
DATurbulenceModel  ,
dictionary  ,
(const word modelType, const fvMesh &mesh, const DAOption &daOption)  ,
(modelType, mesh, daOption)   
)

◆ New()

autoPtr< DATurbulenceModel > New ( const word  modelType,
const fvMesh &  mesh,
const DAOption daOption 
)
static

Definition at line 161 of file DATurbulenceModel.C.

References DAOption::getAllOptions(), and mesh.

Referenced by DATurboFoam::initSolver(), DARhoSimpleCFoam::initSolver(), DARhoPimpleFoam::initSolver(), DARhoSimpleFoam::initSolver(), DAPimpleFoam::initSolver(), DAPimpleDyMFoam::initSolver(), and DASimpleFoam::initSolver().

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

◆ correctWallDist()

void correctWallDist ( )

update wall distance for d_. Note: y_ will be automatically updated in mesh_ object

Definition at line 422 of file DATurbulenceModel.C.

References DATurbulenceModel::correctBoundaryConditions().

Here is the call graph for this function:

◆ correctAlphat()

void correctAlphat ( )

◆ correctNut()

virtual void correctNut ( )
pure virtual

update nut based on other turbulence variables and update the BCs

Implemented in DAkOmegaSSTLM, DAkOmegaSST, DASpalartAllmarasFv3, DAkEpsilon, DAkOmega, DASpalartAllmaras, and DADummyTurbulenceModel.

◆ correctModelStates()

virtual void correctModelStates ( wordList &  modelStates) const
pure virtual

update the turbulence state for DAStateInfo::regStates_

Implemented in DAkOmegaSSTLM, DAkOmegaSST, DASpalartAllmarasFv3, DAkEpsilon, DAkOmega, DASpalartAllmaras, and DADummyTurbulenceModel.

Referenced by DAModel::correctModelStates().

Here is the caller graph for this function:

◆ correctBoundaryConditions()

virtual void correctBoundaryConditions ( )
pure virtual

update turbulence variable boundary values

Implemented in DAkOmegaSSTLM, DAkOmegaSST, DASpalartAllmarasFv3, DAkEpsilon, DAkOmega, DASpalartAllmaras, and DADummyTurbulenceModel.

Referenced by DAModel::correctBoundaryConditions(), and DATurbulenceModel::correctWallDist().

Here is the caller graph for this function:

◆ updateIntermediateVariables()

virtual void updateIntermediateVariables ( )
pure virtual

update any intermediate variables that are dependent on state variables and are used in calcResiduals

Implemented in DAkOmegaSSTLM, DAkOmegaSST, DASpalartAllmarasFv3, DAkEpsilon, DAkOmega, DASpalartAllmaras, and DADummyTurbulenceModel.

Referenced by DAModel::updateIntermediateVariables().

Here is the caller graph for this function:

◆ correctStateResidualModelCon()

virtual void correctStateResidualModelCon ( List< List< word >> &  stateCon) const
pure virtual

update the original variable connectivity for the adjoint state residuals in stateCon

Implemented in DAkOmegaSSTLM, DAkOmegaSST, DASpalartAllmarasFv3, DAkEpsilon, DAkOmega, DASpalartAllmaras, and DADummyTurbulenceModel.

Referenced by DAModel::correctStateResidualModelCon().

Here is the caller graph for this function:

◆ addModelResidualCon()

virtual void addModelResidualCon ( HashTable< List< List< word >>> &  allCon) const
pure virtual

add the model residual connectivity to stateCon

Implemented in DAkOmegaSSTLM, DAkOmegaSST, DASpalartAllmarasFv3, DAkEpsilon, DAkOmega, DASpalartAllmaras, and DADummyTurbulenceModel.

Referenced by DAModel::addModelResidualCon().

Here is the caller graph for this function:

◆ calcResiduals()

virtual void calcResiduals ( const dictionary &  options)
pure virtual

compute the turbulence residuals

Implemented in DAkOmegaSSTLM, DAkOmegaSST, DASpalartAllmarasFv3, DAkEpsilon, DAkOmega, DASpalartAllmaras, and DADummyTurbulenceModel.

Referenced by DAModel::calcResiduals().

Here is the caller graph for this function:

◆ correct()

virtual void correct ( label  printToScreen)
pure virtual

solve the residual equations and update the state

Implemented in DAkOmegaSSTLM, DAkOmegaSST, DASpalartAllmarasFv3, DAkEpsilon, DAkOmega, DASpalartAllmaras, and DADummyTurbulenceModel.

◆ getTurbProdTerm()

void getTurbProdTerm ( volScalarField &  prodTerm) const
virtual

return the value of the production term from the turbulence model

Definition at line 540 of file DATurbulenceModel.C.

Referenced by DAModel::getTurbProdTerm().

Here is the caller graph for this function:

◆ getTurbProdOverDestruct()

void getTurbProdOverDestruct ( volScalarField &  PoD) const
virtual

return the ratio of the production over destruction term from the turbulence model

Reimplemented in DAkOmegaSSTLM, DAkOmegaSST, DASpalartAllmarasFv3, DAkEpsilon, DAkOmega, and DASpalartAllmaras.

Definition at line 552 of file DATurbulenceModel.C.

Referenced by DAModel::getTurbProdOverDestruct().

Here is the caller graph for this function:

◆ getTurbConvOverProd()

void getTurbConvOverProd ( volScalarField &  CoP) const
virtual

return the value of the convective over production term from the turbulence model

Reimplemented in DAkOmegaSSTLM, DAkOmegaSST, DASpalartAllmarasFv3, DAkEpsilon, DAkOmega, and DASpalartAllmaras.

Definition at line 564 of file DATurbulenceModel.C.

Referenced by DAModel::getTurbConvOverProd().

Here is the caller graph for this function:

◆ devRhoReff()

tmp< volSymmTensorField > devRhoReff ( ) const

◆ divDevRhoReff()

tmp< fvVectorMatrix > divDevRhoReff ( volVectorField &  U)

◆ divDevReff()

tmp< fvVectorMatrix > divDevReff ( volVectorField &  U)

divDev terms

Definition at line 411 of file DATurbulenceModel.C.

References DATurbulenceModel::divDevRhoReff(), and U.

Referenced by DAResidualPimpleDyMFoam::calcPCMatWithFvMatrix(), DAResidualPimpleFoam::calcPCMatWithFvMatrix(), DAResidualPimpleFoam::calcResiduals(), DAResidualPimpleDyMFoam::calcResiduals(), and DAResidualSimpleFoam::calcResiduals().

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

◆ nuEff()

tmp< volScalarField > nuEff ( ) const

return effective viscosity

Definition at line 220 of file DATurbulenceModel.C.

References DATurbulenceModel::nu(), and DATurbulenceModel::nut_.

Referenced by DATurbulenceModel::devRhoReff(), DATurbulenceModel::divDevRhoReff(), DATurbulenceModel::printYPlus(), and DAPimpleFoam::solveAdjointFP().

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

◆ nut()

tmp<volScalarField> nut ( )
inline

get the nut field

Definition at line 210 of file DATurbulenceModel.H.

References DATurbulenceModel::nut_.

◆ alphaEff()

tmp< volScalarField > alphaEff ( )

return effective thermal diffusivity

Definition at line 233 of file DATurbulenceModel.C.

References DATurbulenceModel::alpha(), alphat, DATurbulenceModel::mesh_, thermo, and DATurbulenceModel::turbModelType_.

Referenced by DAFunctionWallHeatFlux::calcFunction(), DAFunctionVariance::calcFunction(), DAOutputThermalCoupling::run(), and DAInputThermalCoupling::run().

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

◆ nu()

tmp< volScalarField > nu ( ) const

◆ alpha()

tmp< volScalarField > alpha ( ) const

get alpha field

Definition at line 340 of file DATurbulenceModel.C.

References DATurbulenceModel::nu(), and DATurbulenceModel::Pr_.

Referenced by DATurbulenceModel::alphaEff(), and DATurbulenceModel::rho().

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

◆ rho()

tmp< volScalarField > rho ( ) const

◆ rhoDimensions()

dimensionSet rhoDimensions ( ) const

◆ phase()

tmp<volScalarField> phase ( )
inline

get the phase field

Definition at line 231 of file DATurbulenceModel.H.

References DATurbulenceModel::phase_.

◆ prt()

scalar prt ( )
inline

get the turbulent Prandtl number

Definition at line 237 of file DATurbulenceModel.H.

References DATurbulenceModel::Prt_.

◆ mu()

tmp< Foam::volScalarField > mu ( ) const

get mu

Definition at line 349 of file DATurbulenceModel.C.

References DATurbulenceModel::mesh_, DATurbulenceModel::nu(), and DATurbulenceModel::turbModelType_.

Referenced by DATurbulenceModel::nu().

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

◆ writeData()

bool writeData ( Ostream &  os) const

this is a virtual function for regIOobject

Definition at line 197 of file DATurbulenceModel.C.

◆ printYPlus()

void printYPlus ( const label  printToScreen) const

print the min max and mean yPlus to screen

Definition at line 438 of file DATurbulenceModel.C.

References forAll(), DATurbulenceModel::mesh_, DATurbulenceModel::nu(), DATurbulenceModel::nuEff(), DATurbulenceModel::nut_, and DATurbulenceModel::U_.

Here is the call graph for this function:

◆ getTurbModelType()

word getTurbModelType ( ) const
inline

◆ isPrintTime()

label isPrintTime ( const Time &  runTime,
const label  printInterval 
) const

Definition at line 521 of file DATurbulenceModel.C.

References runTime.

◆ invTranProdNuTildaEqn()

void invTranProdNuTildaEqn ( const volScalarField &  mySource,
volScalarField &  pseudoNuTilda 
)
virtual

Inverse transpose product, M_nuTilda^(-T)

Reimplemented in DASpalartAllmarasFv3.

Definition at line 576 of file DATurbulenceModel.C.

◆ constructPseudoNuTildaEqn()

void constructPseudoNuTildaEqn ( )
virtual

Reimplemented in DASpalartAllmarasFv3.

Definition at line 602 of file DATurbulenceModel.C.

◆ rhsSolvePseudoNuTildaEqn()

void rhsSolvePseudoNuTildaEqn ( const volScalarField &  nuTildaSource)
virtual

Reimplemented in DASpalartAllmarasFv3.

Definition at line 614 of file DATurbulenceModel.C.

◆ calcLduResidualTurb()

void calcLduResidualTurb ( volScalarField &  nuTildaRes)
virtual

calculate the turbulence residual using LDU matrix

Reimplemented in DASpalartAllmarasFv3.

Definition at line 590 of file DATurbulenceModel.C.

◆ getFvMatrixFields()

void getFvMatrixFields ( const word  varName,
scalarField &  diag,
scalarField &  upper,
scalarField &  lower 
)
virtual

return the diag(), upper(), and lower() scalarFields from the turbulence model's fvMatrix

Reimplemented in DAkOmegaSSTLM, DAkOmegaSST, DASpalartAllmarasFv3, DAkEpsilon, DAkOmega, and DASpalartAllmaras.

Definition at line 627 of file DATurbulenceModel.C.

Referenced by DASolver::calcPCMatWithFvMatrix().

Here is the caller graph for this function:

◆ solveAdjointFP()

void solveAdjointFP ( const word  varName,
const scalarList &  rhs,
scalarList &  dPsi 
)
virtual

solve the fvMatrixT field with given rhs and solution

Reimplemented in DASpalartAllmaras.

Definition at line 639 of file DATurbulenceModel.C.

Member Data Documentation

◆ mesh_

const fvMesh& mesh_
protected

◆ daOption_

const DAOption& daOption_
protected

DAOption object.

Definition at line 68 of file DATurbulenceModel.H.

◆ allOptions_

const dictionary& allOptions_
protected

◆ daGlobalVar_

DAGlobalVar& daGlobalVar_
protected

◆ nut_

volScalarField& nut_
protected

◆ U_

volVectorField& U_
protected

◆ phi_

surfaceScalarField& phi_
protected

◆ phase_

volScalarField phase_
protected

◆ phaseRhoPhi_

surfaceScalarField& phaseRhoPhi_
protected

◆ rhoOne_

volScalarField rhoOne_
protected

an uniform rho field with ones

Definition at line 92 of file DATurbulenceModel.H.

Referenced by DATurbulenceModel::rho(), and DATurbulenceModel::rhoDimensions().

◆ turbModelType_

word turbModelType_ = "None"
protected

◆ turbDict_

IOdictionary turbDict_
protected

turbulence model property dict

Definition at line 98 of file DATurbulenceModel.H.

◆ coeffDict_

dictionary coeffDict_
protected

turbulence model parameters dict

Definition at line 101 of file DATurbulenceModel.H.

◆ kMin_

dimensionedScalar kMin_
protected

Lower limit of k.

Definition at line 104 of file DATurbulenceModel.H.

◆ epsilonMin_

dimensionedScalar epsilonMin_
protected

Lower limit of epsilon.

Definition at line 107 of file DATurbulenceModel.H.

◆ omegaMin_

dimensionedScalar omegaMin_
protected

Lower limit for omega.

Definition at line 110 of file DATurbulenceModel.H.

◆ nuTildaMin_

dimensionedScalar nuTildaMin_
protected

Lower limit for nuTilda.

Definition at line 113 of file DATurbulenceModel.H.

◆ Pr_

scalar Pr_
protected

Prandtl number.

Definition at line 116 of file DATurbulenceModel.H.

Referenced by DATurbulenceModel::alpha(), and DATurbulenceModel::DATurbulenceModel().

◆ Prt_

scalar Prt_ = -9999.0
protected

turbulent Prandtl number

Definition at line 119 of file DATurbulenceModel.H.

Referenced by DATurbulenceModel::correctAlphat(), DATurbulenceModel::DATurbulenceModel(), and DATurbulenceModel::prt().


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