File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
TestCases/py_wrapper/turbulent_premixed_psi Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,13 @@ CFluidFlamelet::~CFluidFlamelet() {
118118}
119119
120120void 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
Original file line number Diff line number Diff 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# ################################################################## #
You can’t perform that action at this time.
0 commit comments