Skip to content

Commit d840e3f

Browse files
adding explanation enthalpy as passive scalar and updating zimont pywrapper
1 parent e1ac56e commit d840e3f

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

SU2_CFD/src/fluid/CFluidFlamelet.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ CFluidFlamelet::~CFluidFlamelet() {
118118
}
119119

120120
void CFluidFlamelet::SetTDState_h(su2double val_enthalpy, const su2double* val_scalars) {
121+
/*--- For the fluid flamelet model, the enthalpy (and the temperature) are passive scalars.
122+
val_scalars contains the enthalpy as the second variable: val_scalars= (Progress_variable, enthalpy,..).
123+
Consequently, the energy equation is not solved when the fluid flamelet model is used, instead the energy equation for
124+
enthalpy is solved in the species flamelet solver, and the enthalpy solution is overwritten in the CIncEulerSolver.
125+
Likewise, The temperature is retrieved from the look up table. Then, the thermodynamics state is fully determined with
126+
the val_scalars. This is the reason why enthalpy (or temperature) can be passed in either SetTDSTtate_T or
127+
SetTDState_h without affecting the solution.---*/
121128
SetTDState_T(val_enthalpy, val_scalars);
122129
}
123130

TestCases/py_wrapper/turbulent_premixed_psi/run.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,14 @@ def update_temperature(SU2Driver, iPoint):
9595
iFLOWSOLVER = SU2Driver.GetSolverIndices()['INC.FLOW']
9696
# the list with names
9797
solindex = getsolvar(SU2Driver)
98+
primindex = SU2Driver.GetPrimitiveIndices()
99+
# get Cp
100+
iCp = primindex.get("CP_TOTAL")
101+
Cp = SU2Driver.Primitives()(iPoint,iCp)
102+
# get solution index for energy equation
98103
iTEMP = solindex.get("TEMPERATURE")
99-
SU2Driver.Solution(iFLOWSOLVER).Set(iPoint,iTEMP,T)
104+
# set enthalpy, for Ideal Gas model, enthalpy is Cp*T
105+
SU2Driver.Solution(iFLOWSOLVER).Set(iPoint,iTEMP,Cp*T)
100106

101107

102108
# ################################################################## #

0 commit comments

Comments
 (0)