Go to the documentation of this file.
35 #ifndef DAkOmegaSSTFIML_H
36 #define DAkOmegaSSTFIML_H
39 #include "addToRunTimeSelectionTable.H"
70 dimensionedScalar
a1_;
71 dimensionedScalar
b1_;
72 dimensionedScalar
c1_;
81 #ifdef CODI_AD_FORWARD
82 double* inputsDouble_ =
new double[
mesh_.nCells() * 9];
83 double* outputsDouble_ =
new double[
mesh_.nCells()];
91 tmp<volScalarField>
F1(
const volScalarField& CDkOmega)
const;
92 tmp<volScalarField>
F2()
const;
93 tmp<volScalarField>
F3()
const;
94 tmp<volScalarField>
F23()
const;
97 const volScalarField&
F1,
98 const dimensionedScalar& psi1,
99 const dimensionedScalar& psi2)
const
101 return F1 * (psi1 - psi2) + psi2;
104 tmp<volScalarField::Internal>
blend(
105 const volScalarField::Internal&
F1,
106 const dimensionedScalar& psi1,
107 const dimensionedScalar& psi2)
const
109 return F1 * (psi1 - psi2) + psi2;
112 tmp<volScalarField>
alphaK(
const volScalarField&
F1)
const
122 tmp<volScalarField::Internal>
beta(
123 const volScalarField::Internal&
F1)
const
128 tmp<volScalarField::Internal>
gamma(
129 const volScalarField::Internal&
F1)
const
135 tmp<volScalarField>
DkEff(
const volScalarField&
F1)
const
137 return tmp<volScalarField>(
144 return tmp<volScalarField>(
151 tmp<volScalarField::Internal>
Pk(
152 const volScalarField::Internal& G)
const;
156 const volScalarField&
F1,
157 const volTensorField& gradU)
const;
160 tmp<volScalarField::Internal>
GbyNu(
161 const volScalarField::Internal& GbyNu0,
162 const volScalarField::Internal&
F2,
163 const volScalarField::Internal& S2)
const;
165 tmp<fvScalarMatrix>
kSource()
const;
169 tmp<fvScalarMatrix>
Qsas(
170 const volScalarField::Internal& S2,
171 const volScalarField::Internal&
gamma,
172 const volScalarField::Internal&
beta)
const;
214 const volScalarField&
y_;
234 const word modelType,
243 #ifdef CODI_AD_FORWARD
244 delete[] inputsDouble_;
245 delete[] outputsDouble_;
284 #ifdef CODI_AD_REVERSE
287 static void betaCompute(
292 codi::ExternalFunctionUserData* d)
297 static void betaJacVecProd(
304 codi::ExternalFunctionUserData* d)
DAkOmegaSSTFIML(const word modelType, const fvMesh &mesh, const DAOption &daOption)
tmp< volScalarField::Internal > epsilonByk(const volScalarField &F1, const volTensorField &gradU) const
virtual void correctModelStates(wordList &modelStates) const
update the turbulence state for DAStateInfo::regStates_
virtual void updateIntermediateVariables()
update any intermediate variables that are dependent on state variables and are used in calcResiduals
tmp< volScalarField > DomegaEff(const volScalarField &F1) const
static pyJacVecProdInterface pyCalcBetaJacVecProdInterface
virtual void correctBoundaryConditions()
update turbulence variable boundary values
static void * pyCalcBeta
define a function pointer template for Python call back
tmp< volScalarField > alphaOmega(const volScalarField &F1) const
dimensionedScalar alphaOmega1_
static pyComputeInterface pyCalcBetaInterface
dimensionedScalar alphaK2_
tmp< fvScalarMatrix > omegaSource() const
volScalarField betaFieldInversion_
tmp< volScalarField::Internal > blend(const volScalarField::Internal &F1, const dimensionedScalar &psi1, const dimensionedScalar &psi2) const
volScalarField kResPartDeriv_
TypeName("kOmegaSSTFIML")
tmp< volScalarField > blend(const volScalarField &F1, const dimensionedScalar &psi1, const dimensionedScalar &psi2) const
volScalarField convectionTKE_
dimensionedScalar alphaK1_
tmp< volScalarField > F3() const
tmp< volScalarField::Internal > Pk(const volScalarField::Internal &G) const
volScalarField curvature_
DAOption daOption(mesh, pyOptions_)
static void * pyCalcBetaJacVecProd
virtual void correctStateResidualModelCon(List< List< word >> &stateCon) const
update the original variable connectivity for the adjoint state residuals in stateCon
virtual void addModelResidualCon(HashTable< List< List< word >>> &allCon) const
add the model residual connectivity to stateCon
volScalarField UGradMisalignment_
virtual ~DAkOmegaSSTFIML()
tmp< volScalarField::Internal > GbyNu(const volScalarField::Internal &GbyNu0, const volScalarField::Internal &F2, const volScalarField::Internal &S2) const
dimensionedScalar betaStar_
volScalarField pGradAlongStream_
virtual void correct()
solve the residual equations and update the state
tmp< fvScalarMatrix > Qsas(const volScalarField::Internal &S2, const volScalarField::Internal &gamma, const volScalarField::Internal &beta) const
tmp< volScalarField > F2() const
volScalarField betaFieldInversionML_
virtual void calcResiduals(const dictionary &options)
compute the turbulence residuals
tmp< volScalarField > alphaK(const volScalarField &F1) const
volScalarField QCriterion_
label printInterval_
time step interval to print residual
tmp< volScalarField > DkEff(const volScalarField &F1) const
tmp< volScalarField > F23() const
void calcBetaField()
calculate the beta field using the trained model
IOdictionary transportProperties_
volScalarField & nut_
turbulence viscosity
void saveOmegaNearWall()
save near wall omega values to omegaNearWall_
virtual void correctNut()
update nut based on other turbulence variables and update the BCs
dimensionedScalar alphaOmega2_
scalar * inputs_
inputs and outputs for the beta calculation
scalarList omegaNearWall_
volScalarField omegaResRef_
volScalarField omegaResPartDeriv_
volScalarField turbulenceIntensity_
tmp< volScalarField > nu() const
get the nu field
void setOmegaNearWall()
set omegaNearWall_ to near wall omega values
tmp< volScalarField::Internal > gamma(const volScalarField::Internal &F1) const
volScalarField pressureStress_
tmp< volScalarField > F1(const volScalarField &CDkOmega) const
const volScalarField & y_
Weight of betaFieldInversion for the turbulent transport equations if both are modified.
const fvMesh & mesh_
fvMesh
label solveTurbState_
whether to solve for turb states
dimensionedScalar gamma2_
tmp< volScalarField::Internal > beta(const volScalarField::Internal &F1) const
dimensionedScalar gamma1_
tmp< fvScalarMatrix > kSource() const
void correctOmegaBoundaryConditions()
specially treatment to correct epsilon BC