Skip to content

Commit 5f8887f

Browse files
Moved enthalpy pointer in GetEnthFromTemp function
1 parent c14d312 commit 5f8887f

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

SU2_CFD/include/solvers/CSpeciesFlameletSolver.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ class CSpeciesFlameletSolver final : public CSpeciesSolver {
5959
* \brief Reverse look-up to retrieve enthalpy value based on temperature and other controlling variables.
6060
* \param[in] fluid_model - pointer to flamelet fluid model.
6161
* \param[in] val_temp - temperature value used for reverse look-up.
62-
* \param[in] val_enth - pointer to enthalpy value to be retrieved.
6362
* \param[in] scalar_solution - local scalar solution.
63+
* \param[in] val_enth_out - pointer to output enthalpy variable.
6464
* \param[out] Converged - 0 if Newton solver converged, 1 if not.
6565
*/
66-
unsigned long GetEnthFromTemp(CFluidModel* fluid_model, su2double const val_temp, su2double* val_enth,
67-
const su2double* scalar_solution);
66+
unsigned long GetEnthFromTemp(CFluidModel* fluid_model, su2double const val_temp,
67+
const su2double* scalar_solution, su2double* val_enth_out);
6868

6969
/*!
7070
* \brief Find maximum progress variable value within the manifold for the current solution.

SU2_CFD/src/solvers/CSpeciesFlameletSolver.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ void CSpeciesFlameletSolver::SetInitialCondition(CGeometry** geometry, CSolver**
148148
for (auto iVar = 0u; iVar < nVar; iVar++) scalar_init[iVar] = config->GetSpecies_Init()[iVar];
149149

150150
/*--- Set enthalpy based on initial temperature and scalars. ---*/
151-
n_not_iterated_local += GetEnthFromTemp(fluid_model_local, temp_inlet, &enth_inlet, config->GetSpecies_Init());
151+
n_not_iterated_local += GetEnthFromTemp(fluid_model_local, temp_inlet, config->GetSpecies_Init(), &enth_inlet);
152152
scalar_init[I_ENTH] = enth_inlet;
153153

154154
prog_unburnt = config->GetSpecies_Init()[I_PROGVAR];
@@ -325,8 +325,8 @@ void CSpeciesFlameletSolver::BC_Inlet(CGeometry* geometry, CSolver** solver_cont
325325

326326
/*--- We compute inlet enthalpy from the temperature and progress variable. ---*/
327327
su2double enth_inlet;
328-
GetEnthFromTemp(solver_container[FLOW_SOL]->GetFluidModel(), temp_inlet, &enth_inlet,
329-
config->GetInlet_SpeciesVal(Marker_Tag));
328+
GetEnthFromTemp(solver_container[FLOW_SOL]->GetFluidModel(), temp_inlet, config->GetInlet_SpeciesVal(Marker_Tag),
329+
&enth_inlet);
330330

331331
SU2_OMP_FOR_STAT(OMP_MIN_SIZE)
332332
for (auto iVertex = 0u; iVertex < geometry->nVertex[val_marker]; iVertex++) {
@@ -356,7 +356,7 @@ void CSpeciesFlameletSolver::BC_Isothermal_Wall_Generic(CGeometry* geometry, CSo
356356

357357
if (cht_mode)
358358
temp_wall = solver_container[FLOW_SOL]->GetConjugateHeatVariable(val_marker, iVertex, 0);
359-
else
359+
else
360360
temp_wall = config->GetIsothermal_Temperature(Marker_Tag);
361361

362362
/*--- Check if the node belongs to the domain (i.e., not a halo node). ---*/
@@ -367,7 +367,7 @@ void CSpeciesFlameletSolver::BC_Isothermal_Wall_Generic(CGeometry* geometry, CSo
367367
enth_wall = nodes->GetSolution(iPoint, I_ENTH);
368368

369369
/*--- Set enthalpy on the wall. ---*/
370-
n_not_iterated += GetEnthFromTemp(fluid_model_local, temp_wall, &enth_wall, nodes->GetSolution(iPoint));
370+
n_not_iterated += GetEnthFromTemp(fluid_model_local, temp_wall, nodes->GetSolution(iPoint), &enth_wall);
371371

372372
/*--- Impose the value of the enthalpy as a strong boundary
373373
condition (Dirichlet) and remove any
@@ -478,7 +478,7 @@ unsigned long CSpeciesFlameletSolver::SetScalarLookUps(const CConfig* config, CF
478478
}
479479

480480
unsigned long CSpeciesFlameletSolver::GetEnthFromTemp(CFluidModel* fluid_model, su2double const val_temp,
481-
su2double* val_enth, const su2double* scalar_solution) {
481+
const su2double* scalar_solution, su2double* val_enth) {
482482
/*--- convergence criterion for temperature in [K], high accuracy needed for restarts. ---*/
483483
su2double delta_temp_final = 0.001;
484484
su2double enth_iter = scalar_solution[I_ENTH];

0 commit comments

Comments
 (0)