From 2047109afb5406fea9f339b0190da73e46f68175 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Mon, 22 Dec 2025 09:05:11 +0100 Subject: [PATCH 01/37] fixe scalar restart, update psi case --- SU2_CFD/src/output/CFlowIncOutput.cpp | 4 ++-- SU2_CFD/src/solvers/CSpeciesSolver.cpp | 2 +- SU2_CFD/src/solvers/CTurbSolver.cpp | 10 +++++----- .../py_wrapper/turbulent_premixed_psi/psi.cfg | 4 ++-- .../py_wrapper/turbulent_premixed_psi/run.py | 15 ++++----------- 5 files changed, 14 insertions(+), 21 deletions(-) diff --git a/SU2_CFD/src/output/CFlowIncOutput.cpp b/SU2_CFD/src/output/CFlowIncOutput.cpp index 9d408892cf6e..a7194bc2fe79 100644 --- a/SU2_CFD/src/output/CFlowIncOutput.cpp +++ b/SU2_CFD/src/output/CFlowIncOutput.cpp @@ -330,7 +330,7 @@ void CFlowIncOutput::SetVolumeOutputFields(CConfig *config){ AddVolumeOutput("LAMINAR_VISCOSITY", "Laminar_Viscosity", "PRIMITIVE", "Laminar viscosity"); AddVolumeOutput("HEAT_CAPACITY", "Heat_Capacity", "PRIMITIVE", "Heat capacity"); AddVolumeOutput("THERMAL_CONDUCTIVITY", "Thermal_Conductivity", "PRIMITIVE", "Thermal conductivity"); - if (heat || flamelet) AddVolumeOutput("TEMPERATURE", "Temperature", "PRIMITIVE", "Temperature"); + AddVolumeOutput("TEMPERATURE", "Temperature", "PRIMITIVE", "Temperature"); AddVolumeOutput("SKIN_FRICTION-X", "Skin_Friction_Coefficient_x", "PRIMITIVE", "x-component of the skin friction vector"); AddVolumeOutput("SKIN_FRICTION-Y", "Skin_Friction_Coefficient_y", "PRIMITIVE", "y-component of the skin friction vector"); @@ -440,7 +440,7 @@ void CFlowIncOutput::LoadVolumeData(CConfig *config, CGeometry *geometry, CSolve SetVolumeOutputValue("LAMINAR_VISCOSITY", iPoint, Node_Flow->GetLaminarViscosity(iPoint)); SetVolumeOutputValue("HEAT_CAPACITY", iPoint, Node_Flow->GetSpecificHeatCp(iPoint)); SetVolumeOutputValue("THERMAL_CONDUCTIVITY", iPoint, Node_Flow->GetThermalConductivity(iPoint)); - if (heat || flamelet) SetVolumeOutputValue("TEMPERATURE", iPoint, Node_Flow->GetTemperature(iPoint)); + SetVolumeOutputValue("TEMPERATURE", iPoint, Node_Flow->GetTemperature(iPoint)); } SetVolumeOutputValue("RES_PRESSURE", iPoint, solver[FLOW_SOL]->LinSysRes(iPoint, 0)); diff --git a/SU2_CFD/src/solvers/CSpeciesSolver.cpp b/SU2_CFD/src/solvers/CSpeciesSolver.cpp index 3f25af7d1183..7624c9ef41d8 100644 --- a/SU2_CFD/src/solvers/CSpeciesSolver.cpp +++ b/SU2_CFD/src/solvers/CSpeciesSolver.cpp @@ -212,7 +212,7 @@ void CSpeciesSolver::LoadRestart(CGeometry** geometry, CSolver*** solver, CConfi /*--- for the flamelet model, the temperature is saved to file, but the energy equation is off ---*/ - if (incompressible && ((!energy) && (!weakly_coupled_heat) && (!flamelet))) skipVars--; + if (incompressible && ((!energy) && (!weakly_coupled_heat))) skipVars--; /*--- Load data from the restart into correct containers. ---*/ diff --git a/SU2_CFD/src/solvers/CTurbSolver.cpp b/SU2_CFD/src/solvers/CTurbSolver.cpp index 7d7e6fd26730..09c5f92eea14 100644 --- a/SU2_CFD/src/solvers/CTurbSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSolver.cpp @@ -133,7 +133,7 @@ void CTurbSolver::LoadRestart(CGeometry** geometry, CSolver*** solver, CConfig* const bool weakly_coupled_heat = config->GetWeakly_Coupled_Heat(); const bool flamelet = (config->GetKind_FluidModel() == FLUID_FLAMELET); - if (incompressible && ((!energy) && (!weakly_coupled_heat) && (!flamelet))) skipVars--; + if (incompressible && ((!energy) && (!weakly_coupled_heat))) skipVars--; /*--- Load data from the restart into correct containers. ---*/ @@ -252,7 +252,7 @@ void CTurbSolver::ComputeUnderRelaxationFactorHelper(su2double allowableRatio) { /* 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; @@ -265,16 +265,16 @@ void CTurbSolver::ComputeUnderRelaxationFactorHelper(su2double allowableRatio) { 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); diff --git a/TestCases/py_wrapper/turbulent_premixed_psi/psi.cfg b/TestCases/py_wrapper/turbulent_premixed_psi/psi.cfg index 537eee85ce8b..5b3ecf93158e 100644 --- a/TestCases/py_wrapper/turbulent_premixed_psi/psi.cfg +++ b/TestCases/py_wrapper/turbulent_premixed_psi/psi.cfg @@ -31,7 +31,7 @@ INC_DENSITY_INIT= 2.55 % INC_VELOCITY_INIT= (40.00, 0.0, 0.0 ) % -INC_ENERGY_EQUATION= YES +INC_ENERGY_EQUATION= NO INC_TEMPERATURE_INIT= 673.0 % INC_NONDIM= DIMENSIONAL @@ -153,7 +153,7 @@ MARKER_ANALYZE= gas_inlet, air_axial_inlet, outlet MARKER_ANALYZE_AVERAGE= AREA % OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK -VOLUME_OUTPUT= RESIDUAL, PRIMITIVE, SPECIES_UDS_0 +VOLUME_OUTPUT= SOLUTION, PRIMITIVE, SPECIES_UDS_0 OUTPUT_WRT_FREQ= 100 % READ_BINARY_RESTART= YES diff --git a/TestCases/py_wrapper/turbulent_premixed_psi/run.py b/TestCases/py_wrapper/turbulent_premixed_psi/run.py index dc1133169a24..82c72dc6e83c 100644 --- a/TestCases/py_wrapper/turbulent_premixed_psi/run.py +++ b/TestCases/py_wrapper/turbulent_premixed_psi/run.py @@ -91,19 +91,12 @@ def update_temperature(SU2Driver, iPoint): iSPECIESSOLVER = SU2Driver.GetSolverIndices()['SPECIES'] # Note: returns a list C = SU2Driver.Solution(iSPECIESSOLVER)(iPoint,0) + T = Tu*(1-C) + Tf*C - iFLOWSOLVER = SU2Driver.GetSolverIndices()['INC.FLOW'] - # the list with names - solindex = getsolvar(SU2Driver) - primindex = SU2Driver.GetPrimitiveIndices() - # get Cp - iCp = primindex.get("CP_TOTAL") - Cp = SU2Driver.Primitives()(iPoint,iCp) - # get solution index for energy equation - iTEMP = solindex.get("TEMPERATURE") - # set enthalpy, for Ideal Gas model, enthalpy is Cp*T - SU2Driver.Solution(iFLOWSOLVER).Set(iPoint,iTEMP,Cp*T) + prim_indices = SU2Driver.GetPrimitiveIndices() + iTemp = prim_indices['TEMPERATURE'] + SU2Driver.Primitives().Set(iPoint,iTemp, T) # ################################################################## # # Source term according to Zimont From 348dee985d128f4fa6cef88c96849e2f7581733b Mon Sep 17 00:00:00 2001 From: bigfooted Date: Mon, 22 Dec 2025 11:22:02 +0100 Subject: [PATCH 02/37] reduce y+ warning --- SU2_CFD/src/solvers/CIncNSSolver.cpp | 7 ++++--- SU2_CFD/src/solvers/CNSSolver.cpp | 8 +++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/SU2_CFD/src/solvers/CIncNSSolver.cpp b/SU2_CFD/src/solvers/CIncNSSolver.cpp index 28747c7e1d71..383c55945ec8 100644 --- a/SU2_CFD/src/solvers/CIncNSSolver.cpp +++ b/SU2_CFD/src/solvers/CIncNSSolver.cpp @@ -892,14 +892,15 @@ void CIncNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_containe SU2_MPI::Allreduce(&globalCounter1, ¬ConvergedCounter, 1, MPI_UNSIGNED_LONG, MPI_SUM, SU2_MPI::GetComm()); SU2_MPI::Allreduce(&globalCounter2, &smallYPlusCounter, 1, MPI_UNSIGNED_LONG, MPI_SUM, SU2_MPI::GetComm()); - if (rank == MASTER_NODE) { + const bool write_iter = (config->GetTimeIter() % config->GetVolumeOutputFrequency(0) == 0); + if (rank == MASTER_NODE && write_iter) { if (notConvergedCounter) cout << "Warning: Computation of wall coefficients (y+) did not converge in " << notConvergedCounter << " points." << endl; if (smallYPlusCounter) - cout << "Warning: y+ < " << config->GetwallModel_MinYPlus() << " in " << smallYPlusCounter - << " points, for which the wall model is not active." << endl; + cout << "y+ < " << config->GetwallModel_MinYPlus() << " in " << smallYPlusCounter + << " points. No problem, but you can increase your near-wall mesh size." << endl; } } END_SU2_OMP_SAFE_GLOBAL_ACCESS diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index ab90660ef22e..be79d762c7c8 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -1028,14 +1028,16 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, SU2_MPI::Allreduce(&globalCounter1, ¬ConvergedCounter, 1, MPI_UNSIGNED_LONG, MPI_SUM, SU2_MPI::GetComm()); SU2_MPI::Allreduce(&globalCounter2, &smallYPlusCounter, 1, MPI_UNSIGNED_LONG, MPI_SUM, SU2_MPI::GetComm()); - if (rank == MASTER_NODE) { + const bool write_iter = (config->GetInnerIter() % config->GetVolumeOutputFrequency(0) == 0); + + if (rank == MASTER_NODE && write_iter) { if (notConvergedCounter) cout << "Warning: Computation of wall coefficients (y+) did not converge in " << notConvergedCounter << " points." << endl; if (smallYPlusCounter) - cout << "Warning: y+ < " << config->GetwallModel_MinYPlus() << " in " << smallYPlusCounter - << " points, for which the wall model is not active." << endl; + cout << "y+ < " << config->GetwallModel_MinYPlus() << " in " << smallYPlusCounter + << " points. No problem, but you can increase your near-wallmesh size." << endl; } } END_SU2_OMP_SAFE_GLOBAL_ACCESS From 1a600ed98104cece074fbf39c9fe3b2c9e0a7356 Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 22 Dec 2025 11:22:34 +0100 Subject: [PATCH 03/37] Update SU2_CFD/src/solvers/CTurbSolver.cpp Co-authored-by: Cristopher Morales <98025159+Cristopher-Morales@users.noreply.github.com> --- SU2_CFD/src/solvers/CTurbSolver.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CTurbSolver.cpp b/SU2_CFD/src/solvers/CTurbSolver.cpp index 09c5f92eea14..05f456883fb2 100644 --- a/SU2_CFD/src/solvers/CTurbSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSolver.cpp @@ -131,7 +131,6 @@ void CTurbSolver::LoadRestart(CGeometry** geometry, CSolver*** solver, CConfig* const bool incompressible = (config->GetKind_Regime() == ENUM_REGIME::INCOMPRESSIBLE); const bool energy = config->GetEnergy_Equation(); const bool weakly_coupled_heat = config->GetWeakly_Coupled_Heat(); - const bool flamelet = (config->GetKind_FluidModel() == FLUID_FLAMELET); if (incompressible && ((!energy) && (!weakly_coupled_heat))) skipVars--; From 5a0a2f69015d15af76d58c11782cf8d1e2164268 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Mon, 22 Dec 2025 11:45:06 +0100 Subject: [PATCH 04/37] fix weakly coupled heat restart --- SU2_CFD/src/output/CFlowIncOutput.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/SU2_CFD/src/output/CFlowIncOutput.cpp b/SU2_CFD/src/output/CFlowIncOutput.cpp index a7194bc2fe79..e935fba2f1e1 100644 --- a/SU2_CFD/src/output/CFlowIncOutput.cpp +++ b/SU2_CFD/src/output/CFlowIncOutput.cpp @@ -305,6 +305,7 @@ void CFlowIncOutput::SetVolumeOutputFields(CConfig *config){ AddVolumeOutput("VELOCITY-Y", "Velocity_y", "SOLUTION", "y-component of the velocity vector"); if (nDim == 3) AddVolumeOutput("VELOCITY-Z", "Velocity_z", "SOLUTION", "z-component of the velocity vector"); + if (weakly_coupled_heat) AddVolumeOutput("TEMPERATURE", "Temperature", "SOLUTION", "Temperature"); if (heat) AddVolumeOutput("ENTHALPY", "Enthalpy", "SOLUTION", "Enthalpy"); @@ -330,7 +331,8 @@ void CFlowIncOutput::SetVolumeOutputFields(CConfig *config){ AddVolumeOutput("LAMINAR_VISCOSITY", "Laminar_Viscosity", "PRIMITIVE", "Laminar viscosity"); AddVolumeOutput("HEAT_CAPACITY", "Heat_Capacity", "PRIMITIVE", "Heat capacity"); AddVolumeOutput("THERMAL_CONDUCTIVITY", "Thermal_Conductivity", "PRIMITIVE", "Thermal conductivity"); - AddVolumeOutput("TEMPERATURE", "Temperature", "PRIMITIVE", "Temperature"); + if (!weakly_coupled_heat) + AddVolumeOutput("TEMPERATURE", "Temperature", "PRIMITIVE", "Temperature"); AddVolumeOutput("SKIN_FRICTION-X", "Skin_Friction_Coefficient_x", "PRIMITIVE", "x-component of the skin friction vector"); AddVolumeOutput("SKIN_FRICTION-Y", "Skin_Friction_Coefficient_y", "PRIMITIVE", "y-component of the skin friction vector"); @@ -354,7 +356,7 @@ void CFlowIncOutput::SetVolumeOutputFields(CConfig *config){ AddVolumeOutput("RES_VELOCITY-Y", "Residual_Velocity_y", "RESIDUAL", "Residual of the y-velocity component"); if (nDim == 3) AddVolumeOutput("RES_VELOCITY-Z", "Residual_Velocity_z", "RESIDUAL", "Residual of the z-velocity component"); - if (config->GetEnergy_Equation()){ + if (heat){ AddVolumeOutput("RES_ENTHALPY", "Residual_Enthalpy", "RESIDUAL", "Residual of the enthalpy"); } SetVolumeOutputFieldsScalarResidual(config); @@ -417,6 +419,7 @@ void CFlowIncOutput::LoadVolumeData(CConfig *config, CGeometry *geometry, CSolve if (heat) { SetVolumeOutputValue("ENTHALPY", iPoint, Node_Flow->GetSolution(iPoint, nDim+1)); } + if (weakly_coupled_heat) SetVolumeOutputValue("TEMPERATURE", iPoint, Node_Heat->GetSolution(iPoint, 0)); // Radiation solver @@ -440,7 +443,8 @@ void CFlowIncOutput::LoadVolumeData(CConfig *config, CGeometry *geometry, CSolve SetVolumeOutputValue("LAMINAR_VISCOSITY", iPoint, Node_Flow->GetLaminarViscosity(iPoint)); SetVolumeOutputValue("HEAT_CAPACITY", iPoint, Node_Flow->GetSpecificHeatCp(iPoint)); SetVolumeOutputValue("THERMAL_CONDUCTIVITY", iPoint, Node_Flow->GetThermalConductivity(iPoint)); - SetVolumeOutputValue("TEMPERATURE", iPoint, Node_Flow->GetTemperature(iPoint)); + if (!weakly_coupled_heat) + SetVolumeOutputValue("TEMPERATURE", iPoint, Node_Flow->GetTemperature(iPoint)); } SetVolumeOutputValue("RES_PRESSURE", iPoint, solver[FLOW_SOL]->LinSysRes(iPoint, 0)); From 5ba6371fba20e432f13e21d24e07b62cd2aef25b Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 22 Dec 2025 11:46:36 +0100 Subject: [PATCH 05/37] Apply suggestion from @bigfooted --- SU2_CFD/src/output/CFlowIncOutput.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/SU2_CFD/src/output/CFlowIncOutput.cpp b/SU2_CFD/src/output/CFlowIncOutput.cpp index e935fba2f1e1..972181e32600 100644 --- a/SU2_CFD/src/output/CFlowIncOutput.cpp +++ b/SU2_CFD/src/output/CFlowIncOutput.cpp @@ -305,7 +305,6 @@ void CFlowIncOutput::SetVolumeOutputFields(CConfig *config){ AddVolumeOutput("VELOCITY-Y", "Velocity_y", "SOLUTION", "y-component of the velocity vector"); if (nDim == 3) AddVolumeOutput("VELOCITY-Z", "Velocity_z", "SOLUTION", "z-component of the velocity vector"); - if (weakly_coupled_heat) AddVolumeOutput("TEMPERATURE", "Temperature", "SOLUTION", "Temperature"); if (heat) AddVolumeOutput("ENTHALPY", "Enthalpy", "SOLUTION", "Enthalpy"); From 03b9484a526878b715d043bac7b07c05e14f1a37 Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 22 Dec 2025 11:47:01 +0100 Subject: [PATCH 06/37] Apply suggestion from @bigfooted --- SU2_CFD/src/output/CFlowIncOutput.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/SU2_CFD/src/output/CFlowIncOutput.cpp b/SU2_CFD/src/output/CFlowIncOutput.cpp index 972181e32600..f27c77cf5569 100644 --- a/SU2_CFD/src/output/CFlowIncOutput.cpp +++ b/SU2_CFD/src/output/CFlowIncOutput.cpp @@ -418,7 +418,6 @@ void CFlowIncOutput::LoadVolumeData(CConfig *config, CGeometry *geometry, CSolve if (heat) { SetVolumeOutputValue("ENTHALPY", iPoint, Node_Flow->GetSolution(iPoint, nDim+1)); } - if (weakly_coupled_heat) SetVolumeOutputValue("TEMPERATURE", iPoint, Node_Heat->GetSolution(iPoint, 0)); // Radiation solver From 43af7123173da9ae6a83e3a625baccba28754a0a Mon Sep 17 00:00:00 2001 From: bigfooted Date: Mon, 22 Dec 2025 13:00:22 +0100 Subject: [PATCH 07/37] remove unused var --- SU2_CFD/src/solvers/CSpeciesSolver.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CSpeciesSolver.cpp b/SU2_CFD/src/solvers/CSpeciesSolver.cpp index 7624c9ef41d8..88469650ab0c 100644 --- a/SU2_CFD/src/solvers/CSpeciesSolver.cpp +++ b/SU2_CFD/src/solvers/CSpeciesSolver.cpp @@ -207,7 +207,6 @@ void CSpeciesSolver::LoadRestart(CGeometry** geometry, CSolver*** solver, CConfi const bool incompressible = (config->GetKind_Regime() == ENUM_REGIME::INCOMPRESSIBLE); const bool energy = config->GetEnergy_Equation(); - const bool flamelet = (config->GetKind_FluidModel() == FLUID_FLAMELET); const bool weakly_coupled_heat = config->GetWeakly_Coupled_Heat(); /*--- for the flamelet model, the temperature is saved to file, but the energy equation is off ---*/ From ae9d43fe26cc7d9909c5d9769f0cb04b65a314c0 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Mon, 22 Dec 2025 23:24:24 +0100 Subject: [PATCH 08/37] fix mass diffusivity MPI bug --- SU2_CFD/src/fluid/CFluidScalar.cpp | 1 + SU2_CFD/src/solvers/CSpeciesSolver.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/SU2_CFD/src/fluid/CFluidScalar.cpp b/SU2_CFD/src/fluid/CFluidScalar.cpp index b42cf7b70433..dcf54f2f3366 100644 --- a/SU2_CFD/src/fluid/CFluidScalar.cpp +++ b/SU2_CFD/src/fluid/CFluidScalar.cpp @@ -282,4 +282,5 @@ void CFluidScalar::SetTDState_h(const su2double val_enthalpy, const su2double* v } Kt = WilkeConductivity(val_scalars); + ComputeMassDiffusivity(); } diff --git a/SU2_CFD/src/solvers/CSpeciesSolver.cpp b/SU2_CFD/src/solvers/CSpeciesSolver.cpp index 88469650ab0c..e04c55ef1dc6 100644 --- a/SU2_CFD/src/solvers/CSpeciesSolver.cpp +++ b/SU2_CFD/src/solvers/CSpeciesSolver.cpp @@ -302,6 +302,8 @@ void CSpeciesSolver::Preprocessing(CGeometry* geometry, CSolver** solver_contain const su2double* scalar = solver_container[SPECIES_SOL]->GetNodes()->GetSolution(iPoint); solver_container[FLOW_SOL]->GetFluidModel()->SetMassDiffusivityModel(config); solver_container[FLOW_SOL]->GetFluidModel()->SetTDState_T(temperature, scalar); + /*--- Recompute viscosity, important to get diffusivity correct across MPI ranks. ---*/ + const su2double viscosity = solver_container[FLOW_SOL]->GetFluidModel()->GetLaminarViscosity(); for (auto iVar = 0u; iVar <= nVar; iVar++) { const su2double mass_diffusivity = solver_container[FLOW_SOL]->GetFluidModel()->GetMassDiffusivity(iVar); nodes->SetDiffusivity(iPoint, mass_diffusivity, iVar); From 3ac3d640033096a8397b2fa45e35eff0d9a6554a Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 23 Dec 2025 09:35:00 +0100 Subject: [PATCH 09/37] use enthalpy for computing temperature also when energy is off --- SU2_CFD/src/variables/CIncNSVariable.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/SU2_CFD/src/variables/CIncNSVariable.cpp b/SU2_CFD/src/variables/CIncNSVariable.cpp index e31109fcd662..b3632071f17e 100644 --- a/SU2_CFD/src/variables/CIncNSVariable.cpp +++ b/SU2_CFD/src/variables/CIncNSVariable.cpp @@ -65,12 +65,10 @@ bool CIncNSVariable::SetPrimVar(unsigned long iPoint, su2double eddy_visc, su2do FluidModel->SetTDState_h(Enthalpy, scalar); Temperature = FluidModel->GetTemperature(); } else { - /*--- When energy equation is switch off, a constant temperature is imposed, and enthalpy is recomputed based on - * this temperature. As in the fluid flamelet model, the temperature is retrieved from a look-up table, then the - * temperature is obtained directly from the fluidmodel. For the other fluid models, GetTemperature provides the - * same value as TemperatureInc ---*/ - FluidModel->SetTDState_T(TemperatureInc, scalar); - Enthalpy = Solution(iPoint, nDim + 1) = FluidModel->GetEnthalpy(); + /*--- When energy equation is switched off, use enthalpy from solution to compute temperature. + * This allows Python wrapper updates to enthalpy to correctly update the density. ---*/ + Enthalpy = Solution(iPoint, nDim + 1); + FluidModel->SetTDState_h(Enthalpy, scalar); Temperature = FluidModel->GetTemperature(); } auto check_temp = SetTemperature(iPoint, Temperature, TemperatureLimits); From 0e0d08acedea096e932f45e1b5f02c6907184263 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 23 Dec 2025 21:31:09 +0100 Subject: [PATCH 10/37] fix sensible enthalpy --- Common/include/CConfig.hpp | 7 ----- Common/include/option_structure.hpp | 2 +- Common/src/CConfig.cpp | 3 -- SU2_CFD/include/fluid/CConstantDensity.hpp | 6 ++-- SU2_CFD/include/fluid/CFluidScalar.hpp | 3 +- SU2_CFD/include/fluid/CIncIdealGas.hpp | 4 +-- .../include/fluid/CIncIdealGasPolynomial.hpp | 3 +- SU2_CFD/src/fluid/CFluidScalar.cpp | 9 +++--- SU2_CFD/src/solvers/CIncEulerSolver.cpp | 4 +-- SU2_CFD/src/variables/CIncEulerVariable.cpp | 11 ++++---- SU2_CFD/src/variables/CIncNSVariable.cpp | 22 ++++++--------- .../py_wrapper/turbulent_premixed_psi/psi.cfg | 28 ++++++++++++------- .../py_wrapper/turbulent_premixed_psi/run.py | 26 +++++++++++++---- 13 files changed, 67 insertions(+), 61 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 8abcc77e4fbe..794622bb1a1e 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -919,7 +919,6 @@ class CConfig { Initial_BCThrust, /*!< \brief Ratio of turbulent to laminar viscosity at the actuator disk. */ Pressure_FreeStream, /*!< \brief Total pressure of the fluid. */ Pressure_Thermodynamic, /*!< \brief Thermodynamic pressure of the fluid. */ - Standard_Ref_Temperature, /*!< \brief Standard reference temperature for multicomponent flows. */ Temperature_FreeStream, /*!< \brief Total temperature of the fluid. */ Temperature_ve_FreeStream; /*!< \brief Total vibrational-electronic temperature of the fluid. */ unsigned short wallModel_MaxIter; /*!< \brief maximum number of iterations for the Newton method for the wall model */ @@ -1959,12 +1958,6 @@ class CConfig { */ su2double GetPressure_Thermodynamic(void) const { return Pressure_Thermodynamic; } - /*! - * \brief Get the value of the standard reference temperature for multicomponent flows. - * \return Standard reference temperature, Non-dimensionalized if it is needed for Non-Dimensional problems. - */ - su2double GetStandard_RefTemperatureND(void) const { return Standard_Ref_Temperature / Temperature_Ref; } - /*! * \brief Get the value of the non-dimensionalized thermodynamic pressure. * \return Non-dimensionalized thermodynamic pressure. diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index bf99257b1387..f42547fe1f6b 100644 --- a/Common/include/option_structure.hpp +++ b/Common/include/option_structure.hpp @@ -96,7 +96,7 @@ const su2double UNIVERSAL_GAS_CONSTANT = 8.3144598; /*!< \brief Universal gas const su2double BOLTZMANN_CONSTANT = 1.3806503E-23; /*!< \brief Boltzmann's constant [J K^-1] */ const su2double AVOGAD_CONSTANT = 6.0221415E26; /*!< \brief Avogadro's constant, number of particles in one kmole. */ const su2double FUND_ELEC_CHARGE_CGS = 4.8032047E-10; /*!< \brief Fundamental electric charge in CGS units, cm^(3/2) g^(1/2) s^(-1). */ - +const su2double STD_REF_TEMP = 298.15; /*!< \brief Standard reference temperature for enthalpy in Kelvin. */ const su2double EPS = 1.0E-16; /*!< \brief Error scale. */ const su2double TURB_EPS = 1.0E-16; /*!< \brief Turbulent Error scale. */ diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 8a84e679ab69..c37a471be58e 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1229,9 +1229,6 @@ void CConfig::SetConfig_Options() { addDoubleOption("GAMMA_VALUE", Gamma, 1.4); /*!\brief THERMODYNAMIC_PRESSURE \n DESCRIPTION: Thermodynamics(operating) Pressure (101325 Pa), only for incompressible flows) \ingroup Config*/ addDoubleOption("THERMODYNAMIC_PRESSURE", Pressure_Thermodynamic, 101325.0); - /*!\brief STANDARD_REFERENCE_TEMPERATURE \n DESCRIPTION: Standard reference temperature (298.15K), only for - * multicomponent incompressible flows) \ingroup Config*/ - addDoubleOption("STANDARD_REFERENCE_TEMPERATURE", Standard_Ref_Temperature, 298.15); /*!\brief CP_VALUE \n DESCRIPTION: Specific heat at constant pressure, Cp (1004.703 J/kg*K (air), constant density incompressible fluids only) \ingroup Config*/ addDoubleListOption("SPECIFIC_HEAT_CP", nSpecific_Heat_Cp, Specific_Heat_Cp); /*!\brief THERMAL_EXPANSION_COEFF \n DESCRIPTION: Thermal expansion coefficient (0.00347 K^-1 (air), used for Boussinesq approximation for liquids/non-ideal gases) \ingroup Config*/ diff --git a/SU2_CFD/include/fluid/CConstantDensity.hpp b/SU2_CFD/include/fluid/CConstantDensity.hpp index acfeed2e0cf0..a796762a2713 100644 --- a/SU2_CFD/include/fluid/CConstantDensity.hpp +++ b/SU2_CFD/include/fluid/CConstantDensity.hpp @@ -56,16 +56,16 @@ class CConstantDensity final : public CFluidModel { decoupled equation. Hence, we update the value. Note Cp = Cv, (gamma = 1).*/ Temperature = t; - Enthalpy = Cp * Temperature; + Enthalpy = Cp * (Temperature - STD_REF_TEMP); // Sensible enthalpy relative to STD_REF_TEMP } /*! * \brief Set the Dimensionless State using Enthalpy. * \param[in] val_enthalpy - Enthalpy value at the point. - * \param[in] val_scalars - not used here. + * \param[in] val_scalars - not used here. */ void SetTDState_h(su2double val_enthalpy, const su2double* val_scalars = nullptr) override { Enthalpy = val_enthalpy; - Temperature = Enthalpy / Cp; + Temperature = Enthalpy / Cp + STD_REF_TEMP; // Temperature from sensible enthalpy } }; diff --git a/SU2_CFD/include/fluid/CFluidScalar.hpp b/SU2_CFD/include/fluid/CFluidScalar.hpp index 164043872d6a..ba97fa5451e4 100644 --- a/SU2_CFD/include/fluid/CFluidScalar.hpp +++ b/SU2_CFD/include/fluid/CFluidScalar.hpp @@ -42,7 +42,6 @@ class CFluidScalar final : public CFluidModel { const int n_species_mixture; /*!< \brief Number of species in mixture. */ su2double Gas_Constant; /*!< \brief Specific gas constant. */ const su2double Pressure_Thermodynamic; /*!< \brief Constant pressure thermodynamic. */ - const su2double Ref_Temperature; /*!< \brief Standard Reference temperature, usually set to 298.15 K. */ const su2double GasConstant_Ref; /*!< \brief Gas constant reference needed for Nondimensional problems. */ const su2double Prandtl_Turb_Number; /*!< \brief Prandlt turbulent number.*/ const su2double Schmidt_Turb_Number; /*!< \brief Schmidt turbulent number.*/ @@ -177,7 +176,7 @@ class CFluidScalar final : public CFluidModel { /*! * \brief Virtual member. * \param[in] val_enthalpy - Enthalpy value at the point. - * \param[in] val_scalars - Scalar mass fractions. + * \param[in] val_scalars - Scalar mass fractions. */ void SetTDState_h(su2double val_enthalpy, const su2double* val_scalars = nullptr) override; }; diff --git a/SU2_CFD/include/fluid/CIncIdealGas.hpp b/SU2_CFD/include/fluid/CIncIdealGas.hpp index 16266e569568..4b35735f096d 100644 --- a/SU2_CFD/include/fluid/CIncIdealGas.hpp +++ b/SU2_CFD/include/fluid/CIncIdealGas.hpp @@ -58,7 +58,7 @@ class CIncIdealGas final : public CFluidModel { /*--- The EoS only depends upon temperature. ---*/ Temperature = t; Density = Pressure / (Temperature * Gas_Constant); - Enthalpy = Cp * Temperature; + Enthalpy = Cp * (Temperature - STD_REF_TEMP); // Sensible enthalpy relative to REF_TEMP } /*! @@ -67,7 +67,7 @@ class CIncIdealGas final : public CFluidModel { */ void SetTDState_h(su2double val_enthalpy, const su2double* val_scalars = nullptr) override { Enthalpy = val_enthalpy; - Temperature = Enthalpy / Cp; + Temperature = Enthalpy / Cp + STD_REF_TEMP; // Temperature from sensible enthalpy Density = Pressure / (Temperature * Gas_Constant); } diff --git a/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp b/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp index e1f5f1d9105c..aff8085617d9 100644 --- a/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp +++ b/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp @@ -58,11 +58,10 @@ class CIncIdealGasPolynomial final : public CFluidModel { * \param[in] config - configuration container for the problem. */ void SetCpModel(const CConfig* config) override { - const su2double t_ref = config->GetStandard_RefTemperatureND(); Enthalpy_Ref = 0.0; su2double t_i = 1.0; for (int i = 0; i < N; ++i) { - t_i *= t_ref; + t_i *= STD_REF_TEMP; coeffs_[i] = config->GetCp_PolyCoeffND(i); Enthalpy_Ref += coeffs_[i] * t_i / (i + 1); } diff --git a/SU2_CFD/src/fluid/CFluidScalar.cpp b/SU2_CFD/src/fluid/CFluidScalar.cpp index dcf54f2f3366..4b384c521f9c 100644 --- a/SU2_CFD/src/fluid/CFluidScalar.cpp +++ b/SU2_CFD/src/fluid/CFluidScalar.cpp @@ -45,7 +45,6 @@ CFluidScalar::CFluidScalar(su2double value_pressure_operating, const CConfig* co : CFluidModel(), n_species_mixture(config->GetnSpecies() + 1), Pressure_Thermodynamic(value_pressure_operating), - Ref_Temperature(config->GetStandard_RefTemperatureND()), GasConstant_Ref(config->GetGas_Constant_Ref()), Prandtl_Turb_Number(config->GetPrandtl_Turb()), Schmidt_Turb_Number(config->GetSchmidt_Number_Turbulent()), @@ -219,14 +218,14 @@ su2double CFluidScalar::ComputeEnthalpyFromT(const su2double val_temperature, co * depend on temperature, but it does depend on mixture composition, enthalpy is directly computed from * the expression h_s = Cp(T - T_ref). */ - su2double val_Enthalpy = Cp * (val_temperature - Ref_Temperature); + su2double val_Enthalpy = Cp * (val_temperature - STD_REF_TEMP); return val_Enthalpy; } void CFluidScalar::GetEnthalpyDiffusivity(su2double* enthalpy_diffusions) const { - const su2double enthalpy_species_N = specificHeat[n_species_mixture - 1] * (Temperature - Ref_Temperature); + const su2double enthalpy_species_N = specificHeat[n_species_mixture - 1] * (Temperature - STD_REF_TEMP); for (int iVar = 0; iVar < n_species_mixture - 1; iVar++) { - const su2double enthalpy_species_i = specificHeat[iVar] * (Temperature - Ref_Temperature); + const su2double enthalpy_species_i = specificHeat[iVar] * (Temperature - STD_REF_TEMP); enthalpy_diffusions[iVar] = Density * (enthalpy_species_i * massDiffusivity[iVar] - enthalpy_species_N * massDiffusivity[n_species_mixture - 1]); enthalpy_diffusions[iVar] += Mu_Turb * (enthalpy_species_i - enthalpy_species_N) / Schmidt_Turb_Number; @@ -271,7 +270,7 @@ void CFluidScalar::SetTDState_h(const su2double val_enthalpy, const su2double* v * depend on temperature, but it does depend on mixture composition, temperature is directly solved from the * expression h_s = Cp(T - T_ref). */ - Temperature = val_enthalpy / Cp + Ref_Temperature; + Temperature = val_enthalpy / Cp + STD_REF_TEMP; Density = Pressure_Thermodynamic / (Temperature * Gas_Constant); Cv = Cp - Gas_Constant; diff --git a/SU2_CFD/src/solvers/CIncEulerSolver.cpp b/SU2_CFD/src/solvers/CIncEulerSolver.cpp index 956af94ab58d..b9d8c013bb65 100644 --- a/SU2_CFD/src/solvers/CIncEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CIncEulerSolver.cpp @@ -2145,9 +2145,9 @@ void CIncEulerSolver::SetPreconditioner(const CConfig *config, unsigned long iPo Therefore, we build inv(Precon) here and multiply by the residual later in the R-K and Euler Explicit time integration schemes. ---*/ - + Preconditioner[0][0] = Enthalpy * BetaInc2 * dRhodh / Density + BetaInc2; - + for (iDim = 0; iDim < nDim; iDim++) Preconditioner[iDim + 1][0] = -1.0 * Velocity[iDim] / Density; if (energy) { diff --git a/SU2_CFD/src/variables/CIncEulerVariable.cpp b/SU2_CFD/src/variables/CIncEulerVariable.cpp index 881de86562e4..0c117127c8b6 100644 --- a/SU2_CFD/src/variables/CIncEulerVariable.cpp +++ b/SU2_CFD/src/variables/CIncEulerVariable.cpp @@ -75,11 +75,10 @@ bool CIncEulerVariable::SetPrimVar(unsigned long iPoint, CFluidModel *FluidModel SetPressure(iPoint); - /*--- Set the value of the enthalpy directly ---*/ - su2double Enthalpy = Solution(iPoint, nDim +1); FluidModel->SetTDState_h(Enthalpy); su2double Temperature = FluidModel->GetTemperature(); + const auto check_temp = SetTemperature(iPoint, Temperature, TemperatureLimits); /*--- Use the fluid model to compute the new value of density. @@ -103,8 +102,7 @@ bool CIncEulerVariable::SetPrimVar(unsigned long iPoint, CFluidModel *FluidModel Enthalpy = Solution(iPoint, nDim+1); FluidModel->SetTDState_h(Enthalpy); - Temperature = FluidModel->GetTemperature(); - SetTemperature(iPoint, Temperature, TemperatureLimits); + SetTemperature(iPoint, FluidModel->GetTemperature(), TemperatureLimits); SetDensity(iPoint, FluidModel->GetDensity()); /*--- Flag this point as non-physical. ---*/ @@ -117,10 +115,13 @@ bool CIncEulerVariable::SetPrimVar(unsigned long iPoint, CFluidModel *FluidModel SetVelocity(iPoint); - /*--- Set enthalpy and specific heats (only necessary for consistency with preconditioning). ---*/ + /*--- Set specific heats ---*/ SetSpecificHeatCp(iPoint, FluidModel->GetCp()); SetSpecificHeatCv(iPoint, FluidModel->GetCv()); + + /*--- Set enthalpy ---*/ + SetEnthalpy(iPoint, FluidModel->GetEnthalpy()); return physical; diff --git a/SU2_CFD/src/variables/CIncNSVariable.cpp b/SU2_CFD/src/variables/CIncNSVariable.cpp index b3632071f17e..3725846d1aa8 100644 --- a/SU2_CFD/src/variables/CIncNSVariable.cpp +++ b/SU2_CFD/src/variables/CIncNSVariable.cpp @@ -53,26 +53,21 @@ CIncNSVariable::CIncNSVariable(su2double pressure, const su2double *velocity, su bool CIncNSVariable::SetPrimVar(unsigned long iPoint, su2double eddy_visc, su2double turb_ke, CFluidModel *FluidModel, const su2double *scalar) { bool physical = true; - su2double Temperature; - su2double Enthalpy; /*--- Set the value of the pressure ---*/ SetPressure(iPoint); - if (Energy) { - Enthalpy = Solution(iPoint, nDim + 1); - FluidModel->SetTDState_h(Enthalpy, scalar); - Temperature = FluidModel->GetTemperature(); - } else { - /*--- When energy equation is switched off, use enthalpy from solution to compute temperature. - * This allows Python wrapper updates to enthalpy to correctly update the density. ---*/ - Enthalpy = Solution(iPoint, nDim + 1); - FluidModel->SetTDState_h(Enthalpy, scalar); - Temperature = FluidModel->GetTemperature(); - } + su2double Enthalpy = Solution(iPoint, nDim + 1); + FluidModel->SetTDState_h(Enthalpy, scalar); + su2double Temperature = FluidModel->GetTemperature(); + auto check_temp = SetTemperature(iPoint, Temperature, TemperatureLimits); + /*--- Use the fluid model to compute the new value of density. + Note that the thermodynamic pressure is constant and decoupled + from the dynamic pressure being iterated. ---*/ + /*--- Set the value of the density ---*/ const auto check_dens = SetDensity(iPoint, FluidModel->GetDensity()); @@ -91,7 +86,6 @@ bool CIncNSVariable::SetPrimVar(unsigned long iPoint, su2double eddy_visc, su2do Enthalpy = Solution(iPoint, nDim + 1); FluidModel->SetTDState_h(Enthalpy, scalar); SetTemperature(iPoint, FluidModel->GetTemperature(), TemperatureLimits); - SetDensity(iPoint, FluidModel->GetDensity()); /*--- Flag this point as non-physical. ---*/ diff --git a/TestCases/py_wrapper/turbulent_premixed_psi/psi.cfg b/TestCases/py_wrapper/turbulent_premixed_psi/psi.cfg index 5b3ecf93158e..c01c2de84cb1 100644 --- a/TestCases/py_wrapper/turbulent_premixed_psi/psi.cfg +++ b/TestCases/py_wrapper/turbulent_premixed_psi/psi.cfg @@ -25,7 +25,6 @@ FREESTREAM_TEMPERATURE = 673 FREESTREAM_DENSITY = 2.55 % ---------------- INCOMPRESSIBLE FLOW CONDITION DEFINITION -------------------% % -%INC_DENSITY_MODEL= CONSTANT INC_DENSITY_MODEL= VARIABLE INC_DENSITY_INIT= 2.55 % @@ -41,20 +40,26 @@ INC_NONDIM= DIMENSIONAL %FLUID_MODEL= CONSTANT_DENSITY FLUID_MODEL= INC_IDEAL_GAS % -CONDUCTIVITY_MODEL= CONSTANT_CONDUCTIVITY -THERMAL_CONDUCTIVITY_CONSTANT= 0.0357 +CONDUCTIVITY_MODEL= CONSTANT_PRANDTL +%THERMAL_CONDUCTIVITY_CONSTANT= 0.0357 % PRANDTL_LAM= 0.72 -TURBULENT_CONDUCTIVITY_MODEL= NONE +TURBULENT_CONDUCTIVITY_MODEL= CONSTANT_PRANDTL_TURB +%TURBULENT_CONDUCTIVITY_MODEL= NONE PRANDTL_TURB= 0.90 % -VISCOSITY_MODEL= SUTHERLAND +%VISCOSITY_MODEL= SUTHERLAND +VISCOSITY_MODEL= POLYNOMIAL_VISCOSITY +% polynomial viscosity for methane-air (phi=0.50) +MU_POLYCOEFFS= (1.097e-5, 3.437e-8, 3.332e-12, 0, 0) + + MU_CONSTANT= 1.716E-5 MU_REF = 1.716e-5 MU_T_REF= 273.15 SUTHERLAND_CONSTANT = 110.4 -SPECIFIC_HEAT_CP = 1150 +SPECIFIC_HEAT_CP = 1350 % % -------------------- BOUNDARY CONDITION DEFINITION --------------------------% % @@ -108,9 +113,12 @@ TIME_DISCRE_FLOW= EULER_IMPLICIT % -------------------- SCALAR TRANSPORT ---------------------------------------% % KIND_SCALAR_MODEL= SPECIES_TRANSPORT -DIFFUSIVITY_MODEL= CONSTANT_DIFFUSIVITY +%DIFFUSIVITY_MODEL= CONSTANT_DIFFUSIVITY +DIFFUSIVITY_MODEL= CONSTANT_SCHMIDT +%DIFFUSIVITY_MODEL= CONSTANT_LEWIS SCHMIDT_NUMBER_LAMINAR= 1.0 -DIFFUSIVITY_CONSTANT= 7.56e-5 +CONSTANT_LEWIS_NUMBER= 1.0 1.0 +DIFFUSIVITY_CONSTANT= 5.0e-5 % according to the paper SCHMIDT_NUMBER_TURBULENT= 0.7 @@ -152,8 +160,8 @@ CONV_FILENAME= history MARKER_ANALYZE= gas_inlet, air_axial_inlet, outlet MARKER_ANALYZE_AVERAGE= AREA % -OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK -VOLUME_OUTPUT= SOLUTION, PRIMITIVE, SPECIES_UDS_0 +OUTPUT_FILES= RESTART, RESTART_ASCII, PARAVIEW_MULTIBLOCK +VOLUME_OUTPUT= RESIDUAL, PRIMITIVE, SPECIES_UDS_0 OUTPUT_WRT_FREQ= 100 % READ_BINARY_RESTART= YES diff --git a/TestCases/py_wrapper/turbulent_premixed_psi/run.py b/TestCases/py_wrapper/turbulent_premixed_psi/run.py index 82c72dc6e83c..8097c8b08fa1 100644 --- a/TestCases/py_wrapper/turbulent_premixed_psi/run.py +++ b/TestCases/py_wrapper/turbulent_premixed_psi/run.py @@ -36,6 +36,7 @@ # without mpi: # comm = 0 +Tref = 298.15 # flame temperature of the methane-air mixture (phi=0.5, P=5) Tf = 1777 @@ -48,7 +49,7 @@ # unburnt thermal conductivity of methane-air (phi=0.5, P=5) k_u = 0.0523 # unburnt heat capacity of methane-air (phi=0.5, P=5) -cp_u = 1311.0 +cp_u = 1350.0 # P = rho*R*T # 5 = 2.55 * R * 673 @@ -91,12 +92,25 @@ def update_temperature(SU2Driver, iPoint): iSPECIESSOLVER = SU2Driver.GetSolverIndices()['SPECIES'] # Note: returns a list C = SU2Driver.Solution(iSPECIESSOLVER)(iPoint,0) - T = Tu*(1-C) + Tf*C + #iFLOWSOLVER = SU2Driver.GetSolverIndices()['INC.FLOW'] + #solindex = getsolvar(SU2Driver) + #iTEMP = solindex.get("TEMPERATURE") + #T = SU2Driver.Solution(iFLOWSOLVER)(iPoint,iTEMP) + #SU2Driver.Solution(iFLOWSOLVER).Set(iPoint,iTEMP,cp_u*T) + prim_indices = SU2Driver.GetPrimitiveIndices() iTemp = prim_indices['TEMPERATURE'] SU2Driver.Primitives().Set(iPoint,iTemp, T) + #ih = prim_indices['ENTHALPY'] + #SU2Driver.Primitives().Set(iPoint,ih, cp_u*(T-Tref)) + + iFLOWSOLVER = SU2Driver.GetSolverIndices()['INC.FLOW'] + iENTH = 3 + #h = + SU2Driver.Solution(iFLOWSOLVER).Set(iPoint,iENTH, cp_u*(T-Tref)) + # ################################################################## # # Source term according to Zimont @@ -209,11 +223,9 @@ def main(): sys.stdout.flush() # run N iterations - for inner_iter in range(2): + for inner_iter in range(2000): if (rank==0): print("python iteration ", inner_iter) - driver.Preprocess(inner_iter) - driver.Run() Source = driver.UserDefinedSource(iSPECIESSOLVER) @@ -229,6 +241,10 @@ def main(): # set the temperature to T = c*Tf + (1-c)*Tu update_temperature(driver, i_node) + + driver.Preprocess(inner_iter) + driver.Run() + driver.Postprocess() driver.Update() # Monitor the solver and output solution to file if required. From 8f55465b65ab9ba39b64aa2347cbc216311aa296 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 23 Dec 2025 21:38:08 +0100 Subject: [PATCH 11/37] remove temperatureInc --- SU2_CFD/src/variables/CIncNSVariable.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/SU2_CFD/src/variables/CIncNSVariable.cpp b/SU2_CFD/src/variables/CIncNSVariable.cpp index 3725846d1aa8..6a335e103df4 100644 --- a/SU2_CFD/src/variables/CIncNSVariable.cpp +++ b/SU2_CFD/src/variables/CIncNSVariable.cpp @@ -47,7 +47,6 @@ CIncNSVariable::CIncNSVariable(su2double pressure, const su2double *velocity, su AuxVar.resize(nPoint,nAuxVar) = su2double(0.0); Grad_AuxVar.resize(nPoint,nAuxVar,nDim); } - if(!Energy) TemperatureInc = config->GetInc_Temperature_Init(); } bool CIncNSVariable::SetPrimVar(unsigned long iPoint, su2double eddy_visc, su2double turb_ke, CFluidModel *FluidModel, const su2double *scalar) { From b64c12db44728e28c3ccc7e11f0b347baa7d706c Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 23 Dec 2025 22:07:33 +0100 Subject: [PATCH 12/37] remove unused variable --- SU2_CFD/include/variables/CIncEulerVariable.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/SU2_CFD/include/variables/CIncEulerVariable.hpp b/SU2_CFD/include/variables/CIncEulerVariable.hpp index 5573949ea62b..dd9821f8610d 100644 --- a/SU2_CFD/include/variables/CIncEulerVariable.hpp +++ b/SU2_CFD/include/variables/CIncEulerVariable.hpp @@ -72,7 +72,6 @@ class CIncEulerVariable : public CFlowVariable { VectorType Streamwise_Periodic_RecoveredPressure, /*!< \brief Recovered/Physical pressure [Pa] for streamwise periodic flow. */ Streamwise_Periodic_RecoveredTemperature; /*!< \brief Recovered/Physical temperature [K] for streamwise periodic flow. */ su2double TemperatureLimits[2]; /*!< \brief Temperature limits [K]. */ - su2double TemperatureInc = 0.0; /*!< \brief Temperature [K] imposed when energy equation is switch off. */ public: /*! * \brief Constructor of the class. From 9a3fd9ebc4ee880c352dc9617100e7a81e0fa514 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Wed, 24 Dec 2025 18:37:53 +0100 Subject: [PATCH 13/37] change viscosity call --- SU2_CFD/src/solvers/CSpeciesSolver.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/SU2_CFD/src/solvers/CSpeciesSolver.cpp b/SU2_CFD/src/solvers/CSpeciesSolver.cpp index e04c55ef1dc6..985b67426c46 100644 --- a/SU2_CFD/src/solvers/CSpeciesSolver.cpp +++ b/SU2_CFD/src/solvers/CSpeciesSolver.cpp @@ -295,7 +295,6 @@ void CSpeciesSolver::Preprocessing(CGeometry* geometry, CSolver** solver_contain bool Output) { SU2_OMP_SAFE_GLOBAL_ACCESS(config->SetGlobalParam(config->GetKind_Solver(), RunTime_EqSystem);) - /*--- Set the laminar mass Diffusivity for the species solver. ---*/ SU2_OMP_FOR_STAT(omp_chunk_size) for (auto iPoint = 0u; iPoint < nPoint; iPoint++) { const su2double temperature = solver_container[FLOW_SOL]->GetNodes()->GetTemperature(iPoint); @@ -303,16 +302,16 @@ void CSpeciesSolver::Preprocessing(CGeometry* geometry, CSolver** solver_contain solver_container[FLOW_SOL]->GetFluidModel()->SetMassDiffusivityModel(config); solver_container[FLOW_SOL]->GetFluidModel()->SetTDState_T(temperature, scalar); /*--- Recompute viscosity, important to get diffusivity correct across MPI ranks. ---*/ - const su2double viscosity = solver_container[FLOW_SOL]->GetFluidModel()->GetLaminarViscosity(); + nodes->SetLaminarViscosity(iPoint, solver_container[FLOW_SOL]->GetFluidModel()->GetLaminarViscosity()); + /*--- Set the laminar mass Diffusivity for the species solver. ---*/ for (auto iVar = 0u; iVar <= nVar; iVar++) { const su2double mass_diffusivity = solver_container[FLOW_SOL]->GetFluidModel()->GetMassDiffusivity(iVar); nodes->SetDiffusivity(iPoint, mass_diffusivity, iVar); } - } // iPoint END_SU2_OMP_FOR - /*--- Clear Residual and Jacobian. Upwind second order reconstruction and gradients ---*/ + /*--- Clear Residual and Jacobian. Upwind second order reconstruction and gradients. ---*/ CommonPreprocessing(geometry, config, Output); } From ef55690e2cbb8ac6a98fbdc44826977a567790f8 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Sat, 27 Dec 2025 15:32:01 +0100 Subject: [PATCH 14/37] fix some regression --- TestCases/hybrid_regression.py | 4 ++-- .../buoyancy_cavity/lam_buoyancy_cavity.cfg | 15 +++++++-------- TestCases/radiation/p1model/configp1.cfg | 6 ++++-- TestCases/serial_regression.py | 8 ++++---- TestCases/serial_regression_AD.py | 4 ++-- TestCases/tutorials.py | 14 +++++++------- TestCases/vandv.py | 2 +- 7 files changed, 27 insertions(+), 26 deletions(-) diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index fc6ee002821f..b95403ebb428 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -375,7 +375,7 @@ def main(): inc_buoyancy.cfg_dir = "incomp_navierstokes/buoyancy_cavity" inc_buoyancy.cfg_file = "lam_buoyancy_cavity.cfg" inc_buoyancy.test_iter = 20 - inc_buoyancy.test_vals = [-4.432484, 0.507522, 0.000000, 0.000000] + inc_buoyancy.test_vals = [-4.431165, 3.504788, 0.000000, 0.000000] test_list.append(inc_buoyancy) # Laminar heated cylinder with polynomial fluid model @@ -665,7 +665,7 @@ def main(): slinc_steady.cfg_dir = "sliding_interface/incompressible_steady" slinc_steady.cfg_file = "config.cfg" slinc_steady.test_iter = 19 - slinc_steady.test_vals = [19.000000, -1.048446, -1.324274] + slinc_steady.test_vals = [19.000000, -1.154873, -1.378119] slinc_steady.test_vals_aarch64 = [19.000000, -1.048446, -1.324274] slinc_steady.multizone = True test_list.append(slinc_steady) diff --git a/TestCases/incomp_navierstokes/buoyancy_cavity/lam_buoyancy_cavity.cfg b/TestCases/incomp_navierstokes/buoyancy_cavity/lam_buoyancy_cavity.cfg index 47474c4a0a74..f7d53887c85f 100644 --- a/TestCases/incomp_navierstokes/buoyancy_cavity/lam_buoyancy_cavity.cfg +++ b/TestCases/incomp_navierstokes/buoyancy_cavity/lam_buoyancy_cavity.cfg @@ -62,14 +62,14 @@ REF_AREA= 1.0 MARKER_HEATFLUX= ( upper, 0.0, lower, 0.0 ) MARKER_ISOTHERMAL= ( left, 461.04, right, 115.26 ) MARKER_PLOTTING= ( upper, left, right, lower ) -MARKER_MONITORING= ( NONE ) +MARKER_MONITORING= ( left, right,upper ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= GREEN_GAUSS -CFL_NUMBER= 1e2 -CFL_ADAPT= NO -CFL_ADAPT_PARAM= ( 1.5, 0.5, 15.0, 1e10) +CFL_NUMBER= 20 +CFL_ADAPT= YES +CFL_ADAPT_PARAM= ( 0.95, 1.01, 10, 1000, 0.001, 0) MAX_DELTA_TIME= 1E6 RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) ITER= 99999 @@ -79,8 +79,8 @@ ITER= 99999 LINEAR_SOLVER= FGMRES LINEAR_SOLVER_PREC= ILU LINEAR_SOLVER_ILU_FILL_IN= 0 -LINEAR_SOLVER_ERROR= 1E-15 -LINEAR_SOLVER_ITER= 20 +LINEAR_SOLVER_ERROR= 1E-06 +LINEAR_SOLVER_ITER= 25 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % @@ -114,7 +114,6 @@ GRAD_OBJFUNC_FILENAME= of_grad SURFACE_FILENAME= surface_flow SURFACE_ADJ_FILENAME= surface_adjoint OUTPUT_WRT_FREQ= 100 -SCREEN_OUTPUT= (INNER_ITER, RMS_PRESSURE, RMS_ENTHALPY, LIFT, DRAG) - +SCREEN_OUTPUT= (INNER_ITER, RMS_PRESSURE, RMS_VELOCITY-X, RMS_ENTHALPY, TOTAL_HEATFLUX) % ----------------------- GEOMETRY EVALUATION PARAMETERS ----------------------% GEO_BOUNDS= ( 0.499, 0.501) diff --git a/TestCases/radiation/p1model/configp1.cfg b/TestCases/radiation/p1model/configp1.cfg index 6c779b16d0fb..be5787656d31 100644 --- a/TestCases/radiation/p1model/configp1.cfg +++ b/TestCases/radiation/p1model/configp1.cfg @@ -67,7 +67,7 @@ MARKER_MONITORING= ( upper, left ) LINEAR_SOLVER= FGMRES LINEAR_SOLVER_PREC= ILU LINEAR_SOLVER_ILU_FILL_IN= 0 -LINEAR_SOLVER_ERROR= 1E-8 +LINEAR_SOLVER_ERROR= 1E-6 LINEAR_SOLVER_ITER= 10 %%%%%%%%%%%%%%%%%%%%%%% @@ -80,12 +80,14 @@ MUSCL_FLOW= YES SLOPE_LIMITER_FLOW= NONE TIME_DISCRE_FLOW= EULER_IMPLICIT CFL_NUMBER= 100 +CFL_ADAPT= YES +CFL_ADAPT_PARAM= ( 0.9, 1.10, 100.0, 1000, 0.1, 0) %%%%%%%%%%%%%%%%%%%%%%% % CONVERGENCE CRITERIA %%%%%%%%%%%%%%%%%%%%%%% -INNER_ITER= 101 +INNER_ITER= 51 CONV_RESIDUAL_MINVAL= -10 CONV_STARTITER= 10 diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index cfd25784fa03..9c88fb838851 100755 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -458,7 +458,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.881656, -5.732047, -6.724784, -4.242639, -7.189741, -2.050900, 10.000000, -2.877778, 0.001149, 0.003172, 0.000000] + inc_turb_wallfunction_flatplate_sst.test_vals = [-6.881887, -5.731983, -6.725181, -2.618754, -7.189701, -2.050891, 10.000000, -2.027265, 0.001155, 0.003172, 0.000000] test_list.append(inc_turb_wallfunction_flatplate_sst) # FLAT PLATE, WALL FUNCTIONS, INCOMPRESSIBLE SA @@ -466,7 +466,7 @@ def main(): inc_turb_wallfunction_flatplate_sa.cfg_dir = "wallfunctions/flatplate/incompressible_SA" inc_turb_wallfunction_flatplate_sa.cfg_file = "turb_SA_flatplate.cfg" inc_turb_wallfunction_flatplate_sa.test_iter = 10 - inc_turb_wallfunction_flatplate_sa.test_vals = [-6.894226, -5.716031, -6.743814, -4.242551, -9.550079, 10.000000, -2.879412, 0.001021, 0.003759] + inc_turb_wallfunction_flatplate_sa.test_vals = [-6.894473, -5.715971, -6.744286, -2.631311, -9.550134, 10.000000, -2.017104, 0.001027, 0.003759] test_list.append(inc_turb_wallfunction_flatplate_sa) #################### @@ -986,7 +986,7 @@ def main(): slinc_steady.cfg_dir = "sliding_interface/incompressible_steady" slinc_steady.cfg_file = "config.cfg" slinc_steady.test_iter = 19 - slinc_steady.test_vals = [19.000000, -1.049468, -1.303013] + slinc_steady.test_vals = [19.000000, -1.148249, -1.398402] slinc_steady.timeout = 100 slinc_steady.multizone = True test_list.append(slinc_steady) @@ -1097,7 +1097,7 @@ def main(): p1rad = TestCase('p1rad') p1rad.cfg_dir = "radiation/p1model" p1rad.cfg_file = "configp1.cfg" - p1rad.test_iter = 100 + p1rad.test_iter = 50 p1rad.test_vals = [-7.751309, -7.923059, -2.119084, 0.091733, -47.387000] test_list.append(p1rad) diff --git a/TestCases/serial_regression_AD.py b/TestCases/serial_regression_AD.py index 0cb1b5715891..4bffc9ec0aa7 100644 --- a/TestCases/serial_regression_AD.py +++ b/TestCases/serial_regression_AD.py @@ -194,7 +194,7 @@ def main(): discadj_heat.cfg_dir = "disc_adj_heat" discadj_heat.cfg_file = "disc_adj_heat.cfg" discadj_heat.test_iter = 10 - discadj_heat.test_vals = [-2.685957, 0.665986, 0.000000, -9.155800] + discadj_heat.test_vals = [-2.677870, 0.674825, 0.000000, -9.215500] test_list.append(discadj_heat) ################################### @@ -219,7 +219,7 @@ def main(): discadj_cht.cfg_dir = "coupled_cht/disc_adj_incomp_2d" discadj_cht.cfg_file = "cht_2d_3cylinders.cfg" discadj_cht.test_iter = 10 - discadj_cht.test_vals = [-6.131112, -2.564634, -2.565220, -2.565304] + discadj_cht.test_vals = [-6.308199, -3.086023, -3.086024, -3.086024] test_list.append(discadj_cht) ###################################### diff --git a/TestCases/tutorials.py b/TestCases/tutorials.py index 0768bc29370d..eccb5f3e630c 100644 --- a/TestCases/tutorials.py +++ b/TestCases/tutorials.py @@ -49,7 +49,7 @@ def main(): cht_incompressible_unsteady.cfg_dir = "../Tutorials/multiphysics/unsteady_cht/" cht_incompressible_unsteady.cfg_file = "cht_2d_3cylinders.cfg" cht_incompressible_unsteady.test_iter = 2 - cht_incompressible_unsteady.test_vals = [-2.661440, -2.534489, -0.080399, -0.080399, -0.080399, -12.421979, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 238.240000] #last columns + cht_incompressible_unsteady.test_vals = [-1.742894, -3.075372, -0.080399, -0.080399, -0.080399, -11.163219, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 238.240000] #last columns cht_incompressible_unsteady.multizone = True cht_incompressible_unsteady.unsteady = True test_list.append(cht_incompressible_unsteady) @@ -69,7 +69,7 @@ def main(): cht_CR.cfg_dir = "../Tutorials/multiphysics/contact_resistance_cht" cht_CR.cfg_file = "master.cfg" cht_CR.test_iter = 80 - cht_CR.test_vals = [-8.606916, -9.227614, -10.411674, -2.116659] + cht_CR.test_vals = [-8.606938, -9.227901, -10.410107, -2.129377] cht_CR.multizone = True test_list.append(cht_CR) @@ -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.685131, 1.388616, -0.755475, 241.878084] + sp_pinArray_2d_mf_hf.test_vals = [-4.684477, 0.844369, -0.755565, 241.872175] sp_pinArray_2d_mf_hf.test_vals_aarch64 = [-4.686092, 1.387918, -0.755447, 241.878841] test_list.append(sp_pinArray_2d_mf_hf) @@ -89,7 +89,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.737196, 1.322378, -0.713373, 208.023676] + sp_pinArray_2d_dp_hf_tp.test_vals = [-4.739886, 0.520841, -0.713547, 208.023676] sp_pinArray_2d_dp_hf_tp.test_vals_aarch64 = [-4.733643, 1.325195, -0.713411, 208.023676] test_list.append(sp_pinArray_2d_dp_hf_tp) @@ -136,7 +136,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 = [-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] + species3_primitiveVenturi.test_vals = [-5.673011, -4.673114, -4.692686, -5.445043, -1.069650, -5.960206, -6.065010, 5.000000, -0.569992, 5.000000, -2.512966, 5.000000, -0.525813, 1.660601, 0.502277, 0.603346, 0.554977] test_list.append(species3_primitiveVenturi) # 3 species (2 eq) primitive venturi mixing @@ -144,7 +144,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.819097, -8.643457, -8.676919, -8.347340, -12.926241, -9.739487, -8.947991] + DAspecies3_primitiveVenturi.test_vals = [-9.821887, -8.644118, -8.677534, -8.347228, -12.926295, -9.739487, -8.947991] DAspecies3_primitiveVenturi.command = TestCase.Command("mpirun -n 2", "SU2_CFD_AD") test_list.append(DAspecies3_primitiveVenturi) @@ -153,7 +153,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.490303, -6.823796, -6.838369, -6.383332, -7.907780, -3.062276, -7.451176, 5.000000, -1.858354, 4.000000, -5.318193, 3.000000, -6.371744, 0.025671, 0.000000, 0.025671, 0.000000, 62.846000, 8.470600, 46.847000, 7.527900] + kenics_mixer_tutorial.test_vals = [-7.490472, -6.823803, -6.838373, -6.383764, -7.907928, -3.062404, -7.452184, 5.000000, -1.858094, 4.000000, -5.318066, 3.000000, -6.371967, 0.025661, 0.000000, 0.025661, 0.000000, 62.736000, 8.470600, 46.738000, 7.527900] kenics_mixer_tutorial.command = TestCase.Command("mpirun -n 2", "SU2_CFD") test_list.append(kenics_mixer_tutorial) diff --git a/TestCases/vandv.py b/TestCases/vandv.py index f7b197632ca4..a379e775c0f0 100644 --- a/TestCases/vandv.py +++ b/TestCases/vandv.py @@ -111,7 +111,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 = [-8.271400, -6.305945, -6.123143, -5.634565, -1.687556, -7.869775, 5.000000, -1.527449, 5.000000, -4.053788, 5.000000, -2.303502, 0.000257, 0.000000, 0.000000, 0.000257, 4020.500000, 3919.900000, 49.151000, 51.436000] + sandiajet_sst.test_vals = [-4.930056, -3.072757, -3.531917, -3.632319, 1.186060, -6.175518, 5.000000, -1.413277, 5.000000, -4.735257, 5.000000, -1.924560, 0.000256, 0.000000, 0.000000, 0.000256, 4126.200000, 4008.100000, 62.399000, 55.713000] sandiajet_sst.test_vals_aarch64 = [-8.271400, -6.305945, -6.123143, -5.634565, -1.687556, -7.869775, 5.000000, -1.527449, 5.000000, -4.053788, 5.000000, -2.303502, 0.000257, 0.000000, 0.000000, 0.000257, 4020.500000, 3919.900000, 49.151000, 51.436000] test_list.append(sandiajet_sst) From eaf54d623e2136d8836194e077479d60a15e1f71 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Sat, 27 Dec 2025 21:47:12 +0100 Subject: [PATCH 15/37] fix some regression --- TestCases/hybrid_regression.py | 2 +- TestCases/parallel_regression.py | 12 ++++++------ TestCases/py_wrapper/turbulent_premixed_psi/run.py | 2 +- TestCases/serial_regression.py | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index b95403ebb428..5b1642e92f35 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -375,7 +375,7 @@ def main(): inc_buoyancy.cfg_dir = "incomp_navierstokes/buoyancy_cavity" inc_buoyancy.cfg_file = "lam_buoyancy_cavity.cfg" inc_buoyancy.test_iter = 20 - inc_buoyancy.test_vals = [-4.431165, 3.504788, 0.000000, 0.000000] + inc_buoyancy.test_vals = [-3.860456, -3.122396, 4.074516, -23.415000] test_list.append(inc_buoyancy) # Laminar heated cylinder with polynomial fluid model diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 9227d447d597..643649b7af55 100755 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -603,7 +603,7 @@ def main(): inc_buoyancy.cfg_dir = "incomp_navierstokes/buoyancy_cavity" inc_buoyancy.cfg_file = "lam_buoyancy_cavity.cfg" inc_buoyancy.test_iter = 20 - inc_buoyancy.test_vals = [-4.435827, 0.508037, 0.000000, 0.000000] + inc_buoyancy.test_vals = [-3.860462, -3.122401, 4.074510, -23.414000] test_list.append(inc_buoyancy) # Laminar heated cylinder with polynomial fluid model @@ -635,7 +635,7 @@ def main(): inc_heatTransfer_BC.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_2d" inc_heatTransfer_BC.cfg_file = "BC_HeatTransfer.cfg" inc_heatTransfer_BC.test_iter = 50 - inc_heatTransfer_BC.test_vals = [-8.747445, -7.653823, -8.079512, -0.654920, -1670.100000] + inc_heatTransfer_BC.test_vals = [-8.686723, -7.601245, -8.072766, 1.864213, -1669.800000] test_list.append(inc_heatTransfer_BC) ############################ @@ -1209,7 +1209,7 @@ def main(): slinc_steady.cfg_dir = "sliding_interface/incompressible_steady" slinc_steady.cfg_file = "config.cfg" slinc_steady.test_iter = 19 - slinc_steady.test_vals = [19.000000, -1.012869, -1.222087] + slinc_steady.test_vals = [19.000000, -1.131557, -1.370471] slinc_steady.timeout = 100 slinc_steady.tol = 0.00002 slinc_steady.multizone = True @@ -1318,7 +1318,7 @@ def main(): p1rad = TestCase('p1rad') p1rad.cfg_dir = "radiation/p1model" p1rad.cfg_file = "configp1.cfg" - p1rad.test_iter = 100 + p1rad.test_iter = 50 p1rad.test_vals = [-7.743666, -7.921411, -2.111848, 0.098302, -47.897000] test_list.append(p1rad) @@ -1363,7 +1363,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.379544, 2.491817, -1.255558, -0.613405, 208.023676, 349.870000, -0.000000, -0.613410, 0.613410] + sp_pinArray_cht_2d_dp_hf.test_vals = [0.353740, 2.436726, -1.270003, -0.615079, 208.023676, 350.100000, -0.000000, -0.615080, 0.615080] sp_pinArray_cht_2d_dp_hf.multizone = True test_list.append(sp_pinArray_cht_2d_dp_hf) @@ -1372,7 +1372,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 = [0.261726, 3.878700, 0.298987, -0.009537, 104.749181, 354.800000, 0.000000] + sp_pinArray_3d_cht_mf_hf_tp.test_vals = [-1.279608, 3.011923, -0.641797, -0.009777, 104.609505, 410.330000, 0.000000] sp_pinArray_3d_cht_mf_hf_tp.multizone = True test_list.append(sp_pinArray_3d_cht_mf_hf_tp) diff --git a/TestCases/py_wrapper/turbulent_premixed_psi/run.py b/TestCases/py_wrapper/turbulent_premixed_psi/run.py index 8097c8b08fa1..1f355f135e6f 100644 --- a/TestCases/py_wrapper/turbulent_premixed_psi/run.py +++ b/TestCases/py_wrapper/turbulent_premixed_psi/run.py @@ -223,7 +223,7 @@ def main(): sys.stdout.flush() # run N iterations - for inner_iter in range(2000): + for inner_iter in range(10): if (rank==0): print("python iteration ", inner_iter) diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 9c88fb838851..8dd870bfd7ba 100755 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -407,7 +407,7 @@ def main(): inc_buoyancy.cfg_dir = "incomp_navierstokes/buoyancy_cavity" inc_buoyancy.cfg_file = "lam_buoyancy_cavity.cfg" inc_buoyancy.test_iter = 20 - inc_buoyancy.test_vals = [-4.436657, 0.507847, 0.000000, 0.000000] + inc_buoyancy.test_vals = [-3.860463, -3.122402, 4.074509, -23.414000] test_list.append(inc_buoyancy) # Laminar heated cylinder with polynomial fluid model @@ -1098,7 +1098,7 @@ def main(): p1rad.cfg_dir = "radiation/p1model" p1rad.cfg_file = "configp1.cfg" p1rad.test_iter = 50 - p1rad.test_vals = [-7.751309, -7.923059, -2.119084, 0.091733, -47.387000] + p1rad.test_vals = [-8.284673, -8.008659, -2.424204, 0.389030, -56.560000] test_list.append(p1rad) # ############################### From 38cfefbd477743e8a08c5c2646ce387d736f2c89 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Mon, 29 Dec 2025 12:59:00 +0100 Subject: [PATCH 16/37] nondimensionalize poly-cp --- SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp b/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp index aff8085617d9..f14b69d92e3c 100644 --- a/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp +++ b/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp @@ -61,7 +61,7 @@ class CIncIdealGasPolynomial final : public CFluidModel { Enthalpy_Ref = 0.0; su2double t_i = 1.0; for (int i = 0; i < N; ++i) { - t_i *= STD_REF_TEMP; + t_i *= STD_REF_TEMP / config->GetInc_Temperature_Ref(); coeffs_[i] = config->GetCp_PolyCoeffND(i); Enthalpy_Ref += coeffs_[i] * t_i / (i + 1); } From bcfe6227bf3a922f8ea9ba9749a0a8eaee194082 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Mon, 29 Dec 2025 23:27:55 +0100 Subject: [PATCH 17/37] change nondimensionalization of cp and enthalpy --- .github/workflows/regression.yml | 2 +- SU2_CFD/include/fluid/CConstantDensity.hpp | 10 ++++++--- SU2_CFD/include/fluid/CFluidModel.hpp | 4 ++-- SU2_CFD/include/fluid/CIncIdealGas.hpp | 8 ++++--- .../include/fluid/CIncIdealGasPolynomial.hpp | 16 +++++++++----- SU2_CFD/src/solvers/CIncEulerSolver.cpp | 16 +++++++------- SU2_CFD/src/solvers/CSolver.cpp | 2 -- .../cylinder/heated_cylinder.cfg | 2 +- .../lam_prem_ch4_cfd.cfg | 17 ++++++++------- .../lam_prem_ch4_cfd_axi.cfg | 21 +++++++++++-------- TestCases/hybrid_regression.py | 2 +- 11 files changed, 58 insertions(+), 42 deletions(-) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index b7d4c3530d01..6bddf426aab7 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 develop -c develop -s ${{matrix.testscript}} + args: -b ${{github.ref}} -t develop -c fix_enthalpy -s ${{matrix.testscript}} - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2:250717-1402 with: diff --git a/SU2_CFD/include/fluid/CConstantDensity.hpp b/SU2_CFD/include/fluid/CConstantDensity.hpp index a796762a2713..4ba06242add7 100644 --- a/SU2_CFD/include/fluid/CConstantDensity.hpp +++ b/SU2_CFD/include/fluid/CConstantDensity.hpp @@ -39,10 +39,11 @@ class CConstantDensity final : public CFluidModel { /*! * \brief Constructor of the class. */ - CConstantDensity(su2double val_Density, su2double val_Cp) { + CConstantDensity(su2double val_Density, su2double val_Cp, su2double val_Temperature_Ref) { Density = val_Density; Cp = val_Cp; Cv = val_Cp; + Std_Ref_Temp_ND = val_Temperature_Ref; } /*! @@ -56,7 +57,7 @@ class CConstantDensity final : public CFluidModel { decoupled equation. Hence, we update the value. Note Cp = Cv, (gamma = 1).*/ Temperature = t; - Enthalpy = Cp * (Temperature - STD_REF_TEMP); // Sensible enthalpy relative to STD_REF_TEMP + Enthalpy = Cp * (Temperature - Std_Ref_Temp_ND); // Sensible enthalpy relative to STD_REF_TEMP } /*! @@ -66,6 +67,9 @@ class CConstantDensity final : public CFluidModel { */ void SetTDState_h(su2double val_enthalpy, const su2double* val_scalars = nullptr) override { Enthalpy = val_enthalpy; - Temperature = Enthalpy / Cp + STD_REF_TEMP; // Temperature from sensible enthalpy + Temperature = Enthalpy / Cp + Std_Ref_Temp_ND; // Temperature from sensible enthalpy } + + private: + su2double Std_Ref_Temp_ND{0.0}; /*!< \brief Nondimensional standard reference temperature for enthalpy. */ }; diff --git a/SU2_CFD/include/fluid/CFluidModel.hpp b/SU2_CFD/include/fluid/CFluidModel.hpp index 03f1e7d66052..2b774296fd56 100644 --- a/SU2_CFD/include/fluid/CFluidModel.hpp +++ b/SU2_CFD/include/fluid/CFluidModel.hpp @@ -279,7 +279,7 @@ class CFluidModel { /*! * \brief Set specific heat Cp model. */ - virtual void SetCpModel(const CConfig* config) {} + virtual void SetCpModel(const CConfig* config, su2double val_Temperature_Ref) {} /*! * \brief Set viscosity model. @@ -372,7 +372,7 @@ class CFluidModel { /*! * \brief Virtual member. * \param[in] val_enthalpy - Enthalpy value at the point. - * \param[in] val_scalars - Scalar mass fractions. + * \param[in] val_scalars - Scalar mass fractions. */ virtual void SetTDState_h(su2double val_enthalpy, const su2double* val_scalars = nullptr) {} diff --git a/SU2_CFD/include/fluid/CIncIdealGas.hpp b/SU2_CFD/include/fluid/CIncIdealGas.hpp index 4b35735f096d..a45a61392db2 100644 --- a/SU2_CFD/include/fluid/CIncIdealGas.hpp +++ b/SU2_CFD/include/fluid/CIncIdealGas.hpp @@ -39,7 +39,7 @@ class CIncIdealGas final : public CFluidModel { /*! * \brief Constructor of the class. */ - CIncIdealGas(su2double val_Cp, su2double val_gas_constant, su2double val_operating_pressure) { + CIncIdealGas(su2double val_Cp, su2double val_gas_constant, su2double val_operating_pressure, su2double val_Temperature_Ref) { /*--- In the incompressible ideal gas model, the thermodynamic pressure is decoupled from the governing equations and held constant. The density is therefore only a function of temperature variations. ---*/ @@ -48,6 +48,7 @@ class CIncIdealGas final : public CFluidModel { Gamma = 1.0; Cp = val_Cp; Cv = Cp; + Std_Ref_Temp_ND = STD_REF_TEMP / val_Temperature_Ref; } /*! @@ -58,7 +59,7 @@ class CIncIdealGas final : public CFluidModel { /*--- The EoS only depends upon temperature. ---*/ Temperature = t; Density = Pressure / (Temperature * Gas_Constant); - Enthalpy = Cp * (Temperature - STD_REF_TEMP); // Sensible enthalpy relative to REF_TEMP + Enthalpy = Cp * (Temperature - Std_Ref_Temp_ND); // Sensible enthalpy relative to REF_TEMP } /*! @@ -67,11 +68,12 @@ class CIncIdealGas final : public CFluidModel { */ void SetTDState_h(su2double val_enthalpy, const su2double* val_scalars = nullptr) override { Enthalpy = val_enthalpy; - Temperature = Enthalpy / Cp + STD_REF_TEMP; // Temperature from sensible enthalpy + Temperature = Enthalpy / Cp + Std_Ref_Temp_ND; // Temperature from sensible enthalpy Density = Pressure / (Temperature * Gas_Constant); } private: su2double Gas_Constant{0.0}; /*!< \brief Gas Constant. */ su2double Gamma{0.0}; /*!< \brief Heat Capacity Ratio. */ + su2double Std_Ref_Temp_ND{0.0}; /*!< \brief Nondimensional standard reference temperature for enthalpy. */ }; diff --git a/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp b/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp index f14b69d92e3c..efba9fd3d4ed 100644 --- a/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp +++ b/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp @@ -42,7 +42,7 @@ class CIncIdealGasPolynomial final : public CFluidModel { /*! * \brief Constructor of the class. */ - CIncIdealGasPolynomial(su2double val_gas_constant, su2double val_operating_pressure) { + CIncIdealGasPolynomial(su2double val_gas_constant, su2double val_operating_pressure, su2double val_Temperature_Ref) { /* In the incompressible ideal gas model, the thermodynamic pressure is decoupled from the governing equations and held constant. The density is therefore only a function of temperature variations. We also use a molecular weight (g/mol) and the @@ -51,17 +51,20 @@ class CIncIdealGasPolynomial final : public CFluidModel { Gas_Constant = val_gas_constant; Pressure = val_operating_pressure; Gamma = 1.0; + Std_Ref_Temp_ND = val_Temperature_Ref; } /*! * \brief Set the temperature polynomial coefficients for variable Cp. * \param[in] config - configuration container for the problem. */ - void SetCpModel(const CConfig* config) override { + void SetCpModel(const CConfig* config, su2double val_Temperature_Ref) override { + const su2double t_ref = val_Temperature_Ref; Enthalpy_Ref = 0.0; su2double t_i = 1.0; for (int i = 0; i < N; ++i) { - t_i *= STD_REF_TEMP / config->GetInc_Temperature_Ref(); + /*--- Note that we use cp = dh/dt here. ---*/ + t_i *= t_ref - Std_Ref_Temp_ND; coeffs_[i] = config->GetCp_PolyCoeffND(i); Enthalpy_Ref += coeffs_[i] * t_i / (i + 1); } @@ -79,12 +82,14 @@ class CIncIdealGasPolynomial final : public CFluidModel { /* Evaluate the new Cp and enthalpy from the coefficients and temperature. */ Cp = coeffs_[0]; - Enthalpy = coeffs_[0] * t - Enthalpy_Ref; + su2double tref_i = t - Std_Ref_Temp_ND; + Enthalpy = coeffs_[0] * tref_i; su2double t_i = 1.0; for (int i = 1; i < N; ++i) { t_i *= t; + tref_i *= (t - Std_Ref_Temp_ND); Cp += coeffs_[i] * t_i; - Enthalpy += coeffs_[i] * t_i * t / (i + 1); + Enthalpy += coeffs_[i] * tref_i / (i + 1); } Cv = Cp / Gamma; } @@ -140,6 +145,7 @@ class CIncIdealGasPolynomial final : public CFluidModel { private: su2double Gas_Constant{0.0}; /*!< \brief Specific Gas Constant. */ su2double Gamma{0.0}; /*!< \brief Ratio of specific heats. */ + su2double Std_Ref_Temp_ND{0.0}; /*!< \brief Nondimensional standard reference temperature for enthalpy. */ array coeffs_; /*!< \brief Polynomial coefficients for heat capacity as a function of temperature. */ su2double Enthalpy_Ref; /*!< \brief Enthalpy computed at the reference temperature. */ su2double Temperature_Min; /*!< \brief Minimum temperature value allowed in Newton-Raphson iterations. */ diff --git a/SU2_CFD/src/solvers/CIncEulerSolver.cpp b/SU2_CFD/src/solvers/CIncEulerSolver.cpp index bee02216dd83..cfb49fb9ff55 100644 --- a/SU2_CFD/src/solvers/CIncEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CIncEulerSolver.cpp @@ -289,7 +289,7 @@ void CIncEulerSolver::SetNondimensionalization(CConfig *config, unsigned short i case CONSTANT_DENSITY: - auxFluidModel = new CConstantDensity(Density_FreeStream, config->GetSpecific_Heat_Cp()); + auxFluidModel = new CConstantDensity(Density_FreeStream, config->GetSpecific_Heat_Cp(), Temperature_FreeStream); auxFluidModel->SetTDState_T(Temperature_FreeStream); break; @@ -297,7 +297,7 @@ void CIncEulerSolver::SetNondimensionalization(CConfig *config, unsigned short i config->SetGas_Constant(UNIVERSAL_GAS_CONSTANT/(config->GetMolecular_Weight()/1000.0)); Pressure_Thermodynamic = Density_FreeStream*Temperature_FreeStream*config->GetGas_Constant(); - auxFluidModel = new CIncIdealGas(config->GetSpecific_Heat_Cp(), config->GetGas_Constant(), Pressure_Thermodynamic); + auxFluidModel = new CIncIdealGas(config->GetSpecific_Heat_Cp(), config->GetGas_Constant(), Pressure_Thermodynamic, Temperature_FreeStream); auxFluidModel->SetTDState_T(Temperature_FreeStream); Pressure_Thermodynamic = auxFluidModel->GetPressure(); config->SetPressure_Thermodynamic(Pressure_Thermodynamic); @@ -307,12 +307,12 @@ void CIncEulerSolver::SetNondimensionalization(CConfig *config, unsigned short i config->SetGas_Constant(UNIVERSAL_GAS_CONSTANT/(config->GetMolecular_Weight()/1000.0)); Pressure_Thermodynamic = Density_FreeStream*Temperature_FreeStream*config->GetGas_Constant(); - auxFluidModel = new CIncIdealGasPolynomial(config->GetGas_Constant(), Pressure_Thermodynamic); + auxFluidModel = new CIncIdealGasPolynomial(config->GetGas_Constant(), Pressure_Thermodynamic, Temperature_FreeStream); if (viscous) { /*--- Variable Cp model via polynomial. ---*/ for (iVar = 0; iVar < config->GetnPolyCoeffs(); iVar++) config->SetCp_PolyCoeffND(config->GetCp_PolyCoeff(iVar), iVar); - auxFluidModel->SetCpModel(config); + auxFluidModel->SetCpModel(config, Temperature_FreeStream); } auxFluidModel->SetTDState_T(Temperature_FreeStream); Pressure_Thermodynamic = auxFluidModel->GetPressure(); @@ -480,11 +480,11 @@ void CIncEulerSolver::SetNondimensionalization(CConfig *config, unsigned short i switch (config->GetKind_FluidModel()) { case CONSTANT_DENSITY: - fluidModel = new CConstantDensity(Density_FreeStreamND, Specific_Heat_CpND); + fluidModel = new CConstantDensity(Density_FreeStreamND, Specific_Heat_CpND, STD_REF_TEMP / config->GetTemperature_Ref()); break; case INC_IDEAL_GAS: - fluidModel = new CIncIdealGas(Specific_Heat_CpND, Gas_ConstantND, Pressure_ThermodynamicND); + fluidModel = new CIncIdealGas(Specific_Heat_CpND, Gas_ConstantND, Pressure_ThermodynamicND, Temperature_FreeStreamND); fluidModel->SetTDState_T(Temperature_FreeStreamND); break; @@ -499,13 +499,13 @@ void CIncEulerSolver::SetNondimensionalization(CConfig *config, unsigned short i break; case INC_IDEAL_GAS_POLY: - fluidModel = new CIncIdealGasPolynomial(Gas_ConstantND, Pressure_ThermodynamicND); + fluidModel = new CIncIdealGasPolynomial(Gas_ConstantND, Pressure_ThermodynamicND, STD_REF_TEMP / config->GetTemperature_Ref()); if (viscous) { /*--- Variable Cp model via polynomial. ---*/ config->SetCp_PolyCoeffND(config->GetCp_PolyCoeff(0)/Gas_Constant_Ref, 0); for (iVar = 1; iVar < config->GetnPolyCoeffs(); iVar++) config->SetCp_PolyCoeffND(config->GetCp_PolyCoeff(iVar)*pow(Temperature_Ref,iVar)/Gas_Constant_Ref, iVar); - fluidModel->SetCpModel(config); + fluidModel->SetCpModel(config, Temperature_FreeStreamND); } fluidModel->SetTDState_T(Temperature_FreeStreamND); break; diff --git a/SU2_CFD/src/solvers/CSolver.cpp b/SU2_CFD/src/solvers/CSolver.cpp index dad6234080e1..8737d1d3b9e7 100644 --- a/SU2_CFD/src/solvers/CSolver.cpp +++ b/SU2_CFD/src/solvers/CSolver.cpp @@ -1834,8 +1834,6 @@ void CSolver::AdaptCFLNumber(CGeometry **geometry, } } - cout << reduceCFL << resetCFL << "\n"; - } /* End safe global access, now all threads update the CFL number. */ END_SU2_OMP_SAFE_GLOBAL_ACCESS diff --git a/TestCases/disc_adj_incomp_navierstokes/cylinder/heated_cylinder.cfg b/TestCases/disc_adj_incomp_navierstokes/cylinder/heated_cylinder.cfg index 039b53f63659..7274a4b1fccb 100644 --- a/TestCases/disc_adj_incomp_navierstokes/cylinder/heated_cylinder.cfg +++ b/TestCases/disc_adj_incomp_navierstokes/cylinder/heated_cylinder.cfg @@ -62,7 +62,7 @@ MARKER_MONITORING= ( cylinder ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= GREEN_GAUSS -CFL_NUMBER= 1000.0 +CFL_NUMBER= 200.0 CFL_ADAPT= NO CFL_ADAPT_PARAM= ( 1.5, 0.5, 10.0, 10000.0 ) RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) diff --git a/TestCases/flamelet/01_laminar_premixed_ch4_flame_cfd/lam_prem_ch4_cfd.cfg b/TestCases/flamelet/01_laminar_premixed_ch4_flame_cfd/lam_prem_ch4_cfd.cfg index 467dfd2b8da9..af94d2606353 100644 --- a/TestCases/flamelet/01_laminar_premixed_ch4_flame_cfd/lam_prem_ch4_cfd.cfg +++ b/TestCases/flamelet/01_laminar_premixed_ch4_flame_cfd/lam_prem_ch4_cfd.cfg @@ -13,7 +13,7 @@ SOLVER = INC_NAVIER_STOKES KIND_TURB_MODEL= NONE MATH_PROBLEM= DIRECT -RESTART_SOL = YES +RESTART_SOL = NO % % ---------------- INCOMPRESSIBLE FLOW CONDITION DEFINITION -------------------% % @@ -37,7 +37,8 @@ KIND_SCALAR_MODEL= FLAMELET DIFFUSIVITY_MODEL= FLAMELET VISCOSITY_MODEL= FLAMELET CONDUCTIVITY_MODEL= FLAMELET -FLAME_INIT_METHOD= FLAME_FRONT +%FLAME_INIT_METHOD= FLAME_FRONT +FLAME_INIT_METHOD= NONE FLAME_INIT= (0.0032, 0.00, 0.00, 1.0, 0.1, 0.0, 1.0e-3, 0.1) % # progvar, enthalpy SPECIES_INIT = (0.0, -210000, 0.0, 0.0) @@ -86,8 +87,10 @@ MARKER_ANALYZE_AVERAGE = AREA % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 50 -CFL_ADAPT= NO +CFL_NUMBER= 100 +CFL_ADAPT= YES +CFL_ADAPT_PARAM= ( 0.95, 1.01, 10.0, 1000, 0.01, 0) + ITER= 10000 OUTPUT_WRT_FREQ= 100 % @@ -115,7 +118,7 @@ CONV_RESIDUAL_MINVAL= -15 CONV_STARTITER= 10 CONV_CAUCHY_ELEMS= 100 CONV_CAUCHY_EPS= 1E-6 -SCREEN_OUTPUT = INNER_ITER RMS_VELOCITY-X RMS_VELOCITY-Y RMS_PRESSURE RMS_ProgressVariable RMS_EnthalpyTot RMS_CO RMS_NOx +SCREEN_OUTPUT = INNER_ITER RMS_VELOCITY-X RMS_VELOCITY-Y RMS_PRESSURE RMS_ProgressVariable RMS_EnthalpyTot RMS_CO RMS_NOx, AVG_CFL HISTORY_OUTPUT = RMS_RES AERO_COEFF FLOW_COEFF FLOW_COEFF_SURF VOLUME_OUTPUT = SOLUTION PRIMITIVE SOURCE RESIDUAL SENSITIVITY LOOKUP TIMESTEP CONV_FIELD = RMS_PRESSURE @@ -127,8 +130,8 @@ MESH_FILENAME = mesh_structured.cgns MESH_OUT_FILENAME= mesh_out SOLUTION_FILENAME= solution RESTART_FILENAME= restart -OUTPUT_FILES = (RESTART,PARAVIEW,PARAVIEW_MULTIBLOCK) -%OUTPUT_FILES = (RESTART) +%OUTPUT_FILES = (RESTART,PARAVIEW,PARAVIEW_MULTIBLOCK) +OUTPUT_FILES = (RESTART) TABULAR_FORMAT = CSV CONV_FILENAME= history VOLUME_FILENAME= ch4_flame_cfd diff --git a/TestCases/flamelet/05_laminar_premixed_ch4_flame_cfd_axi/lam_prem_ch4_cfd_axi.cfg b/TestCases/flamelet/05_laminar_premixed_ch4_flame_cfd_axi/lam_prem_ch4_cfd_axi.cfg index fabcdc4981cf..51986fe7b7b1 100644 --- a/TestCases/flamelet/05_laminar_premixed_ch4_flame_cfd_axi/lam_prem_ch4_cfd_axi.cfg +++ b/TestCases/flamelet/05_laminar_premixed_ch4_flame_cfd_axi/lam_prem_ch4_cfd_axi.cfg @@ -13,13 +13,13 @@ % SOLVER= INC_NAVIER_STOKES KIND_TURB_MODEL= NONE -MATH_PROBLEM= DIRECT +%MATH_PROBLEM= DIRECT RESTART_SOL= YES % % ---------------- INCOMPRESSIBLE FLOW CONDITION DEFINITION -------------------% % INC_DENSITY_MODEL= FLAMELET -INC_ENERGY_EQUATION= YES +INC_ENERGY_EQUATION= NO INC_DENSITY_INIT= 1.00 INC_VELOCITY_INIT= (0.5, 0.0, 0.0 ) INC_TEMPERATURE_INIT= 300.0 @@ -40,6 +40,7 @@ KIND_SCALAR_MODEL= FLAMELET DIFFUSIVITY_MODEL= FLAMELET VISCOSITY_MODEL= FLAMELET CONDUCTIVITY_MODEL= FLAMELET +FLAME_INIT_METHOD= NONE FLAME_INIT= (0.0032, 0.0, 0.0, 1, 0.1, 0, 1e-3, 0.1) % # progvar, enthalpy SPECIES_INIT= (0.0, -210000, 0.0, 0.0) @@ -86,8 +87,10 @@ MARKER_ANALYZE_AVERAGE= AREA % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 20 -CFL_ADAPT= NO +CFL_NUMBER= 100 +CFL_ADAPT= YES +CFL_ADAPT_PARAM= ( 0.95, 1.01, 10.0, 1000, 0.001) + ITER= 10000 OUTPUT_WRT_FREQ= 100 % @@ -95,8 +98,8 @@ OUTPUT_WRT_FREQ= 100 % LINEAR_SOLVER= FGMRES LINEAR_SOLVER_PREC= ILU -LINEAR_SOLVER_ERROR= 1E-10 -LINEAR_SOLVER_ITER= 25 +LINEAR_SOLVER_ERROR= 1E-03 +LINEAR_SOLVER_ITER= 10 % % -------------------------- MULTIGRID PARAMETERS -----------------------------% % @@ -115,7 +118,7 @@ CONV_RESIDUAL_MINVAL= -15 CONV_STARTITER= 10 CONV_CAUCHY_ELEMS= 100 CONV_CAUCHY_EPS= 1E-6 -SCREEN_OUTPUT= INNER_ITER WALL_TIME RMS_VELOCITY-X RMS_VELOCITY-Y RMS_PRESSURE RMS_ProgressVariable RMS_EnthalpyTot +SCREEN_OUTPUT= INNER_ITER WALL_TIME RMS_VELOCITY-X RMS_VELOCITY-Y RMS_PRESSURE RMS_ProgressVariable RMS_EnthalpyTot, AVG_CFL HISTORY_OUTPUT= RMS_RES AERO_COEFF FLOW_COEFF FLOW_COEFF_SURF VOLUME_OUTPUT= SOLUTION PRIMITIVE SOURCE RESIDUAL SENSITIVITY LOOKUP TIMESTEP CONV_FIELD= RMS_PRESSURE @@ -127,8 +130,8 @@ MESH_FILENAME= mesh_axi.su2 MESH_OUT_FILENAME= mesh_out SOLUTION_FILENAME= solution RESTART_FILENAME= restart -%OUTPUT_FILES= (RESTART,PARAVIEW,PARAVIEW_MULTIBLOCK) -OUTPUT_FILES= (RESTART) +OUTPUT_FILES= (RESTART,PARAVIEW,PARAVIEW_MULTIBLOCK) +%OUTPUT_FILES= (RESTART) TABULAR_FORMAT= CSV CONV_FILENAME= history VOLUME_FILENAME= flow diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index d92ee4c2465b..b796466eb09e 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -375,7 +375,7 @@ def main(): inc_buoyancy.cfg_dir = "incomp_navierstokes/buoyancy_cavity" inc_buoyancy.cfg_file = "lam_buoyancy_cavity.cfg" inc_buoyancy.test_iter = 20 - inc_buoyancy.test_vals = [-3.860456, -3.122396, 4.074516, -23.415000] + inc_buoyancy.test_vals = [-3.860443, -3.122399, 4.074529, -23.413000] test_list.append(inc_buoyancy) # Laminar heated cylinder with polynomial fluid model From e1c6dc37525dab02ab9287945749f30cf3b9fa4f Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 30 Dec 2025 14:44:03 +0100 Subject: [PATCH 18/37] fix polynomial cp --- SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp b/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp index efba9fd3d4ed..e7c217e96e07 100644 --- a/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp +++ b/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp @@ -59,14 +59,9 @@ class CIncIdealGasPolynomial final : public CFluidModel { * \param[in] config - configuration container for the problem. */ void SetCpModel(const CConfig* config, su2double val_Temperature_Ref) override { - const su2double t_ref = val_Temperature_Ref; - Enthalpy_Ref = 0.0; - su2double t_i = 1.0; for (int i = 0; i < N; ++i) { /*--- Note that we use cp = dh/dt here. ---*/ - t_i *= t_ref - Std_Ref_Temp_ND; coeffs_[i] = config->GetCp_PolyCoeffND(i); - Enthalpy_Ref += coeffs_[i] * t_i / (i + 1); } Temperature_Min = config->GetTemperatureLimits(0); } @@ -114,12 +109,14 @@ class CIncIdealGasPolynomial final : public CFluidModel { while ((abs(delta_temp_iter) > toll) && (counter++ < counter_limit)) { /* Evaluate the new Cp and enthalpy from the coefficients and temperature. */ Cp_iter = coeffs_[0]; - su2double Enthalpy_iter = coeffs_[0] * temp_iter - Enthalpy_Ref; + su2double tref_i = temp_iter - Std_Ref_Temp_ND; + su2double Enthalpy_iter = coeffs_[0] * tref_i; su2double t_i = 1.0; for (int i = 1; i < N; ++i) { t_i *= temp_iter; + tref_i *= (temp_iter - Std_Ref_Temp_ND); Cp_iter += coeffs_[i] * t_i; - Enthalpy_iter += coeffs_[i] * t_i * temp_iter / (i + 1); + Enthalpy_iter += coeffs_[i] * tref_i / (i + 1); } delta_enthalpy_iter = Enthalpy - Enthalpy_iter; @@ -133,6 +130,7 @@ class CIncIdealGasPolynomial final : public CFluidModel { break; } } + Temperature = temp_iter; Cp = Cp_iter; if (counter == counter_limit) { @@ -147,6 +145,5 @@ class CIncIdealGasPolynomial final : public CFluidModel { su2double Gamma{0.0}; /*!< \brief Ratio of specific heats. */ su2double Std_Ref_Temp_ND{0.0}; /*!< \brief Nondimensional standard reference temperature for enthalpy. */ array coeffs_; /*!< \brief Polynomial coefficients for heat capacity as a function of temperature. */ - su2double Enthalpy_Ref; /*!< \brief Enthalpy computed at the reference temperature. */ su2double Temperature_Min; /*!< \brief Minimum temperature value allowed in Newton-Raphson iterations. */ }; From dc0e72f07e061e21d16ea40b37519c25525d1b96 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 30 Dec 2025 15:42:20 +0100 Subject: [PATCH 19/37] update warning --- SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp b/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp index e7c217e96e07..0f584ec4f404 100644 --- a/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp +++ b/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp @@ -105,7 +105,7 @@ class CIncIdealGasPolynomial final : public CFluidModel { int counter = 0; - /*--- Computing temperature given enthalpy using Newton-Raphson. ---*/ + /*--- Compute temperature given enthalpy using Newton-Raphson. ---*/ while ((abs(delta_temp_iter) > toll) && (counter++ < counter_limit)) { /* Evaluate the new Cp and enthalpy from the coefficients and temperature. */ Cp_iter = coeffs_[0]; @@ -125,7 +125,7 @@ class CIncIdealGasPolynomial final : public CFluidModel { temp_iter += delta_temp_iter; if (temp_iter < Temperature_Min) { - cout << "Warning: Negative temperature has been found during Newton-Raphson" << endl; + cout << "Warning: Negative temperature has been found during Newton-Raphson." << endl; temp_iter = Temperature_Min; break; } @@ -134,7 +134,7 @@ class CIncIdealGasPolynomial final : public CFluidModel { Temperature = temp_iter; Cp = Cp_iter; if (counter == counter_limit) { - cout << "Warning Newton-Raphson exceed number of max iteration in temperature computation" << endl; + cout << "Warning: Newton-Raphson exceeds max. iterations in temperature computation." << endl; } Density = Pressure / (Temperature * Gas_Constant); Cv = Cp / Gamma; From cf8baeca45f3b4e48b4e60598cddc635e60edaa8 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 30 Dec 2025 20:31:21 +0100 Subject: [PATCH 20/37] update easy regression tests --- TestCases/hybrid_regression.py | 8 ++++---- TestCases/hybrid_regression_AD.py | 4 ++-- TestCases/parallel_regression.py | 8 ++++---- TestCases/parallel_regression_AD.py | 2 +- TestCases/serial_regression.py | 10 +++++----- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index b796466eb09e..708ba4d6109f 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -383,8 +383,8 @@ def main(): inc_poly_cylinder.cfg_dir = "incomp_navierstokes/cylinder" inc_poly_cylinder.cfg_file = "poly_cylinder.cfg" inc_poly_cylinder.test_iter = 20 - inc_poly_cylinder.test_vals = [-8.241953, -2.424330, 0.027284, 1.909617, -173.010000] - inc_poly_cylinder.test_vals_aarch64 = [-8.241953, -2.424330, 0.027284, 1.909617, -173.010000] + inc_poly_cylinder.test_vals = [-8.260165, -2.445453, 0.027209, 1.915447, -171.620000] + inc_poly_cylinder.test_vals_aarch64 = [-8.260165, -2.445453, 0.027209, 1.915447, -171.620000] test_list.append(inc_poly_cylinder) # X-coarse laminar bend as a mixed element CGNS test @@ -665,8 +665,8 @@ def main(): slinc_steady.cfg_dir = "sliding_interface/incompressible_steady" slinc_steady.cfg_file = "config.cfg" slinc_steady.test_iter = 19 - slinc_steady.test_vals = [19.000000, -1.154873, -1.378119] - slinc_steady.test_vals_aarch64 = [19.000000, -1.048446, -1.324274] + slinc_steady.test_vals = [19.000000, -1.048972, -1.324971] + slinc_steady.test_vals_aarch64 = [19.000000, -1.048972, -1.324971] slinc_steady.multizone = True test_list.append(slinc_steady) diff --git a/TestCases/hybrid_regression_AD.py b/TestCases/hybrid_regression_AD.py index e1ba90d6a1d0..89bd80ee8f37 100644 --- a/TestCases/hybrid_regression_AD.py +++ b/TestCases/hybrid_regression_AD.py @@ -111,8 +111,8 @@ def main(): discadj_incomp_cylinder.cfg_dir = "disc_adj_incomp_navierstokes/cylinder" discadj_incomp_cylinder.cfg_file = "heated_cylinder.cfg" discadj_incomp_cylinder.test_iter = 20 - discadj_incomp_cylinder.test_vals = [20.000000, -5.098033, -3.842740, 0.000000] - discadj_incomp_cylinder.test_vals_aarch64 = [20.000000, -5.098033, -3.842740, 0.000000] + discadj_incomp_cylinder.test_vals = [20.000000, -1.671920, -6.254841, 0.000000] + discadj_incomp_cylinder.test_vals_aarch64 = [20.000000, -1.671920, -6.254841, 0.000000] discadj_incomp_cylinder.tol_aarch64 = 2e-1 test_list.append(discadj_incomp_cylinder) diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index b9ff817a716f..865385c0172b 100755 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -611,7 +611,7 @@ def main(): inc_poly_cylinder.cfg_dir = "incomp_navierstokes/cylinder" inc_poly_cylinder.cfg_file = "poly_cylinder.cfg" inc_poly_cylinder.test_iter = 20 - inc_poly_cylinder.test_vals = [-8.030976, -2.362995, 0.006829, 1.923532, -172.590000] + inc_poly_cylinder.test_vals = [-8.030822, -2.383534, 0.006612, 1.929173, -171.210000] test_list.append(inc_poly_cylinder) # X-coarse laminar bend as a mixed element CGNS test @@ -635,7 +635,7 @@ def main(): inc_heatTransfer_BC.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_2d" inc_heatTransfer_BC.cfg_file = "BC_HeatTransfer.cfg" inc_heatTransfer_BC.test_iter = 50 - inc_heatTransfer_BC.test_vals = [-8.686723, -7.601245, -8.072766, 1.864213, -1669.800000] + inc_heatTransfer_BC.test_vals = [-8.904266, -7.745636, -8.064003, -1.079197, -1671.000000] test_list.append(inc_heatTransfer_BC) ############################ @@ -1209,7 +1209,7 @@ def main(): slinc_steady.cfg_dir = "sliding_interface/incompressible_steady" slinc_steady.cfg_file = "config.cfg" slinc_steady.test_iter = 19 - slinc_steady.test_vals = [19.000000, -1.131557, -1.370471] + slinc_steady.test_vals = [19.000000, -1.013427, -1.222965] slinc_steady.timeout = 100 slinc_steady.tol = 0.00002 slinc_steady.multizone = True @@ -1319,7 +1319,7 @@ def main(): p1rad.cfg_dir = "radiation/p1model" p1rad.cfg_file = "configp1.cfg" p1rad.test_iter = 50 - p1rad.test_vals = [-7.743666, -7.921411, -2.111848, 0.098302, -47.897000] + p1rad.test_vals = [-7.700974, -7.734765, -2.061661, 0.382811, -57.861000] test_list.append(p1rad) diff --git a/TestCases/parallel_regression_AD.py b/TestCases/parallel_regression_AD.py index f800dbdc7697..9d05feaaf4f5 100644 --- a/TestCases/parallel_regression_AD.py +++ b/TestCases/parallel_regression_AD.py @@ -116,7 +116,7 @@ def main(): discadj_incomp_cylinder.cfg_dir = "disc_adj_incomp_navierstokes/cylinder" discadj_incomp_cylinder.cfg_file = "heated_cylinder.cfg" discadj_incomp_cylinder.test_iter = 20 - discadj_incomp_cylinder.test_vals = [20.000000, -5.181765, -3.840710, 0.000000] + discadj_incomp_cylinder.test_vals = [20.000000, -1.652493, -6.202452, 0.000000] test_list.append(discadj_incomp_cylinder) ###################################### diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 3d7d89691dcd..115a02aef135 100755 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -415,7 +415,7 @@ def main(): inc_poly_cylinder.cfg_dir = "incomp_navierstokes/cylinder" inc_poly_cylinder.cfg_file = "poly_cylinder.cfg" inc_poly_cylinder.test_iter = 20 - inc_poly_cylinder.test_vals = [-8.232551, -2.412865, 0.010163, 1.895333, -172.760000] + inc_poly_cylinder.test_vals = [-8.241365, -2.434357, 0.010085, 1.901399, -171.350000] test_list.append(inc_poly_cylinder) # X-coarse laminar bend as a mixed element CGNS test @@ -458,7 +458,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.881887, -5.731983, -6.725181, -2.618754, -7.189701, -2.050891, 10.000000, -2.027265, 0.001155, 0.003172, 0.000000] + inc_turb_wallfunction_flatplate_sst.test_vals = [-6.879863, -5.731934, -6.732450, -4.240641, -7.189679, -2.050873, 10.000000, -4.007590, 0.001161, 0.003172, 0.000000] test_list.append(inc_turb_wallfunction_flatplate_sst) # FLAT PLATE, WALL FUNCTIONS, INCOMPRESSIBLE SA @@ -466,7 +466,7 @@ def main(): inc_turb_wallfunction_flatplate_sa.cfg_dir = "wallfunctions/flatplate/incompressible_SA" inc_turb_wallfunction_flatplate_sa.cfg_file = "turb_SA_flatplate.cfg" inc_turb_wallfunction_flatplate_sa.test_iter = 10 - inc_turb_wallfunction_flatplate_sa.test_vals = [-6.894473, -5.715971, -6.744286, -2.631311, -9.550134, 10.000000, -2.017104, 0.001027, 0.003759] + inc_turb_wallfunction_flatplate_sa.test_vals = [-6.892397, -5.715934, -6.750379, -4.240551, -9.550026, 10.000000, -4.008745, 0.001030, 0.003759] test_list.append(inc_turb_wallfunction_flatplate_sa) #################### @@ -986,7 +986,7 @@ def main(): slinc_steady.cfg_dir = "sliding_interface/incompressible_steady" slinc_steady.cfg_file = "config.cfg" slinc_steady.test_iter = 19 - slinc_steady.test_vals = [19.000000, -1.148249, -1.398402] + slinc_steady.test_vals = [19.000000, -1.050011, -1.303591] slinc_steady.timeout = 100 slinc_steady.multizone = True test_list.append(slinc_steady) @@ -1098,7 +1098,7 @@ def main(): p1rad.cfg_dir = "radiation/p1model" p1rad.cfg_file = "configp1.cfg" p1rad.test_iter = 50 - p1rad.test_vals = [-8.284673, -8.008659, -2.424204, 0.389030, -56.560000] + p1rad.test_vals = [-7.939639, -7.898740, -2.238329, 0.388591, -56.886000] test_list.append(p1rad) # ############################### From b52a9ab2ec901dc39437ec29d7911bdb241aa8be Mon Sep 17 00:00:00 2001 From: bigfooted Date: Thu, 1 Jan 2026 13:11:43 +0100 Subject: [PATCH 21/37] update parallel regressions --- .../lam_prem_ch4_cfd.cfg | 2 +- .../lam_partial_prem_ch4_cfd.cfg | 15 +++++++++------ TestCases/parallel_regression.py | 12 ++++++------ 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/TestCases/flamelet/01_laminar_premixed_ch4_flame_cfd/lam_prem_ch4_cfd.cfg b/TestCases/flamelet/01_laminar_premixed_ch4_flame_cfd/lam_prem_ch4_cfd.cfg index af94d2606353..ab1ce53175a2 100644 --- a/TestCases/flamelet/01_laminar_premixed_ch4_flame_cfd/lam_prem_ch4_cfd.cfg +++ b/TestCases/flamelet/01_laminar_premixed_ch4_flame_cfd/lam_prem_ch4_cfd.cfg @@ -13,7 +13,7 @@ SOLVER = INC_NAVIER_STOKES KIND_TURB_MODEL= NONE MATH_PROBLEM= DIRECT -RESTART_SOL = NO +RESTART_SOL = YES % % ---------------- INCOMPRESSIBLE FLOW CONDITION DEFINITION -------------------% % diff --git a/TestCases/flamelet/06_laminar_partial_premixed_ch4_flame_cfd/lam_partial_prem_ch4_cfd.cfg b/TestCases/flamelet/06_laminar_partial_premixed_ch4_flame_cfd/lam_partial_prem_ch4_cfd.cfg index 810747ca0a50..06194170d4ff 100644 --- a/TestCases/flamelet/06_laminar_partial_premixed_ch4_flame_cfd/lam_partial_prem_ch4_cfd.cfg +++ b/TestCases/flamelet/06_laminar_partial_premixed_ch4_flame_cfd/lam_partial_prem_ch4_cfd.cfg @@ -18,7 +18,7 @@ RESTART_SOL= YES % ---------------- INCOMPRESSIBLE FLOW CONDITION DEFINITION -------------------% % INC_DENSITY_MODEL= VARIABLE -INC_ENERGY_EQUATION = YES +INC_ENERGY_EQUATION = NO INC_DENSITY_INIT= 1.00 INC_VELOCITY_INIT= (0.7, 0.0, 0.0 ) INC_TEMPERATURE_INIT= 300.0 @@ -39,6 +39,8 @@ KIND_SCALAR_MODEL= FLAMELET DIFFUSIVITY_MODEL= FLAMELET VISCOSITY_MODEL= FLAMELET CONDUCTIVITY_MODEL= FLAMELET +FLAME_INIT_METHOD= NONE +%FLAME_INIT_METHOD= FLAME_FRONT FLAME_INIT= (0.003, 0.00, 0.00, 1.0, 0.0, 0.0, 1e-4, 1.0) % # progvar, enthalpy, mixture fraction, Y-CO, Y-CO2 SPECIES_INIT = (0.0, -253498.718914723, 0.05, 0.0, 0.0) @@ -86,17 +88,18 @@ MARKER_OUTLET= (outlet, 0.0) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 20 +CFL_NUMBER= 10 CFL_ADAPT= NO -ITER= 10 +CFL_ADAPT_PARAM= ( 0.9, 1.01, 1.0, 1000, 0.001) +ITER= 10000 OUTPUT_WRT_FREQ= 20 % % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% % LINEAR_SOLVER= FGMRES LINEAR_SOLVER_PREC= ILU -LINEAR_SOLVER_ERROR= 1E-03 -LINEAR_SOLVER_ITER= 10 +LINEAR_SOLVER_ERROR= 1E-10 +LINEAR_SOLVER_ITER= 25 % % -------------------------- MULTIGRID PARAMETERS -----------------------------% % @@ -115,7 +118,7 @@ CONV_RESIDUAL_MINVAL= -15 CONV_STARTITER= 10 CONV_CAUCHY_ELEMS= 100 CONV_CAUCHY_EPS= 1E-6 -SCREEN_OUTPUT = INNER_ITER RMS_VELOCITY-X RMS_VELOCITY-Y RMS_PRESSURE RMS_ProgressVariable RMS_EnthalpyTot RMS_MixtureFraction RMS_CO2 +SCREEN_OUTPUT = INNER_ITER RMS_VELOCITY-X RMS_VELOCITY-Y RMS_PRESSURE RMS_ProgressVariable RMS_EnthalpyTot RMS_MixtureFraction RMS_CO2, AVG_CFL HISTORY_OUTPUT = RMS_RES AERO_COEFF FLOW_COEFF FLOW_COEFF_SURF VOLUME_OUTPUT = SOLUTION PRIMITIVE SOURCE RESIDUAL SENSITIVITY LOOKUP TIMESTEP CONV_FIELD = RMS_PRESSURE diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 865385c0172b..3c1513d8e14f 100755 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1594,7 +1594,7 @@ def main(): species2_primitiveVenturi_mixingmodel_viscosity.cfg_dir = "species_transport/venturi_primitive_3species" species2_primitiveVenturi_mixingmodel_viscosity.cfg_file = "species2_primitiveVenturi_mixingmodel_viscosity.cfg" species2_primitiveVenturi_mixingmodel_viscosity.test_iter = 50 - species2_primitiveVenturi_mixingmodel_viscosity.test_vals = [-5.239118, -3.624947, -3.874462, -7.535191, -5.130418, 5.000000, -1.677376, 5.000000, -3.493540, 5.000000, -2.085009, 2.495398, 0.985401, 0.600225, 0.909772] + species2_primitiveVenturi_mixingmodel_viscosity.test_vals = [-5.239996, -3.625478, -3.874990, -7.535233, -5.130497, 5.000000, -1.677719, 5.000000, -3.494206, 5.000000, -2.085734, 2.494985, 0.985388, 0.599841, 0.909757] test_list.append(species2_primitiveVenturi_mixingmodel_viscosity) # 2 species (1 eq) primitive venturi mixing using mixing model including heat capacity and mass diffusivity @@ -1634,7 +1634,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.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] + species2_primitiveVenturi.test_vals = [-5.557355, -4.528649, -4.567282, -5.392656, -0.920718, -5.677129, 5.000000, -0.597625, 5.000000, -2.601553, 5.000000, -0.550169, 0.000035, 0.000035, 0.000000, 0.000000] test_list.append(species2_primitiveVenturi) # 2 species (1 eq) primitive venturi mixing with bounded scalar transport @@ -1642,7 +1642,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.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] + species_primitiveVenturi_boundedscalar.test_vals = [-5.539052, -4.376789, -4.477172, -5.579444, -0.871003, -5.633907, 5.000000, -1.460377, 5.000000, -4.141552, 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 @@ -1650,7 +1650,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.767010, -1.818299, -1.842427, -0.615338, 1.366173, -3.921308, 21.000000, -5.213096, 9.000000, -5.422897, 4.000000, -5.919063, 2.000000, 1.000000, 0.000000, 1.000000] + species2_primitiveVenturi_mixingmodel_TURBULENT_MARKERS.test_vals = [-4.782077, -1.837073, -1.862970, -0.641171, 1.349304, -3.929006, 21.000000, -5.212393, 9.000000, -5.455072, 4.000000, -5.915343, 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. @@ -1659,7 +1659,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.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] + species3_primitiveVenturi_inletFile.test_vals = [-5.541163, -4.505905, -4.557116, -5.398846, -0.938219, -5.817818, -5.944195, 5.000000, -0.555895, 5.000000, -2.598254, 5.000000, -0.597122] test_list.append(species3_primitiveVenturi_inletFile) # 3 species (2 eq) primitive venturi mixing with new flux and value boundary conditions @@ -1667,7 +1667,7 @@ def main(): species3_primitiveVenturi_fluxvalue.cfg_dir = "species_transport/venturi_primitive_3species" species3_primitiveVenturi_fluxvalue.cfg_file = "species3_primitiveVenturi_flux_value.cfg" species3_primitiveVenturi_fluxvalue.test_iter = 50 - species3_primitiveVenturi_fluxvalue.test_vals = [-4.563229, -5.504499, -0.861681, -5.822963, -6.458352, 1.257908, 0.122218, 0.317705, 0.817985, 0.241494, 0.102507, 0.004981, 0.134006] + species3_primitiveVenturi_fluxvalue.test_vals = [-4.563242, -5.504658, -0.861266, -5.822957, -6.458367, 1.257912, 0.122219, 0.317705, 0.817988, 0.241494, 0.102507, 0.004981, 0.134006] test_list.append(species3_primitiveVenturi_fluxvalue) # rectangle passive transport validation From f61a783a4bab33512023a9b8d8d08111fb4eaa55 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Thu, 1 Jan 2026 16:29:37 +0100 Subject: [PATCH 22/37] update regressions --- .../cylinder/heated_cylinder.cfg | 5 +++-- TestCases/py_wrapper/turbulent_premixed_psi/psi.cfg | 11 ++++------- TestCases/py_wrapper/turbulent_premixed_psi/run.py | 2 +- TestCases/serial_regression_AD.py | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/TestCases/disc_adj_incomp_navierstokes/cylinder/heated_cylinder.cfg b/TestCases/disc_adj_incomp_navierstokes/cylinder/heated_cylinder.cfg index 7274a4b1fccb..650a9667d7c6 100644 --- a/TestCases/disc_adj_incomp_navierstokes/cylinder/heated_cylinder.cfg +++ b/TestCases/disc_adj_incomp_navierstokes/cylinder/heated_cylinder.cfg @@ -12,7 +12,7 @@ % SOLVER= INC_NAVIER_STOKES KIND_TURB_MODEL= NONE -MATH_PROBLEM= DISCRETE_ADJOINT +%MATH_PROBLEM= DISCRETE_ADJOINT RESTART_SOL= NO % ---------------- INCOMPRESSIBLE FLOW CONDITION DEFINITION -------------------% @@ -62,6 +62,7 @@ MARKER_MONITORING= ( cylinder ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= GREEN_GAUSS +%CFL_NUMBER= 1000.0 CFL_NUMBER= 200.0 CFL_ADAPT= NO CFL_ADAPT_PARAM= ( 1.5, 0.5, 10.0, 10000.0 ) @@ -120,7 +121,7 @@ GRAD_OBJFUNC_FILENAME= of_grad SURFACE_FILENAME= surface_flow SURFACE_ADJ_FILENAME= surface_adjoint OUTPUT_WRT_FREQ= 250 -SCREEN_OUTPUT= (INNER_ITER, RMS_ADJ_PRESSURE, RMS_ADJ_ENTHALPY, SENS_PRESS, SENS_AOA) +SCREEN_OUTPUT= (INNER_ITER, RMS_PRESSURE, RMS_ENTHALPY, RMS_ADJ_PRESSURE, RMS_ADJ_ENTHALPY, SENS_PRESS, SENS_AOA) % ----------------------- DESIGN VARIABLE PARAMETERS --------------------------% % diff --git a/TestCases/py_wrapper/turbulent_premixed_psi/psi.cfg b/TestCases/py_wrapper/turbulent_premixed_psi/psi.cfg index c01c2de84cb1..1efa7ff0c68b 100644 --- a/TestCases/py_wrapper/turbulent_premixed_psi/psi.cfg +++ b/TestCases/py_wrapper/turbulent_premixed_psi/psi.cfg @@ -17,9 +17,6 @@ SST_OPTIONS= V1994m RESTART_SOL= YES -MGLEVEL= 0 -% - % temperature and density FREESTREAM_TEMPERATURE = 673 FREESTREAM_DENSITY = 2.55 @@ -86,11 +83,11 @@ MARKER_OUTLET= ( outlet, 0.0 ) % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES % -CFL_NUMBER= 2.00 +CFL_NUMBER= 50.0 CFL_REDUCTION_SPECIES= 1.0 CFL_REDUCTION_TURB= 1.0 %CFL_ADAPT= YES -CFL_ADAPT= YES +CFL_ADAPT= NO CFL_ADAPT_PARAM= ( 0.95, 1.01, 1.0, 250, 1.0e-4, 0) % @@ -143,7 +140,7 @@ MUSCL_TURB= NO % --------------------------- CONVERGENCE PARAMETERS --------------------------% % CONV_FIELD= RMS_PRESSURE, RMS_VELOCITY-X, RMS_VELOCITY-Y, RMS_TKE, RMS_SPECIES -CONV_RESIDUAL_MINVAL= -18 +CONV_RESIDUAL_MINVAL= -12 CONV_STARTITER= 10 % % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% @@ -160,7 +157,7 @@ CONV_FILENAME= history MARKER_ANALYZE= gas_inlet, air_axial_inlet, outlet MARKER_ANALYZE_AVERAGE= AREA % -OUTPUT_FILES= RESTART, RESTART_ASCII, PARAVIEW_MULTIBLOCK +OUTPUT_FILES= RESTART, PARAVIEW_MULTIBLOCK VOLUME_OUTPUT= RESIDUAL, PRIMITIVE, SPECIES_UDS_0 OUTPUT_WRT_FREQ= 100 % diff --git a/TestCases/py_wrapper/turbulent_premixed_psi/run.py b/TestCases/py_wrapper/turbulent_premixed_psi/run.py index 1f355f135e6f..f54017b9ce65 100644 --- a/TestCases/py_wrapper/turbulent_premixed_psi/run.py +++ b/TestCases/py_wrapper/turbulent_premixed_psi/run.py @@ -223,7 +223,7 @@ def main(): sys.stdout.flush() # run N iterations - for inner_iter in range(10): + for inner_iter in range(1000): if (rank==0): print("python iteration ", inner_iter) diff --git a/TestCases/serial_regression_AD.py b/TestCases/serial_regression_AD.py index 35e3131e5c58..ed0b21faf850 100644 --- a/TestCases/serial_regression_AD.py +++ b/TestCases/serial_regression_AD.py @@ -219,7 +219,7 @@ def main(): discadj_cht.cfg_dir = "coupled_cht/disc_adj_incomp_2d" discadj_cht.cfg_file = "cht_2d_3cylinders.cfg" discadj_cht.test_iter = 10 - discadj_cht.test_vals = [-6.308199, -3.086023, -3.086024, -3.086024] + discadj_cht.test_vals = [-6.111521, -2.668836, -2.669558, -2.669595] test_list.append(discadj_cht) ###################################### From f1c071e2a56b118dc10db99fac67500405f29f4f Mon Sep 17 00:00:00 2001 From: bigfooted Date: Thu, 1 Jan 2026 19:55:31 +0100 Subject: [PATCH 23/37] fix bug in nondimensionalization --- SU2_CFD/include/fluid/CFluidScalar.hpp | 1 + SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp | 16 ++++++++-------- SU2_CFD/src/fluid/CFluidScalar.cpp | 9 +++++---- SU2_CFD/src/solvers/CIncEulerSolver.cpp | 4 ++++ TestCases/parallel_regression.py | 8 ++++---- .../py_wrapper/turbulent_premixed_psi/run.py | 2 +- 6 files changed, 23 insertions(+), 17 deletions(-) diff --git a/SU2_CFD/include/fluid/CFluidScalar.hpp b/SU2_CFD/include/fluid/CFluidScalar.hpp index ba97fa5451e4..1e6d8e9c2ad1 100644 --- a/SU2_CFD/include/fluid/CFluidScalar.hpp +++ b/SU2_CFD/include/fluid/CFluidScalar.hpp @@ -43,6 +43,7 @@ class CFluidScalar final : public CFluidModel { su2double Gas_Constant; /*!< \brief Specific gas constant. */ const su2double Pressure_Thermodynamic; /*!< \brief Constant pressure thermodynamic. */ const su2double GasConstant_Ref; /*!< \brief Gas constant reference needed for Nondimensional problems. */ + const su2double Std_Ref_Temp_ND; /*!< \brief Nondimensional standard reference temperature for enthalpy. */ const su2double Prandtl_Turb_Number; /*!< \brief Prandlt turbulent number.*/ const su2double Schmidt_Turb_Number; /*!< \brief Schmidt turbulent number.*/ diff --git a/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp b/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp index 0f584ec4f404..01b141752193 100644 --- a/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp +++ b/SU2_CFD/include/fluid/CIncIdealGasPolynomial.hpp @@ -77,14 +77,14 @@ class CIncIdealGasPolynomial final : public CFluidModel { /* Evaluate the new Cp and enthalpy from the coefficients and temperature. */ Cp = coeffs_[0]; - su2double tref_i = t - Std_Ref_Temp_ND; - Enthalpy = coeffs_[0] * tref_i; + Enthalpy = coeffs_[0] * (t - Std_Ref_Temp_ND); su2double t_i = 1.0; + su2double tref_i = 1.0; for (int i = 1; i < N; ++i) { t_i *= t; - tref_i *= (t - Std_Ref_Temp_ND); + tref_i *= Std_Ref_Temp_ND; Cp += coeffs_[i] * t_i; - Enthalpy += coeffs_[i] * tref_i / (i + 1); + Enthalpy += coeffs_[i] * (t_i * t - tref_i * Std_Ref_Temp_ND) / (i + 1); } Cv = Cp / Gamma; } @@ -109,14 +109,14 @@ class CIncIdealGasPolynomial final : public CFluidModel { while ((abs(delta_temp_iter) > toll) && (counter++ < counter_limit)) { /* Evaluate the new Cp and enthalpy from the coefficients and temperature. */ Cp_iter = coeffs_[0]; - su2double tref_i = temp_iter - Std_Ref_Temp_ND; - su2double Enthalpy_iter = coeffs_[0] * tref_i; + su2double Enthalpy_iter = coeffs_[0] * (temp_iter - Std_Ref_Temp_ND); su2double t_i = 1.0; + su2double tref_i = 1.0; for (int i = 1; i < N; ++i) { t_i *= temp_iter; - tref_i *= (temp_iter - Std_Ref_Temp_ND); + tref_i *= Std_Ref_Temp_ND; Cp_iter += coeffs_[i] * t_i; - Enthalpy_iter += coeffs_[i] * tref_i / (i + 1); + Enthalpy_iter += coeffs_[i] * (t_i * temp_iter - tref_i * Std_Ref_Temp_ND) / (i + 1); } delta_enthalpy_iter = Enthalpy - Enthalpy_iter; diff --git a/SU2_CFD/src/fluid/CFluidScalar.cpp b/SU2_CFD/src/fluid/CFluidScalar.cpp index 4b384c521f9c..f71f221fa07c 100644 --- a/SU2_CFD/src/fluid/CFluidScalar.cpp +++ b/SU2_CFD/src/fluid/CFluidScalar.cpp @@ -46,6 +46,7 @@ CFluidScalar::CFluidScalar(su2double value_pressure_operating, const CConfig* co n_species_mixture(config->GetnSpecies() + 1), Pressure_Thermodynamic(value_pressure_operating), GasConstant_Ref(config->GetGas_Constant_Ref()), + Std_Ref_Temp_ND(STD_REF_TEMP / config->GetTemperature_Ref()), Prandtl_Turb_Number(config->GetPrandtl_Turb()), Schmidt_Turb_Number(config->GetSchmidt_Number_Turbulent()), wilke(config->GetKind_MixingViscosityModel() == MIXINGVISCOSITYMODEL::WILKE), @@ -218,14 +219,14 @@ su2double CFluidScalar::ComputeEnthalpyFromT(const su2double val_temperature, co * depend on temperature, but it does depend on mixture composition, enthalpy is directly computed from * the expression h_s = Cp(T - T_ref). */ - su2double val_Enthalpy = Cp * (val_temperature - STD_REF_TEMP); + su2double val_Enthalpy = Cp * (val_temperature - Std_Ref_Temp_ND); return val_Enthalpy; } void CFluidScalar::GetEnthalpyDiffusivity(su2double* enthalpy_diffusions) const { - const su2double enthalpy_species_N = specificHeat[n_species_mixture - 1] * (Temperature - STD_REF_TEMP); + const su2double enthalpy_species_N = specificHeat[n_species_mixture - 1] * (Temperature - Std_Ref_Temp_ND); for (int iVar = 0; iVar < n_species_mixture - 1; iVar++) { - const su2double enthalpy_species_i = specificHeat[iVar] * (Temperature - STD_REF_TEMP); + const su2double enthalpy_species_i = specificHeat[iVar] * (Temperature - Std_Ref_Temp_ND); enthalpy_diffusions[iVar] = Density * (enthalpy_species_i * massDiffusivity[iVar] - enthalpy_species_N * massDiffusivity[n_species_mixture - 1]); enthalpy_diffusions[iVar] += Mu_Turb * (enthalpy_species_i - enthalpy_species_N) / Schmidt_Turb_Number; @@ -270,7 +271,7 @@ void CFluidScalar::SetTDState_h(const su2double val_enthalpy, const su2double* v * depend on temperature, but it does depend on mixture composition, temperature is directly solved from the * expression h_s = Cp(T - T_ref). */ - Temperature = val_enthalpy / Cp + STD_REF_TEMP; + Temperature = val_enthalpy / Cp + Std_Ref_Temp_ND; Density = Pressure_Thermodynamic / (Temperature * Gas_Constant); Cv = Cp - Gas_Constant; diff --git a/SU2_CFD/src/solvers/CIncEulerSolver.cpp b/SU2_CFD/src/solvers/CIncEulerSolver.cpp index e11c2d012fc6..a3e3cfefad1f 100644 --- a/SU2_CFD/src/solvers/CIncEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CIncEulerSolver.cpp @@ -384,9 +384,13 @@ void CIncEulerSolver::SetNondimensionalization(CConfig *config, unsigned short i } else if (config->GetRef_Inc_NonDim() == INITIAL_VALUES) { Density_Ref = Density_FreeStream; + cout << "Density_Ref: " << Density_Ref << endl; Velocity_Ref = ModVel_FreeStream; + cout << "Velocity_Ref: " << Velocity_Ref << endl; Temperature_Ref = Temperature_FreeStream; + cout << "Temperature_Ref: " << Temperature_Ref << endl; Pressure_Ref = Density_Ref*Velocity_Ref*Velocity_Ref; + cout << "Pressure_Ref: " << Pressure_Ref << endl; } else if (config->GetRef_Inc_NonDim() == REFERENCE_VALUES) { Density_Ref = config->GetInc_Density_Ref(); diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 02f5791dd8d7..18e1b6e35fc4 100755 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -47,7 +47,7 @@ def main(): cfd_flamelet_ch4.cfg_dir = "flamelet/01_laminar_premixed_ch4_flame_cfd" cfd_flamelet_ch4.cfg_file = "lam_prem_ch4_cfd.cfg" cfd_flamelet_ch4.test_iter = 10 - cfd_flamelet_ch4.test_vals = [-11.167959, -10.484323, -12.764338, -5.876637, -13.407242, -17.032153] + cfd_flamelet_ch4.test_vals = [-14.971554, -15.910509, -9.042920, -16.513197, -19.488582, 104.940000] cfd_flamelet_ch4.new_output = True test_list.append(cfd_flamelet_ch4) @@ -56,7 +56,7 @@ def main(): cfd_flamelet_ch4_axi.cfg_dir = "flamelet/05_laminar_premixed_ch4_flame_cfd_axi" cfd_flamelet_ch4_axi.cfg_file = "lam_prem_ch4_cfd_axi.cfg" cfd_flamelet_ch4_axi.test_iter = 10 - cfd_flamelet_ch4_axi.test_vals = [-10.083640, -11.327840, -10.714798, -12.750041, -6.112100] + cfd_flamelet_ch4_axi.test_vals = [-11.259602, -10.020810, -11.852797, -4.909130, 95.000000] cfd_flamelet_ch4_axi.new_output = True test_list.append(cfd_flamelet_ch4_axi) @@ -65,7 +65,7 @@ def main(): cfd_flamelet_ch4_partial_premix.cfg_dir = "flamelet/06_laminar_partial_premixed_ch4_flame_cfd" cfd_flamelet_ch4_partial_premix.cfg_file = "lam_partial_prem_ch4_cfd.cfg" cfd_flamelet_ch4_partial_premix.test_iter = 10 - cfd_flamelet_ch4_partial_premix.test_vals = [-8.734770, -11.306471, -3.675618, -12.808760, -11.088026] + cfd_flamelet_ch4_partial_premix.test_vals = [-10.482722, -3.621023, -12.938151, -10.154391, 10.000000] cfd_flamelet_ch4_partial_premix.new_output = True test_list.append(cfd_flamelet_ch4_partial_premix) @@ -1504,7 +1504,7 @@ def main(): pywrapper_buoyancy.cfg_dir = "py_wrapper/custom_source_buoyancy" pywrapper_buoyancy.cfg_file = "lam_buoyancy_cavity.cfg" pywrapper_buoyancy.test_iter = 0 - pywrapper_buoyancy.test_vals = [-11.864224, -12.149668, -3.539309, -6.119375] + pywrapper_buoyancy.test_vals = [-13.314107, -13.764877, -13.136439, -5.379183] pywrapper_buoyancy.test_vals_aarch64 = [-17.746018, -17.460693, -17.430708, -12.260624] pywrapper_buoyancy.command = TestCase.Command("mpirun -np 2", "python", "run.py") test_list.append(pywrapper_buoyancy) diff --git a/TestCases/py_wrapper/turbulent_premixed_psi/run.py b/TestCases/py_wrapper/turbulent_premixed_psi/run.py index f54017b9ce65..1f355f135e6f 100644 --- a/TestCases/py_wrapper/turbulent_premixed_psi/run.py +++ b/TestCases/py_wrapper/turbulent_premixed_psi/run.py @@ -223,7 +223,7 @@ def main(): sys.stdout.flush() # run N iterations - for inner_iter in range(1000): + for inner_iter in range(10): if (rank==0): print("python iteration ", inner_iter) From 4bc2f5806ee092037dc68439e4906c90c6992652 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 2 Jan 2026 00:11:30 +0100 Subject: [PATCH 24/37] update regressions --- TestCases/hybrid_regression.py | 2 +- TestCases/parallel_regression.py | 4 ++-- TestCases/serial_regression.py | 2 +- TestCases/serial_regression_AD.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index 0c5816d9d599..633c802b93be 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -383,7 +383,7 @@ def main(): inc_poly_cylinder.cfg_dir = "incomp_navierstokes/cylinder" inc_poly_cylinder.cfg_file = "poly_cylinder.cfg" inc_poly_cylinder.test_iter = 20 - inc_poly_cylinder.test_vals = [-8.260165, -2.445453, 0.027209, 1.915447, -171.620000] + inc_poly_cylinder.test_vals = [-8.241953, -2.424330, 0.027284, 1.909617, -173.010000] inc_poly_cylinder.test_vals_aarch64 = [-8.260165, -2.445453, 0.027209, 1.915447, -171.620000] test_list.append(inc_poly_cylinder) diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 18e1b6e35fc4..686dbae3a90e 100755 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -611,7 +611,7 @@ def main(): inc_poly_cylinder.cfg_dir = "incomp_navierstokes/cylinder" inc_poly_cylinder.cfg_file = "poly_cylinder.cfg" inc_poly_cylinder.test_iter = 20 - inc_poly_cylinder.test_vals = [-8.030822, -2.383534, 0.006612, 1.929173, -171.210000] + inc_poly_cylinder.test_vals = [-8.030976, -2.362995, 0.006829, 1.923532, -172.590000] test_list.append(inc_poly_cylinder) # X-coarse laminar bend as a mixed element CGNS test @@ -1514,7 +1514,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 = [-5.532006, -4.663972, -5.838306, -4.316956, -2.073665, -4.453762] + pywrapper_zimont.test_vals = [-9.317943, -0.377235, -1.091632, -0.502950, 2.968250, -1.242417] pywrapper_zimont.command = TestCase.Command("mpirun -np 2", "python", "run.py") test_list.append(pywrapper_zimont) diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 13abe8dbbce1..ac56cc6ae05d 100755 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -415,7 +415,7 @@ def main(): inc_poly_cylinder.cfg_dir = "incomp_navierstokes/cylinder" inc_poly_cylinder.cfg_file = "poly_cylinder.cfg" inc_poly_cylinder.test_iter = 20 - inc_poly_cylinder.test_vals = [-8.241365, -2.434357, 0.010085, 1.901399, -171.350000] + inc_poly_cylinder.test_vals = [-8.232551, -2.412865, 0.010163, 1.895333, -172.760000] test_list.append(inc_poly_cylinder) # X-coarse laminar bend as a mixed element CGNS test diff --git a/TestCases/serial_regression_AD.py b/TestCases/serial_regression_AD.py index ed0b21faf850..613125c69d7b 100644 --- a/TestCases/serial_regression_AD.py +++ b/TestCases/serial_regression_AD.py @@ -120,7 +120,7 @@ def main(): discadj_incomp_cylinder.cfg_dir = "disc_adj_incomp_navierstokes/cylinder" discadj_incomp_cylinder.cfg_file = "heated_cylinder.cfg" discadj_incomp_cylinder.test_iter = 20 - discadj_incomp_cylinder.test_vals = [20.000000, -5.097821, -3.842739, 0.000000] + discadj_incomp_cylinder.test_vals = [20.000000, -1.672307, -6.247612, 0.000000] test_list.append(discadj_incomp_cylinder) ####################################################### From b7e413c4edbedd8b74a79d9dd6cb8e807fb4773e Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 2 Jan 2026 22:59:24 +0100 Subject: [PATCH 25/37] update regressions --- .../lam_prem_ch4_cht_cfd_fluid.cfg | 3 ++- .../lam_prem_ch4_cht_cfd_master.cfg | 2 +- .../laminar_premixed_h2_flame_cfd.cfg | 11 ++++++----- .../chtPinArray_2d/of_grad_findiff.csv.ref | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/TestCases/flamelet/03_laminar_premixed_ch4_flame_cht_cfd/lam_prem_ch4_cht_cfd_fluid.cfg b/TestCases/flamelet/03_laminar_premixed_ch4_flame_cht_cfd/lam_prem_ch4_cht_cfd_fluid.cfg index af8e562b0cdb..005bea4123af 100644 --- a/TestCases/flamelet/03_laminar_premixed_ch4_flame_cht_cfd/lam_prem_ch4_cht_cfd_fluid.cfg +++ b/TestCases/flamelet/03_laminar_premixed_ch4_flame_cht_cfd/lam_prem_ch4_cht_cfd_fluid.cfg @@ -57,7 +57,8 @@ FLUID_MODEL= FLUID_FLAMELET FILENAMES_INTERPOLATOR= (fgm_ch4.drg) CONTROLLING_VARIABLE_NAMES= (ProgressVariable, EnthalpyTot) CONTROLLING_VARIABLE_SOURCE_NAMES= (ProdRateTot_PV, NULL) -FLAME_INIT_METHOD= NONE +FLAME_INIT_METHOD= NONE +%FLAME_INIT_METHOD= FLAME_FRONT FLAME_INIT= (0.004, 0.0, 0.0, 1.0, 0.0, 0.0, 0.2e-3, 1.0) % -------------------- SPECIES TRANSPORT ---------------------------------------% diff --git a/TestCases/flamelet/03_laminar_premixed_ch4_flame_cht_cfd/lam_prem_ch4_cht_cfd_master.cfg b/TestCases/flamelet/03_laminar_premixed_ch4_flame_cht_cfd/lam_prem_ch4_cht_cfd_master.cfg index cb9dafa62bae..4704aedef68b 100644 --- a/TestCases/flamelet/03_laminar_premixed_ch4_flame_cht_cfd/lam_prem_ch4_cht_cfd_master.cfg +++ b/TestCases/flamelet/03_laminar_premixed_ch4_flame_cht_cfd/lam_prem_ch4_cht_cfd_master.cfg @@ -35,7 +35,7 @@ RESTART_FILENAME= restart RESTART_ADJ_FILENAME= restart_adj TIME_DOMAIN= NO -OUTER_ITER= 10 +OUTER_ITER= 100 OUTPUT_WRT_FREQ= 100 SCREEN_WRT_FREQ_INNER= 1 diff --git a/TestCases/flamelet/07_laminar_premixed_h2_flame_cfd/laminar_premixed_h2_flame_cfd.cfg b/TestCases/flamelet/07_laminar_premixed_h2_flame_cfd/laminar_premixed_h2_flame_cfd.cfg index 3f294865a179..93328224dc0b 100644 --- a/TestCases/flamelet/07_laminar_premixed_h2_flame_cfd/laminar_premixed_h2_flame_cfd.cfg +++ b/TestCases/flamelet/07_laminar_premixed_h2_flame_cfd/laminar_premixed_h2_flame_cfd.cfg @@ -12,8 +12,8 @@ % SOLVER = INC_NAVIER_STOKES KIND_TURB_MODEL= NONE -MATH_PROBLEM= DIRECT -RESTART_SOL =YES +%MATH_PROBLEM= DIRECT +RESTART_SOL= YES % ---------------- INCOMPRESSIBLE FLOW CONDITION DEFINITION -------------------% % INC_DENSITY_MODEL= VARIABLE @@ -37,7 +37,8 @@ PREFERENTIAL_DIFFUSION= YES % -------------------- SCALAR TRANSPORT ---------------------------------------% % % Using an artificial spark to ignite the solution at some location and iteration -FLAME_INIT_METHOD= SPARK +FLAME_INIT_METHOD= NONE +%FLAME_INIT_METHOD= SPARK % Spark parameters in order: % x-location of spark center (m) % y-location of spark center (m) @@ -77,9 +78,9 @@ MARKER_ANALYZE_AVERAGE = AREA % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= GREEN_GAUSS -CFL_NUMBER =50 +CFL_NUMBER= 50 CFL_ADAPT= NO -ITER=5 +ITER=500 OUTPUT_WRT_FREQ= 20 % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% % 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 2d925e77a8cd..af480e5fa85c 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 , 0.0 , 3.3307000000906214e-08, 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , -9.999996564147295 , -10.000007932831068 , 0.0 , -80.0000009348878 , -360.00000136482413, 1e-08 +"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 , -409999.99619089067, -4.4410000000756306e-08, 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.12000000160217184, 3.3300000005652e-08, -0.2800000009628434 , 0.0 , 1.1799999977135656 , 1.5699999966756195 , 2599.999999119973 , -119.99999287581886 , 3870.0000004610047 , -109.99999631167157 , 0.7999999995789153 , -210.00000174353772, 14480.000004368776, 1e-08 From 9331f6535dbbb963c930d58abc8e27fffef58e4e Mon Sep 17 00:00:00 2001 From: bigfooted Date: Fri, 2 Jan 2026 23:28:38 +0100 Subject: [PATCH 26/37] fixing tutorials --- .github/workflows/regression.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 6bddf426aab7..c3d21e54c897 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 develop -c fix_enthalpy -s ${{matrix.testscript}} + args: -b ${{github.ref}} -t fix_enthalpy -c fix_enthalpy -s ${{matrix.testscript}} - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2:250717-1402 with: From c6e8e770ad564010ae6154b98bc5a6d141930b2a Mon Sep 17 00:00:00 2001 From: bigfooted Date: Sun, 4 Jan 2026 22:31:41 +0100 Subject: [PATCH 27/37] fixing tutorials and add relaxation factor --- SU2_CFD/src/solvers/CSpeciesFlameletSolver.cpp | 11 ++++++----- .../lam_prem_ch4_cfd.cfg | 8 ++++---- .../lam_prem_ch4_cht_ad_fluid.cfg | 16 +++++++++------- .../lam_prem_ch4_cht_ad_master.cfg | 4 ++-- .../lam_prem_ch4_cht_ad_solid.cfg | 7 ++++--- TestCases/parallel_regression.py | 2 +- TestCases/parallel_regression_AD.py | 8 ++++---- TestCases/tutorials.py | 16 ++++++++-------- 8 files changed, 38 insertions(+), 34 deletions(-) diff --git a/SU2_CFD/src/solvers/CSpeciesFlameletSolver.cpp b/SU2_CFD/src/solvers/CSpeciesFlameletSolver.cpp index a1163faa7513..efe1b4a4c7d6 100644 --- a/SU2_CFD/src/solvers/CSpeciesFlameletSolver.cpp +++ b/SU2_CFD/src/solvers/CSpeciesFlameletSolver.cpp @@ -211,6 +211,7 @@ void CSpeciesFlameletSolver::SetInitialCondition(CGeometry** geometry, CSolver** for (unsigned long i_mesh = 0; i_mesh <= config->GetnMGLevels(); i_mesh++) { fluid_model_local = solver_container[i_mesh][FLOW_SOL]->GetFluidModel(); + prog_burnt = GetBurntProgressVariable(fluid_model_local, scalar_init); for (auto iVar = 0u; iVar < nVar; iVar++) scalar_init[iVar] = config->GetSpecies_Init()[iVar]; @@ -225,8 +226,6 @@ void CSpeciesFlameletSolver::SetInitialCondition(CGeometry** geometry, CSolver** if (flame_front_ignition) { - prog_burnt = GetBurntProgressVariable(fluid_model_local, scalar_init); - /*--- Determine if point is above or below the plane, assuming the normal is pointing towards the burned region. ---*/ point_loc = 0.0; @@ -301,6 +300,7 @@ void CSpeciesFlameletSolver::SetInitialCondition(CGeometry** geometry, CSolver** cout << " Number of points in unburnt region: " << n_points_unburnt_global << "." << endl; cout << " Number of points in burnt region : " << n_points_burnt_global << "." << endl; cout << " Number of points in flame zone : " << n_points_flame_global << "." << endl; + cout << " Burnt progress Variable : " << prog_burnt << "." << endl; } if (n_not_in_domain_global > 0) @@ -406,7 +406,6 @@ void CSpeciesFlameletSolver::BC_Inlet(CGeometry* geometry, CSolver** solver_cont su2double enth_inlet; GetEnthFromTemp(solver_container[FLOW_SOL]->GetFluidModel(), temp_inlet, config->GetInlet_SpeciesVal(Marker_Tag), &enth_inlet); - SU2_OMP_FOR_STAT(OMP_MIN_SIZE) for (auto iVertex = 0u; iVertex < geometry->nVertex[val_marker]; iVertex++) { Inlet_SpeciesVars[val_marker][iVertex][I_ENTH] = enth_inlet; @@ -758,6 +757,8 @@ unsigned long CSpeciesFlameletSolver::GetEnthFromTemp(CFluidModel* fluid_model, su2double delta_temp_iter = 1e10; unsigned long exit_code = 0; const int counter_limit = 1000; + /*--- Relaxation factor for Newton iterations. ---*/ + const su2double RelaxAlpha = 0.75; int counter = 0; @@ -774,9 +775,10 @@ unsigned long CSpeciesFlameletSolver::GetEnthFromTemp(CFluidModel* fluid_model, delta_temp_iter = val_temp - Temperature; - delta_enth = Cp * delta_temp_iter; + delta_enth = RelaxAlpha * Cp * delta_temp_iter; enth_iter += delta_enth; + } *val_enth = enth_iter; @@ -791,7 +793,6 @@ unsigned long CSpeciesFlameletSolver::GetEnthFromTemp(CFluidModel* fluid_model, su2double CSpeciesFlameletSolver::GetBurntProgressVariable(CFluidModel* fluid_model, const su2double* scalar_solution) { su2double scalars[MAXNVAR], delta = 1e-3; for (auto iVar = 0u; iVar < nVar; iVar++) scalars[iVar] = scalar_solution[iVar]; - bool outside = false; while (!outside) { fluid_model->SetTDState_T(300, scalars); diff --git a/TestCases/flamelet/01_laminar_premixed_ch4_flame_cfd/lam_prem_ch4_cfd.cfg b/TestCases/flamelet/01_laminar_premixed_ch4_flame_cfd/lam_prem_ch4_cfd.cfg index ab1ce53175a2..c22ac2efcd3c 100644 --- a/TestCases/flamelet/01_laminar_premixed_ch4_flame_cfd/lam_prem_ch4_cfd.cfg +++ b/TestCases/flamelet/01_laminar_premixed_ch4_flame_cfd/lam_prem_ch4_cfd.cfg @@ -33,7 +33,7 @@ CONTROLLING_VARIABLE_SOURCE_NAMES = (ProdRateTot_PV, NULL) % % -------------------- SCALAR TRANSPORT ---------------------------------------% % -KIND_SCALAR_MODEL= FLAMELET +KIND_SCALAR_MODEL= FLAMELET DIFFUSIVITY_MODEL= FLAMELET VISCOSITY_MODEL= FLAMELET CONDUCTIVITY_MODEL= FLAMELET @@ -130,12 +130,12 @@ MESH_FILENAME = mesh_structured.cgns MESH_OUT_FILENAME= mesh_out SOLUTION_FILENAME= solution RESTART_FILENAME= restart -%OUTPUT_FILES = (RESTART,PARAVIEW,PARAVIEW_MULTIBLOCK) -OUTPUT_FILES = (RESTART) +%OUTPUT_FILES = (RESTART,PARAVIEW,PARAVIEW_MULTIBLOCK) +OUTPUT_FILES = (RESTART) TABULAR_FORMAT = CSV CONV_FILENAME= history VOLUME_FILENAME= ch4_flame_cfd SURFACE_FILENAME= surface_flow -WRT_PERFORMANCE = NO +WRT_PERFORMANCE = NO SCREEN_WRT_FREQ_INNER = 1 SCREEN_WRT_FREQ_OUTER = 1 diff --git a/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_fluid.cfg b/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_fluid.cfg index b251e54182a8..c7eada303242 100644 --- a/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_fluid.cfg +++ b/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_fluid.cfg @@ -15,13 +15,13 @@ WRT_ZONE_HIST= YES %SCREEN_OUTPUT= INNER_ITER WALL_TIME RMS_PRESSURE RMS_VELOCITY-X RMS_VELOCITY-Y RMS_TKE RMS_DISSIPATION LINSOL_ITER LINSOL_RESIDUAL RMS_ADJ_PRESSURE RMS_ADJ_VELOCITY-X RMS_ADJ_VELOCITY-Y -SCREEN_OUTPUT= INNER_ITER WALL_TIME RMS_ADJ_PRESSURE RMS_ADJ_VELOCITY-X RMS_ADJ_VELOCITY-Y RMS_ADJ_ProgressVariable RMS_ADJ_EnthalpyTot RMS_ADJ_Y-CO RMS_ADJ_Y-NOx_tot +SCREEN_OUTPUT= INNER_ITER WALL_TIME RMS_ADJ_PRESSURE RMS_ADJ_VELOCITY-X RMS_ADJ_VELOCITY-Y RMS_ADJ_ProgressVariable RMS_ADJ_EnthalpyTot RMS_ADJ_Y-CO RMS_ADJ_Y-NOx_tot LINSOL_RESIDUAL LINSOL_ITER HISTORY_OUTPUT= RMS_RES AERO_COEFF FLOW_COEFF FLOW_COEFF_SURF VOLUME_OUTPUT= SOLUTION PRIMITIVE SOURCE RESIDUAL LOOKUP -OUTPUT_FILES= ( RESTART_ASCII) +OUTPUT_FILES= ( RESTART_ASCII, PARAVIEW) WRT_RESTART_COMPACT= NO @@ -38,7 +38,7 @@ INLET_MATCHING_TOLERANCE= 1e-5 INC_INLET_TYPE= VELOCITY_INLET MARKER_INLET= (inlet, 300.0, 0.4, 1.0, 0.0, 0.0) -MARKER_INLET_SPECIES= (inlet, 0.0, 0.0, 0.0, 0.0) +MARKER_INLET_SPECIES= (inlet, 0.0, -100000.0, 0.0, 0.0) INC_OUTLET_TYPE= PRESSURE_OUTLET MARKER_OUTLET= (outlet, 0.0) @@ -59,6 +59,8 @@ FLUID_MODEL= FLUID_FLAMELET FILENAMES_INTERPOLATOR= (fgm_ch4.drg) CONTROLLING_VARIABLE_NAMES= (ProgressVariable, EnthalpyTot) CONTROLLING_VARIABLE_SOURCE_NAMES= (ProdRateTot_PV, NULL) +FLAME_INIT_METHOD= FLAME_FRONT +%FLAME_INIT_METHOD= NONE FLAME_INIT= (0.004, 0.0, 0.0, 1, 0, 0, 0.2e-3, 1) % -------------------- SPECIES TRANSPORT ---------------------------------------% @@ -77,7 +79,7 @@ SLOPE_LIMITER_SPECIES= NONE TIME_DISCRE_SPECIES= EULER_IMPLICIT -SPECIES_INIT= (0, 0, 0, 0) +SPECIES_INIT= (0, -204000.0, 0, 0) SPECIES_CLIPPING= NO LOOKUP_NAMES= (MolarWeightMix, Conductivity, HeatRelease, Diffusivity, \ ProdRatePos_Y-CO, ProdRateNegScaled_Y-CO ,\ @@ -94,15 +96,15 @@ VISCOSITY_MODEL= FLAMELET %NUM_METHOD_GRAD= GREEN_GAUSS NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 25 +CFL_NUMBER= 10 CFL_ADAPT= NO % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% LINEAR_SOLVER= BCGSTAB LINEAR_SOLVER_PREC= ILU -LINEAR_SOLVER_ERROR= 1E-10 -LINEAR_SOLVER_ITER= 20 +LINEAR_SOLVER_ERROR= 1E-06 +LINEAR_SOLVER_ITER= 100 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% diff --git a/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_master.cfg b/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_master.cfg index 91524aea8eaf..7a9eb7debc38 100644 --- a/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_master.cfg +++ b/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_master.cfg @@ -44,12 +44,12 @@ OUTER_ITER = 1100 OUTPUT_WRT_FREQ= 50 SCREEN_WRT_FREQ_INNER= 1 SCREEN_WRT_FREQ_OUTER= 1 -SCREEN_OUTPUT= OUTER_ITER, BGS_RES[0], BGS_RES[1] +SCREEN_OUTPUT= OUTER_ITER, BGS_RES[0], BGS_RES[1] LINSOL_RESIDUAL[1] LINSOL_ITER[1] WRT_VOLUME_OVERWRITE= YES %WRT_ZONE_CONV= YES -CONV_RESIDUAL_MINVAL= -20 +CONV_RESIDUAL_MINVAL= -14 VOLUME_FILENAME= fluid diff --git a/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_solid.cfg b/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_solid.cfg index 3767a165b1bb..68ec9a5e6cab 100644 --- a/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_solid.cfg +++ b/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_solid.cfg @@ -7,7 +7,7 @@ MARKER_PLOTTING= ( NONE ) MARKER_MONITORING= ( NONE ) WRT_ZONE_HIST= YES -OUTPUT_FILES= ( RESTART_ASCII ) +OUTPUT_FILES= ( RESTART_ASCII, PARAVIEW ) INC_NONDIM= DIMENSIONAL @@ -34,14 +34,14 @@ TIME_DISCRE_HEAT= EULER_IMPLICIT % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 250 +CFL_NUMBER= 25 CFL_ADAPT= NO % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% LINEAR_SOLVER= BCGSTAB LINEAR_SOLVER_PREC= ILU -LINEAR_SOLVER_ERROR= 1e-16 +LINEAR_SOLVER_ERROR= 1e-06 LINEAR_SOLVER_ITER= 100 % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% @@ -54,4 +54,5 @@ VALUE_OBJFUNC_FILENAME= of_eval SURFACE_FILENAME= surface_solid SURFACE_ADJ_FILENAME= surface_adjoint +SCREEN_OUTPUT= INNER_ITER WALL_TIME RMS_TEMPERATURE LINSOL_ITER LINSOL_RESIDUAL diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index a15a6d96a0ef..8ac5aa8d8979 100755 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -74,7 +74,7 @@ def main(): cfd_flamelet_h2.cfg_dir = "flamelet/07_laminar_premixed_h2_flame_cfd" cfd_flamelet_h2.cfg_file = "laminar_premixed_h2_flame_cfd.cfg" cfd_flamelet_h2.test_iter = 5 - cfd_flamelet_h2.test_vals = [-9.984960, -9.843830, -3.289852, -11.338450] + cfd_flamelet_h2.test_vals = [-8.036958, -8.372668, -1.842800, -9.388446] cfd_flamelet_h2.new_output = True test_list.append(cfd_flamelet_h2) diff --git a/TestCases/parallel_regression_AD.py b/TestCases/parallel_regression_AD.py index 5694c0444529..9dd012e0c995 100644 --- a/TestCases/parallel_regression_AD.py +++ b/TestCases/parallel_regression_AD.py @@ -256,7 +256,7 @@ def main(): discadj_heat.cfg_dir = "disc_adj_heat" discadj_heat.cfg_file = "disc_adj_heat.cfg" discadj_heat.test_iter = 10 - discadj_heat.test_vals = [-1.928244, 0.730865, 0.000000, -3.993500] + discadj_heat.test_vals = [-1.880390, 0.759804, 0.000000, -4.486700] test_list.append(discadj_heat) ################################### @@ -290,7 +290,7 @@ def main(): discadj_cht.cfg_dir = "coupled_cht/disc_adj_incomp_2d" discadj_cht.cfg_file = "cht_2d_3cylinders.cfg" discadj_cht.test_iter = 10 - discadj_cht.test_vals = [-6.131109, -2.564634, -2.565220, -2.565303] + discadj_cht.test_vals = [-6.111499, -2.668835, -2.669557, -2.669594] test_list.append(discadj_cht) # 2D DA cht streamwise periodic case, 2 zones, avg temp objective @@ -298,7 +298,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 = [-3.907317, -5.155811, -3.183956] + da_sp_pinArray_cht_2d_dp_hf.test_vals = [-4.697305, -4.335384, -4.726171] da_sp_pinArray_cht_2d_dp_hf.multizone = True test_list.append(da_sp_pinArray_cht_2d_dp_hf) @@ -316,7 +316,7 @@ def main(): da_unsteadyCHT_cylinder.cfg_dir = "coupled_cht/disc_adj_unsteadyCHT_cylinder" da_unsteadyCHT_cylinder.cfg_file = "chtMaster.cfg" da_unsteadyCHT_cylinder.test_iter = 2 - da_unsteadyCHT_cylinder.test_vals = [-8.479629, -9.239920, -9.234868, -15.934511, -13.662012, 0.000000, 89.932000, 0.295190] + da_unsteadyCHT_cylinder.test_vals = [-8.479629, -9.239920, -9.234868, -15.934511, -13.662033, 0.000000, 10.627000, 0.295190] da_unsteadyCHT_cylinder.test_vals_aarch64 = [-8.479629, -9.239920, -9.234868, -15.934511, -13.662012, 0.000000, 89.932000, 0.295190] da_unsteadyCHT_cylinder.unsteady = True da_unsteadyCHT_cylinder.multizone = True diff --git a/TestCases/tutorials.py b/TestCases/tutorials.py index dae35afba4b4..3e88ce26e7a2 100644 --- a/TestCases/tutorials.py +++ b/TestCases/tutorials.py @@ -49,7 +49,7 @@ def main(): cht_incompressible_unsteady.cfg_dir = "../Tutorials/multiphysics/unsteady_cht/" cht_incompressible_unsteady.cfg_file = "cht_2d_3cylinders.cfg" cht_incompressible_unsteady.test_iter = 2 - cht_incompressible_unsteady.test_vals = [-1.742894, -3.075372, -0.080399, -0.080399, -0.080399, -11.163219, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 238.240000] #last columns + cht_incompressible_unsteady.test_vals = [-2.661401, -0.080399, -0.080399, -0.080399, -12.421963, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 238.240000] #last columns cht_incompressible_unsteady.multizone = True cht_incompressible_unsteady.unsteady = True test_list.append(cht_incompressible_unsteady) @@ -80,8 +80,8 @@ 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.684477, 0.844369, -0.755565, 241.872175] - sp_pinArray_2d_mf_hf.test_vals_aarch64 = [-4.686092, 1.387918, -0.755447, 241.878841] + sp_pinArray_2d_mf_hf.test_vals = [-4.683630, -0.755570, 241.872160] + sp_pinArray_2d_mf_hf.test_vals_aarch64 = [-4.683630, -0.755570, 241.872160] test_list.append(sp_pinArray_2d_mf_hf) # 2D pin case pressure drop periodic with heatflux BC and temperature periodicity @@ -89,8 +89,8 @@ 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.739886, 0.520841, -0.713547, 208.023676] - sp_pinArray_2d_dp_hf_tp.test_vals_aarch64 = [-4.733643, 1.325195, -0.713411, 208.023676] + sp_pinArray_2d_dp_hf_tp.test_vals = [-4.739709, -0.713547, 208.023676 + sp_pinArray_2d_dp_hf_tp.test_vals_aarch64 = [-4.739709, -0.713547, 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. @@ -136,7 +136,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 = [-5.673011, -4.673114, -4.692686, -5.445043, -1.069650, -5.960206, -6.065010, 5.000000, -0.569992, 5.000000, -2.512966, 5.000000, -0.525813, 1.660601, 0.502277, 0.603346, 0.554977] + species3_primitiveVenturi.test_vals = [-5.679419, -4.675598, -4.699798, -5.463760, -1.072282, -5.965552, -6.075164, 5.000000, -0.558583, 5.000000, -2.514945, 5.000000, -0.514439, 1.660063, 0.502195, 0.603290, 0.554578] test_list.append(species3_primitiveVenturi) # 3 species (2 eq) primitive venturi mixing @@ -144,7 +144,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.821887, -8.644118, -8.677534, -8.347228, -12.926295, -9.739487, -8.947991] + DAspecies3_primitiveVenturi.test_vals = [-9.806093, -8.630548, -8.666007, -8.333826, -12.914929, -11.064095, -10.278654] DAspecies3_primitiveVenturi.command = TestCase.Command("mpirun -n 2", "SU2_CFD_AD") test_list.append(DAspecies3_primitiveVenturi) @@ -165,7 +165,7 @@ def main(): premixed_hydrogen.cfg_dir = "../Tutorials/incompressible_flow/Inc_Combustion/1__premixed_hydrogen" premixed_hydrogen.cfg_file = "H2_burner.cfg" premixed_hydrogen.test_iter = 10 - premixed_hydrogen.test_vals = [-8.851285, -9.756885, -11.037752, -4.321598, -11.891933] + premixed_hydrogen.test_vals = [-9.647742, -10.286349, -11.353940, -4.380420, -12.831395] test_list.append(premixed_hydrogen) ### Compressible Flow From 79ae023c45496d9e99fa3db8a1c7864dca73a835 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Mon, 5 Jan 2026 12:44:37 +0100 Subject: [PATCH 28/37] fix typo --- TestCases/tutorials.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestCases/tutorials.py b/TestCases/tutorials.py index 3e88ce26e7a2..ee0d1976d2b9 100644 --- a/TestCases/tutorials.py +++ b/TestCases/tutorials.py @@ -89,7 +89,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.739709, -0.713547, 208.023676 + sp_pinArray_2d_dp_hf_tp.test_vals = [-4.739709, -0.713547, 208.023676] sp_pinArray_2d_dp_hf_tp.test_vals_aarch64 = [-4.739709, -0.713547, 208.023676] test_list.append(sp_pinArray_2d_dp_hf_tp) From dda4df01e6086289577fb97b00ea5e14c7124497 Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 5 Jan 2026 13:21:35 +0100 Subject: [PATCH 29/37] Update SU2_CFD/src/solvers/CIncEulerSolver.cpp --- SU2_CFD/src/solvers/CIncEulerSolver.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/SU2_CFD/src/solvers/CIncEulerSolver.cpp b/SU2_CFD/src/solvers/CIncEulerSolver.cpp index 0588dded4b1c..3646829bb1bb 100644 --- a/SU2_CFD/src/solvers/CIncEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CIncEulerSolver.cpp @@ -383,14 +383,10 @@ void CIncEulerSolver::SetNondimensionalization(CConfig *config, unsigned short i Pressure_Ref = 1.0; } else if (config->GetRef_Inc_NonDim() == INITIAL_VALUES) { - Density_Ref = Density_FreeStream; - cout << "Density_Ref: " << Density_Ref << endl; - Velocity_Ref = ModVel_FreeStream; - cout << "Velocity_Ref: " << Velocity_Ref << endl; - Temperature_Ref = Temperature_FreeStream; - cout << "Temperature_Ref: " << Temperature_Ref << endl; - Pressure_Ref = Density_Ref*Velocity_Ref*Velocity_Ref; - cout << "Pressure_Ref: " << Pressure_Ref << endl; +Density_Ref = Density_FreeStream; +Velocity_Ref = ModVel_FreeStream; +Temperature_Ref = Temperature_FreeStream; +Pressure_Ref = Density_Ref*Velocity_Ref*Velocity_Ref; } else if (config->GetRef_Inc_NonDim() == REFERENCE_VALUES) { Density_Ref = config->GetInc_Density_Ref(); From a4d1264127a85edfd4c3a1332a4796cb6950a01b Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 5 Jan 2026 13:43:41 +0100 Subject: [PATCH 30/37] Update SU2_CFD/src/solvers/CNSSolver.cpp --- SU2_CFD/src/solvers/CNSSolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SU2_CFD/src/solvers/CNSSolver.cpp b/SU2_CFD/src/solvers/CNSSolver.cpp index be79d762c7c8..f5dc3f95eda9 100644 --- a/SU2_CFD/src/solvers/CNSSolver.cpp +++ b/SU2_CFD/src/solvers/CNSSolver.cpp @@ -1037,7 +1037,7 @@ void CNSSolver::SetTau_Wall_WF(CGeometry *geometry, CSolver **solver_container, if (smallYPlusCounter) cout << "y+ < " << config->GetwallModel_MinYPlus() << " in " << smallYPlusCounter - << " points. No problem, but you can increase your near-wallmesh size." << endl; + << " points. No problem, but you can increase your near-wall mesh size." << endl; } } END_SU2_OMP_SAFE_GLOBAL_ACCESS From b02ab50dab7c68c2f7b8a7b5422e55df266f0090 Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 5 Jan 2026 13:43:51 +0100 Subject: [PATCH 31/37] Update TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_fluid.cfg --- .../lam_prem_ch4_cht_ad_fluid.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_fluid.cfg b/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_fluid.cfg index c7eada303242..9bd6a6aa2c90 100644 --- a/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_fluid.cfg +++ b/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_fluid.cfg @@ -21,7 +21,7 @@ HISTORY_OUTPUT= RMS_RES AERO_COEFF FLOW_COEFF FLOW_COEFF_SURF VOLUME_OUTPUT= SOLUTION PRIMITIVE SOURCE RESIDUAL LOOKUP -OUTPUT_FILES= ( RESTART_ASCII, PARAVIEW) +OUTPUT_FILES= ( RESTART_ASCII) WRT_RESTART_COMPACT= NO From 67d511aa6541a04f46bca75ef314a5e15f4feef4 Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 5 Jan 2026 13:44:21 +0100 Subject: [PATCH 32/37] Update TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_solid.cfg --- .../lam_prem_ch4_cht_ad_solid.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_solid.cfg b/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_solid.cfg index 68ec9a5e6cab..99c48b1adade 100644 --- a/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_solid.cfg +++ b/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_solid.cfg @@ -7,7 +7,7 @@ MARKER_PLOTTING= ( NONE ) MARKER_MONITORING= ( NONE ) WRT_ZONE_HIST= YES -OUTPUT_FILES= ( RESTART_ASCII, PARAVIEW ) +OUTPUT_FILES= ( RESTART_ASCII ) INC_NONDIM= DIMENSIONAL From bc0b1b0f74a18ae05dc2c3bb63f1d4a9269b8e4e Mon Sep 17 00:00:00 2001 From: Nijso Date: Mon, 5 Jan 2026 13:44:30 +0100 Subject: [PATCH 33/37] Update TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_fluid.cfg --- .../lam_prem_ch4_cht_ad_fluid.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_fluid.cfg b/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_fluid.cfg index 9bd6a6aa2c90..8b6b374d2046 100644 --- a/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_fluid.cfg +++ b/TestCases/flamelet/04_laminar_premixed_ch4_flame_cht_ad/lam_prem_ch4_cht_ad_fluid.cfg @@ -59,8 +59,8 @@ FLUID_MODEL= FLUID_FLAMELET FILENAMES_INTERPOLATOR= (fgm_ch4.drg) CONTROLLING_VARIABLE_NAMES= (ProgressVariable, EnthalpyTot) CONTROLLING_VARIABLE_SOURCE_NAMES= (ProdRateTot_PV, NULL) -FLAME_INIT_METHOD= FLAME_FRONT -%FLAME_INIT_METHOD= NONE +%FLAME_INIT_METHOD= FLAME_FRONT +FLAME_INIT_METHOD= NONE FLAME_INIT= (0.004, 0.0, 0.0, 1, 0, 0, 0.2e-3, 1) % -------------------- SPECIES TRANSPORT ---------------------------------------% From ebf0b074497df074ea4f0ef75b78730d186a9efc Mon Sep 17 00:00:00 2001 From: bigfooted Date: Mon, 5 Jan 2026 13:45:07 +0100 Subject: [PATCH 34/37] update some more regressions --- TestCases/parallel_regression.py | 8 ++++---- TestCases/parallel_regression_AD.py | 4 ++-- TestCases/tutorials.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 4114f629dbaa..9b8dfafe8ec5 100755 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -47,7 +47,7 @@ def main(): cfd_flamelet_ch4.cfg_dir = "flamelet/01_laminar_premixed_ch4_flame_cfd" cfd_flamelet_ch4.cfg_file = "lam_prem_ch4_cfd.cfg" cfd_flamelet_ch4.test_iter = 10 - cfd_flamelet_ch4.test_vals = [-14.971554, -15.910509, -9.042920, -16.513197, -19.488582, 104.940000] + cfd_flamelet_ch4.test_vals = [-14.429718, -15.860038, -8.226686, -16.506667, -19.493283, 87.326000] cfd_flamelet_ch4.new_output = True test_list.append(cfd_flamelet_ch4) @@ -56,7 +56,7 @@ def main(): cfd_flamelet_ch4_axi.cfg_dir = "flamelet/05_laminar_premixed_ch4_flame_cfd_axi" cfd_flamelet_ch4_axi.cfg_file = "lam_prem_ch4_cfd_axi.cfg" cfd_flamelet_ch4_axi.test_iter = 10 - cfd_flamelet_ch4_axi.test_vals = [-11.259602, -10.020810, -11.852797, -4.909130, 95.000000] + cfd_flamelet_ch4_axi.test_vals = [-11.259626, -10.020810, -11.852795, -4.909152, 95.000000] cfd_flamelet_ch4_axi.new_output = True test_list.append(cfd_flamelet_ch4_axi) @@ -65,7 +65,7 @@ def main(): cfd_flamelet_ch4_partial_premix.cfg_dir = "flamelet/06_laminar_partial_premixed_ch4_flame_cfd" cfd_flamelet_ch4_partial_premix.cfg_file = "lam_partial_prem_ch4_cfd.cfg" cfd_flamelet_ch4_partial_premix.test_iter = 10 - cfd_flamelet_ch4_partial_premix.test_vals = [-10.482722, -3.621023, -12.938151, -10.154391, 10.000000] + cfd_flamelet_ch4_partial_premix.test_vals = [-10.482722, -3.621055, -12.938151, -10.154391, 10.000000] cfd_flamelet_ch4_partial_premix.new_output = True test_list.append(cfd_flamelet_ch4_partial_premix) @@ -1751,7 +1751,7 @@ def main(): cfd_flamelet_ch4_cht.cfg_dir = "flamelet/03_laminar_premixed_ch4_flame_cht_cfd" cfd_flamelet_ch4_cht.cfg_file = "lam_prem_ch4_cht_cfd_master.cfg" cfd_flamelet_ch4_cht.test_iter = 5 - cfd_flamelet_ch4_cht.test_vals = [-7.209184, -6.102044, -7.491447, -9.317122, -3.204897, -9.811662, -13.554684, -6.864880] + cfd_flamelet_ch4_cht.test_vals = [-9.824525, -8.913124, -9.862973, -11.271228, -3.238372, -10.916614, -12.615134, -6.614396] cfd_flamelet_ch4_cht.timeout = 1600 cfd_flamelet_ch4_cht.multizone = True test_list.append(cfd_flamelet_ch4_cht) diff --git a/TestCases/parallel_regression_AD.py b/TestCases/parallel_regression_AD.py index 9dd012e0c995..bd309cd74fef 100644 --- a/TestCases/parallel_regression_AD.py +++ b/TestCases/parallel_regression_AD.py @@ -332,7 +332,7 @@ def main(): discadj_flamelet_ch4_hx.cfg_file = "lam_prem_ch4_hx_ad.cfg" discadj_flamelet_ch4_hx.multizone = False discadj_flamelet_ch4_hx.test_iter = 10 - discadj_flamelet_ch4_hx.test_vals = [-8.717448, -8.450564, -8.766800, -6.626764, -14.602479, -3.248656, -18.930954] + discadj_flamelet_ch4_hx.test_vals = [-12.782056, -13.049168, -13.441039, -11.710302, -18.821992, -8.887596, -18.882447] test_list.append(discadj_flamelet_ch4_hx) # 2D planar laminar premixed flame on isothermal burner with conjugate heat transfer (restart) @@ -341,7 +341,7 @@ def main(): discadj_flamelet_ch4_cht.cfg_file = "lam_prem_ch4_cht_ad_master.cfg" discadj_flamelet_ch4_cht.multizone = True discadj_flamelet_ch4_cht.test_iter = 10 - discadj_flamelet_ch4_cht.test_vals = [-2.764345, -1.998773, -2.082310, -0.140923, -7.287831, -18.655078, -18.622026, -4.847187] + discadj_flamelet_ch4_cht.test_vals = [-1.543982, 0.628666, -6.533516, -18.651097, -18.648552, -3.794724, -6.561913, 11.000000] test_list.append(discadj_flamelet_ch4_cht) ###################################### diff --git a/TestCases/tutorials.py b/TestCases/tutorials.py index ee0d1976d2b9..c15480eb3e32 100644 --- a/TestCases/tutorials.py +++ b/TestCases/tutorials.py @@ -165,7 +165,7 @@ def main(): premixed_hydrogen.cfg_dir = "../Tutorials/incompressible_flow/Inc_Combustion/1__premixed_hydrogen" premixed_hydrogen.cfg_file = "H2_burner.cfg" premixed_hydrogen.test_iter = 10 - premixed_hydrogen.test_vals = [-9.647742, -10.286349, -11.353940, -4.380420, -12.831395] + premixed_hydrogen.test_vals = [-9.647741, -10.286349, -11.353961, -4.380211, -12.831110] test_list.append(premixed_hydrogen) ### Compressible Flow From 52d5353de4a09309adc42115b58f21d3dcebed24 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 6 Jan 2026 08:53:10 +0100 Subject: [PATCH 35/37] update some more regressions --- .../chtPinArray_2d/of_grad_findiff.csv.ref | 3 +-- .../chtPinArray_2d/of_grad_findiff_aarch64.csv.ref | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) 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 af480e5fa85c..a23afdd63e80 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 @@ -"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 , -409999.99619089067, -4.4410000000756306e-08, 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.12000000160217184, 3.3300000005652e-08, -0.2800000009628434 , 0.0 , 1.1799999977135656 , 1.5699999966756195 , 2599.999999119973 , -119.99999287581886 , 3870.0000004610047 , -109.99999631167157 , 0.7999999995789153 , -210.00000174353772, 14480.000004368776, 1e-08 +['"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" \n', '0 , 0.0 , -20000.000949949026, 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , -0.01000000082740371, 1.1100000001884e-08, -0.04000000330961484 , 0.0 , 0.01000000082740371 , 0.059999993862192014 , -9.999999406318238 , 0.0 , -69.99999868639861 , 0.0 , -0.09999998606957661 , -80.0000009348878 , -359.99998999614036, 1e-08 \n'] diff --git a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/of_grad_findiff_aarch64.csv.ref b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/of_grad_findiff_aarch64.csv.ref index 711f20505853..af480e5fa85c 100644 --- a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/of_grad_findiff_aarch64.csv.ref +++ b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_2d/of_grad_findiff_aarch64.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 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , -4.439999996617697e-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 +"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 , -409999.99619089067, -4.4410000000756306e-08, 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.12000000160217184, 3.3300000005652e-08, -0.2800000009628434 , 0.0 , 1.1799999977135656 , 1.5699999966756195 , 2599.999999119973 , -119.99999287581886 , 3870.0000004610047 , -109.99999631167157 , 0.7999999995789153 , -210.00000174353772, 14480.000004368776, 1e-08 From 66e276793d9e26b90b22e34ce51005f52954f908 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 6 Jan 2026 09:51:04 +0100 Subject: [PATCH 36/37] update some more regressions --- .../streamwise_periodic/chtPinArray_2d/of_grad_findiff.csv.ref | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 a23afdd63e80..3e2b9a6332a8 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 +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" \n', '0 , 0.0 , -20000.000949949026, 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , -0.01000000082740371, 1.1100000001884e-08, -0.04000000330961484 , 0.0 , 0.01000000082740371 , 0.059999993862192014 , -9.999999406318238 , 0.0 , -69.99999868639861 , 0.0 , -0.09999998606957661 , -80.0000009348878 , -359.99998999614036, 1e-08 \n'] +"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 , -20000.000949949026, 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , -0.01000000082740371, 1.1100000001884e-08, -0.04000000330961484 , 0.0 , 0.01000000082740371 , 0.059999993862192014 , -9.999999406318238 , 0.0 , -69.99999868639861 , 0.0 , -0.09999998606957661 , -80.0000009348878 , -359.99998999614036, 1e-08 From 370a9eb8f95a657d8b91ed5a6bc2b6f65d713a25 Mon Sep 17 00:00:00 2001 From: bigfooted Date: Tue, 6 Jan 2026 10:55:01 +0100 Subject: [PATCH 37/37] change regression back --- .github/workflows/regression.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index c3d21e54c897..b7d4c3530d01 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 fix_enthalpy -c fix_enthalpy -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: