Skip to content

Commit 3661da5

Browse files
committed
Remove SetInitalCond routine of CSpeciesSolver as it is superfluous.
1 parent 0a3fcaf commit 3661da5

6 files changed

Lines changed: 2 additions & 57 deletions

File tree

SU2_CFD/include/solvers/CSpeciesSolver.hpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,6 @@ class CSpeciesSolver : public CScalarSolver<CSpeciesVariable> {
8181
void Preprocessing(CGeometry* geometry, CSolver** solver_container, CConfig* config, unsigned short iMesh,
8282
unsigned short iRKStep, unsigned short RunTime_EqSystem, bool Output) final;
8383

84-
/*!
85-
* \brief Set the initial condition for the species transport problem.
86-
* \param[in] geometry - Geometrical definition of the problem.
87-
* \param[in] solver_container - Container with all the solutions.
88-
* \param[in] config - Definition of the particular problem.
89-
* \param[in] ExtIter - External iteration.
90-
*/
91-
void SetInitialCondition(CGeometry** geometry, CSolver*** solver_container, CConfig* config,
92-
unsigned long ExtIter) final;
93-
9484
/*!
9585
* \brief Compute the viscous flux for the turbulent equation at a particular edge.
9686
* \param[in] iEdge - Edge for which we want to compute the flux

SU2_CFD/src/drivers/CDriver.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2991,9 +2991,6 @@ void CFluidDriver::Preprocess(unsigned long Iter) {
29912991
if (config_container[iZone]->GetFluidProblem()) {
29922992
for (iInst = 0; iInst < nInst[iZone]; iInst++) {
29932993
solver_container[iZone][iInst][MESH_0][FLOW_SOL]->SetInitialCondition(geometry_container[iZone][INST_0], solver_container[iZone][iInst], config_container[iZone], Iter);
2994-
/// NOTE TK:: Check if this is necessary here . Why is this not done for turb or heat for example.
2995-
if (config_container[iZone]->GetKind_Species_Model() != SPECIES_MODEL::NONE)
2996-
solver_container[iZone][iInst][MESH_0][SPECIES_SOL]->SetInitialCondition(geometry_container[iZone][INST_0], solver_container[iZone][iInst], config_container[iZone], Iter);
29972994
}
29982995
}
29992996
}

SU2_CFD/src/drivers/CMultizoneDriver.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,6 @@ void CMultizoneDriver::Preprocess(unsigned long TimeIter) {
249249
solver_container[iZone][INST_0],
250250
config_container[iZone], TimeIter);
251251
}
252-
/// NOTE TK:: check whether this is necessary
253-
else if (!fsi && (config_container[iZone]->GetKind_Species_Model() != SPECIES_MODEL::NONE)) {
254-
SU2_MPI::Error("Species solver with multizone needs some testing probably!", CURRENT_FUNCTION);
255-
/*--- Set the initial condition for species equation ---------------------------------------------*/
256-
solver_container[iZone][INST_0][MESH_0][SPECIES_SOL]->SetInitialCondition(geometry_container[iZone][INST_0],
257-
solver_container[iZone][INST_0],
258-
config_container[iZone], TimeIter);
259-
}
260252
}
261253

262254
SU2_MPI::Barrier(SU2_MPI::GetComm());

SU2_CFD/src/drivers/CSinglezoneDriver.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,6 @@ void CSinglezoneDriver::Preprocess(unsigned long TimeIter) {
141141
solver_container[ZONE_0][INST_0],
142142
config_container[ZONE_0], TimeIter);
143143
}
144-
/// NOTE TK:: is this necessary. What is my purpose when Turb does not do this.
145-
else if (config_container[ZONE_0]->GetKind_Species_Model() != SPECIES_MODEL::NONE) {
146-
/*--- Set the initial condition for species equation ---------------------------------------------*/
147-
solver_container[ZONE_0][INST_0][MESH_0][SPECIES_SOL]->SetInitialCondition(geometry_container[ZONE_0][INST_0],
148-
solver_container[ZONE_0][INST_0],
149-
config_container[ZONE_0], TimeIter);
150-
}
151144

