Skip to content

Commit d3b2fed

Browse files
committed
Minor changes. Comments and moved variable.
1 parent 9fe38b7 commit d3b2fed

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

SU2_CFD/src/solvers/CIncNSSolver.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,8 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe
777777
unsigned long counter = 0;
778778
su2double diff = 1.0;
779779
su2double U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall));
780-
su2double Y_Plus = 0.99*config->GetwallModel_MinYPlus(); // use clipping value as minimum
780+
/*--- Use minimum y+ as defined in the config, in case the routine below for computing y+ does not converge ---*/
781+
su2double Y_Plus = 0.99*config->GetwallModel_MinYPlus();
781782

782783
const su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall;
783784

SU2_CFD/src/solvers/CNSSolver.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,6 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container,
794794

795795
const su2double Gas_Constant = config->GetGas_ConstantND();
796796
const su2double Cp = (Gamma / Gamma_Minus_One) * Gas_Constant;
797-
const su2double tol = 1e-12; /*!< \brief convergence criterium for the Newton solver, note that 1e-10 is too large */
798797
const unsigned short max_iter = config->GetwallModel_MaxIter();
799798
const su2double relax = config->GetwallModel_RelFac();
800799

@@ -917,6 +916,7 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container,
917916
unsigned long counter = 0;
918917
su2double diff = 1.0;
919918
su2double U_Tau = max(1.0e-6,sqrt(WallShearStress/Density_Wall));
919+
/*--- Use minimum y+ as defined in the config, in case the routine below for computing y+ does not converge ---*/
920920
su2double Y_Plus = 0.99*config->GetwallModel_MinYPlus(); // use clipping value as minimum
921921

922922
const su2double Y_Plus_Start = Density_Wall * U_Tau * WallDistMod / Lam_Visc_Wall;
@@ -927,7 +927,10 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container,
927927
smallYPlusCounter++;
928928
continue;
929929
}
930-
else while (fabs(diff) > tol) {
930+
931+
/*--- Convergence criterium for the Newton solver, note that 1e-10 is too large ---*/
932+
const su2double tol = 1e-12;
933+
while (fabs(diff) > tol) {
931934

932935
/*--- Friction velocity and u+ ---*/
933936

0 commit comments

Comments
 (0)