Skip to content

Commit a2e3890

Browse files
authored
Merge branch 'develop' into fix/2d-actuator-disk-and-periodic-solver-bugs
2 parents c9401a1 + 10f8639 commit a2e3890

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

SU2_CFD/src/solvers/CSpeciesFlameletSolver.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,16 @@ void CSpeciesFlameletSolver::SetInitialCondition(CGeometry** geometry, CSolver**
154154
unsigned long ExtIter) {
155155
const bool restart = (config->GetRestart() || config->GetRestart_Flow());
156156

157-
if ((!restart) && ExtIter == 0) {
157+
bool flame_front_ignition = (flamelet_config_options.ignition_method == FLAMELET_INIT_TYPE::FLAME_FRONT);
158+
159+
/*--- Also allow flame ignition when restarting. ---*/
160+
if (((!restart) && ExtIter == 0) || (restart && (flamelet_config_options.ignition_method != FLAMELET_INIT_TYPE::NONE))) {
158161
if (rank == MASTER_NODE) {
159162
cout << "Initializing progress variable and total enthalpy (using temperature)" << endl;
160163
}
161164

162165
su2double flame_offset[3] = {0, 0, 0}, flame_normal[3] = {0, 0, 0}, flame_thickness = 0, flame_burnt_thickness = 0,
163166
flamenorm = 0;
164-
bool flame_front_ignition = (flamelet_config_options.ignition_method == FLAMELET_INIT_TYPE::FLAME_FRONT);
165167

166168
if (flame_front_ignition) {
167169
/*--- Collect flame front ignition parameters. ---*/
@@ -212,7 +214,6 @@ void CSpeciesFlameletSolver::SetInitialCondition(CGeometry** geometry, CSolver**
212214
for (unsigned long i_mesh = 0; i_mesh <= config->GetnMGLevels(); i_mesh++) {
213215
fluid_model_local = solver_container[i_mesh][FLOW_SOL]->GetFluidModel();
214216
prog_burnt = GetBurntProgressVariable(fluid_model_local, scalar_init);
215-
216217
for (auto iVar = 0u; iVar < nVar; iVar++) scalar_init[iVar] = config->GetSpecies_Init()[iVar];
217218

218219
/*--- Set enthalpy based on initial temperature and scalars. ---*/
@@ -270,6 +271,7 @@ void CSpeciesFlameletSolver::SetInitialCondition(CGeometry** geometry, CSolver**
270271

271272
solver_container[i_mesh][SPECIES_SOL]->GetNodes()->SetSolution(i_point, scalar_init);
272273
}
274+
END_SU2_OMP_FOR
273275

274276
solver_container[i_mesh][SPECIES_SOL]->InitiateComms(geometry[i_mesh], config, MPI_QUANTITIES::SOLUTION);
275277
solver_container[i_mesh][SPECIES_SOL]->CompleteComms(geometry[i_mesh], config, MPI_QUANTITIES::SOLUTION);
@@ -279,7 +281,6 @@ void CSpeciesFlameletSolver::SetInitialCondition(CGeometry** geometry, CSolver**
279281

280282
solver_container[i_mesh][FLOW_SOL]->Preprocessing(geometry[i_mesh], solver_container[i_mesh], config, i_mesh,
281283
NO_RK_ITER, RUNTIME_FLOW_SYS, false);
282-
END_SU2_OMP_FOR
283284
}
284285

285286
/* --- Sum up some global counters over processes. --- */

0 commit comments

Comments
 (0)