From 77c905a32a15ab3b782f93f8668f4e2a6741d4c7 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Fri, 20 Jun 2025 11:28:25 +0100 Subject: [PATCH 01/37] sst under relaxation --- SU2_CFD/include/solvers/CTurbSSTSolver.hpp | 8 +++++ SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 35 ++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp index 5bdc3549aed3..352270f6011a 100644 --- a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp +++ b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp @@ -53,6 +53,14 @@ class CTurbSSTSolver final : public CTurbSolver { CSolver **solver_container, const CConfig *config, unsigned short val_marker); + + /*! + * \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); + public: /*! * \brief Constructor. diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 9fee88d18760..5dc02de36232 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -1019,3 +1019,38 @@ void CTurbSSTSolver::SetUniformInlet(const CConfig* config, unsigned short iMark } } + +void CTurbSSTSolver::ComputeUnderRelaxationFactor(const CConfig *config) { + + const su2double allowableRatio = config->GetUnderRelax_SST(); + + SU2_OMP_FOR_STAT(omp_chunk_size) + /* Loop over the solution update given by relaxing the linear + system for this nonlinear iteration. */ + for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) { + su2double localUnderRelaxation = 1.0; + + for (unsigned short iVar =0; iVar < nVar; iVar++) { + const unsigned long index = iPoint * nVar + iVar; + su2double ratio = fabs(LinSysSol[index])/(fabs(nodes->GetSolution(iPoint, iVar)) + EPS); + /* We impose a limit on the maximum percentage that the + turbulence variables can change over a nonlinear iteration. */ + 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 +} \ No newline at end of file From a210b9cc23d2b9170c8029b138efd8b871f26636 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Fri, 20 Jun 2025 11:29:04 +0100 Subject: [PATCH 02/37] add config options for UR values --- Common/include/CConfig.hpp | 21 +++++++++++++++++++++ Common/src/CConfig.cpp | 6 ++++++ 2 files changed, 27 insertions(+) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index af7aa99033b5..e5d96f3b689d 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -635,6 +635,9 @@ class CConfig { su2double Relaxation_Factor_Adjoint; /*!< \brief Relaxation coefficient for variable updates of adjoint solvers. */ su2double Relaxation_Factor_CHT; /*!< \brief Relaxation coefficient for the update of conjugate heat variables. */ su2double EntropyFix_Coeff; /*!< \brief Entropy fix coefficient. */ + su2double SST_UnderRelaxation_Factor; /*!< \brief UnderRelaxation Factor for SST Turbulent Variables*/ + su2double SA_UnderRelaxation_Factor; /*!< \brief UnderRelaxation Factor for SST Turbulent Variables*/ + su2double Flow_UnderRelaxation_Factor; /*!< \brief UnderRelaxation Factor for SST Turbulent Variables*/ unsigned short nLocationStations, /*!< \brief Number of section cuts to make when outputting mesh and cp . */ nWingStations; /*!< \brief Number of section cuts to make when calculating internal volume. */ su2double Kappa_1st_AdjFlow, /*!< \brief Lax 1st order dissipation coefficient for adjoint flow equations (coarse multigrid levels). */ @@ -4207,6 +4210,24 @@ class CConfig { */ su2double GetRelaxation_Factor_CHT(void) const { return Relaxation_Factor_CHT; } + /*! + * \brief Get the under-relaxation for flow variables density and energy. + * \return under-relaxation for flow variables. + */ + su2double GetUnderRelax_Flow(void) const { return Flow_UnderRelaxation_Factor; } + + /*! + * \brief Get the under-relaxation for SA variable, nu_tilde. + * \return under-relaxation for SA variables. + */ + su2double GetUnderRelax_SA(void) const { return SA_UnderRelaxation_Factor; } + + /*! + * \brief Get the under-relaxation for SST turbulence variables k and omega. + * \return under-relaxation for SST variables. + */ + su2double GetUnderRelax_SST(void) const { return SST_UnderRelaxation_Factor; } + /*! * \brief Get the number of samples used in quasi-Newton methods. */ diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 5fb7220e94e4..0f6dadbfa0a0 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1887,6 +1887,12 @@ void CConfig::SetConfig_Options() { addEnumOption("DISCADJ_LIN_PREC", Kind_DiscAdj_Linear_Prec, Linear_Solver_Prec_Map, ILU); /* DESCRIPTION: Linear solver for the discete adjoint systems */ + addDoubleOption("UR_FACTOR_FLOW", Flow_UnderRelaxation_Factor, 0.2); + /* DESCRIPTION: Under-Relaxation Factor for Density and Energy Variables */ + addDoubleOption("UR_FACTOR_SA", SA_UnderRelaxation_Factor, 0.99); + /* DESCRIPTION: Under-Relaxation Factor for SA Turbulence Variables */ + addDoubleOption("UR_FACTOR_SST", SST_UnderRelaxation_Factor, 1.0); + /* DESCRIPTION: Under-Relaxation Factor for SST Turbulence Variables */ /*!\par CONFIG_CATEGORY: Convergence\ingroup Config*/ /*--- Options related to convergence ---*/ From 5c33dd08c1149e1fa4eed9be97e8738c44bd6367 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Fri, 20 Jun 2025 11:30:14 +0100 Subject: [PATCH 03/37] ur value based on config option (default is same as before) --- SU2_CFD/include/solvers/CFVMFlowSolverBase.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index d3673e1b763a..39b35f7d1c4e 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -558,7 +558,7 @@ void CFVMFlowSolverBase::ComputeUnderRelaxationFactor(const CConfig* confi /* Loop over the solution update given by relaxing the linear system for this nonlinear iteration. */ - const su2double allowableRatio = 0.2; + const su2double allowableRatio = config->GetUnderRelax_Flow(); SU2_OMP_FOR_STAT(omp_chunk_size) for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) { From 3420163c51dcf5711f1c8888b61d0e3fed0a1557 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Fri, 20 Jun 2025 11:30:36 +0100 Subject: [PATCH 04/37] ur value based on config option (default is same as before) --- SU2_CFD/src/solvers/CTurbSASolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CTurbSASolver.cpp b/SU2_CFD/src/solvers/CTurbSASolver.cpp index 4a0d54a95176..a0f3bfe234d4 100644 --- a/SU2_CFD/src/solvers/CTurbSASolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSASolver.cpp @@ -1560,7 +1560,7 @@ void CTurbSASolver::ComputeUnderRelaxationFactor(const CConfig *config) { system for this nonlinear iteration. */ su2double localUnderRelaxation = 1.00; - const su2double allowableRatio = 0.99; + const su2double allowableRatio = config->GetUnderRelax_SA(); SU2_OMP_FOR_STAT(omp_chunk_size) for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) { From fb6bd4cbe74e70f7c6fdd443c0dd8ad4d71cc7f2 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Wed, 25 Jun 2025 12:55:52 +0100 Subject: [PATCH 05/37] stop CD residual accumulation as source --- SU2_CFD/include/numerics/turbulent/turb_sources.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp index 4fa9080e1ad5..37e53807628a 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp @@ -924,7 +924,7 @@ class CSourcePieceWise_TurbSST final : public CNumerics { /*--- Cross diffusion ---*/ - Residual[1] += (1.0 - F1_i) * CDkw_i * Volume; + // Residual[1] += (1.0 - F1_i) * CDkw_i * Volume; /*--- Contribution due to 2D axisymmetric formulation ---*/ From e60372c2205f7e6cada812945414d3d9b2ac245e Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Wed, 25 Jun 2025 12:56:19 +0100 Subject: [PATCH 06/37] option 1 with frozen coefficient jacobians --- .../numerics/turbulent/turb_diffusion.hpp | 31 ++++++++++++++----- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp b/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp index b8edcd9007a7..6af1c6570949 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp @@ -223,28 +223,43 @@ class CAvgGrad_TurbSST final : public CAvgGrad_Scalar { const su2double sigma_kine_j = F1_j*sigma_k1 + (1.0 - F1_j)*sigma_k2; const su2double sigma_omega_i = F1_i*sigma_om1 + (1.0 - F1_i)*sigma_om2; const su2double sigma_omega_j = F1_j*sigma_om1 + (1.0 - F1_j)*sigma_om2; + const su2double lambda_i = 2 * (1 - F1_i) * Density_i * sigma_omega_i / ScalarVar_i[1]; + const su2double lambda_j = 2 * (1 - F1_j) * Density_j * sigma_omega_j / ScalarVar_j[1]; + const su2double lambda_ij = 0.5 * (lambda_i + lambda_j); /*--- Compute mean effective dynamic viscosity ---*/ const su2double diff_i_kine = Laminar_Viscosity_i + sigma_kine_i*Eddy_Viscosity_i; const su2double diff_j_kine = Laminar_Viscosity_j + sigma_kine_j*Eddy_Viscosity_j; - const su2double diff_i_omega = Laminar_Viscosity_i + sigma_omega_i*Eddy_Viscosity_i; - const su2double diff_j_omega = Laminar_Viscosity_j + sigma_omega_j*Eddy_Viscosity_j; + const su2double diff_i_omega = Laminar_Viscosity_i + sigma_omega_i*Eddy_Viscosity_i + lambda_i * ScalarVar_i[0]; + const su2double diff_j_omega = Laminar_Viscosity_j + sigma_omega_j*Eddy_Viscosity_j + lambda_j * ScalarVar_j[0]; + + //non-conservative term: + const su2double diff_omega_t1 = 0.5 * (diff_i_omega + diff_j_omega); + const su2double diff_omega_t2 = -ScalarVar_i[0] * lambda_ij; const su2double diff_kine = 0.5*(diff_i_kine + diff_j_kine); - const su2double diff_omega = 0.5*(diff_i_omega + diff_j_omega); + const su2double diff_omega = diff_omega_t1 + diff_omega_t2; Flux[0] = diff_kine*Proj_Mean_GradScalarVar[0]; Flux[1] = diff_omega*Proj_Mean_GradScalarVar[1]; - /*--- For Jacobians -> Use of TSL (Thin Shear Layer) approx. to compute derivatives of the gradients ---*/ + /*--- For Jacobians -> Use of TSL (Thin Shear Layer) approx. to compute derivatives of the gradients + * Using chain rule for dFlux[1]/dx_{i.j} = d(diff_coef)/dx_{i,j}*Proj + d(Proj)/dx_{i,j}*diff_ceof---*/ + if (implicit) { const su2double proj_on_rho_i = proj_vector_ij/Density_i; - Jacobian_i[0][0] = -diff_kine*proj_on_rho_i; Jacobian_i[0][1] = 0.0; - Jacobian_i[1][0] = 0.0; Jacobian_i[1][1] = -diff_omega*proj_on_rho_i; + const su2double dlambda_domega_i = - (2 * (1 - F1_i) * Density_i * (sigma_omega_i))/pow(ScalarVar_i[1], 2); + Jacobian_i[0][0] = -diff_kine*proj_on_rho_i; + Jacobian_i[0][1] = 0.0; + Jacobian_i[1][0] = 0.0; //dF_w/dk_i + Jacobian_i[1][1] = (diff_omega) * -proj_on_rho_i; //lambda not frozen const su2double proj_on_rho_j = proj_vector_ij/Density_j; - Jacobian_j[0][0] = diff_kine*proj_on_rho_j; Jacobian_j[0][1] = 0.0; - Jacobian_j[1][0] = 0.0; Jacobian_j[1][1] = diff_omega*proj_on_rho_j; + const su2double dlambda_domega_j = - (2 * (1 - F1_j) * Density_j * (sigma_omega_j))/pow(ScalarVar_j[1], 2); + Jacobian_j[0][0] = diff_kine*proj_on_rho_j; + Jacobian_j[0][1] = 0.0; + Jacobian_j[1][0] = 0.0; + Jacobian_j[1][1] = (diff_omega) * proj_on_rho_j; //frozen diff_ceoff } } From 6ecadd59c9757d06c14752b17b0335a16b207fc0 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Wed, 25 Jun 2025 12:56:51 +0100 Subject: [PATCH 07/37] update scalar solver --- SU2_CFD/include/solvers/CScalarSolver.hpp | 1 + SU2_CFD/include/solvers/CScalarSolver.inl | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/SU2_CFD/include/solvers/CScalarSolver.hpp b/SU2_CFD/include/solvers/CScalarSolver.hpp index 0fc61aa7ab25..bbefefc5bf4e 100644 --- a/SU2_CFD/include/solvers/CScalarSolver.hpp +++ b/SU2_CFD/include/solvers/CScalarSolver.hpp @@ -77,6 +77,7 @@ class CScalarSolver : public CSolver { /*--- Edge fluxes for reducer strategy (see the notes in CEulerSolver.hpp). ---*/ CSysVector EdgeFluxes; /*!< \brief Flux across each edge. */ + CSysVector EdgeFluxes_Diff; /*!< \brief Flux difference across ij and ji for non-conservative discretisation. */ /*! * \brief The highest level in the variable hierarchy this solver can safely use. diff --git a/SU2_CFD/include/solvers/CScalarSolver.inl b/SU2_CFD/include/solvers/CScalarSolver.inl index 314354116ff1..f7029e1c9ad9 100644 --- a/SU2_CFD/include/solvers/CScalarSolver.inl +++ b/SU2_CFD/include/solvers/CScalarSolver.inl @@ -348,8 +348,12 @@ void CScalarSolver::SumEdgeFluxes(CGeometry* geometry) { for (auto iEdge : geometry->nodes->GetEdges(iPoint)) { if (iPoint == geometry->edges->GetNode(iEdge, 0)) LinSysRes.AddBlock(iPoint, EdgeFluxes.GetBlock(iEdge)); - else + else { LinSysRes.SubtractBlock(iPoint, EdgeFluxes.GetBlock(iEdge)); + if (EdgeFluxes_Diff.GetLocSize() > 0) { + LinSysRes.SubtractBlock(iPoint, EdgeFluxes_Diff.GetBlock(iEdge)); + } + } } } END_SU2_OMP_FOR From 786b404f4532e3255a8d8bfe84c01cf12a402696 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Wed, 25 Jun 2025 12:57:07 +0100 Subject: [PATCH 08/37] update SST solver --- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 93 +++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 2 deletions(-) diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 5dc02de36232..b29b6622ddec 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -75,8 +75,10 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh LinSysRes.Initialize(nPoint, nPointDomain, nVar, 0.0); System.SetxIsZero(true); - if (ReducerStrategy) + if (ReducerStrategy) { EdgeFluxes.Initialize(geometry->GetnEdge(), geometry->GetnEdge(), nVar, nullptr); + EdgeFluxes_Diff.Initialize(geometry->GetnEdge(), geometry->GetnEdge(), nVar, nullptr); + } /*--- Initialize the BGS residuals in multizone problems. ---*/ if (multizone){ @@ -295,8 +297,95 @@ void CTurbSSTSolver::Viscous_Residual(const unsigned long iEdge, const CGeometry }; /*--- Now instantiate the generic implementation with the functor above. ---*/ + const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); + CFlowVariable* flowNodes = solver_container[FLOW_SOL] ? + su2staticcast_p(solver_container[FLOW_SOL]->GetNodes()) : nullptr; + + /*--- Points in edge ---*/ + auto iPoint = geometry->edges->GetNode(iEdge, 0); + auto jPoint = geometry->edges->GetNode(iEdge, 1); + + /*--- Helper function to compute the flux ---*/ + auto ComputeFlux = [&](unsigned long point_i, unsigned long point_j, const su2double* normal) { + numerics->SetCoord(geometry->nodes->GetCoord(point_i),geometry->nodes->GetCoord(point_j)); + numerics->SetNormal(normal); + + if (flowNodes) { + numerics->SetPrimitive(flowNodes->GetPrimitive(point_i), flowNodes->GetPrimitive(point_j)); + } + + numerics->SetScalarVar(nodes->GetSolution(point_i), nodes->GetSolution(point_j)); + numerics->SetScalarVarGradient(nodes->GetGradient(point_i), nodes->GetGradient(point_j)); + + return numerics->ComputeResidual(config); + }; + + SolverSpecificNumerics(iPoint, jPoint); + + /*--- Compute fluxes and jacobians i->j ---*/ + const su2double* normal = geometry->edges->GetNormal(iEdge); + auto residual_ij = ComputeFlux(iPoint, jPoint, normal); + if (ReducerStrategy) { + EdgeFluxes.SubtractBlock(iEdge, residual_ij); + EdgeFluxes_Diff.SetBlock(iEdge, residual_ij); + if (implicit) { + auto* Block_ij = Jacobian.GetBlock(iPoint, jPoint); + auto* Block_ji = Jacobian.GetBlock(jPoint, iPoint); + + for (int iVar=0; iVari ---*/ + su2double flipped_normal[MAXNDIM]; + for (int iDim=0; iDim Date: Fri, 27 Jun 2025 20:34:38 +0100 Subject: [PATCH 09/37] exact jacobians and store diff coefficient for output --- .../include/numerics/turbulent/turb_diffusion.hpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp b/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp index 6af1c6570949..807998197b35 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp @@ -239,27 +239,30 @@ class CAvgGrad_TurbSST final : public CAvgGrad_Scalar { const su2double diff_kine = 0.5*(diff_i_kine + diff_j_kine); const su2double diff_omega = diff_omega_t1 + diff_omega_t2; + + /*Store coefficients to be output*/ + CNumerics::DiffCoeff_kw[0] = diff_kine; + CNumerics::DiffCoeff_kw[1] = diff_omega; Flux[0] = diff_kine*Proj_Mean_GradScalarVar[0]; Flux[1] = diff_omega*Proj_Mean_GradScalarVar[1]; - /*--- For Jacobians -> Use of TSL (Thin Shear Layer) approx. to compute derivatives of the gradients - * Using chain rule for dFlux[1]/dx_{i.j} = d(diff_coef)/dx_{i,j}*Proj + d(Proj)/dx_{i,j}*diff_ceof---*/ + /*--- For Jacobians -> Use of TSL (Thin Shear Layer) approx. to compute derivatives of the gradients ---*/ if (implicit) { const su2double proj_on_rho_i = proj_vector_ij/Density_i; const su2double dlambda_domega_i = - (2 * (1 - F1_i) * Density_i * (sigma_omega_i))/pow(ScalarVar_i[1], 2); Jacobian_i[0][0] = -diff_kine*proj_on_rho_i; Jacobian_i[0][1] = 0.0; - Jacobian_i[1][0] = 0.0; //dF_w/dk_i - Jacobian_i[1][1] = (diff_omega) * -proj_on_rho_i; //lambda not frozen + Jacobian_i[1][0] = -0.5 * lambda_j * Proj_Mean_GradScalarVar[1]; + Jacobian_i[1][1] = (diff_omega_t1 + diff_omega_t2) * -proj_on_rho_i; const su2double proj_on_rho_j = proj_vector_ij/Density_j; const su2double dlambda_domega_j = - (2 * (1 - F1_j) * Density_j * (sigma_omega_j))/pow(ScalarVar_j[1], 2); Jacobian_j[0][0] = diff_kine*proj_on_rho_j; Jacobian_j[0][1] = 0.0; - Jacobian_j[1][0] = 0.0; - Jacobian_j[1][1] = (diff_omega) * proj_on_rho_j; //frozen diff_ceoff + Jacobian_j[1][0] = 0.5 * lambda_j * Proj_Mean_GradScalarVar[1]; + Jacobian_j[1][1] = 0.5 * (ScalarVar_j[0] - ScalarVar_i[0]) * dlambda_domega_j * Proj_Mean_GradScalarVar[1] + (diff_omega_t1 + diff_omega_t2) * proj_on_rho_j; } } From 64f3623a0ac889bb5e6aa7fc12d80ec02395807c Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Fri, 27 Jun 2025 20:35:15 +0100 Subject: [PATCH 10/37] add diffusion coefficients as volume output --- SU2_CFD/include/numerics/CNumerics.hpp | 3 +++ SU2_CFD/include/variables/CTurbVariable.hpp | 28 ++++++++++++++++++++- SU2_CFD/include/variables/CVariable.hpp | 9 +++++++ SU2_CFD/src/output/CFlowOutput.cpp | 4 +++ SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 4 +++ SU2_CFD/src/variables/CTurbVariable.cpp | 4 +++ 6 files changed, 51 insertions(+), 1 deletion(-) diff --git a/SU2_CFD/include/numerics/CNumerics.hpp b/SU2_CFD/include/numerics/CNumerics.hpp index 2ad25b65f1b6..2f8b75507796 100644 --- a/SU2_CFD/include/numerics/CNumerics.hpp +++ b/SU2_CFD/include/numerics/CNumerics.hpp @@ -190,6 +190,8 @@ class CNumerics { bool bounded_scalar = false; /*!< \brief Flag for bounded scalar problem */ + su2double DiffCoeff_kw[2]; /*!< \brief Storage for diffusion coefficient*/ + public: /*! * \brief Return type used in some "ComputeResidual" overloads to give a @@ -706,6 +708,7 @@ class CNumerics { * \param[in] val_CDkw_i - Value of the cross diffusion at point i. */ virtual void SetCrossDiff(su2double val_CDkw_i) {/* empty */}; + inline su2double GetDiffCoeff_kw(int index) const {return DiffCoeff_kw[index];} /*! * \brief Set the value of the effective intermittency for the LM model. diff --git a/SU2_CFD/include/variables/CTurbVariable.hpp b/SU2_CFD/include/variables/CTurbVariable.hpp index 2e9de32fbb24..b85aa9b4eb0e 100644 --- a/SU2_CFD/include/variables/CTurbVariable.hpp +++ b/SU2_CFD/include/variables/CTurbVariable.hpp @@ -43,7 +43,8 @@ class CTurbVariable : public CScalarVariable { static constexpr size_t MAXNVAR = 2; VectorType turb_index; VectorType intermittency; /*!< \brief Value of the intermittency for the trans. model. */ - + VectorType DC_TKE; /*!< \brief TKE Diffusion Coefficient. */ + VectorType DC_Omega; /*!< \brief Omega Diffusion Coefficient. */ /*! * \brief Constructor of the class. * \param[in] npoint - Number of points/nodes/vertices in the domain. @@ -100,6 +101,31 @@ class CTurbVariable : public CScalarVariable { */ inline void SetIntermittency(unsigned long iPoint, su2double val_intermittency) final { intermittency(iPoint) = val_intermittency; } + /*! + * \brief Set the Diffusion Coefficients of TKE and omega equations. + * \param[in] iPoint - Point index. + * \param[in] val_DC_kw - diffusion coefficient value + */ + inline void SetDiffCoeff_kw(unsigned long iPoint, su2double* val_DC_kw) { + DC_TKE(iPoint) = val_DC_kw[0]; + DC_Omega(iPoint) = val_DC_kw[1]; + } + + /*! + * \brief Get the diffusion coefficient value of TKE. + * \param[in] iPoint - Point index. + */ + inline su2double GetTKE_DC(unsigned long iPoint) const final { + return DC_TKE(iPoint); + } + /*! + * \brief Get the diffusion coefficient value of omega. + * \param[in] iPoint - Point index. + */ + inline su2double GetOmega_DC(unsigned long iPoint) const final { + return DC_Omega(iPoint); + } + /*! * \brief Register eddy viscosity (muT) as Input or Output of an AD recording. * \param[in] input - Boolean whether In- or Output should be registered. diff --git a/SU2_CFD/include/variables/CVariable.hpp b/SU2_CFD/include/variables/CVariable.hpp index 7088d2ea5a6e..125976561233 100644 --- a/SU2_CFD/include/variables/CVariable.hpp +++ b/SU2_CFD/include/variables/CVariable.hpp @@ -1664,6 +1664,15 @@ class CVariable { */ inline virtual su2double GetCrossDiff(unsigned long iPoint) const { return 0.0; } + /*! + * \brief Get the value of the diffusion coefficient of tke and omega equations. + * \param[in] ipoint + * \param[in] val_diff_coeff + */ + inline virtual void SetDiffCoeff_kw(unsigned long iPoint, su2double* val_DiffCoeff) const { } + inline virtual su2double GetTKE_DC(unsigned long iPoint) const {return 0.0; } + inline virtual su2double GetOmega_DC(unsigned long iPoint) const {return 0.0; } + /*! * \brief Get the value of the eddy viscosity. * \return the value of the eddy viscosity. diff --git a/SU2_CFD/src/output/CFlowOutput.cpp b/SU2_CFD/src/output/CFlowOutput.cpp index e9f70fee2768..1889c85a2c93 100644 --- a/SU2_CFD/src/output/CFlowOutput.cpp +++ b/SU2_CFD/src/output/CFlowOutput.cpp @@ -1256,6 +1256,8 @@ void CFlowOutput::SetVolumeOutputFieldsScalarSolution(const CConfig* config){ case TURB_FAMILY::KW: AddVolumeOutput("TKE", "Turb_Kin_Energy", "SOLUTION", "Turbulent kinetic energy"); AddVolumeOutput("DISSIPATION", "Omega", "SOLUTION", "Rate of dissipation"); + AddVolumeOutput("DIFF_COEFF_TKE", "TKE_Diff_Coeff", "SOLUTION", "Diffusion Coefficient for TKE equation"); + AddVolumeOutput("DIFF_COEFF_Omega", "Omega_Diff_Coeff", "SOLUTION", "Diffusion Coefficient for Omega equation"); break; case TURB_FAMILY::NONE: @@ -1536,6 +1538,8 @@ void CFlowOutput::LoadVolumeDataScalar(const CConfig* config, const CSolver* con case TURB_FAMILY::KW: SetVolumeOutputValue("TKE", iPoint, Node_Turb->GetSolution(iPoint, 0)); SetVolumeOutputValue("DISSIPATION", iPoint, Node_Turb->GetSolution(iPoint, 1)); + SetVolumeOutputValue("DIFF_COEFF_TKE", iPoint, Node_Turb->GetTKE_DC(iPoint)); + SetVolumeOutputValue("DIFF_COEFF_Omega", iPoint, Node_Turb->GetOmega_DC(iPoint)); SetVolumeOutputValue("RES_TKE", iPoint, turb_solver->LinSysRes(iPoint, 0)); SetVolumeOutputValue("RES_DISSIPATION", iPoint, turb_solver->LinSysRes(iPoint, 1)); if (limiter) { diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index b29b6622ddec..60ef29257c8c 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -386,6 +386,10 @@ void CTurbSSTSolver::Viscous_Residual(const unsigned long iEdge, const CGeometry } } } + su2double DC_kw[2]; + DC_kw[0] = numerics->GetDiffCoeff_kw(0); + DC_kw[1] = numerics->GetDiffCoeff_kw(1); + nodes->SetDiffCoeff_kw(iPoint, DC_kw); } void CTurbSSTSolver::Source_Residual(CGeometry *geometry, CSolver **solver_container, diff --git a/SU2_CFD/src/variables/CTurbVariable.cpp b/SU2_CFD/src/variables/CTurbVariable.cpp index 25a6a6801ef6..87e18c9a2227 100644 --- a/SU2_CFD/src/variables/CTurbVariable.cpp +++ b/SU2_CFD/src/variables/CTurbVariable.cpp @@ -35,6 +35,10 @@ CTurbVariable::CTurbVariable(unsigned long npoint, unsigned long ndim, unsigned turb_index.resize(nPoint) = su2double(1.0); intermittency.resize(nPoint) = su2double(1.0); + if (TurbModelFamily(config->GetKind_Turb_Model()) == TURB_FAMILY::KW) { + DC_TKE.resize(nPoint) = su2double(1.0); + DC_Omega.resize(nPoint) = su2double(1.0); + } } void CTurbVariable::RegisterEddyViscosity(bool input) { From 7af71d6845b8c5cf1aeeefdd36918e6e1630ded2 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Tue, 8 Jul 2025 13:12:58 +0100 Subject: [PATCH 11/37] naming consistency --- Common/include/CConfig.hpp | 12 ++++++------ Common/src/CConfig.cpp | 12 ++++++------ config_template.cfg | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index cb5086d607f2..66ceff88955b 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -639,9 +639,9 @@ class CConfig { su2double Relaxation_Factor_Adjoint; /*!< \brief Relaxation coefficient for variable updates of adjoint solvers. */ su2double Relaxation_Factor_CHT; /*!< \brief Relaxation coefficient for the update of conjugate heat variables. */ su2double EntropyFix_Coeff; /*!< \brief Entropy fix coefficient. */ - su2double SST_UnderRelaxation_Factor; /*!< \brief UnderRelaxation Factor for SST Turbulent Variables*/ - su2double SA_UnderRelaxation_Factor; /*!< \brief UnderRelaxation Factor for SST Turbulent Variables*/ - su2double Flow_UnderRelaxation_Factor; /*!< \brief UnderRelaxation Factor for SST Turbulent Variables*/ + su2double Max_Update_SST; /*!< \brief Cap for the Under-Relaxation Factor for SST Turbulent Variables*/ + su2double Max_Update_SA; /*!< \brief Cap for the Under-Relaxation Factor for SA Turbulent Variables*/ + su2double Max_Update_Flow; /*!< \brief Cap for the Under-Relaxation Factor for Flow Density and Energy Variables*/ unsigned short nLocationStations, /*!< \brief Number of section cuts to make when outputting mesh and cp . */ nWingStations; /*!< \brief Number of section cuts to make when calculating internal volume. */ su2double Kappa_1st_AdjFlow, /*!< \brief Lax 1st order dissipation coefficient for adjoint flow equations (coarse multigrid levels). */ @@ -4232,19 +4232,19 @@ class CConfig { * \brief Get the under-relaxation for flow variables density and energy. * \return under-relaxation for flow variables. */ - su2double GetUnderRelax_Flow(void) const { return Flow_UnderRelaxation_Factor; } + su2double GetUnderRelax_Flow(void) const { return Max_Update_Flow; } /*! * \brief Get the under-relaxation for SA variable, nu_tilde. * \return under-relaxation for SA variables. */ - su2double GetUnderRelax_SA(void) const { return SA_UnderRelaxation_Factor; } + su2double GetUnderRelax_SA(void) const { return Max_Update_SA; } /*! * \brief Get the under-relaxation for SST turbulence variables k and omega. * \return under-relaxation for SST variables. */ - su2double GetUnderRelax_SST(void) const { return SST_UnderRelaxation_Factor; } + su2double GetUnderRelax_SST(void) const { return Max_Update_SST; } /*! * \brief Get the number of samples used in quasi-Newton methods. diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 1d90a0f35074..596001ad0b09 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1897,12 +1897,12 @@ void CConfig::SetConfig_Options() { addEnumOption("DISCADJ_LIN_PREC", Kind_DiscAdj_Linear_Prec, Linear_Solver_Prec_Map, ILU); /* DESCRIPTION: Linear solver for the discete adjoint systems */ - addDoubleOption("UR_FACTOR_FLOW", Flow_UnderRelaxation_Factor, 0.2); - /* DESCRIPTION: Under-Relaxation Factor for Density and Energy Variables */ - addDoubleOption("UR_FACTOR_SA", SA_UnderRelaxation_Factor, 0.99); - /* DESCRIPTION: Under-Relaxation Factor for SA Turbulence Variables */ - addDoubleOption("UR_FACTOR_SST", SST_UnderRelaxation_Factor, 1.0); - /* DESCRIPTION: Under-Relaxation Factor for SST Turbulence Variables */ + addDoubleOption("MAX_UPDATE_CAP_FLOW", Max_Update_Flow, 0.2); + /* DESCRIPTION: Max value for under-relaxation cap for density and energy variables */ + addDoubleOption("MAX_UPDATE_CAP_SA", Max_Update_SA, 0.99); + /* DESCRIPTION: Max value for under-relaxation cap for SA turbulence variables */ + addDoubleOption("MAX_UPDATE_CAP_SST", Max_Update_SST, 1.0); + /* DESCRIPTION: Max value for under-relaxation cap for SST turbulence variables */ /*!\par CONFIG_CATEGORY: Convergence\ingroup Config*/ /*--- Options related to convergence ---*/ diff --git a/config_template.cfg b/config_template.cfg index 3cb991342235..07bf2474bc87 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -1852,7 +1852,7 @@ CFL_REDUCTION_TURB= 1.0 LOWER_LIMIT_K_FACTOR= 1e-15 LOWER_LIMIT_OMEGA_FACTOR= 1e-5 -% Use numerically computed exact Jacobians for standard SA turbulence model +% Use numerically computed exact Jacobians for turbulence models % Slower per iteration but potentialy more stable and capable of higher CFL USE_ACCURATE_TURB_JACOBIANS= NO % From 7d38d8cc2e2485f1f46f2adda7544d4aca7e441c Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Tue, 8 Jul 2025 13:15:22 +0100 Subject: [PATCH 12/37] more outputs for debugging --- SU2_CFD/include/numerics/CNumerics.hpp | 2 +- SU2_CFD/include/variables/CTurbVariable.hpp | 58 +++++++++++++++++++++ SU2_CFD/include/variables/CVariable.hpp | 4 ++ SU2_CFD/src/output/CFlowOutput.cpp | 14 ++++- SU2_CFD/src/variables/CTurbVariable.cpp | 4 ++ 5 files changed, 80 insertions(+), 2 deletions(-) diff --git a/SU2_CFD/include/numerics/CNumerics.hpp b/SU2_CFD/include/numerics/CNumerics.hpp index 2f8b75507796..1ee3a2c56b6c 100644 --- a/SU2_CFD/include/numerics/CNumerics.hpp +++ b/SU2_CFD/include/numerics/CNumerics.hpp @@ -190,7 +190,7 @@ class CNumerics { bool bounded_scalar = false; /*!< \brief Flag for bounded scalar problem */ - su2double DiffCoeff_kw[2]; /*!< \brief Storage for diffusion coefficient*/ + su2double DiffCoeff_kw[6]; /*!< \brief Storage for diffusion coefficient*/ public: /*! diff --git a/SU2_CFD/include/variables/CTurbVariable.hpp b/SU2_CFD/include/variables/CTurbVariable.hpp index b85aa9b4eb0e..8dc37e9910c4 100644 --- a/SU2_CFD/include/variables/CTurbVariable.hpp +++ b/SU2_CFD/include/variables/CTurbVariable.hpp @@ -45,6 +45,27 @@ class CTurbVariable : public CScalarVariable { VectorType intermittency; /*!< \brief Value of the intermittency for the trans. model. */ VectorType DC_TKE; /*!< \brief TKE Diffusion Coefficient. */ VectorType DC_Omega; /*!< \brief Omega Diffusion Coefficient. */ + VectorType DC_OmegaT1; + VectorType DC_OmegaT2; + VectorType DC_OmegaT3; + VectorType DC_Omega_kc; + VectorType DC_Omega_so2i; + VectorType DC_Omega_Coi; + VectorType DC_Omega_Coj; + VectorType DC_Omega_F1i; + VectorType DC_Omega_F1j; + VectorType DC_Omega_so2j; + VectorType DC_Omega_mui; + VectorType DC_Omega_muj; + VectorType DC_Omega_muti; + VectorType DC_Omega_mutj; + VectorType DC_Omega_rhoi; + VectorType DC_Omega_rhoj; + VectorType DC_Omega_ki; + VectorType DC_Omega_kj; + VectorType DC_Omega_wi; + VectorType DC_Omega_wj; + /*! * \brief Constructor of the class. * \param[in] npoint - Number of points/nodes/vertices in the domain. @@ -109,6 +130,10 @@ class CTurbVariable : public CScalarVariable { inline void SetDiffCoeff_kw(unsigned long iPoint, su2double* val_DC_kw) { DC_TKE(iPoint) = val_DC_kw[0]; DC_Omega(iPoint) = val_DC_kw[1]; + DC_OmegaT1(iPoint) = val_DC_kw[2]; + DC_OmegaT2(iPoint) = val_DC_kw[3]; + DC_OmegaT3(iPoint) = val_DC_kw[4]; + DC_Omega_kc(iPoint) = val_DC_kw[5]; } /*! @@ -118,6 +143,7 @@ class CTurbVariable : public CScalarVariable { inline su2double GetTKE_DC(unsigned long iPoint) const final { return DC_TKE(iPoint); } + /*! * \brief Get the diffusion coefficient value of omega. * \param[in] iPoint - Point index. @@ -125,6 +151,38 @@ class CTurbVariable : public CScalarVariable { inline su2double GetOmega_DC(unsigned long iPoint) const final { return DC_Omega(iPoint); } + + /*! + * \brief Get omega diffusion coefficient Term 1. + * \param[in] iPoint - Point index. + */ + inline su2double GetOmega_DCT1(unsigned long iPoint) const final { + return DC_OmegaT1(iPoint); + } + + /*! + * \brief Get omega diffusion coefficient Term 2. + * \param[in] iPoint - Point index. + */ + inline su2double GetOmega_DCT2(unsigned long iPoint) const final { + return DC_OmegaT2(iPoint); + } + + /*! + * \brief Get omega diffusion coefficient Term 3. + * \param[in] iPoint - Point index. + */ + inline su2double GetOmega_DCT3(unsigned long iPoint) const final { + return DC_OmegaT3(iPoint); + } + + /*! + * \brief Get the clip value kc used in omega diffusion coeffient. + * \param[in] iPoint - Point index. + */ + inline su2double GetOmega_DC_kc(unsigned long iPoint) const final { + return DC_Omega_kc(iPoint); + } /*! * \brief Register eddy viscosity (muT) as Input or Output of an AD recording. diff --git a/SU2_CFD/include/variables/CVariable.hpp b/SU2_CFD/include/variables/CVariable.hpp index 39983fcba78d..554f632f7a8e 100644 --- a/SU2_CFD/include/variables/CVariable.hpp +++ b/SU2_CFD/include/variables/CVariable.hpp @@ -1672,6 +1672,10 @@ class CVariable { inline virtual void SetDiffCoeff_kw(unsigned long iPoint, su2double* val_DiffCoeff) const { } inline virtual su2double GetTKE_DC(unsigned long iPoint) const {return 0.0; } inline virtual su2double GetOmega_DC(unsigned long iPoint) const {return 0.0; } + inline virtual su2double GetOmega_DCT1(unsigned long iPoint) const {return 0.0; } + inline virtual su2double GetOmega_DCT2(unsigned long iPoint) const {return 0.0; } + inline virtual su2double GetOmega_DCT3(unsigned long iPoint) const {return 0.0; } + inline virtual su2double GetOmega_DC_kc(unsigned long iPoint) const {return 0.0; } /*! * \brief Get the value of the eddy viscosity. diff --git a/SU2_CFD/src/output/CFlowOutput.cpp b/SU2_CFD/src/output/CFlowOutput.cpp index 1889c85a2c93..7a7c8aba263d 100644 --- a/SU2_CFD/src/output/CFlowOutput.cpp +++ b/SU2_CFD/src/output/CFlowOutput.cpp @@ -1257,7 +1257,13 @@ void CFlowOutput::SetVolumeOutputFieldsScalarSolution(const CConfig* config){ AddVolumeOutput("TKE", "Turb_Kin_Energy", "SOLUTION", "Turbulent kinetic energy"); AddVolumeOutput("DISSIPATION", "Omega", "SOLUTION", "Rate of dissipation"); AddVolumeOutput("DIFF_COEFF_TKE", "TKE_Diff_Coeff", "SOLUTION", "Diffusion Coefficient for TKE equation"); - AddVolumeOutput("DIFF_COEFF_Omega", "Omega_Diff_Coeff", "SOLUTION", "Diffusion Coefficient for Omega equation"); + AddVolumeOutput("DIFF_COEFF_Omega", "Omega_Diff_Coeff", "SOLUTION", "Toal Diffusion Coefficient for Omega equation"); + AddVolumeOutput("DIFF_COEFF_OmegaT1", "w_DiffCoeff_T1", "SOLUTION", "Term 1 in Diffusion Coefficient for Omega equation"); + AddVolumeOutput("DIFF_COEFF_OmegaT2", "w_DiffCoeff_T2", "SOLUTION", "Term 2 in Diffusion Coefficient for Omega equation"); + AddVolumeOutput("DIFF_COEFF_OmegaT3", "w_DiffCoeff_T3", "SOLUTION", "Term 3 in Diffusion Coefficient for Omega equation"); + AddVolumeOutput("DIFF_COEFF_Omegakc", "w_DiffCoeff_kc", "SOLUTION", "kc value in Diffusion Coefficient for Omega equation"); + AddVolumeOutput("CDkw", "CDkw", "SOLUTION", "Cross-Diffusion term"); + AddVolumeOutput("F1", "F1", "SOLUTION", "F1 blending function"); break; case TURB_FAMILY::NONE: @@ -1540,6 +1546,12 @@ void CFlowOutput::LoadVolumeDataScalar(const CConfig* config, const CSolver* con SetVolumeOutputValue("DISSIPATION", iPoint, Node_Turb->GetSolution(iPoint, 1)); SetVolumeOutputValue("DIFF_COEFF_TKE", iPoint, Node_Turb->GetTKE_DC(iPoint)); SetVolumeOutputValue("DIFF_COEFF_Omega", iPoint, Node_Turb->GetOmega_DC(iPoint)); + SetVolumeOutputValue("CDkw", iPoint, Node_Turb->GetCrossDiff(iPoint)); + SetVolumeOutputValue("F1", iPoint, Node_Turb->GetF1blending(iPoint)); + SetVolumeOutputValue("DIFF_COEFF_OmegaT1", iPoint, Node_Turb->GetOmega_DCT1(iPoint)); + SetVolumeOutputValue("DIFF_COEFF_OmegaT2", iPoint, Node_Turb->GetOmega_DCT2(iPoint)); + SetVolumeOutputValue("DIFF_COEFF_OmegaT3", iPoint, Node_Turb->GetOmega_DCT3(iPoint)); + SetVolumeOutputValue("DIFF_COEFF_Omegakc", iPoint, Node_Turb->GetOmega_DC_kc(iPoint)); SetVolumeOutputValue("RES_TKE", iPoint, turb_solver->LinSysRes(iPoint, 0)); SetVolumeOutputValue("RES_DISSIPATION", iPoint, turb_solver->LinSysRes(iPoint, 1)); if (limiter) { diff --git a/SU2_CFD/src/variables/CTurbVariable.cpp b/SU2_CFD/src/variables/CTurbVariable.cpp index 87e18c9a2227..f0216ccb7ea5 100644 --- a/SU2_CFD/src/variables/CTurbVariable.cpp +++ b/SU2_CFD/src/variables/CTurbVariable.cpp @@ -38,6 +38,10 @@ CTurbVariable::CTurbVariable(unsigned long npoint, unsigned long ndim, unsigned if (TurbModelFamily(config->GetKind_Turb_Model()) == TURB_FAMILY::KW) { DC_TKE.resize(nPoint) = su2double(1.0); DC_Omega.resize(nPoint) = su2double(1.0); + DC_OmegaT1.resize(nPoint) = su2double(1.0); + DC_OmegaT2.resize(nPoint) = su2double(1.0); + DC_OmegaT3.resize(nPoint) = su2double(1.0); + DC_Omega_kc.resize(nPoint) = su2double(1.0); } } From 02878dde078996e4601cdae07f1323339ae3341d Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Tue, 8 Jul 2025 13:15:54 +0100 Subject: [PATCH 13/37] cleanup --- .../numerics/turbulent/turb_diffusion.hpp | 77 +++++++++++++------ SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 59 +++++++------- 2 files changed, 84 insertions(+), 52 deletions(-) diff --git a/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp b/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp index e0894c27666f..3d719282e205 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp @@ -240,6 +240,7 @@ class CAvgGrad_TurbSST final : public CAvgGrad_Scalar { const su2double sigma_k2; const su2double sigma_om1; const su2double sigma_om2; + const bool use_accurate_jacobians; su2double F1_i, F1_j; /*!< \brief Menter's first blending function */ @@ -262,46 +263,75 @@ class CAvgGrad_TurbSST final : public CAvgGrad_Scalar { const su2double sigma_kine_j = F1_j*sigma_k1 + (1.0 - F1_j)*sigma_k2; const su2double sigma_omega_i = F1_i*sigma_om1 + (1.0 - F1_i)*sigma_om2; const su2double sigma_omega_j = F1_j*sigma_om1 + (1.0 - F1_j)*sigma_om2; - const su2double lambda_i = 2 * (1 - F1_i) * Density_i * sigma_omega_i / ScalarVar_i[1]; - const su2double lambda_j = 2 * (1 - F1_j) * Density_j * sigma_omega_j / ScalarVar_j[1]; - const su2double lambda_ij = 0.5 * (lambda_i + lambda_j); /*--- Compute mean effective dynamic viscosity ---*/ const su2double diff_i_kine = Laminar_Viscosity_i + sigma_kine_i*Eddy_Viscosity_i; const su2double diff_j_kine = Laminar_Viscosity_j + sigma_kine_j*Eddy_Viscosity_j; - const su2double diff_i_omega = Laminar_Viscosity_i + sigma_omega_i*Eddy_Viscosity_i + lambda_i * ScalarVar_i[0]; - const su2double diff_j_omega = Laminar_Viscosity_j + sigma_omega_j*Eddy_Viscosity_j + lambda_j * ScalarVar_j[0]; - - //non-conservative term: - const su2double diff_omega_t1 = 0.5 * (diff_i_omega + diff_j_omega); - const su2double diff_omega_t2 = -ScalarVar_i[0] * lambda_ij; + const su2double diff_i_omega = Laminar_Viscosity_i + sigma_omega_i*Eddy_Viscosity_i; + const su2double diff_j_omega = Laminar_Viscosity_j + sigma_omega_j*Eddy_Viscosity_j; const su2double diff_kine = 0.5*(diff_i_kine + diff_j_kine); - const su2double diff_omega = diff_omega_t1 + diff_omega_t2; + const su2double diff_omega_T1 = 0.5*(diff_i_omega + diff_j_omega); + + /*--- We aim to treat the cross-diffusion as a diffusion treat rather than a source term. + * Re-writing the cross-diffusion contribution as λ ∇k ∇ω, where λ = (2 (1- F1) ρ σ_ω2)/ ω + * and expanding using the product rule gives: ∇(λk∇ω) - k ∇(λ∇ω). + * Discretising using FVM, gives a diffusion coefficient of: (λk)_ij - k_i λ_ij. ---*/ + + const su2double lambda_i = 2 * (1 - F1_i) * Density_i * sigma_omega_i / ScalarVar_i[1]; + const su2double lambda_j = 2 * (1 - F1_j) * Density_j * sigma_omega_j / ScalarVar_j[1]; + const su2double lambda_ij = 0.5 * (lambda_i + lambda_j); + const su2double k_ij = 0.5 * (ScalarVar_i[0] + ScalarVar_j[0]); + + const su2double diff_omega_T2 = lambda_ij * k_ij; - /*Store coefficients to be output*/ + /*--- clipping k_c: if clipped to this, 0 diffusion is possible which greatly affects + * convergence and accuracy. clipping to k_ij is better if needed, testing showed clipping + * is not required. REMOVE LATER if more testing shows it is redundant ---*/ + const su2double mu_ij = 0.5 * (Laminar_Viscosity_i + Laminar_Viscosity_j); + const su2double mut_ij = 0.5 * (Eddy_Viscosity_i + Eddy_Viscosity_j); + const su2double Coi = 2 * sigma_omega_i * (1 - F1_i); + const su2double Coj = 2 * sigma_omega_j * (1 - F1_j); + const su2double Coij = 0.5 * (Coi + Coj); + const su2double k_clip = (diff_omega_T1 + Coij*mu_ij)/(Coij * mut_ij/k_ij); // + + const su2double diff_omega_T3 = -ScalarVar_i[0] * lambda_ij; + + const su2double diff_omega = diff_omega_T1 + diff_omega_T2 + diff_omega_T3; + + /* Store some variables for debugging, REMOVE LATER.*/ CNumerics::DiffCoeff_kw[0] = diff_kine; CNumerics::DiffCoeff_kw[1] = diff_omega; - + CNumerics::DiffCoeff_kw[2] = diff_omega_T1; + CNumerics::DiffCoeff_kw[3] = diff_omega_T2; + CNumerics::DiffCoeff_kw[4] = diff_omega_T3; + CNumerics::DiffCoeff_kw[5] = k_clip; + Flux[0] = diff_kine*Proj_Mean_GradScalarVar[0]; - Flux[1] = diff_omega*Proj_Mean_GradScalarVar[1]; + Flux[1] = (diff_omega_T1 + diff_omega_T2 + diff_omega_T3)*Proj_Mean_GradScalarVar[1]; /*--- For Jacobians -> Use of TSL (Thin Shear Layer) approx. to compute derivatives of the gradients ---*/ - + //Using Frozen Coefficient Jacobians, for stability during debugging. if (implicit) { const su2double proj_on_rho_i = proj_vector_ij/Density_i; - const su2double dlambda_domega_i = - (2 * (1 - F1_i) * Density_i * (sigma_omega_i))/pow(ScalarVar_i[1], 2); - Jacobian_i[0][0] = -diff_kine*proj_on_rho_i; + const su2double proj_on_rho_j = proj_vector_ij/Density_j; + Jacobian_i[0][0] = -diff_kine*proj_on_rho_i; Jacobian_i[0][1] = 0.0; + Jacobian_i[1][0] = 0.0; Jacobian_i[1][1] = -diff_omega*proj_on_rho_i; + + Jacobian_j[0][0] = diff_kine*proj_on_rho_j; Jacobian_j[0][1] = 0.0; + Jacobian_j[1][0] = 0.0; Jacobian_j[1][1] = diff_omega*proj_on_rho_j; + + if (use_accurate_jacobians) { + Jacobian_i[0][0] = -diff_kine*proj_on_rho_i; Jacobian_i[0][1] = 0.0; - Jacobian_i[1][0] = -0.5 * lambda_j * Proj_Mean_GradScalarVar[1]; - Jacobian_i[1][1] = (diff_omega_t1 + diff_omega_t2) * -proj_on_rho_i; + Jacobian_i[1][0] = -lambda_ij/2 * Proj_Mean_GradScalarVar[1]; + Jacobian_i[1][1] = (-k_ij+ScalarVar_i[0]) * (lambda_i/(2*ScalarVar_i[1]*ScalarVar_i[1])) * Proj_Mean_GradScalarVar[1] + diff_omega*-proj_on_rho_i ; - const su2double proj_on_rho_j = proj_vector_ij/Density_j; - const su2double dlambda_domega_j = - (2 * (1 - F1_j) * Density_j * (sigma_omega_j))/pow(ScalarVar_j[1], 2); Jacobian_j[0][0] = diff_kine*proj_on_rho_j; Jacobian_j[0][1] = 0.0; - Jacobian_j[1][0] = 0.5 * lambda_j * Proj_Mean_GradScalarVar[1]; - Jacobian_j[1][1] = 0.5 * (ScalarVar_j[0] - ScalarVar_i[0]) * dlambda_domega_j * Proj_Mean_GradScalarVar[1] + (diff_omega_t1 + diff_omega_t2) * proj_on_rho_j; + Jacobian_j[1][0] = lambda_ij/2 * Proj_Mean_GradScalarVar[1]; + Jacobian_j[1][1] = (-k_ij+ScalarVar_i[0]) * (lambda_j/(2*ScalarVar_j[1]*ScalarVar_j[1])) * Proj_Mean_GradScalarVar[1] + diff_omega*proj_on_rho_j; + } } } @@ -320,7 +350,8 @@ class CAvgGrad_TurbSST final : public CAvgGrad_Scalar { sigma_k1(constants[0]), sigma_k2(constants[1]), sigma_om1(constants[2]), - sigma_om2(constants[3]) { + sigma_om2(constants[3]), + use_accurate_jacobians(config->GetUse_Accurate_Turb_Jacobians()) { } /*! diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 60ef29257c8c..48b449e6e12d 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -77,7 +77,7 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh if (ReducerStrategy) { EdgeFluxes.Initialize(geometry->GetnEdge(), geometry->GetnEdge(), nVar, nullptr); - EdgeFluxes_Diff.Initialize(geometry->GetnEdge(), geometry->GetnEdge(), nVar, nullptr); + EdgeFluxesDiff.Initialize(geometry->GetnEdge(), geometry->GetnEdge(), nVar, nullptr); } /*--- Initialize the BGS residuals in multizone problems. ---*/ @@ -325,26 +325,27 @@ void CTurbSSTSolver::Viscous_Residual(const unsigned long iEdge, const CGeometry /*--- Compute fluxes and jacobians i->j ---*/ const su2double* normal = geometry->edges->GetNormal(iEdge); auto residual_ij = ComputeFlux(iPoint, jPoint, normal); + + JacobianScalarType *Block_ii = nullptr, *Block_ij = nullptr, *Block_ji = nullptr, *Block_jj = nullptr; + if (implicit) { + Jacobian.GetBlocks(iEdge, iPoint, jPoint, Block_ii, Block_ij, Block_ji, Block_jj); + } if (ReducerStrategy) { EdgeFluxes.SubtractBlock(iEdge, residual_ij); - EdgeFluxes_Diff.SetBlock(iEdge, residual_ij); + EdgeFluxesDiff.SetBlock(iEdge, residual_ij); if (implicit) { - auto* Block_ij = Jacobian.GetBlock(iPoint, jPoint); - auto* Block_ji = Jacobian.GetBlock(jPoint, iPoint); - + /*--- For the reducer strategy the Jacobians are averaged for simplicity. ---*/ + assert(nVar == 2); for (int iVar=0; iVari ---*/ su2double flipped_normal[MAXNDIM]; - for (int iDim=0; iDimGetDiffCoeff_kw(0); DC_kw[1] = numerics->GetDiffCoeff_kw(1); + DC_kw[2] = numerics->GetDiffCoeff_kw(2); + DC_kw[3] = numerics->GetDiffCoeff_kw(3); + DC_kw[4] = numerics->GetDiffCoeff_kw(4); + DC_kw[5] = numerics->GetDiffCoeff_kw(5); + nodes->SetDiffCoeff_kw(iPoint, DC_kw); } From 25ef2c88f2c3252c647e25f364b992179c8a4943 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Thu, 10 Jul 2025 12:01:11 +0100 Subject: [PATCH 14/37] option 2 discretisation --- .../numerics/turbulent/turb_diffusion.hpp | 51 ++++++++----------- 1 file changed, 22 insertions(+), 29 deletions(-) diff --git a/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp b/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp index 3d719282e205..4a9aff95dacb 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp @@ -274,28 +274,18 @@ class CAvgGrad_TurbSST final : public CAvgGrad_Scalar { const su2double diff_omega_T1 = 0.5*(diff_i_omega + diff_j_omega); /*--- We aim to treat the cross-diffusion as a diffusion treat rather than a source term. - * Re-writing the cross-diffusion contribution as λ ∇k ∇ω, where λ = (2 (1- F1) ρ σ_ω2)/ ω - * and expanding using the product rule gives: ∇(λk∇ω) - k ∇(λ∇ω). - * Discretising using FVM, gives a diffusion coefficient of: (λk)_ij - k_i λ_ij. ---*/ + * Re-writing the cross-diffusion contribution as λ/w ∇w ∇k, where λ = (2 (1- F1) ρ σ_ω2) + * and expanding using the product rule for divergence theorem gives: ∇(λ∇k) - w ∇(λ∇k). + * Discretising using FVM, gives: (λ_dw)_ij ∇k - w ∇(λ∇k); where λ_dw is λ_ij/w_ij. ---*/ - const su2double lambda_i = 2 * (1 - F1_i) * Density_i * sigma_omega_i / ScalarVar_i[1]; - const su2double lambda_j = 2 * (1 - F1_j) * Density_j * sigma_omega_j / ScalarVar_j[1]; + const su2double lambda_i = 2 * (1 - F1_i) * Density_i * sigma_omega_i; + const su2double lambda_j = 2 * (1 - F1_j) * Density_j * sigma_omega_j; const su2double lambda_ij = 0.5 * (lambda_i + lambda_j); - const su2double k_ij = 0.5 * (ScalarVar_i[0] + ScalarVar_j[0]); + const su2double w_ij = 0.5 * (ScalarVar_i[1] + ScalarVar_j[1]); - const su2double diff_omega_T2 = lambda_ij * k_ij; + const su2double diff_omega_T2 = lambda_ij; - /*--- clipping k_c: if clipped to this, 0 diffusion is possible which greatly affects - * convergence and accuracy. clipping to k_ij is better if needed, testing showed clipping - * is not required. REMOVE LATER if more testing shows it is redundant ---*/ - const su2double mu_ij = 0.5 * (Laminar_Viscosity_i + Laminar_Viscosity_j); - const su2double mut_ij = 0.5 * (Eddy_Viscosity_i + Eddy_Viscosity_j); - const su2double Coi = 2 * sigma_omega_i * (1 - F1_i); - const su2double Coj = 2 * sigma_omega_j * (1 - F1_j); - const su2double Coij = 0.5 * (Coi + Coj); - const su2double k_clip = (diff_omega_T1 + Coij*mu_ij)/(Coij * mut_ij/k_ij); // - - const su2double diff_omega_T3 = -ScalarVar_i[0] * lambda_ij; + const su2double diff_omega_T3 = -ScalarVar_i[1] * lambda_ij/w_ij; const su2double diff_omega = diff_omega_T1 + diff_omega_T2 + diff_omega_T3; @@ -305,32 +295,35 @@ class CAvgGrad_TurbSST final : public CAvgGrad_Scalar { CNumerics::DiffCoeff_kw[2] = diff_omega_T1; CNumerics::DiffCoeff_kw[3] = diff_omega_T2; CNumerics::DiffCoeff_kw[4] = diff_omega_T3; - CNumerics::DiffCoeff_kw[5] = k_clip; + CNumerics::DiffCoeff_kw[5] = lambda_ij; Flux[0] = diff_kine*Proj_Mean_GradScalarVar[0]; - Flux[1] = (diff_omega_T1 + diff_omega_T2 + diff_omega_T3)*Proj_Mean_GradScalarVar[1]; + Flux[1] = diff_omega_T1*Proj_Mean_GradScalarVar[1] + (diff_omega_T2 + diff_omega_T3)*Proj_Mean_GradScalarVar[0]; /*--- For Jacobians -> Use of TSL (Thin Shear Layer) approx. to compute derivatives of the gradients ---*/ - //Using Frozen Coefficient Jacobians, for stability during debugging. if (implicit) { const su2double proj_on_rho_i = proj_vector_ij/Density_i; const su2double proj_on_rho_j = proj_vector_ij/Density_j; - Jacobian_i[0][0] = -diff_kine*proj_on_rho_i; Jacobian_i[0][1] = 0.0; - Jacobian_i[1][0] = 0.0; Jacobian_i[1][1] = -diff_omega*proj_on_rho_i; + Jacobian_i[0][0] = -diff_kine*proj_on_rho_i; + Jacobian_i[0][1] = 0.0; + Jacobian_i[1][0] = (diff_omega_T2+diff_omega_T3)*-proj_on_rho_i; + Jacobian_i[1][1] = -diff_omega_T1*proj_on_rho_i; - Jacobian_j[0][0] = diff_kine*proj_on_rho_j; Jacobian_j[0][1] = 0.0; - Jacobian_j[1][0] = 0.0; Jacobian_j[1][1] = diff_omega*proj_on_rho_j; + Jacobian_j[0][0] = diff_kine*proj_on_rho_j; + Jacobian_j[0][1] = 0.0; + Jacobian_j[1][0] = (diff_omega_T2+diff_omega_T3)*proj_on_rho_j; + Jacobian_j[1][1] = diff_omega_T1*proj_on_rho_j; if (use_accurate_jacobians) { Jacobian_i[0][0] = -diff_kine*proj_on_rho_i; Jacobian_i[0][1] = 0.0; - Jacobian_i[1][0] = -lambda_ij/2 * Proj_Mean_GradScalarVar[1]; - Jacobian_i[1][1] = (-k_ij+ScalarVar_i[0]) * (lambda_i/(2*ScalarVar_i[1]*ScalarVar_i[1])) * Proj_Mean_GradScalarVar[1] + diff_omega*-proj_on_rho_i ; + Jacobian_i[1][0] = (diff_omega_T2 + diff_omega_T3)*-proj_on_rho_i; + Jacobian_i[1][1] = -proj_on_rho_i * diff_omega_T1 - 2*lambda_ij*ScalarVar_j[1]/pow(ScalarVar_i[1]+ScalarVar_j[1],2) * Proj_Mean_GradScalarVar[0]; Jacobian_j[0][0] = diff_kine*proj_on_rho_j; Jacobian_j[0][1] = 0.0; - Jacobian_j[1][0] = lambda_ij/2 * Proj_Mean_GradScalarVar[1]; - Jacobian_j[1][1] = (-k_ij+ScalarVar_i[0]) * (lambda_j/(2*ScalarVar_j[1]*ScalarVar_j[1])) * Proj_Mean_GradScalarVar[1] + diff_omega*proj_on_rho_j; + Jacobian_j[1][0] = (diff_omega_T2 + diff_omega_T3)*proj_on_rho_j; + Jacobian_j[1][1] = proj_on_rho_j * diff_omega_T1 + 2*lambda_ij*ScalarVar_i[1]/pow(ScalarVar_i[1]+ScalarVar_j[1],2) * Proj_Mean_GradScalarVar[0]; } } } From 177985cde8cb7a769eaa3a7813316441356d7a12 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Fri, 11 Jul 2025 10:30:44 +0100 Subject: [PATCH 15/37] apply suggestions --- .../numerics/turbulent/turb_sources.hpp | 4 +-- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 26 ++++++------------- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp index 11af3f6e7245..bcc24457279b 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp @@ -911,9 +911,7 @@ class CSourcePieceWise_TurbSST final : public CNumerics { Residual[0] -= dk * Volume; Residual[1] -= dw * Volume; - /*--- Cross diffusion ---*/ - - // Residual[1] += (1.0 - F1_i) * CDkw_i * Volume; + /*--- Cross diffusion is included in the viscous fluxes, discretisation in turb_diffusion.hpp ---*/ /*--- Contribution due to 2D axisymmetric formulation ---*/ diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 48b449e6e12d..d10d9677610f 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -290,13 +290,6 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai void CTurbSSTSolver::Viscous_Residual(const unsigned long iEdge, const CGeometry* geometry, CSolver** solver_container, CNumerics* numerics, const CConfig* config) { - /*--- Define an object to set solver specific numerics contribution. ---*/ - auto SolverSpecificNumerics = [&](unsigned long iPoint, unsigned long jPoint) { - /*--- Menter's first blending function (only SST)---*/ - numerics->SetF1blending(nodes->GetF1blending(iPoint), nodes->GetF1blending(jPoint)); - }; - - /*--- Now instantiate the generic implementation with the functor above. ---*/ const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); CFlowVariable* flowNodes = solver_container[FLOW_SOL] ? su2staticcast_p(solver_container[FLOW_SOL]->GetNodes()) : nullptr; @@ -306,22 +299,23 @@ void CTurbSSTSolver::Viscous_Residual(const unsigned long iEdge, const CGeometry auto jPoint = geometry->edges->GetNode(iEdge, 1); /*--- Helper function to compute the flux ---*/ - auto ComputeFlux = [&](unsigned long point_i, unsigned long point_j, const su2double* normal) { - numerics->SetCoord(geometry->nodes->GetCoord(point_i),geometry->nodes->GetCoord(point_j)); + auto ComputeFlux = [&](unsigned long iPoint, unsigned long jPoint, const su2double* normal) { + numerics->SetCoord(geometry->nodes->GetCoord(iPoint),geometry->nodes->GetCoord(jPoint)); numerics->SetNormal(normal); if (flowNodes) { - numerics->SetPrimitive(flowNodes->GetPrimitive(point_i), flowNodes->GetPrimitive(point_j)); + numerics->SetPrimitive(flowNodes->GetPrimitive(iPoint), flowNodes->GetPrimitive(jPoint)); } - numerics->SetScalarVar(nodes->GetSolution(point_i), nodes->GetSolution(point_j)); - numerics->SetScalarVarGradient(nodes->GetGradient(point_i), nodes->GetGradient(point_j)); + /*--- Menter's first blending function (only SST)---*/ + numerics->SetF1blending(nodes->GetF1blending(iPoint), nodes->GetF1blending(jPoint)); + + numerics->SetScalarVar(nodes->GetSolution(iPoint), nodes->GetSolution(jPoint)); + numerics->SetScalarVarGradient(nodes->GetGradient(iPoint), nodes->GetGradient(jPoint)); return numerics->ComputeResidual(config); }; - SolverSpecificNumerics(iPoint, jPoint); - /*--- Compute fluxes and jacobians i->j ---*/ const su2double* normal = geometry->edges->GetNormal(iEdge); auto residual_ij = ComputeFlux(iPoint, jPoint, normal); @@ -335,7 +329,6 @@ void CTurbSSTSolver::Viscous_Residual(const unsigned long iEdge, const CGeometry EdgeFluxesDiff.SetBlock(iEdge, residual_ij); if (implicit) { /*--- For the reducer strategy the Jacobians are averaged for simplicity. ---*/ - assert(nVar == 2); for (int iVar=0; iVar Date: Wed, 16 Jul 2025 14:41:25 +0100 Subject: [PATCH 16/37] refactor turb solvers --- .../numerics/turbulent/turb_diffusion.hpp | 24 ++-- SU2_CFD/include/solvers/CTurbSolver.hpp | 109 +++++++++++++++++ SU2_CFD/src/solvers/CTurbSASolver.cpp | 95 +-------------- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 113 ++---------------- SU2_CFD/src/solvers/CTurbSolver.cpp | 37 ++++++ 5 files changed, 169 insertions(+), 209 deletions(-) diff --git a/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp b/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp index 4a9aff95dacb..1650402b034a 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp @@ -273,10 +273,10 @@ class CAvgGrad_TurbSST final : public CAvgGrad_Scalar { const su2double diff_kine = 0.5*(diff_i_kine + diff_j_kine); const su2double diff_omega_T1 = 0.5*(diff_i_omega + diff_j_omega); - /*--- We aim to treat the cross-diffusion as a diffusion treat rather than a source term. + /*--- We aim to treat the cross-diffusion as a diffusion term rather than a source term. * Re-writing the cross-diffusion contribution as λ/w ∇w ∇k, where λ = (2 (1- F1) ρ σ_ω2) - * and expanding using the product rule for divergence theorem gives: ∇(λ∇k) - w ∇(λ∇k). - * Discretising using FVM, gives: (λ_dw)_ij ∇k - w ∇(λ∇k); where λ_dw is λ_ij/w_ij. ---*/ + * and expanding using the product rule for divergence theorem gives: ∇(w λ/w ∇k) - w ∇(λ/w ∇k). + * Discretising using FVM, gives: (λ)_ij ∇k - w_c (λ/w)_ij ∇k. where w_c is the cell centre value ---*/ const su2double lambda_i = 2 * (1 - F1_i) * Density_i * sigma_omega_i; const su2double lambda_j = 2 * (1 - F1_j) * Density_j * sigma_omega_j; @@ -315,15 +315,15 @@ class CAvgGrad_TurbSST final : public CAvgGrad_Scalar { Jacobian_j[1][1] = diff_omega_T1*proj_on_rho_j; if (use_accurate_jacobians) { - Jacobian_i[0][0] = -diff_kine*proj_on_rho_i; - Jacobian_i[0][1] = 0.0; - Jacobian_i[1][0] = (diff_omega_T2 + diff_omega_T3)*-proj_on_rho_i; - Jacobian_i[1][1] = -proj_on_rho_i * diff_omega_T1 - 2*lambda_ij*ScalarVar_j[1]/pow(ScalarVar_i[1]+ScalarVar_j[1],2) * Proj_Mean_GradScalarVar[0]; - - Jacobian_j[0][0] = diff_kine*proj_on_rho_j; - Jacobian_j[0][1] = 0.0; - Jacobian_j[1][0] = (diff_omega_T2 + diff_omega_T3)*proj_on_rho_j; - Jacobian_j[1][1] = proj_on_rho_j * diff_omega_T1 + 2*lambda_ij*ScalarVar_i[1]/pow(ScalarVar_i[1]+ScalarVar_j[1],2) * Proj_Mean_GradScalarVar[0]; + Jacobian_i[0][0] = -diff_kine*proj_on_rho_i; + Jacobian_i[0][1] = 0.0; + Jacobian_i[1][0] = (diff_omega_T2 + diff_omega_T3)*-proj_on_rho_i; + Jacobian_i[1][1] = -proj_on_rho_i * diff_omega_T1 - 2*lambda_ij*ScalarVar_j[1]/pow(ScalarVar_i[1]+ScalarVar_j[1],2) * Proj_Mean_GradScalarVar[0]; + + Jacobian_j[0][0] = diff_kine*proj_on_rho_j; + Jacobian_j[0][1] = 0.0; + Jacobian_j[1][0] = (diff_omega_T2 + diff_omega_T3)*proj_on_rho_j; + Jacobian_j[1][1] = proj_on_rho_j * diff_omega_T1 + 2*lambda_ij*ScalarVar_i[1]/pow(ScalarVar_i[1]+ScalarVar_j[1],2) * Proj_Mean_GradScalarVar[0]; } } } diff --git a/SU2_CFD/include/solvers/CTurbSolver.hpp b/SU2_CFD/include/solvers/CTurbSolver.hpp index e35f2168ee0b..9bb0cc236d78 100644 --- a/SU2_CFD/include/solvers/CTurbSolver.hpp +++ b/SU2_CFD/include/solvers/CTurbSolver.hpp @@ -147,4 +147,113 @@ class CTurbSolver : public CScalarSolver { * \returns The number of extra variables. */ unsigned long RegisterSolutionExtra(bool input, const CConfig* config) final; + + /*! + * \brief Compute the viscous flux for the turbulence equations at a particular edge in a non-conservative manner. + * \tparam SolverSpecificNumericsTemp - lambda-function, to implement solver specific contributions to numerics. + * \note The functor has to implement (iPoint, jPoint) + * \param[in] iEdge - Edge for which we want to compute the flux + * \param[in] geometry - Geometrical definition of the problem. + * \param[in] solver_container - Container vector with all the solutions. + * \param[in] numerics - Description of the numerical method. + * \param[in] config - Definition of the particular problem. + */ + inline virtual void Viscous_Residual(const unsigned long iEdge, const CGeometry* geometry, CSolver** solver_container, + CNumerics* numerics, const CConfig* config) {} + template + void TurbViscousResidual(const unsigned long iEdge, const CGeometry* geometry, CSolver** solver_container, + CNumerics* numerics, const CConfig* config, SolverSpecificNumericsTemp&& SolverSpecificNumerics); + + /*! + * \brief Compute a suitable under-relaxation parameter to limit the change in the solution variables over + * a nonlinear iteration for stability. + * \param[in] allowableRatio - Maximum percentage update in variable per iteration. + */ + void ComputeUnderRelaxationFactorHelper(su2double allowableRatio); }; + +template +void CTurbSolver::TurbViscousResidual(const unsigned long iEdge, const CGeometry* geometry, CSolver** solver_container, + CNumerics* numerics, const CConfig* config, SolverSpecificNumericsTemp&& SolverSpecificNumerics) { + const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); + CFlowVariable* flowNodes = solver_container[FLOW_SOL] ? + su2staticcast_p(solver_container[FLOW_SOL]->GetNodes()) : nullptr; + + const auto iPoint = geometry->edges->GetNode(iEdge, 0); + const auto jPoint = geometry->edges->GetNode(iEdge, 1); + + /*--- Lambda function to compute the flux ---*/ + auto ComputeFlux = [&](unsigned long iPoint, unsigned long jPoint, const su2double* normal) { + numerics->SetCoord(geometry->nodes->GetCoord(iPoint),geometry->nodes->GetCoord(jPoint)); + numerics->SetNormal(normal); + + if (flowNodes) { + numerics->SetPrimitive(flowNodes->GetPrimitive(iPoint), flowNodes->GetPrimitive(jPoint)); + } + + /*--- Solver specific numerics contribution. ---*/ + SolverSpecificNumerics(iPoint, jPoint); + + numerics->SetScalarVar(nodes->GetSolution(iPoint), nodes->GetSolution(jPoint)); + numerics->SetScalarVarGradient(nodes->GetGradient(iPoint), nodes->GetGradient(jPoint)); + + return numerics->ComputeResidual(config); + }; + + /*--- Compute fluxes and jacobians i->j ---*/ + const su2double* normal = geometry->edges->GetNormal(iEdge); + auto residual_ij = ComputeFlux(iPoint, jPoint, normal); + + JacobianScalarType *Block_ii = nullptr, *Block_ij = nullptr, *Block_ji = nullptr, *Block_jj = nullptr; + if (implicit) { + Jacobian.GetBlocks(iEdge, iPoint, jPoint, Block_ii, Block_ij, Block_ji, Block_jj); + } + if (ReducerStrategy) { + EdgeFluxes.SubtractBlock(iEdge, residual_ij); + EdgeFluxesDiff.SetBlock(iEdge, residual_ij); + if (implicit) { + /*--- For the reducer strategy the Jacobians are averaged for simplicity. ---*/ + for (int iVar=0; iVari ---*/ + su2double flipped_normal[MAXNDIM]; + for (auto iDim = 0u; iDim < nDim; iDim++) flipped_normal[iDim] = -normal[iDim]; + + auto residual_ji = ComputeFlux(jPoint, iPoint, flipped_normal); + if (ReducerStrategy) { + EdgeFluxesDiff.AddBlock(iEdge, residual_ji); + if (implicit) { + for (int iVar=0; iVarGetKind_TimeIntScheme() == EULER_IMPLICIT); - CFlowVariable* flowNodes = solver_container[FLOW_SOL] ? - su2staticcast_p(solver_container[FLOW_SOL]->GetNodes()) : nullptr; - - /*--- Points in edge. ---*/ - const auto iPoint = geometry->edges->GetNode(iEdge, 0); - const auto jPoint = geometry->edges->GetNode(iEdge, 1); - - /*--- Helper function to compute the flux ---*/ - auto ComputeFlux = [&](unsigned long iPoint, unsigned long jPoint, const su2double* normal) { - numerics->SetCoord(geometry->nodes->GetCoord(iPoint), geometry->nodes->GetCoord(jPoint)); - numerics->SetNormal(normal); - - if (flowNodes) { - numerics->SetPrimitive(flowNodes->GetPrimitive(iPoint), flowNodes->GetPrimitive(jPoint)); - } + auto SolverSpecificNumerics = [&](unsigned long iPoint, unsigned long jPoint) { /*--- Roughness heights. ---*/ numerics->SetRoughness(geometry->nodes->GetRoughnessHeight(iPoint), geometry->nodes->GetRoughnessHeight(jPoint)); - - numerics->SetScalarVar(nodes->GetSolution(iPoint), nodes->GetSolution(jPoint)); - numerics->SetScalarVarGradient(nodes->GetGradient(iPoint), nodes->GetGradient(jPoint)); - - return numerics->ComputeResidual(config); }; - /*--- Compute fluxes and jacobians i->j ---*/ - const su2double* normal = geometry->edges->GetNormal(iEdge); - auto residual_ij = ComputeFlux(iPoint, jPoint, normal); + TurbViscousResidual(iEdge, geometry, solver_container, numerics, config, SolverSpecificNumerics); - JacobianScalarType *Block_ii = nullptr, *Block_ij = nullptr, *Block_ji = nullptr, *Block_jj = nullptr; - if (implicit) { - Jacobian.GetBlocks(iEdge, iPoint, jPoint, Block_ii, Block_ij, Block_ji, Block_jj); - } - if (ReducerStrategy) { - EdgeFluxes.SubtractBlock(iEdge, residual_ij); - EdgeFluxesDiff.SetBlock(iEdge, residual_ij); - if (implicit) { - /*--- For the reducer strategy the Jacobians are averaged for simplicity. ---*/ - assert(nVar == 1); - Block_ij[0] -= 0.5 * SU2_TYPE::GetValue(residual_ij.jacobian_j[0][0]); - Block_ji[0] += 0.5 * SU2_TYPE::GetValue(residual_ij.jacobian_i[0][0]); - } - } else { - LinSysRes.SubtractBlock(iPoint, residual_ij); - if (implicit) { - assert(nVar == 1); - Block_ii[0] -= SU2_TYPE::GetValue(residual_ij.jacobian_i[0][0]); - Block_ij[0] -= SU2_TYPE::GetValue(residual_ij.jacobian_j[0][0]); - } - } - - /*--- Compute fluxes and jacobians j->i ---*/ - su2double flipped_normal[MAXNDIM]; - for (auto iDim = 0u; iDim < nDim; iDim++) flipped_normal[iDim] = -normal[iDim]; - - auto residual_ji = ComputeFlux(jPoint, iPoint, flipped_normal); - if (ReducerStrategy) { - EdgeFluxesDiff.AddBlock(iEdge, residual_ji); - if (implicit) { - Block_ij[0] += 0.5 * SU2_TYPE::GetValue(residual_ji.jacobian_i[0][0]); - Block_ji[0] -= 0.5 * SU2_TYPE::GetValue(residual_ji.jacobian_j[0][0]); - } - } else { - LinSysRes.SubtractBlock(jPoint, residual_ji); - if (implicit) { - /*--- The order of arguments were flipped in the evaluation of residual_ji, the Jacobian - * associated with point i is stored in jacobian_j and point j in jacobian_i. ---*/ - Block_ji[0] -= SU2_TYPE::GetValue(residual_ji.jacobian_j[0][0]); - Block_jj[0] -= SU2_TYPE::GetValue(residual_ji.jacobian_i[0][0]); - } - } } void CTurbSASolver::Source_Residual(CGeometry *geometry, CSolver **solver_container, @@ -1623,31 +1559,8 @@ void CTurbSASolver::ComputeUnderRelaxationFactor(const CConfig *config) { /* Loop over the solution update given by relaxing the linear system for this nonlinear iteration. */ - su2double localUnderRelaxation = 1.00; - const su2double allowableRatio = config->GetUnderRelax_SA(); - - SU2_OMP_FOR_STAT(omp_chunk_size) - for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) { - - localUnderRelaxation = 1.0; - su2double ratio = fabs(LinSysSol[iPoint]) / (fabs(nodes->GetSolution(iPoint, 0)) + EPS); - /* We impose a limit on the maximum percentage that the - turbulence variables can change over a nonlinear iteration. */ - if (ratio > allowableRatio) { - localUnderRelaxation = min(allowableRatio / ratio, localUnderRelaxation); - } + const su2double allowableRatio = config->GetMaxUpdateFractionSA(); - /* 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 + ComputeUnderRelaxationFactorHelper(allowableRatio); } diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index d10d9677610f..62e3c3c1cb83 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -290,88 +290,17 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai void CTurbSSTSolver::Viscous_Residual(const unsigned long iEdge, const CGeometry* geometry, CSolver** solver_container, CNumerics* numerics, const CConfig* config) { - const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); - CFlowVariable* flowNodes = solver_container[FLOW_SOL] ? - su2staticcast_p(solver_container[FLOW_SOL]->GetNodes()) : nullptr; - - /*--- Points in edge ---*/ - auto iPoint = geometry->edges->GetNode(iEdge, 0); - auto jPoint = geometry->edges->GetNode(iEdge, 1); - - /*--- Helper function to compute the flux ---*/ - auto ComputeFlux = [&](unsigned long iPoint, unsigned long jPoint, const su2double* normal) { - numerics->SetCoord(geometry->nodes->GetCoord(iPoint),geometry->nodes->GetCoord(jPoint)); - numerics->SetNormal(normal); - - if (flowNodes) { - numerics->SetPrimitive(flowNodes->GetPrimitive(iPoint), flowNodes->GetPrimitive(jPoint)); - } - + auto SolverSpecificNumerics = [&](unsigned long iPoint, unsigned long jPoint) { /*--- Menter's first blending function (only SST)---*/ numerics->SetF1blending(nodes->GetF1blending(iPoint), nodes->GetF1blending(jPoint)); - - numerics->SetScalarVar(nodes->GetSolution(iPoint), nodes->GetSolution(jPoint)); - numerics->SetScalarVarGradient(nodes->GetGradient(iPoint), nodes->GetGradient(jPoint)); - - return numerics->ComputeResidual(config); }; - /*--- Compute fluxes and jacobians i->j ---*/ - const su2double* normal = geometry->edges->GetNormal(iEdge); - auto residual_ij = ComputeFlux(iPoint, jPoint, normal); + TurbViscousResidual(iEdge, geometry, solver_container, numerics, config, SolverSpecificNumerics); - JacobianScalarType *Block_ii = nullptr, *Block_ij = nullptr, *Block_ji = nullptr, *Block_jj = nullptr; - if (implicit) { - Jacobian.GetBlocks(iEdge, iPoint, jPoint, Block_ii, Block_ij, Block_ji, Block_jj); - } - if (ReducerStrategy) { - EdgeFluxes.SubtractBlock(iEdge, residual_ij); - EdgeFluxesDiff.SetBlock(iEdge, residual_ij); - if (implicit) { - /*--- For the reducer strategy the Jacobians are averaged for simplicity. ---*/ - for (int iVar=0; iVari ---*/ - su2double flipped_normal[MAXNDIM]; - for (auto iDim = 0u; iDim < nDim; iDim++) flipped_normal[iDim] = -normal[iDim]; + /*--- Points in edge ---*/ + auto iPoint = geometry->edges->GetNode(iEdge, 0); + auto jPoint = geometry->edges->GetNode(iEdge, 1); - auto residual_ji = ComputeFlux(jPoint, iPoint, flipped_normal); - if (ReducerStrategy) { - EdgeFluxesDiff.AddBlock(iEdge, residual_ji); - if (implicit) { - for (int iVar=0; iVarGetDiffCoeff_kw(0); DC_kw[1] = numerics->GetDiffCoeff_kw(1); @@ -1106,35 +1035,7 @@ void CTurbSSTSolver::SetUniformInlet(const CConfig* config, unsigned short iMark void CTurbSSTSolver::ComputeUnderRelaxationFactor(const CConfig *config) { - const su2double allowableRatio = config->GetUnderRelax_SST(); + const su2double allowableRatio = config->GetMaxUpdateFractionSST(); - SU2_OMP_FOR_STAT(omp_chunk_size) - /* Loop over the solution update given by relaxing the linear - system for this nonlinear iteration. */ - for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) { - su2double localUnderRelaxation = 1.0; - - for (unsigned short iVar =0; iVar < nVar; iVar++) { - const unsigned long index = iPoint * nVar + iVar; - su2double ratio = fabs(LinSysSol[index])/(fabs(nodes->GetSolution(iPoint, iVar)) + EPS); - /* We impose a limit on the maximum percentage that the - turbulence variables can change over a nonlinear iteration. */ - 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 + ComputeUnderRelaxationFactorHelper(allowableRatio); } \ No newline at end of file diff --git a/SU2_CFD/src/solvers/CTurbSolver.cpp b/SU2_CFD/src/solvers/CTurbSolver.cpp index 1b668144c0d4..d75fca046bc7 100644 --- a/SU2_CFD/src/solvers/CTurbSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSolver.cpp @@ -245,3 +245,40 @@ unsigned long CTurbSolver::RegisterSolutionExtra(bool input, const CConfig* conf /*--- We don't need to save adjoint values for muT. ---*/ return 0; } + +void CTurbSolver::ComputeUnderRelaxationFactorHelper(su2double allowableRatio) { + + SU2_OMP_FOR_STAT(omp_chunk_size) + /* Loop over the solution update given by relaxing the linear + system for this nonlinear iteration. */ + + for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) { + su2double localUnderRelaxation = 1.0; + + // loop over variables (for SA, nVar == 1) + + for (unsigned short iVar = 0; iVar < nVar; iVar++) { + const unsigned long index = iPoint * nVar + iVar; + su2double ratio = fabs(LinSysSol[index])/(fabs(nodes->GetSolution(iPoint, iVar)) + EPS); + + /* We impose a limit on the maximum percentage that the + turbulence variables can change over a nonlinear iteration. */ + 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 +} \ No newline at end of file From d276797b13f38b299c24e5d9d6a6e0415808d4b8 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Wed, 16 Jul 2025 14:42:21 +0100 Subject: [PATCH 17/37] consistent config naming --- Common/include/CConfig.hpp | 12 ++++++------ Common/src/CConfig.cpp | 7 ++++--- SU2_CFD/include/solvers/CFVMFlowSolverBase.inl | 2 +- config_template.cfg | 11 +++++++++++ 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 66ceff88955b..c47947552eb7 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -639,9 +639,9 @@ class CConfig { su2double Relaxation_Factor_Adjoint; /*!< \brief Relaxation coefficient for variable updates of adjoint solvers. */ su2double Relaxation_Factor_CHT; /*!< \brief Relaxation coefficient for the update of conjugate heat variables. */ su2double EntropyFix_Coeff; /*!< \brief Entropy fix coefficient. */ - su2double Max_Update_SST; /*!< \brief Cap for the Under-Relaxation Factor for SST Turbulent Variables*/ - su2double Max_Update_SA; /*!< \brief Cap for the Under-Relaxation Factor for SA Turbulent Variables*/ - su2double Max_Update_Flow; /*!< \brief Cap for the Under-Relaxation Factor for Flow Density and Energy Variables*/ + su2double MaxUpdateSST; /*!< \brief Cap for the Under-Relaxation Factor for SST Turbulent Variables*/ + su2double MaxUpdateSA; /*!< \brief Cap for the Under-Relaxation Factor for SA Turbulent Variables*/ + su2double MaxUpdateFlow; /*!< \brief Cap for the Under-Relaxation Factor for Flow Density and Energy Variables*/ unsigned short nLocationStations, /*!< \brief Number of section cuts to make when outputting mesh and cp . */ nWingStations; /*!< \brief Number of section cuts to make when calculating internal volume. */ su2double Kappa_1st_AdjFlow, /*!< \brief Lax 1st order dissipation coefficient for adjoint flow equations (coarse multigrid levels). */ @@ -4232,19 +4232,19 @@ class CConfig { * \brief Get the under-relaxation for flow variables density and energy. * \return under-relaxation for flow variables. */ - su2double GetUnderRelax_Flow(void) const { return Max_Update_Flow; } + su2double GetMaxUpdateFractionFlow(void) const { return MaxUpdateFlow; } /*! * \brief Get the under-relaxation for SA variable, nu_tilde. * \return under-relaxation for SA variables. */ - su2double GetUnderRelax_SA(void) const { return Max_Update_SA; } + su2double GetMaxUpdateFractionSA(void) const { return MaxUpdateSA; } /*! * \brief Get the under-relaxation for SST turbulence variables k and omega. * \return under-relaxation for SST variables. */ - su2double GetUnderRelax_SST(void) const { return Max_Update_SST; } + su2double GetMaxUpdateFractionSST(void) const { return MaxUpdateSST; } /*! * \brief Get the number of samples used in quasi-Newton methods. diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 596001ad0b09..0787b5f14dbb 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1897,12 +1897,13 @@ void CConfig::SetConfig_Options() { addEnumOption("DISCADJ_LIN_PREC", Kind_DiscAdj_Linear_Prec, Linear_Solver_Prec_Map, ILU); /* DESCRIPTION: Linear solver for the discete adjoint systems */ - addDoubleOption("MAX_UPDATE_CAP_FLOW", Max_Update_Flow, 0.2); /* DESCRIPTION: Max value for under-relaxation cap for density and energy variables */ - addDoubleOption("MAX_UPDATE_CAP_SA", Max_Update_SA, 0.99); + addDoubleOption("MAX_UPDATE_FLOW", MaxUpdateFlow, 0.2); /* DESCRIPTION: Max value for under-relaxation cap for SA turbulence variables */ - addDoubleOption("MAX_UPDATE_CAP_SST", Max_Update_SST, 1.0); + addDoubleOption("MAX_UPDATE_SA", MaxUpdateSA, 0.99); /* DESCRIPTION: Max value for under-relaxation cap for SST turbulence variables */ + addDoubleOption("MAX_UPDATE_SST", MaxUpdateSST, 1.0); + /*!\par CONFIG_CATEGORY: Convergence\ingroup Config*/ /*--- Options related to convergence ---*/ diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index 14739b062581..a0b6e6a30129 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -558,7 +558,7 @@ void CFVMFlowSolverBase::ComputeUnderRelaxationFactor(const CConfig* confi /* Loop over the solution update given by relaxing the linear system for this nonlinear iteration. */ - const su2double allowableRatio = config->GetUnderRelax_Flow(); + const su2double allowableRatio = config->GetMaxUpdateFractionFlow(); SU2_OMP_FOR_STAT(omp_chunk_size) for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) { diff --git a/config_template.cfg b/config_template.cfg index 07bf2474bc87..19f099e9b1a8 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -133,6 +133,17 @@ CONV_WINDOW_CAUCHY_EPS = 1E-3 % Number of elements to apply the criteria CONV_WINDOW_CAUCHY_ELEMS = 10 % +% Cap ratio for updating density and energy variables evaluated by the linear solver relative +% to the non-linear solution at previous iteration. Low values ensure stability but may result +% in longer convergence times, based on numerical experiments Default= 0.2 +MAX_UPDATE_FLOW= 0.2 +% +% Same as MAX_UPDATE_FLOW but for updating nu_tilde variable in SA model, not applicable for Neg model (Default= 0.99) +MAX_UPDATE_SA= 0.99 +% +% Same as MAX_UPDATE_FLOW but for updating TKE and Omega variables (Default= 1.0) +MAX_UPDATE_SST= 1.0 +% % ------------------------- TIME-DEPENDENT SIMULATION -------------------------------% % % Time domain simulation From f79191f74bf66daa8eff0e8b3690b6a0d1f1fa60 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Wed, 16 Jul 2025 16:40:52 +0100 Subject: [PATCH 18/37] remove extra variable in sst solver --- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 2116c8134d00..65946f21aa1a 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -299,7 +299,6 @@ void CTurbSSTSolver::Viscous_Residual(const unsigned long iEdge, const CGeometry /*--- Points in edge ---*/ auto iPoint = geometry->edges->GetNode(iEdge, 0); - auto jPoint = geometry->edges->GetNode(iEdge, 1); su2double DC_kw[6]; DC_kw[0] = numerics->GetDiffCoeff_kw(0); From c5cf7d3c178ba87500d08e686260b0c978e10ff6 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Thu, 17 Jul 2025 17:08:12 +0100 Subject: [PATCH 19/37] update regressions --- TestCases/hybrid_regression.py | 36 +++++++------- TestCases/hybrid_regression_AD.py | 4 +- TestCases/parallel_regression.py | 74 ++++++++++++++--------------- TestCases/parallel_regression_AD.py | 12 ++--- TestCases/serial_regression.py | 40 ++++++++-------- TestCases/serial_regression_AD.py | 2 +- TestCases/tutorials.py | 16 +++---- 7 files changed, 92 insertions(+), 92 deletions(-) diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index e4a747f2c913..01eaaa1f5acb 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -165,7 +165,7 @@ 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.510349, 4.950289, 0.811983, 0.061600, 0.000000] + rae2822_sst.test_vals = [-0.510339, 5.386831, 0.811983, 0.061600, 0.000000] test_list.append(rae2822_sst) # RAE2822 SST_SUST @@ -173,7 +173,7 @@ def main(): 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.678140, 4.950289, 0.811983, 0.061600] + rae2822_sst_sust.test_vals = [-2.643406, 5.386831, 0.811983, 0.061600] test_list.append(rae2822_sst_sust) # Flat plate @@ -222,7 +222,7 @@ def main(): 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.192404, -10.250818, -1.560208, 1.022562, 0.040530, -2.382731] + turb_naca0012_sst_fixedvalues.test_vals = [-5.192397, -10.445236, 0.774100, 1.022534, 0.040529, -2.383406] test_list.append(turb_naca0012_sst_fixedvalues) # NACA0012 (SST, explicit Euler for flow and turbulence equations) @@ -230,7 +230,7 @@ def main(): turb_naca0012_sst_expliciteuler.cfg_dir = "rans/naca0012" turb_naca0012_sst_expliciteuler.cfg_file = "turb_NACA0012_sst_expliciteuler.cfg" turb_naca0012_sst_expliciteuler.test_iter = 10 - turb_naca0012_sst_expliciteuler.test_vals = [-3.533765, -3.157766, 3.364026, 1.124757, 0.501700, -float("inf")] + turb_naca0012_sst_expliciteuler.test_vals = [-3.533766, -3.157224, 3.743381, 1.124757, 0.501700, -float("inf")] test_list.append(turb_naca0012_sst_expliciteuler) # PROPELLER @@ -263,7 +263,7 @@ def main(): turb_naca0012_sst_restart_mg.cfg_file = "turb_NACA0012_sst_multigrid_restart.cfg" turb_naca0012_sst_restart_mg.test_iter = 20 turb_naca0012_sst_restart_mg.ntest_vals = 5 - turb_naca0012_sst_restart_mg.test_vals = [-7.633091, -7.181942, -0.627082, -0.000020, 0.078737] + turb_naca0012_sst_restart_mg.test_vals = [-7.630391, -7.172928, -0.627013, -0.000022, 0.078742] test_list.append(turb_naca0012_sst_restart_mg) ############################# @@ -275,8 +275,8 @@ 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.976639, 1.141468, 0.243064, -0.112166] - turb_naca0012_1c.test_vals_aarch64 = [-4.981105, 1.138873, 0.248013, -0.117248] + turb_naca0012_1c.test_vals = [-4.976620, 1.345983, 0.433171, -0.033685] + turb_naca0012_1c.test_vals_aarch64 = [-4.976620, 1.345983, 0.433171, -0.033685] test_list.append(turb_naca0012_1c) # NACA0012 2c @@ -284,8 +284,8 @@ 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.486005, 0.968502, 0.233564, -0.114514] - turb_naca0012_2c.test_vals_aarch64 = [-5.483345, 0.968720, 0.214914, -0.124932] + turb_naca0012_2c.test_vals = [-5.485484, 1.263406, 0.411442, -0.040859] + turb_naca0012_2c.test_vals_aarch64 = [-5.485484, 1.263406, 0.411442, -0.040859] test_list.append(turb_naca0012_2c) # NACA0012 3c @@ -293,8 +293,8 @@ 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.584366, 0.931883, 0.223356, -0.116142] - turb_naca0012_3c.test_vals_aarch64 = [-5.584300, 0.931293, 0.207447, -0.125691] + turb_naca0012_3c.test_vals = [-5.583737, 1.232005, 0.390258, -0.046305] + turb_naca0012_3c.test_vals_aarch64 = [-5.583737, 1.232005, 0.390258, -0.046305] test_list.append(turb_naca0012_3c) # NACA0012 p1c1 @@ -302,8 +302,8 @@ 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.114311, 1.076961, 0.224322, -0.118874] - turb_naca0012_p1c1.test_vals_aarch64 = [-5.132358, 1.075658, 0.337268, -0.082827] + turb_naca0012_p1c1.test_vals = [-5.114189, 1.285037, 0.406851, -0.043003] + turb_naca0012_p1c1.test_vals_aarch64 = [-5.114189, 1.285037, 0.406851, -0.043003] test_list.append(turb_naca0012_p1c1) # NACA0012 p1c2 @@ -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.548834, 0.946383, 0.211109, -0.121304] + turb_naca0012_p1c2.test_vals = [-5.548245, 1.236384, 0.381823, -0.050336] turb_naca0012_p1c2.test_vals_aarch64 = [-5.548775, 0.945962, 0.211150, -0.121291] test_list.append(turb_naca0012_p1c2) @@ -411,7 +411,7 @@ def main(): inc_turb_naca0012_sst_sust.cfg_dir = "incomp_rans/naca0012" inc_turb_naca0012_sst_sust.cfg_file = "naca0012_SST_SUST.cfg" inc_turb_naca0012_sst_sust.test_iter = 20 - inc_turb_naca0012_sst_sust.test_vals = [-7.291693, 0.132607, 0.000002, 0.312092] + inc_turb_naca0012_sst_sust.test_vals = [-7.170017, 0.332641, 0.000002, 0.312113] test_list.append(inc_turb_naca0012_sst_sust) # Weakly coupled heat equation @@ -564,7 +564,7 @@ def main(): 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.090053, 1.550934, -2.895064, 2.607596, -2.479704, 3.063740, 106380.000000, 106380.000000, 5.733600, 64.747000] + axial_stage2D.test_vals = [1.084446, 1.526931, -2.895084, 2.607567, -2.479664, 3.063778, 106380.000000, 106380.000000, 5.733600, 64.749000] 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) @@ -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.357591, -2.480153, -2.075008, 1.737627, -1.441579, 3.240658, -471620.000000, 94.840000, -0.054589] + transonic_stator_restart.test_vals = [-4.442508, -2.561367, -2.165776, 1.652753, -1.355494, 3.172717, -471620.000000, 94.843000, -0.043825] 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) @@ -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, 1.167903, -1.660901] + bars_SST_2D.test_vals = [13.000000, -0.621423, -1.660901] bars_SST_2D.multizone = True test_list.append(bars_SST_2D) diff --git a/TestCases/hybrid_regression_AD.py b/TestCases/hybrid_regression_AD.py index 9b4bdb23c52f..023c6e9472ad 100644 --- a/TestCases/hybrid_regression_AD.py +++ b/TestCases/hybrid_regression_AD.py @@ -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.237413, -0.200125, 2.763200, -0.039612] + discadj_rans_naca0012_sst.test_vals = [-2.237469, -0.199286, 2.763100, -0.039615] test_list.append(discadj_rans_naca0012_sst) ####################################### @@ -131,7 +131,7 @@ def main(): discadj_incomp_turb_NACA0012_sst.cfg_dir = "disc_adj_incomp_rans/naca0012" discadj_incomp_turb_NACA0012_sst.cfg_file = "turb_naca0012_sst.cfg" discadj_incomp_turb_NACA0012_sst.test_iter = 10 - discadj_incomp_turb_NACA0012_sst.test_vals = [-3.597708, -2.983823, -8.354806, 0.000000, -0.916525] + discadj_incomp_turb_NACA0012_sst.test_vals = [-3.775713, -3.089085, -7.142524, 0.000000, -0.897100] test_list.append(discadj_incomp_turb_NACA0012_sst) ####################################################### diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 496fee1a6ae1..b53012426226 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -365,7 +365,7 @@ 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.510313, 4.941942, 0.813793, 0.062425, 0.000000] + rae2822_sst.test_vals = [-0.510305, 5.386832, 0.813794, 0.062425, 0.000000] test_list.append(rae2822_sst) # RAE2822 SST_SUST @@ -373,7 +373,7 @@ def main(): 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.677866, 4.941942, 0.813793, 0.062425] + rae2822_sst_sust.test_vals = [-2.644127, 5.386832, 0.813793, 0.062425] test_list.append(rae2822_sst_sust) # Flat plate @@ -397,7 +397,7 @@ def main(): turb_flatplate_CC_Wilcox.cfg_dir = "rans/flatplate" turb_flatplate_CC_Wilcox.cfg_file = "turb_SST_flatplate_compressibility_Wilcox.cfg" turb_flatplate_CC_Wilcox.test_iter = 20 - turb_flatplate_CC_Wilcox.test_vals = [-1.280934, 1.974155, 1.440363, 5.038339, -3.791118, 8.297543] + turb_flatplate_CC_Wilcox.test_vals = [-1.195053, 2.089306, 1.529063, 5.164703, -3.700915, 8.162921] test_list.append(turb_flatplate_CC_Wilcox) # Flat plate SST compressibility correction Sarkar @@ -405,7 +405,7 @@ def main(): turb_flatplate_CC_Sarkar.cfg_dir = "rans/flatplate" turb_flatplate_CC_Sarkar.cfg_file = "turb_SST_flatplate_compressibility_Sarkar.cfg" turb_flatplate_CC_Sarkar.test_iter = 20 - turb_flatplate_CC_Sarkar.test_vals = [-1.280934, 1.974155, 1.440363, 5.038339, -3.791121, 8.297543] + turb_flatplate_CC_Sarkar.test_vals = [-1.195053, 2.089306, 1.529063, 5.164703, -3.700917, 8.162921] test_list.append(turb_flatplate_CC_Sarkar) # ONERA M6 Wing @@ -470,7 +470,7 @@ def main(): turb_naca0012_sst_2003_Vm.cfg_dir = "rans/naca0012" turb_naca0012_sst_2003_Vm.cfg_file = "turb_NACA0012_sst_2003-Vm.cfg" turb_naca0012_sst_2003_Vm.test_iter = 10 - turb_naca0012_sst_2003_Vm.test_vals = [-8.263591, -10.306174, -3.626544, 1.045289, 0.019325, -1.551890] + turb_naca0012_sst_2003_Vm.test_vals = [-8.204719, -10.239632, -3.569318, 1.045273, 0.019357, -1.589903] turb_naca0012_sst_2003_Vm.timeout = 3200 test_list.append(turb_naca0012_sst_2003_Vm) @@ -479,7 +479,7 @@ def main(): turb_naca0012_sst_1994_KLm.cfg_dir = "rans/naca0012" turb_naca0012_sst_1994_KLm.cfg_file = "turb_NACA0012_sst_1994-KLm.cfg" turb_naca0012_sst_1994_KLm.test_iter = 10 - turb_naca0012_sst_1994_KLm.test_vals = [-8.563675, -10.803009, -4.036981, 1.046738, 0.019251, -1.806475] + turb_naca0012_sst_1994_KLm.test_vals = [-8.459543, -10.648566, -3.943599, 1.046776, 0.019279, -1.890741] turb_naca0012_sst_1994_KLm.timeout = 3200 test_list.append(turb_naca0012_sst_1994_KLm) @@ -489,7 +489,7 @@ def main(): 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.216568, -10.236279, -1.556755, 1.022392, 0.040547, -3.738510] + turb_naca0012_sst_fixedvalues.test_vals = [-5.216560, -10.437149, 0.774285, 1.022363, 0.040546, -3.736444] turb_naca0012_sst_fixedvalues.timeout = 3200 test_list.append(turb_naca0012_sst_fixedvalues) @@ -498,7 +498,7 @@ def main(): turb_naca0012_sst_expliciteuler.cfg_dir = "rans/naca0012" turb_naca0012_sst_expliciteuler.cfg_file = "turb_NACA0012_sst_expliciteuler.cfg" turb_naca0012_sst_expliciteuler.test_iter = 10 - turb_naca0012_sst_expliciteuler.test_vals = [-3.533765, -3.157766, 3.364026, 1.124757, 0.501700, -float("inf")] + turb_naca0012_sst_expliciteuler.test_vals = [-3.533766, -3.157224, 3.743381, 1.124757, 0.501700, -float("inf")] turb_naca0012_sst_expliciteuler.timeout = 3200 test_list.append(turb_naca0012_sst_expliciteuler) @@ -544,7 +544,7 @@ def main(): turb_naca0012_sst_restart_mg.cfg_file = "turb_NACA0012_sst_multigrid_restart.cfg" turb_naca0012_sst_restart_mg.test_iter = 20 turb_naca0012_sst_restart_mg.ntest_vals = 5 - turb_naca0012_sst_restart_mg.test_vals = [-7.600526, -7.181924, -0.627078, -0.000016, 0.078729] + turb_naca0012_sst_restart_mg.test_vals = [-7.598006, -7.172900, -0.627010, -0.000017, 0.078733] turb_naca0012_sst_restart_mg.timeout = 3200 turb_naca0012_sst_restart_mg.tol = 0.000001 test_list.append(turb_naca0012_sst_restart_mg) @@ -654,7 +654,7 @@ def main(): inc_turb_naca0012_sst_sust.cfg_dir = "incomp_rans/naca0012" inc_turb_naca0012_sst_sust.cfg_file = "naca0012_SST_SUST.cfg" inc_turb_naca0012_sst_sust.test_iter = 20 - inc_turb_naca0012_sst_sust.test_vals = [-7.291511, 0.132644, -0.000001, 0.312109] + inc_turb_naca0012_sst_sust.test_vals = [-7.169837, 0.332730, -0.000001, 0.312131] test_list.append(inc_turb_naca0012_sst_sust) #################### @@ -889,7 +889,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.981445, 1.140044, 0.466241, -0.076886] + turb_naca0012_1c.test_vals = [-4.980966, 1.345888, 0.673077, 0.010056] test_list.append(turb_naca0012_1c) # NACA0012 2c @@ -897,7 +897,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.485045, 0.968951, 0.317727, -0.109873] + turb_naca0012_2c.test_vals = [-4.980966, 1.345888, 0.673077, 0.010056] test_list.append(turb_naca0012_2c) # NACA0012 3c @@ -905,7 +905,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.584375, 0.931875, 0.274184, -0.113514] + turb_naca0012_3c.test_vals = [-5.583626, 1.231815, 0.446484, -0.041356] test_list.append(turb_naca0012_3c) # NACA0012 p1c1 @@ -913,7 +913,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.122421, 1.074501, 0.412268, -0.091538] + turb_naca0012_p1c1.test_vals = [-5.122030, 1.284489, 0.608721, -0.008603] test_list.append(turb_naca0012_p1c1) # NACA0012 p1c2 @@ -921,7 +921,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.549646, 0.946077, 0.284451, -0.112299] + turb_naca0012_p1c2.test_vals = [-5.548927, 1.236043, 0.459402, -0.038915] test_list.append(turb_naca0012_p1c2) ###################################### @@ -982,7 +982,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 = [-1.175927, 0.062080, 1.399402, 2.220364, 1.399350, 2.218602, 0.000000] + square_cylinder.test_vals = [-1.175927, 0.062096, 1.399402, 2.220364, 1.399350, 2.218602, 0.000000] square_cylinder.unsteady = True test_list.append(square_cylinder) @@ -1056,7 +1056,7 @@ def main(): coolprop_fluidModel.cfg_dir = "nicf/coolprop" coolprop_fluidModel.cfg_file = "fluidModel.cfg" coolprop_fluidModel.test_iter = 5 - coolprop_fluidModel.test_vals = [-4.684483, -1.583073, 3.724768, 0.000000, 0.000000] + coolprop_fluidModel.test_vals = [-4.665443, -0.172865, 4.497973, 0.000000, 0.000000] coolprop_fluidModel.enabled_on_cpu_arch = ["x86_64"] test_list.append(coolprop_fluidModel) @@ -1065,7 +1065,7 @@ def main(): coolprop_transportModel.cfg_dir = "nicf/coolprop" coolprop_transportModel.cfg_file = "transportModel.cfg" coolprop_transportModel.test_iter = 5 - coolprop_transportModel.test_vals = [-4.684988, -1.314608, 4.668105, 0.000000, 0.000000] + coolprop_transportModel.test_vals = [-4.666163, -0.172865, 5.445413, 0.000000, 0.000000] coolprop_transportModel.enabled_on_cpu_arch = ["x86_64"] test_list.append(coolprop_transportModel) @@ -1074,7 +1074,7 @@ def main(): datadriven_fluidModel.cfg_dir = "nicf/datadriven" datadriven_fluidModel.cfg_file = "datadriven_nozzle.cfg" datadriven_fluidModel.test_iter = 50 - datadriven_fluidModel.test_vals = [-6.338898, -3.837472, -4.351292, -1.860262, -2.700991, 0.691801] + datadriven_fluidModel.test_vals = [-6.283594, -3.253961, -4.172935, -0.949415, -2.046039, 1.546933] test_list.append(datadriven_fluidModel) ###################################### @@ -1102,7 +1102,7 @@ def main(): 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.090054, 1.550990, -2.895064, 2.607596, -2.479704, 3.063740, 106380.000000, 106380.000000, 5.733600, 64.747000] + axial_stage2D.test_vals = [1.084452, 1.526943, -2.895084, 2.607567, -2.479664, 3.063779, 106380.000000, 106380.000000, 5.733600, 64.749000] test_list.append(axial_stage2D) # 2D transonic stator restart @@ -1110,7 +1110,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.354756, -2.473198, -2.076102, 1.740556, -1.441690, 3.246152, -471620.000000, 94.839000, -0.050276] + transonic_stator_restart.test_vals = [-4.437806, -2.553048, -2.164728, 1.657544, -1.356823, 3.178792, -471620.000000, 94.842000, -0.040365] transonic_stator_restart.test_vals_aarch64 = [-5.011834, -3.091110, -2.757795, 1.087934, -3.544707, 2.166101, -471630, 94.868, -0.035888] test_list.append(transonic_stator_restart) @@ -1193,7 +1193,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, 1.167840, -1.660900] + bars_SST_2D.test_vals = [13.000000, -0.621423, -1.660901] bars_SST_2D.multizone = True test_list.append(bars_SST_2D) @@ -1354,7 +1354,7 @@ def main(): sp_pinArray_cht_2d_dp_hf.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_2d" sp_pinArray_cht_2d_dp_hf.cfg_file = "configMaster.cfg" sp_pinArray_cht_2d_dp_hf.test_iter = 100 - sp_pinArray_cht_2d_dp_hf.test_vals = [0.500399, -0.667466, -0.984103, -0.726712, 208.023676, 350.140000, -0.000000, -0.726710, 0.726710] + sp_pinArray_cht_2d_dp_hf.test_vals = [0.374853, -0.882716, -0.970590, -0.613374, 208.023676, 350.230000, -0.000000, -0.613370, 0.613370] sp_pinArray_cht_2d_dp_hf.multizone = True test_list.append(sp_pinArray_cht_2d_dp_hf) @@ -1363,7 +1363,7 @@ def main(): sp_pinArray_3d_cht_mf_hf_tp.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_3d" sp_pinArray_3d_cht_mf_hf_tp.cfg_file = "configMaster.cfg" sp_pinArray_3d_cht_mf_hf_tp.test_iter = 30 - sp_pinArray_3d_cht_mf_hf_tp.test_vals = [-1.116189, -1.881686, -2.561500, -0.009805, 104.600449, 418.360000, 0.000000] + sp_pinArray_3d_cht_mf_hf_tp.test_vals = [-1.279608, -2.263747, -3.397255, -0.009777, 104.609505, 418.370000, 0.000000] sp_pinArray_3d_cht_mf_hf_tp.test_vals_aarch64 = [-1.117102, -1.880628, -2.561816, -0.009804, 104.600540, 418.360000, 0.000000] sp_pinArray_3d_cht_mf_hf_tp.multizone = True test_list.append(sp_pinArray_3d_cht_mf_hf_tp) @@ -1398,7 +1398,7 @@ def main(): pywrapper_square_cylinder.cfg_dir = "unsteady/square_cylinder" pywrapper_square_cylinder.cfg_file = "turb_square.cfg" pywrapper_square_cylinder.test_iter = 10 - pywrapper_square_cylinder.test_vals = [-1.178764, -0.349891, 1.401055, 2.358075, 1.401419, 2.301174, 0.000000] + pywrapper_square_cylinder.test_vals = [-1.178785, -0.349895, 1.401059, 2.358075, 1.401421, 2.301174, 0.000000] pywrapper_square_cylinder.command = TestCase.Command("mpirun -np 2", "SU2_CFD.py", "--parallel -f") pywrapper_square_cylinder.unsteady = True test_list.append(pywrapper_square_cylinder) @@ -1450,7 +1450,7 @@ def main(): pywrapper_unsteadyCHT.cfg_dir = "py_wrapper/flatPlate_unsteady_CHT" pywrapper_unsteadyCHT.cfg_file = "unsteady_CHT_FlatPlate_Conf.cfg" pywrapper_unsteadyCHT.test_iter = 5 - pywrapper_unsteadyCHT.test_vals = [-1.614167, 2.247364, -0.001388, 0.172995] + pywrapper_unsteadyCHT.test_vals = [-1.614167, 2.264219, -0.001386, 0.172978] pywrapper_unsteadyCHT.command = TestCase.Command("mpirun -np 2", "python", "launch_unsteady_CHT_FlatPlate.py --parallel -f") pywrapper_unsteadyCHT.unsteady = True test_list.append(pywrapper_unsteadyCHT) @@ -1460,7 +1460,7 @@ def main(): pywrapper_rigidMotion.cfg_dir = "py_wrapper/flatPlate_rigidMotion" pywrapper_rigidMotion.cfg_file = "flatPlate_rigidMotion_Conf.cfg" pywrapper_rigidMotion.test_iter = 5 - pywrapper_rigidMotion.test_vals = [-1.614166, 2.243100, 0.350194, 0.089497] + pywrapper_rigidMotion.test_vals = [-1.614166, 2.257995, 0.350194, 0.089496] pywrapper_rigidMotion.command = TestCase.Command("mpirun -np 2", "python", "launch_flatPlate_rigidMotion.py --parallel -f") pywrapper_rigidMotion.unsteady = True test_list.append(pywrapper_rigidMotion) @@ -1489,7 +1489,7 @@ def main(): pywrapper_zimont.cfg_dir = "py_wrapper/turbulent_premixed_psi" pywrapper_zimont.cfg_file = "psi.cfg" pywrapper_zimont.test_iter = 0 - pywrapper_zimont.test_vals = [-3.229704, -1.602176, -3.904854, -2.631849, -0.325639, -3.498356] + pywrapper_zimont.test_vals = [-3.229704, -1.602176, -3.904854, -2.631849, 0.752828, -3.498356] pywrapper_zimont.command = TestCase.Command("mpirun -np 2", "python", "run.py") test_list.append(pywrapper_zimont) @@ -1569,7 +1569,7 @@ def main(): species2_primitiveVenturi_mixingmodel.cfg_dir = "species_transport/venturi_primitive_3species" species2_primitiveVenturi_mixingmodel.cfg_file = "species2_primitiveVenturi_mixingmodel.cfg" species2_primitiveVenturi_mixingmodel.test_iter = 50 - species2_primitiveVenturi_mixingmodel.test_vals = [-5.736233, -4.561289, -4.666830, -5.863760, -0.071055, -5.584743, 5.000000, -1.376449, 5.000000, -4.869012, 5.000000, -1.452251, 0.000372, 0.000356, 0.000016, 0.000000] + species2_primitiveVenturi_mixingmodel.test_vals = [-5.741491, -4.566437, -4.672755, -5.777257, -0.068325, -5.584627, 5.000000, -1.368747, 5.000000, -4.868573, 5.000000, -1.452304, 0.000376, 0.000359, 0.000016, 0.000000] test_list.append(species2_primitiveVenturi_mixingmodel) # 2 species (1 eq) primitive venturi mixing using mixing model and bounded scalar transport @@ -1577,7 +1577,7 @@ def main(): species2_primitiveVenturi_mixingmodel_boundedscalar.cfg_dir = "species_transport/venturi_primitive_3species" species2_primitiveVenturi_mixingmodel_boundedscalar.cfg_file = "species2_primitiveVenturi_mixingmodel_boundedscalar.cfg" species2_primitiveVenturi_mixingmodel_boundedscalar.test_iter = 50 - species2_primitiveVenturi_mixingmodel_boundedscalar.test_vals = [-5.689876, -4.507214, -4.611632, -6.120372, -0.118388, -5.705973, 5.000000, -1.437234, 5.000000, -4.924953, 5.000000, -1.768691, 0.000313, 0.000313, 0.000000, 0.000000] + species2_primitiveVenturi_mixingmodel_boundedscalar.test_vals = [-5.691987, -4.511898, -4.616477, -5.776937, -0.113163, -5.705283, 5.000000, -1.430668, 5.000000, -4.923447, 5.000000, -1.771537, 0.000318, 0.000318, 0.000000, 0.000000] test_list.append(species2_primitiveVenturi_mixingmodel_boundedscalar) # 2 species (1 eq) primitive venturi mixing using mixing model including viscosity, thermal conductivity and inlet markers for SA turbulence model @@ -1593,7 +1593,7 @@ def main(): species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg_dir = "species_transport/venturi_primitive_3species" species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg_file = "species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg" species2_primitiveVenturi_mixingmodel_heatcapacity_H2.test_iter = 50 - species2_primitiveVenturi_mixingmodel_heatcapacity_H2.test_vals = [-5.830112, -4.504576, -4.654774, -7.014975, 2.317603, -5.509555, 30.000000, -6.906408, 11.000000, -8.227485, 8.000000, -9.294144, 2.077533, 1.000000, 0.600000, 0.477533] + species2_primitiveVenturi_mixingmodel_heatcapacity_H2.test_vals = [-5.835345, -4.512778, -4.659961, -6.941393, 2.322419, -5.509186, 30.000000, -6.906068, 11.000000, -8.236295, 8.000000, -9.290696, 2.077551, 1.000000, 0.600000, 0.477551] test_list.append(species2_primitiveVenturi_mixingmodel_heatcapacity_H2) # 2 species (1 eq) primitive venturi mixing using mixing model including heat capacity and mass diffusivity NonDimensional case @@ -1601,7 +1601,7 @@ def main(): species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg_dir = "species_transport/venturi_primitive_3species" species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg_file = "species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg" species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.test_iter = 50 - species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.test_vals = [-5.429311, -4.805894, -4.943400, -7.978127, 2.012275, -5.115722, 10.000000, -2.264471, 2.000000, -5.061843, 4.000000, -5.055035, 2.077660, 1.000000, 0.600000, 0.477660] + species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.test_vals = [-5.418710, -4.796715, -4.930132, -7.722998, 2.018220, -5.114320, 10.000000, -2.265326, 4.000000, -5.351738, 4.000000, -5.060011, 2.077776, 1.000000, 0.600000, 0.477776] test_list.append(species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND) # 2 species (1 eq) primitive venturi mixing @@ -1609,7 +1609,7 @@ def main(): species2_primitiveVenturi.cfg_dir = "species_transport/venturi_primitive_3species" species2_primitiveVenturi.cfg_file = "species2_primitiveVenturi.cfg" species2_primitiveVenturi.test_iter = 50 - species2_primitiveVenturi.test_vals = [-5.919132, -4.941085, -4.919763, -5.717215, -1.405791, -6.087254, 5.000000, -0.524653, 5.000000, -2.608809, 5.000000, -0.351723, 0.000113, 0.000112, 0.000000, 0.000000] + species2_primitiveVenturi.test_vals = [-5.558877, -4.529177, -4.568986, -5.394648, -0.920813, -5.679485, 5.000000, -0.597225, 5.000000, -2.602079, 5.000000, -0.548939, 0.000037, 0.000037, 0.000000, 0.000000] test_list.append(species2_primitiveVenturi) # 2 species (1 eq) primitive venturi mixing with bounded scalar transport @@ -1617,7 +1617,7 @@ def main(): species_primitiveVenturi_boundedscalar.cfg_dir = "species_transport/venturi_primitive_3species" species_primitiveVenturi_boundedscalar.cfg_file = "species2_primitiveVenturi_boundedscalar.cfg" species_primitiveVenturi_boundedscalar.test_iter = 50 - species_primitiveVenturi_boundedscalar.test_vals = [-5.534441, -4.368794, -4.465911, -5.935827, -0.867763, -5.633723, 5.000000, -1.470749, 5.000000, -4.161492, 5.000000, -1.724769, 0.000434, 0.000434, 0.000000, 0.000000] + species_primitiveVenturi_boundedscalar.test_vals = [-5.539052, -4.376789, -4.477172, -5.579444, -0.871002, -5.633907, 5.000000, -1.460361, 5.000000, -4.141551, 5.000000, -1.727113, 0.000438, 0.000438, 0.000000, 0.000000] test_list.append(species_primitiveVenturi_boundedscalar) # 2 species (1 eq) primitive venturi mixing using mixing model including inlet markers for turbulent intensity and viscosity ratios @@ -1625,7 +1625,7 @@ def main(): species2_primitiveVenturi_mixingmodel_TURBULENT_MARKERS.cfg_dir = "species_transport/venturi_primitive_3species" species2_primitiveVenturi_mixingmodel_TURBULENT_MARKERS.cfg_file = "species2_primitiveVenturi_mixingmodel_TURBULENT_MARKERS.cfg" species2_primitiveVenturi_mixingmodel_TURBULENT_MARKERS.test_iter = 50 - species2_primitiveVenturi_mixingmodel_TURBULENT_MARKERS.test_vals = [-4.565556, -1.773987, -1.569972, -0.978893, 1.693213, -3.843844, 23.000000, -5.040721, 10.000000, -5.559387, 3.000000, -5.370252, 2.000000, 1.000000, 0.000000, 1.000000] + species2_primitiveVenturi_mixingmodel_TURBULENT_MARKERS.test_vals = [-4.552043, -1.787188, -1.552953, -0.964948, 1.707903, -3.855700, 24.000000, -5.203239, 10.000000, -5.176998, 3.000000, -5.329906, 2.000000, 1.000000, 0.000000, 1.000000] test_list.append(species2_primitiveVenturi_mixingmodel_TURBULENT_MARKERS) # 3 species (2 eq) primitive venturi mixing with inlet files. @@ -1634,7 +1634,7 @@ def main(): species3_primitiveVenturi_inletFile.cfg_dir = "species_transport/venturi_primitive_3species" species3_primitiveVenturi_inletFile.cfg_file = "species3_primitiveVenturi_inletFile.cfg" species3_primitiveVenturi_inletFile.test_iter = 50 - species3_primitiveVenturi_inletFile.test_vals = [-5.989944, -5.011655, -4.990373, -5.787315, -1.475219, -6.316068, -6.446277, 5.000000, -0.525858, 5.000000, -2.609037, 5.000000, -0.362429] + species3_primitiveVenturi_inletFile.test_vals = [-5.537438, -4.503863, -4.553632, -5.400874, -0.945967, -5.818774, -5.945211, 5.000000, -0.544749, 5.000000, -2.599435, 5.000000, -0.596360] test_list.append(species3_primitiveVenturi_inletFile) # rectangle passive transport validation @@ -1651,7 +1651,7 @@ def main(): species3_multizone_restart.cfg_dir = "species_transport/multizone" species3_multizone_restart.cfg_file = "configMaster.cfg" species3_multizone_restart.test_iter = 5 - species3_multizone_restart.test_vals = [-3.715625, -3.070578] + species3_multizone_restart.test_vals = [-3.723247, -3.108855] species3_multizone_restart.multizone = True test_list.append(species3_multizone_restart) diff --git a/TestCases/parallel_regression_AD.py b/TestCases/parallel_regression_AD.py index ce5ed630cc01..7d1dd1bfb63f 100644 --- a/TestCases/parallel_regression_AD.py +++ b/TestCases/parallel_regression_AD.py @@ -92,7 +92,7 @@ def main(): discadj_rans_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" discadj_rans_naca0012_sst.test_iter = 10 discadj_rans_naca0012_sst.test_vals = [-2.265044, -0.279938, -2.268100, -0.002968] - discadj_rans_naca0012_sst.test_vals_aarch64 = [-2.265044, -0.279938, -2.268100, -0.002968] + discadj_rans_naca0012_sst.test_vals_aarch64 = [-2.265011, -0.279043, -2.268100, -0.002969] test_list.append(discadj_rans_naca0012_sst) ####################################### @@ -137,8 +137,8 @@ def main(): discadj_incomp_turb_NACA0012_sst.cfg_dir = "disc_adj_incomp_rans/naca0012" discadj_incomp_turb_NACA0012_sst.cfg_file = "turb_naca0012_sst.cfg" discadj_incomp_turb_NACA0012_sst.test_iter = 10 - discadj_incomp_turb_NACA0012_sst.test_vals = [-3.944706, -2.788179, -7.913889, 0.000000, -0.956513] - discadj_incomp_turb_NACA0012_sst.test_vals_aarch64 = [-3.944706, -2.788179, -7.913889, 0.000000, -0.956513] + discadj_incomp_turb_NACA0012_sst.test_vals = [-4.294502, -3.069650, -7.086569, 0.000000, -1.151213] + discadj_incomp_turb_NACA0012_sst.test_vals_aarch64 = [-4.294502, -3.069650, -7.086569, 0.000000, -1.151213] test_list.append(discadj_incomp_turb_NACA0012_sst) #################################################################### @@ -150,7 +150,7 @@ def main(): discadj_axisymmetric_rans_nozzle.cfg_dir = "axisymmetric_rans/air_nozzle" discadj_axisymmetric_rans_nozzle.cfg_file = "air_nozzle_restart.cfg" discadj_axisymmetric_rans_nozzle.test_iter = 10 - discadj_axisymmetric_rans_nozzle.test_vals = [9.738507, 5.143637, 7.119665, 2.505997] + discadj_axisymmetric_rans_nozzle.test_vals = [9.738436, 5.143639, 7.118168, 2.506624] discadj_axisymmetric_rans_nozzle.no_restart = True test_list.append(discadj_axisymmetric_rans_nozzle) @@ -299,7 +299,7 @@ def main(): da_sp_pinArray_cht_2d_dp_hf.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_2d" da_sp_pinArray_cht_2d_dp_hf.cfg_file = "DA_configMaster.cfg" da_sp_pinArray_cht_2d_dp_hf.test_iter = 100 - da_sp_pinArray_cht_2d_dp_hf.test_vals = [-4.754828, -4.058323, -4.137408] + da_sp_pinArray_cht_2d_dp_hf.test_vals = [-4.755247, -4.057866, -4.137464] da_sp_pinArray_cht_2d_dp_hf.multizone = True test_list.append(da_sp_pinArray_cht_2d_dp_hf) @@ -308,7 +308,7 @@ def main(): da_sp_pinArray_cht_2d_mf.cfg_dir = "incomp_navierstokes/streamwise_periodic/dp-adjoint_chtPinArray_2d" da_sp_pinArray_cht_2d_mf.cfg_file = "configMaster.cfg" da_sp_pinArray_cht_2d_mf.test_iter = 100 - da_sp_pinArray_cht_2d_mf.test_vals = [-4.543396, -1.198883, -1.451287, -18.497517, -0.811918, -6.001418, -19.076086, -49.855384] + da_sp_pinArray_cht_2d_mf.test_vals = [-4.512241, -1.154741, -1.436747, -18.499579, 0.148431, -5.675770, -19.074432, -50.463572] da_sp_pinArray_cht_2d_mf.multizone = True test_list.append(da_sp_pinArray_cht_2d_mf) diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index aba223dcefde..63e5ce757a50 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -226,7 +226,7 @@ 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.510326, 4.944645, 0.812737, 0.061081, 0.000000] + rae2822_sst.test_vals = [-0.510321, 5.387978, 0.812737, 0.061080, 0.000000] test_list.append(rae2822_sst) # RAE2822 SST_SUST @@ -234,7 +234,7 @@ def main(): 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.680659, 4.944645, 0.812737, 0.061080] + rae2822_sst_sust.test_vals = [-2.645780, 5.387978, 0.812737, 0.061080] test_list.append(rae2822_sst_sust) # Flat plate @@ -250,7 +250,7 @@ def main(): turb_wallfunction_flatplate_sst.cfg_dir = "wallfunctions/flatplate/compressible_SST" turb_wallfunction_flatplate_sst.cfg_file = "turb_SST_flatplate.cfg" turb_wallfunction_flatplate_sst.test_iter = 10 - turb_wallfunction_flatplate_sst.test_vals = [-4.587729, -1.908761, -1.968077, 0.903297, -1.608475, 1.497162, 10.000000, -1.733571, 0.033374, 0.002430] + turb_wallfunction_flatplate_sst.test_vals = [-4.581446, -1.913566, -1.958042, 0.909602, -1.602844, 1.482035, 10.000000, -1.741580, 0.033323, 0.002425] test_list.append(turb_wallfunction_flatplate_sst) # FLAT PLATE, WALL FUNCTIONS, COMPRESSIBLE SA @@ -294,7 +294,7 @@ def main(): turb_naca0012_sst_2003m.cfg_dir = "rans/naca0012" turb_naca0012_sst_2003m.cfg_file = "turb_NACA0012_sst_2003m.cfg" turb_naca0012_sst_2003m.test_iter = 10 - turb_naca0012_sst_2003m.test_vals = [-8.617103, -10.718898, -4.021920, 1.046418, 0.019227, -1.708431, 0.000000] + turb_naca0012_sst_2003m.test_vals = [-8.511063, -10.594939, -3.929898, 1.046449, 0.019255, -1.794213, 0.000000] turb_naca0012_sst_2003m.timeout = 3200 test_list.append(turb_naca0012_sst_2003m) @@ -313,7 +313,7 @@ def main(): 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.206634, -10.233383, -1.557783, 1.022024, 0.040554, -3.477756] + turb_naca0012_sst_fixedvalues.test_vals = [-5.206627, -10.433897, 0.774232, 1.021995, 0.040553, -3.477594] turb_naca0012_sst_fixedvalues.timeout = 3200 test_list.append(turb_naca0012_sst_fixedvalues) @@ -350,7 +350,7 @@ def main(): turb_naca0012_sst_restart_mg.cfg_file = "turb_NACA0012_sst_multigrid_restart.cfg" turb_naca0012_sst_restart_mg.test_iter = 50 turb_naca0012_sst_restart_mg.ntest_vals = 5 - turb_naca0012_sst_restart_mg.test_vals = [-7.645513, -7.268192, -1.665656, -0.000027, 0.078643] + turb_naca0012_sst_restart_mg.test_vals = [-7.636677, -7.249261, -1.658770, -0.000037, 0.078656] turb_naca0012_sst_restart_mg.timeout = 3200 turb_naca0012_sst_restart_mg.tol = 0.000001 test_list.append(turb_naca0012_sst_restart_mg) @@ -449,7 +449,7 @@ def main(): inc_turb_naca0012_sst_sust.cfg_dir = "incomp_rans/naca0012" inc_turb_naca0012_sst_sust.cfg_file = "naca0012_SST_SUST.cfg" inc_turb_naca0012_sst_sust.test_iter = 20 - inc_turb_naca0012_sst_sust.test_vals = [-7.291334, 0.132662, 0.000021, 0.312093] + inc_turb_naca0012_sst_sust.test_vals = [-7.169704, 0.332779, 0.000021, 0.312114] test_list.append(inc_turb_naca0012_sst_sust) # FLAT PLATE, WALL FUNCTIONS, INCOMPRESSIBLE SST @@ -457,7 +457,7 @@ def main(): inc_turb_wallfunction_flatplate_sst.cfg_dir = "wallfunctions/flatplate/incompressible_SST" inc_turb_wallfunction_flatplate_sst.cfg_file = "turb_SST_flatplate.cfg" inc_turb_wallfunction_flatplate_sst.test_iter = 10 - inc_turb_wallfunction_flatplate_sst.test_vals = [-6.881306, -5.729111, -6.724803, -4.242636, -7.162846, -2.044959, 10.000000, -2.877924, 0.001151, 0.003161, 0.000000] + inc_turb_wallfunction_flatplate_sst.test_vals = [-6.881641, -5.731978, -6.724751, -4.242639, -7.189696, -2.050920, 10.000000, -2.877747, 0.001149, 0.003172, 0.000000] test_list.append(inc_turb_wallfunction_flatplate_sst) # FLAT PLATE, WALL FUNCTIONS, INCOMPRESSIBLE SA @@ -677,7 +677,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.992341, 1.135213, 0.352815, -0.084443] + turb_naca0012_1c.test_vals = [-4.992302, 1.342930, 0.558118, 0.003328] test_list.append(turb_naca0012_1c) # NACA0012 2c @@ -685,7 +685,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.485201, 0.968804, 0.270412, -0.105544] + turb_naca0012_2c.test_vals = [-5.484718, 1.263401, 0.446364, -0.030455] test_list.append(turb_naca0012_2c) # NACA0012 3c @@ -693,7 +693,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.584365, 0.931915, 0.247973, -0.108789] + turb_naca0012_3c.test_vals = [-5.583767, 1.231735, 0.413049, -0.037990] test_list.append(turb_naca0012_3c) # NACA0012 p1c1 @@ -701,7 +701,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.120106, 1.075360, 0.291660, -0.104760] + turb_naca0012_p1c1.test_vals = [-5.119755, 1.283950, 0.486285, -0.021511] test_list.append(turb_naca0012_p1c1) # NACA0012 p1c2 @@ -709,7 +709,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.549184, 0.946308, 0.249527, -0.112742] + turb_naca0012_p1c2.test_vals = [-5.548631, 1.236601, 0.419149, -0.040387] test_list.append(turb_naca0012_p1c2) ###################################### @@ -769,7 +769,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.175927, 0.062080, 1.399401, 2.220371, 1.399349, 2.218609, 0.000000] + square_cylinder.test_vals = [-2.560839, -1.175927, 0.062095, 1.399401, 2.220371, 1.399349, 2.218609, 0.000000] square_cylinder.unsteady = True test_list.append(square_cylinder) @@ -872,7 +872,7 @@ def main(): 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.090052, 1.551005, -2.895066, 2.607594, -2.479704, 3.063740, 106380.000000, 106380.000000, 5.733600, 64.747000] + axial_stage2D.test_vals = [1.084450, 1.526941, -2.895086, 2.607566, -2.479664, 3.063779, 106380.000000, 106380.000000, 5.733600, 64.749000] test_list.append(axial_stage2D) # 2D transonic stator restart @@ -880,7 +880,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.359175, -2.486698, -2.079382, 1.736046, -1.443172, 3.240049, -471620.000000, 94.840000, -0.055450] + transonic_stator_restart.test_vals = [-4.443399, -2.566758, -2.169300, 1.651817, -1.356398, 3.172531, -471620.000000, 94.843000, -0.044668] transonic_stator_restart.test_vals_aarch64 = [-4.359175, -2.486698, -2.079382, 1.736046, -1.443172, 3.240049, -471620.000000, 94.840000, -0.055450] test_list.append(transonic_stator_restart) @@ -972,7 +972,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, 1.167903, -1.660900] + bars_SST_2D.test_vals = [13.000000, -0.621423, -1.660901] bars_SST_2D.multizone = True test_list.append(bars_SST_2D) @@ -1543,7 +1543,7 @@ def main(): pywrapper_square_cylinder.cfg_dir = "unsteady/square_cylinder" pywrapper_square_cylinder.cfg_file = "turb_square.cfg" pywrapper_square_cylinder.test_iter = 3 - pywrapper_square_cylinder.test_vals = [-2.560839, -1.175927, 0.062080, 1.399401, 2.220371, 1.399349, 2.218609, 0.000000] + pywrapper_square_cylinder.test_vals = [-2.560839, -1.175927, 0.062095, 1.399401, 2.220371, 1.399349, 2.218609, 0.000000] pywrapper_square_cylinder.command = TestCase.Command(exec = "SU2_CFD.py", param = "-f") pywrapper_square_cylinder.timeout = 1600 pywrapper_square_cylinder.tol = 0.00001 @@ -1586,7 +1586,7 @@ def main(): pywrapper_unsteadyCHT.cfg_dir = "py_wrapper/flatPlate_unsteady_CHT" pywrapper_unsteadyCHT.cfg_file = "unsteady_CHT_FlatPlate_Conf.cfg" pywrapper_unsteadyCHT.test_iter = 5 - pywrapper_unsteadyCHT.test_vals = [-1.614167, 2.247359, 0.000771, 0.172997] + pywrapper_unsteadyCHT.test_vals = [-1.614167, 2.264215, 0.000771, 0.172980] pywrapper_unsteadyCHT.command = TestCase.Command(exec = "python", param = "launch_unsteady_CHT_FlatPlate.py -f") pywrapper_unsteadyCHT.timeout = 1600 pywrapper_unsteadyCHT.tol = 0.00001 @@ -1600,7 +1600,7 @@ def main(): pywrapper_rigidMotion.cfg_dir = "py_wrapper/flatPlate_rigidMotion" pywrapper_rigidMotion.cfg_file = "flatPlate_rigidMotion_Conf.cfg" pywrapper_rigidMotion.test_iter = 5 - pywrapper_rigidMotion.test_vals = [-1.614166, 2.243100, 0.350208, 0.089498] + pywrapper_rigidMotion.test_vals = [-1.614166, 2.257995, 0.350208, 0.089496] pywrapper_rigidMotion.command = TestCase.Command(exec = "python", param = "launch_flatPlate_rigidMotion.py -f") pywrapper_rigidMotion.timeout = 1600 pywrapper_rigidMotion.tol = 0.00001 diff --git a/TestCases/serial_regression_AD.py b/TestCases/serial_regression_AD.py index 9cfb3177caa1..064f7bff6cec 100644 --- a/TestCases/serial_regression_AD.py +++ b/TestCases/serial_regression_AD.py @@ -96,7 +96,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.130024, -0.206343, 0.340230, -0.022047] + discadj_rans_naca0012_sst.test_vals = [-2.130056, -0.205502, 0.340180, -0.022050] test_list.append(discadj_rans_naca0012_sst) ####################################### diff --git a/TestCases/tutorials.py b/TestCases/tutorials.py index 4fcc604b40ac..e3e9190f1496 100644 --- a/TestCases/tutorials.py +++ b/TestCases/tutorials.py @@ -80,7 +80,7 @@ def main(): sp_pinArray_2d_mf_hf.cfg_dir = "../Tutorials/incompressible_flow/Inc_Streamwise_Periodic" sp_pinArray_2d_mf_hf.cfg_file = "sp_pinArray_2d_mf_hf.cfg" sp_pinArray_2d_mf_hf.test_iter = 25 - sp_pinArray_2d_mf_hf.test_vals = [-4.666594, 1.403293, -0.758331, 241.626886] + sp_pinArray_2d_mf_hf.test_vals = [-4.685979, 1.388027, -0.755447, 241.878868] test_list.append(sp_pinArray_2d_mf_hf) # 2D pin case pressure drop periodic with heatflux BC and temperature periodicity @@ -88,7 +88,7 @@ def main(): sp_pinArray_2d_dp_hf_tp.cfg_dir = "../Tutorials/incompressible_flow/Inc_Streamwise_Periodic" sp_pinArray_2d_dp_hf_tp.cfg_file = "sp_pinArray_2d_dp_hf_tp.cfg" sp_pinArray_2d_dp_hf_tp.test_iter = 25 - sp_pinArray_2d_dp_hf_tp.test_vals = [-4.718616, 1.341279, -0.716655, 208.023676] + sp_pinArray_2d_dp_hf_tp.test_vals = [-4.732739, 1.326248, -0.713419, 208.023676] test_list.append(sp_pinArray_2d_dp_hf_tp) # 90 degree pipe bend with wall functions from the experiments of Sudo et al. @@ -114,7 +114,7 @@ def main(): sudo_design_adjoint.cfg_dir = "../Tutorials/design/Inc_Turbulent_Bend_Wallfunctions" sudo_design_adjoint.cfg_file = "sudo_adjoint.cfg" sudo_design_adjoint.test_iter = 10 - sudo_design_adjoint.test_vals = [-4.380696, -3.296474, -3.098815, -3.195595, -3.737980, -7.327552] + sudo_design_adjoint.test_vals = [-4.336834, -3.244969, -3.265899, -3.155557, -3.739587, -7.316147] sudo_design_adjoint.command = TestCase.Command("mpirun -n 2", "SU2_CFD_AD") test_list.append(sudo_design_adjoint) @@ -142,7 +142,7 @@ def main(): DAspecies3_primitiveVenturi.cfg_dir = "../Tutorials/incompressible_flow/Inc_Species_Transport" DAspecies3_primitiveVenturi.cfg_file = "DAspecies3_primitiveVenturi.cfg" DAspecies3_primitiveVenturi.test_iter = 50 - DAspecies3_primitiveVenturi.test_vals = [-9.822258, -8.691684, -8.724082, -8.421745, -12.992943, -11.017067, -10.232083] + DAspecies3_primitiveVenturi.test_vals = [-9.806113, -8.630821, -8.666250, -8.333798, -12.914857, -11.017067, -10.232083] DAspecies3_primitiveVenturi.test_vals_aarch64 = [-7.865411, -7.548131, -7.347978, -7.217536, -11.822422, -10.968444, -10.193225] DAspecies3_primitiveVenturi.command = TestCase.Command("mpirun -n 2", "SU2_CFD_AD") test_list.append(DAspecies3_primitiveVenturi) @@ -152,7 +152,7 @@ def main(): kenics_mixer_tutorial.cfg_dir = "../Tutorials/incompressible_flow/Inc_Species_Transport_Composition_Dependent_Model" kenics_mixer_tutorial.cfg_file = "kenics_mixer_tutorial.cfg" kenics_mixer_tutorial.test_iter = 10 - kenics_mixer_tutorial.test_vals = [-7.490002, -6.823162, -6.837602, -6.378680, -7.928782, -3.089710, -7.447882, 5.000000, -1.863053, 4.000000, -5.174845, 3.000000, -6.382936, 0.025471, 0.000000, 0.025471, 0.000000, 64.126000, 8.479400, 48.120000, 7.526800] + kenics_mixer_tutorial.test_vals = [-7.489818, -6.823672, -6.838301, -6.378918, -7.906045, -3.060796, -7.447919, 5.000000, -1.861690, 4.000000, -5.319671, 3.000000, -6.376137, 0.025476, 0.000000, 0.025476, 0.000000, 64.093000, 8.470600, 48.094000, 7.527900] kenics_mixer_tutorial.command = TestCase.Command("mpirun -n 2", "SU2_CFD") test_list.append(kenics_mixer_tutorial) @@ -236,7 +236,7 @@ def main(): tutorial_trans_flatplate_T3A.cfg_dir = "../Tutorials/compressible_flow/Transitional_Flat_Plate/Langtry_and_Menter/T3A" tutorial_trans_flatplate_T3A.cfg_file = "transitional_LM_model_ConfigFile.cfg" tutorial_trans_flatplate_T3A.test_iter = 20 - tutorial_trans_flatplate_T3A.test_vals = [-5.837372, -2.092248, -3.985588, -0.302343, -1.938059, 1.767906, -3.496887, 0.391359] + tutorial_trans_flatplate_T3A.test_vals = [-5.809004, -2.070606, -3.968979, -0.278178, -1.953095, 1.708529, -3.514939, 0.357469] tutorial_trans_flatplate_T3A.test_vals_aarch64 = [-5.837368, -2.092246, -3.984172, -0.302357, -1.928108, 1.667157, -3.496279, 0.391610] tutorial_trans_flatplate_T3A.no_restart = True test_list.append(tutorial_trans_flatplate_T3A) @@ -246,7 +246,7 @@ def main(): tutorial_trans_flatplate_T3Am.cfg_dir = "../Tutorials/compressible_flow/Transitional_Flat_Plate/Langtry_and_Menter/T3A-" tutorial_trans_flatplate_T3Am.cfg_file = "transitional_LM_model_ConfigFile.cfg" tutorial_trans_flatplate_T3Am.test_iter = 20 - tutorial_trans_flatplate_T3Am.test_vals = [-5.887367, -1.965182, -3.915982, -0.391858, -3.893196, 2.628116, -2.486582, 1.346060] + tutorial_trans_flatplate_T3Am.test_vals = [-5.533828, -1.681628, -2.868711, -0.051877, -3.695533, 3.413630, -2.385344, 1.103633] tutorial_trans_flatplate_T3Am.test_vals_aarch64 = [-6.063726, -1.945088, -3.946923, -0.549166, -3.863794, 2.664439, -2.517601, 1.112978] tutorial_trans_flatplate_T3Am.no_restart = True test_list.append(tutorial_trans_flatplate_T3Am) @@ -265,7 +265,7 @@ def main(): tutorial_trans_e387_sst.cfg_dir = "../Tutorials/compressible_flow/Transitional_Airfoil/Langtry_and_Menter/E387" tutorial_trans_e387_sst.cfg_file = "transitional_SST_LM_model_ConfigFile.cfg" tutorial_trans_e387_sst.test_iter = 20 - tutorial_trans_e387_sst.test_vals = [-6.532424, -2.932985, 0.401484, 1.078076, 0.188212, 2.000000, -10.005786] + tutorial_trans_e387_sst.test_vals = [-6.532415, -2.932984, 0.401485, 1.078294, 0.188167, 2.000000, -10.005784] tutorial_trans_e387_sst.no_restart = True test_list.append(tutorial_trans_e387_sst) From 0b2df7d0c481f79736d10b0b4166c094cca3b729 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Thu, 17 Jul 2025 17:09:47 +0100 Subject: [PATCH 20/37] apply suggestions --- Common/include/CConfig.hpp | 12 +-- Common/src/CConfig.cpp | 6 +- SU2_CFD/include/solvers/CScalarSolver.hpp | 96 ++++++++++++++++++++ SU2_CFD/include/solvers/CTurbSolver.hpp | 102 ---------------------- SU2_CFD/src/solvers/CTurbSASolver.cpp | 6 +- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 4 +- SU2_CFD/src/solvers/CTurbSolver.cpp | 5 +- config_template.cfg | 4 +- 8 files changed, 115 insertions(+), 120 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index defe914f24a3..1a83e8a73c55 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -4236,20 +4236,20 @@ class CConfig { su2double GetRelaxation_Factor_CHT(void) const { return Relaxation_Factor_CHT; } /*! - * \brief Get the under-relaxation for flow variables density and energy. - * \return under-relaxation for flow variables. + * \brief Get the maximum update ratio for flow variables- density and energy. + * \return Maximum allowable update ratio for flow variables. */ su2double GetMaxUpdateFractionFlow(void) const { return MaxUpdateFlow; } /*! - * \brief Get the under-relaxation for SA variable, nu_tilde. - * \return under-relaxation for SA variables. + * \brief Get the maximum update ratio for SA variable nu_tilde. + * \return Maximum allowable update ratio for SA variables. */ su2double GetMaxUpdateFractionSA(void) const { return MaxUpdateSA; } /*! - * \brief Get the under-relaxation for SST turbulence variables k and omega. - * \return under-relaxation for SST variables. + * \brief Get the maximum update ratio for SST turbulence variables TKE and Omega. + * \return Maximum allowable update ratio for SST variables. */ su2double GetMaxUpdateFractionSST(void) const { return MaxUpdateSST; } diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index b4ec4f6545ae..6a528be12a74 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1900,11 +1900,11 @@ void CConfig::SetConfig_Options() { addEnumOption("DISCADJ_LIN_PREC", Kind_DiscAdj_Linear_Prec, Linear_Solver_Prec_Map, ILU); /* DESCRIPTION: Linear solver for the discete adjoint systems */ - /* DESCRIPTION: Max value for under-relaxation cap for density and energy variables */ + /* DESCRIPTION: Maximum update ratio value for flow density and energy variables */ addDoubleOption("MAX_UPDATE_FLOW", MaxUpdateFlow, 0.2); - /* DESCRIPTION: Max value for under-relaxation cap for SA turbulence variables */ + /* DESCRIPTION: Maximum update ratio value for SA turbulence variable nu_tilde */ addDoubleOption("MAX_UPDATE_SA", MaxUpdateSA, 0.99); - /* DESCRIPTION: Max value for under-relaxation cap for SST turbulence variables */ + /* DESCRIPTION: Maximum update ratio value for SST turbulence variables TKE and Omega */ addDoubleOption("MAX_UPDATE_SST", MaxUpdateSST, 1.0); /*!\par CONFIG_CATEGORY: Convergence\ingroup Config*/ diff --git a/SU2_CFD/include/solvers/CScalarSolver.hpp b/SU2_CFD/include/solvers/CScalarSolver.hpp index 363226ebd8c3..edd7c21f94af 100644 --- a/SU2_CFD/include/solvers/CScalarSolver.hpp +++ b/SU2_CFD/include/solvers/CScalarSolver.hpp @@ -146,6 +146,102 @@ class CScalarSolver : public CSolver { } } + /*! + * \brief Compute the viscous flux for the turbulence equations at a particular edge for a non-conservative discretisation. + * \tparam SolverSpecificNumericsTemp - lambda-function, to implement solver specific contributions to numerics. + * \note The functor has to implement (iPoint, jPoint) + * \param[in] iEdge - Edge for which we want to compute the flux + * \param[in] geometry - Geometrical definition of the problem. + * \param[in] solver_container - Container vector with all the solutions. + * \param[in] numerics - Description of the numerical method. + * \param[in] config - Definition of the particular problem. + */ + template + void Viscous_Residual_NonCons(const unsigned long iEdge, const CGeometry* geometry, CSolver** solver_container, + CNumerics* numerics, const CConfig* config, SolverSpecificNumericsFunc&& SolverSpecificNumerics) { + const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); + CFlowVariable* flowNodes = solver_container[FLOW_SOL] ? + su2staticcast_p(solver_container[FLOW_SOL]->GetNodes()) : nullptr; + + const auto iPoint = geometry->edges->GetNode(iEdge, 0); + const auto jPoint = geometry->edges->GetNode(iEdge, 1); + + /*--- Lambda function to compute the flux ---*/ + auto ComputeFlux = [&](unsigned long iPoint, unsigned long jPoint, const su2double* normal) { + numerics->SetCoord(geometry->nodes->GetCoord(iPoint),geometry->nodes->GetCoord(jPoint)); + numerics->SetNormal(normal); + + if (flowNodes) { + numerics->SetPrimitive(flowNodes->GetPrimitive(iPoint), flowNodes->GetPrimitive(jPoint)); + } + + /*--- Solver specific numerics contribution. ---*/ + SolverSpecificNumerics(iPoint, jPoint); + + numerics->SetScalarVar(nodes->GetSolution(iPoint), nodes->GetSolution(jPoint)); + numerics->SetScalarVarGradient(nodes->GetGradient(iPoint), nodes->GetGradient(jPoint)); + + return numerics->ComputeResidual(config); + }; + + /*--- Compute fluxes and jacobians i->j ---*/ + const su2double* normal = geometry->edges->GetNormal(iEdge); + auto residual_ij = ComputeFlux(iPoint, jPoint, normal); + + JacobianScalarType *Block_ii = nullptr, *Block_ij = nullptr, *Block_ji = nullptr, *Block_jj = nullptr; + if (implicit) { + Jacobian.GetBlocks(iEdge, iPoint, jPoint, Block_ii, Block_ij, Block_ji, Block_jj); + } + if (ReducerStrategy) { + EdgeFluxes.SubtractBlock(iEdge, residual_ij); + EdgeFluxesDiff.SetBlock(iEdge, residual_ij); + if (implicit) { + /*--- For the reducer strategy the Jacobians are averaged for simplicity. ---*/ + for (int iVar=0; iVari ---*/ + su2double flipped_normal[MAXNDIM]; + for (auto iDim = 0u; iDim < nDim; iDim++) flipped_normal[iDim] = -normal[iDim]; + + auto residual_ji = ComputeFlux(jPoint, iPoint, flipped_normal); + if (ReducerStrategy) { + EdgeFluxesDiff.AddBlock(iEdge, residual_ji); + if (implicit) { + for (int iVar=0; iVar { */ unsigned long RegisterSolutionExtra(bool input, const CConfig* config) final; - /*! - * \brief Compute the viscous flux for the turbulence equations at a particular edge in a non-conservative manner. - * \tparam SolverSpecificNumericsTemp - lambda-function, to implement solver specific contributions to numerics. - * \note The functor has to implement (iPoint, jPoint) - * \param[in] iEdge - Edge for which we want to compute the flux - * \param[in] geometry - Geometrical definition of the problem. - * \param[in] solver_container - Container vector with all the solutions. - * \param[in] numerics - Description of the numerical method. - * \param[in] config - Definition of the particular problem. - */ - inline virtual void Viscous_Residual(const unsigned long iEdge, const CGeometry* geometry, CSolver** solver_container, - CNumerics* numerics, const CConfig* config) {} - template - void TurbViscousResidual(const unsigned long iEdge, const CGeometry* geometry, CSolver** solver_container, - CNumerics* numerics, const CConfig* config, SolverSpecificNumericsTemp&& SolverSpecificNumerics); - /*! * \brief Compute a suitable under-relaxation parameter to limit the change in the solution variables over * a nonlinear iteration for stability. @@ -171,89 +155,3 @@ class CTurbSolver : public CScalarSolver { */ void ComputeUnderRelaxationFactorHelper(su2double allowableRatio); }; - -template -void CTurbSolver::TurbViscousResidual(const unsigned long iEdge, const CGeometry* geometry, CSolver** solver_container, - CNumerics* numerics, const CConfig* config, SolverSpecificNumericsTemp&& SolverSpecificNumerics) { - const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); - CFlowVariable* flowNodes = solver_container[FLOW_SOL] ? - su2staticcast_p(solver_container[FLOW_SOL]->GetNodes()) : nullptr; - - const auto iPoint = geometry->edges->GetNode(iEdge, 0); - const auto jPoint = geometry->edges->GetNode(iEdge, 1); - - /*--- Lambda function to compute the flux ---*/ - auto ComputeFlux = [&](unsigned long iPoint, unsigned long jPoint, const su2double* normal) { - numerics->SetCoord(geometry->nodes->GetCoord(iPoint),geometry->nodes->GetCoord(jPoint)); - numerics->SetNormal(normal); - - if (flowNodes) { - numerics->SetPrimitive(flowNodes->GetPrimitive(iPoint), flowNodes->GetPrimitive(jPoint)); - } - - /*--- Solver specific numerics contribution. ---*/ - SolverSpecificNumerics(iPoint, jPoint); - - numerics->SetScalarVar(nodes->GetSolution(iPoint), nodes->GetSolution(jPoint)); - numerics->SetScalarVarGradient(nodes->GetGradient(iPoint), nodes->GetGradient(jPoint)); - - return numerics->ComputeResidual(config); - }; - - /*--- Compute fluxes and jacobians i->j ---*/ - const su2double* normal = geometry->edges->GetNormal(iEdge); - auto residual_ij = ComputeFlux(iPoint, jPoint, normal); - - JacobianScalarType *Block_ii = nullptr, *Block_ij = nullptr, *Block_ji = nullptr, *Block_jj = nullptr; - if (implicit) { - Jacobian.GetBlocks(iEdge, iPoint, jPoint, Block_ii, Block_ij, Block_ji, Block_jj); - } - if (ReducerStrategy) { - EdgeFluxes.SubtractBlock(iEdge, residual_ij); - EdgeFluxesDiff.SetBlock(iEdge, residual_ij); - if (implicit) { - /*--- For the reducer strategy the Jacobians are averaged for simplicity. ---*/ - for (int iVar=0; iVari ---*/ - su2double flipped_normal[MAXNDIM]; - for (auto iDim = 0u; iDim < nDim; iDim++) flipped_normal[iDim] = -normal[iDim]; - - auto residual_ji = ComputeFlux(jPoint, iPoint, flipped_normal); - if (ReducerStrategy) { - EdgeFluxesDiff.AddBlock(iEdge, residual_ji); - if (implicit) { - for (int iVar=0; iVarSetRoughness(geometry->nodes->GetRoughnessHeight(iPoint), geometry->nodes->GetRoughnessHeight(jPoint)); }; - - TurbViscousResidual(iEdge, geometry, solver_container, numerics, config, SolverSpecificNumerics); + + /*--- Now instantiate the generic non-conservative implementation with the functor above. ---*/ + Viscous_Residual_NonCons(iEdge, geometry, solver_container, numerics, config, SolverSpecificNumerics); } diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 65946f21aa1a..0f58e0821054 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -290,12 +290,14 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai void CTurbSSTSolver::Viscous_Residual(const unsigned long iEdge, const CGeometry* geometry, CSolver** solver_container, CNumerics* numerics, const CConfig* config) { + /*--- Define an object to set solver specific numerics contribution. ---*/ auto SolverSpecificNumerics = [&](unsigned long iPoint, unsigned long jPoint) { /*--- Menter's first blending function (only SST)---*/ numerics->SetF1blending(nodes->GetF1blending(iPoint), nodes->GetF1blending(jPoint)); }; - TurbViscousResidual(iEdge, geometry, solver_container, numerics, config, SolverSpecificNumerics); + /*--- Now instantiate the generic non-conservative implementation with the functor above. ---*/ + Viscous_Residual_NonCons(iEdge, geometry, solver_container, numerics, config, SolverSpecificNumerics); /*--- Points in edge ---*/ auto iPoint = geometry->edges->GetNode(iEdge, 0); diff --git a/SU2_CFD/src/solvers/CTurbSolver.cpp b/SU2_CFD/src/solvers/CTurbSolver.cpp index d75fca046bc7..88c6ed93a3d1 100644 --- a/SU2_CFD/src/solvers/CTurbSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSolver.cpp @@ -255,8 +255,6 @@ void CTurbSolver::ComputeUnderRelaxationFactorHelper(su2double allowableRatio) { for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) { su2double localUnderRelaxation = 1.0; - // loop over variables (for SA, nVar == 1) - for (unsigned short iVar = 0; iVar < nVar; iVar++) { const unsigned long index = iPoint * nVar + iVar; su2double ratio = fabs(LinSysSol[index])/(fabs(nodes->GetSolution(iPoint, iVar)) + EPS); @@ -279,6 +277,5 @@ void CTurbSolver::ComputeUnderRelaxationFactorHelper(su2double allowableRatio) { nodes->SetUnderRelaxation(iPoint, localUnderRelaxation); } - END_SU2_OMP_FOR -} \ No newline at end of file +} diff --git a/config_template.cfg b/config_template.cfg index 19f099e9b1a8..081a5b6d5d1a 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -133,7 +133,7 @@ CONV_WINDOW_CAUCHY_EPS = 1E-3 % Number of elements to apply the criteria CONV_WINDOW_CAUCHY_ELEMS = 10 % -% Cap ratio for updating density and energy variables evaluated by the linear solver relative +% Maximum ratio for updating density and energy variables evaluated by the linear solver relative % to the non-linear solution at previous iteration. Low values ensure stability but may result % in longer convergence times, based on numerical experiments Default= 0.2 MAX_UPDATE_FLOW= 0.2 @@ -141,7 +141,7 @@ MAX_UPDATE_FLOW= 0.2 % Same as MAX_UPDATE_FLOW but for updating nu_tilde variable in SA model, not applicable for Neg model (Default= 0.99) MAX_UPDATE_SA= 0.99 % -% Same as MAX_UPDATE_FLOW but for updating TKE and Omega variables (Default= 1.0) +% Same as MAX_UPDATE_FLOW but for updating TKE and Omega variables in SST model (Default= 1.0) MAX_UPDATE_SST= 1.0 % % ------------------------- TIME-DEPENDENT SIMULATION -------------------------------% From be9d82d46318a31de29a0f08e90a69b3821e62df Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Thu, 17 Jul 2025 17:35:58 +0100 Subject: [PATCH 21/37] loop fix --- .github/workflows/regression.yml | 8 ++++---- SU2_CFD/src/solvers/CTurbSolver.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 73533f6ce341..4b41727b6c4b 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -211,7 +211,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} + args: -b ${{github.ref}} -t feature_sst_diffusion -c feature_updated_SST_diffusion -s ${{matrix.testscript}} - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536 with: @@ -260,7 +260,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tapetests" + args: -b ${{github.ref}} -t feature_sst_diffusion -c feature_updated_SST_diffusion -s ${{matrix.testscript}} -a "--tapetests" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536 with: @@ -306,7 +306,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tsan" + args: -b ${{github.ref}} -t feature_sst_diffusion -c feature_updated_SST_diffusion -s ${{matrix.testscript}} -a "--tsan" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536 with: @@ -351,7 +351,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--asan" + args: -b ${{github.ref}} -t feature_sst_diffusion -c feature_updated_SST_diffusion -s ${{matrix.testscript}} -a "--asan" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536 with: diff --git a/SU2_CFD/src/solvers/CTurbSolver.cpp b/SU2_CFD/src/solvers/CTurbSolver.cpp index 88c6ed93a3d1..fc645b132bc1 100644 --- a/SU2_CFD/src/solvers/CTurbSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSolver.cpp @@ -248,10 +248,10 @@ unsigned long CTurbSolver::RegisterSolutionExtra(bool input, const CConfig* conf void CTurbSolver::ComputeUnderRelaxationFactorHelper(su2double allowableRatio) { - SU2_OMP_FOR_STAT(omp_chunk_size) /* Loop over the solution update given by relaxing the linear system for this nonlinear iteration. */ - + + SU2_OMP_FOR_STAT(omp_chunk_size) for (unsigned long iPoint = 0; iPoint < nPointDomain; iPoint++) { su2double localUnderRelaxation = 1.0; From 80eefad754bb29e4acd0fb1f5eab79e2eb20efd8 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Fri, 18 Jul 2025 15:56:01 +0100 Subject: [PATCH 22/37] more regression updates --- TestCases/hybrid_regression.py | 4 ++-- TestCases/hybrid_regression_AD.py | 2 +- TestCases/parallel_regression.py | 12 ++++++------ TestCases/parallel_regression_AD.py | 4 ++-- TestCases/serial_regression.py | 8 ++++---- TestCases/serial_regression_AD.py | 2 +- TestCases/tutorials.py | 6 +++--- TestCases/vandv.py | 4 ++-- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index 01eaaa1f5acb..bc278745b34b 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -206,7 +206,7 @@ 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.232646, -14.434809, -6.037672, 1.047444, 0.019214, -1.652532, 0.000000] + turb_naca0012_sst.test_vals = [-12.079450, -15.284048, -5.859317, 1.048053, 0.019238, -2.813805, 0.000000] test_list.append(turb_naca0012_sst) # NACA0012 (SST_SUST, FUN3D finest grid results: CL=1.0840, CD=0.01253) @@ -214,7 +214,7 @@ def main(): 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.152294, -14.781143, -6.357944, 1.000270, 0.019123, -1.417707] + turb_naca0012_sst_sust.test_vals = [-12.074803, -14.836720, -5.743612, 1.000050, 0.019144, -2.650992] test_list.append(turb_naca0012_sst_sust) # NACA0012 (SST, fixed values for turbulence quantities) diff --git a/TestCases/hybrid_regression_AD.py b/TestCases/hybrid_regression_AD.py index 023c6e9472ad..f6d1422ac62c 100644 --- a/TestCases/hybrid_regression_AD.py +++ b/TestCases/hybrid_regression_AD.py @@ -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.237469, -0.199286, 2.763100, -0.039615] + discadj_rans_naca0012_sst.test_vals = [-2.236571, -0.190312, 2.762900, -0.039660] test_list.append(discadj_rans_naca0012_sst) ####################################### diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index b53012426226..cbabd9c05310 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -450,7 +450,7 @@ 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.232530, -14.435294, -6.037147, 1.047444, 0.019214, -1.704457, 0.000000] + turb_naca0012_sst.test_vals = [-12.078371, -15.284020, -5.859335, 1.048053, 0.019238, -2.015284, 0.000000] turb_naca0012_sst.test_vals_aarch64 = [-12.232530, -14.435294, -6.037147, 1.047444, 0.019214, -1.704457, 0.000000] turb_naca0012_sst.timeout = 3200 test_list.append(turb_naca0012_sst) @@ -460,7 +460,7 @@ def main(): 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.146171, -14.781592, -6.358755, 1.000270, 0.019123, -1.593320] + turb_naca0012_sst_sust.test_vals = [-12.074975, -14.836721, -5.743391, 1.000050, 0.019144, -2.229495] turb_naca0012_sst_sust.test_vals_aarch64 = [-12.146171, -14.781592, -6.358755, 1.000270, 0.019123, -1.593320] turb_naca0012_sst_sust.timeout = 3200 test_list.append(turb_naca0012_sst_sust) @@ -470,7 +470,7 @@ def main(): turb_naca0012_sst_2003_Vm.cfg_dir = "rans/naca0012" turb_naca0012_sst_2003_Vm.cfg_file = "turb_NACA0012_sst_2003-Vm.cfg" turb_naca0012_sst_2003_Vm.test_iter = 10 - turb_naca0012_sst_2003_Vm.test_vals = [-8.204719, -10.239632, -3.569318, 1.045273, 0.019357, -1.589903] + turb_naca0012_sst_2003_Vm.test_vals = [-8.234051, -10.286378, -3.605338, 1.045785, 0.019357, -1.567481] turb_naca0012_sst_2003_Vm.timeout = 3200 test_list.append(turb_naca0012_sst_2003_Vm) @@ -479,7 +479,7 @@ def main(): turb_naca0012_sst_1994_KLm.cfg_dir = "rans/naca0012" turb_naca0012_sst_1994_KLm.cfg_file = "turb_NACA0012_sst_1994-KLm.cfg" turb_naca0012_sst_1994_KLm.test_iter = 10 - turb_naca0012_sst_1994_KLm.test_vals = [-8.459543, -10.648566, -3.943599, 1.046776, 0.019279, -1.890741] + turb_naca0012_sst_1994_KLm.test_vals = [-8.528055, -10.767185, -4.023786, 1.047306, 0.019277, -1.826633] turb_naca0012_sst_1994_KLm.timeout = 3200 test_list.append(turb_naca0012_sst_1994_KLm) @@ -897,7 +897,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 = [-4.980966, 1.345888, 0.673077, 0.010056] + turb_naca0012_2c.test_vals = [-5.484367, 1.264698, 0.502020, -0.033011] test_list.append(turb_naca0012_2c) # NACA0012 3c @@ -1387,7 +1387,7 @@ def main(): pywrapper_turb_naca0012_sst.cfg_dir = "rans/naca0012" pywrapper_turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" pywrapper_turb_naca0012_sst.test_iter = 10 - pywrapper_turb_naca0012_sst.test_vals = [-12.232530, -14.435294, -6.037147, 1.047444, 0.019214, -1.704457, 0.000000] + pywrapper_turb_naca0012_sst.test_vals = [-12.078371, -15.284020, -5.859335, 1.048053, 0.019238, -2.015284, 0.000000] pywrapper_turb_naca0012_sst.test_vals_aarch64 = [-12.232530, -14.435294, -6.037147, 1.047444, 0.019214, -1.704457, 0.000000] pywrapper_turb_naca0012_sst.command = TestCase.Command("mpirun -np 2", "SU2_CFD.py", "--parallel -f") pywrapper_turb_naca0012_sst.timeout = 3200 diff --git a/TestCases/parallel_regression_AD.py b/TestCases/parallel_regression_AD.py index 7d1dd1bfb63f..e0230caea401 100644 --- a/TestCases/parallel_regression_AD.py +++ b/TestCases/parallel_regression_AD.py @@ -91,7 +91,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.265044, -0.279938, -2.268100, -0.002968] + discadj_rans_naca0012_sst.test_vals = [-2.265304, -0.268780, -2.264900, -0.003033] discadj_rans_naca0012_sst.test_vals_aarch64 = [-2.265011, -0.279043, -2.268100, -0.002969] test_list.append(discadj_rans_naca0012_sst) @@ -150,7 +150,7 @@ def main(): discadj_axisymmetric_rans_nozzle.cfg_dir = "axisymmetric_rans/air_nozzle" discadj_axisymmetric_rans_nozzle.cfg_file = "air_nozzle_restart.cfg" discadj_axisymmetric_rans_nozzle.test_iter = 10 - discadj_axisymmetric_rans_nozzle.test_vals = [9.738436, 5.143639, 7.118168, 2.506624] + discadj_axisymmetric_rans_nozzle.test_vals = [9.731243, 5.137219, 7.154330, 2.832477] discadj_axisymmetric_rans_nozzle.no_restart = True test_list.append(discadj_axisymmetric_rans_nozzle) diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 63e5ce757a50..da70ca09a038 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -284,7 +284,7 @@ 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.229889, -14.434883, -6.037177, 1.047444, 0.019214, -2.108366, 0.000000] + turb_naca0012_sst.test_vals = [-12.079000, -15.284053, -5.859350, 1.048053, 0.019238, -3.272831, 0.000000] turb_naca0012_sst.test_vals_aarch64 = [-12.229890, -14.434837, -6.410709, 1.047444, 0.019214, -2.107944, 0.000000] turb_naca0012_sst.timeout = 3200 test_list.append(turb_naca0012_sst) @@ -294,7 +294,7 @@ def main(): turb_naca0012_sst_2003m.cfg_dir = "rans/naca0012" turb_naca0012_sst_2003m.cfg_file = "turb_NACA0012_sst_2003m.cfg" turb_naca0012_sst_2003m.test_iter = 10 - turb_naca0012_sst_2003m.test_vals = [-8.511063, -10.594939, -3.929898, 1.046449, 0.019255, -1.794213, 0.000000] + turb_naca0012_sst_2003m.test_vals = [-8.586657, -10.688815, -4.010040, 1.046975, 0.019253, -1.717182, 0.000000] turb_naca0012_sst_2003m.timeout = 3200 test_list.append(turb_naca0012_sst_2003m) @@ -303,7 +303,7 @@ def main(): turb_naca0012_sst_sust_restart.cfg_dir = "rans/naca0012" turb_naca0012_sst_sust_restart.cfg_file = "turb_NACA0012_sst_sust.cfg" turb_naca0012_sst_sust_restart.test_iter = 10 - turb_naca0012_sst_sust_restart.test_vals = [-12.157353, -14.781748, -6.359242, 1.000270, 0.019123, -1.780616] + turb_naca0012_sst_sust_restart.test_vals = [-12.075430, -14.836720, -5.743398, 1.000050, 0.019144, -3.329725] turb_naca0012_sst_sust_restart.test_vals_aarch64 = [-12.157374, -14.782027, -6.726462, 1.000270, 0.019123, -1.780624] turb_naca0012_sst_sust_restart.timeout = 3200 test_list.append(turb_naca0012_sst_sust_restart) @@ -1529,7 +1529,7 @@ def main(): pywrapper_turb_naca0012_sst.cfg_dir = "rans/naca0012" pywrapper_turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" pywrapper_turb_naca0012_sst.test_iter = 10 - pywrapper_turb_naca0012_sst.test_vals = [-12.229889, -14.434883, -6.037177, 1.047444, 0.019214, -2.108366, 0.000000] + pywrapper_turb_naca0012_sst.test_vals = [-12.079000, -15.284053, -5.859350, 1.048053, 0.019238, -3.272831, 0.000000] pywrapper_turb_naca0012_sst.test_vals_aarch64 = [-12.229889, -14.434883, -6.037177, 1.047444, 0.019214, -2.108366, 0.000000] pywrapper_turb_naca0012_sst.command = TestCase.Command(exec = "SU2_CFD.py", param = "-f") pywrapper_turb_naca0012_sst.timeout = 3200 diff --git a/TestCases/serial_regression_AD.py b/TestCases/serial_regression_AD.py index 064f7bff6cec..d5e081482261 100644 --- a/TestCases/serial_regression_AD.py +++ b/TestCases/serial_regression_AD.py @@ -96,7 +96,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.130056, -0.205502, 0.340180, -0.022050] + discadj_rans_naca0012_sst.test_vals = [-2.129332, -0.196073, 0.340140, -0.022082] test_list.append(discadj_rans_naca0012_sst) ####################################### diff --git a/TestCases/tutorials.py b/TestCases/tutorials.py index e3e9190f1496..d86131398ca7 100644 --- a/TestCases/tutorials.py +++ b/TestCases/tutorials.py @@ -96,7 +96,7 @@ def main(): sudo_tutorial.cfg_dir = "../Tutorials/incompressible_flow/Inc_Turbulent_Bend_Wallfunctions" sudo_tutorial.cfg_file = "sudo.cfg" sudo_tutorial.test_iter = 10 - sudo_tutorial.test_vals = [-14.664419, -12.789769, -13.280336, -13.016392, -13.018817, -9.510066, 15.000000, -1.994192] + sudo_tutorial.test_vals = [-14.006989, -12.599151, -13.189712, -12.790433, -12.930344, -9.437696, 15.000000, -1.573186] sudo_tutorial.command = TestCase.Command("mpirun -n 2", "SU2_CFD") test_list.append(sudo_tutorial) @@ -134,7 +134,7 @@ def main(): species3_primitiveVenturi.cfg_dir = "../Tutorials/incompressible_flow/Inc_Species_Transport" species3_primitiveVenturi.cfg_file = "species3_primitiveVenturi.cfg" species3_primitiveVenturi.test_iter = 50 - species3_primitiveVenturi.test_vals = [-6.325258, -5.481481, -5.487951, -6.041510, -1.982216, -6.686450, -6.770227, 5.000000, -0.578086, 5.000000, -2.435371, 5.000000, -0.176851, 1.655677, 0.501807, 0.602254, 0.551616] + species3_primitiveVenturi.test_vals = [-5.673008, -4.673131, -4.692722, -5.445021, -1.069687, -5.960203, -6.065022, 5.000000, -0.570021, 5.000000, -2.512831, 5.000000, -0.525792, 1.660602, 0.502278, 0.603347, 0.554978] test_list.append(species3_primitiveVenturi) # 3 species (2 eq) primitive venturi mixing @@ -282,7 +282,7 @@ def main(): tutorial_nicfd_nozzle.cfg_dir = "../Tutorials/compressible_flow/NICFD_nozzle" tutorial_nicfd_nozzle.cfg_file = "NICFD_nozzle.cfg" tutorial_nicfd_nozzle.test_iter = 20 - tutorial_nicfd_nozzle.test_vals = [-2.258703, -2.317269, 3.711051, 0.000000, 0.000000] + tutorial_nicfd_nozzle.test_vals = [-1.799262, -11.343263, 4.631692, 0.000000, 0.000000] tutorial_nicfd_nozzle.no_restart = True test_list.append(tutorial_nicfd_nozzle) diff --git a/TestCases/vandv.py b/TestCases/vandv.py index 8c942e27b631..0ce856a03adc 100644 --- a/TestCases/vandv.py +++ b/TestCases/vandv.py @@ -54,7 +54,7 @@ def main(): flatplate_sst1994m.cfg_dir = "vandv/rans/flatplate" flatplate_sst1994m.cfg_file = "turb_flatplate_sst.cfg" flatplate_sst1994m.test_iter = 5 - flatplate_sst1994m.test_vals = [-13.034112, -9.631829, -10.705034, -7.564954, -9.926380, -4.911151, 0.002786] + flatplate_sst1994m.test_vals = [-13.027324, -10.054934, -11.134650, -7.976571, -10.260300, -4.778563, 0.002796] flatplate_sst1994m.test_vals_aarch64 = [-13.024930, -9.634457, -10.707600, -7.558080, -9.926634, -4.910704, 0.002786] test_list.append(flatplate_sst1994m) @@ -98,7 +98,7 @@ def main(): dsma661_sst.cfg_dir = "vandv/rans/dsma661" dsma661_sst.cfg_file = "dsma661_sst_config.cfg" dsma661_sst.test_iter = 5 - dsma661_sst.test_vals = [-11.010713, -8.424971, -9.045546, -5.969005, -10.556865, -8.053764, 0.155948, 0.023353] + dsma661_sst.test_vals = [-10.994972, -8.484014, -9.144459, -6.025780, -10.590255, -8.031694, 0.155875, 0.023353] test_list.append(dsma661_sst) ########################## From 79e35b6e93a9b73272a5605fccc7cccfcc3358b9 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Tue, 22 Jul 2025 15:00:23 +0100 Subject: [PATCH 23/37] update regression results --- TestCases/parallel_regression_AD.py | 2 +- TestCases/tutorials.py | 4 ++-- TestCases/vandv.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TestCases/parallel_regression_AD.py b/TestCases/parallel_regression_AD.py index e0230caea401..6aa28c41ce8c 100644 --- a/TestCases/parallel_regression_AD.py +++ b/TestCases/parallel_regression_AD.py @@ -150,7 +150,7 @@ def main(): discadj_axisymmetric_rans_nozzle.cfg_dir = "axisymmetric_rans/air_nozzle" discadj_axisymmetric_rans_nozzle.cfg_file = "air_nozzle_restart.cfg" discadj_axisymmetric_rans_nozzle.test_iter = 10 - discadj_axisymmetric_rans_nozzle.test_vals = [9.731243, 5.137219, 7.154330, 2.832477] + discadj_axisymmetric_rans_nozzle.test_vals = [9.748080, 5.149371, 7.147528, 2.805292] discadj_axisymmetric_rans_nozzle.no_restart = True test_list.append(discadj_axisymmetric_rans_nozzle) diff --git a/TestCases/tutorials.py b/TestCases/tutorials.py index d86131398ca7..2a3228c2a1d4 100644 --- a/TestCases/tutorials.py +++ b/TestCases/tutorials.py @@ -105,7 +105,7 @@ def main(): sudo_design_primal.cfg_dir = "../Tutorials/design/Inc_Turbulent_Bend_Wallfunctions" sudo_design_primal.cfg_file = "sudo_primal.cfg" sudo_design_primal.test_iter = 10 - sudo_design_primal.test_vals = [-12.282828, -11.284608, -11.508705, -10.879281, -11.317890, -8.080709, 64.545000] + sudo_design_primal.test_vals = [-12.284057, -10.882408, -11.358456, -10.866265, -11.009547, -7.753843, 64.578000] sudo_design_primal.command = TestCase.Command("mpirun -n 2", "SU2_CFD") test_list.append(sudo_design_primal) @@ -114,7 +114,7 @@ def main(): sudo_design_adjoint.cfg_dir = "../Tutorials/design/Inc_Turbulent_Bend_Wallfunctions" sudo_design_adjoint.cfg_file = "sudo_adjoint.cfg" sudo_design_adjoint.test_iter = 10 - sudo_design_adjoint.test_vals = [-4.336834, -3.244969, -3.265899, -3.155557, -3.739587, -7.316147] + sudo_design_adjoint.test_vals = [-4.352938, -3.312788, -3.140720, -3.237621, -3.789619, -7.366722] sudo_design_adjoint.command = TestCase.Command("mpirun -n 2", "SU2_CFD_AD") test_list.append(sudo_design_adjoint) diff --git a/TestCases/vandv.py b/TestCases/vandv.py index 0ce856a03adc..120a2a0e5208 100644 --- a/TestCases/vandv.py +++ b/TestCases/vandv.py @@ -82,7 +82,7 @@ def main(): swbli_sst.cfg_dir = "vandv/rans/swbli" swbli_sst.cfg_file = "config_sst.cfg" swbli_sst.test_iter = 5 - swbli_sst.test_vals = [-11.502801, -10.850953, -11.573565, -10.370903, -11.405169, -3.864744, 0.001794, -1.451606, -3.606886, 10.000000] + swbli_sst.test_vals = [-11.501567, -10.850906, -11.566872, -10.370341, -11.409505, -2.181479, 0.001796, -1.452456, -2.944206, 10.000000] test_list.append(swbli_sst) # DSMA661 - SA From b5166c153a30d1e82ae26728172377d1f6c1c23b Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Thu, 24 Jul 2025 17:02:46 +0100 Subject: [PATCH 24/37] remove debugging --- SU2_CFD/include/numerics/CNumerics.hpp | 3 - .../numerics/turbulent/turb_diffusion.hpp | 10 +-- SU2_CFD/include/variables/CTurbVariable.hpp | 78 ------------------- SU2_CFD/include/variables/CVariable.hpp | 13 ---- SU2_CFD/src/output/CFlowOutput.cpp | 16 ---- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 12 --- SU2_CFD/src/variables/CTurbVariable.cpp | 8 -- 7 files changed, 1 insertion(+), 139 deletions(-) diff --git a/SU2_CFD/include/numerics/CNumerics.hpp b/SU2_CFD/include/numerics/CNumerics.hpp index 1ee3a2c56b6c..2ad25b65f1b6 100644 --- a/SU2_CFD/include/numerics/CNumerics.hpp +++ b/SU2_CFD/include/numerics/CNumerics.hpp @@ -190,8 +190,6 @@ class CNumerics { bool bounded_scalar = false; /*!< \brief Flag for bounded scalar problem */ - su2double DiffCoeff_kw[6]; /*!< \brief Storage for diffusion coefficient*/ - public: /*! * \brief Return type used in some "ComputeResidual" overloads to give a @@ -708,7 +706,6 @@ class CNumerics { * \param[in] val_CDkw_i - Value of the cross diffusion at point i. */ virtual void SetCrossDiff(su2double val_CDkw_i) {/* empty */}; - inline su2double GetDiffCoeff_kw(int index) const {return DiffCoeff_kw[index];} /*! * \brief Set the value of the effective intermittency for the LM model. diff --git a/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp b/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp index 1650402b034a..1b7cb70b4fb2 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp @@ -288,15 +288,7 @@ class CAvgGrad_TurbSST final : public CAvgGrad_Scalar { const su2double diff_omega_T3 = -ScalarVar_i[1] * lambda_ij/w_ij; const su2double diff_omega = diff_omega_T1 + diff_omega_T2 + diff_omega_T3; - - /* Store some variables for debugging, REMOVE LATER.*/ - CNumerics::DiffCoeff_kw[0] = diff_kine; - CNumerics::DiffCoeff_kw[1] = diff_omega; - CNumerics::DiffCoeff_kw[2] = diff_omega_T1; - CNumerics::DiffCoeff_kw[3] = diff_omega_T2; - CNumerics::DiffCoeff_kw[4] = diff_omega_T3; - CNumerics::DiffCoeff_kw[5] = lambda_ij; - + Flux[0] = diff_kine*Proj_Mean_GradScalarVar[0]; Flux[1] = diff_omega_T1*Proj_Mean_GradScalarVar[1] + (diff_omega_T2 + diff_omega_T3)*Proj_Mean_GradScalarVar[0]; diff --git a/SU2_CFD/include/variables/CTurbVariable.hpp b/SU2_CFD/include/variables/CTurbVariable.hpp index 8dc37e9910c4..09720de20296 100644 --- a/SU2_CFD/include/variables/CTurbVariable.hpp +++ b/SU2_CFD/include/variables/CTurbVariable.hpp @@ -43,28 +43,6 @@ class CTurbVariable : public CScalarVariable { static constexpr size_t MAXNVAR = 2; VectorType turb_index; VectorType intermittency; /*!< \brief Value of the intermittency for the trans. model. */ - VectorType DC_TKE; /*!< \brief TKE Diffusion Coefficient. */ - VectorType DC_Omega; /*!< \brief Omega Diffusion Coefficient. */ - VectorType DC_OmegaT1; - VectorType DC_OmegaT2; - VectorType DC_OmegaT3; - VectorType DC_Omega_kc; - VectorType DC_Omega_so2i; - VectorType DC_Omega_Coi; - VectorType DC_Omega_Coj; - VectorType DC_Omega_F1i; - VectorType DC_Omega_F1j; - VectorType DC_Omega_so2j; - VectorType DC_Omega_mui; - VectorType DC_Omega_muj; - VectorType DC_Omega_muti; - VectorType DC_Omega_mutj; - VectorType DC_Omega_rhoi; - VectorType DC_Omega_rhoj; - VectorType DC_Omega_ki; - VectorType DC_Omega_kj; - VectorType DC_Omega_wi; - VectorType DC_Omega_wj; /*! * \brief Constructor of the class. @@ -127,62 +105,6 @@ class CTurbVariable : public CScalarVariable { * \param[in] iPoint - Point index. * \param[in] val_DC_kw - diffusion coefficient value */ - inline void SetDiffCoeff_kw(unsigned long iPoint, su2double* val_DC_kw) { - DC_TKE(iPoint) = val_DC_kw[0]; - DC_Omega(iPoint) = val_DC_kw[1]; - DC_OmegaT1(iPoint) = val_DC_kw[2]; - DC_OmegaT2(iPoint) = val_DC_kw[3]; - DC_OmegaT3(iPoint) = val_DC_kw[4]; - DC_Omega_kc(iPoint) = val_DC_kw[5]; - } - - /*! - * \brief Get the diffusion coefficient value of TKE. - * \param[in] iPoint - Point index. - */ - inline su2double GetTKE_DC(unsigned long iPoint) const final { - return DC_TKE(iPoint); - } - - /*! - * \brief Get the diffusion coefficient value of omega. - * \param[in] iPoint - Point index. - */ - inline su2double GetOmega_DC(unsigned long iPoint) const final { - return DC_Omega(iPoint); - } - - /*! - * \brief Get omega diffusion coefficient Term 1. - * \param[in] iPoint - Point index. - */ - inline su2double GetOmega_DCT1(unsigned long iPoint) const final { - return DC_OmegaT1(iPoint); - } - - /*! - * \brief Get omega diffusion coefficient Term 2. - * \param[in] iPoint - Point index. - */ - inline su2double GetOmega_DCT2(unsigned long iPoint) const final { - return DC_OmegaT2(iPoint); - } - - /*! - * \brief Get omega diffusion coefficient Term 3. - * \param[in] iPoint - Point index. - */ - inline su2double GetOmega_DCT3(unsigned long iPoint) const final { - return DC_OmegaT3(iPoint); - } - - /*! - * \brief Get the clip value kc used in omega diffusion coeffient. - * \param[in] iPoint - Point index. - */ - inline su2double GetOmega_DC_kc(unsigned long iPoint) const final { - return DC_Omega_kc(iPoint); - } /*! * \brief Register eddy viscosity (muT) as Input or Output of an AD recording. diff --git a/SU2_CFD/include/variables/CVariable.hpp b/SU2_CFD/include/variables/CVariable.hpp index a0afd46ee388..71052c876137 100644 --- a/SU2_CFD/include/variables/CVariable.hpp +++ b/SU2_CFD/include/variables/CVariable.hpp @@ -1673,19 +1673,6 @@ class CVariable { */ inline virtual su2double GetCrossDiff(unsigned long iPoint) const { return 0.0; } - /*! - * \brief Get the value of the diffusion coefficient of tke and omega equations. - * \param[in] ipoint - * \param[in] val_diff_coeff - */ - inline virtual void SetDiffCoeff_kw(unsigned long iPoint, su2double* val_DiffCoeff) const { } - inline virtual su2double GetTKE_DC(unsigned long iPoint) const {return 0.0; } - inline virtual su2double GetOmega_DC(unsigned long iPoint) const {return 0.0; } - inline virtual su2double GetOmega_DCT1(unsigned long iPoint) const {return 0.0; } - inline virtual su2double GetOmega_DCT2(unsigned long iPoint) const {return 0.0; } - inline virtual su2double GetOmega_DCT3(unsigned long iPoint) const {return 0.0; } - inline virtual su2double GetOmega_DC_kc(unsigned long iPoint) const {return 0.0; } - /*! * \brief Get the value of the eddy viscosity. * \return the value of the eddy viscosity. diff --git a/SU2_CFD/src/output/CFlowOutput.cpp b/SU2_CFD/src/output/CFlowOutput.cpp index ea24bf8f0f72..aae57d7fb0d0 100644 --- a/SU2_CFD/src/output/CFlowOutput.cpp +++ b/SU2_CFD/src/output/CFlowOutput.cpp @@ -1256,14 +1256,6 @@ void CFlowOutput::SetVolumeOutputFieldsScalarSolution(const CConfig* config){ case TURB_FAMILY::KW: AddVolumeOutput("TKE", "Turb_Kin_Energy", "SOLUTION", "Turbulent kinetic energy"); AddVolumeOutput("DISSIPATION", "Omega", "SOLUTION", "Rate of dissipation"); - AddVolumeOutput("DIFF_COEFF_TKE", "TKE_Diff_Coeff", "SOLUTION", "Diffusion Coefficient for TKE equation"); - AddVolumeOutput("DIFF_COEFF_Omega", "Omega_Diff_Coeff", "SOLUTION", "Toal Diffusion Coefficient for Omega equation"); - AddVolumeOutput("DIFF_COEFF_OmegaT1", "w_DiffCoeff_T1", "SOLUTION", "Term 1 in Diffusion Coefficient for Omega equation"); - AddVolumeOutput("DIFF_COEFF_OmegaT2", "w_DiffCoeff_T2", "SOLUTION", "Term 2 in Diffusion Coefficient for Omega equation"); - AddVolumeOutput("DIFF_COEFF_OmegaT3", "w_DiffCoeff_T3", "SOLUTION", "Term 3 in Diffusion Coefficient for Omega equation"); - AddVolumeOutput("DIFF_COEFF_Omegakc", "w_DiffCoeff_kc", "SOLUTION", "kc value in Diffusion Coefficient for Omega equation"); - AddVolumeOutput("CDkw", "CDkw", "SOLUTION", "Cross-Diffusion term"); - AddVolumeOutput("F1", "F1", "SOLUTION", "F1 blending function"); break; case TURB_FAMILY::NONE: @@ -1551,14 +1543,6 @@ void CFlowOutput::LoadVolumeDataScalar(const CConfig* config, const CSolver* con case TURB_FAMILY::KW: SetVolumeOutputValue("TKE", iPoint, Node_Turb->GetSolution(iPoint, 0)); SetVolumeOutputValue("DISSIPATION", iPoint, Node_Turb->GetSolution(iPoint, 1)); - SetVolumeOutputValue("DIFF_COEFF_TKE", iPoint, Node_Turb->GetTKE_DC(iPoint)); - SetVolumeOutputValue("DIFF_COEFF_Omega", iPoint, Node_Turb->GetOmega_DC(iPoint)); - SetVolumeOutputValue("CDkw", iPoint, Node_Turb->GetCrossDiff(iPoint)); - SetVolumeOutputValue("F1", iPoint, Node_Turb->GetF1blending(iPoint)); - SetVolumeOutputValue("DIFF_COEFF_OmegaT1", iPoint, Node_Turb->GetOmega_DCT1(iPoint)); - SetVolumeOutputValue("DIFF_COEFF_OmegaT2", iPoint, Node_Turb->GetOmega_DCT2(iPoint)); - SetVolumeOutputValue("DIFF_COEFF_OmegaT3", iPoint, Node_Turb->GetOmega_DCT3(iPoint)); - SetVolumeOutputValue("DIFF_COEFF_Omegakc", iPoint, Node_Turb->GetOmega_DC_kc(iPoint)); SetVolumeOutputValue("RES_TKE", iPoint, turb_solver->LinSysRes(iPoint, 0)); SetVolumeOutputValue("RES_DISSIPATION", iPoint, turb_solver->LinSysRes(iPoint, 1)); if (limiter) { diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 0f58e0821054..614c45f94dfc 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -299,18 +299,6 @@ void CTurbSSTSolver::Viscous_Residual(const unsigned long iEdge, const CGeometry /*--- Now instantiate the generic non-conservative implementation with the functor above. ---*/ Viscous_Residual_NonCons(iEdge, geometry, solver_container, numerics, config, SolverSpecificNumerics); - /*--- Points in edge ---*/ - auto iPoint = geometry->edges->GetNode(iEdge, 0); - - su2double DC_kw[6]; - DC_kw[0] = numerics->GetDiffCoeff_kw(0); - DC_kw[1] = numerics->GetDiffCoeff_kw(1); - DC_kw[2] = numerics->GetDiffCoeff_kw(2); - DC_kw[3] = numerics->GetDiffCoeff_kw(3); - DC_kw[4] = numerics->GetDiffCoeff_kw(4); - DC_kw[5] = numerics->GetDiffCoeff_kw(5); - - nodes->SetDiffCoeff_kw(iPoint, DC_kw); } void CTurbSSTSolver::Source_Residual(CGeometry *geometry, CSolver **solver_container, diff --git a/SU2_CFD/src/variables/CTurbVariable.cpp b/SU2_CFD/src/variables/CTurbVariable.cpp index f0216ccb7ea5..25a6a6801ef6 100644 --- a/SU2_CFD/src/variables/CTurbVariable.cpp +++ b/SU2_CFD/src/variables/CTurbVariable.cpp @@ -35,14 +35,6 @@ CTurbVariable::CTurbVariable(unsigned long npoint, unsigned long ndim, unsigned turb_index.resize(nPoint) = su2double(1.0); intermittency.resize(nPoint) = su2double(1.0); - if (TurbModelFamily(config->GetKind_Turb_Model()) == TURB_FAMILY::KW) { - DC_TKE.resize(nPoint) = su2double(1.0); - DC_Omega.resize(nPoint) = su2double(1.0); - DC_OmegaT1.resize(nPoint) = su2double(1.0); - DC_OmegaT2.resize(nPoint) = su2double(1.0); - DC_OmegaT3.resize(nPoint) = su2double(1.0); - DC_Omega_kc.resize(nPoint) = su2double(1.0); - } } void CTurbVariable::RegisterEddyViscosity(bool input) { From 61ecfce8d10e6b2e03627c4b39c60850aff8759d Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Thu, 24 Jul 2025 17:45:23 +0100 Subject: [PATCH 25/37] remove AD accumulation of CDkw_i --- SU2_CFD/include/numerics/turbulent/turb_sources.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp index bcc24457279b..a1209b15bdea 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp @@ -772,7 +772,6 @@ class CSourcePieceWise_TurbSST final : public CNumerics { AD::SetPreaccIn(dist_i); AD::SetPreaccIn(F1_i); AD::SetPreaccIn(F2_i); - AD::SetPreaccIn(CDkw_i); AD::SetPreaccIn(PrimVar_Grad_i, nDim + idx.Velocity(), nDim); AD::SetPreaccIn(Vorticity_i, 3); AD::SetPreaccIn(V_i[idx.Density()], V_i[idx.LaminarViscosity()], V_i[idx.EddyViscosity()]); From 59d1b044f1c3af03fc51a9493e86c3fef8ca0c5c Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Thu, 24 Jul 2025 17:45:47 +0100 Subject: [PATCH 26/37] update regression --- TestCases/parallel_regression.py | 2 +- TestCases/parallel_regression_AD.py | 2 +- TestCases/vandv.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 3db72f669b8f..a6d6288e005d 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -530,7 +530,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.067375, -6.838713, -8.845034, -3.786225, 0.000000] + axi_rans_air_nozzle_restart.test_vals = [-14.803856, -9.213258, 0.478298, 6.060787, 0.000000] axi_rans_air_nozzle_restart.tol = 0.0001 test_list.append(axi_rans_air_nozzle_restart) diff --git a/TestCases/parallel_regression_AD.py b/TestCases/parallel_regression_AD.py index 6aa28c41ce8c..03b4719dc2b5 100644 --- a/TestCases/parallel_regression_AD.py +++ b/TestCases/parallel_regression_AD.py @@ -150,7 +150,7 @@ def main(): discadj_axisymmetric_rans_nozzle.cfg_dir = "axisymmetric_rans/air_nozzle" discadj_axisymmetric_rans_nozzle.cfg_file = "air_nozzle_restart.cfg" discadj_axisymmetric_rans_nozzle.test_iter = 10 - discadj_axisymmetric_rans_nozzle.test_vals = [9.748080, 5.149371, 7.147528, 2.805292] + discadj_axisymmetric_rans_nozzle.test_vals = [9.748075, 5.149375, 7.147505, 2.805312] discadj_axisymmetric_rans_nozzle.no_restart = True test_list.append(discadj_axisymmetric_rans_nozzle) diff --git a/TestCases/vandv.py b/TestCases/vandv.py index 120a2a0e5208..522e78369a76 100644 --- a/TestCases/vandv.py +++ b/TestCases/vandv.py @@ -63,7 +63,7 @@ def main(): bump_sst1994m.cfg_dir = "vandv/rans/bump_in_channel" bump_sst1994m.cfg_file = "turb_bump_sst.cfg" bump_sst1994m.test_iter = 5 - bump_sst1994m.test_vals = [-13.058028, -10.648326, -10.605014, -7.606233, -10.707705, -5.453705, 0.004903] + bump_sst1994m.test_vals = [-13.008230, -10.783833, -10.606431, -7.615579, -10.787580, -5.284786, 0.004911] bump_sst1994m.test_vals_aarch64 = [-13.025265, -10.669816, -10.615338, -7.577125, -10.709448, -5.453868, 0.004903] test_list.append(bump_sst1994m) From 4ee5fcdad7a2a7eac150e582ddf1f80e0a5bf7ad Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Thu, 24 Jul 2025 18:13:48 +0100 Subject: [PATCH 27/37] remove unused var --- SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp b/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp index 1b7cb70b4fb2..a6185f51bcd5 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_diffusion.hpp @@ -287,8 +287,6 @@ class CAvgGrad_TurbSST final : public CAvgGrad_Scalar { const su2double diff_omega_T3 = -ScalarVar_i[1] * lambda_ij/w_ij; - const su2double diff_omega = diff_omega_T1 + diff_omega_T2 + diff_omega_T3; - Flux[0] = diff_kine*Proj_Mean_GradScalarVar[0]; Flux[1] = diff_omega_T1*Proj_Mean_GradScalarVar[1] + (diff_omega_T2 + diff_omega_T3)*Proj_Mean_GradScalarVar[0]; From 1e1066474306c2aee78f344525f7d1ef70364e5e Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Fri, 25 Jul 2025 10:58:04 +0100 Subject: [PATCH 28/37] update regression --- TestCases/hybrid_regression.py | 2 +- .../streamwise_periodic/chtPinArray_2d/of_grad_findiff.csv.ref | 2 +- TestCases/parallel_regression.py | 2 +- TestCases/serial_regression.py | 2 +- TestCases/vandv.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index 639a017c119a..c5c0f9905e33 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -556,7 +556,7 @@ 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.308010, -5.332065, -14.895822, -9.330703, -12.071733, -6.548623, 73291.000000, 73291.000000, 0.020111, 82.896000] + Jones_tc_restart.test_vals = [-7.639851, -5.844035, -15.330764, -9.819518, -13.210286, -7.746465, 73286.000000, 73286.000000, 0.020055, 82.286000] test_list.append(Jones_tc_restart) # 2D axial stage diff --git a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/of_grad_findiff.csv.ref b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/of_grad_findiff.csv.ref index ac3cc62550ad..cd2ddd6a2c6c 100644 --- a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/of_grad_findiff.csv.ref +++ b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/of_grad_findiff.csv.ref @@ -1,2 +1,2 @@ "VARIABLE" , "AVG_DENSITY[0]", "AVG_ENTHALPY[0]", "AVG_NORMALVEL[0]", "DRAG[0]" , "EFFICIENCY[0]" , "FORCE_X[0]" , "FORCE_Y[0]" , "FORCE_Z[0]" , "LIFT[0]" , "MOMENT_X[0]" , "MOMENT_Y[0]" , "MOMENT_Z[0]" , "SIDEFORCE[0]" , "SURFACE_MACH[0]", "SURFACE_MASSFLOW[0]", "SURFACE_MOM_DISTORTION[0]", "SURFACE_PRESSURE_DROP[0]", "SURFACE_SECONDARY[0]", "SURFACE_SECOND_OVER_UNIFORM[0]", "SURFACE_STATIC_PRESSURE[0]", "SURFACE_STATIC_TEMPERATURE[0]", "SURFACE_TOTAL_PRESSURE[0]", "SURFACE_TOTAL_TEMPERATURE[0]", "SURFACE_UNIFORMITY[0]", "AVG_TEMPERATURE[1]", "TOTAL_HEATFLUX[1]", "FINDIFF_STEP" -0 , 0.0 , -1000000.0242143869, -9.992000000081167e-08, 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , -1.4199999995301305, 0.0 , -36.519999999096164 , 0.0 , 39.07999999996914 , 73.22000000198337 , 6360.000003269306 , -279.99999474559445 , 109.99999915384251 , -290.0000026784255 , -34.39999998189336 , -110.00000199601345, 260.00000161729986, 1e-08 +0 , 0.0 , 0.0 , -3.330699999961374e-08, 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 2.2200000003768e-08, 0.0 , 0.0 , 0.009999995276288587, 0.04000000330961484 , -9.999999406318238 , -20.000004496978363 , -49.999999873762135 , -19.99999312829459 , -0.09999998606957661 , -199.99999949504854, -369.9999979289714, 1e-08 diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index a6d6288e005d..9af6903066c2 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1094,7 +1094,7 @@ 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.308012, -5.332077, -14.895814, -9.330692, -12.071730, -6.548620, 73291.000000, 73291.000000, 0.020111, 82.896000] + Jones_tc_restart.test_vals = [-7.639850, -5.844033, -15.330765, -9.819518, -13.210285, -7.746464, 73286.000000, 73286.000000, 0.020055, 82.286000] test_list.append(Jones_tc_restart) # 2D axial stage diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index f10abbcdf71b..94af8c3c66e7 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -864,7 +864,7 @@ 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.308013, -5.332076, -14.895815, -9.330694, -12.071730, -6.548620, 73291.000000, 73291.000000, 0.020111, 82.896000] + Jones_tc_restart.test_vals = [-7.639846, -5.844033, -15.330766, -9.819520, -13.210285, -7.746464, 73286.000000, 73286.000000, 0.020055, 82.286000] test_list.append(Jones_tc_restart) # 2D axial stage diff --git a/TestCases/vandv.py b/TestCases/vandv.py index 522e78369a76..23486d56ff0f 100644 --- a/TestCases/vandv.py +++ b/TestCases/vandv.py @@ -110,7 +110,7 @@ def main(): sandiajet_sst.cfg_dir = "vandv/species_transport/sandia_jet" sandiajet_sst.cfg_file = "validation.cfg" sandiajet_sst.test_iter = 5 - sandiajet_sst.test_vals = [-17.167460, -14.133874, -15.538854, -14.038830, -10.311748, -15.739547, 5.000000, -2.916316, 5.000000, -5.380194, 5.000000, -4.153689, 0.000258, 0.000000, 0.000000, 0.000258, 4019.500000, 3918.900000, 49.151000, 51.436000] + sandiajet_sst.test_vals = [-17.176580, -13.874388, -15.527373, -12.642932, -10.076847, -15.743858, 5.000000, -2.659012, 5.000000, -5.009351, 5.000000, -3.986162, 0.000257, 0.000000, 0.000000, 0.000257, 4020.500000, 3919.900000, 49.151000, 51.435000] sandiajet_sst.test_vals_aarch64 = [-17.069026, -13.156800, -15.290567, -11.689831, -9.349978, -14.907311, 5.000000, -2.738947, 5.000000, -4.813747, 5.000000, -3.981740, 0.000259, 0.000000, 0.000000, 0.000259, 4047.400000, 3946.800000, 49.161000, 51.433000] test_list.append(sandiajet_sst) From e774ecb1ab93a83fe679049cc8661b591b9b6a44 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Fri, 25 Jul 2025 20:30:36 +0100 Subject: [PATCH 29/37] new config for transonic_stator AD and more regression updates --- .../transonic_stator_2D/transonic_stator.cfg | 18 ++++++++++++++++++ TestCases/hybrid_regression.py | 2 +- TestCases/parallel_regression.py | 2 +- TestCases/parallel_regression_AD.py | 4 ++-- TestCases/serial_regression.py | 2 +- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/TestCases/disc_adj_turbomachinery/transonic_stator_2D/transonic_stator.cfg b/TestCases/disc_adj_turbomachinery/transonic_stator_2D/transonic_stator.cfg index dd023feb86f9..281937376cfa 100644 --- a/TestCases/disc_adj_turbomachinery/transonic_stator_2D/transonic_stator.cfg +++ b/TestCases/disc_adj_turbomachinery/transonic_stator_2D/transonic_stator.cfg @@ -169,6 +169,24 @@ CONV_STARTITER= 10 CONV_CAUCHY_ELEMS= 100 CONV_CAUCHY_EPS= 1E-6 +% ---------------- ADJOINT-FLOW NUMERICAL METHOD DEFINITION -------------------% +% +CONV_NUM_METHOD_ADJFLOW= ROE +MUSCL_ADJFLOW= NO +TIME_DISCRE_ADJFLOW= EULER_IMPLICIT +RELAXATION_FACTOR_ADJOINT= 0.1 +QUASI_NEWTON_NUM_SAMPLES= 20 +CFL_REDUCTION_ADJFLOW= 0.4 +FROZEN_VISC_DISC= YES +INCONSISTENT_DISC= YES + +% ---------------- ADJOINT-TURBULENT NUMERICAL METHOD DEFINITION --------------% +% +CONV_NUM_METHOD_ADJTURB= SCALAR_UPWIND +TIME_DISCRE_ADJTURB= EULER_IMPLICIT +CFL_REDUCTION_ADJTURB= 0.01 +MUSCL_ADJTURB= NO + % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% % MESH_FILENAME= mesh_stator_turb.su2 diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index c5c0f9905e33..3fdb313afb9e 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -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.065954, -6.836372, -8.889803, -3.832665, 0.000000] + axi_rans_air_nozzle_restart.test_vals = [-14.137579, -9.105575, -10.894183, -5.810269, 0.000000] test_list.append(axi_rans_air_nozzle_restart) ################################# diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 9af6903066c2..089873f9301c 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -530,7 +530,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 = [-14.803856, -9.213258, 0.478298, 6.060787, 0.000000] + axi_rans_air_nozzle_restart.test_vals = [-14.140338, -9.122501, -10.859866, -5.788769, 0.000000] axi_rans_air_nozzle_restart.tol = 0.0001 test_list.append(axi_rans_air_nozzle_restart) diff --git a/TestCases/parallel_regression_AD.py b/TestCases/parallel_regression_AD.py index 03b4719dc2b5..642758f2e089 100644 --- a/TestCases/parallel_regression_AD.py +++ b/TestCases/parallel_regression_AD.py @@ -150,7 +150,7 @@ def main(): discadj_axisymmetric_rans_nozzle.cfg_dir = "axisymmetric_rans/air_nozzle" discadj_axisymmetric_rans_nozzle.cfg_file = "air_nozzle_restart.cfg" discadj_axisymmetric_rans_nozzle.test_iter = 10 - discadj_axisymmetric_rans_nozzle.test_vals = [9.748075, 5.149375, 7.147505, 2.805312] + discadj_axisymmetric_rans_nozzle.test_vals = [ 9.748080, 5.149371, 7.147528, 2.805292] discadj_axisymmetric_rans_nozzle.no_restart = True test_list.append(discadj_axisymmetric_rans_nozzle) @@ -299,7 +299,7 @@ def main(): da_sp_pinArray_cht_2d_dp_hf.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_2d" da_sp_pinArray_cht_2d_dp_hf.cfg_file = "DA_configMaster.cfg" da_sp_pinArray_cht_2d_dp_hf.test_iter = 100 - da_sp_pinArray_cht_2d_dp_hf.test_vals = [-4.755247, -4.057866, -4.137464] + da_sp_pinArray_cht_2d_dp_hf.test_vals = [-5.081814, -3.881868, -4.127717] da_sp_pinArray_cht_2d_dp_hf.multizone = True test_list.append(da_sp_pinArray_cht_2d_dp_hf) diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 94af8c3c66e7..c273729dd4da 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -335,7 +335,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.067274, -6.841605, -8.843340, -3.783551, 0.000000] + axi_rans_air_nozzle_restart.test_vals = [-14.141446, -9.134033, -10.848810, -5.776634, 0.000000] axi_rans_air_nozzle_restart.test_vals_aarch64 = [-12.067037, -6.840810, -8.843191, -3.783401, 0.000000] axi_rans_air_nozzle_restart.tol = 0.0001 test_list.append(axi_rans_air_nozzle_restart) From 8196f427f9b2550c92493798bbe8fac0130d68d2 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Fri, 25 Jul 2025 21:23:06 +0100 Subject: [PATCH 30/37] pre-commit --- Common/src/CConfig.cpp | 2 +- config_template.cfg | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 6a528be12a74..c731186f40d3 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1906,7 +1906,7 @@ void CConfig::SetConfig_Options() { addDoubleOption("MAX_UPDATE_SA", MaxUpdateSA, 0.99); /* DESCRIPTION: Maximum update ratio value for SST turbulence variables TKE and Omega */ addDoubleOption("MAX_UPDATE_SST", MaxUpdateSST, 1.0); - + /*!\par CONFIG_CATEGORY: Convergence\ingroup Config*/ /*--- Options related to convergence ---*/ diff --git a/config_template.cfg b/config_template.cfg index 081a5b6d5d1a..b733de0c0a2b 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -133,8 +133,8 @@ CONV_WINDOW_CAUCHY_EPS = 1E-3 % Number of elements to apply the criteria CONV_WINDOW_CAUCHY_ELEMS = 10 % -% Maximum ratio for updating density and energy variables evaluated by the linear solver relative -% to the non-linear solution at previous iteration. Low values ensure stability but may result +% Maximum ratio for updating density and energy variables evaluated by the linear solver relative +% to the non-linear solution at previous iteration. Low values ensure stability but may result % in longer convergence times, based on numerical experiments Default= 0.2 MAX_UPDATE_FLOW= 0.2 % From 9b31116a63ecef404714b7db72b347e6bd7be45f Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Fri, 25 Jul 2025 21:23:37 +0100 Subject: [PATCH 31/37] final regression tests --- TestCases/hybrid_regression_AD.py | 4 ++-- TestCases/parallel_regression_AD.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/TestCases/hybrid_regression_AD.py b/TestCases/hybrid_regression_AD.py index f6d1422ac62c..88494de9ca54 100644 --- a/TestCases/hybrid_regression_AD.py +++ b/TestCases/hybrid_regression_AD.py @@ -199,8 +199,8 @@ 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.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.test_vals = [79, 0.733453, 0.524022, 0.561758, -0.965794] + discadj_trans_stator.test_vals_aarch64 = [79, 0.733453, 0.524022, 0.561758, -0.965794] discadj_trans_stator.enabled_with_tsan = False test_list.append(discadj_trans_stator) diff --git a/TestCases/parallel_regression_AD.py b/TestCases/parallel_regression_AD.py index 642758f2e089..0922b45bde68 100644 --- a/TestCases/parallel_regression_AD.py +++ b/TestCases/parallel_regression_AD.py @@ -150,7 +150,7 @@ def main(): discadj_axisymmetric_rans_nozzle.cfg_dir = "axisymmetric_rans/air_nozzle" discadj_axisymmetric_rans_nozzle.cfg_file = "air_nozzle_restart.cfg" discadj_axisymmetric_rans_nozzle.test_iter = 10 - discadj_axisymmetric_rans_nozzle.test_vals = [ 9.748080, 5.149371, 7.147528, 2.805292] + discadj_axisymmetric_rans_nozzle.test_vals = [ 9.738569, 5.143846, 7.118712, 2.501940] discadj_axisymmetric_rans_nozzle.no_restart = True test_list.append(discadj_axisymmetric_rans_nozzle) @@ -230,8 +230,8 @@ 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.770207, 0.374782, 0.474740, -0.996140, 2.154296, -4.445843] - discadj_trans_stator.test_vals_aarch64 = [79.000000, 0.770207, 0.374782, 0.474740, -0.996140, 2.154296, -4.445843] + discadj_trans_stator.test_vals = [79, 0.668058, 0.483608, 0.518789, -1.013227] + discadj_trans_stator.test_vals_aarch64 = [79, 0.668058, 0.483608, 0.518789, -1.013227] test_list.append(discadj_trans_stator) ################################### From 65f665e2aba76efadfdbf496e917563bc7ada3bb Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Fri, 25 Jul 2025 21:56:31 +0100 Subject: [PATCH 32/37] update hybrid_AD --- TestCases/hybrid_regression_AD.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TestCases/hybrid_regression_AD.py b/TestCases/hybrid_regression_AD.py index 88494de9ca54..0cb13216455b 100644 --- a/TestCases/hybrid_regression_AD.py +++ b/TestCases/hybrid_regression_AD.py @@ -199,8 +199,8 @@ 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, 0.733453, 0.524022, 0.561758, -0.965794] - discadj_trans_stator.test_vals_aarch64 = [79, 0.733453, 0.524022, 0.561758, -0.965794] + discadj_trans_stator.test_vals = [79, 0.732873, 0.514325, 0.567562, -0.969095] + discadj_trans_stator.test_vals_aarch64 = [79, 0.732873, 0.514325, 0.567562, -0.969095] discadj_trans_stator.enabled_with_tsan = False test_list.append(discadj_trans_stator) From 93659884a2704504a1be6d0101c45a3c591acefb Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Sun, 27 Jul 2025 14:37:58 +0100 Subject: [PATCH 33/37] update regression --- TestCases/hybrid_regression.py | 6 +++--- TestCases/hybrid_regression_AD.py | 6 +++--- TestCases/parallel_regression.py | 8 ++++---- TestCases/serial_regression.py | 8 ++++---- TestCases/vandv.py | 8 ++++---- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index 3fdb313afb9e..17619b8cbb5c 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -206,7 +206,7 @@ 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.079450, -15.284048, -5.859317, 1.048053, 0.019238, -2.813805, 0.000000] + turb_naca0012_sst.test_vals = [-12.079595, -15.284132, -5.859466, 1.048053, 0.019238, -2.814059, 0.000000] test_list.append(turb_naca0012_sst) # NACA0012 (SST_SUST, FUN3D finest grid results: CL=1.0840, CD=0.01253) @@ -214,7 +214,7 @@ def main(): 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.074803, -14.836720, -5.743612, 1.000050, 0.019144, -2.650992] + turb_naca0012_sst_sust.test_vals = [-12.074763, -14.836720, -5.743325, 1.000050, 0.019144, -2.650513] test_list.append(turb_naca0012_sst_sust) # NACA0012 (SST, fixed values for turbulence quantities) @@ -556,7 +556,7 @@ 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.639851, -5.844035, -15.330764, -9.819518, -13.210286, -7.746465, 73286.000000, 73286.000000, 0.020055, 82.286000] + Jones_tc_restart.test_vals = [-8.018951, -6.108892, -15.327829, -9.819141, -13.231000, -7.878743, 73286.000000, 73286.000000, 0.020055, 82.286000] test_list.append(Jones_tc_restart) # 2D axial stage diff --git a/TestCases/hybrid_regression_AD.py b/TestCases/hybrid_regression_AD.py index 0cb13216455b..d1bc62858cde 100644 --- a/TestCases/hybrid_regression_AD.py +++ b/TestCases/hybrid_regression_AD.py @@ -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.236571, -0.190312, 2.762900, -0.039660] + discadj_rans_naca0012_sst.test_vals = [-2.236574, -0.190312, 2.762800, -0.039660] test_list.append(discadj_rans_naca0012_sst) ####################################### @@ -199,8 +199,8 @@ 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, 0.732873, 0.514325, 0.567562, -0.969095] - discadj_trans_stator.test_vals_aarch64 = [79, 0.732873, 0.514325, 0.567562, -0.969095] + discadj_trans_stator.test_vals = [79.000000, 0.671849, 0.478357, 0.498679, -1.011078] + discadj_trans_stator.test_vals_aarch64 = [79.000000, 0.671849, 0.478357, 0.498679, -1.011078] discadj_trans_stator.enabled_with_tsan = False test_list.append(discadj_trans_stator) diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 089873f9301c..52e19c2f21ad 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -450,7 +450,7 @@ 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.078371, -15.284020, -5.859335, 1.048053, 0.019238, -2.015284, 0.000000] + turb_naca0012_sst.test_vals = [-12.078661, -15.284104, -5.859484, 1.048053, 0.019238, -2.015232, 0.000000] turb_naca0012_sst.test_vals_aarch64 = [-12.232530, -14.435294, -6.037147, 1.047444, 0.019214, -1.704457, 0.000000] turb_naca0012_sst.timeout = 3200 test_list.append(turb_naca0012_sst) @@ -460,7 +460,7 @@ def main(): 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.074975, -14.836721, -5.743391, 1.000050, 0.019144, -2.229495] + turb_naca0012_sst_sust.test_vals = [-12.075115, -14.836721, -5.743103, 1.000050, 0.019144, -2.229293] turb_naca0012_sst_sust.test_vals_aarch64 = [-12.146171, -14.781592, -6.358755, 1.000270, 0.019123, -1.593320] turb_naca0012_sst_sust.timeout = 3200 test_list.append(turb_naca0012_sst_sust) @@ -1094,7 +1094,7 @@ 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.639850, -5.844033, -15.330765, -9.819518, -13.210285, -7.746464, 73286.000000, 73286.000000, 0.020055, 82.286000] + Jones_tc_restart.test_vals = [-8.018951, -6.108892, -15.327829, -9.819141, -13.231000, -7.878743, 73286.000000, 73286.000000, 0.020055, 82.286000] test_list.append(Jones_tc_restart) # 2D axial stage @@ -1387,7 +1387,7 @@ def main(): pywrapper_turb_naca0012_sst.cfg_dir = "rans/naca0012" pywrapper_turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" pywrapper_turb_naca0012_sst.test_iter = 10 - pywrapper_turb_naca0012_sst.test_vals = [-12.078371, -15.284020, -5.859335, 1.048053, 0.019238, -2.015284, 0.000000] + pywrapper_turb_naca0012_sst.test_vals = [-12.078661, -15.284104, -5.859484, 1.048053, 0.019238, -2.015232, 0.000000] pywrapper_turb_naca0012_sst.test_vals_aarch64 = [-12.232530, -14.435294, -6.037147, 1.047444, 0.019214, -1.704457, 0.000000] pywrapper_turb_naca0012_sst.command = TestCase.Command("mpirun -np 2", "SU2_CFD.py", "--parallel -f") pywrapper_turb_naca0012_sst.timeout = 3200 diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index c273729dd4da..6a3374a9d0d4 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -284,7 +284,7 @@ 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.079000, -15.284053, -5.859350, 1.048053, 0.019238, -3.272831, 0.000000] + turb_naca0012_sst.test_vals = [ -12.079361, -15.284135, -5.859500, 1.048053, 0.019238, -3.272617, 0.000000] turb_naca0012_sst.test_vals_aarch64 = [-12.229890, -14.434837, -6.410709, 1.047444, 0.019214, -2.107944, 0.000000] turb_naca0012_sst.timeout = 3200 test_list.append(turb_naca0012_sst) @@ -303,7 +303,7 @@ def main(): turb_naca0012_sst_sust_restart.cfg_dir = "rans/naca0012" turb_naca0012_sst_sust_restart.cfg_file = "turb_NACA0012_sst_sust.cfg" turb_naca0012_sst_sust_restart.test_iter = 10 - turb_naca0012_sst_sust_restart.test_vals = [-12.075430, -14.836720, -5.743398, 1.000050, 0.019144, -3.329725] + turb_naca0012_sst_sust_restart.test_vals = [-12.075450, -14.836721, -5.743110, 1.000050, 0.019144, -3.329048] turb_naca0012_sst_sust_restart.test_vals_aarch64 = [-12.157374, -14.782027, -6.726462, 1.000270, 0.019123, -1.780624] turb_naca0012_sst_sust_restart.timeout = 3200 test_list.append(turb_naca0012_sst_sust_restart) @@ -864,7 +864,7 @@ 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.639846, -5.844033, -15.330766, -9.819520, -13.210285, -7.746464, 73286.000000, 73286.000000, 0.020055, 82.286000] + Jones_tc_restart.test_vals = [-8.018951, -6.108892, -15.327829, -9.819141, -13.231000, -7.878743, 73286.000000, 73286.000000, 0.020055, 82.286000] test_list.append(Jones_tc_restart) # 2D axial stage @@ -1529,7 +1529,7 @@ def main(): pywrapper_turb_naca0012_sst.cfg_dir = "rans/naca0012" pywrapper_turb_naca0012_sst.cfg_file = "turb_NACA0012_sst.cfg" pywrapper_turb_naca0012_sst.test_iter = 10 - pywrapper_turb_naca0012_sst.test_vals = [-12.079000, -15.284053, -5.859350, 1.048053, 0.019238, -3.272831, 0.000000] + pywrapper_turb_naca0012_sst.test_vals = [-12.079361, -15.284135, -5.859500, 1.048053, 0.019238, -3.272617, 0.000000] pywrapper_turb_naca0012_sst.test_vals_aarch64 = [-12.229889, -14.434883, -6.037177, 1.047444, 0.019214, -2.108366, 0.000000] pywrapper_turb_naca0012_sst.command = TestCase.Command(exec = "SU2_CFD.py", param = "-f") pywrapper_turb_naca0012_sst.timeout = 3200 diff --git a/TestCases/vandv.py b/TestCases/vandv.py index 23486d56ff0f..a4854e111fdb 100644 --- a/TestCases/vandv.py +++ b/TestCases/vandv.py @@ -54,7 +54,7 @@ def main(): flatplate_sst1994m.cfg_dir = "vandv/rans/flatplate" flatplate_sst1994m.cfg_file = "turb_flatplate_sst.cfg" flatplate_sst1994m.test_iter = 5 - flatplate_sst1994m.test_vals = [-13.027324, -10.054934, -11.134650, -7.976571, -10.260300, -4.778563, 0.002796] + flatplate_sst1994m.test_vals = [-13.026564, -10.051540, -11.143266, -7.973816, -10.256359, -4.776048, 0.002796] flatplate_sst1994m.test_vals_aarch64 = [-13.024930, -9.634457, -10.707600, -7.558080, -9.926634, -4.910704, 0.002786] test_list.append(flatplate_sst1994m) @@ -63,7 +63,7 @@ def main(): bump_sst1994m.cfg_dir = "vandv/rans/bump_in_channel" bump_sst1994m.cfg_file = "turb_bump_sst.cfg" bump_sst1994m.test_iter = 5 - bump_sst1994m.test_vals = [-13.008230, -10.783833, -10.606431, -7.615579, -10.787580, -5.284786, 0.004911] + bump_sst1994m.test_vals = [-13.029401, -10.800439, -10.607178, -7.630108, -10.816234, -5.308533, 0.004911] bump_sst1994m.test_vals_aarch64 = [-13.025265, -10.669816, -10.615338, -7.577125, -10.709448, -5.453868, 0.004903] test_list.append(bump_sst1994m) @@ -82,7 +82,7 @@ def main(): swbli_sst.cfg_dir = "vandv/rans/swbli" swbli_sst.cfg_file = "config_sst.cfg" swbli_sst.test_iter = 5 - swbli_sst.test_vals = [-11.501567, -10.850906, -11.566872, -10.370341, -11.409505, -2.181479, 0.001796, -1.452456, -2.944206, 10.000000] + swbli_sst.test_vals = [-12.001545, -11.350636, -12.056760, -10.870102, -11.411568, -2.263450, 0.001796, -1.450519, -2.930524, 10.000000] test_list.append(swbli_sst) # DSMA661 - SA @@ -98,7 +98,7 @@ def main(): dsma661_sst.cfg_dir = "vandv/rans/dsma661" dsma661_sst.cfg_file = "dsma661_sst_config.cfg" dsma661_sst.test_iter = 5 - dsma661_sst.test_vals = [-10.994972, -8.484014, -9.144459, -6.025780, -10.590255, -8.031694, 0.155875, 0.023353] + dsma661_sst.test_vals = [-11.013080, -8.429715, -9.140952, -5.983576, -10.551096, -7.960479, 0.155875, 0.023353] test_list.append(dsma661_sst) ########################## From f3f4422e30bb8c24a1d56d7e28bd76822b329512 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Mon, 28 Jul 2025 13:35:38 +0100 Subject: [PATCH 34/37] regressions tests --- TestCases/hybrid_regression.py | 2 +- TestCases/hybrid_regression_AD.py | 4 ++-- TestCases/parallel_regression.py | 2 +- TestCases/serial_regression.py | 2 +- TestCases/tutorials.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index 17619b8cbb5c..77ef521f4e21 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -556,7 +556,7 @@ 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 = [-8.018951, -6.108892, -15.327829, -9.819141, -13.231000, -7.878743, 73286.000000, 73286.000000, 0.020055, 82.286000] + Jones_tc_restart.test_vals = [-7.645873, -5.849737, -15.337009, -9.825759, -13.216109, -7.752293, 73286.000000, 73286.000000, 0.020055, 82.286000] test_list.append(Jones_tc_restart) # 2D axial stage diff --git a/TestCases/hybrid_regression_AD.py b/TestCases/hybrid_regression_AD.py index d1bc62858cde..984ec6dc8937 100644 --- a/TestCases/hybrid_regression_AD.py +++ b/TestCases/hybrid_regression_AD.py @@ -199,8 +199,8 @@ 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.671849, 0.478357, 0.498679, -1.011078] - discadj_trans_stator.test_vals_aarch64 = [79.000000, 0.671849, 0.478357, 0.498679, -1.011078] + discadj_trans_stator.test_vals = [79.000000, 0.674685, 0.492029, 0.538637, -1.005008] + discadj_trans_stator.test_vals_aarch64 = [79.000000, 0.674685, 0.492029, 0.538637, -1.005008] discadj_trans_stator.enabled_with_tsan = False test_list.append(discadj_trans_stator) diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 52e19c2f21ad..50d80fd59d08 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1094,7 +1094,7 @@ 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 = [-8.018951, -6.108892, -15.327829, -9.819141, -13.231000, -7.878743, 73286.000000, 73286.000000, 0.020055, 82.286000] + Jones_tc_restart.test_vals = [-7.645871, -5.849734, -15.337010, -9.825760, -13.216108, -7.752293, 73286.000000, 73286.000000, 0.020055, 82.286000] test_list.append(Jones_tc_restart) # 2D axial stage diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 5faf83935c94..1f4e03685aa3 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -864,7 +864,7 @@ 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 = [-8.018951, -6.108892, -15.327829, -9.819141, -13.231000, -7.878743, 73286.000000, 73286.000000, 0.020055, 82.286000] + Jones_tc_restart.test_vals = [-7.645867, -5.849734, -15.337011, -9.825761, -13.216108, -7.752293, 73286.000000, 73286.000000, 0.020055, 82.286000] test_list.append(Jones_tc_restart) # 2D axial stage diff --git a/TestCases/tutorials.py b/TestCases/tutorials.py index 2a3228c2a1d4..e0af1a38e6c5 100644 --- a/TestCases/tutorials.py +++ b/TestCases/tutorials.py @@ -96,7 +96,7 @@ def main(): sudo_tutorial.cfg_dir = "../Tutorials/incompressible_flow/Inc_Turbulent_Bend_Wallfunctions" sudo_tutorial.cfg_file = "sudo.cfg" sudo_tutorial.test_iter = 10 - sudo_tutorial.test_vals = [-14.006989, -12.599151, -13.189712, -12.790433, -12.930344, -9.437696, 15.000000, -1.573186] + sudo_tutorial.test_vals = [-14.007950, -12.597368, -13.189199, -12.791612, -12.928621, -9.436284, 15.000000, -1.574072] sudo_tutorial.command = TestCase.Command("mpirun -n 2", "SU2_CFD") test_list.append(sudo_tutorial) From 5f8f77c112d9b8509bcebb87427f3f8351c1ae96 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Mon, 28 Jul 2025 16:30:34 +0100 Subject: [PATCH 35/37] regression tests, hybrid_AD --- TestCases/hybrid_regression_AD.py | 4 ++-- TestCases/serial_regression.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TestCases/hybrid_regression_AD.py b/TestCases/hybrid_regression_AD.py index 984ec6dc8937..85feb92bb3eb 100644 --- a/TestCases/hybrid_regression_AD.py +++ b/TestCases/hybrid_regression_AD.py @@ -199,8 +199,8 @@ 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.674685, 0.492029, 0.538637, -1.005008] - discadj_trans_stator.test_vals_aarch64 = [79.000000, 0.674685, 0.492029, 0.538637, -1.005008] + discadj_trans_stator.test_vals = [79.000000, 0.659802, 0.486865, 0.505153, -1.019459] + discadj_trans_stator.test_vals_aarch64 = [79.000000, 0.659802, 0.486865, 0.505153, -1.019459] discadj_trans_stator.enabled_with_tsan = False test_list.append(discadj_trans_stator) diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 1f4e03685aa3..b7d883a54023 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -457,7 +457,7 @@ def main(): inc_turb_wallfunction_flatplate_sst.cfg_dir = "wallfunctions/flatplate/incompressible_SST" inc_turb_wallfunction_flatplate_sst.cfg_file = "turb_SST_flatplate.cfg" inc_turb_wallfunction_flatplate_sst.test_iter = 10 - inc_turb_wallfunction_flatplate_sst.test_vals = [-6.881641, -5.731978, -6.724751, -4.242639, -7.189696, -2.050920, 10.000000, -2.877747, 0.001149, 0.003172, 0.000000] + inc_turb_wallfunction_flatplate_sst.test_vals = [-6.881656, -5.732047, -6.724784, -4.242639, -7.189741, -2.050900, 10.000000, -2.877778, 0.001149, 0.003172, 0.000000] test_list.append(inc_turb_wallfunction_flatplate_sst) # FLAT PLATE, WALL FUNCTIONS, INCOMPRESSIBLE SA From f355ef99d3e8272c69dd334607192034e3a1af0d Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Tue, 29 Jul 2025 10:17:14 +0100 Subject: [PATCH 36/37] remove transonic case from hybrid_regression --- TestCases/hybrid_regression_AD.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/TestCases/hybrid_regression_AD.py b/TestCases/hybrid_regression_AD.py index 85feb92bb3eb..696e82e0aec7 100644 --- a/TestCases/hybrid_regression_AD.py +++ b/TestCases/hybrid_regression_AD.py @@ -190,20 +190,6 @@ def main(): discadj_pitchingNACA0012.enabled_with_tsan = False test_list.append(discadj_pitchingNACA0012) - ####################################################### - ### Disc. adj. turbomachinery ### - ####################################################### - - # Transonic Stator 2D - discadj_trans_stator = TestCase('transonic_stator') - 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.659802, 0.486865, 0.505153, -1.019459] - discadj_trans_stator.test_vals_aarch64 = [79.000000, 0.659802, 0.486865, 0.505153, -1.019459] - discadj_trans_stator.enabled_with_tsan = False - test_list.append(discadj_trans_stator) - ################################### ### Structural Adjoint ### ################################### From 4cb2cb517efb6a2fd18ec062038a2a4c80d62168 Mon Sep 17 00:00:00 2001 From: Bot-Enigma-0 Date: Tue, 29 Jul 2025 12:25:07 +0100 Subject: [PATCH 37/37] revert regression branch to develop --- .github/workflows/regression.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index b4595885ddfe..3c14057f42e2 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -211,7 +211,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2:250717-1402 with: # -t -c - args: -b ${{github.ref}} -t feature_sst_diffusion -c feature_updated_SST_diffusion -s ${{matrix.testscript}} + args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2:250717-1402 with: @@ -260,7 +260,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2:250717-1402 with: # -t -c - args: -b ${{github.ref}} -t feature_sst_diffusion -c feature_updated_SST_diffusion -s ${{matrix.testscript}} -a "--tapetests" + args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tapetests" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2:250717-1402 with: @@ -306,7 +306,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2-tsan:250717-1402 with: # -t -c - args: -b ${{github.ref}} -t feature_sst_diffusion -c feature_updated_SST_diffusion -s ${{matrix.testscript}} -a "--tsan" + args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tsan" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2-tsan:250717-1402 with: @@ -351,7 +351,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2-asan:250717-1402 with: # -t -c - args: -b ${{github.ref}} -t feature_sst_diffusion -c feature_updated_SST_diffusion -s ${{matrix.testscript}} -a "--asan" + args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--asan" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2-asan:250717-1402 with: