@@ -46,6 +46,8 @@ CIncNSVariable::CIncNSVariable(su2double pressure, const su2double *velocity, su
4646 AuxVar.resize (nPoint,nAuxVar) = su2double (0.0 );
4747 Grad_AuxVar.resize (nPoint,nAuxVar,nDim);
4848 }
49+ Energy = config->GetEnergy_Equation ();
50+ if (!Energy) TemperatureInc = config->GetInc_Temperature_Init ();
4951}
5052
5153bool CIncNSVariable::SetPrimVar (unsigned long iPoint, su2double eddy_visc, su2double turb_ke, CFluidModel *FluidModel, const su2double *scalar) {
@@ -58,9 +60,19 @@ bool CIncNSVariable::SetPrimVar(unsigned long iPoint, su2double eddy_visc, su2do
5860
5961 SetPressure (iPoint);
6062
61- Enthalpy = Solution (iPoint, nDim + 1 );
62- FluidModel->SetTDState_h (Enthalpy, scalar);
63- Temperature = FluidModel->GetTemperature ();
63+ if (Energy) {
64+ Enthalpy = Solution (iPoint, nDim + 1 );
65+ FluidModel->SetTDState_h (Enthalpy, scalar);
66+ Temperature = FluidModel->GetTemperature ();
67+ } else {
68+ /* --- When energy equation is switch off, a constant temperature is imposed, and enthalpy is recomputed based on
69+ * this temperature. As in the fluid flamelet model, the temperature is retrieved from a look-up table, then the
70+ * temperature is obtained directly from the fluidmodel. For the other fluid models, GetTemperature provides the
71+ * same value as TemperatureInc ---*/
72+ FluidModel->SetTDState_T (TemperatureInc, scalar);
73+ Enthalpy = Solution (iPoint, nDim + 1 ) = FluidModel->GetEnthalpy ();
74+ Temperature = FluidModel->GetTemperature ();
75+ }
6476 auto check_temp = SetTemperature (iPoint, Temperature, TemperatureLimits);
6577
6678 /* --- Set the value of the density ---*/
0 commit comments