Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2a55ebe
enabling relaxation factor
Cristopher-Morales Mar 4, 2025
a630948
Merge branch 'develop' into feature_relaxation_factor
Cristopher-Morales Mar 8, 2025
d327ff7
MLPCpp update
Cristopher-Morales Mar 8, 2025
cdab029
user option
Cristopher-Morales Mar 8, 2025
d024f5a
Merge branch 'develop' into feature_relaxation_factor
Cristopher-Morales Mar 10, 2025
3c096fc
adding temperature limits
Cristopher-Morales Mar 10, 2025
0ec757d
Merge branch 'develop' into feature_relaxation_factor
Cristopher-Morales Mar 11, 2025
989aad8
Merge branch 'develop' into feature_temperature_limits
Cristopher-Morales Aug 8, 2025
f098dfe
removing underrelaxation factor
Cristopher-Morales Aug 8, 2025
9969d87
only SetDensity if Temperature is false
Cristopher-Morales Aug 8, 2025
484fed0
Merge branch 'develop' into feature_temperature_limits
Cristopher-Morales Sep 11, 2025
c9eb3a3
cleaning
Cristopher-Morales Sep 11, 2025
4bddb5b
additional cleaning
Cristopher-Morales Sep 11, 2025
cb0de0d
Merge branch 'develop' into feature_temperature_limits
Cristopher-Morales Sep 11, 2025
e5b84e5
enabling ComputeUnderRelaxationFactor
Cristopher-Morales Sep 12, 2025
d9131cf
disable ComputeUnderRelaxationFactor
Cristopher-Morales Sep 14, 2025
9492dbb
Update SU2_CFD/include/variables/CIncEulerVariable.hpp
Cristopher-Morales Sep 15, 2025
ff3dfa1
Update SU2_CFD/include/variables/CIncEulerVariable.hpp
Cristopher-Morales Sep 15, 2025
30798e9
Update SU2_CFD/src/variables/CIncNSVariable.cpp
Cristopher-Morales Sep 15, 2025
58c1478
Update Common/include/CConfig.hpp
Cristopher-Morales Sep 15, 2025
e5a7c36
fixing renaming and converting to protected varaibles
Cristopher-Morales Sep 15, 2025
eacab20
Merge branch 'develop' into feature_temperature_limits
Cristopher-Morales Sep 15, 2025
a50eabc
updating config_template
Sep 17, 2025
ed709b5
removing trailing space
Sep 19, 2025
6f417cc
Merge branch 'develop' into feature_temperature_limits
Cristopher-Morales Sep 19, 2025
95e231d
adding test case
Sep 20, 2025
a1cdf43
updating residuals
Sep 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
disable ComputeUnderRelaxationFactor
  • Loading branch information
Cristopher-Morales committed Sep 14, 2025
commit d9131cf9f0cc29c929f8d2555c11b8f0de5852fe
7 changes: 0 additions & 7 deletions SU2_CFD/include/solvers/CIncEulerSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,4 @@ class CIncEulerSolver : public CFVMFlowSolverBase<CIncEulerVariable, ENUM_REGIME
* \param[in] config - The particular config.
*/
void ExtractAdjoint_SolutionExtra(su2activevector& adj_sol, const CConfig* config) final;

/*!
* \brief Compute a suitable under-relaxation parameter to limit the change in the solution variables over
* a nonlinear iteration for stability.
* \param[in] config - Definition of the particular problem.
*/
void ComputeUnderRelaxationFactor(const CConfig *config) final;
};
40 changes: 1 addition & 39 deletions SU2_CFD/src/solvers/CIncEulerSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1921,45 +1921,7 @@ void CIncEulerSolver::PrepareImplicitIteration(CGeometry *geometry, CSolver**, C

void CIncEulerSolver::CompleteImplicitIteration(CGeometry *geometry, CSolver**, CConfig *config) {

CompleteImplicitIteration_impl<true>(geometry, config);
}

void CIncEulerSolver::ComputeUnderRelaxationFactor(const CConfig* config) {
/* Apply the under-relaxation to energy equation. As the energy equation
for incompressible flows can be switch-off, the under-relaxation is not
applied when the energy equation is not solved. */

if (!config->GetEnergy_Equation()) return;

/* Loop over the solution update given by relaxing the linear
system for this nonlinear iteration. */

const su2double allowableRatio = config->GetMaxUpdateFractionFlow();

SU2_OMP_FOR_STAT(omp_chunk_size)
for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) {
su2double localUnderRelaxation = 1.0;

/* We impose a limit on the maximum percentage that the
temperature can change over a nonlinear iteration. */

const unsigned long index = iPoint * nVar + nVar - 1;
su2double ratio = fabs(LinSysSol[index]) / (fabs(nodes->GetSolution(iPoint, nVar - 1)) + EPS);
if (ratio > allowableRatio) {
localUnderRelaxation = min(allowableRatio / ratio, localUnderRelaxation);
}

/* Threshold the relaxation factor in the event that there is
a very small value. This helps avoid catastrophic crashes due
to non-realizable states by canceling the update. */

if (localUnderRelaxation < 1e-10) localUnderRelaxation = 0.0;

/* Store the under-relaxation factor for this point. */

nodes->SetUnderRelaxation(iPoint, localUnderRelaxation);
}
END_SU2_OMP_FOR
CompleteImplicitIteration_impl<false>(geometry, config);
}

void CIncEulerSolver::SetBeta_Parameter(CGeometry *geometry, CSolver **solver_container,
Expand Down
Loading