152145
SU2_MPI::Barrier(SU2_MPI::GetComm());
153146

SU2_CFD/src/iteration/CFluidIteration.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ void CFluidIteration::Iterate(COutput* output, CIntegration**** integration, CGe
126126
}
127127

128128
if (config[val_iZone]->GetKind_Species_Model() != SPECIES_MODEL::NONE){
129-
config[val_iZone]->SetGlobalParam(MAIN_SOLVER::RANS, RUNTIME_SPECIES_SYS);
129+
config[val_iZone]->SetGlobalParam(config[val_iZone]->GetKind_Solver(), RUNTIME_SPECIES_SYS);
130130
integration[val_iZone][val_iInst][SPECIES_SOL]->SingleGrid_Iteration(geometry, solver, numerics, config,
131131
RUNTIME_SPECIES_SYS, val_iZone, val_iInst);
132132

133-
/// NOTE TK:: THis only applies if mixture properties are used. But this also doesn't hurt if done w/out mixture properties.
133+
// This only applies if mixture properties are used. But this also doesn't hurt if done w/out mixture properties.
134134
// In case of turbulence, the Turb-Post computes the correct eddy viscosity based on mixture-density and
135135
// mixture lam-visc. In order to get the correct mixture properties, based on the just updated mass-fractions, the
136136
// Flow-Pre has to be called upfront. The updated eddy-visc are copied into the flow-solver Primitive in another

SU2_CFD/src/solvers/CSpeciesSolver.cpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -319,33 +319,6 @@ void CSpeciesSolver::Preprocessing(CGeometry* geometry, CSolver** solver_contain
319319
CommonPreprocessing(geometry, config, Output);
320320
}
321321

322-
void CSpeciesSolver::SetInitialCondition(CGeometry** geometry, CSolver*** solver_container, CConfig* config,
323-
unsigned long ExtIter) {
324-
const bool Restart = (config->GetRestart() || config->GetRestart_Flow());
325-
326-
/// NOTE TK:: Check whether this is done in the constructor for example and whether this is mnecessary. The TurbSolver
327-
/// does not do this!
328-
/*--- For a restart do nothing here. Otherwise initialize the solution with the Init value. ---*/
329-
if ((!Restart) && ExtIter == 0) {
330-
for (unsigned long iMesh = 0; iMesh <= config->GetnMGLevels(); iMesh++) {
331-
SU2_OMP_FOR_STAT(omp_chunk_size)
332-
for (unsigned long iPoint = 0; iPoint < geometry[iMesh]->GetnPoint(); iPoint++) {
333-
solver_container[iMesh][SPECIES_SOL]->GetNodes()->SetSolution(iPoint, config->GetSpecies_Init());
334-
}
335-
END_SU2_OMP_FOR
336-
337-
solver_container[iMesh][SPECIES_SOL]->InitiateComms(geometry[iMesh], config, SOLUTION);
338-
solver_container[iMesh][SPECIES_SOL]->CompleteComms(geometry[iMesh], config, SOLUTION);
339-
340-
solver_container[iMesh][FLOW_SOL]->InitiateComms(geometry[iMesh], config, SOLUTION);
341-
solver_container[iMesh][FLOW_SOL]->CompleteComms(geometry[iMesh], config, SOLUTION);
342-
343-
solver_container[iMesh][FLOW_SOL]->Preprocessing(geometry[iMesh], solver_container[iMesh], config, iMesh,
344-
NO_RK_ITER, RUNTIME_FLOW_SYS, false);
345-
}
346-
}
347-
}
348-
349322
void CSpeciesSolver::Viscous_Residual(unsigned long iEdge, CGeometry* geometry, CSolver** solver_container,
350323
CNumerics* numerics, CConfig* config) {
351324
/*--- Define an object to set solver specific numerics contribution. ---*/

0 commit comments

Comments
 (0)