Skip to content

Commit a0884d7

Browse files
fix error JST and BC IncEulerSolver
1 parent 61ba0f2 commit a0884d7

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

SU2_CFD/src/numerics/flow/convection/centered.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ CNumerics::ResidualType<> CCentJSTInc_Flow::ComputeResidual(const CConfig* confi
336336
Temperature_i = V_i[nDim+1]; Temperature_j = V_j[nDim+1];
337337
DensityInc_i = V_i[nDim+2]; DensityInc_j = V_j[nDim+2];
338338
BetaInc2_i = V_i[nDim+3]; BetaInc2_j = V_j[nDim+3];
339+
Cp_i = V_i[nDim+7]; Cp_j = V_j[nDim+7];
339340
Enthalpy_i = V_i[nDim+9]; Enthalpy_j = V_j[nDim+9];
340341
if (energy_multicomponent) {
341342
WorkingVariable_i = Enthalpy_i;

SU2_CFD/src/solvers/CIncEulerSolver.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2128,7 +2128,7 @@ void CIncEulerSolver::SetPreconditioner(const CConfig *config, unsigned long iPo
21282128
law, but in the future, dRhodT should be in the fluid model. ---*/
21292129

21302130
if (variable_density) {
2131-
if (multicomponent){
2131+
if (multicomponent && energy){
21322132
dRhodT = -Density / (Cp * Temperature);
21332133
Cp = oneOverCp = 1.0;
21342134
} else {
@@ -2226,6 +2226,7 @@ void CIncEulerSolver::BC_Far_Field(CGeometry *geometry, CSolver **solver_contain
22262226

22272227
const bool implicit = config->GetKind_TimeIntScheme() == EULER_IMPLICIT;
22282228
const bool viscous = config->GetViscous();
2229+
const bool energy_multicomponent = config->GetKind_FluidModel() == FLUID_MIXTURE && config->GetEnergy_Equation();
22292230
const bool species_model = config->GetKind_Species_Model() != SPECIES_MODEL::NONE;
22302231

22312232
su2double Normal[MAXNDIM] = {0.0};
@@ -2313,7 +2314,7 @@ void CIncEulerSolver::BC_Far_Field(CGeometry *geometry, CSolver **solver_contain
23132314

23142315
/*--- Viscous residual contribution ---*/
23152316

2316-
if (!viscous || species_model) continue;
2317+
if (!viscous || energy_multicomponent) continue;
23172318

23182319
/*--- Set transport properties at infinity. ---*/
23192320

@@ -2368,6 +2369,7 @@ void CIncEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
23682369

23692370
const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT);
23702371
const bool viscous = config->GetViscous();
2372+
const bool energy_multicomponent = config->GetKind_FluidModel() == FLUID_MIXTURE && config->GetEnergy_Equation();
23712373
const bool species_model = config->GetKind_Species_Model() != SPECIES_MODEL::NONE;
23722374

23732375
string Marker_Tag = config->GetMarker_All_TagBound(val_marker);
@@ -2576,7 +2578,7 @@ void CIncEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container,
25762578

25772579
/*--- Viscous contribution, commented out because serious convergence problems ---*/
25782580

2579-
if (!viscous || species_model) continue;
2581+
if (!viscous || energy_multicomponent) continue;
25802582

25812583
/*--- Set transport properties at the inlet ---*/
25822584

@@ -2628,6 +2630,7 @@ void CIncEulerSolver::BC_Outlet(CGeometry *geometry, CSolver **solver_container,
26282630

26292631
const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT);
26302632
const bool viscous = config->GetViscous();
2633+
const bool energy_multicomponent = config->GetKind_FluidModel() == FLUID_MIXTURE && config->GetEnergy_Equation();
26312634
const bool species_model = config->GetKind_Species_Model() != SPECIES_MODEL::NONE;
26322635
string Marker_Tag = config->GetMarker_All_TagBound(val_marker);
26332636

@@ -2786,7 +2789,7 @@ void CIncEulerSolver::BC_Outlet(CGeometry *geometry, CSolver **solver_container,
27862789

27872790
/*--- Viscous contribution, commented out because serious convergence problems ---*/
27882791

2789-
if (!viscous || species_model) continue;
2792+
if (!viscous || energy_multicomponent) continue;
27902793

27912794
/*--- Set transport properties at the outlet. ---*/
27922795

0 commit comments

Comments
 (0)