Skip to content

Commit 5e1dacf

Browse files
updating BC far-field for multicomponent flows
1 parent fcacd18 commit 5e1dacf

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

SU2_CFD/src/solvers/CIncEulerSolver.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2184,6 +2184,7 @@ void CIncEulerSolver::BC_Far_Field(CGeometry *geometry, CSolver **solver_contain
21842184

21852185
const bool implicit = config->GetKind_TimeIntScheme() == EULER_IMPLICIT;
21862186
const bool viscous = config->GetViscous();
2187+
const bool energy_multicomponent = ((config->GetKind_FluidModel() == FLUID_MIXTURE) && (config->GetEnergy_Equation()));
21872188

21882189
su2double Normal[MAXNDIM] = {0.0};
21892190

@@ -2228,6 +2229,15 @@ void CIncEulerSolver::BC_Far_Field(CGeometry *geometry, CSolver **solver_contain
22282229

22292230
V_infty[prim_idx.Temperature()] = GetTemperature_Inf();
22302231

2232+
/*-- Enthalpy at far-field is needed for energy equation in multicomponent and reacting flows. ---*/
2233+
if (energy_multicomponent) {
2234+
CFluidModel* auxFluidModel = solver_container[FLOW_SOL]->GetFluidModel();
2235+
const su2double* scalar_infty = config->GetSpecies_Init();
2236+
auxFluidModel->SetTDState_T(V_infty[prim_idx.Temperature()],
2237+
scalar_infty); // obtain enthalpy from temperature and species mass fractions
2238+
V_infty[prim_idx.Enthalpy()] = auxFluidModel->GetEnthalpy();
2239+
}
2240+
22312241
/*--- Store the density. ---*/
22322242

22332243
V_infty[prim_idx.Density()] = GetDensity_Inf();
@@ -2263,7 +2273,7 @@ void CIncEulerSolver::BC_Far_Field(CGeometry *geometry, CSolver **solver_contain
22632273

22642274
/*--- Viscous residual contribution ---*/
22652275

2266-
if (!viscous) continue;
2276+
if (!viscous || energy_multicomponent) continue;
22672277

22682278
/*--- Set transport properties at infinity. ---*/
22692279

0 commit comments

Comments
 (0)