Skip to content
9 changes: 4 additions & 5 deletions SU2_CFD/include/solvers/CScalarSolver.inl
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,6 @@ void CScalarSolver<VariableType>::PrepareImplicitIteration(CGeometry* geometry,
template <class VariableType>
void CScalarSolver<VariableType>::CompleteImplicitIteration(CGeometry* geometry, CSolver** solver_container,
CConfig* config) {
const bool compressible = (config->GetKind_Regime() == ENUM_REGIME::COMPRESSIBLE);

ComputeUnderRelaxationFactor(config);

/*--- Update solution (system written in terms of increments) ---*/
Expand All @@ -505,12 +503,13 @@ void CScalarSolver<VariableType>::CompleteImplicitIteration(CGeometry* geometry,
SU2_OMP_FOR_STAT(omp_chunk_size)
for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) {
/*--- Multiply the Solution var with density to get the conservative transported quantity, if necessary. ---*/
/* Note that for consistency with residual and jacobian calaulcations, use of current density for conservative variables
* of the old solution is used. see pull request https://github.com/su2code/SU2/pull/2458*/
const su2double density = flowNodes->GetDensity(iPoint);
const su2double density_old = compressible ? flowNodes->GetSolution_Old(iPoint, 0) : density;


for (unsigned short iVar = 0; iVar < nVar; iVar++) {
nodes->AddClippedSolution(iPoint, iVar, nodes->GetUnderRelaxation(iPoint) * LinSysSol(iPoint, iVar),
lowerlimit[iVar], upperlimit[iVar], density, density_old);
lowerlimit[iVar], upperlimit[iVar], density, density);
}
}
END_SU2_OMP_FOR
Expand Down
32 changes: 16 additions & 16 deletions TestCases/hybrid_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ def main():
rae2822_sst.cfg_dir = "rans/rae2822"
rae2822_sst.cfg_file = "turb_SST_RAE2822.cfg"
rae2822_sst.test_iter = 20
rae2822_sst.test_vals = [-0.510371, 4.905635, 0.811981, 0.061600, 0.000000]
rae2822_sst.test_vals = [-0.510349, 4.950289, 0.811983, 0.061600, 0.000000]
test_list.append(rae2822_sst)

# RAE2822 SST_SUST
rae2822_sst_sust = TestCase('rae2822_sst_sust')
rae2822_sst_sust.cfg_dir = "rans/rae2822"
rae2822_sst_sust.cfg_file = "turb_SST_SUST_RAE2822.cfg"
rae2822_sst_sust.test_iter = 20
rae2822_sst_sust.test_vals = [-2.569447, 4.905635, 0.811980, 0.061600]
rae2822_sst_sust.test_vals = [-2.678140, 4.950289, 0.811983, 0.061600]
test_list.append(rae2822_sst_sust)

# Flat plate
Expand Down Expand Up @@ -206,23 +206,23 @@ def main():
turb_naca0012_sst.cfg_dir = "rans/naca0012"
turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg"
turb_naca0012_sst.test_iter = 10
turb_naca0012_sst.test_vals = [-12.232701, -14.434762, -6.411172, 1.047444, 0.019214, -1.652128, 0]
turb_naca0012_sst.test_vals = [-12.232646, -14.434809, -6.037672, 1.047444, 0.019214, -1.652532, 0.000000]
test_list.append(turb_naca0012_sst)

# NACA0012 (SST_SUST, FUN3D finest grid results: CL=1.0840, CD=0.01253)
turb_naca0012_sst_sust = TestCase('turb_naca0012_sst_sust')
turb_naca0012_sst_sust.cfg_dir = "rans/naca0012"
turb_naca0012_sst_sust.cfg_file = "turb_NACA0012_sst_sust.cfg"
turb_naca0012_sst_sust.test_iter = 10
turb_naca0012_sst_sust.test_vals = [-12.152274, -14.781420, -6.725224, 1.000270, 0.019123, -1.417716]
turb_naca0012_sst_sust.test_vals = [-12.152294, -14.781143, -6.357944, 1.000270, 0.019123, -1.417707]
test_list.append(turb_naca0012_sst_sust)

# NACA0012 (SST, fixed values for turbulence quantities)
turb_naca0012_sst_fixedvalues = TestCase('turb_naca0012_sst_fixedvalues')
turb_naca0012_sst_fixedvalues.cfg_dir = "rans/naca0012"
turb_naca0012_sst_fixedvalues.cfg_file = "turb_NACA0012_sst_fixedvalues.cfg"
turb_naca0012_sst_fixedvalues.test_iter = 10
turb_naca0012_sst_fixedvalues.test_vals = [-5.192403, -10.256922, -1.568131, 1.022561, 0.040530, -2.382766]
turb_naca0012_sst_fixedvalues.test_vals = [-5.192404, -10.250818, -1.560208, 1.022562, 0.040530, -2.382731]
test_list.append(turb_naca0012_sst_fixedvalues)

# NACA0012 (SST, explicit Euler for flow and turbulence equations)
Expand Down Expand Up @@ -250,7 +250,7 @@ def main():
axi_rans_air_nozzle_restart.cfg_dir = "axisymmetric_rans/air_nozzle"
axi_rans_air_nozzle_restart.cfg_file = "air_nozzle_restart.cfg"
axi_rans_air_nozzle_restart.test_iter = 10
axi_rans_air_nozzle_restart.test_vals = [-12.065478, -6.838586, -8.839400, -4.103176, 0]
axi_rans_air_nozzle_restart.test_vals = [-12.065572, -6.837646, -8.883745, -3.822957, 0.000000]
test_list.append(axi_rans_air_nozzle_restart)

#################################
Expand All @@ -275,7 +275,7 @@ def main():
turb_naca0012_1c.cfg_dir = "rans_uq/naca0012"
turb_naca0012_1c.cfg_file = "turb_NACA0012_uq_1c.cfg"
turb_naca0012_1c.test_iter = 10
turb_naca0012_1c.test_vals = [-4.976353, 1.141375, 0.243102, -0.112154]
turb_naca0012_1c.test_vals = [-4.976639, 1.141468, 0.243064, -0.112166]
turb_naca0012_1c.test_vals_aarch64 = [-4.981105, 1.138873, 0.248013, -0.117248]
test_list.append(turb_naca0012_1c)

Expand All @@ -284,7 +284,7 @@ def main():
turb_naca0012_2c.cfg_dir = "rans_uq/naca0012"
turb_naca0012_2c.cfg_file = "turb_NACA0012_uq_2c.cfg"
turb_naca0012_2c.test_iter = 10
turb_naca0012_2c.test_vals = [-5.485942, 0.968057, 0.233600, -0.114502]
turb_naca0012_2c.test_vals = [-5.486005, 0.968502, 0.233564, -0.114514]
turb_naca0012_2c.test_vals_aarch64 = [-5.483345, 0.968720, 0.214914, -0.124932]
test_list.append(turb_naca0012_2c)

Expand All @@ -293,7 +293,7 @@ def main():
turb_naca0012_3c.cfg_dir = "rans_uq/naca0012"
turb_naca0012_3c.cfg_file = "turb_NACA0012_uq_3c.cfg"
turb_naca0012_3c.test_iter = 10
turb_naca0012_3c.test_vals = [-5.584306, 0.931465, 0.223394, -0.116130]
turb_naca0012_3c.test_vals = [-5.584366, 0.931883, 0.223356, -0.116142]
turb_naca0012_3c.test_vals_aarch64 = [-5.584300, 0.931293, 0.207447, -0.125691]
test_list.append(turb_naca0012_3c)

Expand All @@ -302,7 +302,7 @@ def main():
turb_naca0012_p1c1.cfg_dir = "rans_uq/naca0012"
turb_naca0012_p1c1.cfg_file = "turb_NACA0012_uq_p1c1.cfg"
turb_naca0012_p1c1.test_iter = 10
turb_naca0012_p1c1.test_vals = [-5.114258, 1.076587, 0.224375, -0.118856]
turb_naca0012_p1c1.test_vals = [-5.114311, 1.076961, 0.224322, -0.118874]
turb_naca0012_p1c1.test_vals_aarch64 = [-5.132358, 1.075658, 0.337268, -0.082827]
test_list.append(turb_naca0012_p1c1)

Expand All @@ -311,7 +311,7 @@ def main():
turb_naca0012_p1c2.cfg_dir = "rans_uq/naca0012"
turb_naca0012_p1c2.cfg_file = "turb_NACA0012_uq_p1c2.cfg"
turb_naca0012_p1c2.test_iter = 10
turb_naca0012_p1c2.test_vals = [-5.548775, 0.945962, 0.211150, -0.121291]
turb_naca0012_p1c2.test_vals = [-5.548834, 0.946383, 0.211109, -0.121304]
turb_naca0012_p1c2.test_vals_aarch64 = [-5.548775, 0.945962, 0.211150, -0.121291]
test_list.append(turb_naca0012_p1c2)

Expand Down Expand Up @@ -452,7 +452,7 @@ def main():
square_cylinder.cfg_dir = "unsteady/square_cylinder"
square_cylinder.cfg_file = "turb_square.cfg"
square_cylinder.test_iter = 3
square_cylinder.test_vals = [-2.560839, -1.176729, 0.061954, 1.399401, 2.220361, 1.399349, 2.218600, 0.000000]
square_cylinder.test_vals = [-2.560838, -1.175929, 0.062081, 1.399401, 2.220361, 1.399349, 2.218600, 0.000000]
square_cylinder.test_vals_aarch64 = [-2.557902, -1.173574, 0.058050, 1.399794, 2.220402, 1.399748, 2.218604, 0]
square_cylinder.unsteady = True
test_list.append(square_cylinder)
Expand Down Expand Up @@ -556,15 +556,15 @@ def main():
Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger"
Jones_tc_restart.cfg_file = "Jones_restart.cfg"
Jones_tc_restart.test_iter = 5
Jones_tc_restart.test_vals = [-7.286677, -5.327018, -14.895652, -9.330534, -12.071733, -6.548623, 73291.000000, 73291.000000, 0.020111, 82.896000]
Jones_tc_restart.test_vals = [-7.308010, -5.332065, -14.895822, -9.330703, -12.071733, -6.548623, 73291.000000, 73291.000000, 0.020111, 82.896000]
test_list.append(Jones_tc_restart)

# 2D axial stage
axial_stage2D = TestCase('axial_stage2D')
axial_stage2D.cfg_dir = "turbomachinery/axial_stage_2D"
axial_stage2D.cfg_file = "Axial_stage2D.cfg"
axial_stage2D.test_iter = 20
axial_stage2D.test_vals = [1.108159, 1.561741, -2.895046, 2.607615, -2.479708, 3.063739, 106380.000000, 106380.000000, 5.733600, 64.747000]
axial_stage2D.test_vals = [1.090053, 1.550934, -2.895064, 2.607596, -2.479704, 3.063740, 106380.000000, 106380.000000, 5.733600, 64.747000]
axial_stage2D.test_vals_aarch64 = [0.983739, 1.534333, -2.888521, 2.606770, -2.418339, 3.087275, 106380, 106380, 5.7325, 64.711]
test_list.append(axial_stage2D)

Expand All @@ -573,7 +573,7 @@ def main():
transonic_stator_restart.cfg_dir = "turbomachinery/transonic_stator_2D"
transonic_stator_restart.cfg_file = "transonic_stator_restart.cfg"
transonic_stator_restart.test_iter = 20
transonic_stator_restart.test_vals = [-4.357748, -2.480402, -2.075152, 1.737469, -1.440919, 2.727299, -471620.000000, 94.840000, -0.054603]
transonic_stator_restart.test_vals = [-4.357591, -2.480153, -2.075008, 1.737627, -1.441579, 3.240658, -471620.000000, 94.840000, -0.054589]
transonic_stator_restart.test_vals_aarch64 = [-4.357748, -2.480402, -2.075152, 1.737469, -1.440919, 2.727299, -471620.000000, 94.840000, -0.054603]
test_list.append(transonic_stator_restart)

Expand Down Expand Up @@ -657,7 +657,7 @@ def main():
bars_SST_2D.cfg_dir = "sliding_interface/bars_SST_2D"
bars_SST_2D.cfg_file = "bars.cfg"
bars_SST_2D.test_iter = 13
bars_SST_2D.test_vals = [13.000000, 0.268825, -1.700012]
bars_SST_2D.test_vals = [13.000000, 1.167903, -1.660901]
bars_SST_2D.multizone = True
test_list.append(bars_SST_2D)

Expand Down
4 changes: 2 additions & 2 deletions TestCases/hybrid_regression_AD.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def main():
discadj_rans_naca0012_sst.cfg_dir = "disc_adj_rans/naca0012"
discadj_rans_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg"
discadj_rans_naca0012_sst.test_iter = 10
discadj_rans_naca0012_sst.test_vals = [-2.237494, -0.200182, 2.762600, -0.039607]
discadj_rans_naca0012_sst.test_vals = [-2.237413, -0.200125, 2.763200, -0.039612]
test_list.append(discadj_rans_naca0012_sst)

#######################################
Expand Down Expand Up @@ -199,7 +199,7 @@ def main():
discadj_trans_stator.cfg_dir = "disc_adj_turbomachinery/transonic_stator_2D"
discadj_trans_stator.cfg_file = "transonic_stator.cfg"
discadj_trans_stator.test_iter = 79
discadj_trans_stator.test_vals = [79.000000, 0.770094, 0.383191, 0.472139, -0.996477, 2.153270, -4.444323]
discadj_trans_stator.test_vals = [79.000000, 0.770295, 0.383672, 0.472433, -0.996122, 2.153513, -4.444080]
discadj_trans_stator.test_vals_aarch64 = [79, 0.769987, 0.383135, 0.472391, -0.996504, 2.153296, -4.444301]
discadj_trans_stator.enabled_with_tsan = False
test_list.append(discadj_trans_stator)
Expand Down
Loading