Go to the documentation of this file.
25 #ifndef DATurbulenceModel_H
26 #define DATurbulenceModel_H
28 #include "runTimeSelectionTables.H"
30 #include "nearWallDist.H"
35 #include "nutkWallFunctionFvPatchScalarField.H"
36 #include "wallFvPatch.H"
38 #include "singlePhaseTransportModel.H"
39 #include "turbulentTransportModel.H"
40 #include "fluidThermo.H"
41 #include "turbulentFluidThermoModel.H"
130 (
const word modelType,
133 (modelType,
mesh, daOption));
139 const word modelType,
146 static autoPtr<DATurbulenceModel>
New(
147 const word modelType,
186 virtual void correct(label printToScreen) = 0;
207 tmp<volScalarField>
nuEff()
const;
219 tmp<volScalarField>
nu()
const;
222 tmp<volScalarField>
alpha()
const;
225 tmp<volScalarField>
rho()
const;
246 FatalErrorIn(
"getPrt") << exit(FatalError);
252 tmp<Foam::volScalarField>
mu()
const;
258 void printYPlus(
const label printToScreen)
const;
267 const label printInterval)
const;
271 const volScalarField& mySource,
291 const scalarList& rhs,
virtual void getTurbProdTerm(volScalarField &prodTerm) const
return the value of the production term from the turbulence model
tmp< volScalarField > nuEff() const
return effective viscosity
virtual void constructPseudoNuTildaEqn()
surfaceScalarField & phi_
face flux
tmp< fvVectorMatrix > divDevRhoReff(volVectorField &U)
divDev terms
tmp< fvVectorMatrix > divDevReff(volVectorField &U)
divDev terms
dimensionedScalar kMin_
Lower limit of k.
virtual void updateIntermediateVariables()=0
update any intermediate variables that are dependent on state variables and are used in calcResiduals
virtual void correctModelStates(wordList &modelStates) const =0
update the turbulence state for DAStateInfo::regStates_
TypeName("DATurbulenceModel")
volScalarField & pseudoNuTilda
dimensionedScalar nuTildaMin_
Lower limit for nuTilda.
virtual void correctNut()=0
update nut based on other turbulence variables and update the BCs
tmp< volScalarField > phase()
get the phase field
surfaceScalarField & phaseRhoPhi_
phase*phi*density field
const dictionary & allOptions_
all DAFoam options
static autoPtr< DATurbulenceModel > New(const word modelType, const fvMesh &mesh, const DAOption &daOption)
tmp< volScalarField > rho() const
get the density field
scalar prt()
get the turbulent Prandtl number
tmp< Foam::volScalarField > mu() const
get mu
scalar Prt_
turbulent Prandtl number
virtual void correctBoundaryConditions()=0
update turbulence variable boundary values
virtual void calcLduResidualTurb(volScalarField &nuTildaRes)
calculate the turbulence residual using LDU matrix
declareRunTimeSelectionTable(autoPtr, DATurbulenceModel, dictionary,(const word modelType, const fvMesh &mesh, const DAOption &daOption),(modelType, mesh, daOption))
tmp< volScalarField > nut()
get the nut field
virtual void calcResiduals(const dictionary &options)=0
compute the turbulence residuals
void correctWallDist()
update wall distance for d_. Note: y_ will be automatically updated in mesh_ object
DAGlobalVar & daGlobalVar_
global variable
volVectorField & U_
velocity
IOdictionary turbDict_
turbulence model property dict
volScalarField & nut_
turbulence viscosity
virtual void getTurbConvOverProd(volScalarField &CoP) const
return the value of the convective over production term from the turbulence model
virtual void invTranProdNuTildaEqn(const volScalarField &mySource, volScalarField &pseudoNuTilda)
Inverse transpose product, M_nuTilda^(-T)
tmp< volSymmTensorField > devRhoReff() const
dev terms
dimensionSet rhoDimensions() const
return the dimension of rho
volScalarField rhoOne_
an uniform rho field with ones
virtual ~DATurbulenceModel()
virtual void rhsSolvePseudoNuTildaEqn(const volScalarField &nuTildaSource)
tmp< volScalarField > nu() const
get the nu field
word getTurbModelType() const
virtual void addModelResidualCon(HashTable< List< List< word >>> &allCon) const =0
add the model residual connectivity to stateCon
void printYPlus(const label printToScreen) const
print the min max and mean yPlus to screen
void correctAlphat()
update alphat
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
const DAOption & daOption_
DAOption object.
virtual void correct(label printToScreen)=0
solve the residual equations and update the state
const fvMesh & mesh_
fvMesh
virtual void correctStateResidualModelCon(List< List< word >> &stateCon) const =0
update the original variable connectivity for the adjoint state residuals in stateCon
virtual void solveAdjointFP(const word varName, const scalarList &rhs, scalarList &dPsi)
solve the fvMatrixT field with given rhs and solution
label isPrintTime(const Time &runTime, const label printInterval) const
tmp< volScalarField > alphaEff()
return effective thermal diffusivity
dimensionedScalar omegaMin_
Lower limit for omega.
dictionary coeffDict_
turbulence model parameters dict
tmp< volScalarField > alpha() const
get alpha field
scalar Pr_
Prandtl number.
virtual void getTurbProdOverDestruct(volScalarField &PoD) const
return the ratio of the production over destruction term from the turbulence model
word turbModelType_
whether the turbulence model is incompressible or compressible
volScalarField phase_
phase field
dimensionedScalar epsilonMin_
Lower limit of epsilon.
bool writeData(Ostream &os) const
this is a virtual function for regIOobject