From fdcfd8a82bd7e70f70bf959bc9e4c9bb1c00c272 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Thu, 8 Feb 2024 16:11:22 +0000 Subject: [PATCH 01/61] Implementation of mass flow outlet in Giles BC --- Common/include/option_structure.hpp | 5 +++- SU2_CFD/include/solvers/CEulerSolver.hpp | 10 ++++++++ SU2_CFD/include/solvers/CSolver.hpp | 7 ++++++ SU2_CFD/src/solvers/CEulerSolver.cpp | 29 ++++++++++++++++++++++-- 4 files changed, 48 insertions(+), 3 deletions(-) diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index a2b5f551525..3777ff5c794 100644 --- a/Common/include/option_structure.hpp +++ b/Common/include/option_structure.hpp @@ -1699,7 +1699,8 @@ enum RIEMANN_TYPE { TOTAL_CONDITIONS_PT_1D = 11, STATIC_PRESSURE_1D = 12, MIXING_IN_1D = 13, - MIXING_OUT_1D =14 + MIXING_OUT_1D = 14, + MASS_FLOW_OUTLET = 15 }; static const MapType Riemann_Map = { MakePair("TOTAL_CONDITIONS_PT", TOTAL_CONDITIONS_PT) @@ -1716,6 +1717,7 @@ static const MapType Riemann_Map = { MakePair("RADIAL_EQUILIBRIUM", RADIAL_EQUILIBRIUM) MakePair("TOTAL_CONDITIONS_PT_1D", TOTAL_CONDITIONS_PT_1D) MakePair("STATIC_PRESSURE_1D", STATIC_PRESSURE_1D) + MakePair("MASS_FLOW_OUTLET", MASS_FLOW_OUTLET) }; static const MapType Giles_Map = { @@ -1733,6 +1735,7 @@ static const MapType Giles_Map = { MakePair("RADIAL_EQUILIBRIUM", RADIAL_EQUILIBRIUM) MakePair("TOTAL_CONDITIONS_PT_1D", TOTAL_CONDITIONS_PT_1D) MakePair("STATIC_PRESSURE_1D", STATIC_PRESSURE_1D) + MakePair("MASS_FLOW_OUTLET", MASS_FLOW_OUTLET) }; /*! diff --git a/SU2_CFD/include/solvers/CEulerSolver.hpp b/SU2_CFD/include/solvers/CEulerSolver.hpp index 7a6aa9fb3d8..bcd4e55b253 100644 --- a/SU2_CFD/include/solvers/CEulerSolver.hpp +++ b/SU2_CFD/include/solvers/CEulerSolver.hpp @@ -138,6 +138,7 @@ class CEulerSolver : public CFVMFlowSolverBase AverageMassFlowRate; su2activematrix DensityIn; su2activematrix PressureIn; @@ -1191,6 +1192,15 @@ class CEulerSolver : public CFVMFlowSolverBaseval_marker + */ + inline su2double GetAverageMassFlowRate(unsigned short valMarker) const final { + return AverageMassFlowRate[valMarker]; + } + /*! * \brief Provide the average pressure at the boundary of interest. * \param[in] val_marker - bound marker. diff --git a/SU2_CFD/include/solvers/CSolver.hpp b/SU2_CFD/include/solvers/CSolver.hpp index 9134c901174..a43ed764f11 100644 --- a/SU2_CFD/include/solvers/CSolver.hpp +++ b/SU2_CFD/include/solvers/CSolver.hpp @@ -3799,6 +3799,13 @@ class CSolver { */ inline virtual su2double GetAverageDensity(unsigned short valMarker, unsigned short valSpan) const { return 0.0; } + /*! + * \brief virtual member + * \param[in] val_marker - boundary marker + * \return Value of the mass flow rate on the surface val_marker + */ + inline virtual su2double GetAverageMassFlowRate(unsigned short valMarker) const {return 0.0; } + /*! * \brief A virtual member. * \param[in] val_marker - bound marker. diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index 05aec1c2843..dae32f75e30 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -232,6 +232,9 @@ CEulerSolver::CEulerSolver(CGeometry *geometry, CConfig *config, Exhaust_Pressure.resize(nMarker); Exhaust_Area.resize(nMarker); + /*--- Turbomachinery simulation ---*/ + AverageMassFlowRate.resize(nMarker); + /*--- Read farfield conditions from config ---*/ Temperature_Inf = config->GetTemperature_FreeStreamND(); @@ -279,6 +282,8 @@ CEulerSolver::CEulerSolver(CGeometry *geometry, CConfig *config, Exhaust_Temperature[iMarker] = Temperature_Inf; Exhaust_Pressure[iMarker] = Pressure_Inf; Exhaust_Area[iMarker] = 0.0; + + AverageMassFlowRate[iMarker] = 0.0; } /*--- Initialize the solution to the far-field state everywhere. ---*/ @@ -6530,6 +6535,23 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu break; + case MASS_FLOW_OUTLET: + auto const MassFlowRate_e = config->GetGiles_Var1(Marker_Tag); + auto const relFacMassFlowRate = config->GetGiles_Var2(Marker_Tag); + + Pressure_e = AveragePressure[val_marker][nSpanWiseSections]+relFacMassFlowRate*(AverageMassFlowRate[val_marker]-MassFlowRate_e); + + + /* --- Compute avg characteristic jump --- */ + if (nDim == 2){ + c_avg[3] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); + } + else + { + c_avg[4] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); + } + break; + } /*--- Loop over all the vertices on this boundary marker ---*/ @@ -6701,7 +6723,7 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu break; - case STATIC_PRESSURE:case STATIC_PRESSURE_1D:case MIXING_OUT:case RADIAL_EQUILIBRIUM:case MIXING_OUT_1D: + case STATIC_PRESSURE:case STATIC_PRESSURE_1D:case MIXING_OUT:case RADIAL_EQUILIBRIUM:case MIXING_OUT_1D: case MASS_FLOW_OUTLET: /* --- implementation of Giles BC---*/ if(config->GetSpatialFourier()){ @@ -9335,7 +9357,10 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC SU2_MPI::Error(" Invalid AVERAGE PROCESS input!", CURRENT_FUNCTION); break; } - + /*--- Store averaged value of mass flow rate over the prescribed boundary ---*/ + if (iSpan == nSpanWiseSections){ + AverageMassFlowRate[iMarker] = TotalFluxes[0]; + } AverageDensity[iMarker][iSpan] = avgDensity; AveragePressure[iMarker][iSpan] = avgPressure; if ((average_process == MIXEDOUT) && !belowMachLimit) { From 7d4d4ede681199bdec58599377d627a3c13847ec Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 13 Feb 2024 16:13:06 +0000 Subject: [PATCH 02/61] Added TURBO_INTERFACE_KIND options and updated interface preprocesing --- Common/include/CConfig.hpp | 10 ++++++++++ Common/include/option_structure.hpp | 12 ++++++++++++ Common/src/CConfig.cpp | 17 ++++++++++++++++- SU2_CFD/src/drivers/CDriver.cpp | 25 +++++++++++++++++-------- 4 files changed, 55 insertions(+), 9 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 910be2231ac..ae99f984ce3 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -231,6 +231,7 @@ class CConfig { *Marker_PerBound, /*!< \brief Periodic boundary markers. */ *Marker_PerDonor, /*!< \brief Rotationally periodic boundary donor markers. */ *Marker_MixingPlaneInterface, /*!< \brief MixingPlane interface boundary markers. */ + *Marker_TurboInterface, /*!< \breif Turbo interface boundary markers */ *Marker_TurboBoundIn, /*!< \brief Turbomachinery performance boundary markers. */ *Marker_TurboBoundOut, /*!< \brief Turbomachinery performance boundary donor markers. */ *Marker_NearFieldBound, /*!< \brief Near Field boundaries markers. */ @@ -436,6 +437,7 @@ class CConfig { TURBO_PERF_KIND *Kind_TurboPerf; /*!< \brief Kind of turbomachynery architecture.*/ TURBOMACHINERY_TYPE *Kind_TurboMachinery; + TURBO_INTERFACE_KIND *Kind_TurboInterface; /* Gradient smoothing options */ su2double SmoothingEps1; /*!< \brief Parameter for the identity part in gradient smoothing. */ @@ -459,6 +461,7 @@ class CConfig { unsigned short* nDV_Value; /*!< \brief Number of values for each design variable (might be different than 1 if we allow arbitrary movement). */ unsigned short nFFDBox; /*!< \brief Number of ffd boxes. */ unsigned short nTurboMachineryKind; /*!< \brief Number turbomachinery types specified. */ + unsigned short nTurboInterfaces; /*!< \brief Number of turbomachiery interfaces */ unsigned short nParamDV; /*!< \brief Number of parameters of the design variable. */ string DV_Filename; /*!< \brief Filename for providing surface positions from an external parameterization. */ string DV_Unordered_Sens_Filename; /*!< \brief Filename of volume sensitivities in an unordered ASCII format. */ @@ -755,6 +758,7 @@ class CConfig { *Marker_CfgFile_Turbomachinery, /*!< \brief Global index for Turbomachinery using the config information. */ *Marker_CfgFile_TurbomachineryFlag, /*!< \brief Global index for Turbomachinery flag using the config information. */ *Marker_CfgFile_MixingPlaneInterface, /*!< \brief Global index for MixingPlane interface using the config information. */ + *Marker_CfgFile_TurboInterface, /*< \breif Global index for turbo interface using the config information */ *Marker_CfgFile_Moving, /*!< \brief Global index for moving surfaces using the config information. */ *Marker_CfgFile_Deform_Mesh, /*!< \brief Global index for deformable markers at the boundary. */ *Marker_CfgFile_Deform_Mesh_Sym_Plane, /*!< \brief Global index for markers with symmetric deformations. */ @@ -5262,6 +5266,12 @@ class CConfig { */ TURBO_PERF_KIND GetKind_TurboPerf(unsigned short val_iZone) const { return Kind_TurboPerf[val_iZone]; }; + /*! + * \brief get interface kind for two adjacent zones in turbomachinery problem + * \return interface kind + */ + TURBO_INTERFACE_KIND GetKind_TurboInterface(unsigned short interfaceIndex) const { return Kind_TurboInterface[interfaceIndex]; } + /*! * \brief get outlet bounds name for Turbomachinery performance calculation. * \return name of the bound. diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index 3777ff5c794..3228892b3c4 100644 --- a/Common/include/option_structure.hpp +++ b/Common/include/option_structure.hpp @@ -1812,6 +1812,18 @@ static const MapType TurboPerfKind_Map = { MakePair("PROPELLOR", TURBO_PERF_KIND::PROPELLOR) }; +/*! + * \brief Types onf Turbomachinery interfaces + */ +enum class TURBO_INTERFACE_KIND{ + MIXING_PLANE = ENUM_TRANSFER::MIXING_PLANE, + FROZEN_ROTOR = ENUM_TRANSFER::SLIDING_INTERFACE, +}; +static const MapType TurboInterfaceKind_Map = { + MakePair("MIXING_PLANE", TURBO_INTERFACE_KIND::MIXING_PLANE) + MakePair("FROZEN_ROTOR", TURBO_INTERFACE_KIND::FROZEN_ROTOR) +}; + /*! * \brief Types of Turbomachinery performance flag. */ diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 86a0d31e456..1796f012bf4 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -834,6 +834,7 @@ void CConfig::SetPointersNull() { Marker_CfgFile_Turbomachinery = nullptr; Marker_All_Turbomachinery = nullptr; Marker_CfgFile_TurbomachineryFlag = nullptr; Marker_All_TurbomachineryFlag = nullptr; Marker_CfgFile_MixingPlaneInterface = nullptr; Marker_All_MixingPlaneInterface = nullptr; + Marker_CfgFile_TurboInterface = nullptr; Marker_CfgFile_ZoneInterface = nullptr; Marker_CfgFile_Deform_Mesh = nullptr; Marker_All_Deform_Mesh = nullptr; Marker_CfgFile_Deform_Mesh_Sym_Plane = nullptr; Marker_All_Deform_Mesh_Sym_Plane = nullptr; @@ -1034,6 +1035,7 @@ void CConfig::SetPointersNull() { Kind_TurboMachinery = nullptr; Marker_MixingPlaneInterface = nullptr; + Marker_TurboInterface = nullptr; Marker_TurboBoundIn = nullptr; Marker_TurboBoundOut = nullptr; Marker_Giles = nullptr; @@ -1630,6 +1632,9 @@ void CConfig::SetConfig_Options() { /*!\brief TURBOMACHINERY_KIND \n DESCRIPTION: types of turbomachynery Performance Calculations. \n OPTIONS: see \link TurboPerfKind_Map \endlink \n Default: TURBINE */ addEnumListOption("TURBO_PERF_KIND", nTurboMachineryKind, Kind_TurboPerf, TurboPerfKind_Map); + /*!\brief TURBO_INTERFACE_KIND \n DESCRIPTION: types of interface to be used between zones in turbomachinery problems + * \n OPTIONS: see \link TurboInterfaceKind_Map \endlink \n DEFAULT: MIXING_PLANE */ + addEnumListOption("TURBO_INTERFACE_KIND", nTurboInterfaces, Kind_TurboInterface, TurboInterfaceKind_Map); /*!\brief MARKER_SHROUD \n DESCRIPTION: markers in which velocity is forced to 0.0. * \n Format: (shroud1, shroud2, ...)*/ addStringListOption("MARKER_SHROUD", nMarker_Shroud, Marker_Shroud); @@ -5543,7 +5548,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_Clamped, iMarker_ZoneInterface, iMarker_CHTInterface, iMarker_Load_Dir, iMarker_Disp_Dir, iMarker_Fluid_Load, iMarker_Deform_Mesh, iMarker_Deform_Mesh_Sym_Plane, iMarker_ActDiskInlet, iMarker_ActDiskOutlet, - iMarker_Turbomachinery, iMarker_MixingPlaneInterface; + iMarker_Turbomachinery, iMarker_MixingPlaneInterface, iMarker_TurboInterface; int size = SINGLE_NODE; SU2_MPI::Comm_size(SU2_MPI::GetComm(), &size); @@ -5616,6 +5621,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { Marker_CfgFile_Turbomachinery = new unsigned short[nMarker_CfgFile] (); Marker_CfgFile_TurbomachineryFlag = new unsigned short[nMarker_CfgFile] (); Marker_CfgFile_MixingPlaneInterface = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_TurboInterface = new unsigned short[nMarker_CfgFile] (); Marker_CfgFile_PyCustom = new unsigned short[nMarker_CfgFile] (); Marker_CfgFile_SobolevBC = new unsigned short[nMarker_CfgFile] (); @@ -5973,6 +5979,15 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] = indexMarker; } + //for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { + // unsigned short indexMarker = 0; + // Marker_CfgFile_TurboInterface[iMarker_CfgFile] = NO; + // for (iMarker_TurboInterface = 0; iMarker_TurboInterface < nTurboInterfaces; iMarker_TurboInterface) + // if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_TurboInterface[iMarker_TurboInterface]) + // indexMarker=(int)(iMarker_TurboInterface/2+1); + // Marker_CfgFile_TurboInterface[iMarker_CfgFile] = indexMarker; + //} + for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { Marker_CfgFile_DV[iMarker_CfgFile] = NO; for (iMarker_DV = 0; iMarker_DV < nMarker_DV; iMarker_DV++) diff --git a/SU2_CFD/src/drivers/CDriver.cpp b/SU2_CFD/src/drivers/CDriver.cpp index 0fdfb2c2a2e..085cd4ac49e 100644 --- a/SU2_CFD/src/drivers/CDriver.cpp +++ b/SU2_CFD/src/drivers/CDriver.cpp @@ -2488,14 +2488,23 @@ void CDriver::InitializeInterface(CConfig **config, CSolver***** solver, CGeomet if (rank == MASTER_NODE) cout << "boundary displacements from the structural solver." << endl; } else if (fluid_donor && fluid_target) { - /*--- Mixing plane for turbo machinery applications. ---*/ - if (config[donor]->GetBoolMixingPlaneInterface()) { - interface_type = MIXING_PLANE; - auto nVar = solver[donor][INST_0][MESH_0][FLOW_SOL]->GetnVar(); - interface[donor][target] = new CMixingPlaneInterface(nVar, 0); - if (rank == MASTER_NODE) { - cout << "Set mixing-plane interface from donor zone " - << donor << " to target zone " << target << "." << endl; + /*--- Interface handling for turbomachinery applications. ---*/ + if (config[donor]->GetBoolTurbomachinery()) { + auto interfaceIndex = (donor+target-1)/2; + switch (config[donor]->GetKind_TurboInterface(interfaceIndex)) { + case TURBO_INTERFACE_KIND::MIXING_PLANE: { + interface_type = MIXING_PLANE; + auto nVar = solver[donor][INST_0][MESH_0][FLOW_SOL]->GetnVar(); + interface[donor][target] = new CMixingPlaneInterface(nVar, 0); + if (rank == MASTER_NODE) cout << "using a mixing-plane interface from donor zone " << donor << " to target zone " << target << "." << endl; + break; + } + case TURBO_INTERFACE_KIND::FROZEN_ROTOR: { + auto nVar = solver[donor][INST_0][MESH_0][FLOW_SOL]->GetnPrimVar(); + interface_type = SLIDING_INTERFACE; + interface[donor][target] = new CSlidingInterface(nVar, 0); + if (rank == MASTER_NODE) cout << "using a frozen rotor interface from donor zone " << donor << " to target zone " << target << "." << endl; + } } } else{ From 71c227995a4c23973f9b68c3e5ded77a9ae3c942 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 13 Feb 2024 16:30:41 +0000 Subject: [PATCH 03/61] Remove some unecssary code --- Common/src/CConfig.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 1796f012bf4..7b68b597e4e 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -5979,15 +5979,6 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] = indexMarker; } - //for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { - // unsigned short indexMarker = 0; - // Marker_CfgFile_TurboInterface[iMarker_CfgFile] = NO; - // for (iMarker_TurboInterface = 0; iMarker_TurboInterface < nTurboInterfaces; iMarker_TurboInterface) - // if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_TurboInterface[iMarker_TurboInterface]) - // indexMarker=(int)(iMarker_TurboInterface/2+1); - // Marker_CfgFile_TurboInterface[iMarker_CfgFile] = indexMarker; - //} - for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { Marker_CfgFile_DV[iMarker_CfgFile] = NO; for (iMarker_DV = 0; iMarker_DV < nMarker_DV; iMarker_DV++) From b8dd1c4cad27930ce53cba2679ee1557dbddcabe Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 13 Feb 2024 16:37:04 +0000 Subject: [PATCH 04/61] Updated testcases --- TestCases/turbomachinery/APU_turbocharger/Jones_restart.cfg | 1 + TestCases/turbomachinery/axial_stage_2D/Axial_stage2D.cfg | 1 + TestCases/turbomachinery/centrifugal_stage/centrifugal_stage.cfg | 1 + 3 files changed, 3 insertions(+) diff --git a/TestCases/turbomachinery/APU_turbocharger/Jones_restart.cfg b/TestCases/turbomachinery/APU_turbocharger/Jones_restart.cfg index 42de00358bd..45e3aafaffb 100755 --- a/TestCases/turbomachinery/APU_turbocharger/Jones_restart.cfg +++ b/TestCases/turbomachinery/APU_turbocharger/Jones_restart.cfg @@ -69,6 +69,7 @@ MARKER_TURBOMACHINERY= (INFLOW, OUTMIX, INMIX, OUTFLOW) MARKER_ANALYZE= (OUTFLOW) MARKER_ZONE_INTERFACE= (OUTMIX, INMIX) MARKER_MIXINGPLANE_INTERFACE= (OUTMIX, INMIX) +TURBO_INTERFACE_KIND= (MIXING_PLANE) MARKER_GILES= (INFLOW, TOTAL_CONDITIONS_PT, 413.6E+03, 477.6, 1.0, 0.0, 0.0, 1.0, 0.0, OUTMIX, MIXING_OUT, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.0, INMIX, MIXING_IN, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.0, OUTFLOW, STATIC_PRESSURE_1D, 67.46E+03, 0.0, 0.0, 0.0, 0.0 , 1.0, 0.0) GILES_EXTRA_RELAXFACTOR= (0.05, 0.05) SPATIAL_FOURIER= NO diff --git a/TestCases/turbomachinery/axial_stage_2D/Axial_stage2D.cfg b/TestCases/turbomachinery/axial_stage_2D/Axial_stage2D.cfg index 75be16ada08..5a8741ea0de 100755 --- a/TestCases/turbomachinery/axial_stage_2D/Axial_stage2D.cfg +++ b/TestCases/turbomachinery/axial_stage_2D/Axial_stage2D.cfg @@ -72,6 +72,7 @@ MARKER_ANALYZE= (outflow) MARKER_ZONE_INTERFACE= (outmix, inmix) % Mixing-plane interface markers must be specified to activate the transfer of information between zones MARKER_MIXINGPLANE_INTERFACE= (outmix, inmix) +TURBO_INTERFACE_KIND= (MIXING_PLANE) % MARKER_GILES= (inflow, TOTAL_CONDITIONS_PT, 169623.33, 305.76, 1.0, 0.0, 0.0,1.0,1.0, outmix, MIXING_OUT, 0.0, 0.0, 0.0, 0.0, 0.0,1.0,1.0, inmix, MIXING_IN, 0.0, 0.0, 0.0, 0.0, 0.0,1.0, 1.0 outflow, STATIC_PRESSURE, 99741.00, 0.0, 0.0, 0.0, 0.0,1.0,1.0) SPATIAL_FOURIER= NO diff --git a/TestCases/turbomachinery/centrifugal_stage/centrifugal_stage.cfg b/TestCases/turbomachinery/centrifugal_stage/centrifugal_stage.cfg index 22ab379423b..3402e566fa5 100755 --- a/TestCases/turbomachinery/centrifugal_stage/centrifugal_stage.cfg +++ b/TestCases/turbomachinery/centrifugal_stage/centrifugal_stage.cfg @@ -61,6 +61,7 @@ MARKER_RIEMANN= (inflow, TOTAL_CONDITIONS_PT, 366000.0, 515.00, 0.52101, -0.8535 MARKER_NRBC= (outmix, MIXING_OUT, 0.0, 0.0, 0.0, 0.0, 0.0, inmix, MIXING_IN, 0.0, 0.0, 0.0, 0.0, 0.0, outflow, STATIC_PRESSURE, 95750.0, 0.0, 0.0, 0.0, 0.0) MIXING_PROCESS_TYPE= AREA_AVERAGE MARKER_MIXINGPLANE= (outmix, inmix) +TURBO_INTERFACE_KIND= (MIXING_PLANE) MARKER_PERIODIC= (periodic1, periodic2, 0.0, 0.0, 0.0, 0.0, 0.0, 10.29, 0.0, 0.0, 0.0, periodic3, periodic4, 0.0, 0.0, 0.0, 0.0, 0.0, 8.78, 0.0, 0.0, 0.0) % % ------------------------ SURFACES IDENTIFICATION ----------------------------% From 42abd3f1fb3624c1e551e9659690b0388ed3d24c Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 13 Feb 2024 16:53:37 +0000 Subject: [PATCH 05/61] Removing unused variable --- Common/src/CConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 7b68b597e4e..092bd2a0401 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -5548,7 +5548,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { iMarker_Clamped, iMarker_ZoneInterface, iMarker_CHTInterface, iMarker_Load_Dir, iMarker_Disp_Dir, iMarker_Fluid_Load, iMarker_Deform_Mesh, iMarker_Deform_Mesh_Sym_Plane, iMarker_ActDiskInlet, iMarker_ActDiskOutlet, - iMarker_Turbomachinery, iMarker_MixingPlaneInterface, iMarker_TurboInterface; + iMarker_Turbomachinery, iMarker_MixingPlaneInterface; int size = SINGLE_NODE; SU2_MPI::Comm_size(SU2_MPI::GetComm(), &size); From ca911a48841e886efc82f8e41944dd4e6f5dcf07 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 13 Feb 2024 16:57:43 +0000 Subject: [PATCH 06/61] cleanup --- Common/include/CConfig.hpp | 2 -- Common/src/CConfig.cpp | 3 --- 2 files changed, 5 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index ae99f984ce3..5d95e69e015 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -231,7 +231,6 @@ class CConfig { *Marker_PerBound, /*!< \brief Periodic boundary markers. */ *Marker_PerDonor, /*!< \brief Rotationally periodic boundary donor markers. */ *Marker_MixingPlaneInterface, /*!< \brief MixingPlane interface boundary markers. */ - *Marker_TurboInterface, /*!< \breif Turbo interface boundary markers */ *Marker_TurboBoundIn, /*!< \brief Turbomachinery performance boundary markers. */ *Marker_TurboBoundOut, /*!< \brief Turbomachinery performance boundary donor markers. */ *Marker_NearFieldBound, /*!< \brief Near Field boundaries markers. */ @@ -758,7 +757,6 @@ class CConfig { *Marker_CfgFile_Turbomachinery, /*!< \brief Global index for Turbomachinery using the config information. */ *Marker_CfgFile_TurbomachineryFlag, /*!< \brief Global index for Turbomachinery flag using the config information. */ *Marker_CfgFile_MixingPlaneInterface, /*!< \brief Global index for MixingPlane interface using the config information. */ - *Marker_CfgFile_TurboInterface, /*< \breif Global index for turbo interface using the config information */ *Marker_CfgFile_Moving, /*!< \brief Global index for moving surfaces using the config information. */ *Marker_CfgFile_Deform_Mesh, /*!< \brief Global index for deformable markers at the boundary. */ *Marker_CfgFile_Deform_Mesh_Sym_Plane, /*!< \brief Global index for markers with symmetric deformations. */ diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 092bd2a0401..81246ae6463 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -834,7 +834,6 @@ void CConfig::SetPointersNull() { Marker_CfgFile_Turbomachinery = nullptr; Marker_All_Turbomachinery = nullptr; Marker_CfgFile_TurbomachineryFlag = nullptr; Marker_All_TurbomachineryFlag = nullptr; Marker_CfgFile_MixingPlaneInterface = nullptr; Marker_All_MixingPlaneInterface = nullptr; - Marker_CfgFile_TurboInterface = nullptr; Marker_CfgFile_ZoneInterface = nullptr; Marker_CfgFile_Deform_Mesh = nullptr; Marker_All_Deform_Mesh = nullptr; Marker_CfgFile_Deform_Mesh_Sym_Plane = nullptr; Marker_All_Deform_Mesh_Sym_Plane = nullptr; @@ -1035,7 +1034,6 @@ void CConfig::SetPointersNull() { Kind_TurboMachinery = nullptr; Marker_MixingPlaneInterface = nullptr; - Marker_TurboInterface = nullptr; Marker_TurboBoundIn = nullptr; Marker_TurboBoundOut = nullptr; Marker_Giles = nullptr; @@ -5621,7 +5619,6 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { Marker_CfgFile_Turbomachinery = new unsigned short[nMarker_CfgFile] (); Marker_CfgFile_TurbomachineryFlag = new unsigned short[nMarker_CfgFile] (); Marker_CfgFile_MixingPlaneInterface = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_TurboInterface = new unsigned short[nMarker_CfgFile] (); Marker_CfgFile_PyCustom = new unsigned short[nMarker_CfgFile] (); Marker_CfgFile_SobolevBC = new unsigned short[nMarker_CfgFile] (); From 2ff8fcaba49f911824ac3f73f4354c5c2a491f92 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 6 Mar 2024 15:48:18 +0000 Subject: [PATCH 07/61] Implement method based on continuity --- SU2_CFD/include/solvers/CEulerSolver.hpp | 8 +++-- SU2_CFD/src/solvers/CEulerSolver.cpp | 43 +++++++++--------------- 2 files changed, 21 insertions(+), 30 deletions(-) diff --git a/SU2_CFD/include/solvers/CEulerSolver.hpp b/SU2_CFD/include/solvers/CEulerSolver.hpp index bcd4e55b253..6570621568f 100644 --- a/SU2_CFD/include/solvers/CEulerSolver.hpp +++ b/SU2_CFD/include/solvers/CEulerSolver.hpp @@ -139,6 +139,8 @@ class CEulerSolver : public CFVMFlowSolverBase AverageMassFlowRate; + vector AverageMomentumThrust; + vector AveragePressureForce; su2activematrix DensityIn; su2activematrix PressureIn; @@ -1197,9 +1199,9 @@ class CEulerSolver : public CFVMFlowSolverBaseval_marker */ - inline su2double GetAverageMassFlowRate(unsigned short valMarker) const final { - return AverageMassFlowRate[valMarker]; - } + //inline su2double GetAverageMassFlowRate(unsigned short valMarker) const final { + // return AverageMassFlowRate[valMarker]; + //} /*! * \brief Provide the average pressure at the boundary of interest. diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index dae32f75e30..95305460d50 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -234,6 +234,8 @@ CEulerSolver::CEulerSolver(CGeometry *geometry, CConfig *config, /*--- Turbomachinery simulation ---*/ AverageMassFlowRate.resize(nMarker); + AverageMomentumThrust.resize(nMarker); + AveragePressureForce.resize(nMarker); /*--- Read farfield conditions from config ---*/ @@ -284,6 +286,8 @@ CEulerSolver::CEulerSolver(CGeometry *geometry, CConfig *config, Exhaust_Area[iMarker] = 0.0; AverageMassFlowRate[iMarker] = 0.0; + AverageMomentumThrust[iMarker] = 0.0; + AveragePressureForce[iMarker] = 0.0; } /*--- Initialize the solution to the far-field state everywhere. ---*/ @@ -6504,13 +6508,7 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu Pressure_e /= config->GetPressure_Ref(); /* --- Compute avg characteristic jump --- */ - if (nDim == 2){ - c_avg[3] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); - } - else - { - c_avg[4] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); - } + c_avg[nDim + 1] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); break; case STATIC_PRESSURE_1D: @@ -6518,13 +6516,7 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu Pressure_e /= config->GetPressure_Ref(); /* --- Compute avg characteristic jump --- */ - if (nDim == 2){ - c_avg[3] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); - } - else - { - c_avg[4] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); - } + c_avg[nDim + 1] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); break; case RADIAL_EQUILIBRIUM: @@ -6539,17 +6531,11 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu auto const MassFlowRate_e = config->GetGiles_Var1(Marker_Tag); auto const relFacMassFlowRate = config->GetGiles_Var2(Marker_Tag); - Pressure_e = AveragePressure[val_marker][nSpanWiseSections]+relFacMassFlowRate*(AverageMassFlowRate[val_marker]-MassFlowRate_e); - + auto const deltam = 1 - MassFlowRate_e/AverageMassFlowRate[val_marker]; + Pressure_e = AverageMomentumThrust[val_marker]*deltam+AveragePressureForce[val_marker]; - /* --- Compute avg characteristic jump --- */ - if (nDim == 2){ - c_avg[3] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); - } - else - { - c_avg[4] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); - } + /*--- Compute avg characteristic jump ---*/ + c_avg[nDim + 1] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); break; } @@ -9358,9 +9344,9 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC break; } /*--- Store averaged value of mass flow rate over the prescribed boundary ---*/ - if (iSpan == nSpanWiseSections){ - AverageMassFlowRate[iMarker] = TotalFluxes[0]; - } + //if (iSpan == nSpanWiseSections){ + // AverageMassFlowRate[iMarker] = TotalFluxes[0]; + //} AverageDensity[iMarker][iSpan] = avgDensity; AveragePressure[iMarker][iSpan] = avgPressure; if ((average_process == MIXEDOUT) && !belowMachLimit) { @@ -9424,6 +9410,9 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC } else { ComputeTurboVelocity(avgVelocity, AverageTurboNormal , TurboVel, marker_flag, config->GetKind_TurboMachinery(iZone)); } + AveragePressureForce[iMarker] = AveragePressure[iMarker][iSpan]; + AverageMassFlowRate[iMarker] = TotalFluxes[0]; + AverageMomentumThrust[iMarker] = TotalFluxes[0]*TurboVel[0]; } } } // iMarkerTP From c66f7ad2bfc2bb7f9f7bb1314766924574640ad5 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 6 Mar 2024 15:50:20 +0000 Subject: [PATCH 08/61] Change machine performance variable names --- SU2_CFD/src/output/CFlowOutput.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SU2_CFD/src/output/CFlowOutput.cpp b/SU2_CFD/src/output/CFlowOutput.cpp index 5ed2862922a..58de17e2775 100644 --- a/SU2_CFD/src/output/CFlowOutput.cpp +++ b/SU2_CFD/src/output/CFlowOutput.cpp @@ -4078,9 +4078,9 @@ void CFlowOutput::AddTurboOutput(unsigned short nZone){ } //Adds turbomachinery machine performance variables AddHistoryOutput("EntropyGeneration", "EntropyGen", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine entropy generation", HistoryFieldType::DEFAULT); - AddHistoryOutput("EulerianWork", "EulerianWork", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine entropy generation", HistoryFieldType::DEFAULT); - AddHistoryOutput("TotalStaticEfficiency", "TotStaticEff", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine entropy generation", HistoryFieldType::DEFAULT); - AddHistoryOutput("TotalTotalEfficiency", "TotTotEff", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine entropy generation", HistoryFieldType::DEFAULT); - AddHistoryOutput("PressureRatioTS", "PRTS", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine entropy generation", HistoryFieldType::DEFAULT); - AddHistoryOutput("PressureRatioTT", "PRTT", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine entropy generation", HistoryFieldType::DEFAULT); + AddHistoryOutput("EulerianWork", "EulerianWork", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine Eulerian work", HistoryFieldType::DEFAULT); + AddHistoryOutput("TotalStaticEfficiency", "TotStaticEff", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine total-to-static efficiency", HistoryFieldType::DEFAULT); + AddHistoryOutput("TotalTotalEfficiency", "TotTotEff", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine total-to-total efficiency", HistoryFieldType::DEFAULT); + AddHistoryOutput("PressureRatioTS", "PRTS", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine total-to-static pressure ratio", HistoryFieldType::DEFAULT); + AddHistoryOutput("PressureRatioTT", "PRTT", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine total-to-toal pressure ratio", HistoryFieldType::DEFAULT); } From 5852f8c4af13ea2d944468808edefbdb8d54db6e Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 6 Mar 2024 16:14:32 +0000 Subject: [PATCH 09/61] Unused var --- SU2_CFD/src/solvers/CEulerSolver.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index 95305460d50..3fd6cbe3752 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -6529,8 +6529,6 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu case MASS_FLOW_OUTLET: auto const MassFlowRate_e = config->GetGiles_Var1(Marker_Tag); - auto const relFacMassFlowRate = config->GetGiles_Var2(Marker_Tag); - auto const deltam = 1 - MassFlowRate_e/AverageMassFlowRate[val_marker]; Pressure_e = AverageMomentumThrust[val_marker]*deltam+AveragePressureForce[val_marker]; From b7fe75717d7dbe42445f68ce10286f31dcc11e17 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 19 Mar 2024 16:52:13 +0000 Subject: [PATCH 10/61] Fix in mass flow outlet calculation --- SU2_CFD/src/solvers/CEulerSolver.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index 3fd6cbe3752..eeae8d30c3b 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -9085,7 +9085,7 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC const auto nSpanWiseSections = config->GetnSpanWiseSections(); for (auto iSpan= 0; iSpan < nSpanWiseSections + 1; iSpan++){ - su2double TotalDensity{0}, TotalPressure{0}, TotalNu{0}, TotalOmega{0}, TotalKine{0}, TotalVelocity[MAXNDIM], + su2double TotalDensity{0}, TotalPressure{0}, TotalNu{0}, TotalOmega{0}, TotalKine{0}, TotalVelocity[MAXNDIM], TotalMomentumThrust{0}, TotalAreaDensity{0}, TotalAreaPressure{0}, TotalAreaNu{0}, TotalAreaOmega{0}, TotalAreaKine{0}, TotalAreaVelocity[MAXNDIM], TotalMassDensity{0}, TotalMassPressure{0}, TotalMassNu{0}, TotalMassOmega{0}, TotalMassKine{0}, TotalMassVelocity[MAXNDIM]; @@ -9127,7 +9127,8 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC TotalMassPressure += Area*(Density*TurboVelocity[0] )*Pressure; TotalMassDensity += Area*(Density*TurboVelocity[0] )*Density; - + TotalMomentumThrust += Area*(Density*TurboVelocity[0]*TurboVelocity[0]); + for (auto iDim = 0u; iDim < nDim; iDim++) { TotalVelocity[iDim] += Velocity[iDim]; TotalAreaVelocity[iDim] += Area*Velocity[iDim]; @@ -9205,6 +9206,7 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC TotalAreaPressure = Allreduce(TotalAreaPressure); TotalMassDensity = Allreduce(TotalMassDensity); TotalMassPressure = Allreduce(TotalMassPressure); + TotalMomentumThrust = Allreduce(TotalMomentumThrust); TotalNu = Allreduce(TotalNu); TotalKine = Allreduce(TotalKine); @@ -9251,7 +9253,7 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC /*--- Compute the averaged value for the boundary of interest for the span of interest ---*/ const bool belowMachLimit = (abs(MachTest)< config->GetAverageMachLimit()); - su2double avgDensity{0}, avgPressure{0}, avgKine{0}, avgOmega{0}, avgNu{0}, + su2double avgDensity{0}, avgPressure{0}, avgKine{0}, avgOmega{0}, avgNu{0}, avgMomThrust{0}, avgVelocity[MAXNDIM] = {0}; for (auto iVar = 0u; iVarGetKind_TurboMachinery(iZone)); } - AveragePressureForce[iMarker] = AveragePressure[iMarker][iSpan]; - AverageMassFlowRate[iMarker] = TotalFluxes[0]; - AverageMomentumThrust[iMarker] = TotalFluxes[0]*TurboVel[0]; } } } // iMarkerTP From b253dc0c5ac99bb84b991742efadd123596c0436 Mon Sep 17 00:00:00 2001 From: joshkellyjak Date: Wed, 8 May 2024 12:40:44 +0100 Subject: [PATCH 11/61] Revert to previous 'dampning' method --- SU2_CFD/include/solvers/CEulerSolver.hpp | 2 -- SU2_CFD/src/solvers/CEulerSolver.cpp | 34 ++++++++++++------------ 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/SU2_CFD/include/solvers/CEulerSolver.hpp b/SU2_CFD/include/solvers/CEulerSolver.hpp index 0b9aee94399..ee3d0efd2d9 100644 --- a/SU2_CFD/include/solvers/CEulerSolver.hpp +++ b/SU2_CFD/include/solvers/CEulerSolver.hpp @@ -139,8 +139,6 @@ class CEulerSolver : public CFVMFlowSolverBase AverageMassFlowRate; - vector AverageMomentumThrust; - vector AveragePressureForce; su2activematrix DensityIn; su2activematrix PressureIn; diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index 44d68beeedc..804edc94ff7 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -6437,11 +6437,18 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu case MASS_FLOW_OUTLET: auto const MassFlowRate_e = config->GetGiles_Var1(Marker_Tag); - auto const deltam = 1 - MassFlowRate_e/AverageMassFlowRate[val_marker]; - Pressure_e = AverageMomentumThrust[val_marker]*deltam+AveragePressureForce[val_marker]; + auto const relFacMassFlowRate = config->GetGiles_Var2(Marker_Tag); + + Pressure_e = AveragePressure[val_marker][nSpanWiseSections]+relFacMassFlowRate*(AverageMassFlowRate[val_marker]-MassFlowRate_e); - /*--- Compute avg characteristic jump ---*/ - c_avg[nDim + 1] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); + /* --- Compute avg characteristic jump --- */ + if (nDim == 2){ + c_avg[3] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); + } + else + { + c_avg[4] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); + } break; } @@ -8945,7 +8952,7 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC const auto nSpanWiseSections = config->GetnSpanWiseSections(); for (auto iSpan= 0; iSpan < nSpanWiseSections + 1; iSpan++){ - su2double TotalDensity{0}, TotalPressure{0}, TotalNu{0}, TotalOmega{0}, TotalKine{0}, TotalVelocity[MAXNDIM], TotalMomentumThrust{0}, + su2double TotalDensity{0}, TotalPressure{0}, TotalNu{0}, TotalOmega{0}, TotalKine{0}, TotalVelocity[MAXNDIM], TotalAreaDensity{0}, TotalAreaPressure{0}, TotalAreaNu{0}, TotalAreaOmega{0}, TotalAreaKine{0}, TotalAreaVelocity[MAXNDIM], TotalMassDensity{0}, TotalMassPressure{0}, TotalMassNu{0}, TotalMassOmega{0}, TotalMassKine{0}, TotalMassVelocity[MAXNDIM]; @@ -8986,8 +8993,7 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC TotalAreaDensity += Area*Density; TotalMassPressure += Area*(Density*TurboVelocity[0] )*Pressure; - TotalMassDensity += Area*(Density*TurboVelocity[0] )*Density; - TotalMomentumThrust += Area*(Density*TurboVelocity[0]*TurboVelocity[0]); + TotalMassDensity += Area*(Density*TurboVelocity[0] )*Density; for (auto iDim = 0u; iDim < nDim; iDim++) { TotalVelocity[iDim] += Velocity[iDim]; @@ -9066,7 +9072,6 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC TotalAreaPressure = Allreduce(TotalAreaPressure); TotalMassDensity = Allreduce(TotalMassDensity); TotalMassPressure = Allreduce(TotalMassPressure); - TotalMomentumThrust = Allreduce(TotalMomentumThrust); TotalNu = Allreduce(TotalNu); TotalKine = Allreduce(TotalKine); @@ -9113,8 +9118,7 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC /*--- Compute the averaged value for the boundary of interest for the span of interest ---*/ const bool belowMachLimit = (abs(MachTest)< config->GetAverageMachLimit()); - su2double avgDensity{0}, avgPressure{0}, avgKine{0}, avgOmega{0}, avgNu{0}, avgMomThrust{0}, - avgVelocity[MAXNDIM] = {0}; + su2double avgDensity{0}, avgPressure{0}, avgKine{0}, avgOmega{0}, avgNu{0}, avgVelocity[MAXNDIM] = {0}; for (auto iVar = 0u; iVar Date: Wed, 8 May 2024 12:41:59 +0100 Subject: [PATCH 12/61] Revert "Revert to previous 'dampning' method" This reverts commit b253dc0c5ac99bb84b991742efadd123596c0436. --- SU2_CFD/include/solvers/CEulerSolver.hpp | 2 ++ SU2_CFD/src/solvers/CEulerSolver.cpp | 34 ++++++++++++------------ 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/SU2_CFD/include/solvers/CEulerSolver.hpp b/SU2_CFD/include/solvers/CEulerSolver.hpp index ee3d0efd2d9..0b9aee94399 100644 --- a/SU2_CFD/include/solvers/CEulerSolver.hpp +++ b/SU2_CFD/include/solvers/CEulerSolver.hpp @@ -139,6 +139,8 @@ class CEulerSolver : public CFVMFlowSolverBase AverageMassFlowRate; + vector AverageMomentumThrust; + vector AveragePressureForce; su2activematrix DensityIn; su2activematrix PressureIn; diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index 804edc94ff7..44d68beeedc 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -6437,18 +6437,11 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu case MASS_FLOW_OUTLET: auto const MassFlowRate_e = config->GetGiles_Var1(Marker_Tag); - auto const relFacMassFlowRate = config->GetGiles_Var2(Marker_Tag); - - Pressure_e = AveragePressure[val_marker][nSpanWiseSections]+relFacMassFlowRate*(AverageMassFlowRate[val_marker]-MassFlowRate_e); + auto const deltam = 1 - MassFlowRate_e/AverageMassFlowRate[val_marker]; + Pressure_e = AverageMomentumThrust[val_marker]*deltam+AveragePressureForce[val_marker]; - /* --- Compute avg characteristic jump --- */ - if (nDim == 2){ - c_avg[3] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); - } - else - { - c_avg[4] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); - } + /*--- Compute avg characteristic jump ---*/ + c_avg[nDim + 1] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); break; } @@ -8952,7 +8945,7 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC const auto nSpanWiseSections = config->GetnSpanWiseSections(); for (auto iSpan= 0; iSpan < nSpanWiseSections + 1; iSpan++){ - su2double TotalDensity{0}, TotalPressure{0}, TotalNu{0}, TotalOmega{0}, TotalKine{0}, TotalVelocity[MAXNDIM], + su2double TotalDensity{0}, TotalPressure{0}, TotalNu{0}, TotalOmega{0}, TotalKine{0}, TotalVelocity[MAXNDIM], TotalMomentumThrust{0}, TotalAreaDensity{0}, TotalAreaPressure{0}, TotalAreaNu{0}, TotalAreaOmega{0}, TotalAreaKine{0}, TotalAreaVelocity[MAXNDIM], TotalMassDensity{0}, TotalMassPressure{0}, TotalMassNu{0}, TotalMassOmega{0}, TotalMassKine{0}, TotalMassVelocity[MAXNDIM]; @@ -8993,7 +8986,8 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC TotalAreaDensity += Area*Density; TotalMassPressure += Area*(Density*TurboVelocity[0] )*Pressure; - TotalMassDensity += Area*(Density*TurboVelocity[0] )*Density; + TotalMassDensity += Area*(Density*TurboVelocity[0] )*Density; + TotalMomentumThrust += Area*(Density*TurboVelocity[0]*TurboVelocity[0]); for (auto iDim = 0u; iDim < nDim; iDim++) { TotalVelocity[iDim] += Velocity[iDim]; @@ -9072,6 +9066,7 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC TotalAreaPressure = Allreduce(TotalAreaPressure); TotalMassDensity = Allreduce(TotalMassDensity); TotalMassPressure = Allreduce(TotalMassPressure); + TotalMomentumThrust = Allreduce(TotalMomentumThrust); TotalNu = Allreduce(TotalNu); TotalKine = Allreduce(TotalKine); @@ -9118,7 +9113,8 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC /*--- Compute the averaged value for the boundary of interest for the span of interest ---*/ const bool belowMachLimit = (abs(MachTest)< config->GetAverageMachLimit()); - su2double avgDensity{0}, avgPressure{0}, avgKine{0}, avgOmega{0}, avgNu{0}, avgVelocity[MAXNDIM] = {0}; + su2double avgDensity{0}, avgPressure{0}, avgKine{0}, avgOmega{0}, avgNu{0}, avgMomThrust{0}, + avgVelocity[MAXNDIM] = {0}; for (auto iVar = 0u; iVar Date: Wed, 8 May 2024 13:27:52 +0100 Subject: [PATCH 13/61] revert to previous 'dampning' method --- SU2_CFD/include/solvers/CEulerSolver.hpp | 2 -- SU2_CFD/src/solvers/CEulerSolver.cpp | 10 ++-------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/SU2_CFD/include/solvers/CEulerSolver.hpp b/SU2_CFD/include/solvers/CEulerSolver.hpp index 0b9aee94399..ee3d0efd2d9 100644 --- a/SU2_CFD/include/solvers/CEulerSolver.hpp +++ b/SU2_CFD/include/solvers/CEulerSolver.hpp @@ -139,8 +139,6 @@ class CEulerSolver : public CFVMFlowSolverBase AverageMassFlowRate; - vector AverageMomentumThrust; - vector AveragePressureForce; su2activematrix DensityIn; su2activematrix PressureIn; diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index 44d68beeedc..314e3fa1004 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -8987,7 +8987,6 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC TotalMassPressure += Area*(Density*TurboVelocity[0] )*Pressure; TotalMassDensity += Area*(Density*TurboVelocity[0] )*Density; - TotalMomentumThrust += Area*(Density*TurboVelocity[0]*TurboVelocity[0]); for (auto iDim = 0u; iDim < nDim; iDim++) { TotalVelocity[iDim] += Velocity[iDim]; @@ -9066,7 +9065,6 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC TotalAreaPressure = Allreduce(TotalAreaPressure); TotalMassDensity = Allreduce(TotalMassDensity); TotalMassPressure = Allreduce(TotalMassPressure); - TotalMomentumThrust = Allreduce(TotalMomentumThrust); TotalNu = Allreduce(TotalNu); TotalKine = Allreduce(TotalKine); @@ -9113,8 +9111,7 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC /*--- Compute the averaged value for the boundary of interest for the span of interest ---*/ const bool belowMachLimit = (abs(MachTest)< config->GetAverageMachLimit()); - su2double avgDensity{0}, avgPressure{0}, avgKine{0}, avgOmega{0}, avgNu{0}, avgMomThrust{0}, - avgVelocity[MAXNDIM] = {0}; + su2double avgDensity{0}, avgPressure{0}, avgKine{0}, avgOmega{0}, avgNu{0}, avgVelocity[MAXNDIM] = {0}; for (auto iVar = 0u; iVar Date: Wed, 8 May 2024 13:32:27 +0100 Subject: [PATCH 14/61] removing some unused vars --- SU2_CFD/src/solvers/CEulerSolver.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index 314e3fa1004..71e15c24938 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -234,8 +234,6 @@ CEulerSolver::CEulerSolver(CGeometry *geometry, CConfig *config, /*--- Turbomachinery simulation ---*/ AverageMassFlowRate.resize(nMarker); - AverageMomentumThrust.resize(nMarker); - AveragePressureForce.resize(nMarker); /*--- Read farfield conditions from config ---*/ @@ -286,8 +284,6 @@ CEulerSolver::CEulerSolver(CGeometry *geometry, CConfig *config, Exhaust_Area[iMarker] = 0.0; AverageMassFlowRate[iMarker] = 0.0; - AverageMomentumThrust[iMarker] = 0.0; - AveragePressureForce[iMarker] = 0.0; } /*--- Initialize the solution to the far-field state everywhere. ---*/ @@ -6437,8 +6433,9 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu case MASS_FLOW_OUTLET: auto const MassFlowRate_e = config->GetGiles_Var1(Marker_Tag); - auto const deltam = 1 - MassFlowRate_e/AverageMassFlowRate[val_marker]; - Pressure_e = AverageMomentumThrust[val_marker]*deltam+AveragePressureForce[val_marker]; + auto const relFacMassFlowRate = config->GetGiles_Var2(Marker_Tag); + + Pressure_e = AveragePressure[val_marker][nSpanWiseSections]+relFacMassFlowRate*(AverageMassFlowRate[val_marker]-MassFlowRate_e); /*--- Compute avg characteristic jump ---*/ c_avg[nDim + 1] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); @@ -8945,7 +8942,7 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC const auto nSpanWiseSections = config->GetnSpanWiseSections(); for (auto iSpan= 0; iSpan < nSpanWiseSections + 1; iSpan++){ - su2double TotalDensity{0}, TotalPressure{0}, TotalNu{0}, TotalOmega{0}, TotalKine{0}, TotalVelocity[MAXNDIM], TotalMomentumThrust{0}, + su2double TotalDensity{0}, TotalPressure{0}, TotalNu{0}, TotalOmega{0}, TotalKine{0}, TotalVelocity[MAXNDIM], TotalAreaDensity{0}, TotalAreaPressure{0}, TotalAreaNu{0}, TotalAreaOmega{0}, TotalAreaKine{0}, TotalAreaVelocity[MAXNDIM], TotalMassDensity{0}, TotalMassPressure{0}, TotalMassNu{0}, TotalMassOmega{0}, TotalMassKine{0}, TotalMassVelocity[MAXNDIM]; From c8447a6fc56402fd4c86452ee3ecd99986643fc4 Mon Sep 17 00:00:00 2001 From: Ole Burghardt Date: Tue, 2 Jul 2024 10:41:41 +0200 Subject: [PATCH 15/61] Add averaged quantities to recording (those which are used and communicated in the mixing plane). --- SU2_CFD/src/iteration/CDiscAdjFluidIteration.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SU2_CFD/src/iteration/CDiscAdjFluidIteration.cpp b/SU2_CFD/src/iteration/CDiscAdjFluidIteration.cpp index 27173f3357e..24fd1602e6e 100644 --- a/SU2_CFD/src/iteration/CDiscAdjFluidIteration.cpp +++ b/SU2_CFD/src/iteration/CDiscAdjFluidIteration.cpp @@ -471,6 +471,10 @@ void CDiscAdjFluidIteration::SetDependencies(CSolver***** solver, CGeometry**** solvers0[FLOW_SOL]->InitiateComms(geometry0, config[iZone], MPI_QUANTITIES::SOLUTION); solvers0[FLOW_SOL]->CompleteComms(geometry0, config[iZone], MPI_QUANTITIES::SOLUTION); + if (config[iZone]->GetBoolTurbomachinery()) { + solvers0[FLOW_SOL]->TurboAverageProcess(solvers0, geometry0, config[iZone], INFLOW); + solvers0[FLOW_SOL]->TurboAverageProcess(solvers0, geometry0, config[iZone], OUTFLOW); + } if (turbulent && !config[iZone]->GetFrozen_Visc_Disc()) { solvers0[TURB_SOL]->Postprocessing(geometry0, solvers0, config[iZone], MESH_0); From af8b1c188e6aedcd8191ec4e046c94f1c7a52094 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 10 Jul 2024 15:54:41 +0200 Subject: [PATCH 16/61] Changes for comments --- SU2_CFD/include/solvers/CEulerSolver.hpp | 11 +---------- SU2_CFD/src/solvers/CEulerSolver.cpp | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/SU2_CFD/include/solvers/CEulerSolver.hpp b/SU2_CFD/include/solvers/CEulerSolver.hpp index ee3d0efd2d9..0a4280dfc89 100644 --- a/SU2_CFD/include/solvers/CEulerSolver.hpp +++ b/SU2_CFD/include/solvers/CEulerSolver.hpp @@ -138,7 +138,7 @@ class CEulerSolver : public CFVMFlowSolverBase AverageMassFlowRate; + su2activevector AverageMassFlowRate; su2activematrix DensityIn; su2activematrix PressureIn; @@ -1192,15 +1192,6 @@ class CEulerSolver : public CFVMFlowSolverBaseval_marker - */ - //inline su2double GetAverageMassFlowRate(unsigned short valMarker) const final { - // return AverageMassFlowRate[valMarker]; - //} - /*! * \brief Provide the average pressure at the boundary of interest. * \param[in] val_marker - bound marker. diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index 71e15c24938..a45b0413876 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -6435,7 +6435,7 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu auto const MassFlowRate_e = config->GetGiles_Var1(Marker_Tag); auto const relFacMassFlowRate = config->GetGiles_Var2(Marker_Tag); - Pressure_e = AveragePressure[val_marker][nSpanWiseSections]+relFacMassFlowRate*(AverageMassFlowRate[val_marker]-MassFlowRate_e); + Pressure_e = AveragePressure[val_marker][nSpanWiseSections]+relFacMassFlowRate*GetFluidModel()->GetdPdrho_e()*(AverageMassFlowRate[val_marker]-MassFlowRate_e); /*--- Compute avg characteristic jump ---*/ c_avg[nDim + 1] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); From 0fcf22f9648c45eef873f2b36abfe8c553f43062 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 16 Jul 2024 15:39:12 +0200 Subject: [PATCH 17/61] Remove need more multiple specification of boundary markers --- Common/include/CConfig.hpp | 12 +++++++--- Common/include/option_structure.inl | 10 ++++++-- Common/src/CConfig.cpp | 37 +++++++++++++++++++++++------ SU2_CFD/src/drivers/CDriver.cpp | 4 ++-- 4 files changed, 49 insertions(+), 14 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index ec700020f22..5a8d997c95b 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -235,6 +235,7 @@ class CConfig { *Marker_MixingPlaneInterface, /*!< \brief MixingPlane interface boundary markers. */ *Marker_TurboBoundIn, /*!< \brief Turbomachinery performance boundary markers. */ *Marker_TurboBoundOut, /*!< \brief Turbomachinery performance boundary donor markers. */ + *Marker_Turbomachinery, *Marker_NearFieldBound, /*!< \brief Near Field boundaries markers. */ *Marker_Deform_Mesh, /*!< \brief Deformable markers at the boundary. */ *Marker_Deform_Mesh_Sym_Plane, /*!< \brief Marker with symmetric deformation. */ @@ -440,7 +441,7 @@ class CConfig { TURBO_PERF_KIND *Kind_TurboPerf; /*!< \brief Kind of turbomachynery architecture.*/ TURBOMACHINERY_TYPE *Kind_TurboMachinery; - TURBO_INTERFACE_KIND *Kind_TurboInterface; + su2vector Kind_TurboInterface; /* Gradient smoothing options */ su2double SmoothingEps1; /*!< \brief Parameter for the identity part in gradient smoothing. */ @@ -1371,7 +1372,7 @@ class CConfig { su2double** & RotCenter, su2double** & RotAngles, su2double** & Translation); void addTurboPerfOption(const string & name, unsigned short & nMarker_TurboPerf, - string* & Marker_TurboBoundIn, string* & Marker_TurboBoundOut); + string* & Marker_TurboBoundIn, string* & Marker_TurboBoundOut, string* & Marker_Turbomachinery); void addActDiskOption(const string & name, unsigned short & nMarker_ActDiskInlet, unsigned short & nMarker_ActDiskOutlet, string* & Marker_ActDiskInlet, string* & Marker_ActDiskOutlet, @@ -5314,10 +5315,15 @@ class CConfig { TURBO_PERF_KIND GetKind_TurboPerf(unsigned short val_iZone) const { return Kind_TurboPerf[val_iZone]; }; /*! - * \brief get interface kind for two adjacent zones in turbomachinery problem + * \brief gets interface kind for an interface marker in turbomachinery problem * \return interface kind */ TURBO_INTERFACE_KIND GetKind_TurboInterface(unsigned short interfaceIndex) const { return Kind_TurboInterface[interfaceIndex]; } + + /*! + * \brief Sets marker kind for an interface marker in turbomachinery problem + */ + void SetKind_TurboInterface(unsigned short interfaceIndex, TURBO_INTERFACE_KIND TurboInterfaceKind) {Kind_TurboInterface[interfaceIndex] = TurboInterfaceKind ;} /*! * \brief get outlet bounds name for Turbomachinery performance calculation. diff --git a/Common/include/option_structure.inl b/Common/include/option_structure.inl index 955d1531482..645733ccbc1 100644 --- a/Common/include/option_structure.inl +++ b/Common/include/option_structure.inl @@ -1606,11 +1606,12 @@ class COptionTurboPerformance : public COptionBase { unsigned short& size; string*& marker_turboIn; string*& marker_turboOut; + string*& markers; public: COptionTurboPerformance(const string option_field_name, unsigned short& nMarker_TurboPerf, - string*& Marker_TurboBoundIn, string*& Marker_TurboBoundOut) - : size(nMarker_TurboPerf), marker_turboIn(Marker_TurboBoundIn), marker_turboOut(Marker_TurboBoundOut) { + string*& Marker_TurboBoundIn, string*& Marker_TurboBoundOut, string*& Marker_Turbomachinery) + : size(nMarker_TurboPerf), marker_turboIn(Marker_TurboBoundIn), marker_turboOut(Marker_TurboBoundOut), markers(Marker_Turbomachinery) { this->name = option_field_name; } @@ -1637,6 +1638,11 @@ class COptionTurboPerformance : public COptionBase { ; return newstring; } + + this->markers = new string[totalVals]; + for (unsigned long i = 0; i < totalVals; i++) { + this->markers[i].assign(option_value[i]); + } unsigned long nVals = totalVals / mod_num; this->size = nVals; diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 4239c92d820..98138dcfbf5 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -539,10 +539,10 @@ void CConfig::addPeriodicOption(const string & name, unsigned short & nMarker_Pe } void CConfig::addTurboPerfOption(const string & name, unsigned short & nMarker_TurboPerf, - string* & Marker_TurboBoundIn, string* & Marker_TurboBoundOut) { + string* & Marker_TurboBoundIn, string* & Marker_TurboBoundOut, string* & Marker_Turbomachinery) { assert(option_map.find(name) == option_map.end()); all_options.insert(pair(name, true)); - COptionBase* val = new COptionTurboPerformance(name, nMarker_TurboPerf, Marker_TurboBoundIn, Marker_TurboBoundOut); + COptionBase* val = new COptionTurboPerformance(name, nMarker_TurboPerf, Marker_TurboBoundIn, Marker_TurboBoundOut, Marker_Turbomachinery); option_map.insert(pair(name, val)); } @@ -1037,6 +1037,7 @@ void CConfig::SetPointersNull() { Marker_MixingPlaneInterface = nullptr; Marker_TurboBoundIn = nullptr; Marker_TurboBoundOut = nullptr; + Marker_Turbomachinery = nullptr; Marker_Giles = nullptr; Marker_Shroud = nullptr; @@ -1627,8 +1628,8 @@ void CConfig::SetConfig_Options() { addStringListOption("MARKER_MIXINGPLANE_INTERFACE", nMarker_MixingPlaneInterface, Marker_MixingPlaneInterface); /*!\brief TURBULENT_MIXINGPLANE \n DESCRIPTION: Activate mixing plane also for turbulent quantities \ingroup Config*/ addBoolOption("TURBULENT_MIXINGPLANE", turbMixingPlane, false); - /*!\brief MARKER_TURBOMACHINERY \n DESCRIPTION: Identify the inflow and outflow boundaries in which the turbomachinery settings are applied. \ingroup Config*/ - addTurboPerfOption("MARKER_TURBOMACHINERY", nMarker_Turbomachinery, Marker_TurboBoundIn, Marker_TurboBoundOut); + /*!\brief MARKER_TURBOMACHINERY \n DESCRIPTION: Identify the boundaries for which the turbomachinery settings are applied. \ingroup Config*/ + addTurboPerfOption("MARKER_TURBOMACHINERY", nMarker_Turbomachinery, Marker_TurboBoundIn, Marker_TurboBoundOut, Marker_Turbomachinery); /*!\brief NUM_SPANWISE_SECTIONS \n DESCRIPTION: Integer number of spanwise sections to compute 3D turbo BC and Performance for turbomachinery */ addUnsignedShortOption("NUM_SPANWISE_SECTIONS", nSpanWiseSections_User, 1); /*!\brief SPANWISE_KIND \n DESCRIPTION: type of algorithm to identify the span-wise sections at the turbo boundaries. @@ -1640,9 +1641,6 @@ void CConfig::SetConfig_Options() { /*!\brief TURBOMACHINERY_KIND \n DESCRIPTION: types of turbomachynery Performance Calculations. \n OPTIONS: see \link TurboPerfKind_Map \endlink \n Default: TURBINE */ addEnumListOption("TURBO_PERF_KIND", nTurboMachineryKind, Kind_TurboPerf, TurboPerfKind_Map); - /*!\brief TURBO_INTERFACE_KIND \n DESCRIPTION: types of interface to be used between zones in turbomachinery problems - * \n OPTIONS: see \link TurboInterfaceKind_Map \endlink \n DEFAULT: MIXING_PLANE */ - addEnumListOption("TURBO_INTERFACE_KIND", nTurboInterfaces, Kind_TurboInterface, TurboInterfaceKind_Map); /*!\brief MARKER_SHROUD \n DESCRIPTION: markers in which velocity is forced to 0.0. * \n Format: (shroud1, shroud2, ...)*/ addStringListOption("MARKER_SHROUD", nMarker_Shroud, Marker_Shroud); @@ -6011,6 +6009,31 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] = indexMarker; } + /*--- Once we have identified the MixingPlane and Turbomachinery markers + * we next need to determine what type of interface between zones is + * used. It is convenient to do this here as it tidies up the interface + * preproccesing in CDriver ---*/ + nTurboInterfaces = (nMarker_Turbomachinery - 1)*2; //Two markers per zone + Kind_TurboInterface.resize(nTurboInterfaces); + for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { + /*--- Loop over all interface markers ---*/ + for (iMarker_ZoneInterface = 0; iMarker_ZoneInterface < nMarker_ZoneInterface; iMarker_ZoneInterface++) { + /*--- Identify mixing plane markers ---*/ + if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_MixingPlaneInterface[iMarker_ZoneInterface]) { + /*--- Find which list position this marker is in turbomachinery markers ---*/ + const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); + auto target_index = target - Marker_Turbomachinery; + /*--- Assign the correct interface ---*/ + SetKind_TurboInterface(target_index - 1, TURBO_INTERFACE_KIND::MIXING_PLANE); + } + else if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_Fluid_InterfaceBound[iMarker_ZoneInterface]) { + const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); + auto target_index = target - Marker_Turbomachinery; + SetKind_TurboInterface(target_index-1, TURBO_INTERFACE_KIND::FROZEN_ROTOR); + } + } + } + for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { Marker_CfgFile_DV[iMarker_CfgFile] = NO; for (iMarker_DV = 0; iMarker_DV < nMarker_DV; iMarker_DV++) diff --git a/SU2_CFD/src/drivers/CDriver.cpp b/SU2_CFD/src/drivers/CDriver.cpp index a2a40717e5b..ca2892ab5ea 100644 --- a/SU2_CFD/src/drivers/CDriver.cpp +++ b/SU2_CFD/src/drivers/CDriver.cpp @@ -2492,7 +2492,7 @@ void CDriver::InitializeInterface(CConfig **config, CSolver***** solver, CGeomet else if (fluid_donor && fluid_target) { /*--- Interface handling for turbomachinery applications. ---*/ if (config[donor]->GetBoolTurbomachinery()) { - auto interfaceIndex = (donor+target-1)/2; + auto interfaceIndex = donor+target; // Here we assume that the interfaces at each side are the same kind switch (config[donor]->GetKind_TurboInterface(interfaceIndex)) { case TURBO_INTERFACE_KIND::MIXING_PLANE: { interface_type = MIXING_PLANE; @@ -2505,7 +2505,7 @@ void CDriver::InitializeInterface(CConfig **config, CSolver***** solver, CGeomet auto nVar = solver[donor][INST_0][MESH_0][FLOW_SOL]->GetnPrimVar(); interface_type = SLIDING_INTERFACE; interface[donor][target] = new CSlidingInterface(nVar, 0); - if (rank == MASTER_NODE) cout << "using a frozen rotor interface from donor zone " << donor << " to target zone " << target << "." << endl; + if (rank == MASTER_NODE) cout << "using a fluid interface interface from donor zone " << donor << " to target zone " << target << "." << endl; } } } From 68cde3e9df4e3a737a450d0d4e1835937125a528 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 16 Jul 2024 15:43:55 +0200 Subject: [PATCH 18/61] White spaces and defaults options --- Common/include/CConfig.hpp | 2 +- Common/include/option_structure.inl | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 5a8d997c95b..cee4020060d 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -5319,7 +5319,7 @@ class CConfig { * \return interface kind */ TURBO_INTERFACE_KIND GetKind_TurboInterface(unsigned short interfaceIndex) const { return Kind_TurboInterface[interfaceIndex]; } - + /*! * \brief Sets marker kind for an interface marker in turbomachinery problem */ diff --git a/Common/include/option_structure.inl b/Common/include/option_structure.inl index 645733ccbc1..9ceb3567598 100644 --- a/Common/include/option_structure.inl +++ b/Common/include/option_structure.inl @@ -1611,7 +1611,10 @@ class COptionTurboPerformance : public COptionBase { public: COptionTurboPerformance(const string option_field_name, unsigned short& nMarker_TurboPerf, string*& Marker_TurboBoundIn, string*& Marker_TurboBoundOut, string*& Marker_Turbomachinery) - : size(nMarker_TurboPerf), marker_turboIn(Marker_TurboBoundIn), marker_turboOut(Marker_TurboBoundOut), markers(Marker_Turbomachinery) { + : size(nMarker_TurboPerf), + marker_turboIn(Marker_TurboBoundIn), + marker_turboOut(Marker_TurboBoundOut), + markers(Marker_Turbomachinery) { this->name = option_field_name; } @@ -1638,8 +1641,8 @@ class COptionTurboPerformance : public COptionBase { ; return newstring; } - - this->markers = new string[totalVals]; + + this->markers = new string[totalVals]; for (unsigned long i = 0; i < totalVals; i++) { this->markers[i].assign(option_value[i]); } @@ -1660,6 +1663,7 @@ class COptionTurboPerformance : public COptionBase { this->size = 0; this->marker_turboIn = nullptr; this->marker_turboOut = nullptr; + this->markers = nullptr; } }; From 3f20abe6b9adfec9219db6e3e014347f3b519f71 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 16 Jul 2024 17:11:05 +0200 Subject: [PATCH 19/61] Bug fix for when one type of interface is specified --- Common/src/CConfig.cpp | 24 ++++++++++++++---------- SU2_CFD/src/drivers/CDriver.cpp | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 98138dcfbf5..d0b43d3a7cd 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -6019,17 +6019,21 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { /*--- Loop over all interface markers ---*/ for (iMarker_ZoneInterface = 0; iMarker_ZoneInterface < nMarker_ZoneInterface; iMarker_ZoneInterface++) { /*--- Identify mixing plane markers ---*/ - if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_MixingPlaneInterface[iMarker_ZoneInterface]) { - /*--- Find which list position this marker is in turbomachinery markers ---*/ - const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); - auto target_index = target - Marker_Turbomachinery; - /*--- Assign the correct interface ---*/ - SetKind_TurboInterface(target_index - 1, TURBO_INTERFACE_KIND::MIXING_PLANE); + if (Marker_MixingPlaneInterface != nullptr){ // Necessary in cases where no mixing plane interfaces are defined + if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_MixingPlaneInterface[iMarker_ZoneInterface]) { + /*--- Find which list position this marker is in turbomachinery markers ---*/ + const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); + const auto target_index = target - Marker_Turbomachinery; + /*--- Assign the correct interface ---*/ + SetKind_TurboInterface(target_index - 1, TURBO_INTERFACE_KIND::MIXING_PLANE); + } } - else if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_Fluid_InterfaceBound[iMarker_ZoneInterface]) { - const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); - auto target_index = target - Marker_Turbomachinery; - SetKind_TurboInterface(target_index-1, TURBO_INTERFACE_KIND::FROZEN_ROTOR); + if (Marker_Fluid_InterfaceBound != nullptr){ // Necessary in cases where no fluid interfaces are defined + if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_Fluid_InterfaceBound[iMarker_ZoneInterface]) { + const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); + const auto target_index = target - Marker_Turbomachinery; + SetKind_TurboInterface(target_index-1, TURBO_INTERFACE_KIND::FROZEN_ROTOR); + } } } } diff --git a/SU2_CFD/src/drivers/CDriver.cpp b/SU2_CFD/src/drivers/CDriver.cpp index ca2892ab5ea..a4473a10851 100644 --- a/SU2_CFD/src/drivers/CDriver.cpp +++ b/SU2_CFD/src/drivers/CDriver.cpp @@ -2490,7 +2490,7 @@ void CDriver::InitializeInterface(CConfig **config, CSolver***** solver, CGeomet if (rank == MASTER_NODE) cout << "boundary displacements from the structural solver." << endl; } else if (fluid_donor && fluid_target) { - /*--- Interface handling for turbomachinery applications. ---*/ + /*--- Interface handling for turbomachinery applications. ---*/ if (config[donor]->GetBoolTurbomachinery()) { auto interfaceIndex = donor+target; // Here we assume that the interfaces at each side are the same kind switch (config[donor]->GetKind_TurboInterface(interfaceIndex)) { From 250f556cdbd8831c4552ded86a26fa8fa921d777 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 16 Jul 2024 17:16:07 +0200 Subject: [PATCH 20/61] Remove superfluous options from reg test configs --- TestCases/turbomachinery/APU_turbocharger/Jones_restart.cfg | 1 - TestCases/turbomachinery/axial_stage_2D/Axial_stage2D.cfg | 1 - TestCases/turbomachinery/centrifugal_stage/centrifugal_stage.cfg | 1 - 3 files changed, 3 deletions(-) diff --git a/TestCases/turbomachinery/APU_turbocharger/Jones_restart.cfg b/TestCases/turbomachinery/APU_turbocharger/Jones_restart.cfg index a9128d354bb..f8e68d0a1e5 100755 --- a/TestCases/turbomachinery/APU_turbocharger/Jones_restart.cfg +++ b/TestCases/turbomachinery/APU_turbocharger/Jones_restart.cfg @@ -69,7 +69,6 @@ MARKER_TURBOMACHINERY= (INFLOW, OUTMIX, INMIX, OUTFLOW) MARKER_ANALYZE= (OUTFLOW) MARKER_ZONE_INTERFACE= (OUTMIX, INMIX) MARKER_MIXINGPLANE_INTERFACE= (OUTMIX, INMIX) -TURBO_INTERFACE_KIND= (MIXING_PLANE) MARKER_GILES= (INFLOW, TOTAL_CONDITIONS_PT, 413.6E+03, 477.6, 1.0, 0.0, 0.0, 1.0, 0.0, OUTMIX, MIXING_OUT, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.0, INMIX, MIXING_IN, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.0, OUTFLOW, STATIC_PRESSURE_1D, 67.46E+03, 0.0, 0.0, 0.0, 0.0 , 1.0, 0.0) GILES_EXTRA_RELAXFACTOR= (0.05, 0.05) SPATIAL_FOURIER= NO diff --git a/TestCases/turbomachinery/axial_stage_2D/Axial_stage2D.cfg b/TestCases/turbomachinery/axial_stage_2D/Axial_stage2D.cfg index 945d456d3f0..a7ded02ea2e 100755 --- a/TestCases/turbomachinery/axial_stage_2D/Axial_stage2D.cfg +++ b/TestCases/turbomachinery/axial_stage_2D/Axial_stage2D.cfg @@ -72,7 +72,6 @@ MARKER_ANALYZE= (outflow) MARKER_ZONE_INTERFACE= (outmix, inmix) % Mixing-plane interface markers must be specified to activate the transfer of information between zones MARKER_MIXINGPLANE_INTERFACE= (outmix, inmix) -TURBO_INTERFACE_KIND= (MIXING_PLANE) % MARKER_GILES= (inflow, TOTAL_CONDITIONS_PT, 169623.33, 305.76, 1.0, 0.0, 0.0,1.0,1.0, outmix, MIXING_OUT, 0.0, 0.0, 0.0, 0.0, 0.0,1.0,1.0, inmix, MIXING_IN, 0.0, 0.0, 0.0, 0.0, 0.0,1.0, 1.0 outflow, STATIC_PRESSURE, 99741.00, 0.0, 0.0, 0.0, 0.0,1.0,1.0) SPATIAL_FOURIER= NO diff --git a/TestCases/turbomachinery/centrifugal_stage/centrifugal_stage.cfg b/TestCases/turbomachinery/centrifugal_stage/centrifugal_stage.cfg index c8d5ca38091..f3a52180c86 100755 --- a/TestCases/turbomachinery/centrifugal_stage/centrifugal_stage.cfg +++ b/TestCases/turbomachinery/centrifugal_stage/centrifugal_stage.cfg @@ -61,7 +61,6 @@ MARKER_RIEMANN= (inflow, TOTAL_CONDITIONS_PT, 366000.0, 515.00, 0.52101, -0.8535 MARKER_NRBC= (outmix, MIXING_OUT, 0.0, 0.0, 0.0, 0.0, 0.0, inmix, MIXING_IN, 0.0, 0.0, 0.0, 0.0, 0.0, outflow, STATIC_PRESSURE, 95750.0, 0.0, 0.0, 0.0, 0.0) MIXING_PROCESS_TYPE= AREA_AVERAGE MARKER_MIXINGPLANE= (outmix, inmix) -TURBO_INTERFACE_KIND= (MIXING_PLANE) MARKER_PERIODIC= (periodic1, periodic2, 0.0, 0.0, 0.0, 0.0, 0.0, 10.29, 0.0, 0.0, 0.0, periodic3, periodic4, 0.0, 0.0, 0.0, 0.0, 0.0, 8.78, 0.0, 0.0, 0.0) % % ------------------------ SURFACES IDENTIFICATION ----------------------------% From 20aff4ee1011d302eeeebfd45f565f4820592a53 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 16 Jul 2024 18:39:22 +0200 Subject: [PATCH 21/61] Releasing resources --- Common/include/option_structure.inl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Common/include/option_structure.inl b/Common/include/option_structure.inl index 9ceb3567598..ade32853611 100644 --- a/Common/include/option_structure.inl +++ b/Common/include/option_structure.inl @@ -1618,7 +1618,11 @@ class COptionTurboPerformance : public COptionBase { this->name = option_field_name; } - ~COptionTurboPerformance() override{}; + ~COptionTurboPerformance() override{ + delete[] markers; + delete[] marker_turboIn; + delete[] marker_turboOut; + }; string SetValue(const vector& option_value) override { COptionBase::SetValue(option_value); const int mod_num = 2; From 0d6fc3ce932af838ba177564caf7fdb7458db19d Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 16 Jul 2024 18:41:15 +0200 Subject: [PATCH 22/61] formatting --- Common/include/option_structure.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/include/option_structure.inl b/Common/include/option_structure.inl index ade32853611..ea560a6a931 100644 --- a/Common/include/option_structure.inl +++ b/Common/include/option_structure.inl @@ -1618,7 +1618,7 @@ class COptionTurboPerformance : public COptionBase { this->name = option_field_name; } - ~COptionTurboPerformance() override{ + ~COptionTurboPerformance() override { delete[] markers; delete[] marker_turboIn; delete[] marker_turboOut; From 8d3f866c13484eae6842b70ad9199fa413ee2bbf Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 16 Jul 2024 19:25:26 +0200 Subject: [PATCH 23/61] heap after use --- Common/include/option_structure.inl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Common/include/option_structure.inl b/Common/include/option_structure.inl index ea560a6a931..01ed6de9bf9 100644 --- a/Common/include/option_structure.inl +++ b/Common/include/option_structure.inl @@ -1618,11 +1618,7 @@ class COptionTurboPerformance : public COptionBase { this->name = option_field_name; } - ~COptionTurboPerformance() override { - delete[] markers; - delete[] marker_turboIn; - delete[] marker_turboOut; - }; + ~COptionTurboPerformance() override{}; string SetValue(const vector& option_value) override { COptionBase::SetValue(option_value); const int mod_num = 2; @@ -1632,6 +1628,7 @@ class COptionTurboPerformance : public COptionBase { this->size = 0; this->marker_turboIn = nullptr; this->marker_turboOut = nullptr; + this->markers = nullptr; return ""; } @@ -1642,6 +1639,7 @@ class COptionTurboPerformance : public COptionBase { this->size = 0; this->marker_turboIn = nullptr; this->marker_turboOut = nullptr; + this->markers = nullptr; ; return newstring; } From 8b7ca1bf313d2389e822ca81dbdd95564a889826 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 16 Jul 2024 19:35:50 +0200 Subject: [PATCH 24/61] Remove Marker_Turbomachinery --- Common/src/CConfig.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index d0b43d3a7cd..6d0406ad3fb 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -8243,6 +8243,7 @@ CConfig::~CConfig() { delete [] RelaxFactorFourier; delete [] nSpan_iZones; + delete [] Marker_Turbomachinery; delete [] Marker_TurboBoundIn; delete [] Marker_TurboBoundOut; delete [] Marker_Riemann; From eeb7ec785cd7c62b761eb4d82c56e65bfde6e71a Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 16 Jul 2024 23:29:38 +0200 Subject: [PATCH 25/61] fix for asan --- Common/include/CConfig.hpp | 2 +- Common/src/CConfig.cpp | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 694208bc16e..02055db1554 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -235,7 +235,7 @@ class CConfig { *Marker_MixingPlaneInterface, /*!< \brief MixingPlane interface boundary markers. */ *Marker_TurboBoundIn, /*!< \brief Turbomachinery performance boundary markers. */ *Marker_TurboBoundOut, /*!< \brief Turbomachinery performance boundary donor markers. */ - *Marker_Turbomachinery, + *Marker_Turbomachinery, /*!< \breif Turbomachinery markers */ *Marker_NearFieldBound, /*!< \brief Near Field boundaries markers. */ *Marker_Deform_Mesh, /*!< \brief Deformable markers at the boundary. */ *Marker_Deform_Mesh_Sym_Plane, /*!< \brief Marker with symmetric deformation. */ diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 6d0406ad3fb..44f3bcd88dd 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -6004,8 +6004,10 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { unsigned short indexMarker=0; Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] = NO; for (iMarker_MixingPlaneInterface = 0; iMarker_MixingPlaneInterface < nMarker_MixingPlaneInterface; iMarker_MixingPlaneInterface++) - if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_MixingPlaneInterface[iMarker_MixingPlaneInterface]) + if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_MixingPlaneInterface[iMarker_MixingPlaneInterface]) { indexMarker=(int)(iMarker_MixingPlaneInterface/2+1); + Marker_CfgFile_KindBC[iMarker_CfgFile] = MIXING_PLANE; + } Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] = indexMarker; } @@ -6013,23 +6015,23 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { * we next need to determine what type of interface between zones is * used. It is convenient to do this here as it tidies up the interface * preproccesing in CDriver ---*/ - nTurboInterfaces = (nMarker_Turbomachinery - 1)*2; //Two markers per zone - Kind_TurboInterface.resize(nTurboInterfaces); - for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { - /*--- Loop over all interface markers ---*/ - for (iMarker_ZoneInterface = 0; iMarker_ZoneInterface < nMarker_ZoneInterface; iMarker_ZoneInterface++) { + if (nMarker_Turbomachinery != 0) { + nTurboInterfaces = (nMarker_Turbomachinery - 1)*2; //Two markers per zone minus inlet & outlet + Kind_TurboInterface.resize(nTurboInterfaces); + /*--- Loop over all markers ---*/ + for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { /*--- Identify mixing plane markers ---*/ if (Marker_MixingPlaneInterface != nullptr){ // Necessary in cases where no mixing plane interfaces are defined - if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_MixingPlaneInterface[iMarker_ZoneInterface]) { + if (Marker_CfgFile_KindBC[iMarker_CfgFile] == MIXING_PLANE) { /*--- Find which list position this marker is in turbomachinery markers ---*/ const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); const auto target_index = target - Marker_Turbomachinery; /*--- Assign the correct interface ---*/ - SetKind_TurboInterface(target_index - 1, TURBO_INTERFACE_KIND::MIXING_PLANE); + SetKind_TurboInterface(target_index - 1, TURBO_INTERFACE_KIND::MIXING_PLANE); // Need to subtract 1 from index as to not consider the inlet an interface } } if (Marker_Fluid_InterfaceBound != nullptr){ // Necessary in cases where no fluid interfaces are defined - if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_Fluid_InterfaceBound[iMarker_ZoneInterface]) { + if (Marker_CfgFile_KindBC[iMarker_CfgFile] == FLUID_INTERFACE) { const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); const auto target_index = target - Marker_Turbomachinery; SetKind_TurboInterface(target_index-1, TURBO_INTERFACE_KIND::FROZEN_ROTOR); From aac4bab4a1c34d2fecc0c195715b17b5c8a92645 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 17 Jul 2024 11:14:32 +0200 Subject: [PATCH 26/61] Potential fix --- Common/include/option_structure.hpp | 1 + Common/src/CConfig.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index 88cd68678aa..d802d223751 100644 --- a/Common/include/option_structure.hpp +++ b/Common/include/option_structure.hpp @@ -1596,6 +1596,7 @@ enum BC_TYPE { FLUID_INTERFACE = 39, /*!< \brief Domain interface definition. */ DISP_DIR_BOUNDARY = 40, /*!< \brief Boundary displacement definition. */ DAMPER_BOUNDARY = 41, /*!< \brief Damper. */ + MIXING_PLANE_INTERFACE = 42, /*< \breif Mxing plane */ CHT_WALL_INTERFACE = 50, /*!< \brief Domain interface definition. */ SMOLUCHOWSKI_MAXWELL = 55, /*!< \brief Smoluchoski/Maxwell wall boundary condition. */ SEND_RECEIVE = 99, /*!< \brief Boundary send-receive definition. */ diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 44f3bcd88dd..cec11877686 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -5772,7 +5772,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { for (iMarker_Fluid_InterfaceBound = 0; iMarker_Fluid_InterfaceBound < nMarker_Fluid_InterfaceBound; iMarker_Fluid_InterfaceBound++) { Marker_CfgFile_TagBound[iMarker_CfgFile] = Marker_Fluid_InterfaceBound[iMarker_Fluid_InterfaceBound]; - Marker_CfgFile_KindBC[iMarker_CfgFile] = FLUID_INTERFACE; + Marker_CfgFile_KindBC[iMarker_CfgFile] = BC_TYPE::FLUID_INTERFACE; iMarker_CfgFile++; } @@ -6006,7 +6006,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { for (iMarker_MixingPlaneInterface = 0; iMarker_MixingPlaneInterface < nMarker_MixingPlaneInterface; iMarker_MixingPlaneInterface++) if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_MixingPlaneInterface[iMarker_MixingPlaneInterface]) { indexMarker=(int)(iMarker_MixingPlaneInterface/2+1); - Marker_CfgFile_KindBC[iMarker_CfgFile] = MIXING_PLANE; + Marker_CfgFile_KindBC[iMarker_CfgFile] = BC_TYPE::GILES_MIXING_PLANE; } Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] = indexMarker; } @@ -6022,7 +6022,8 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { /*--- Identify mixing plane markers ---*/ if (Marker_MixingPlaneInterface != nullptr){ // Necessary in cases where no mixing plane interfaces are defined - if (Marker_CfgFile_KindBC[iMarker_CfgFile] == MIXING_PLANE) { + if (Marker_CfgFile_KindBC[iMarker_CfgFile] == BC_TYPE::MIXING_PLANE_INTERFACE) { + cout << Marker_CfgFile_KindBC[iMarker_CfgFile] << endl; /*--- Find which list position this marker is in turbomachinery markers ---*/ const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); const auto target_index = target - Marker_Turbomachinery; @@ -6031,7 +6032,8 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { } } if (Marker_Fluid_InterfaceBound != nullptr){ // Necessary in cases where no fluid interfaces are defined - if (Marker_CfgFile_KindBC[iMarker_CfgFile] == FLUID_INTERFACE) { + if (Marker_CfgFile_KindBC[iMarker_CfgFile] == BC_TYPE::FLUID_INTERFACE) { + cout << Marker_CfgFile_KindBC[iMarker_CfgFile] << endl; const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); const auto target_index = target - Marker_Turbomachinery; SetKind_TurboInterface(target_index-1, TURBO_INTERFACE_KIND::FROZEN_ROTOR); From deae2a9815970f14f5bae7e2f7e15447cfab5353 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 17 Jul 2024 11:20:21 +0200 Subject: [PATCH 27/61] a mistake --- Common/src/CConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index cec11877686..f411ce2a537 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -6006,7 +6006,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { for (iMarker_MixingPlaneInterface = 0; iMarker_MixingPlaneInterface < nMarker_MixingPlaneInterface; iMarker_MixingPlaneInterface++) if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_MixingPlaneInterface[iMarker_MixingPlaneInterface]) { indexMarker=(int)(iMarker_MixingPlaneInterface/2+1); - Marker_CfgFile_KindBC[iMarker_CfgFile] = BC_TYPE::GILES_MIXING_PLANE; + Marker_CfgFile_KindBC[iMarker_CfgFile] = BC_TYPE::MIXING_PLANE_INTERFACE; } Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] = indexMarker; } From 3b882220b01b726690f7c8d06c4b3dde9fbd04f8 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 17 Jul 2024 12:05:39 +0200 Subject: [PATCH 28/61] Potential fix --- Common/src/CConfig.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index f411ce2a537..88c0bab5c9e 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -6004,11 +6004,10 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { unsigned short indexMarker=0; Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] = NO; for (iMarker_MixingPlaneInterface = 0; iMarker_MixingPlaneInterface < nMarker_MixingPlaneInterface; iMarker_MixingPlaneInterface++) - if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_MixingPlaneInterface[iMarker_MixingPlaneInterface]) { + if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_MixingPlaneInterface[iMarker_MixingPlaneInterface]) indexMarker=(int)(iMarker_MixingPlaneInterface/2+1); - Marker_CfgFile_KindBC[iMarker_CfgFile] = BC_TYPE::MIXING_PLANE_INTERFACE; - } Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] = indexMarker; + if (indexMarker != 0) Marker_CfgFile_KindBC[iMarker_CfgFile] = BC_TYPE::MIXING_PLANE_INTERFACE; } /*--- Once we have identified the MixingPlane and Turbomachinery markers @@ -6023,7 +6022,6 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { /*--- Identify mixing plane markers ---*/ if (Marker_MixingPlaneInterface != nullptr){ // Necessary in cases where no mixing plane interfaces are defined if (Marker_CfgFile_KindBC[iMarker_CfgFile] == BC_TYPE::MIXING_PLANE_INTERFACE) { - cout << Marker_CfgFile_KindBC[iMarker_CfgFile] << endl; /*--- Find which list position this marker is in turbomachinery markers ---*/ const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); const auto target_index = target - Marker_Turbomachinery; @@ -6033,7 +6031,6 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { } if (Marker_Fluid_InterfaceBound != nullptr){ // Necessary in cases where no fluid interfaces are defined if (Marker_CfgFile_KindBC[iMarker_CfgFile] == BC_TYPE::FLUID_INTERFACE) { - cout << Marker_CfgFile_KindBC[iMarker_CfgFile] << endl; const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); const auto target_index = target - Marker_Turbomachinery; SetKind_TurboInterface(target_index-1, TURBO_INTERFACE_KIND::FROZEN_ROTOR); From 8252f0d59e5e62187a83419b43d62a2e09587c8f Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 17 Jul 2024 12:48:17 +0200 Subject: [PATCH 29/61] Potential fix --- Common/src/CConfig.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 88c0bab5c9e..018aebf295f 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -6007,7 +6007,6 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_MixingPlaneInterface[iMarker_MixingPlaneInterface]) indexMarker=(int)(iMarker_MixingPlaneInterface/2+1); Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] = indexMarker; - if (indexMarker != 0) Marker_CfgFile_KindBC[iMarker_CfgFile] = BC_TYPE::MIXING_PLANE_INTERFACE; } /*--- Once we have identified the MixingPlane and Turbomachinery markers @@ -6021,7 +6020,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { /*--- Identify mixing plane markers ---*/ if (Marker_MixingPlaneInterface != nullptr){ // Necessary in cases where no mixing plane interfaces are defined - if (Marker_CfgFile_KindBC[iMarker_CfgFile] == BC_TYPE::MIXING_PLANE_INTERFACE) { + if (Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] != 0) { //Is a mixing plane /*--- Find which list position this marker is in turbomachinery markers ---*/ const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); const auto target_index = target - Marker_Turbomachinery; @@ -6030,7 +6029,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { } } if (Marker_Fluid_InterfaceBound != nullptr){ // Necessary in cases where no fluid interfaces are defined - if (Marker_CfgFile_KindBC[iMarker_CfgFile] == BC_TYPE::FLUID_INTERFACE) { + if (Marker_CfgFile_KindBC[iMarker_CfgFile] == BC_TYPE::FLUID_INTERFACE) { //Is a fluid interface const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); const auto target_index = target - Marker_Turbomachinery; SetKind_TurboInterface(target_index-1, TURBO_INTERFACE_KIND::FROZEN_ROTOR); From 374abdd46de320523c0af49c020b579d25ddc595 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Fri, 9 Aug 2024 22:17:06 +0200 Subject: [PATCH 30/61] Cleanup Giles BC initial commit --- SU2_CFD/include/solvers/CEulerSolver.hpp | 34 +- SU2_CFD/include/solvers/CSolver.hpp | 32 ++ SU2_CFD/src/solvers/CEulerSolver.cpp | 525 +++++++++-------------- 3 files changed, 259 insertions(+), 332 deletions(-) diff --git a/SU2_CFD/include/solvers/CEulerSolver.hpp b/SU2_CFD/include/solvers/CEulerSolver.hpp index fdd5598278e..342448c6253 100644 --- a/SU2_CFD/include/solvers/CEulerSolver.hpp +++ b/SU2_CFD/include/solvers/CEulerSolver.hpp @@ -589,7 +589,7 @@ class CEulerSolver : public CFVMFlowSolverBaseGetiZone(); - bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); - string Marker_Tag = config->GetMarker_All_TagBound(val_marker); - bool viscous = config->GetViscous(); - unsigned short nSpanWiseSections = geometry->GetnSpanWiseSections(config->GetMarker_All_TurbomachineryFlag(val_marker)); - su2double relfacAvgCfg = config->GetGiles_RelaxFactorAverage(Marker_Tag); - su2double relfacFouCfg = config->GetGiles_RelaxFactorFourier(Marker_Tag); - su2double *Normal; - su2double TwoPiThetaFreq_Pitch, pitch,theta; - const su2double *SpanWiseValues = nullptr, *FlowDir; - su2double spanPercent, extrarelfacAvg = 0.0, deltaSpan = 0.0, relfacAvg, relfacFou, coeffrelfacAvg = 0.0; - unsigned short Turbo_Flag; - - Normal = new su2double[nDim]; - turboNormal = new su2double[nDim]; - UnitNormal = new su2double[nDim]; - turboVelocity = new su2double[nDim]; - Velocity_i = new su2double[nDim]; - Velocity_b = new su2double[nDim]; - - - su2double AverageSoundSpeed, *AverageTurboMach, AverageEntropy, AverageEnthalpy; - AverageTurboMach = new su2double[nDim]; - S_boundary = new su2double[8]; - - su2double AvgMach , *cj, GilesBeta, *delta_c, **R_Matrix, *deltaprim, **R_c_inv,**R_c, alphaIn_BC, gammaIn_BC = 0, - P_Total, T_Total, Enthalpy_BC, Entropy_BC, *R, *c_avg,*dcjs, Beta_inf2, c2js_Re, c3js_Re, cOutjs_Re, avgVel2 =0.0; - - long freq; - - delta_c = new su2double[nVar]; - deltaprim = new su2double[nVar]; - cj = new su2double[nVar]; - R_Matrix = new su2double*[nVar]; - R_c = new su2double*[nVar-1]; - R_c_inv = new su2double*[nVar-1]; - R = new su2double[nVar-1]; - c_avg = new su2double[nVar]; - dcjs = new su2double[nVar]; - - for (iVar = 0; iVar < nVar; iVar++) + /*--- Initialisation of data structures ---*/ + + su2double *Normal = new su2double[nDim], + *turboNormal = new su2double[nDim], + *UnitNormal = new su2double[nDim], + *turboVelocity = new su2double[nDim], + *Velocity_i = new su2double[nDim], + *Velocity_b = new su2double[nDim], + *AverageTurboMach = new su2double[nDim], + *S_boundary = new su2double[8], + *delta_c = new su2double[nVar], + *cj = new su2double[nVar], + **R_Matrix = new su2double*[nVar], + *dcjs = new su2double[nVar], + *c_avg = new su2double[nVar], + **R_c = new su2double*[nVar-1], + **R_c_inv = new su2double*[nVar-1], + *R = new su2double[nVar-1], + *deltaprim = new su2double[nVar]; + + for (auto iVar = 0; iVar < nVar; iVar++) { R_Matrix[iVar] = new su2double[nVar]; c_avg[iVar] = 0.0; dcjs[iVar] = 0.0; } - for (iVar = 0; iVar < nVar-1; iVar++) + for (auto iVar = 0; iVar < nVar-1; iVar++) { R_c[iVar] = new su2double[nVar-1]; R_c_inv[iVar] = new su2double[nVar-1]; } - - complex I, c2ks, c2js, c3ks, c3js, cOutks, cOutjs, Beta_inf; - I = complex(0.0,1.0); + auto const I = complex(0.0,1.0); /*--- Compute coeff for under relaxation of Avg and Fourier Coefficient for hub and shroud---*/ + auto const Marker_Tag = config->GetMarker_All_TagBound(val_marker); + su2double relfacAvgCfg = config->GetGiles_RelaxFactorAverage(Marker_Tag); + + unsigned short nSpanWiseSections = geometry->GetnSpanWiseSections(config->GetMarker_All_TurbomachineryFlag(val_marker)); + + const su2double *SpanWiseValues = nullptr; + + su2double extrarelfacAvg = 0.0, deltaSpan = 0.0, relfacAvg, relfacFou = config->GetGiles_RelaxFactorFourier(Marker_Tag), coeffrelfacAvg = 0.0; + if (nDim == 3){ extrarelfacAvg = config->GetExtraRelFacGiles(0); - spanPercent = config->GetExtraRelFacGiles(1); - Turbo_Flag = config->GetMarker_All_TurbomachineryFlag(val_marker); + auto const spanPercent = config->GetExtraRelFacGiles(1); + auto const Turbo_Flag = config->GetMarker_All_TurbomachineryFlag(val_marker); SpanWiseValues = geometry->GetSpanWiseValue(Turbo_Flag); deltaSpan = SpanWiseValues[nSpanWiseSections-1]*spanPercent; coeffrelfacAvg = (relfacAvgCfg - extrarelfacAvg)/deltaSpan; } - for (iSpan= 0; iSpan < nSpanWiseSections ; iSpan++){ + for (unsigned short iSpan= 0; iSpan < nSpanWiseSections ; iSpan++){ /*--- Compute under relaxation for the Hub and Shroud Avg and Fourier Coefficient---*/ if(nDim == 3){ if(SpanWiseValues[iSpan] <= SpanWiseValues[0] + deltaSpan){ @@ -6202,18 +6181,16 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu } else{ relfacAvg = relfacAvgCfg; - relfacFou = relfacFouCfg; } } else{ { relfacAvg = relfacAvgCfg; - relfacFou = relfacFouCfg; } } GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan]); - AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); + auto AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); AverageTurboMach[0] = AverageTurboVelocity[val_marker][iSpan][0]/AverageSoundSpeed; AverageTurboMach[1] = AverageTurboVelocity[val_marker][iSpan][1]/AverageSoundSpeed; @@ -6221,168 +6198,32 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu AverageTurboMach[1] -= geometry->GetAverageTangGridVel(val_marker,iSpan)/AverageSoundSpeed; } - AvgMach = AverageTurboMach[0]*AverageTurboMach[0] + AverageTurboMach[1]*AverageTurboMach[1]; - - kend = geometry->GetnFreqSpan(val_marker, iSpan); - kend_max = geometry->GetnFreqSpanMax(config->GetMarker_All_TurbomachineryFlag(val_marker)); + auto const kend = geometry->GetnFreqSpan(val_marker, iSpan); + auto const kend_max = geometry->GetnFreqSpanMax(config->GetMarker_All_TurbomachineryFlag(val_marker)); conv_numerics->GetRMatrix(AverageSoundSpeed, AverageDensity[val_marker][iSpan], R_Matrix); + su2double Pressure_e; //Useful to pass by reference + switch(config->GetKind_Data_Giles(Marker_Tag)){ case TOTAL_CONDITIONS_PT: - /*--- Retrieve the specified total conditions for this inlet. ---*/ - P_Total = config->GetGiles_Var1(Marker_Tag); - T_Total = config->GetGiles_Var2(Marker_Tag); - FlowDir = config->GetGiles_FlowDir(Marker_Tag); - alphaIn_BC = atan(FlowDir[1]/FlowDir[0]); - - gammaIn_BC = 0; - if (nDim == 3){ - gammaIn_BC = FlowDir[2]; //atan(FlowDir[2]/FlowDir[0]); - } - - /*--- Non-dim. the inputs---*/ - P_Total /= config->GetPressure_Ref(); - T_Total /= config->GetTemperature_Ref(); - - /* --- Computes the total state --- */ - GetFluidModel()->SetTDState_PT(P_Total, T_Total); - Enthalpy_BC = GetFluidModel()->GetStaticEnergy()+ GetFluidModel()->GetPressure()/GetFluidModel()->GetDensity(); - Entropy_BC = GetFluidModel()->GetEntropy(); - - - /* --- Computes the inverse matrix R_c --- */ - conv_numerics->ComputeResJacobianGiles(GetFluidModel(), AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan], - AverageTurboVelocity[val_marker][iSpan], alphaIn_BC, gammaIn_BC, R_c, R_c_inv); - - GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan]); - AverageEnthalpy = GetFluidModel()->GetStaticEnergy() + AveragePressure[val_marker][iSpan]/AverageDensity[val_marker][iSpan]; - AverageEntropy = GetFluidModel()->GetEntropy(); - - avgVel2 = 0.0; - for (iDim = 0; iDim < nDim; iDim++) avgVel2 += AverageVelocity[val_marker][iSpan][iDim]*AverageVelocity[val_marker][iSpan][iDim]; - if (nDim == 2){ - R[0] = -(AverageEntropy - Entropy_BC); - R[1] = -(AverageTurboVelocity[val_marker][iSpan][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][iSpan][0]); - R[2] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); - } - - else{ - R[0] = -(AverageEntropy - Entropy_BC); - R[1] = -(AverageTurboVelocity[val_marker][iSpan][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][iSpan][0]); - R[2] = -(AverageTurboVelocity[val_marker][iSpan][2] - tan(gammaIn_BC)*AverageTurboVelocity[val_marker][iSpan][0]); - R[3] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); - - } - /* --- Compute the avg component c_avg = R_c^-1 * R --- */ - for (iVar = 0; iVar < nVar-1; iVar++){ - c_avg[iVar] = 0.0; - for (jVar = 0; jVar < nVar-1; jVar++){ - c_avg[iVar] += R_c_inv[iVar][jVar]*R[jVar]; - } - } + BC_Giles_Total_Inlet(conv_numerics, config, val_marker, c_avg, R, R_c_inv, R_c, iSpan, iSpan); break; case TOTAL_CONDITIONS_PT_1D: - /*--- Retrieve the specified total conditions for this inlet. ---*/ - P_Total = config->GetGiles_Var1(Marker_Tag); - T_Total = config->GetGiles_Var2(Marker_Tag); - FlowDir = config->GetGiles_FlowDir(Marker_Tag); - alphaIn_BC = atan(FlowDir[1]/FlowDir[0]); - - gammaIn_BC = 0; - if (nDim == 3){ - // Review definition of angle - gammaIn_BC = FlowDir[2]; //atan(FlowDir[2]/FlowDir[0]); - } - - /*--- Non-dim. the inputs---*/ - P_Total /= config->GetPressure_Ref(); - T_Total /= config->GetTemperature_Ref(); - - /* --- Computes the total state --- */ - GetFluidModel()->SetTDState_PT(P_Total, T_Total); - Enthalpy_BC = GetFluidModel()->GetStaticEnergy()+ GetFluidModel()->GetPressure()/GetFluidModel()->GetDensity(); - Entropy_BC = GetFluidModel()->GetEntropy(); - - - /* --- Computes the inverse matrix R_c --- */ - conv_numerics->ComputeResJacobianGiles(GetFluidModel(), AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan], - AverageTurboVelocity[val_marker][iSpan], alphaIn_BC, gammaIn_BC, R_c, R_c_inv); - - GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][nSpanWiseSections], AverageDensity[val_marker][nSpanWiseSections]); - AverageEnthalpy = GetFluidModel()->GetStaticEnergy() + AveragePressure[val_marker][nSpanWiseSections]/AverageDensity[val_marker][nSpanWiseSections]; - AverageEntropy = GetFluidModel()->GetEntropy(); - - - avgVel2 = 0.0; - for (iDim = 0; iDim < nDim; iDim++) avgVel2 += AverageVelocity[val_marker][iSpan][iDim]*AverageVelocity[val_marker][iSpan][iDim]; - if (nDim == 2){ - R[0] = -(AverageEntropy - Entropy_BC); - R[1] = -(AverageTurboVelocity[val_marker][nSpanWiseSections][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][nSpanWiseSections][0]); - R[2] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); - } - - else{ - R[0] = -(AverageEntropy - Entropy_BC); - R[1] = -(AverageTurboVelocity[val_marker][nSpanWiseSections][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][nSpanWiseSections][0]); - R[2] = -(AverageTurboVelocity[val_marker][nSpanWiseSections][2] - tan(gammaIn_BC)*AverageTurboVelocity[val_marker][nSpanWiseSections][0]); - R[3] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); - - } - /* --- Compute the avg component c_avg = R_c^-1 * R --- */ - for (iVar = 0; iVar < nVar-1; iVar++){ - c_avg[iVar] = 0.0; - for (jVar = 0; jVar < nVar-1; jVar++){ - c_avg[iVar] += R_c_inv[iVar][jVar]*R[jVar]; - } - } + BC_Giles_Total_Inlet(conv_numerics, config, val_marker, c_avg, R, R_c_inv, R_c, iSpan, nSpanWiseSections); break; case MIXING_IN: case MIXING_OUT: - /* --- Compute average jump of primitive at the mixing-plane interface--- */ - deltaprim[0] = ExtAverageDensity[val_marker][iSpan] - AverageDensity[val_marker][iSpan]; - deltaprim[1] = ExtAverageTurboVelocity[val_marker][iSpan][0] - AverageTurboVelocity[val_marker][iSpan][0]; - deltaprim[2] = ExtAverageTurboVelocity[val_marker][iSpan][1] - AverageTurboVelocity[val_marker][iSpan][1]; - if (nDim == 2){ - deltaprim[3] = ExtAveragePressure[val_marker][iSpan] - AveragePressure[val_marker][iSpan]; - } - else - { - deltaprim[3] = ExtAverageTurboVelocity[val_marker][iSpan][2] - AverageTurboVelocity[val_marker][iSpan][2]; - deltaprim[4] = ExtAveragePressure[val_marker][iSpan] - AveragePressure[val_marker][iSpan]; - } - - - /* --- Compute average jump of charachteristic variable at the mixing-plane interface--- */ - GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan]); - AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); - conv_numerics->GetCharJump(AverageSoundSpeed, AverageDensity[val_marker][iSpan], deltaprim, c_avg); + BC_Giles_Mixing(conv_numerics, val_marker, deltaprim, c_avg, iSpan); break; case MIXING_IN_1D: case MIXING_OUT_1D: - /* --- Compute average jump of primitive at the mixing-plane interface--- */ - deltaprim[0] = ExtAverageDensity[val_marker][nSpanWiseSections] - AverageDensity[val_marker][nSpanWiseSections]; - deltaprim[1] = ExtAverageTurboVelocity[val_marker][nSpanWiseSections][0] - AverageTurboVelocity[val_marker][nSpanWiseSections][0]; - deltaprim[2] = ExtAverageTurboVelocity[val_marker][nSpanWiseSections][1] - AverageTurboVelocity[val_marker][nSpanWiseSections][1]; - if (nDim == 2){ - deltaprim[3] = ExtAveragePressure[val_marker][nSpanWiseSections] - AveragePressure[val_marker][nSpanWiseSections]; - } - else - { - deltaprim[3] = ExtAverageTurboVelocity[val_marker][nSpanWiseSections][2] - AverageTurboVelocity[val_marker][nSpanWiseSections][2]; - deltaprim[4] = ExtAveragePressure[val_marker][nSpanWiseSections] - AveragePressure[val_marker][nSpanWiseSections]; - } - - /* --- Compute average jump of charachteristic variable at the mixing-plane interface--- */ - GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][nSpanWiseSections], AverageDensity[val_marker][nSpanWiseSections]); - AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); - conv_numerics->GetCharJump(AverageSoundSpeed, AverageDensity[val_marker][nSpanWiseSections], deltaprim, c_avg); - break; + BC_Giles_Mixing(conv_numerics, val_marker, deltaprim, c_avg, nSpanWiseSections); case STATIC_PRESSURE: @@ -6390,13 +6231,8 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu Pressure_e /= config->GetPressure_Ref(); /* --- Compute avg characteristic jump --- */ - if (nDim == 2){ - c_avg[3] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); - } - else - { - c_avg[4] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); - } + c_avg[nDim+1] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); + break; case STATIC_PRESSURE_1D: @@ -6404,13 +6240,8 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu Pressure_e /= config->GetPressure_Ref(); /* --- Compute avg characteristic jump --- */ - if (nDim == 2){ - c_avg[3] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); - } - else - { - c_avg[4] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); - } + c_avg[nDim+1] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); + break; case RADIAL_EQUILIBRIUM: @@ -6423,67 +6254,66 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu } + auto const iZone = config->GetiZone(); + /*--- Loop over all the vertices on this boundary marker ---*/ SU2_OMP_FOR_DYN(OMP_MIN_SIZE) - for (iVertex = 0; iVertex < geometry->GetnVertexSpan(val_marker,iSpan); iVertex++) { + for (unsigned long iVertex = 0; iVertex < geometry->GetnVertexSpan(val_marker,iSpan); iVertex++) { /*--- using the other vertex information for retrieving some information ---*/ - oldVertex = geometry->turbovertex[val_marker][iSpan][iVertex]->GetOldVertex(); - V_boundary= GetCharacPrimVar(val_marker, oldVertex); + auto oldVertex = geometry->turbovertex[val_marker][iSpan][iVertex]->GetOldVertex(); + auto V_boundary= GetCharacPrimVar(val_marker, oldVertex); /*--- Index of the closest interior node ---*/ - Point_Normal = geometry->vertex[val_marker][oldVertex]->GetNormal_Neighbor(); + auto Point_Normal = geometry->vertex[val_marker][oldVertex]->GetNormal_Neighbor(); /*--- Normal vector for this vertex (negate for outward convention), * this normal is scaled with the area of the face of the element ---*/ geometry->vertex[val_marker][oldVertex]->GetNormal(Normal); - for (iDim = 0; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; + for (unsigned short iDim = 0; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; conv_numerics->SetNormal(Normal); /*--- find the node related to the vertex ---*/ - iPoint = geometry->turbovertex[val_marker][iSpan][iVertex]->GetNode(); + auto iPoint = geometry->turbovertex[val_marker][iSpan][iVertex]->GetNode(); /*--- Normalize Normal vector for this vertex (already for outward convention) ---*/ geometry->turbovertex[val_marker][iSpan][iVertex]->GetNormal(UnitNormal); geometry->turbovertex[val_marker][iSpan][iVertex]->GetTurboNormal(turboNormal); /*--- Retrieve solution at this boundary node ---*/ - V_domain = nodes->GetPrimitive(iPoint); + auto V_domain = nodes->GetPrimitive(iPoint); /*--- Retrieve domain Secondary variables ---*/ - S_domain = nodes->GetSecondary(iPoint); + auto S_domain = nodes->GetSecondary(iPoint); /*--- Compute the internal state u_i ---*/ - Velocity2_i = 0; - for (iDim = 0; iDim < nDim; iDim++) + su2double Velocity2_i = 0; + for (unsigned short iDim = 0; iDim < nDim; iDim++) { Velocity_i[iDim] = nodes->GetVelocity(iPoint,iDim); Velocity2_i += Velocity_i[iDim]*Velocity_i[iDim]; } - Density_i = nodes->GetDensity(iPoint); + auto Density_i = nodes->GetDensity(iPoint); - Energy_i = nodes->GetEnergy(iPoint); - StaticEnergy_i = Energy_i - 0.5*Velocity2_i; + auto Energy_i = nodes->GetEnergy(iPoint); + auto StaticEnergy_i = Energy_i - 0.5*Velocity2_i; GetFluidModel()->SetTDState_rhoe(Density_i, StaticEnergy_i); - Pressure_i = GetFluidModel()->GetPressure(); + auto Pressure_i = GetFluidModel()->GetPressure(); ComputeTurboVelocity(Velocity_i, turboNormal, turboVelocity, config->GetMarker_All_TurbomachineryFlag(val_marker),config->GetKind_TurboMachinery(iZone)); + deltaprim[0] = Density_i - AverageDensity[val_marker][iSpan]; + deltaprim[1] = turboVelocity[0] - AverageTurboVelocity[val_marker][iSpan][0]; + deltaprim[2] = turboVelocity[1] - AverageTurboVelocity[val_marker][iSpan][1]; if (nDim == 2){ - deltaprim[0] = Density_i - AverageDensity[val_marker][iSpan]; - deltaprim[1] = turboVelocity[0] - AverageTurboVelocity[val_marker][iSpan][0]; - deltaprim[2] = turboVelocity[1] - AverageTurboVelocity[val_marker][iSpan][1]; deltaprim[3] = Pressure_i - AveragePressure[val_marker][iSpan]; } else{ - deltaprim[0] = Density_i - AverageDensity[val_marker][iSpan]; - deltaprim[1] = turboVelocity[0] - AverageTurboVelocity[val_marker][iSpan][0]; - deltaprim[2] = turboVelocity[1] - AverageTurboVelocity[val_marker][iSpan][1]; deltaprim[3] = turboVelocity[2] - AverageTurboVelocity[val_marker][iSpan][2]; deltaprim[4] = Pressure_i - AveragePressure[val_marker][iSpan]; } @@ -6493,8 +6323,13 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu conv_numerics->GetCharJump(AverageSoundSpeed, AverageDensity[val_marker][iSpan], deltaprim, cj); - pitch = geometry->GetMaxAngularCoord(val_marker, iSpan) - geometry->GetMinAngularCoord(val_marker,iSpan); - theta = geometry->turbovertex[val_marker][iSpan][iVertex]->GetRelAngularCoord(); + auto pitch = geometry->GetMaxAngularCoord(val_marker, iSpan) - geometry->GetMinAngularCoord(val_marker,iSpan); + auto theta = geometry->turbovertex[val_marker][iSpan][iVertex]->GetRelAngularCoord(); + + auto const AvgMach = AverageTurboMach[0]*AverageTurboMach[0] + AverageTurboMach[1]*AverageTurboMach[1]; + auto Beta_inf= I*complex(sqrt(1.0 - AvgMach)); + su2double TwoPiThetaFreq_Pitch; + long freq; switch(config->GetKind_Data_Giles(Marker_Tag)) { @@ -6504,11 +6339,18 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu case TOTAL_CONDITIONS_PT: case MIXING_IN:case TOTAL_CONDITIONS_PT_1D: case MIXING_IN_1D: if(config->GetSpatialFourier()){ + + /* --- Initial definition of variables ---*/ + auto c2js = complex(0.0,0.0); + auto c3js = complex(0.0,0.0); + auto c2ks = complex(0.0,0.0); + auto c3ks = complex(0.0,0.0); + auto c2js_Re = c2js.real(); + auto c3js_Re = c3js.real(); + su2double Beta_inf2; + if (AvgMach <= 1.0){ - Beta_inf= I*complex(sqrt(1.0 - AvgMach)); - c2js = complex(0.0,0.0); - c3js = complex(0.0,0.0); - for(k=0; k < 2*kend_max+1; k++){ + for(unsigned long k=0; k < 2*kend_max+1; k++){ freq = k - kend_max; if(freq >= (long)(-kend) && freq <= (long)(kend) && AverageTurboMach[0] > config->GetAverageMachLimit()){ TwoPiThetaFreq_Pitch = 2*PI_NUMBER*freq*theta/pitch; @@ -6527,16 +6369,10 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu c2js_Re = c2js.real(); c3js_Re = c3js.real(); - if (nDim == 2){ - dcjs[0] = 0.0 - cj[0]; - dcjs[1] = c2js_Re - cj[1]; - dcjs[2] = c3js_Re - cj[2]; - }else{ - dcjs[0] = 0.0 - cj[0]; - dcjs[1] = c2js_Re - cj[1]; - dcjs[2] = 0.0 - cj[2]; - dcjs[3] = c3js_Re - cj[3]; - } + dcjs[0] = 0.0 - cj[0]; + dcjs[1] = c2js_Re - cj[1]; + dcjs[2] = 0.0 - cj[2]; + dcjs[nDim] = c3js_Re - cj[nDim]; // Overwrites previous value in 2D case }else{ if (AverageTurboVelocity[val_marker][iSpan][1] >= 0.0){ @@ -6544,40 +6380,21 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu }else{ Beta_inf2= sqrt(AvgMach-1.0); } - if (nDim == 2){ - c2js_Re = -cj[3]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - c3js_Re = cj[3]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - c3js_Re *= (Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - }else{ - c2js_Re = -cj[4]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - c3js_Re = cj[4]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - c3js_Re *= (Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - } + c2js_Re = -cj[nDim+1]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); + c3js_Re = cj[nDim+1]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); + c3js_Re *= (Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - if (nDim == 2){ - dcjs[0] = 0.0 - cj[0]; - dcjs[1] = c2js_Re - cj[1]; - dcjs[2] = c3js_Re - cj[2]; - }else{ - dcjs[0] = 0.0 - cj[0]; - dcjs[1] = c2js_Re - cj[1]; - dcjs[2] = 0.0 - cj[2]; - dcjs[3] = c3js_Re - cj[3]; - } - } - } - else{ - if (nDim == 2){ - dcjs[0] = 0.0; - dcjs[1] = 0.0; - dcjs[2] = 0.0; - }else{ - dcjs[0] = 0.0; - dcjs[1] = 0.0; - dcjs[2] = 0.0; - dcjs[3] = 0.0; + dcjs[0] = 0.0 - cj[0]; + dcjs[1] = c2js_Re - cj[1]; + dcjs[2] = 0.0 - cj[2]; + dcjs[nDim] = c3js_Re - cj[nDim]; } + }else{ + dcjs[0] = 0.0; + dcjs[1] = 0.0; + dcjs[2] = 0.0; + dcjs[nDim] = 0.0; } /* --- Impose Inlet BC Reflecting--- */ delta_c[0] = relfacAvg*c_avg[0] + relfacFou*dcjs[0]; @@ -6596,6 +6413,7 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu /* --- implementation of Giles BC---*/ if(config->GetSpatialFourier()){ + su2double GilesBeta, cOutjs_Re; if (AvgMach > 1.0){ /* --- supersonic Giles implementation ---*/ if (AverageTurboVelocity[val_marker][iSpan][1] >= 0.0){ @@ -6619,9 +6437,9 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu }else{ /* --- subsonic Giles implementation ---*/ - Beta_inf= I*complex(sqrt(1.0 - AvgMach)); - cOutjs = complex(0.0,0.0); - for(k=0; k < 2*kend_max+1; k++){ + auto cOutjs = complex(0.0,0.0); + auto cOutks = complex(0.0,0.0); + for(unsigned long k=0; k < 2*kend_max+1; k++){ freq = k - kend_max; if(freq >= (long)(-kend) && freq <= (long)(kend) && AverageTurboMach[0] > config->GetAverageMachLimit()){ TwoPiThetaFreq_Pitch = 2*PI_NUMBER*freq*theta/pitch; @@ -6636,41 +6454,25 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu } cOutjs_Re = cOutjs.real(); - if (nDim == 2){ - dcjs[3] = cOutjs_Re - cj[3]; - } - else{ - dcjs[4] = cOutjs_Re - cj[4]; - } + dcjs[nDim+1] = cOutjs_Re - cj[nDim+1]; } } else{ - if (nDim == 2){ - dcjs[3] = 0.0; - } - else{ - dcjs[4] = 0.0; - } + dcjs[nDim+1] = 0.0; } /* --- Impose Outlet BC Non-Reflecting --- */ delta_c[0] = cj[0]; delta_c[1] = cj[1]; delta_c[2] = cj[2]; - if (nDim == 2){ - delta_c[3] = relfacAvg*c_avg[3] + relfacFou*dcjs[3]; - } - else{ - delta_c[3] = cj[3]; - delta_c[4] = relfacAvg*c_avg[4] + relfacFou*dcjs[4]; - } - + delta_c[3] = cj[3]; + delta_c[nDim+1] = relfacAvg*c_avg[nDim+1] + relfacFou*dcjs[nDim+1]; /*--- Automatically impose supersonic autoflow ---*/ if (abs(AverageTurboMach[0]) > 1.0000){ delta_c[0] = 0.0; delta_c[1] = 0.0; delta_c[2] = 0.0; - delta_c[2] = 0.0; + delta_c[3] = 0.0; if (nDim == 3)delta_c[4] = 0.0; } @@ -6682,31 +6484,25 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu } /*--- Compute primitive jump from characteristic variables ---*/ - for (iVar = 0; iVar < nVar; iVar++) + for (unsigned short iVar = 0; iVar < nVar; iVar++) { deltaprim[iVar]=0.0; - for (jVar = 0; jVar < nVar; jVar++) + for (unsigned short jVar = 0; jVar < nVar; jVar++) { deltaprim[iVar] += R_Matrix[iVar][jVar]*delta_c[jVar]; } } /*--- retrieve boundary variables ---*/ - Density_b = AverageDensity[val_marker][iSpan] + deltaprim[0]; + su2double Density_b = AverageDensity[val_marker][iSpan] + deltaprim[0]; turboVelocity[0] = AverageTurboVelocity[val_marker][iSpan][0] + deltaprim[1]; turboVelocity[1] = AverageTurboVelocity[val_marker][iSpan][1] + deltaprim[2]; - if(nDim == 2){ - Pressure_b = AveragePressure[val_marker][iSpan] + deltaprim[3]; - } - else{ - turboVelocity[2] = AverageTurboVelocity[val_marker][iSpan][2] + deltaprim[3]; - Pressure_b = AveragePressure[val_marker][iSpan] + deltaprim[4]; - } - + turboVelocity[nDim-1] = AverageTurboVelocity[val_marker][iSpan][nDim-1] + deltaprim[nDim]; + su2double Pressure_b = AveragePressure[val_marker][iSpan] + deltaprim[nDim+1]; ComputeBackVelocity(turboVelocity, turboNormal, Velocity_b, config->GetMarker_All_TurbomachineryFlag(val_marker), config->GetKind_TurboMachinery(iZone)); - Velocity2_b = 0.0; - for (iDim = 0; iDim < nDim; iDim++) { + su2double Velocity2_b = 0.0; + for (unsigned short iDim = 0; iDim < nDim; iDim++) { Velocity2_b+= Velocity_b[iDim]*Velocity_b[iDim]; } @@ -6714,20 +6510,20 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu Pressure_b = Pressure_i; Density_b = Density_i; Velocity2_b = 0.0; - for (iDim = 0; iDim < nDim; iDim++) { + for (unsigned short iDim = 0; iDim < nDim; iDim++) { Velocity_b[iDim] = Velocity_i[iDim]; Velocity2_b+= Velocity_b[iDim]*Velocity_b[iDim]; } } GetFluidModel()->SetTDState_Prho(Pressure_b, Density_b); - Energy_b = GetFluidModel()->GetStaticEnergy() + 0.5*Velocity2_b; - Temperature_b= GetFluidModel()->GetTemperature(); - Enthalpy_b = Energy_b + Pressure_b/Density_b; + su2double Energy_b = GetFluidModel()->GetStaticEnergy() + 0.5*Velocity2_b; + su2double Temperature_b= GetFluidModel()->GetTemperature(); + su2double Enthalpy_b = Energy_b + Pressure_b/Density_b; /*--- Primitive variables, using the derived quantities ---*/ V_boundary[0] = Temperature_b; - for (iDim = 0; iDim < nDim; iDim++) + for (unsigned short iDim = 0; iDim < nDim; iDim++) V_boundary[iDim+1] = Velocity_b[iDim]; V_boundary[nDim+1] = Pressure_b; V_boundary[nDim+2] = Density_b; @@ -6755,12 +6551,12 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu LinSysRes.AddBlock(iPoint, residual); /*--- Jacobian contribution for implicit integration ---*/ - if (implicit) + if (config->GetKind_TimeIntScheme() == EULER_IMPLICIT) Jacobian.AddBlock2Diag(iPoint, residual.jacobian_i); /*--- Viscous contribution ---*/ - if (viscous) { + if (config->GetViscous()) { /*--- Set laminar and eddy viscosity at the infinity ---*/ @@ -6814,7 +6610,7 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu /*--- Jacobian contribution for implicit integration ---*/ - if (implicit) + if (config->GetKind_TimeIntScheme() == EULER_IMPLICIT) Jacobian.SubtractBlock2Diag(iPoint, residual.jacobian_i); } @@ -6836,11 +6632,11 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu delete [] delta_c; delete [] deltaprim; delete [] cj; - for (iVar = 0; iVar < nVar; iVar++) + for (unsigned short iVar = 0; iVar < nVar; iVar++) { delete [] R_Matrix[iVar]; } - for (iVar = 0; iVar < nVar-1; iVar++) + for (unsigned short iVar = 0; iVar < nVar-1; iVar++) { delete [] R_c_inv[iVar]; delete [] R_c[iVar]; @@ -6858,6 +6654,73 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu delete [] turboVelocity; } +void CEulerSolver::BC_Giles_Total_Inlet( CNumerics *conv_numerics, CConfig *config, unsigned short val_marker, + su2double *&c_avg, su2double *&R, su2double **&R_c_inv, su2double **&R_c, unsigned short iSpan, unsigned short SpanwisePosition) { + + /*--- Calculates boundry condition for quasi-3D and 1D total boundary conditions ---*/ + + /*--- Retrieve the specified boundary conditions. ---*/ + auto const Marker_Tag = config->GetMarker_All_TagBound(val_marker); + auto P_Total = config->GetGiles_Var1(Marker_Tag); + auto T_Total = config->GetGiles_Var2(Marker_Tag); + auto const FlowDir = config->GetGiles_FlowDir(Marker_Tag); + auto const alphaIn_BC = atan(FlowDir[1]/FlowDir[0]); + + su2double gammaIn_BC = 0; + if (nDim == 3){ + gammaIn_BC = FlowDir[2]; //atan(FlowDir[2]/FlowDir[0]); + } + + /*--- Non-dim. the inputs---*/ + P_Total /= config->GetPressure_Ref(); + T_Total /= config->GetTemperature_Ref(); + + /* --- Computes the total state --- */ + GetFluidModel()->SetTDState_PT(P_Total, T_Total); + auto const Enthalpy_BC = GetFluidModel()->GetStaticEnergy()+ GetFluidModel()->GetPressure()/GetFluidModel()->GetDensity(); + auto const Entropy_BC = GetFluidModel()->GetEntropy(); + + /* --- Computes the inverse matrix R_c --- */ + conv_numerics->ComputeResJacobianGiles(GetFluidModel(), AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan], + AverageTurboVelocity[val_marker][iSpan], alphaIn_BC, gammaIn_BC, R_c, R_c_inv); + + GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][SpanwisePosition], AverageDensity[val_marker][SpanwisePosition]); + auto AverageEnthalpy = GetFluidModel()->GetStaticEnergy() + AveragePressure[val_marker][SpanwisePosition]/AverageDensity[val_marker][SpanwisePosition]; + auto AverageEntropy = GetFluidModel()->GetEntropy(); + + + su2double avgVel2 = 0.0; + for (unsigned short iDim = 0; iDim < nDim; iDim++) avgVel2 += AverageVelocity[val_marker][iSpan][iDim]*AverageVelocity[val_marker][iSpan][iDim]; + + R[0] = -(AverageEntropy - Entropy_BC); + R[1] = -(AverageTurboVelocity[val_marker][SpanwisePosition][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][SpanwisePosition][0]); + R[2] = -(AverageTurboVelocity[val_marker][SpanwisePosition][2] - tan(gammaIn_BC)*AverageTurboVelocity[val_marker][SpanwisePosition][0]); + R[nDim] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); + + /* --- Compute the avg component c_avg = R_c^-1 * R --- */ + for (unsigned short iVar = 0; iVar < nVar-1; iVar++){ + c_avg[iVar] = 0.0; + for (unsigned short jVar = 0; jVar < nVar-1; jVar++){ + c_avg[iVar] += R_c_inv[iVar][jVar]*R[jVar]; + } + } +} + +void CEulerSolver::BC_Giles_Mixing(CNumerics *conv_numerics, unsigned short val_marker, su2double *&deltaprim, su2double *&c_avg, unsigned short SpanwisePosition) { + + /* --- Compute average jump of primitive at the mixing-plane interface--- */ + deltaprim[0] = ExtAverageDensity[val_marker][SpanwisePosition] - AverageDensity[val_marker][SpanwisePosition]; + deltaprim[1] = ExtAverageTurboVelocity[val_marker][SpanwisePosition][0] - AverageTurboVelocity[val_marker][SpanwisePosition][0]; + deltaprim[2] = ExtAverageTurboVelocity[val_marker][SpanwisePosition][1] - AverageTurboVelocity[val_marker][SpanwisePosition][1]; + deltaprim[3] = ExtAverageTurboVelocity[val_marker][SpanwisePosition][2] - AverageTurboVelocity[val_marker][SpanwisePosition][2]; + deltaprim[nDim+1] = ExtAveragePressure[val_marker][SpanwisePosition] - AveragePressure[val_marker][SpanwisePosition]; + + /* --- Compute average jump of charachteristic variable at the mixing-plane interface--- */ + GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][SpanwisePosition], AverageDensity[val_marker][SpanwisePosition]); + auto const AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); + conv_numerics->GetCharJump(AverageSoundSpeed, AverageDensity[val_marker][SpanwisePosition], deltaprim, c_avg); +} + void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) { From e0877eb348100bff1cc3235a7007db64dc4a2e6e Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Fri, 9 Aug 2024 22:27:02 +0200 Subject: [PATCH 31/61] missing break --- SU2_CFD/src/solvers/CEulerSolver.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index da337490163..794c470a6ca 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -6224,6 +6224,7 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu case MIXING_IN_1D: case MIXING_OUT_1D: BC_Giles_Mixing(conv_numerics, val_marker, deltaprim, c_avg, nSpanWiseSections); + break; case STATIC_PRESSURE: From fe95eef6527d34e93a6513e5e14646f4eb81d4d3 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 14 Aug 2024 16:13:47 +0200 Subject: [PATCH 32/61] Cleanup MP implementation initial commit --- SU2_CFD/include/interfaces/CInterface.hpp | 40 +++++++++++------------ SU2_CFD/src/drivers/CMultizoneDriver.cpp | 15 ++++----- SU2_CFD/src/interfaces/CInterface.cpp | 11 +------ 3 files changed, 27 insertions(+), 39 deletions(-) diff --git a/SU2_CFD/include/interfaces/CInterface.hpp b/SU2_CFD/include/interfaces/CInterface.hpp index 9ec0599827e..fcc4600b5aa 100644 --- a/SU2_CFD/include/interfaces/CInterface.hpp +++ b/SU2_CFD/include/interfaces/CInterface.hpp @@ -159,14 +159,14 @@ class CInterface { const CConfig *target_config, unsigned long Marker_Target, unsigned long Vertex_Target, unsigned long Point_Target) = 0; - /*! - * \brief A virtual member. - * \param[in] target_solution - Solution from the target mesh. - * \param[in] target_solution - Solution from the target mesh. - * \param[in] donor_zone - Index of the donorZone. - */ - inline virtual void SetAverageValues(CSolver *donor_solution, CSolver *target_solution, - unsigned short donorZone) { } + // /*! + // * \brief A virtual member. + // * \param[in] target_solution - Solution from the target mesh. + // * \param[in] target_solution - Solution from the target mesh. + // * \param[in] donor_zone - Index of the donorZone. + // */ + // inline virtual void SetAverageValues(CSolver *donor_solution, CSolver *target_solution, + // unsigned short donorZone) { } /*! * \brief A virtual member. @@ -185,6 +185,15 @@ class CInterface { */ inline virtual void SetSpanWiseLevels(const CConfig *donor_config, const CConfig *target_config) { } + /*! + * \brief A virtual member. + * \param[in] target_solution - Solution from the target mesh. + * \param[in] target_solution - Solution from the target mesh. + * \param[in] donor_zone - Index of the donorZone. + */ + inline virtual void SetAverageValues(CSolver *donor_solution, CSolver *target_solution, + unsigned short donorZone) { } + /*! * \brief Transfer pre-processing for the mixing plane inteface. * \param[in] donor_geometry - Geometry of the donor mesh. @@ -207,16 +216,5 @@ class CInterface { void AllgatherAverage(CSolver *donor_solution, CSolver *target_solution, CGeometry *donor_geometry, CGeometry *target_geometry, const CConfig *donor_config, const CConfig *target_config, unsigned short iMarkerInt); - - /*! - * \brief Interpolate data and scatter it into different processors, for matching meshes. - * \param[in] donor_solution - Solution from the donor mesh. - * \param[in] target_solution - Solution from the target mesh. - * \param[in] donor_geometry - Geometry of the donor mesh. - * \param[in] target_geometry - Geometry of the target mesh. - * \param[in] donor_config - Definition of the problem at the donor mesh. - * \param[in] target_config - Definition of the problem at the target mesh. - */ - void GatherAverageValues(CSolver *donor_solution, CSolver *target_solution, unsigned short donorZone); - -}; + +}; \ No newline at end of file diff --git a/SU2_CFD/src/drivers/CMultizoneDriver.cpp b/SU2_CFD/src/drivers/CMultizoneDriver.cpp index 641307e7a19..607e1d989ee 100644 --- a/SU2_CFD/src/drivers/CMultizoneDriver.cpp +++ b/SU2_CFD/src/drivers/CMultizoneDriver.cpp @@ -586,19 +586,18 @@ bool CMultizoneDriver::TransferData(unsigned short donorZone, unsigned short tar { const auto nMarkerInt = config_container[donorZone]->GetnMarker_MixingPlaneInterface() / 2; - /*--- Transfer the average value from the donorZone to the targetZone ---*/ + /*--- Transfer the average value from the donorZone to the targetZone ---*/ for (auto iMarkerInt = 1; iMarkerInt <= nMarkerInt; iMarkerInt++) { interface_container[donorZone][targetZone]->AllgatherAverage(solver_container[donorZone][INST_0][MESH_0][FLOW_SOL],solver_container[targetZone][INST_0][MESH_0][FLOW_SOL], geometry_container[donorZone][INST_0][MESH_0],geometry_container[targetZone][INST_0][MESH_0], config_container[donorZone], config_container[targetZone], iMarkerInt ); } - for (donorZone = 0; donorZone < nZone; donorZone++) { - if (interface_types[donorZone][targetZone]==MIXING_PLANE) { - interface_container[donorZone][targetZone]->GatherAverageValues(solver_container[donorZone][INST_0][MESH_0][FLOW_SOL],solver_container[targetZone][INST_0][MESH_0][FLOW_SOL], donorZone); - geometry_container[targetZone][INST_0][MESH_0]->SetAvgTurboGeoValues(config_container[iZone],geometry_container[iZone][INST_0][MESH_0], iZone); - } - } + /*--- Set average value donorZone->targetZone ---*/ + interface_container[donorZone][targetZone]->SetAverageValues(solver_container[donorZone][INST_0][MESH_0][FLOW_SOL],solver_container[targetZone][INST_0][MESH_0][FLOW_SOL], donorZone); + + /*--- Set average geometrical properties FROM donorZone IN targetZone ---*/ + geometry_container[targetZone][INST_0][MESH_0]->SetAvgTurboGeoValues(config_container[iZone],geometry_container[iZone][INST_0][MESH_0], iZone); break; } @@ -620,7 +619,7 @@ bool CMultizoneDriver::TransferData(unsigned short donorZone, unsigned short tar void CMultizoneDriver::SetTurboPerformance() { for (auto donorZone = 1u; donorZone < nZone; donorZone++) { - interface_container[donorZone][ZONE_0]->GatherAverageValues(solver_container[donorZone][INST_0][MESH_0][FLOW_SOL], + interface_container[donorZone][ZONE_0]->SetAverageValues(solver_container[donorZone][INST_0][MESH_0][FLOW_SOL], solver_container[ZONE_0][INST_0][MESH_0][FLOW_SOL], donorZone); } diff --git a/SU2_CFD/src/interfaces/CInterface.cpp b/SU2_CFD/src/interfaces/CInterface.cpp index 050c948bc1f..d79c2d316d3 100644 --- a/SU2_CFD/src/interfaces/CInterface.cpp +++ b/SU2_CFD/src/interfaces/CInterface.cpp @@ -286,7 +286,7 @@ void CInterface::PreprocessAverage(CGeometry *donor_geometry, CGeometry *target_ for(iSpan = 1; iSpan SpanValuesDonor[jSpan]){ @@ -636,12 +636,3 @@ void CInterface::AllgatherAverage(CSolver *donor_solution, CSolver *target_solut } - -void CInterface::GatherAverageValues(CSolver *donor_solution, CSolver *target_solution, unsigned short donorZone){ - - - /*--- here we made the strong assumption that the mesh zone order - * follows the same order of the turbomachinery markers ---*/ - SetAverageValues(donor_solution, target_solution, donorZone); - -} From 55d4d1679aad1ff4e5daf0a9a2f16b9e324e8010 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Thu, 29 Aug 2024 14:05:04 +0200 Subject: [PATCH 33/61] Modification of some comments --- SU2_CFD/src/drivers/CMultizoneDriver.cpp | 1 + SU2_CFD/src/interfaces/cfd/CMixingPlaneInterface.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/SU2_CFD/src/drivers/CMultizoneDriver.cpp b/SU2_CFD/src/drivers/CMultizoneDriver.cpp index 607e1d989ee..2551427734d 100644 --- a/SU2_CFD/src/drivers/CMultizoneDriver.cpp +++ b/SU2_CFD/src/drivers/CMultizoneDriver.cpp @@ -587,6 +587,7 @@ bool CMultizoneDriver::TransferData(unsigned short donorZone, unsigned short tar const auto nMarkerInt = config_container[donorZone]->GetnMarker_MixingPlaneInterface() / 2; /*--- Transfer the average value from the donorZone to the targetZone ---*/ + /*--- Loops over the mixing planes defined in the config file to find the correct mixing plane for the donor-target combination ---*/ for (auto iMarkerInt = 1; iMarkerInt <= nMarkerInt; iMarkerInt++) { interface_container[donorZone][targetZone]->AllgatherAverage(solver_container[donorZone][INST_0][MESH_0][FLOW_SOL],solver_container[targetZone][INST_0][MESH_0][FLOW_SOL], geometry_container[donorZone][INST_0][MESH_0],geometry_container[targetZone][INST_0][MESH_0], diff --git a/SU2_CFD/src/interfaces/cfd/CMixingPlaneInterface.cpp b/SU2_CFD/src/interfaces/cfd/CMixingPlaneInterface.cpp index f35dc776f9e..a3579422c72 100644 --- a/SU2_CFD/src/interfaces/cfd/CMixingPlaneInterface.cpp +++ b/SU2_CFD/src/interfaces/cfd/CMixingPlaneInterface.cpp @@ -118,7 +118,7 @@ void CMixingPlaneInterface::SetAverageValues(CSolver *donor_solution, CSolver *t unsigned short iSpan; for(iSpan = 0; iSpanSetDensityIn(donor_solution->GetDensityIn(donorZone, iSpan), donorZone, iSpan); target_solution->SetPressureIn(donor_solution->GetPressureIn(donorZone, iSpan), donorZone, iSpan); target_solution->SetTurboVelocityIn(donor_solution->GetTurboVelocityIn(donorZone, iSpan), donorZone, iSpan); @@ -135,4 +135,5 @@ void CMixingPlaneInterface::SetAverageValues(CSolver *donor_solution, CSolver *t target_solution->SetNuOut(donor_solution->GetNuOut(donorZone, iSpan), donorZone, iSpan); } + if (rank == MASTER_NODE) cout << "break" << endl; } From e1eba7930945a976bd8d881fcaafa713c717af54 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 4 Sep 2024 12:29:54 +0200 Subject: [PATCH 34/61] Fixed MP bug added additional outputs --- SU2_CFD/include/output/CTurboOutput.hpp | 10 ++++++++-- SU2_CFD/src/interfaces/CInterface.cpp | 8 +++----- SU2_CFD/src/interfaces/cfd/CMixingPlaneInterface.cpp | 1 - SU2_CFD/src/output/CFlowCompOutput.cpp | 4 ++++ SU2_CFD/src/output/CFlowOutput.cpp | 4 ++++ SU2_CFD/src/output/CTurboOutput.cpp | 11 ++++++++--- 6 files changed, 27 insertions(+), 11 deletions(-) diff --git a/SU2_CFD/include/output/CTurboOutput.hpp b/SU2_CFD/include/output/CTurboOutput.hpp index cc7e2356f07..5a1741530cd 100644 --- a/SU2_CFD/include/output/CTurboOutput.hpp +++ b/SU2_CFD/include/output/CTurboOutput.hpp @@ -87,7 +87,7 @@ class CTurbomachineryCombinedPrimitiveStates { class CTurbomachineryState { private: su2double Density, Pressure, Entropy, Enthalpy, Temperature, TotalTemperature, TotalPressure, TotalEnthalpy; - su2double AbsFlowAngle, FlowAngle, MassFlow, Rothalpy, TotalRelPressure; + su2double AbsFlowAngle, FlowAngle, MassFlow, Rothalpy, TangVelocity, TotalRelPressure; vector Velocity, RelVelocity, Mach, RelMach; su2double Area, Radius; @@ -124,6 +124,8 @@ class CTurbomachineryState { const su2double& GetRothalpy() const { return Rothalpy; } + const su2double& GetTangVelocity() const { return TangVelocity; } + const vector& GetVelocity() const { return Velocity; } const vector& GetMach() const { return Mach; } @@ -207,7 +209,7 @@ class CPropellorBladePerformance : public CTurbomachineryBladePerformance { */ class CTurbomachineryStagePerformance { protected: - su2double TotalStaticEfficiency, TotalTotalEfficiency, NormEntropyGen, TotalStaticPressureRatio, TotalTotalPressureRatio, EulerianWork; + su2double TotalStaticEfficiency, TotalTotalEfficiency, NormEntropyGen, TotalStaticPressureRatio, TotalTotalPressureRatio, EulerianWork, TotalPressureLoss, KineticEnergyLoss; CFluidModel& fluidModel; public: @@ -232,6 +234,10 @@ class CTurbomachineryStagePerformance { su2double GetTotalStaticPressureRatio() const { return TotalStaticPressureRatio; } su2double GetTotalTotalPressureRatio() const { return TotalTotalPressureRatio; } + + su2double GetTotalPressureLoss() const { return TotalPressureLoss; } + + su2double GetKineticEnergyLoss() const { return KineticEnergyLoss; } }; /*! diff --git a/SU2_CFD/src/interfaces/CInterface.cpp b/SU2_CFD/src/interfaces/CInterface.cpp index d79c2d316d3..a17caf6efc5 100644 --- a/SU2_CFD/src/interfaces/CInterface.cpp +++ b/SU2_CFD/src/interfaces/CInterface.cpp @@ -248,7 +248,7 @@ void CInterface::PreprocessAverage(CGeometry *donor_geometry, CGeometry *target_ Donor_Flag= -1; for (int iSize=0; iSize 0.0){ + if(BuffMarkerDonor[iSize] >= 0.0){ Marker_Donor = BuffMarkerDonor[iSize]; Donor_Flag = BuffDonorFlag[iSize]; break; @@ -273,8 +273,8 @@ void CInterface::PreprocessAverage(CGeometry *donor_geometry, CGeometry *target_ break; } /*--- If the tag hasn't matched any tag within the Flow markers ---*/ - Marker_Target = -1; - + Marker_Target = -1; + Target_Flag = -1; } if (Marker_Target != -1 && Marker_Donor != -1){ @@ -633,6 +633,4 @@ void CInterface::AllgatherAverage(CSolver *donor_solution, CSolver *target_solut delete [] avgNuTarget; delete [] avgKineTarget; delete [] avgOmegaTarget; - - } diff --git a/SU2_CFD/src/interfaces/cfd/CMixingPlaneInterface.cpp b/SU2_CFD/src/interfaces/cfd/CMixingPlaneInterface.cpp index a3579422c72..d1bbcf2ff0b 100644 --- a/SU2_CFD/src/interfaces/cfd/CMixingPlaneInterface.cpp +++ b/SU2_CFD/src/interfaces/cfd/CMixingPlaneInterface.cpp @@ -135,5 +135,4 @@ void CMixingPlaneInterface::SetAverageValues(CSolver *donor_solution, CSolver *t target_solution->SetNuOut(donor_solution->GetNuOut(donorZone, iSpan), donorZone, iSpan); } - if (rank == MASTER_NODE) cout << "break" << endl; } diff --git a/SU2_CFD/src/output/CFlowCompOutput.cpp b/SU2_CFD/src/output/CFlowCompOutput.cpp index 1666191e07f..8108765de02 100644 --- a/SU2_CFD/src/output/CFlowCompOutput.cpp +++ b/SU2_CFD/src/output/CFlowCompOutput.cpp @@ -604,6 +604,8 @@ void CFlowCompOutput::LoadTurboHistoryData(std::shared_ptrGetOutletState().GetMachValue()); SetHistoryOutputValue("AbsFlowAngleIn_" + tag.str(), BladePerf->GetInletState().GetAbsFlowAngle()*180/PI_NUMBER); SetHistoryOutputValue("AbsFlowAngleOut_" + tag.str(), BladePerf->GetOutletState().GetAbsFlowAngle()*180/PI_NUMBER); + SetHistoryOutputValue("KineticEnergyLoss_" + tag.str(), BladePerf->GetKineticEnergyLoss()); + SetHistoryOutputValue("TotPressureLoss_" + tag.str(), BladePerf->GetTotalPressureLoss()); } SetHistoryOutputValue("EntropyGeneration", TurboStagePerf->GetNormEntropyGen()*100); SetHistoryOutputValue("EulerianWork", TurboStagePerf->GetEulerianWork()); @@ -611,6 +613,8 @@ void CFlowCompOutput::LoadTurboHistoryData(std::shared_ptrGetTotalTotalEfficiency()*100); SetHistoryOutputValue("PressureRatioTS", TurboStagePerf->GetTotalStaticPressureRatio()); SetHistoryOutputValue("PressureRatioTT", TurboStagePerf->GetTotalTotalPressureRatio()); + SetHistoryOutputValue("KineticEnergyLoss_Stage", TurboStagePerf->GetKineticEnergyLoss()); + SetHistoryOutputValue("TotPressureLoss_Stage", TurboStagePerf->GetTotalPressureLoss()); } void CFlowCompOutput::WriteTurboSpanwisePerformance(std::shared_ptr TurboPerf, CGeometry *geometry, CConfig **config, unsigned short val_iZone) { diff --git a/SU2_CFD/src/output/CFlowOutput.cpp b/SU2_CFD/src/output/CFlowOutput.cpp index b658eb5b1a7..7c7d5632445 100644 --- a/SU2_CFD/src/output/CFlowOutput.cpp +++ b/SU2_CFD/src/output/CFlowOutput.cpp @@ -4078,6 +4078,8 @@ void CFlowOutput::AddTurboOutput(unsigned short nZone){ AddHistoryOutput("MachOut_" + tag, "MachOut_" + tag, ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Total-to-Static efficiency " + tag, HistoryFieldType::DEFAULT); AddHistoryOutput("AbsFlowAngleIn_" + tag, "AbsFlowAngleIn_" + tag, ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Absolute flow angle in " + tag, HistoryFieldType::DEFAULT); AddHistoryOutput("AbsFlowAngleOut_" + tag, "AbsFlowAngleOut_" + tag, ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Absolute flow angle out " + tag, HistoryFieldType::DEFAULT); + AddHistoryOutput("KineticEnergyLoss_" + tag, "KELC_" + tag, ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Blade Kinetic Energy Loss Coefficient", HistoryFieldType::DEFAULT); + AddHistoryOutput("TotPressureLoss_" + tag, "TPLC_" + tag, ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Blade Pressure Loss Coefficient", HistoryFieldType::DEFAULT); } //Adds turbomachinery machine performance variables AddHistoryOutput("EntropyGeneration", "EntropyGen", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine entropy generation", HistoryFieldType::DEFAULT); @@ -4086,4 +4088,6 @@ void CFlowOutput::AddTurboOutput(unsigned short nZone){ AddHistoryOutput("TotalTotalEfficiency", "TotTotEff", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine total-to-total efficiency", HistoryFieldType::DEFAULT); AddHistoryOutput("PressureRatioTS", "PRTS", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine total-to-static pressure ratio", HistoryFieldType::DEFAULT); AddHistoryOutput("PressureRatioTT", "PRTT", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine total-to-toal pressure ratio", HistoryFieldType::DEFAULT); + AddHistoryOutput("KineticEnergyLoss_Stage", "KELC_all", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine Kinetic Energy Loss Coefficient", HistoryFieldType::DEFAULT); + AddHistoryOutput("TotPressureLoss_Stage", "TPLC_all", ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Machine Pressure Loss Coefficient", HistoryFieldType::DEFAULT); } diff --git a/SU2_CFD/src/output/CTurboOutput.cpp b/SU2_CFD/src/output/CTurboOutput.cpp index b0e61f10e25..59430179231 100644 --- a/SU2_CFD/src/output/CTurboOutput.cpp +++ b/SU2_CFD/src/output/CTurboOutput.cpp @@ -60,7 +60,7 @@ void CTurbomachineryState::ComputeState(CFluidModel& fluidModel, const CTurbomac Pressure = primitiveState.GetPressure(); std::vector velocity = primitiveState.GetVelocity(); Velocity.assign(velocity.begin(), velocity.end()); - su2double tangVel = primitiveState.GetTangVelocity(); + TangVelocity = primitiveState.GetTangVelocity(); /*--- Compute static TD quantities ---*/ fluidModel.SetTDState_Prho(Pressure, Density); @@ -81,9 +81,9 @@ void CTurbomachineryState::ComputeState(CFluidModel& fluidModel, const CTurbomac std::for_each(Mach.begin(), Mach.end(), [&](su2double& el) { el /= soundSpeed; }); /*--- Compute relative kinematic quantities ---*/ - su2double tangVel2 = tangVel * tangVel; + su2double tangVel2 = TangVelocity * TangVelocity; RelVelocity.assign(Velocity.begin(), Velocity.end()); - RelVelocity[1] -= tangVel; + RelVelocity[1] -= TangVelocity; su2double relVel2 = GetRelVelocityValue(); FlowAngle = atan(RelVelocity[1] / RelVelocity[0]); RelMach.assign(RelVelocity.begin(), RelVelocity.end()); @@ -244,6 +244,8 @@ void CTurbomachineryStagePerformance::ComputeTurbineStagePerformance(const CTurb fluidModel.SetTDState_Ps(OutState.GetPressure(), InState.GetEntropy()); su2double enthalpyOutIs = fluidModel.GetStaticEnergy() + OutState.GetPressure() / fluidModel.GetDensity(); su2double totEnthalpyOutIs = enthalpyOutIs + 0.5 * OutState.GetVelocityValue() * OutState.GetVelocityValue(); + su2double tangVel = OutState.GetTangVelocity(); + su2double relVelOutIs2 = 2 * (OutState.GetRothalpy() - enthalpyOutIs) + tangVel * tangVel; /*--- Compute turbine stage performance ---*/ NormEntropyGen = (OutState.GetEntropy() - InState.GetEntropy()) / InState.GetEntropy(); @@ -252,6 +254,9 @@ void CTurbomachineryStagePerformance::ComputeTurbineStagePerformance(const CTurb TotalTotalEfficiency = EulerianWork / (InState.GetTotalEnthalpy() - totEnthalpyOutIs); TotalStaticPressureRatio = InState.GetTotalPressure() / OutState.GetPressure(); TotalTotalPressureRatio = InState.GetTotalPressure() / OutState.GetTotalPressure(); + TotalPressureLoss = (InState.GetTotalRelPressure() - OutState.GetTotalRelPressure()) / + (OutState.GetTotalRelPressure() - OutState.GetPressure()); + KineticEnergyLoss = 2 * (OutState.GetEnthalpy() - enthalpyOutIs) / relVelOutIs2; } void CTurbomachineryStagePerformance::ComputeCompressorStagePerformance(const CTurbomachineryState& InState, From 05f9d231bdd407d4b6c450cf88efa077bb094119 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 4 Sep 2024 14:37:35 +0200 Subject: [PATCH 35/61] Revert "Merge remote-tracking branch 'origin/feature_mz_adjoint_for_turbo' into pr/2209" This reverts commit 6b4c180b479bd34e37f9dfb21685d4ef887aaa47, reversing changes made to fd6d5cb5ef52e27ea46cec70168dfbbd602cd238. This was a big mistake! I need to remerge develop after this. --- Common/include/CConfig.hpp | 17 +- Common/include/geometry/CGeometry.hpp | 24 +- .../include/geometry/CMultiGridGeometry.hpp | 3 +- Common/include/geometry/CPhysicalGeometry.hpp | 9 +- Common/include/geometry/dual_grid/CPoint.hpp | 8 +- .../meshreader/CCGNSMeshReaderFVM.hpp | 9 +- Common/include/option_structure.hpp | 25 - Common/src/CConfig.cpp | 28 +- Common/src/geometry/CGeometry.cpp | 182 ++++-- Common/src/geometry/CMultiGridGeometry.cpp | 121 ++-- Common/src/geometry/CPhysicalGeometry.cpp | 8 +- .../src/grid_movement/CVolumetricMovement.cpp | 2 +- .../gradients/computeGradientsGreenGauss.hpp | 139 +++-- .../computeGradientsLeastSquares.hpp | 20 +- .../gradients/correctGradientsSymmetry.hpp | 146 ----- SU2_CFD/include/interfaces/CInterface.hpp | 41 +- .../include/numerics/flow/convection/hllc.hpp | 4 +- .../numerics/turbulent/turb_sources.hpp | 81 +-- SU2_CFD/include/solvers/CEulerSolver.hpp | 34 +- .../include/solvers/CFVMFlowSolverBase.hpp | 19 +- .../include/solvers/CFVMFlowSolverBase.inl | 402 +++++++++---- SU2_CFD/include/solvers/CScalarSolver.inl | 10 +- SU2_CFD/include/solvers/CSolver.hpp | 59 +- SU2_CFD/include/solvers/CSpeciesSolver.hpp | 13 +- SU2_CFD/include/solvers/CTurbSASolver.hpp | 17 +- SU2_CFD/include/solvers/CTurbSSTSolver.hpp | 17 +- SU2_CFD/include/variables/CEulerVariable.hpp | 4 +- SU2_CFD/include/variables/CVariable.hpp | 10 - SU2_CFD/src/drivers/CDriver.cpp | 44 +- SU2_CFD/src/drivers/CMultizoneDriver.cpp | 16 +- SU2_CFD/src/integration/CIntegration.cpp | 15 +- SU2_CFD/src/interfaces/CInterface.cpp | 11 +- .../src/iteration/CDiscAdjFluidIteration.cpp | 4 - SU2_CFD/src/numerics/flow/convection/fds.cpp | 2 +- SU2_CFD/src/numerics/flow/convection/hllc.cpp | 83 ++- SU2_CFD/src/numerics/flow/convection/roe.cpp | 6 +- SU2_CFD/src/solvers/CAdjEulerSolver.cpp | 10 +- SU2_CFD/src/solvers/CAdjNSSolver.cpp | 14 +- SU2_CFD/src/solvers/CAdjTurbSolver.cpp | 8 +- SU2_CFD/src/solvers/CEulerSolver.cpp | 565 +++++++++++------- SU2_CFD/src/solvers/CNEMONSSolver.cpp | 2 +- SU2_CFD/src/solvers/CRadP1Solver.cpp | 10 +- SU2_CFD/src/solvers/CSolver.cpp | 61 +- SU2_CFD/src/solvers/CSpeciesSolver.cpp | 59 +- SU2_CFD/src/solvers/CTransLMSolver.cpp | 4 +- SU2_CFD/src/solvers/CTurbSASolver.cpp | 68 ++- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 92 ++- TestCases/TestCase.py | 2 +- .../naca0012/of_grad_cd.dat.ref | 76 +-- .../naca0012/of_grad_cd_disc.dat.ref | 76 +-- .../naca0012/of_grad_directdiff.dat.ref | 6 +- .../wedge/of_grad_combo.dat.ref | 8 +- .../disc_adj_fsi/dyn_fsi/grad_dv.opt.ref | 16 +- TestCases/disc_adj_heat/disc_adj_heat.cfg | 2 +- TestCases/euler/bluntbody/blunt.cfg | 2 +- TestCases/euler/channel/inv_channel_RK.cfg | 2 +- TestCases/euler/naca0012/inv_NACA0012_Roe.cfg | 8 +- TestCases/euler/wedge/inv_wedge_HLLC.cfg | 2 +- TestCases/fixed_cl/naca0012/inv_NACA0012.cfg | 12 +- .../lam_prem_ch4_cfd.cfg | 13 +- .../lam_prem_ch4_cht_cfd_fluid.cfg | 7 +- .../lam_prem_ch4_cht_cfd_master.cfg | 2 +- TestCases/hybrid_regression.py | 98 +-- TestCases/hybrid_regression_AD.py | 22 +- .../incomp_euler/naca0012/incomp_NACA0012.cfg | 8 +- TestCases/incomp_euler/nozzle/inv_nozzle.cfg | 6 +- .../incomp_navierstokes/sphere/sphere.cfg | 104 ---- .../chtPinArray_2d/of_grad_findiff.csv.ref | 2 +- .../chtPinArray_3d/configMaster.cfg | 2 +- .../multiple_ffd/naca0012/of_grad_cd.dat.ref | 4 +- .../naca0012/of_grad_directdiff.dat.ref | 4 +- .../navierstokes/cylinder/lam_cylinder.cfg | 2 +- .../navierstokes/flatplate/lam_flatplate.cfg | 12 +- TestCases/nicf/edge/edge_PPR.cfg | 15 +- TestCases/nicf/edge/edge_VW.cfg | 16 +- TestCases/parallel_regression.py | 238 ++++---- TestCases/parallel_regression_AD.py | 24 +- .../translating_NACA0012/config.cfg | 20 +- .../translating_NACA0012/forces_0.csv.ref | 400 ++++++------- .../forces_0.csv.ref | 400 ++++++------- ...b_SST_flatplate_compressibility_Sarkar.cfg | 150 ----- ...b_SST_flatplate_compressibility_Wilcox.cfg | 150 ----- TestCases/rotating/naca0012/rot_NACA0012.cfg | 2 +- TestCases/serial_regression.py | 178 +++--- TestCases/serial_regression_AD.py | 30 +- ...iveVenturi_mixingmodel_heatcapacity_H2.cfg | 2 +- ...Venturi_mixingmodel_heatcapacity_H2_ND.cfg | 6 +- TestCases/tutorials.py | 40 +- .../user_defined_functions/lam_flatplate.cfg | 2 +- TestCases/vandv.py | 18 +- UnitTests/SU2_CFD/gradients.cpp | 4 +- config_template.cfg | 8 +- 92 files changed, 2194 insertions(+), 2533 deletions(-) delete mode 100644 SU2_CFD/include/gradients/correctGradientsSymmetry.hpp delete mode 100644 TestCases/incomp_navierstokes/sphere/sphere.cfg delete mode 100644 TestCases/rans/flatplate/turb_SST_flatplate_compressibility_Sarkar.cfg delete mode 100644 TestCases/rans/flatplate/turb_SST_flatplate_compressibility_Wilcox.cfg diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 474deacf6a5..0bec4282207 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -884,8 +884,6 @@ class CConfig { ReThetaT_FreeStream, /*!< \brief Freestream Transition Momentum Thickness Reynolds Number (for LM transition model) of the fluid. */ NuFactor_FreeStream, /*!< \brief Ratio of turbulent to laminar viscosity. */ NuFactor_Engine, /*!< \brief Ratio of turbulent to laminar viscosity at the engine. */ - KFactor_LowerLimit, /*!< \Non dimensional coefficient for lower limit of K in SST model. */ - OmegaFactor_LowerLimit, /*!< \Non dimensional coefficient for lower limit of omega in SST model. */ SecondaryFlow_ActDisk, /*!< \brief Ratio of turbulent to laminar viscosity at the actuator disk. */ Initial_BCThrust, /*!< \brief Ratio of turbulent to laminar viscosity at the actuator disk. */ Pressure_FreeStream, /*!< \brief Total pressure of the fluid. */ @@ -2016,18 +2014,6 @@ class CConfig { */ su2double GetNuFactor_FreeStream(void) const { return NuFactor_FreeStream; } - /*! - * \brief Get the k constant factor define a lower limit by multiplication with values in SST turbulence model. - * \return Non-dimensionalized freestream intensity. - */ - su2double GetKFactor_LowerLimit(void) const { return KFactor_LowerLimit; } - - /*! - * \brief Get the w constant factor define a lower limit by multiplication with values in SST turbulencemodel. - * \return Non-dimensionalized freestream intensity. - */ - su2double GetOmegaFactor_LowerLimit(void) const { return OmegaFactor_LowerLimit; } - /*! * \brief Get the value of the non-dimensionalized engine turbulence intensity. * \return Non-dimensionalized engine intensity. @@ -4348,7 +4334,8 @@ class CConfig { array GetNewtonKrylovDblParam(void) const { return NK_DblParam; } /*! - * \brief Returns the Roe kappa (multipler of the dissipation term). + * \brief Get the relaxation coefficient of the linear solver for the implicit formulation. + * \return relaxation coefficient of the linear solver for the implicit formulation. */ su2double GetRoe_Kappa(void) const { return Roe_Kappa; } diff --git a/Common/include/geometry/CGeometry.hpp b/Common/include/geometry/CGeometry.hpp index 015aaf1fdc2..582679ca6af 100644 --- a/Common/include/geometry/CGeometry.hpp +++ b/Common/include/geometry/CGeometry.hpp @@ -240,10 +240,8 @@ class CGeometry { unsigned long* nVertex{nullptr}; /*!< \brief Number of vertex for each marker. */ unsigned long* nElem_Bound{nullptr}; /*!< \brief Number of elements of the boundary. */ string* Tag_to_Marker{nullptr}; /*!< \brief Names of boundary markers. */ - - /*!< \brief Corrected normals on nodes with shared symmetry markers. */ - vector>> symmetryNormals; - + vector + bound_is_straight; /*!< \brief Bool if boundary-marker is straight(2D)/plane(3D) for each local marker. */ vector SurfaceAreaCfgFile; /*!< \brief Total Surface area for all markers. */ /*--- Partitioning-specific variables ---*/ @@ -821,12 +819,6 @@ class CGeometry { */ inline virtual void SetBoundControlVolume(const CConfig* config, unsigned short action) {} - /*! - * \brief Computes modified normals at intersecting symmetry planes. - * \param[in] config - Definition of the particular problem. - */ - void ComputeModifiedSymmetryNormals(const CConfig* config); - /*! * \brief A virtual member. * \param[in] config_filename - Name of the file where the tecplot information is going to be stored. @@ -944,10 +936,9 @@ class CGeometry { /*! * \brief A virtual member. * \param[in] fine_grid - Geometrical definition of the problem. - * \param[in] config - Definition of the particular problem. * \param[in] action - Allocate or not the new elements. */ - inline virtual void SetBoundControlVolume(const CGeometry* fine_grid, const CConfig* config, unsigned short action) {} + inline virtual void SetBoundControlVolume(const CGeometry* fine_grid, unsigned short action) {} /*! * \brief A virtual member. @@ -1014,6 +1005,15 @@ class CGeometry { */ su2double GetSurfaceArea(const CConfig* config, unsigned short val_marker) const; + /*! + * \brief Check if a boundary is straight(2D) / plane(3D) for EULER_WALL and SYMMETRY_PLANE + * only and store the information in bound_is_straight. For all other boundary types + * this will return false and could therfore be wrong. Used ultimately for BC_Slip_Wall. + * \param[in] config - Definition of the particular problem. + * \param[in] print_on_screen - Boolean whether to print result on screen. + */ + void ComputeSurf_Straightness(CConfig* config, bool print_on_screen); + /*! * \brief Find and store all vertices on a sharp corner in the geometry. * \param[in] config - Definition of the particular problem. diff --git a/Common/include/geometry/CMultiGridGeometry.hpp b/Common/include/geometry/CMultiGridGeometry.hpp index 541aaa88d6d..1a7f7f9ab58 100644 --- a/Common/include/geometry/CMultiGridGeometry.hpp +++ b/Common/include/geometry/CMultiGridGeometry.hpp @@ -104,10 +104,9 @@ class CMultiGridGeometry final : public CGeometry { /*! * \brief Set boundary vertex structure of the agglomerated control volume. * \param[in] fine_grid - Geometrical definition of the problem. - * \param[in] config - Definition of the particular problem. * \param[in] action - Allocate or not the new elements. */ - void SetBoundControlVolume(const CGeometry* fine_grid, const CConfig* config, unsigned short action) override; + void SetBoundControlVolume(const CGeometry* fine_grid, unsigned short action) override; /*! * \brief Set a representative coordinates of the agglomerated control volume. diff --git a/Common/include/geometry/CPhysicalGeometry.hpp b/Common/include/geometry/CPhysicalGeometry.hpp index 070bf015ab8..10e781cb85e 100644 --- a/Common/include/geometry/CPhysicalGeometry.hpp +++ b/Common/include/geometry/CPhysicalGeometry.hpp @@ -208,13 +208,10 @@ class CPhysicalGeometry final : public CGeometry { * \brief Routine to launch non-blocking sends and recvs amongst all processors. * \param[in] bufSend - Buffer of data to be sent. * \param[in] nElemSend - Array containing the number of elements to send to other processors in cumulative storage - * format. - * \param[in] sendReq - Array of MPI send requests. - * \param[in] bufRecv - Buffer of data to be received. + * format. \param[in] sendReq - Array of MPI send requests. \param[in] bufRecv - Buffer of data to be received. * \param[in] nElemSend - Array containing the number of elements to receive from other processors in cumulative - * storage format. - * \param[in] sendReq - Array of MPI recv requests. - * \param[in] countPerElem - Pieces of data per element communicated. + * storage format. \param[in] sendReq - Array of MPI recv requests. \param[in] countPerElem - Pieces of data per + * element communicated. */ void InitiateCommsAll(void* bufSend, const int* nElemSend, SU2_MPI::Request* sendReq, void* bufRecv, const int* nElemRecv, SU2_MPI::Request* recvReq, unsigned short countPerElem, diff --git a/Common/include/geometry/dual_grid/CPoint.hpp b/Common/include/geometry/dual_grid/CPoint.hpp index c297b1b5df9..9c73fdeaa9a 100644 --- a/Common/include/geometry/dual_grid/CPoint.hpp +++ b/Common/include/geometry/dual_grid/CPoint.hpp @@ -314,8 +314,10 @@ class CPoint { * \return Index of the vertex. */ inline long GetVertex(unsigned long iPoint, unsigned long iMarker) const { - if (Boundary(iPoint)) return Vertex[iPoint][iMarker]; - return -1; + if (Boundary(iPoint)) + return Vertex[iPoint][iMarker]; + else + return -1; } /*! @@ -367,7 +369,7 @@ class CPoint { inline bool GetPhysicalBoundary(unsigned long iPoint) const { return PhysicalBoundary(iPoint); } /*! - * \brief Set if a point belong to the solid wall boundary. + * \brief Set if a point belong to the boundary. * \param[in] iPoint - Index of the point. * \param[in] boundary - TRUE if the point belong to the physical boundary; otherwise FALSE. */ diff --git a/Common/include/geometry/meshreader/CCGNSMeshReaderFVM.hpp b/Common/include/geometry/meshreader/CCGNSMeshReaderFVM.hpp index 3b072222d41..7ef5ef88206 100644 --- a/Common/include/geometry/meshreader/CCGNSMeshReaderFVM.hpp +++ b/Common/include/geometry/meshreader/CCGNSMeshReaderFVM.hpp @@ -121,13 +121,10 @@ class CCGNSMeshReaderFVM : public CMeshReaderFVM { * \brief Routine to launch non-blocking sends and recvs amongst all processors. * \param[in] bufSend - Buffer of data to be sent. * \param[in] nElemSend - Array containing the number of elements to send to other processors in cumulative storage - * format. - * \param[in] sendReq - Array of MPI send requests. - * \param[in] bufRecv - Buffer of data to be received. + * format. \param[in] sendReq - Array of MPI send requests. \param[in] bufRecv - Buffer of data to be received. * \param[in] nElemSend - Array containing the number of elements to receive from other processors in cumulative - * storage format. - * \param[in] sendReq - Array of MPI recv requests. - * \param[in] countPerElem - Pieces of data per element communicated. + * storage format. \param[in] sendReq - Array of MPI recv requests. \param[in] countPerElem - Pieces of data per + * element communicated. */ void InitiateCommsAll(void* bufSend, const int* nElemSend, SU2_MPI::Request* sendReq, void* bufRecv, const int* nElemRecv, SU2_MPI::Request* recvReq, unsigned short countPerElem, diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index 7d36d111bda..ab32f398e76 100644 --- a/Common/include/option_structure.hpp +++ b/Common/include/option_structure.hpp @@ -991,9 +991,6 @@ enum class SST_OPTIONS { V, /*!< \brief Menter k-w SST model with vorticity production terms. */ KL, /*!< \brief Menter k-w SST model with Kato-Launder production terms. */ UQ, /*!< \brief Menter k-w SST model with uncertainty quantification modifications. */ - COMP_Wilcox, /*!< \brief Menter k-w SST model with Compressibility correction of Wilcox. */ - COMP_Sarkar, /*!< \brief Menter k-w SST model with Compressibility correction of Sarkar. */ - DLL, /*!< \brief Menter k-w SST model with dimensionless lower limit clipping of turbulence variables. */ }; static const MapType SST_Options_Map = { MakePair("NONE", SST_OPTIONS::NONE) @@ -1006,9 +1003,6 @@ static const MapType SST_Options_Map = { MakePair("VORTICITY", SST_OPTIONS::V) MakePair("KATO-LAUNDER", SST_OPTIONS::KL) MakePair("UQ", SST_OPTIONS::UQ) - MakePair("COMPRESSIBILITY-WILCOX", SST_OPTIONS::COMP_Wilcox) - MakePair("COMPRESSIBILITY-SARKAR", SST_OPTIONS::COMP_Sarkar) - MakePair("DIMENSIONLESS_LIMIT", SST_OPTIONS::DLL) }; /*! @@ -1020,9 +1014,6 @@ struct SST_ParsedOptions { bool sust = false; /*!< \brief Bool for SST model with sustaining terms. */ bool uq = false; /*!< \brief Bool for using uncertainty quantification. */ bool modified = false; /*!< \brief Bool for modified (m) SST model. */ - bool compWilcox = false; /*!< \brief Bool for compressibility correction of Wilcox. */ - bool compSarkar = false; /*!< \brief Bool for compressibility correction of Sarkar. */ - bool dll = false; /*!< \brief Bool dimensionless lower limit. */ }; /*! @@ -1058,9 +1049,6 @@ inline SST_ParsedOptions ParseSSTOptions(const SST_OPTIONS *SST_Options, unsigne const bool sst_v = IsPresent(SST_OPTIONS::V); const bool sst_kl = IsPresent(SST_OPTIONS::KL); const bool sst_uq = IsPresent(SST_OPTIONS::UQ); - const bool sst_compWilcox = IsPresent(SST_OPTIONS::COMP_Wilcox); - const bool sst_compSarkar = IsPresent(SST_OPTIONS::COMP_Sarkar); - const bool sst_dll = IsPresent(SST_OPTIONS::DLL); if (sst_1994 && sst_2003) { SU2_MPI::Error("Two versions (1994 and 2003) selected for SST_OPTIONS. Please choose only one.", CURRENT_FUNCTION); @@ -1081,22 +1069,9 @@ inline SST_ParsedOptions ParseSSTOptions(const SST_OPTIONS *SST_Options, unsigne SSTParsedOptions.production = SST_OPTIONS::UQ; } - // Parse compressibility options - if (sst_compWilcox && sst_compSarkar) { - SU2_MPI::Error("Please select only one compressibility correction (COMPRESSIBILITY-WILCOX or COMPRESSIBILITY-SARKAR).", CURRENT_FUNCTION); - } else if (sst_compWilcox) { - SSTParsedOptions.production = SST_OPTIONS::COMP_Wilcox; - } else if (sst_compSarkar) { - SSTParsedOptions.production = SST_OPTIONS::COMP_Sarkar; - } - SSTParsedOptions.sust = sst_sust; SSTParsedOptions.modified = sst_m; SSTParsedOptions.uq = sst_uq; - SSTParsedOptions.compWilcox = sst_compWilcox; - SSTParsedOptions.compSarkar = sst_compSarkar; - SSTParsedOptions.dll = sst_dll; - return SSTParsedOptions; } diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index ad75b0f928b..9ffe757462a 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1421,10 +1421,6 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: */ addDoubleOption("FREESTREAM_NU_FACTOR", NuFactor_FreeStream, 3.0); /* DESCRIPTION: */ - addDoubleOption("LOWER_LIMIT_K_FACTOR", KFactor_LowerLimit, 1.0e-15); - /* DESCRIPTION: */ - addDoubleOption("LOWER_LIMIT_OMEGA_FACTOR", OmegaFactor_LowerLimit, 1e-05); - /* DESCRIPTION: */ addDoubleOption("ENGINE_NU_FACTOR", NuFactor_Engine, 3.0); /* DESCRIPTION: */ addDoubleOption("ACTDISK_SECONDARY_FLOW", SecondaryFlow_ActDisk, 0.0); @@ -3482,12 +3478,9 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i saParsedOptions = ParseSAOptions(SA_Options, nSA_Options, rank); } - if (Kind_Solver == MAIN_SOLVER::INC_RANS && sstParsedOptions.compSarkar){ - SU2_MPI::Error("COMPRESSIBILITY-SARKAR only supported for SOLVER= RANS", CURRENT_FUNCTION); - } - - if (Kind_Solver == MAIN_SOLVER::INC_RANS && sstParsedOptions.compWilcox){ - SU2_MPI::Error("COMPRESSIBILITY-WILCOX only supported for SOLVER= RANS", CURRENT_FUNCTION); + /*--- Check if turbulence model can be used for AXISYMMETRIC case---*/ + if (Axisymmetric && Kind_Turb_Model != TURB_MODEL::NONE && Kind_Turb_Model != TURB_MODEL::SST){ + SU2_MPI::Error("Axisymmetry is currently only supported for KIND_TURB_MODEL chosen as SST", CURRENT_FUNCTION); } /*--- Postprocess LM_OPTIONS into structure. ---*/ @@ -6222,7 +6215,7 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { if (sstParsedOptions.version == SST_OPTIONS::V1994) cout << "-1994"; else cout << "-2003"; if (sstParsedOptions.modified) cout << "m"; - if (sstParsedOptions.sust) cout << " with sustaining terms,"; + if (sstParsedOptions.sust) cout << " with sustaining terms, and"; switch (sstParsedOptions.production) { case SST_OPTIONS::KL: @@ -6235,23 +6228,10 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { cout << "\nperturbing the Reynold's Stress Matrix towards " << eig_val_comp << " component turbulence"; if (uq_permute) cout << " (permuting eigenvectors)"; break; - case SST_OPTIONS::COMP_Wilcox: - cout << " with compressibility correction of Wilcox"; - break; - case SST_OPTIONS::COMP_Sarkar: - cout << " with compressibility correction of Sarkar"; - break; default: cout << " with no production modification"; break; } - - if (sstParsedOptions.dll){ - cout << "\nusing non dimensional lower limits relative to infinity values clipping by Coefficients:" ; - cout << " C_w= " << OmegaFactor_LowerLimit << " and C_k= " <SetControlVolume(geometry_container[iMesh - 1], UPDATE); - geometry_container[iMesh]->SetBoundControlVolume(geometry_container[iMesh - 1], config, UPDATE); + geometry_container[iMesh]->SetBoundControlVolume(geometry_container[iMesh - 1], UPDATE); geometry_container[iMesh]->SetCoord(geometry_container[iMesh - 1]); } @@ -2453,71 +2453,123 @@ su2double CGeometry::GetSurfaceArea(const CConfig* config, unsigned short val_ma return 0.0; } -void CGeometry::ComputeModifiedSymmetryNormals(const CConfig* config) { - /* Check how many symmetry planes there are and use the first (lowest ID) as the basis to orthogonalize against. - * All nodes that are shared by multiple symmetries have to get a corrected normal. */ - symmetryNormals.resize(nMarker); - std::vector symMarkers; - - for (auto iMarker = 0u; iMarker < nMarker; ++iMarker) { - if ((config->GetMarker_All_KindBC(iMarker) == SYMMETRY_PLANE) || - (config->GetMarker_All_KindBC(iMarker) == EULER_WALL)) { - symMarkers.push_back(iMarker); - } - } - - /*--- Loop over all markers and find nodes on symmetry planes that are shared with other symmetries. ---*/ - /*--- The first symmetry does not need a corrected normal vector, hence start at 1. ---*/ - for (size_t i = 1; i < symMarkers.size(); ++i) { - const auto iMarker = symMarkers[i]; - - for (auto iVertex = 0ul; iVertex < nVertex[iMarker]; iVertex++) { - const auto iPoint = vertex[iMarker][iVertex]->GetNode(); - - /*--- Halo points do not need to be considered. ---*/ - if (!nodes->GetDomain(iPoint)) continue; - - /*--- Get the vertex normal on the current symmetry. ---*/ - std::array iNormal = {}; - vertex[iMarker][iVertex]->GetNormal(iNormal.data()); - - /*--- Loop over previous symmetries and if this point shares them, make this normal orthogonal to them. ---*/ - bool isShared = false; - - for (size_t j = 0; j < i; ++j) { - const auto jMarker = symMarkers[j]; - const auto jVertex = nodes->GetVertex(iPoint, jMarker); - if (jVertex < 0) continue; - - isShared = true; - - std::array jNormal = {}; - const auto it = symmetryNormals[jMarker].find(jVertex); - - if (it != symmetryNormals[jMarker].end()) { - jNormal = it->second; - } else { - vertex[jMarker][jVertex]->GetNormal(jNormal.data()); - const su2double area = GeometryToolbox::Norm(nDim, jNormal.data()); - for (auto iDim = 0u; iDim < nDim; iDim++) jNormal[iDim] /= area; - } - - const auto proj = GeometryToolbox::DotProduct(nDim, jNormal.data(), iNormal.data()); - for (auto iDim = 0u; iDim < nDim; iDim++) iNormal[iDim] -= proj * jNormal[iDim]; - } - - if (!isShared) continue; +void CGeometry::ComputeSurf_Straightness(CConfig* config, bool print_on_screen) { + bool RefUnitNormal_defined; + unsigned short iDim, iMarker, iMarker_Global, nMarker_Global = config->GetnMarker_CfgFile(); + unsigned long iVertex; + constexpr passivedouble epsilon = 1.0e-6; + su2double Area; + string Local_TagBound, Global_TagBound; + + vector Normal(nDim), UnitNormal(nDim), RefUnitNormal(nDim); + + /*--- Assume now that this boundary marker is straight. As soon as one + AreaElement is found that is not aligend with a Reference then it is + certain that the boundary marker is not straight and one can stop + searching. Another possibility is that this process doesn't own + any nodes of that boundary, in that case we also have to assume the + boundary is straight. + Any boundary type other than SYMMETRY_PLANE or EULER_WALL gets + the value false (or see cases specified in the conditional below) + which could be wrong. ---*/ + bound_is_straight.resize(nMarker); + fill(bound_is_straight.begin(), bound_is_straight.end(), true); + + /*--- Loop over all local markers ---*/ + for (iMarker = 0; iMarker < nMarker; iMarker++) { + Local_TagBound = config->GetMarker_All_TagBound(iMarker); + + /*--- Marker has to be Symmetry or Euler. Additionally marker can't be a + moving surface and Grid Movement Elasticity is forbidden as well. All + other GridMovements are rigid. ---*/ + if ((config->GetMarker_All_KindBC(iMarker) == SYMMETRY_PLANE || + config->GetMarker_All_KindBC(iMarker) == EULER_WALL) && + !config->GetMarker_Moving_Bool(Local_TagBound) && !config->GetMarker_Deform_Mesh_Bool(Local_TagBound)) { + /*--- Loop over all global markers, and find the local-global pair via + matching unique string tags. ---*/ + for (iMarker_Global = 0; iMarker_Global < nMarker_Global; iMarker_Global++) { + Global_TagBound = config->GetMarker_CfgFile_TagBound(iMarker_Global); + if (Local_TagBound == Global_TagBound) { + RefUnitNormal_defined = false; + iVertex = 0; + + while (bound_is_straight[iMarker] && iVertex < nVertex[iMarker]) { + vertex[iMarker][iVertex]->GetNormal(Normal.data()); + UnitNormal = Normal; + + /*--- Compute unit normal. ---*/ + Area = 0.0; + for (iDim = 0; iDim < nDim; iDim++) Area += Normal[iDim] * Normal[iDim]; + Area = sqrt(Area); + + /*--- Negate for outward convention. ---*/ + for (iDim = 0; iDim < nDim; iDim++) UnitNormal[iDim] /= -Area; + + /*--- Check if unit normal is within tolerance of the Reference unit normal. + Reference unit normal = first unit normal found. ---*/ + if (RefUnitNormal_defined) { + for (iDim = 0; iDim < nDim; iDim++) { + if (abs(RefUnitNormal[iDim] - UnitNormal[iDim]) > epsilon) { + bound_is_straight[iMarker] = false; + break; + } + } + } else { + RefUnitNormal = UnitNormal; // deep copy of values + RefUnitNormal_defined = true; + } - /*--- Normalize. If the norm is close to zero it means the normal is a linear combination of previous - * normals, in this case we don't need to store the corrected normal, using the original in the gradient - * correction will have no effect since previous corrections will remove components in this direction). ---*/ - const su2double area = GeometryToolbox::Norm(nDim, iNormal.data()); - if (area > EPS) { - for (auto iDim = 0u; iDim < nDim; iDim++) iNormal[iDim] /= area; - symmetryNormals[iMarker][iVertex] = iNormal; - } - } - } + iVertex++; + } // while iVertex + } // if Local == Global + } // for iMarker_Global + } else { + /*--- Enforce default value: false ---*/ + bound_is_straight[iMarker] = false; + } // if sym or euler ... + } // for iMarker + + /*--- Communicate results and print on screen. ---*/ + if (print_on_screen) { + /*--- Additional vector which can later be MPI::Allreduce(d) to pring the results + on screen as nMarker (local) can vary across ranks. Default 'true' as it can + happen that a local rank does not contain an element of each surface marker. ---*/ + vector bound_is_straight_Global(nMarker_Global, true); + /*--- Match local with global tag bound and fill a Global Marker vector. ---*/ + for (iMarker = 0; iMarker < nMarker; iMarker++) { + Local_TagBound = config->GetMarker_All_TagBound(iMarker); + for (iMarker_Global = 0; iMarker_Global < nMarker_Global; iMarker_Global++) { + Global_TagBound = config->GetMarker_CfgFile_TagBound(iMarker_Global); + + if (Local_TagBound == Global_TagBound) bound_is_straight_Global[iMarker_Global] = bound_is_straight[iMarker]; + + } // for iMarker_Global + } // for iMarker + + vector Buff_Send_isStraight(nMarker_Global), Buff_Recv_isStraight(nMarker_Global); + + /*--- Cast to int as std::vector can be a special construct. MPI handling using + is more straight-forward. ---*/ + for (iMarker_Global = 0; iMarker_Global < nMarker_Global; iMarker_Global++) + Buff_Send_isStraight[iMarker_Global] = static_cast(bound_is_straight_Global[iMarker_Global]); + + /*--- Product of type (bool) is equivalnt to a 'logical and' ---*/ + SU2_MPI::Allreduce(Buff_Send_isStraight.data(), Buff_Recv_isStraight.data(), nMarker_Global, MPI_INT, MPI_PROD, + SU2_MPI::GetComm()); + + /*--- Print results on screen. ---*/ + if (rank == MASTER_NODE) { + for (iMarker_Global = 0; iMarker_Global < nMarker_Global; iMarker_Global++) { + if (config->GetMarker_CfgFile_KindBC(config->GetMarker_CfgFile_TagBound(iMarker_Global)) == SYMMETRY_PLANE || + config->GetMarker_CfgFile_KindBC(config->GetMarker_CfgFile_TagBound(iMarker_Global)) == EULER_WALL) { + cout << "Boundary marker " << config->GetMarker_CfgFile_TagBound(iMarker_Global) << " is"; + if (!static_cast(Buff_Recv_isStraight[iMarker_Global])) cout << " NOT"; + if (nDim == 2) cout << " a single straight." << endl; + if (nDim == 3) cout << " a single plane." << endl; + } // if sym or euler + } // for iMarker_Global + } // if rank==MASTER + } // if print_on_scren } void CGeometry::ComputeSurf_Curvature(CConfig* config) { diff --git a/Common/src/geometry/CMultiGridGeometry.cpp b/Common/src/geometry/CMultiGridGeometry.cpp index 00cc4ebf009..5ae064d778f 100644 --- a/Common/src/geometry/CMultiGridGeometry.cpp +++ b/Common/src/geometry/CMultiGridGeometry.cpp @@ -108,27 +108,17 @@ CMultiGridGeometry::CMultiGridGeometry(CGeometry* fine_grid, CConfig* config, un This can be improved. If there is only a marker, it is a good candidate for agglomeration ---*/ - if (counter == 1) { - agglomerate_seed = true; + if (counter == 1) agglomerate_seed = true; - /*--- Euler walls can be curved and agglomerating them leads to difficulties ---*/ - if (config->GetMarker_All_KindBC(marker_seed) == EULER_WALL) agglomerate_seed = false; - } - /*--- If there are two markers, we will agglomerate if any of the + /*--- If there are two markers, we will aglomerate if any of the markers is SEND_RECEIVE ---*/ if (counter == 2) { agglomerate_seed = (config->GetMarker_All_KindBC(copy_marker[0]) == SEND_RECEIVE) || (config->GetMarker_All_KindBC(copy_marker[1]) == SEND_RECEIVE); - - /* --- Euler walls can also not be agglomerated when the point has 2 markers ---*/ - if ((config->GetMarker_All_KindBC(copy_marker[0]) == EULER_WALL) || - (config->GetMarker_All_KindBC(copy_marker[1]) == EULER_WALL)) { - agglomerate_seed = false; - } } - /*--- If there are more than 2 markers, the aglomeration will be discarded ---*/ + /*--- If there are more than 2 markers, the aglomeration will be discarted ---*/ if (counter > 2) agglomerate_seed = false; @@ -230,7 +220,7 @@ CMultiGridGeometry::CMultiGridGeometry(CGeometry* fine_grid, CConfig* config, un const auto iPoint = MGQueue_InnerCV.NextCV(); iteration++; - /*--- If the element has not been previously agglomerated, belongs to the physical domain, + /*--- If the element has not being previously agglomerated, belongs to the physical domain, and satisfies several geometrical criteria then the seed CV is accepted for agglomeration. ---*/ if ((!fine_grid->nodes->GetAgglomerate(iPoint)) && (fine_grid->nodes->GetDomain(iPoint)) && @@ -448,6 +438,7 @@ CMultiGridGeometry::CMultiGridGeometry(CGeometry* fine_grid, CConfig* config, un /*--- Be careful, it is possible that a node changes the agglomeration configuration, the priority is always when receiving the information. ---*/ + fine_grid->nodes->SetParent_CV(iPoint_Fine, iPoint_Coarse); nodes->SetChildren_CV(iPoint_Coarse, nChildren_MPI[iPoint_Coarse], iPoint_Fine); nChildren_MPI[iPoint_Coarse]++; @@ -510,7 +501,7 @@ bool CMultiGridGeometry::SetBoundAgglomeration(unsigned long CVPoint, short mark const CConfig* config) const { bool agglomerate_CV = false; - /*--- Basic condition, the point has not been previously agglomerated, it belongs to the domain, + /*--- Basic condition, the point has not being previously agglomerated, it belongs to the domain, and has passed some basic geometrical checks. ---*/ if ((!fine_grid->nodes->GetAgglomerate(CVPoint)) && (fine_grid->nodes->GetDomain(CVPoint)) && @@ -520,7 +511,6 @@ bool CMultiGridGeometry::SetBoundAgglomeration(unsigned long CVPoint, short mark if (fine_grid->nodes->GetBoundary(CVPoint)) { /*--- Identify the markers of the vertex that we want to agglomerate ---*/ - // count number of markers on the agglomeration candidate int counter = 0; unsigned short copy_marker[3] = {}; for (auto jMarker = 0u; jMarker < fine_grid->GetnMarker() && counter < 3; jMarker++) { @@ -536,22 +526,13 @@ bool CMultiGridGeometry::SetBoundAgglomeration(unsigned long CVPoint, short mark /*--- Only one marker in the vertex that is going to be aglomerated ---*/ if (counter == 1) { - /*--- We agglomerate if there is only one marker and it is the same marker as the seed marker ---*/ - // note that this should be the same marker id, not just the same marker type + /*--- We agglomerate if there is only a marker and is the same marker as the seed marker ---*/ + if (copy_marker[0] == marker_seed) agglomerate_CV = true; /*--- If there is only one marker, but the marker is the SEND_RECEIVE ---*/ - if (config->GetMarker_All_KindBC(copy_marker[0]) == SEND_RECEIVE) { - agglomerate_CV = true; - } - - if ((config->GetMarker_All_KindBC(marker_seed) == SYMMETRY_PLANE) || - (config->GetMarker_All_KindBC(marker_seed) == EULER_WALL)) { - if (config->GetMarker_All_KindBC(copy_marker[0]) == SEND_RECEIVE) { - agglomerate_CV = false; - } - } + if (config->GetMarker_All_KindBC(copy_marker[0]) == SEND_RECEIVE) agglomerate_CV = true; } /*--- If there are two markers in the vertex that is going to be aglomerated ---*/ @@ -560,25 +541,20 @@ bool CMultiGridGeometry::SetBoundAgglomeration(unsigned long CVPoint, short mark /*--- First we verify that the seed is a physical boundary ---*/ if (config->GetMarker_All_KindBC(marker_seed) != SEND_RECEIVE) { - /*--- Then we check that one of the markers is equal to the seed marker, and the other is send/receive ---*/ + /*--- Then we check that one of the marker is equal to the seed marker, and the other is send/receive ---*/ if (((copy_marker[0] == marker_seed) && (config->GetMarker_All_KindBC(copy_marker[1]) == SEND_RECEIVE)) || - ((config->GetMarker_All_KindBC(copy_marker[0]) == SEND_RECEIVE) && (copy_marker[1] == marker_seed))) { + ((config->GetMarker_All_KindBC(copy_marker[0]) == SEND_RECEIVE) && (copy_marker[1] == marker_seed))) agglomerate_CV = true; - } } } + } - /*--- If the element belongs to the domain, it is always agglomerated. ---*/ + + /*--- If the element belongs to the domain, it is allways aglomerated. ---*/ + else { agglomerate_CV = true; - - // actually, for symmetry (and possibly other cells) we only agglomerate cells that are on the marker - // at this point, the seed was on the boundary and the CV was not. so we check if the seed is a symmetry - if ((config->GetMarker_All_KindBC(marker_seed) == SYMMETRY_PLANE) || - (config->GetMarker_All_KindBC(marker_seed) == EULER_WALL)) { - agglomerate_CV = false; - } } } @@ -924,47 +900,44 @@ void CMultiGridGeometry::SetControlVolume(const CGeometry* fine_grid, unsigned s END_SU2_OMP_SAFE_GLOBAL_ACCESS } -void CMultiGridGeometry::SetBoundControlVolume(const CGeometry* fine_grid, const CConfig* config, - unsigned short action) { - unsigned long iCoarsePoint, iFinePoint, FineVertex, iVertex; - su2double Normal[MAXNDIM] = {0.0}, Area, *NormalFace = nullptr; +void CMultiGridGeometry::SetBoundControlVolume(const CGeometry* fine_grid, unsigned short action) { + BEGIN_SU2_OMP_SAFE_GLOBAL_ACCESS { + unsigned long iCoarsePoint, iFinePoint, FineVertex, iVertex; + unsigned short iMarker, iChildren, iDim; + su2double *Normal, Area, *NormalFace = nullptr; - if (action != ALLOCATE) { - SU2_OMP_FOR_DYN(1) - for (auto iMarker = 0; iMarker < nMarker; iMarker++) - for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) vertex[iMarker][iVertex]->SetZeroValues(); - END_SU2_OMP_FOR - } + Normal = new su2double[nDim]; - SU2_OMP_FOR_DYN(1) - for (auto iMarker = 0; iMarker < nMarker; iMarker++) { - for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { - iCoarsePoint = vertex[iMarker][iVertex]->GetNode(); - for (auto iChildren = 0; iChildren < nodes->GetnChildren_CV(iCoarsePoint); iChildren++) { - iFinePoint = nodes->GetChildren_CV(iCoarsePoint, iChildren); - if (fine_grid->nodes->GetVertex(iFinePoint, iMarker) != -1) { - FineVertex = fine_grid->nodes->GetVertex(iFinePoint, iMarker); - fine_grid->vertex[iMarker][FineVertex]->GetNormal(Normal); - vertex[iMarker][iVertex]->AddNormal(Normal); + if (action != ALLOCATE) { + for (iMarker = 0; iMarker < nMarker; iMarker++) + for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) vertex[iMarker][iVertex]->SetZeroValues(); + } + + for (iMarker = 0; iMarker < nMarker; iMarker++) + for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { + iCoarsePoint = vertex[iMarker][iVertex]->GetNode(); + for (iChildren = 0; iChildren < nodes->GetnChildren_CV(iCoarsePoint); iChildren++) { + iFinePoint = nodes->GetChildren_CV(iCoarsePoint, iChildren); + if (fine_grid->nodes->GetVertex(iFinePoint, iMarker) != -1) { + FineVertex = fine_grid->nodes->GetVertex(iFinePoint, iMarker); + fine_grid->vertex[iMarker][FineVertex]->GetNormal(Normal); + vertex[iMarker][iVertex]->AddNormal(Normal); + } } } - } - } - END_SU2_OMP_FOR - /*--- Check if there is a normal with null area ---*/ - SU2_OMP_FOR_DYN(1) - for (auto iMarker = 0; iMarker < nMarker; iMarker++) { - for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { - NormalFace = vertex[iMarker][iVertex]->GetNormal(); - Area = GeometryToolbox::Norm(nDim, NormalFace); - if (Area == 0.0) - for (auto iDim = 0; iDim < nDim; iDim++) NormalFace[iDim] = EPS * EPS; - } - } - END_SU2_OMP_FOR + delete[] Normal; - SU2_OMP_SAFE_GLOBAL_ACCESS(ComputeModifiedSymmetryNormals(config);) + /*--- Check if there is a normal with null area ---*/ + for (iMarker = 0; iMarker < nMarker; iMarker++) + for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { + NormalFace = vertex[iMarker][iVertex]->GetNormal(); + Area = GeometryToolbox::Norm(nDim, NormalFace); + if (Area == 0.0) + for (iDim = 0; iDim < nDim; iDim++) NormalFace[iDim] = EPS * EPS; + } + } + END_SU2_OMP_SAFE_GLOBAL_ACCESS } void CMultiGridGeometry::SetCoord(const CGeometry* fine_grid) { diff --git a/Common/src/geometry/CPhysicalGeometry.cpp b/Common/src/geometry/CPhysicalGeometry.cpp index a069424c666..29f10a492b3 100644 --- a/Common/src/geometry/CPhysicalGeometry.cpp +++ b/Common/src/geometry/CPhysicalGeometry.cpp @@ -4124,7 +4124,7 @@ void CPhysicalGeometry::Check_IntElem_Orientation(const CConfig* config) { if (tria_flip + quad_flip + tet_flip + hexa_flip + pyram_flip + prism_flip + quad_error + pyram_error + prism_error + hexa_error == 0) { - cout << "All volume elements are correctly oriented." << endl; + cout << "All volume elements are correctly orientend." << endl; } } } @@ -4260,7 +4260,7 @@ void CPhysicalGeometry::Check_BoundElem_Orientation(const CConfig* config) { } if (line_flip + tria_flip + quad_flip + quad_error == 0) { - cout << "All surface elements are correctly oriented." << endl; + cout << "All surface elements are correctly orientend." << endl; } } } @@ -7283,8 +7283,6 @@ void CPhysicalGeometry::SetBoundControlVolume(const CConfig* config, unsigned sh } } END_SU2_OMP_FOR - - SU2_OMP_SAFE_GLOBAL_ACCESS(ComputeModifiedSymmetryNormals(config);) } void CPhysicalGeometry::VisualizeControlVolume(const CConfig* config) const { @@ -9560,7 +9558,7 @@ su2double CPhysicalGeometry::Compute_Length(su2double* Plane_P0, su2double* Plan su2double DeltaZ, DeltaX; /*--- Not that in a symmetry plane configuration there is an extra edge that connects - the two extremes, and we really don't know the curve orientation. We will evaluate + the two extremes, and we really don't now the curve orientation. We will evaluate both distance and picked the smallest one ---*/ Length_Value = 0.0; diff --git a/Common/src/grid_movement/CVolumetricMovement.cpp b/Common/src/grid_movement/CVolumetricMovement.cpp index efd2a6f2b74..a3f91fa36c1 100644 --- a/Common/src/grid_movement/CVolumetricMovement.cpp +++ b/Common/src/grid_movement/CVolumetricMovement.cpp @@ -98,7 +98,7 @@ void CVolumetricMovement::UpdateMultiGrid(CGeometry** geometry, CConfig* config) for (iMGlevel = 1; iMGlevel <= nMGlevel; iMGlevel++) { iMGfine = iMGlevel - 1; geometry[iMGlevel]->SetControlVolume(geometry[iMGfine], UPDATE); - geometry[iMGlevel]->SetBoundControlVolume(geometry[iMGfine], config, UPDATE); + geometry[iMGlevel]->SetBoundControlVolume(geometry[iMGfine], UPDATE); geometry[iMGlevel]->SetCoord(geometry[iMGfine]); if (config->GetGrid_Movement()) geometry[iMGlevel]->SetRestricted_GridVelocity(geometry[iMGfine]); } diff --git a/SU2_CFD/include/gradients/computeGradientsGreenGauss.hpp b/SU2_CFD/include/gradients/computeGradientsGreenGauss.hpp index f03668cafa1..5d0abbb8537 100644 --- a/SU2_CFD/include/gradients/computeGradientsGreenGauss.hpp +++ b/SU2_CFD/include/gradients/computeGradientsGreenGauss.hpp @@ -27,12 +27,7 @@ * License along with SU2. If not, see . */ -#include -#include - #include "../../../Common/include/parallelization/omp_structure.hpp" -#include "../../../Common/include/toolboxes/geometry_toolbox.hpp" -#include "correctGradientsSymmetry.hpp" namespace detail { @@ -54,13 +49,19 @@ namespace detail { * \param[in] field - Generic object implementing operator (iPoint, iVar). * \param[in] varBegin - Index of first variable for which to compute the gradient. * \param[in] varEnd - Index of last variable for which to compute the gradient. - * \param[in] idxVel - Index of velocity, or -1 if no velocity present. * \param[out] gradient - Generic object implementing operator (iPoint, iVar, iDim). */ -template -void computeGradientsGreenGauss(CSolver* solver, MPI_QUANTITIES kindMpiComm, PERIODIC_QUANTITIES kindPeriodicComm, - CGeometry& geometry, const CConfig& config, const FieldType& field, - const size_t varBegin, const size_t varEnd, const int idxVel, GradientType& gradient) { +template +void computeGradientsGreenGauss(CSolver* solver, + MPI_QUANTITIES kindMpiComm, + PERIODIC_QUANTITIES kindPeriodicComm, + CGeometry& geometry, + const CConfig& config, + const FieldType& field, + size_t varBegin, + size_t varEnd, + GradientType& gradient) +{ const size_t nPointDomain = geometry.GetnPointDomain(); #ifdef HAVE_OMP @@ -69,12 +70,11 @@ void computeGradientsGreenGauss(CSolver* solver, MPI_QUANTITIES kindMpiComm, PER const auto chunkSize = computeStaticChunkSize(nPointDomain, omp_get_max_threads(), OMP_MAX_CHUNK); #endif - static constexpr size_t MAXNVAR = 20; - /*--- For each (non-halo) volume integrate over its faces (edges). ---*/ SU2_OMP_FOR_DYN(chunkSize) - for (size_t iPoint = 0; iPoint < nPointDomain; ++iPoint) { + for (size_t iPoint = 0; iPoint < nPointDomain; ++iPoint) + { auto nodes = geometry.nodes; /*--- Cannot preaccumulate if hybrid parallel due to shared reading. ---*/ @@ -82,59 +82,69 @@ void computeGradientsGreenGauss(CSolver* solver, MPI_QUANTITIES kindMpiComm, PER AD::SetPreaccIn(nodes->GetVolume(iPoint)); AD::SetPreaccIn(nodes->GetPeriodicVolume(iPoint)); - for (size_t iVar = varBegin; iVar < varEnd; ++iVar) AD::SetPreaccIn(field(iPoint, iVar)); + for (size_t iVar = varBegin; iVar < varEnd; ++iVar) + AD::SetPreaccIn(field(iPoint,iVar)); /*--- Clear the gradient. --*/ for (size_t iVar = varBegin; iVar < varEnd; ++iVar) - for (size_t iDim = 0; iDim < nDim; ++iDim) gradient(iPoint, iVar, iDim) = 0.0; + for (size_t iDim = 0; iDim < nDim; ++iDim) + gradient(iPoint, iVar, iDim) = 0.0; /*--- Handle averaging and division by volume in one constant. ---*/ - su2double halfOnVol = 0.5 / (nodes->GetVolume(iPoint) + nodes->GetPeriodicVolume(iPoint)); + su2double halfOnVol = 0.5 / (nodes->GetVolume(iPoint)+nodes->GetPeriodicVolume(iPoint)); /*--- Add a contribution due to each neighbor. ---*/ - for (size_t iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); ++iNeigh) { - size_t iEdge = nodes->GetEdge(iPoint, iNeigh); - size_t jPoint = nodes->GetPoint(iPoint, iNeigh); + for (size_t iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); ++iNeigh) + { + size_t iEdge = nodes->GetEdge(iPoint,iNeigh); + size_t jPoint = nodes->GetPoint(iPoint,iNeigh); /*--- Determine if edge points inwards or outwards of iPoint. * If inwards we need to flip the area vector. ---*/ - su2double dir = (iPoint < jPoint) ? 1.0 : -1.0; + su2double dir = (iPoint < jPoint)? 1.0 : -1.0; su2double weight = dir * halfOnVol; const auto area = geometry.edges->GetNormal(iEdge); AD::SetPreaccIn(area, nDim); - for (size_t iVar = varBegin; iVar < varEnd; ++iVar) { - AD::SetPreaccIn(field(jPoint, iVar)); - su2double flux = weight * (field(iPoint, iVar) + field(jPoint, iVar)); + for (size_t iVar = varBegin; iVar < varEnd; ++iVar) + { + AD::SetPreaccIn(field(jPoint,iVar)); + + su2double flux = weight * (field(iPoint,iVar) + field(jPoint,iVar)); - for (size_t iDim = 0; iDim < nDim; ++iDim) gradient(iPoint, iVar, iDim) += flux * area[iDim]; + for (size_t iDim = 0; iDim < nDim; ++iDim) + gradient(iPoint, iVar, iDim) += flux * area[iDim]; } + } for (size_t iVar = varBegin; iVar < varEnd; ++iVar) - for (size_t iDim = 0; iDim < nDim; ++iDim) AD::SetPreaccOut(gradient(iPoint, iVar, iDim)); + for (size_t iDim = 0; iDim < nDim; ++iDim) + AD::SetPreaccOut(gradient(iPoint,iVar,iDim)); AD::EndPreacc(); } END_SU2_OMP_FOR - su2double flux[MAXNVAR] = {0.0}; + /*--- Add boundary fluxes. ---*/ - /*--- Add edges of markers that contribute to the gradients ---*/ - for (size_t iMarker = 0; iMarker < geometry.GetnMarker(); ++iMarker) { + for (size_t iMarker = 0; iMarker < geometry.GetnMarker(); ++iMarker) + { if ((config.GetMarker_All_KindBC(iMarker) != INTERNAL_BOUNDARY) && (config.GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY) && - (config.GetMarker_All_KindBC(iMarker) != PERIODIC_BOUNDARY)) { + (config.GetMarker_All_KindBC(iMarker) != PERIODIC_BOUNDARY)) + { /*--- Work is shared in inner loop as two markers * may try to update the same point. ---*/ SU2_OMP_FOR_STAT(32) - for (size_t iVertex = 0; iVertex < geometry.GetnVertex(iMarker); ++iVertex) { + for (size_t iVertex = 0; iVertex < geometry.GetnVertex(iMarker); ++iVertex) + { size_t iPoint = geometry.vertex[iMarker][iVertex]->GetNode(); auto nodes = geometry.nodes; @@ -143,25 +153,20 @@ void computeGradientsGreenGauss(CSolver* solver, MPI_QUANTITIES kindMpiComm, PER if (!nodes->GetDomain(iPoint)) continue; su2double volume = nodes->GetVolume(iPoint) + nodes->GetPeriodicVolume(iPoint); + const auto area = geometry.vertex[iMarker][iVertex]->GetNormal(); for (size_t iVar = varBegin; iVar < varEnd; iVar++) - flux[iVar] = field(iPoint,iVar) / volume; - - for (size_t iVar = varBegin; iVar < varEnd; iVar++) { - for (size_t iDim = 0; iDim < nDim; iDim++) { - gradient(iPoint, iVar, iDim) -= flux[iVar] * area[iDim]; - } - } // loop over variables - } // vertices - END_SU2_OMP_FOR - } //found right marker - } // iMarkers - + { + su2double flux = field(iPoint,iVar) / volume; - /*--- Compute the corrections for symmetry planes and Euler walls. ---*/ - - correctGradientsSymmetry(geometry, config, varBegin, varEnd, idxVel, gradient); + for (size_t iDim = 0; iDim < nDim; iDim++) + gradient(iPoint, iVar, iDim) -= flux * area[iDim]; + } + } + END_SU2_OMP_FOR + } + } /*--- If no solver was provided we do not communicate ---*/ @@ -169,7 +174,8 @@ void computeGradientsGreenGauss(CSolver* solver, MPI_QUANTITIES kindMpiComm, PER /*--- Account for periodic contributions. ---*/ - for (size_t iPeriodic = 1; iPeriodic <= config.GetnMarker_Periodic() / 2; ++iPeriodic) { + for (size_t iPeriodic = 1; iPeriodic <= config.GetnMarker_Periodic()/2; ++iPeriodic) + { solver->InitiatePeriodicComms(&geometry, &config, iPeriodic, kindPeriodicComm); solver->CompletePeriodicComms(&geometry, &config, iPeriodic, kindPeriodicComm); } @@ -178,30 +184,35 @@ void computeGradientsGreenGauss(CSolver* solver, MPI_QUANTITIES kindMpiComm, PER solver->InitiateComms(&geometry, &config, kindMpiComm); solver->CompleteComms(&geometry, &config, kindMpiComm); -} -} // namespace detail - +} +} // end namespace /*! * \brief Instantiations for 2D and 3D. * \ingroup FvmAlgos */ -template -void computeGradientsGreenGauss(CSolver* solver, MPI_QUANTITIES kindMpiComm, PERIODIC_QUANTITIES kindPeriodicComm, - CGeometry& geometry, const CConfig& config, const FieldType& field, - const size_t varBegin, const size_t varEnd, const int idxVel, GradientType& gradient) { +template +void computeGradientsGreenGauss(CSolver* solver, + MPI_QUANTITIES kindMpiComm, + PERIODIC_QUANTITIES kindPeriodicComm, + CGeometry& geometry, + const CConfig& config, + const FieldType& field, + size_t varBegin, + size_t varEnd, + GradientType& gradient) { switch (geometry.GetnDim()) { - case 2: - detail::computeGradientsGreenGauss<2>(solver, kindMpiComm, kindPeriodicComm, geometry, config, field, varBegin, - varEnd, idxVel, gradient); - break; - case 3: - detail::computeGradientsGreenGauss<3>(solver, kindMpiComm, kindPeriodicComm, geometry, config, field, varBegin, - varEnd, idxVel, gradient); - break; - default: - SU2_MPI::Error("Too many dimensions to compute gradients.", CURRENT_FUNCTION); - break; + case 2: + detail::computeGradientsGreenGauss<2>(solver, kindMpiComm, kindPeriodicComm, geometry, + config, field, varBegin, varEnd, gradient); + break; + case 3: + detail::computeGradientsGreenGauss<3>(solver, kindMpiComm, kindPeriodicComm, geometry, + config, field, varBegin, varEnd, gradient); + break; + default: + SU2_MPI::Error("Too many dimensions to compute gradients.", CURRENT_FUNCTION); + break; } } diff --git a/SU2_CFD/include/gradients/computeGradientsLeastSquares.hpp b/SU2_CFD/include/gradients/computeGradientsLeastSquares.hpp index ef476e7a3df..29daee7f06e 100644 --- a/SU2_CFD/include/gradients/computeGradientsLeastSquares.hpp +++ b/SU2_CFD/include/gradients/computeGradientsLeastSquares.hpp @@ -28,7 +28,6 @@ #include "../../../Common/include/parallelization/omp_structure.hpp" #include "../../../Common/include/toolboxes/geometry_toolbox.hpp" -#include "correctGradientsSymmetry.hpp" namespace detail { @@ -176,7 +175,6 @@ FORCEINLINE void solveLeastSquares(size_t iPoint, * \param[in] field - Generic object implementing operator (iPoint, iVar). * \param[in] varBegin - Index of first variable for which to compute the gradient. * \param[in] varEnd - Index of last variable for which to compute the gradient. - * \param[in] idxVel - Index to velocity, -1 if no velocity is present in the solver. * \param[out] gradient - Generic object implementing operator (iPoint, iVar, iDim). * \param[out] Rmatrix - Generic object implementing operator (iPoint, iDim, iDim). */ @@ -188,9 +186,8 @@ void computeGradientsLeastSquares(CSolver* solver, const CConfig& config, bool weighted, const FieldType& field, - const size_t varBegin, - const size_t varEnd, - const int idxVel, + size_t varBegin, + size_t varEnd, GradientType& gradient, RMatrixType& Rmatrix) { @@ -315,10 +312,6 @@ void computeGradientsLeastSquares(CSolver* solver, END_SU2_OMP_FOR } - /* --- compute the corrections for symmetry planes and Euler walls. --- */ - - correctGradientsSymmetry(geometry, config, varBegin, varEnd, idxVel, gradient); - /*--- If no solver was provided we do not communicate ---*/ if (solver != nullptr) @@ -344,19 +337,18 @@ void computeGradientsLeastSquares(CSolver* solver, const CConfig& config, bool weighted, const FieldType& field, - const size_t varBegin, - const size_t varEnd, - const int idxVel, + size_t varBegin, + size_t varEnd, GradientType& gradient, RMatrixType& Rmatrix) { switch (geometry.GetnDim()) { case 2: detail::computeGradientsLeastSquares<2>(solver, kindMpiComm, kindPeriodicComm, geometry, config, - weighted, field, varBegin, varEnd, idxVel, gradient, Rmatrix); + weighted, field, varBegin, varEnd, gradient, Rmatrix); break; case 3: detail::computeGradientsLeastSquares<3>(solver, kindMpiComm, kindPeriodicComm, geometry, config, - weighted, field, varBegin, varEnd, idxVel, gradient, Rmatrix); + weighted, field, varBegin, varEnd, gradient, Rmatrix); break; default: SU2_MPI::Error("Too many dimensions to compute gradients.", CURRENT_FUNCTION); diff --git a/SU2_CFD/include/gradients/correctGradientsSymmetry.hpp b/SU2_CFD/include/gradients/correctGradientsSymmetry.hpp deleted file mode 100644 index a17ce827184..00000000000 --- a/SU2_CFD/include/gradients/correctGradientsSymmetry.hpp +++ /dev/null @@ -1,146 +0,0 @@ -/*! - * \file correctGradientsSymmetry.hpp - * \brief Implements the symmetry boundary conditions for the gradient computations. - * \author N. Beishuizen - * \version 8.0.1 "Harrier" - * - * SU2 Project Website: https://su2code.github.io - * - * The SU2 Project is maintained by the SU2 Foundation - * (http://su2foundation.org) - * - * Copyright 2012-2024, SU2 Contributors (cf. AUTHORS.md) - * - * SU2 is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * SU2 is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with SU2. If not, see . - */ - -#pragma once - -#include -#include - -#include "../../../Common/include/parallelization/omp_structure.hpp" -#include "../../../Common/include/toolboxes/geometry_toolbox.hpp" - -namespace detail { -/*! - * \brief Correct the gradient on a symmetry plane. - * \ingroup FvmAlgos - * \param[in] varBegin - Start of the variables. - * \param[in] varEnd - End of the variables. - * \param[in] idxVel - Variable index where velocity gradients start (-1 if all variables are scalars). - * \param[in] n - Normal direction. - * \param[in, out] gradients - The gradients to be modified. - */ -template -inline void correctGradient(const size_t varBegin, const size_t varEnd, const int idxVel, const Scalar* n, - Matrix&& gradients) { - - /*--- First we correct the part that involves velocities. ---*/ - - if (idxVel >= static_cast(varBegin) && idxVel + nDim <= varEnd) { - /*--- Normal gradient of velocity components and gradient of normal velocity. ---*/ - su2double normalGrad[nDim] = {}, gradNormalVel[nDim] = {}; - - for (size_t iDim = 0; iDim < nDim; iDim++) { - normalGrad[iDim] = GeometryToolbox::DotProduct(nDim, gradients[idxVel + iDim], n); - - for (size_t jDim = 0; jDim < nDim; jDim++) { - gradNormalVel[jDim] += n[iDim] * gradients[idxVel + iDim][jDim]; - } - } - - /*--- Normal gradient of the normal velocity. ---*/ - const su2double normalGradNormalVel = GeometryToolbox::DotProduct(nDim, n, gradNormalVel); - - /*--- Remove the tangential projection (I - n.n^T) of the normal gradients. - * And the normal projection (n.n^T) of the tangential gradients. - * dV = dV - (I - n.n^T) dV n.n^T - n.n^T dV (I - n.n^T) ---*/ - - for (size_t iDim = 0; iDim < nDim; iDim++) { - for (size_t jDim = 0; jDim < nDim; jDim++) { - gradients[idxVel + iDim][jDim] -= normalGrad[iDim] * n[jDim] + n[iDim] * gradNormalVel[jDim]; - gradients[idxVel + iDim][jDim] += 2 * n[iDim] * normalGradNormalVel * n[jDim]; - } - } - } - - /*--- Remove the normal component for all scalars (excluding velocities). ---*/ - - for (auto iVar = varBegin; iVar < varEnd; iVar++) { - if (idxVel != -1 && static_cast(iVar) >= idxVel && iVar < idxVel + nDim) continue; - - const su2double normalGrad = GeometryToolbox::DotProduct(nDim, n, gradients[iVar]); - for (size_t iDim = 0; iDim < nDim; iDim++) { - gradients[iVar][iDim] -= normalGrad * n[iDim]; - } - } -} -} - -/*! - * \brief Correct gradients on symmetry and Euler (slip) markers to respect the conditions: - * 1. n.grad(phi) = 0 - * 2. n.grad(v.t) = 0 - * 3. t.grad(v.n) = 0 - * \note See Blazek eq. 8.40. - * \ingroup FvmAlgos - * \param[in] geometry - Geometric grid properties. - * \param[in] config - Configuration of the problem, used to identify types of boundaries. - * \param[in] varBegin - Index of first variable for which to compute the gradient. - * \param[in] varEnd - Index of last variable for which to compute the gradient. - * \param[in] idxVel - Index to velocity, -1 if no velocity is present in the solver. - * \param[in,out] gradient - Generic object implementing operator (iPoint, iVar, iDim). - */ -template -void correctGradientsSymmetry(CGeometry& geometry, const CConfig& config, const size_t varBegin, - const size_t varEnd, const int idxVel, GradientType& gradient) { - - /*--- Check how many symmetry planes there are. ---*/ - std::vector symMarkers; - for (auto iMarker = 0u; iMarker < geometry.GetnMarker(); ++iMarker) { - if (config.GetMarker_All_KindBC(iMarker) == SYMMETRY_PLANE || - config.GetMarker_All_KindBC(iMarker) == EULER_WALL) { - symMarkers.push_back(iMarker); - } - } - - for (const auto iMarker : symMarkers) { - SU2_OMP_FOR_STAT(32) - for (size_t iVertex = 0; iVertex < geometry.GetnVertex(iMarker); ++iVertex) { - - const auto iPoint = geometry.vertex[iMarker][iVertex]->GetNode(); - - /*--- Get the normal of the current symmetry. This may be the original normal of the vertex - * or a modified normal if there are intersecting symmetries. ---*/ - - su2double unitNormal[nDim] = {}; - const auto it = geometry.symmetryNormals[iMarker].find(iVertex); - - if (it != geometry.symmetryNormals[iMarker].end()) { - for (auto iDim = 0u; iDim < nDim; iDim++) unitNormal[iDim] = it->second[iDim]; - } else { - geometry.vertex[iMarker][iVertex]->GetNormal(unitNormal); - const su2double area = GeometryToolbox::Norm(nDim, unitNormal); - for (auto iDim = 0u; iDim < nDim; iDim++) unitNormal[iDim] /= area; - } - - detail::correctGradient(varBegin, varEnd, idxVel, unitNormal, gradient[iPoint]); - - } // loop over vertices - END_SU2_OMP_FOR - } // markers - -} - diff --git a/SU2_CFD/include/interfaces/CInterface.hpp b/SU2_CFD/include/interfaces/CInterface.hpp index 996fa800cff..9ec0599827e 100644 --- a/SU2_CFD/include/interfaces/CInterface.hpp +++ b/SU2_CFD/include/interfaces/CInterface.hpp @@ -159,14 +159,14 @@ class CInterface { const CConfig *target_config, unsigned long Marker_Target, unsigned long Vertex_Target, unsigned long Point_Target) = 0; - // /*! - // * \brief A virtual member. - // * \param[in] target_solution - Solution from the target mesh. - // * \param[in] target_solution - Solution from the target mesh. - // * \param[in] donor_zone - Index of the donorZone. - // */ - // inline virtual void SetAverageValues(CSolver *donor_solution, CSolver *target_solution, - // unsigned short donorZone) { } + /*! + * \brief A virtual member. + * \param[in] target_solution - Solution from the target mesh. + * \param[in] target_solution - Solution from the target mesh. + * \param[in] donor_zone - Index of the donorZone. + */ + inline virtual void SetAverageValues(CSolver *donor_solution, CSolver *target_solution, + unsigned short donorZone) { } /*! * \brief A virtual member. @@ -185,15 +185,6 @@ class CInterface { */ inline virtual void SetSpanWiseLevels(const CConfig *donor_config, const CConfig *target_config) { } - /*! - * \brief A virtual member. - * \param[in] target_solution - Solution from the target mesh. - * \param[in] target_solution - Solution from the target mesh. - * \param[in] donor_zone - Index of the donorZone. - */ - inline virtual void SetAverageValues(CSolver *donor_solution, CSolver *target_solution, - unsigned short donorZone) { } - /*! * \brief Transfer pre-processing for the mixing plane inteface. * \param[in] donor_geometry - Geometry of the donor mesh. @@ -216,10 +207,16 @@ class CInterface { void AllgatherAverage(CSolver *donor_solution, CSolver *target_solution, CGeometry *donor_geometry, CGeometry *target_geometry, const CConfig *donor_config, const CConfig *target_config, unsigned short iMarkerInt); - + /*! - * \brief Set the contact resistance value for the solid-to-solid heat transfer interface. - * \param[in] val_contact_resistance - Contact resistance value in m^2/W + * \brief Interpolate data and scatter it into different processors, for matching meshes. + * \param[in] donor_solution - Solution from the donor mesh. + * \param[in] target_solution - Solution from the target mesh. + * \param[in] donor_geometry - Geometry of the donor mesh. + * \param[in] target_geometry - Geometry of the target mesh. + * \param[in] donor_config - Definition of the problem at the donor mesh. + * \param[in] target_config - Definition of the problem at the target mesh. */ - inline virtual void SetContactResistance(su2double val_contact_resistance) {}; -}; \ No newline at end of file + void GatherAverageValues(CSolver *donor_solution, CSolver *target_solution, unsigned short donorZone); + +}; diff --git a/SU2_CFD/include/numerics/flow/convection/hllc.hpp b/SU2_CFD/include/numerics/flow/convection/hllc.hpp index 62d46a7d211..5cac798825e 100644 --- a/SU2_CFD/include/numerics/flow/convection/hllc.hpp +++ b/SU2_CFD/include/numerics/flow/convection/hllc.hpp @@ -49,7 +49,7 @@ class CUpwHLLC_Flow final : public CNumerics { su2double sq_velRoe, RoeDensity, RoeEnthalpy, RoeSoundSpeed, RoeProjVelocity, ProjInterfaceVel; - su2double sL, sR, sM, pStar, EStar, rhoSL, rhoSR, Rrho; + su2double sL, sR, sM, pStar, EStar, rhoSL, rhoSR, Rrho, kappa; su2double Omega, RHO, OmegaSM; su2double *dSm_dU, *dPI_dU, *drhoStar_dU, *dpStar_dU, *dEStar_dU; @@ -102,7 +102,7 @@ class CUpwGeneralHLLC_Flow final : public CNumerics { su2double sq_velRoe, RoeDensity, RoeEnthalpy, RoeSoundSpeed, RoeProjVelocity, ProjInterfaceVel; su2double Kappa_i, Kappa_j, Chi_i, Chi_j, RoeKappa, RoeChi, RoeKappaStaticEnthalpy; - su2double sL, sR, sM, pStar, EStar, rhoSL, rhoSR, Rrho; + su2double sL, sR, sM, pStar, EStar, rhoSL, rhoSR, Rrho, kappa; su2double Omega, RHO, OmegaSM; su2double *dSm_dU, *dPI_dU, *drhoStar_dU, *dpStar_dU, *dEStar_dU; diff --git a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp index ce75b38f115..bdf9d0c6fc4 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp @@ -77,41 +77,9 @@ class CSourceBase_TurbSA : public CNumerics { const FlowIndices idx; /*!< \brief Object to manage the access to the flow primitives. */ const SA_ParsedOptions options; /*!< \brief Struct with SA options. */ - const bool axisymmetric = false; bool transition_LM; - /*! - * \brief Add contribution from diffusion due to axisymmetric formulation to 2D residual - */ - inline void ResidualAxisymmetricDiffusion(su2double sigma) { - if (Coord_i[1] < EPS) return; - - const su2double yinv = 1.0 / Coord_i[1]; - const su2double& nue = ScalarVar_i[0]; - - const auto& density = V_i[idx.Density()]; - const auto& laminar_viscosity = V_i[idx.LaminarViscosity()]; - - const su2double nu = laminar_viscosity/density; - - su2double nu_e; - - if (options.version == SA_OPTIONS::NEG && nue < 0.0) { - const su2double cn1 = 16.0; - const su2double Xi = nue / nu; - const su2double fn = (cn1 + Xi*Xi*Xi) / (cn1 - Xi*Xi*Xi); - nu_e = nu + fn * nue; - } else { - nu_e = nu + nue; - } - - /* Diffusion source term */ - const su2double dv_axi = (1.0/sigma)*nu_e*ScalarVar_Grad_i[0][1]; - - Residual += yinv * dv_axi * Volume; - } - public: /*! * \brief Constructor of the class. @@ -122,7 +90,6 @@ class CSourceBase_TurbSA : public CNumerics { : CNumerics(nDim, 1, config), idx(nDim, config->GetnSpecies()), options(config->GetSAParsedOptions()), - axisymmetric(config->GetAxisymmetric()), transition_LM(config->GetKind_Trans_Model() == TURB_TRANS_MODEL::LM) { /*--- Setup the Jacobian pointer, we need to return su2double** but we know * the Jacobian is 1x1 so we use this trick to avoid heap allocation. ---*/ @@ -250,9 +217,6 @@ class CSourceBase_TurbSA : public CNumerics { SourceTerms::get(ScalarVar_i[0], var, Production, Destruction, CrossProduction, Jacobian_i[0]); Residual = (Production - Destruction + CrossProduction) * Volume; - - if (axisymmetric) ResidualAxisymmetricDiffusion(var.sigma); - Jacobian_i[0] *= Volume; } @@ -556,19 +520,6 @@ class CCompressibilityCorrection final : public ParentClass { const su2double d_CompCorrection = 2.0 * c5 * ScalarVar_i[0] / pow(sound_speed, 2) * aux_cc * Volume; const su2double CompCorrection = 0.5 * ScalarVar_i[0] * d_CompCorrection; - /*--- Axisymmetric contribution ---*/ - if (this->axisymmetric && this->Coord_i[1] > EPS) { - const su2double yinv = 1.0 / this->Coord_i[1]; - const su2double nue = ScalarVar_i[0]; - const su2double v = V_i[idx.Velocity() + 1]; - - const su2double d_axiCorrection = 2.0 * c5 * nue * pow(v * yinv / sound_speed, 2) * Volume; - const su2double axiCorrection = 0.5 * nue * d_axiCorrection; - - this->Residual -= axiCorrection; - this->Jacobian_i[0] -= d_axiCorrection; - } - this->Residual -= CompCorrection; this->Jacobian_i[0] -= d_CompCorrection; @@ -789,7 +740,6 @@ class CSourcePieceWise_TurbSST final : public CNumerics { AD::SetPreaccIn(Vorticity_i, 3); AD::SetPreaccIn(V_i[idx.Density()], V_i[idx.LaminarViscosity()], V_i[idx.EddyViscosity()]); AD::SetPreaccIn(V_i[idx.Velocity() + 1]); - AD::SetPreaccIn(V_i[idx.SoundSpeed()]); Density_i = V_i[idx.Density()]; Laminar_Viscosity_i = V_i[idx.LaminarViscosity()]; @@ -828,8 +778,6 @@ class CSourcePieceWise_TurbSST final : public CNumerics { const su2double VorticityMag = GeometryToolbox::Norm(3, Vorticity_i); su2double P_Base = 0; - su2double zetaFMt = 0.0; - const su2double Mt = sqrt(2.0 * ScalarVar_i[0]) / V_i[idx.SoundSpeed()]; /*--- Apply production term modifications ---*/ switch (sstParsedOptions.production) { @@ -847,20 +795,6 @@ class CSourcePieceWise_TurbSST final : public CNumerics { P_Base = sqrt(StrainMag_i*VorticityMag); break; - case SST_OPTIONS::COMP_Wilcox: - P_Base = StrainMag_i; - if (Mt >= 0.25) { - zetaFMt = 2.0 * (Mt * Mt - 0.25 * 0.25); - } - break; - - case SST_OPTIONS::COMP_Sarkar: - P_Base = StrainMag_i; - if (Mt >= 0.25) { - zetaFMt = 0.5 * (Mt * Mt); - } - break; - default: /*--- Base production term for SST-1994 and SST-2003 ---*/ P_Base = StrainMag_i; @@ -897,15 +831,10 @@ class CSourcePieceWise_TurbSST final : public CNumerics { pw = max(pw, sust_w); } - if (sstParsedOptions.production == SST_OPTIONS::COMP_Sarkar) { - const su2double Dilatation_Sarkar = -0.15 * pk * Mt + 0.2 * beta_star * (1.0 +zetaFMt) * Density_i * ScalarVar_i[1] * ScalarVar_i[0] * Mt * Mt; - pk += Dilatation_Sarkar; - } - /*--- Dissipation ---*/ - su2double dk = beta_star * Density_i * ScalarVar_i[1] * ScalarVar_i[0] * (1.0 + zetaFMt); - su2double dw = beta_blended * Density_i * ScalarVar_i[1] * ScalarVar_i[1] * (1.0 - 0.09/beta_blended * zetaFMt); + su2double dk = beta_star * Density_i * ScalarVar_i[1] * ScalarVar_i[0]; + su2double dw = beta_blended * Density_i * ScalarVar_i[1] * ScalarVar_i[1]; /*--- LM model coupling with production and dissipation term for k transport equation---*/ if (config->GetKind_Trans_Model() == TURB_TRANS_MODEL::LM) { @@ -933,10 +862,10 @@ class CSourcePieceWise_TurbSST final : public CNumerics { /*--- Implicit part ---*/ - Jacobian_i[0][0] = -beta_star * ScalarVar_i[1] * Volume * (1.0 + zetaFMt); - Jacobian_i[0][1] = -beta_star * ScalarVar_i[0] * Volume * (1.0 + zetaFMt); + Jacobian_i[0][0] = -beta_star * ScalarVar_i[1] * Volume; + Jacobian_i[0][1] = -beta_star * ScalarVar_i[0] * Volume; Jacobian_i[1][0] = 0.0; - Jacobian_i[1][1] = -2.0 * beta_blended * ScalarVar_i[1] * Volume * (1.0 - 0.09/beta_blended * zetaFMt); + Jacobian_i[1][1] = -2.0 * beta_blended * ScalarVar_i[1] * Volume; } AD::SetPreaccOut(Residual, nVar); diff --git a/SU2_CFD/include/solvers/CEulerSolver.hpp b/SU2_CFD/include/solvers/CEulerSolver.hpp index 87700590937..d498b84c225 100644 --- a/SU2_CFD/include/solvers/CEulerSolver.hpp +++ b/SU2_CFD/include/solvers/CEulerSolver.hpp @@ -590,7 +590,7 @@ class CEulerSolver : public CFVMFlowSolverBaseGetnMarker(); iMarker++) { if ((config->GetMarker_All_KindBC(iMarker) != INTERNAL_BOUNDARY) && - (config->GetMarker_All_KindBC(iMarker) != SYMMETRY_PLANE) && - (config->GetMarker_All_KindBC(iMarker) != EULER_WALL) && (config->GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY) && (config->GetMarker_All_KindBC(iMarker) != PERIODIC_BOUNDARY)) { @@ -669,8 +667,6 @@ class CFVMFlowSolverBase : public CSolver { for (unsigned short iMarker = 0; iMarker < geometry->GetnMarker(); iMarker++) { if ((config->GetMarker_All_KindBC(iMarker) != INTERNAL_BOUNDARY) && - (config->GetMarker_All_KindBC(iMarker) != SYMMETRY_PLANE) && - (config->GetMarker_All_KindBC(iMarker) != EULER_WALL) && (config->GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY) && (config->GetMarker_All_KindBC(iMarker) != PERIODIC_BOUNDARY)) { @@ -1099,21 +1095,22 @@ class CFVMFlowSolverBase : public CSolver { /*! * \brief Store of a set of provided inlet profile values at a vertex. * \param[in] val_inlet - vector containing the inlet values for the current vertex. - * \param[in] iMarker - Index of the surface marker. + * \param[in] iMarker - Surface marker where the coefficient is computed. * \param[in] iVertex - Vertex of the marker iMarker where the inlet is being set. */ void SetInletAtVertex(const su2double* val_inlet, unsigned short iMarker, unsigned long iVertex) final; /*! - * \brief Get the set of values imposed at an inlet. - * \param[in] iMarker - Index of the surface marker. - * \param[in] iVertex - Vertex of the marker iMarker where the inlet is being set. + * \brief Get the set of value imposed at an inlet. + * \param[in] val_inlet - vector returning the inlet values for the current vertex. + * \param[in] val_inlet_point - Node index where the inlet is being set. + * \param[in] val_kind_marker - Enumerated type for the particular inlet type. * \param[in] geometry - Geometrical definition of the problem. - * \param[in,out] val_inlet - vector returning the inlet values for the current vertex. + * \param config - Definition of the particular problem. * \return Value of the face area at the vertex. */ - su2double GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, - const CGeometry* geometry, su2double* val_inlet) const final; + su2double GetInletAtVertex(su2double* val_inlet, unsigned long val_inlet_point, unsigned short val_kind_marker, + string val_marker, const CGeometry* geometry, const CConfig* config) const final; /*! * \author T. Kattmann diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index f60db438e18..eb3edb511db 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -386,7 +386,7 @@ void CFVMFlowSolverBase::SetPrimitive_Gradient_GG(CGeometry* geometry, con const auto comm = reconstruction? MPI_QUANTITIES::PRIMITIVE_GRAD_REC : MPI_QUANTITIES::PRIMITIVE_GRADIENT; const auto commPer = reconstruction? PERIODIC_PRIM_GG_R : PERIODIC_PRIM_GG; - computeGradientsGreenGauss(this, comm, commPer, *geometry, *config, primitives, 0, nPrimVarGrad, prim_idx.Velocity(), gradient); + computeGradientsGreenGauss(this, comm, commPer, *geometry, *config, primitives, 0, nPrimVarGrad, gradient); } template @@ -411,7 +411,7 @@ void CFVMFlowSolverBase::SetPrimitive_Gradient_LS(CGeometry* geometry, con const auto comm = reconstruction? MPI_QUANTITIES::PRIMITIVE_GRAD_REC : MPI_QUANTITIES::PRIMITIVE_GRADIENT; computeGradientsLeastSquares(this, comm, commPer, *geometry, *config, weighted, - primitives, 0, nPrimVarGrad, prim_idx.Velocity(), gradient, rmatrix); + primitives, 0, nPrimVarGrad, gradient, rmatrix); } template @@ -722,48 +722,73 @@ void CFVMFlowSolverBase::SetInletAtVertex(const su2double* val_inlet, unsi } template -su2double CFVMFlowSolverBase::GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, - const CGeometry* geometry, su2double* val_inlet) const { - const auto T_position = nDim; - const auto P_position = nDim + 1; - const auto FlowDir_position = nDim + 2; - val_inlet[T_position] = Inlet_Ttotal[iMarker][iVertex]; - val_inlet[P_position] = Inlet_Ptotal[iMarker][iVertex]; - for (unsigned short iDim = 0; iDim < nDim; iDim++) { - val_inlet[FlowDir_position + iDim] = Inlet_FlowDir[iMarker][iVertex][iDim]; +su2double CFVMFlowSolverBase::GetInletAtVertex(su2double* val_inlet, unsigned long val_inlet_point, + unsigned short val_kind_marker, string val_marker, + const CGeometry* geometry, const CConfig* config) const { + /*--- Local variables ---*/ + + unsigned short iMarker, iDim; + unsigned long iPoint, iVertex; + su2double Area = 0.0; + su2double Normal[3] = {0.0, 0.0, 0.0}; + + /*--- Alias positions within inlet file for readability ---*/ + + unsigned short T_position = nDim; + unsigned short P_position = nDim + 1; + unsigned short FlowDir_position = nDim + 2; + + if (val_kind_marker == INLET_FLOW) { + for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { + if ((config->GetMarker_All_KindBC(iMarker) == INLET_FLOW) && + (config->GetMarker_All_TagBound(iMarker) == val_marker)) { + for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { + iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); + + if (iPoint == val_inlet_point) { + /*-- Compute boundary face area for this vertex. ---*/ + + geometry->vertex[iMarker][iVertex]->GetNormal(Normal); + Area = GeometryToolbox::Norm(nDim, Normal); + + /*--- Access and store the inlet variables for this vertex. ---*/ + + val_inlet[T_position] = Inlet_Ttotal[iMarker][iVertex]; + val_inlet[P_position] = Inlet_Ptotal[iMarker][iVertex]; + for (iDim = 0; iDim < nDim; iDim++) { + val_inlet[FlowDir_position + iDim] = Inlet_FlowDir[iMarker][iVertex][iDim]; + } + + /*--- Exit once we find the point. ---*/ + + return Area; + } + } + } + } } - /*--- Compute boundary face area for this vertex. ---*/ + /*--- If we don't find a match, then the child point is not on the + current inlet boundary marker. Return zero area so this point does + not contribute to the restriction operator and continue. ---*/ - su2double Normal[MAXNDIM] = {0.0}; - geometry->vertex[iMarker][iVertex]->GetNormal(Normal); - return GeometryToolbox::Norm(nDim, Normal); + return Area; } template void CFVMFlowSolverBase::SetUniformInlet(const CConfig* config, unsigned short iMarker) { if (config->GetMarker_All_KindBC(iMarker) == INLET_FLOW) { - const string Marker_Tag = config->GetMarker_All_TagBound(iMarker); - const su2double p_total = config->GetInletPtotal(Marker_Tag); - const su2double t_total = config->GetInletTtotal(Marker_Tag); - const su2double* flow_dir = config->GetInletFlowDir(Marker_Tag); + string Marker_Tag = config->GetMarker_All_TagBound(iMarker); + su2double p_total = config->GetInletPtotal(Marker_Tag); + su2double t_total = config->GetInletTtotal(Marker_Tag); + auto flow_dir = config->GetInletFlowDir(Marker_Tag); for (unsigned long iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { Inlet_Ttotal[iMarker][iVertex] = t_total; Inlet_Ptotal[iMarker][iVertex] = p_total; for (unsigned short iDim = 0; iDim < nDim; iDim++) Inlet_FlowDir[iMarker][iVertex][iDim] = flow_dir[iDim]; } - } else if (config->GetMarker_All_KindBC(iMarker) == SUPERSONIC_INLET) { - const string Marker_Tag = config->GetMarker_All_TagBound(iMarker); - const su2double p = config->GetInlet_Pressure(Marker_Tag); - const su2double t = config->GetInlet_Temperature(Marker_Tag); - const su2double* vel = config->GetInlet_Velocity(Marker_Tag); - for (unsigned long iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { - Inlet_Ttotal[iMarker][iVertex] = t; - Inlet_Ptotal[iMarker][iVertex] = p; - for (unsigned short iDim = 0; iDim < nDim; iDim++) Inlet_FlowDir[iMarker][iVertex][iDim] = vel[iDim]; - } } else { /*--- For now, non-inlets just get set to zero. In the future, we can do more customization for other boundary types here. ---*/ @@ -1064,7 +1089,7 @@ void CFVMFlowSolverBase::PushSolutionBackInTime(unsigned long TimeIter, bo CSolver*** solver_container, CGeometry** geometry, CConfig* config) { /*--- Push back the initial condition to previous solution containers - for a 1st-order restart or when simply initializing to freestream. ---*/ + for a 1st-order restart or when simply intitializing to freestream. ---*/ for (unsigned short iMesh = 0; iMesh <= config->GetnMGLevels(); iMesh++) { solver_container[iMesh][FLOW_SOL]->GetNodes()->Set_Solution_time_n(); @@ -1107,127 +1132,248 @@ void CFVMFlowSolverBase::PushSolutionBackInTime(unsigned long TimeIter, bo } } -template -void CFVMFlowSolverBase::BC_Sym_Plane(CGeometry* geometry, CSolver** solver_container, CNumerics* conv_numerics, - CNumerics* visc_numerics, CConfig* config, unsigned short val_marker) { - const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); - const auto iVel = prim_idx.Velocity(); +template +void CFVMFlowSolverBase::BC_Sym_Plane(CGeometry* geometry, CSolver** solver_container, CNumerics* conv_numerics, + CNumerics* visc_numerics, CConfig* config, unsigned short val_marker) { + unsigned short iDim, iVar; + unsigned long iVertex, iPoint; - /*--- Blazek chapter 8.: - * The components of the momentum residual normal to the symmetry plane are zeroed out. - * The gradients have already been corrected acording to Eq. (8.40). - * Contrary to Blazek we keep some scalar fluxes computed on the boundary to improve stability (see below). ---*/ + bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); + bool viscous = config->GetViscous(); + bool preprocessed = false; - /*--- Loop over all the vertices on this boundary marker. ---*/ + /*--- Allocation of variables necessary for convective fluxes. ---*/ + su2double Area, ProjVelocity_i, *V_reflected, *V_domain, Normal[MAXNDIM] = {0.0}, UnitNormal[MAXNDIM] = {0.0}; - SU2_OMP_FOR_DYN(OMP_MIN_SIZE) - for (auto iVertex = 0ul; iVertex < geometry->nVertex[val_marker]; iVertex++) { - const auto iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); + /*--- Allocation of variables necessary for viscous fluxes. ---*/ + su2double ProjGradient, ProjNormVelGrad, ProjTangVelGrad, TangentialNorm, + Tangential[MAXNDIM] = {0.0}, GradNormVel[MAXNDIM] = {0.0}, GradTangVel[MAXNDIM] = {0.0}; - /*--- Halo points do not need to be considered. ---*/ - if (!geometry->nodes->GetDomain(iPoint)) continue; + /*--- Allocation of primitive gradient arrays for viscous fluxes. ---*/ + su2activematrix Grad_Reflected(nPrimVarGrad, nDim); - /*--- Get the normal of the current symmetry. This may be the original normal of the vertex - * or a modified normal if there are intersecting symmetries. ---*/ - - su2double Normal[MAXNDIM] = {}, UnitNormal[MAXNDIM] = {}; - geometry->vertex[val_marker][iVertex]->GetNormal(Normal); - const auto it = geometry->symmetryNormals[val_marker].find(iVertex); + /*--- Loop over all the vertices on this boundary marker. ---*/ - if (it != geometry->symmetryNormals[val_marker].end()) { - for (auto iDim = 0u; iDim < nDim; iDim++) UnitNormal[iDim] = it->second[iDim]; - } else { - const su2double Area = GeometryToolbox::Norm(nDim, Normal); - for (auto iDim = 0u; iDim < nDim; iDim++) UnitNormal[iDim] = Normal[iDim] / Area; - } + SU2_OMP_FOR_DYN(OMP_MIN_SIZE) + for (iVertex = 0; iVertex < geometry->nVertex[val_marker]; iVertex++) { + if (!preprocessed || geometry->bound_is_straight[val_marker] != true) { + /*----------------------------------------------------------------------------------------------*/ + /*--- Preprocessing: ---*/ + /*--- Compute the unit normal and (in case of viscous flow) a corresponding unit tangential ---*/ + /*--- to that normal. On a straight(2D)/plane(3D) boundary these two vectors are constant. ---*/ + /*--- This circumstance is checked in geometry->ComputeSurf_Straightness(...) and stored ---*/ + /*--- such that the recomputation does not occur for each node. On true symmetry planes, the ---*/ + /*--- normal is constant but this routines is used for Symmetry, Euler-Wall in inviscid flow ---*/ + /*--- and Euler Wall in viscous flow as well. In the latter curvy boundaries are likely to ---*/ + /*--- happen. In doubt, the conditional above which checks straightness can be thrown out ---*/ + /*--- such that the recomputation is done for each node (which comes with a tiny performance ---*/ + /*--- penalty). ---*/ + /*----------------------------------------------------------------------------------------------*/ + + preprocessed = true; + + /*--- Normal vector for a random vertex (zero) on this marker (negate for outward convention). ---*/ + geometry->vertex[val_marker][iVertex]->GetNormal(Normal); + for (iDim = 0; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; + + /*--- Compute unit normal, to be used for unit tangential, projected velocity and velocity + component gradients. ---*/ + Area = GeometryToolbox::Norm(nDim, Normal); - su2double* V_reflected = GetCharacPrimVar(val_marker, iVertex); + for (iDim = 0; iDim < nDim; iDim++) UnitNormal[iDim] = -Normal[iDim] / Area; - /*--- Grid movement ---*/ - if (dynamic_grid) - conv_numerics->SetGridVel(geometry->nodes->GetGridVel(iPoint), geometry->nodes->GetGridVel(iPoint)); + /*--- Preprocessing: Compute unit tangential, the direction is arbitrary as long as + t*n=0 && |t|_2 = 1 ---*/ + if (viscous) { + switch (nDim) { + case 2: { + Tangential[0] = -UnitNormal[1]; + Tangential[1] = UnitNormal[0]; + break; + } + case 3: { + /*--- n = ai + bj + ck, if |b| > |c| ---*/ + if (abs(UnitNormal[1]) > abs(UnitNormal[2])) { + /*--- t = bi + (c-a)j - bk ---*/ + Tangential[0] = UnitNormal[1]; + Tangential[1] = UnitNormal[2] - UnitNormal[0]; + Tangential[2] = -UnitNormal[1]; + } else { + /*--- t = ci - cj + (b-a)k ---*/ + Tangential[0] = UnitNormal[2]; + Tangential[1] = -UnitNormal[2]; + Tangential[2] = UnitNormal[1] - UnitNormal[0]; + } + /*--- Make it a unit vector. ---*/ + TangentialNorm = sqrt(pow(Tangential[0], 2) + pow(Tangential[1], 2) + pow(Tangential[2], 2)); + Tangential[0] = Tangential[0] / TangentialNorm; + Tangential[1] = Tangential[1] / TangentialNorm; + Tangential[2] = Tangential[2] / TangentialNorm; + break; + } + } // switch + } // if viscous + } // if bound_is_straight + + iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); + + /*--- Check if the node belongs to the domain (i.e., not a halo node) ---*/ + if (geometry->nodes->GetDomain(iPoint)) { + /*-------------------------------------------------------------------------------*/ + /*--- Step 1: For the convective fluxes, create a reflected state of the ---*/ + /*--- Primitive variables by copying all interior values to the ---*/ + /*--- reflected. Only the velocity is mirrored along the symmetry ---*/ + /*--- axis. Based on the Upwind_Residual routine. ---*/ + /*-------------------------------------------------------------------------------*/ + + /*--- Allocate the reflected state at the symmetry boundary. ---*/ + V_reflected = GetCharacPrimVar(val_marker, iVertex); + + /*--- Grid movement ---*/ + if (dynamic_grid) + conv_numerics->SetGridVel(geometry->nodes->GetGridVel(iPoint), geometry->nodes->GetGridVel(iPoint)); + + /*--- Normal vector for this vertex (negate for outward convention). ---*/ + geometry->vertex[val_marker][iVertex]->GetNormal(Normal); + for (iDim = 0; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; + conv_numerics->SetNormal(Normal); + + /*--- Get current solution at this boundary node ---*/ + V_domain = nodes->GetPrimitive(iPoint); + + /*--- Set the reflected state based on the boundary node. Scalars are copied and + the velocity is mirrored along the symmetry boundary, i.e. the velocity in + normal direction is substracted twice. ---*/ + for (iVar = 0; iVar < nPrimVar; iVar++) V_reflected[iVar] = nodes->GetPrimitive(iPoint, iVar); + + /*--- Compute velocity in normal direction (ProjVelcity_i=(v*n)) und substract twice from + velocity in normal direction: v_r = v - 2 (v*n)n ---*/ + ProjVelocity_i = nodes->GetProjVel(iPoint, UnitNormal); + + /*--- Adjustment to v.n due to grid movement. ---*/ + if (dynamic_grid) { + ProjVelocity_i -= GeometryToolbox::DotProduct(nDim, geometry->nodes->GetGridVel(iPoint), UnitNormal); + } - /*--- Normal vector for this vertex (negate for outward convention). ---*/ - for (auto iDim = 0u; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; - conv_numerics->SetNormal(Normal); + for (iDim = 0; iDim < nDim; iDim++) + V_reflected[iDim + 1] = nodes->GetVelocity(iPoint, iDim) - 2.0 * ProjVelocity_i * UnitNormal[iDim]; - for (auto iVar = 0u; iVar < nPrimVar; iVar++) - V_reflected[iVar] = nodes->GetPrimitive(iPoint, iVar); + /*--- Set Primitive and Secondary for numerics class. ---*/ + conv_numerics->SetPrimitive(V_domain, V_reflected); + conv_numerics->SetSecondary(nodes->GetSecondary(iPoint), nodes->GetSecondary(iPoint)); - su2double ProjVelocity_i = nodes->GetProjVel(iPoint, UnitNormal); - /*--- Adjustment to v.n due to grid movement. ---*/ - if (dynamic_grid) - ProjVelocity_i -= GeometryToolbox::DotProduct(nDim, geometry->nodes->GetGridVel(iPoint), UnitNormal); + /*--- Compute the residual using an upwind scheme. ---*/ - for (auto iDim = 0u; iDim < nDim; iDim++) - V_reflected[iDim + iVel] = nodes->GetVelocity(iPoint, iDim) - ProjVelocity_i * UnitNormal[iDim]; + auto residual = conv_numerics->ComputeResidual(config); - /*--- Get current solution at this boundary node ---*/ - const su2double* V_domain = nodes->GetPrimitive(iPoint); + /*--- Update residual value ---*/ + LinSysRes.AddBlock(iPoint, residual); - /*--- Set Primitive and Secondary for numerics class. ---*/ - conv_numerics->SetPrimitive(V_domain, V_reflected); - conv_numerics->SetSecondary(nodes->GetSecondary(iPoint), nodes->GetSecondary(iPoint)); + /*--- Jacobian contribution for implicit integration. ---*/ + if (implicit) { + Jacobian.AddBlock2Diag(iPoint, residual.jacobian_i); + } - /*--- Compute the residual using an upwind scheme. ---*/ - auto residual = conv_numerics->ComputeResidual(config); + if (viscous) { + /*-------------------------------------------------------------------------------*/ + /*--- Step 2: The viscous fluxes of the Navier-Stokes equations depend on the ---*/ + /*--- Primitive variables and their gradients. The viscous numerics ---*/ + /*--- container is filled just as the convective numerics container, ---*/ + /*--- but the primitive gradients of the reflected state have to be ---*/ + /*--- determined additionally such that symmetry at the boundary is ---*/ + /*--- enforced. Based on the Viscous_Residual routine. ---*/ + /*-------------------------------------------------------------------------------*/ + + /*--- Set the normal vector and the coordinates. ---*/ + visc_numerics->SetCoord(geometry->nodes->GetCoord(iPoint), geometry->nodes->GetCoord(iPoint)); + visc_numerics->SetNormal(Normal); + + /*--- Set the primitive and Secondary variables. ---*/ + visc_numerics->SetPrimitive(V_domain, V_reflected); + visc_numerics->SetSecondary(nodes->GetSecondary(iPoint), nodes->GetSecondary(iPoint)); + + /*--- For viscous Fluxes also the gradients of the primitives need to be determined. + 1. The gradients of scalars are mirrored along the sym plane just as velocity for the primitives + 2. The gradients of the velocity components need more attention, i.e. the gradient of the + normal velocity in tangential direction is mirrored and the gradient of the tangential velocity in + normal direction is mirrored. ---*/ + + /*--- Get gradients of primitives of boundary cell ---*/ + for (iVar = 0; iVar < nPrimVarGrad; iVar++) + for (iDim = 0; iDim < nDim; iDim++) + Grad_Reflected[iVar][iDim] = nodes->GetGradient_Primitive(iPoint, iVar, iDim); - /*--- We include an update of the continuity and energy here, this is important for stability since - * these fluxes include numerical diffusion. ---*/ - for (auto iVar = 0u; iVar < nVar; iVar++) { - if (iVar < iVel || iVar >= iVel + nDim) LinSysRes(iPoint, iVar) += residual.residual[iVar]; - } + /*--- Reflect the gradients for all scalars including the velocity components. + The gradients of the velocity components are set later with the + correct values: grad(V)_r = grad(V) - 2 [grad(V)*n]n, V beeing any primitive ---*/ + for (iVar = 0; iVar < nPrimVarGrad; iVar++) { + if (iVar == 0 || iVar > nDim) { // Exclude velocity component gradients - /*--- Explicitly set the velocity components normal to the symmetry plane to zero. - * This is necessary because the modification of the residual leaves the problem - * underconstrained (the normal residual is zero regardless of the normal velocity). ---*/ + /*--- Compute projected part of the gradient in a dot product ---*/ + ProjGradient = 0.0; + for (iDim = 0; iDim < nDim; iDim++) ProjGradient += Grad_Reflected[iVar][iDim] * UnitNormal[iDim]; - su2double* solutionOld = nodes->GetSolution_Old(iPoint); + for (iDim = 0; iDim < nDim; iDim++) + Grad_Reflected[iVar][iDim] = Grad_Reflected[iVar][iDim] - 2.0 * ProjGradient * UnitNormal[iDim]; + } + } - su2double gridVel[MAXNVAR] = {}; - if (dynamic_grid) { - for (auto iDim = 0u; iDim < nDim; iDim++) { - gridVel[iDim] = geometry->nodes->GetGridVel(iPoint)[iDim]; - } - if (FlowRegime == ENUM_REGIME::COMPRESSIBLE) { - for(auto iDim = 0u; iDim < nDim; iDim++) { - /*--- Multiply by density since we are correcting conservative variables. ---*/ - gridVel[iDim] *= nodes->GetDensity(iPoint); + /*--- Compute gradients of normal and tangential velocity: + grad(v*n) = grad(v_x) n_x + grad(v_y) n_y (+ grad(v_z) n_z) + grad(v*t) = grad(v_x) t_x + grad(v_y) t_y (+ grad(v_z) t_z) ---*/ + for (iVar = 0; iVar < nDim; iVar++) { // counts gradient components + GradNormVel[iVar] = 0.0; + GradTangVel[iVar] = 0.0; + for (iDim = 0; iDim < nDim; iDim++) { // counts sum with unit normal/tangential + GradNormVel[iVar] += Grad_Reflected[iDim + 1][iVar] * UnitNormal[iDim]; + GradTangVel[iVar] += Grad_Reflected[iDim + 1][iVar] * Tangential[iDim]; + } } - } - } - su2double vp = 0.0; - for (auto iDim = 0u; iDim < nDim; iDim++) { - vp += (solutionOld[iVel + iDim] - gridVel[iDim]) * UnitNormal[iDim]; - } - for (auto iDim = 0u; iDim < nDim; iDim++) { - solutionOld[iVel + iDim] -= vp * UnitNormal[iDim]; - } - /*--- Keep only the tangential part of the momentum residuals. ---*/ - su2double normalRes = 0.0; - for (auto iDim = 0u; iDim < nDim; iDim++) { - normalRes += LinSysRes(iPoint, iVel + iDim) * UnitNormal[iDim]; - } - for (auto iDim = 0u; iDim < nDim; iDim++) { - LinSysRes(iPoint, iVel + iDim) -= normalRes * UnitNormal[iDim]; - } + /*--- Refelect gradients in tangential and normal direction by substracting the normal/tangential + component twice, just as done with velocity above. + grad(v*n)_r = grad(v*n) - 2 {grad([v*n])*t}t + grad(v*t)_r = grad(v*t) - 2 {grad([v*t])*n}n ---*/ + ProjNormVelGrad = 0.0; + ProjTangVelGrad = 0.0; + for (iDim = 0; iDim < nDim; iDim++) { + ProjNormVelGrad += GradNormVel[iDim] * Tangential[iDim]; // grad([v*n])*t + ProjTangVelGrad += GradTangVel[iDim] * UnitNormal[iDim]; // grad([v*t])*n + } - /*--- Jacobian contribution for implicit integration. ---*/ - if (implicit) { - Jacobian.AddBlock2Diag(iPoint, residual.jacobian_i); - } + for (iDim = 0; iDim < nDim; iDim++) { + GradNormVel[iDim] = GradNormVel[iDim] - 2.0 * ProjNormVelGrad * Tangential[iDim]; + GradTangVel[iDim] = GradTangVel[iDim] - 2.0 * ProjTangVelGrad * UnitNormal[iDim]; + } - /*--- Correction for multigrid. ---*/ - normalRes = 0.0; - su2double* Res_TruncError = nodes->GetResTruncError(iPoint); - for (auto iDim = 0u; iDim < nDim; iDim++) { - normalRes += Res_TruncError[iVel + iDim] * UnitNormal[iDim]; - } - for (auto iDim = 0u; iDim < nDim; iDim++) { - Res_TruncError[iVel + iDim] -= normalRes * UnitNormal[iDim]; - } - } + /*--- Transfer reflected gradients back into the Cartesian Coordinate system: + grad(v_x)_r = grad(v*n)_r n_x + grad(v*t)_r t_x + grad(v_y)_r = grad(v*n)_r n_y + grad(v*t)_r t_y + ( grad(v_z)_r = grad(v*n)_r n_z + grad(v*t)_r t_z ) ---*/ + for (iVar = 0; iVar < nDim; iVar++) // loops over the velocity component gradients + for (iDim = 0; iDim < nDim; iDim++) // loops over the entries of the above + Grad_Reflected[iVar + 1][iDim] = + GradNormVel[iDim] * UnitNormal[iVar] + GradTangVel[iDim] * Tangential[iVar]; + + /*--- Set the primitive gradients of the boundary and reflected state. ---*/ + visc_numerics->SetPrimVarGradient(nodes->GetGradient_Primitive(iPoint), CMatrixView(Grad_Reflected)); + + /*--- Turbulent kinetic energy. ---*/ + if (config->GetKind_Turb_Model() == TURB_MODEL::SST) + visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint, 0), + solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint, 0)); + + /*--- Compute and update residual. Note that the viscous shear stress tensor is computed in the + following routine based upon the velocity-component gradients. ---*/ + auto residual = visc_numerics->ComputeResidual(config); + + LinSysRes.SubtractBlock(iPoint, residual); + + /*--- Jacobian contribution for implicit integration. ---*/ + if (implicit) Jacobian.SubtractBlock2Diag(iPoint, residual.jacobian_i); + } // if viscous + } // if GetDomain + } // for iVertex END_SU2_OMP_FOR } diff --git a/SU2_CFD/include/solvers/CScalarSolver.inl b/SU2_CFD/include/solvers/CScalarSolver.inl index 63936187185..1777fa2e289 100644 --- a/SU2_CFD/include/solvers/CScalarSolver.inl +++ b/SU2_CFD/include/solvers/CScalarSolver.inl @@ -111,15 +111,15 @@ void CScalarSolver::CommonPreprocessing(CGeometry *geometry, const if (config->GetReconstructionGradientRequired()) { switch(config->GetKind_Gradient_Method_Recon()) { - case GREEN_GAUSS: SetSolution_Gradient_GG(geometry, config, -1, true); break; - case LEAST_SQUARES: SetSolution_Gradient_LS(geometry, config, -1, true); break; - case WEIGHTED_LEAST_SQUARES: SetSolution_Gradient_LS(geometry, config, -1, true); break; + case GREEN_GAUSS: SetSolution_Gradient_GG(geometry, config, true); break; + case LEAST_SQUARES: SetSolution_Gradient_LS(geometry, config, true); break; + case WEIGHTED_LEAST_SQUARES: SetSolution_Gradient_LS(geometry, config, true); break; } } switch(config->GetKind_Gradient_Method()) { - case GREEN_GAUSS: SetSolution_Gradient_GG(geometry, config, -1); break; - case WEIGHTED_LEAST_SQUARES: SetSolution_Gradient_LS(geometry, config, -1); break; + case GREEN_GAUSS: SetSolution_Gradient_GG(geometry, config); break; + case WEIGHTED_LEAST_SQUARES: SetSolution_Gradient_LS(geometry, config); break; } if (limiter && muscl) SetSolution_Limiter(geometry, config); diff --git a/SU2_CFD/include/solvers/CSolver.hpp b/SU2_CFD/include/solvers/CSolver.hpp index 29c9b9d9d20..3c1062def94 100644 --- a/SU2_CFD/include/solvers/CSolver.hpp +++ b/SU2_CFD/include/solvers/CSolver.hpp @@ -543,19 +543,17 @@ class CSolver { * \brief Compute the Green-Gauss gradient of the solution. * \param[in] geometry - Geometrical definition of the problem. * \param[in] config - Definition of the particular problem. - * \param[in] idxVel - Index to velocity, -1 if no velocity is present in the solver. * \param[in] reconstruction - indicator that the gradient being computed is for upwind reconstruction. */ - void SetSolution_Gradient_GG(CGeometry *geometry, const CConfig *config, short idxVel, bool reconstruction = false); + void SetSolution_Gradient_GG(CGeometry *geometry, const CConfig *config, bool reconstruction = false); /*! * \brief Compute the Least Squares gradient of the solution. * \param[in] geometry - Geometrical definition of the problem. * \param[in] config - Definition of the particular problem. - * \param[in] idxVel - Index to velocity, -1 if no velocity is present in the solver. * \param[in] reconstruction - indicator that the gradient being computed is for upwind reconstruction. */ - void SetSolution_Gradient_LS(CGeometry *geometry, const CConfig *config, short idxVel, bool reconstruction = false); + void SetSolution_Gradient_LS(CGeometry *geometry, const CConfig *config, bool reconstruction = false); /*! * \brief Compute the Least Squares gradient of the grid velocity. @@ -1089,38 +1087,6 @@ class CSolver { CConfig *config, unsigned short val_marker) { } - /*! - * - * \brief Generalized handling of calculation of total inlet boundary condition inputs - * \param[in] conv_numerics - Description of the numerical method. - * \param[in] config - Definition of the particular problem. - * \param[in] val_marker - Surface marker where the boundary condition is applied. - * \param[in] iSpan - Current spanwise position - * \param[in] SpanwisePosition - Spanwise position where flow quantaties are evaluated - */ - inline virtual void BC_Giles_Total_Inlet(CNumerics *conv_numerics, - CConfig *config, - unsigned short val_marker, - su2double *&c_avg, - su2double *&R, - su2double **&R_c_inv, - su2double **&R_c, - unsigned short iSpan, - unsigned short SpanwisePosition) { } - - /*! - * - * \brief Generalized handling of calculation of mixing plane boundary condition inputs - * \param[in] conv_numerics - Description of the numerical method. - * \param[in] val_marker - Surface marker where the boundary condition is applied. - * \param[in] SpanwisePosition - Spanwise position where flow quantaties are evaluated - */ - inline virtual void BC_Giles_Mixing(CNumerics *conv_numerics, - unsigned short val_marker, - su2double *&deltaprim, - su2double *&c_avg, - unsigned short SpanwisePosition) { } - /*! * \brief A virtual member. * \param[in] geometry - Geometrical definition of the problem. @@ -2927,7 +2893,7 @@ class CSolver { * \param[in] config - Definition of the particular problem. * \param[in] iMarker - Surface marker where the coefficient is computed. */ - inline virtual void SetUniformInlet(const CConfig* config, unsigned short iMarker) {} + inline virtual void SetUniformInlet(const CConfig* config, unsigned short iMarker) {}; /*! * \brief A virtual member @@ -2937,18 +2903,23 @@ class CSolver { */ inline virtual void SetInletAtVertex(const su2double *val_inlet, unsigned short iMarker, - unsigned long iVertex) { } + unsigned long iVertex) { }; /*! - * \brief Get the set of values imposed at an inlet. - * \param[in] iMarker - Index of the surface marker. - * \param[in] iVertex - Vertex of the marker iMarker where the inlet is being set. + * \brief A virtual member + * \param[in] val_inlet - vector returning the inlet values for the current vertex. + * \param[in] val_inlet_point - Node index where the inlet is being set. + * \param[in] val_kind_marker - Enumerated type for the particular inlet type. * \param[in] geometry - Geometrical definition of the problem. - * \param[in,out] val_inlet - vector returning the inlet values for the current vertex. + * \param config - Definition of the particular problem. * \return Value of the face area at the vertex. */ - inline virtual su2double GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, - const CGeometry* geometry, su2double* val_inlet) const { return 0; } + inline virtual su2double GetInletAtVertex(su2double *val_inlet, + unsigned long val_inlet_point, + unsigned short val_kind_marker, + string val_marker, + const CGeometry *geometry, + const CConfig *config) const { return 0; } /*! * \brief Update the multi-grid structure for the customized boundary conditions. diff --git a/SU2_CFD/include/solvers/CSpeciesSolver.hpp b/SU2_CFD/include/solvers/CSpeciesSolver.hpp index 8b838cd0e61..4fbb9419117 100644 --- a/SU2_CFD/include/solvers/CSpeciesSolver.hpp +++ b/SU2_CFD/include/solvers/CSpeciesSolver.hpp @@ -113,15 +113,16 @@ class CSpeciesSolver : public CScalarSolver { void SetInletAtVertex(const su2double* val_inlet, unsigned short iMarker, unsigned long iVertex) override; /*! - * \brief Get the set of values imposed at an inlet. - * \param[in] iMarker - Index of the surface marker. - * \param[in] iVertex - Vertex of the marker iMarker where the inlet is being set. + * \brief Get the set of value imposed at an inlet. + * \param[in] val_inlet - vector returning the inlet values for the current vertex. + * \param[in] val_inlet_point - Node index where the inlet is being set. + * \param[in] val_kind_marker - Enumerated type for the particular inlet type. * \param[in] geometry - Geometrical definition of the problem. - * \param[in,out] val_inlet - vector returning the inlet values for the current vertex. + * \param config - Definition of the particular problem. * \return Value of the face area at the vertex. */ - su2double GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, - const CGeometry* geometry, su2double* val_inlet) const override; + su2double GetInletAtVertex(su2double* val_inlet, unsigned long val_inlet_point, unsigned short val_kind_marker, + string val_marker, const CGeometry* geometry, const CConfig* config) const override; /*! * \brief Set a uniform inlet profile diff --git a/SU2_CFD/include/solvers/CTurbSASolver.hpp b/SU2_CFD/include/solvers/CTurbSASolver.hpp index 1bf7d929d0e..c79649799cc 100644 --- a/SU2_CFD/include/solvers/CTurbSASolver.hpp +++ b/SU2_CFD/include/solvers/CTurbSASolver.hpp @@ -345,15 +345,20 @@ class CTurbSASolver final : public CTurbSolver { unsigned long iVertex) override; /*! - * \brief Get the set of values imposed at an inlet. - * \param[in] iMarker - Index of the surface marker. - * \param[in] iVertex - Vertex of the marker iMarker where the inlet is being set. + * \brief Get the set of value imposed at an inlet. + * \param[in] val_inlet - vector returning the inlet values for the current vertex. + * \param[in] val_inlet_point - Node index where the inlet is being set. + * \param[in] val_kind_marker - Enumerated type for the particular inlet type. * \param[in] geometry - Geometrical definition of the problem. - * \param[in,out] val_inlet - vector returning the inlet values for the current vertex. + * \param config - Definition of the particular problem. * \return Value of the face area at the vertex. */ - su2double GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, - const CGeometry* geometry, su2double* val_inlet) const override; + su2double GetInletAtVertex(su2double *val_inlet, + unsigned long val_inlet_point, + unsigned short val_kind_marker, + string val_marker, + const CGeometry *geometry, + const CConfig *config) const override; /*! * \brief Set a uniform inlet profile diff --git a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp index 4ab59ec73a8..bdb4227a191 100644 --- a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp +++ b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp @@ -269,15 +269,20 @@ class CTurbSSTSolver final : public CTurbSolver { unsigned long iVertex) override; /*! - * \brief Get the set of values imposed at an inlet. - * \param[in] iMarker - Index of the surface marker. - * \param[in] iVertex - Vertex of the marker iMarker where the inlet is being set. + * \brief Get the set of value imposed at an inlet. + * \param[in] val_inlet - vector returning the inlet values for the current vertex. + * \param[in] val_inlet_point - Node index where the inlet is being set. + * \param[in] val_kind_marker - Enumerated type for the particular inlet type. * \param[in] geometry - Geometrical definition of the problem. - * \param[in,out] val_inlet - vector returning the inlet values for the current vertex. + * \param config - Definition of the particular problem. * \return Value of the face area at the vertex. */ - su2double GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, - const CGeometry* geometry, su2double* val_inlet) const override; + su2double GetInletAtVertex(su2double *val_inlet, + unsigned long val_inlet_point, + unsigned short val_kind_marker, + string val_marker, + const CGeometry *geometry, + const CConfig *config) const override; /*! * \brief Set a uniform inlet profile diff --git a/SU2_CFD/include/variables/CEulerVariable.hpp b/SU2_CFD/include/variables/CEulerVariable.hpp index 4dc91781c4b..d2880fce420 100644 --- a/SU2_CFD/include/variables/CEulerVariable.hpp +++ b/SU2_CFD/include/variables/CEulerVariable.hpp @@ -237,7 +237,7 @@ class CEulerVariable : public CFlowVariable { * \return Value of the velocity for the dimension iDim. */ inline su2double GetVelocity(unsigned long iPoint, unsigned long iDim) const final { - return Primitive(iPoint, iDim+indices.Velocity()); + return Primitive(iPoint,iDim+indices.Velocity()); } /*! @@ -256,7 +256,7 @@ class CEulerVariable : public CFlowVariable { inline su2double GetProjVel(unsigned long iPoint, const su2double *val_vector) const final { su2double ProjVel = 0.0; for (unsigned long iDim = 0; iDim < nDim; iDim++) - ProjVel += Primitive(iPoint, iDim+indices.Velocity())*val_vector[iDim]; + ProjVel += Primitive(iPoint,iDim+indices.Velocity())*val_vector[iDim]; return ProjVel; } diff --git a/SU2_CFD/include/variables/CVariable.hpp b/SU2_CFD/include/variables/CVariable.hpp index 920f5680915..358824ae8d7 100644 --- a/SU2_CFD/include/variables/CVariable.hpp +++ b/SU2_CFD/include/variables/CVariable.hpp @@ -702,16 +702,6 @@ class CVariable { val_trunc_error[iVar] = Res_TruncError(iPoint, iVar); } - /*! - * \brief Set the truncation error. - * \param[in] iPoint - Point index. - * \param[in] val_trunc_error - Pointer to the truncation error. - */ - inline void SetResTruncError(unsigned long iPoint, su2double *val_trunc_error) { - for (unsigned long iVar = 0; iVar < nVar; iVar++) - Res_TruncError(iPoint, iVar) = val_trunc_error[iVar]; - } - /*! * \brief Set the gradient of the solution. * \param[in] iPoint - Point index. diff --git a/SU2_CFD/src/drivers/CDriver.cpp b/SU2_CFD/src/drivers/CDriver.cpp index 0c3c4a10c4e..645e79ff47b 100644 --- a/SU2_CFD/src/drivers/CDriver.cpp +++ b/SU2_CFD/src/drivers/CDriver.cpp @@ -679,6 +679,20 @@ void CDriver::InitializeGeometry(CConfig* config, CGeometry **&geometry, bool du } #endif + /*--- Check if Euler & Symmetry markers are straight/plane. This information + is used in the Euler & Symmetry boundary routines. ---*/ + if((config_container[iZone]->GetnMarker_Euler() != 0 || + config_container[iZone]->GetnMarker_SymWall() != 0) && + !fem_solver) { + + if (rank == MASTER_NODE) + cout << "Checking if Euler & Symmetry markers are straight/plane:" << endl; + + for (iMesh = 0; iMesh <= config_container[iZone]->GetnMGLevels(); iMesh++) + geometry_container[iZone][iInst][iMesh]->ComputeSurf_Straightness(config_container[iZone], (iMesh==MESH_0) ); + + } + /*--- Keep a reference to the main (ZONE_0, INST_0, MESH_0) geometry. ---*/ main_geometry = geometry_container[ZONE_0][INST_0][MESH_0]; @@ -830,7 +844,7 @@ void CDriver::InitializeGeometryFVM(CConfig *config, CGeometry **&geometry) { /*--- Create the control volume structures ---*/ geometry[iMGlevel]->SetControlVolume(geometry[iMGlevel-1], ALLOCATE); - geometry[iMGlevel]->SetBoundControlVolume(geometry[iMGlevel-1], config, ALLOCATE); + geometry[iMGlevel]->SetBoundControlVolume(geometry[iMGlevel-1], ALLOCATE); geometry[iMGlevel]->SetCoord(geometry[iMGlevel-1]); /*--- Find closest neighbor to a surface point ---*/ @@ -1052,27 +1066,27 @@ void CDriver::PreprocessInlet(CSolver ***solver, CGeometry **geometry, CConfig * /*--- Use LoadInletProfile() routines for the particular solver. ---*/ if (rank == MASTER_NODE) { - cout << "\nReading inlet profile from file: " << config->GetInlet_FileName() << endl; + cout << endl; + cout << "Reading inlet profile from file: "; + cout << config->GetInlet_FileName() << endl; } - for (const auto marker_type : {INLET_FLOW, SUPERSONIC_INLET}) { - if (solver[MESH_0][FLOW_SOL]) { - solver[MESH_0][FLOW_SOL]->LoadInletProfile(geometry, solver, config, val_iter, FLOW_SOL, marker_type); - } - if (solver[MESH_0][TURB_SOL]) { - solver[MESH_0][TURB_SOL]->LoadInletProfile(geometry, solver, config, val_iter, TURB_SOL, marker_type); - } - if (solver[MESH_0][SPECIES_SOL]) { - solver[MESH_0][SPECIES_SOL]->LoadInletProfile(geometry, solver, config, val_iter, SPECIES_SOL, marker_type); - } + if (solver[MESH_0][FLOW_SOL]) { + solver[MESH_0][FLOW_SOL]->LoadInletProfile(geometry, solver, config, val_iter, FLOW_SOL, INLET_FLOW); + } + if (solver[MESH_0][TURB_SOL]) { + solver[MESH_0][TURB_SOL]->LoadInletProfile(geometry, solver, config, val_iter, TURB_SOL, INLET_FLOW); + } + if (solver[MESH_0][SPECIES_SOL]) { + solver[MESH_0][SPECIES_SOL]->LoadInletProfile(geometry, solver, config, val_iter, SPECIES_SOL, INLET_FLOW); } /*--- Exit if profiles were requested for a solver that is not available. ---*/ if (!config->GetFluidProblem()) { - SU2_MPI::Error("Inlet profile specification via file (C++) has not been \n" - "implemented yet for this solver.\n" - "Please set SPECIFIED_INLET_PROFILE= NO and try again.", CURRENT_FUNCTION); + SU2_MPI::Error(string("Inlet profile specification via file (C++) has not been \n") + + string("implemented yet for this solver.\n") + + string("Please set SPECIFIED_INLET_PROFILE= NO and try again."), CURRENT_FUNCTION); } } else { diff --git a/SU2_CFD/src/drivers/CMultizoneDriver.cpp b/SU2_CFD/src/drivers/CMultizoneDriver.cpp index 368a598e514..07069b4d0ab 100644 --- a/SU2_CFD/src/drivers/CMultizoneDriver.cpp +++ b/SU2_CFD/src/drivers/CMultizoneDriver.cpp @@ -589,19 +589,19 @@ bool CMultizoneDriver::TransferData(unsigned short donorZone, unsigned short tar { const auto nMarkerInt = config_container[donorZone]->GetnMarker_MixingPlaneInterface() / 2; - /*--- Transfer the average value from the donorZone to the targetZone ---*/ - /*--- Loops over the mixing planes defined in the config file to find the correct mixing plane for the donor-target combination ---*/ + /*--- Transfer the average value from the donorZone to the targetZone ---*/ for (auto iMarkerInt = 1; iMarkerInt <= nMarkerInt; iMarkerInt++) { interface_container[donorZone][targetZone]->AllgatherAverage(solver_container[donorZone][INST_0][MESH_0][FLOW_SOL],solver_container[targetZone][INST_0][MESH_0][FLOW_SOL], geometry_container[donorZone][INST_0][MESH_0],geometry_container[targetZone][INST_0][MESH_0], config_container[donorZone], config_container[targetZone], iMarkerInt ); } - /*--- Set average value donorZone->targetZone ---*/ - interface_container[donorZone][targetZone]->SetAverageValues(solver_container[donorZone][INST_0][MESH_0][FLOW_SOL],solver_container[targetZone][INST_0][MESH_0][FLOW_SOL], donorZone); - - /*--- Set average geometrical properties FROM donorZone IN targetZone ---*/ - geometry_container[targetZone][INST_0][MESH_0]->SetAvgTurboGeoValues(config_container[iZone],geometry_container[iZone][INST_0][MESH_0], iZone); + for (donorZone = 0; donorZone < nZone; donorZone++) { + if (interface_types[donorZone][targetZone]==MIXING_PLANE) { + interface_container[donorZone][targetZone]->GatherAverageValues(solver_container[donorZone][INST_0][MESH_0][FLOW_SOL],solver_container[targetZone][INST_0][MESH_0][FLOW_SOL], donorZone); + geometry_container[targetZone][INST_0][MESH_0]->SetAvgTurboGeoValues(config_container[iZone],geometry_container[iZone][INST_0][MESH_0], iZone); + } + } break; } @@ -623,7 +623,7 @@ bool CMultizoneDriver::TransferData(unsigned short donorZone, unsigned short tar void CMultizoneDriver::SetTurboPerformance() { for (auto donorZone = 1u; donorZone < nZone; donorZone++) { - interface_container[donorZone][ZONE_0]->SetAverageValues(solver_container[donorZone][INST_0][MESH_0][FLOW_SOL], + interface_container[donorZone][ZONE_0]->GatherAverageValues(solver_container[donorZone][INST_0][MESH_0][FLOW_SOL], solver_container[ZONE_0][INST_0][MESH_0][FLOW_SOL], donorZone); } diff --git a/SU2_CFD/src/integration/CIntegration.cpp b/SU2_CFD/src/integration/CIntegration.cpp index 65406ae4e16..f53d50639cc 100644 --- a/SU2_CFD/src/integration/CIntegration.cpp +++ b/SU2_CFD/src/integration/CIntegration.cpp @@ -91,7 +91,7 @@ void CIntegration::Space_Integration(CGeometry *geometry, BEGIN_SU2_OMP_SAFE_GLOBAL_ACCESS { if (config->GetBoolTurbomachinery()){ - /*--- Average quantities at the inflow and outflow boundaries ---*/ + /*--- Average quantities at the inflow and outflow boundaries ---*/ solver_container[MainSolver]->TurboAverageProcess(solver_container, geometry,config,INFLOW); solver_container[MainSolver]->TurboAverageProcess(solver_container, geometry, config, OUTFLOW); } @@ -103,6 +103,9 @@ void CIntegration::Space_Integration(CGeometry *geometry, for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { KindBC = config->GetMarker_All_KindBC(iMarker); switch (KindBC) { + case EULER_WALL: + solver_container[MainSolver]->BC_Euler_Wall(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker); + break; case ACTDISK_INLET: solver_container[MainSolver]->BC_ActDisk_Inlet(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker); break; @@ -141,6 +144,9 @@ void CIntegration::Space_Integration(CGeometry *geometry, case FAR_FIELD: solver_container[MainSolver]->BC_Far_Field(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker); break; + case SYMMETRY_PLANE: + solver_container[MainSolver]->BC_Sym_Plane(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker); + break; } } @@ -189,13 +195,6 @@ void CIntegration::Space_Integration(CGeometry *geometry, solver_container[MainSolver]->BC_Periodic(geometry, solver_container, conv_bound_numerics, config); } - - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - if (config->GetMarker_All_KindBC(iMarker)==SYMMETRY_PLANE) - solver_container[MainSolver]->BC_Sym_Plane(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker); - else if (config->GetMarker_All_KindBC(iMarker)==EULER_WALL) - solver_container[MainSolver]->BC_Euler_Wall(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker); - } //AD::ResumePreaccumulation(pausePreacc); } diff --git a/SU2_CFD/src/interfaces/CInterface.cpp b/SU2_CFD/src/interfaces/CInterface.cpp index 3ae5d0787b4..bad7c06dae1 100644 --- a/SU2_CFD/src/interfaces/CInterface.cpp +++ b/SU2_CFD/src/interfaces/CInterface.cpp @@ -291,7 +291,7 @@ void CInterface::PreprocessAverage(CGeometry *donor_geometry, CGeometry *target_ for(iSpan = 1; iSpan SpanValuesDonor[jSpan]){ @@ -639,3 +639,12 @@ void CInterface::AllgatherAverage(CSolver *donor_solution, CSolver *target_solut delete [] avgKineTarget; delete [] avgOmegaTarget; } + +void CInterface::GatherAverageValues(CSolver *donor_solution, CSolver *target_solution, unsigned short donorZone){ + + + /*--- here we made the strong assumption that the mesh zone order + * follows the same order of the turbomachinery markers ---*/ + SetAverageValues(donor_solution, target_solution, donorZone); + +} diff --git a/SU2_CFD/src/iteration/CDiscAdjFluidIteration.cpp b/SU2_CFD/src/iteration/CDiscAdjFluidIteration.cpp index 24fd1602e6e..27173f3357e 100644 --- a/SU2_CFD/src/iteration/CDiscAdjFluidIteration.cpp +++ b/SU2_CFD/src/iteration/CDiscAdjFluidIteration.cpp @@ -471,10 +471,6 @@ void CDiscAdjFluidIteration::SetDependencies(CSolver***** solver, CGeometry**** solvers0[FLOW_SOL]->InitiateComms(geometry0, config[iZone], MPI_QUANTITIES::SOLUTION); solvers0[FLOW_SOL]->CompleteComms(geometry0, config[iZone], MPI_QUANTITIES::SOLUTION); - if (config[iZone]->GetBoolTurbomachinery()) { - solvers0[FLOW_SOL]->TurboAverageProcess(solvers0, geometry0, config[iZone], INFLOW); - solvers0[FLOW_SOL]->TurboAverageProcess(solvers0, geometry0, config[iZone], OUTFLOW); - } if (turbulent && !config[iZone]->GetFrozen_Visc_Disc()) { solvers0[TURB_SOL]->Postprocessing(geometry0, solvers0, config[iZone], MESH_0); diff --git a/SU2_CFD/src/numerics/flow/convection/fds.cpp b/SU2_CFD/src/numerics/flow/convection/fds.cpp index eeffeb1cb57..4a83dfe275d 100644 --- a/SU2_CFD/src/numerics/flow/convection/fds.cpp +++ b/SU2_CFD/src/numerics/flow/convection/fds.cpp @@ -104,7 +104,7 @@ CNumerics::ResidualType<> CUpwFDSInc_Flow::ComputeResidual(const CConfig *config Area = GeometryToolbox::Norm(nDim, Normal); - /*--- Compute the unit normal vector ---*/ + /*--- Compute and unitary normal vector ---*/ for (iDim = 0; iDim < nDim; iDim++) { UnitNormal[iDim] = Normal[iDim]/Area; diff --git a/SU2_CFD/src/numerics/flow/convection/hllc.cpp b/SU2_CFD/src/numerics/flow/convection/hllc.cpp index d94b44759a7..d574f929b20 100644 --- a/SU2_CFD/src/numerics/flow/convection/hllc.cpp +++ b/SU2_CFD/src/numerics/flow/convection/hllc.cpp @@ -31,7 +31,7 @@ CUpwHLLC_Flow::CUpwHLLC_Flow(unsigned short val_nDim, unsigned short val_nVar, const CConfig* config) : CNumerics(val_nDim, val_nVar, config) { implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT); - + kappa = config->GetRoe_Kappa(); /* A grid is defined as dynamic if there's rigid grid movement or grid deformation AND the problem is time domain */ dynamic_grid = config->GetDynamic_Grid(); @@ -114,19 +114,30 @@ CNumerics::ResidualType<> CUpwHLLC_Flow::ComputeResidual(const CConfig* config) Density_j = V_j[nDim+2]; Enthalpy_j = V_j[nDim+3]; - sq_vel_i = GeometryToolbox::SquaredNorm(nDim, Velocity_i); - sq_vel_j = GeometryToolbox::SquaredNorm(nDim, Velocity_j); + + sq_vel_i = 0.0; + sq_vel_j = 0.0; + + for (iDim = 0; iDim < nDim; iDim++) { + sq_vel_i += Velocity_i[iDim] * Velocity_i[iDim]; + sq_vel_j += Velocity_j[iDim] * Velocity_j[iDim]; + } Energy_i = Enthalpy_i - Pressure_i / Density_i; Energy_j = Enthalpy_j - Pressure_j / Density_j; - SoundSpeed_i = sqrt((Enthalpy_i - 0.5 * sq_vel_i) * Gamma_Minus_One); - SoundSpeed_j = sqrt((Enthalpy_j - 0.5 * sq_vel_j) * Gamma_Minus_One); + SoundSpeed_i = sqrt( (Enthalpy_i - 0.5 * sq_vel_i) * Gamma_Minus_One ); + SoundSpeed_j = sqrt( (Enthalpy_j - 0.5 * sq_vel_j) * Gamma_Minus_One ); /*--- Projected velocities ---*/ - ProjVelocity_i = GeometryToolbox::DotProduct(nDim, Velocity_i, UnitNormal); - ProjVelocity_j = GeometryToolbox::DotProduct(nDim, Velocity_j, UnitNormal); + ProjVelocity_i = 0; + ProjVelocity_j = 0; + + for (iDim = 0; iDim < nDim; iDim++) { + ProjVelocity_i += Velocity_i[iDim] * UnitNormal[iDim]; + ProjVelocity_j += Velocity_j[iDim] * UnitNormal[iDim]; + } /*--- Projected Grid Velocity ---*/ @@ -135,7 +146,7 @@ CNumerics::ResidualType<> CUpwHLLC_Flow::ComputeResidual(const CConfig* config) if (dynamic_grid) { for (iDim = 0; iDim < nDim; iDim++) - ProjInterfaceVel += 0.5 * (GridVel_i[iDim] + GridVel_j[iDim]) * UnitNormal[iDim]; + ProjInterfaceVel += 0.5 * ( GridVel_i[iDim] + GridVel_j[iDim] )*UnitNormal[iDim]; SoundSpeed_i -= ProjInterfaceVel; SoundSpeed_j += ProjInterfaceVel; @@ -148,11 +159,14 @@ CNumerics::ResidualType<> CUpwHLLC_Flow::ComputeResidual(const CConfig* config) Rrho = ( sqrt(Density_i) + sqrt(Density_j) ); + sq_velRoe = 0.0; + RoeProjVelocity = - ProjInterfaceVel; + for (iDim = 0; iDim < nDim; iDim++) { RoeVelocity[iDim] = ( Velocity_i[iDim] * sqrt(Density_i) + Velocity_j[iDim] * sqrt(Density_j) ) / Rrho; + sq_velRoe += RoeVelocity[iDim] * RoeVelocity[iDim]; + RoeProjVelocity += RoeVelocity[iDim] * UnitNormal[iDim]; } - sq_velRoe = GeometryToolbox::SquaredNorm(nDim, RoeVelocity); - RoeProjVelocity = GeometryToolbox::DotProduct(nDim, RoeVelocity, UnitNormal) - ProjInterfaceVel; /*--- Mean Roe variables iPoint and jPoint ---*/ @@ -161,8 +175,10 @@ CNumerics::ResidualType<> CUpwHLLC_Flow::ComputeResidual(const CConfig* config) /*--- Roe-averaged speed of sound ---*/ + //RoeSoundSpeed2 = Gamma_Minus_One * ( RoeEnthalpy - 0.5 * sq_velRoe ); RoeSoundSpeed = sqrt( Gamma_Minus_One * ( RoeEnthalpy - 0.5 * sq_velRoe ) ) - ProjInterfaceVel; + /*--- Speed of sound at L and R ---*/ sL = min( RoeProjVelocity - RoeSoundSpeed, ProjVelocity_i - SoundSpeed_i); @@ -198,8 +214,8 @@ CNumerics::ResidualType<> CUpwHLLC_Flow::ComputeResidual(const CConfig* config) IntermediateState[0] = rhoSL * Density_i; for (iDim = 0; iDim < nDim; iDim++) - IntermediateState[iDim+1] = rhoSL * Density_i * Velocity_i[iDim] + (pStar - Pressure_i) * UnitNormal[iDim] / (sL - sM); - IntermediateState[nVar-1] = rhoSL * Density_i * Energy_i - (Pressure_i * ProjVelocity_i - pStar * sM) / (sL - sM); + IntermediateState[iDim+1] = rhoSL * ( Density_i * Velocity_i[iDim] + ( pStar - Pressure_i ) / ( sL - ProjVelocity_i ) * UnitNormal[iDim] ) ; + IntermediateState[nVar-1] = rhoSL * ( Density_i * Energy_i - ( Pressure_i * ProjVelocity_i - pStar * sM) / ( sL - ProjVelocity_i ) ); Flux[0] = sM * IntermediateState[0]; @@ -227,8 +243,8 @@ CNumerics::ResidualType<> CUpwHLLC_Flow::ComputeResidual(const CConfig* config) IntermediateState[0] = rhoSR * Density_j; for (iDim = 0; iDim < nDim; iDim++) - IntermediateState[iDim+1] = rhoSR * Density_j * Velocity_j[iDim] + (pStar - Pressure_j) * UnitNormal[iDim] / (sR - sM); - IntermediateState[nVar-1] = rhoSR * Density_j * Energy_j - (Pressure_j * ProjVelocity_j - pStar * sM) / (sR - sM); + IntermediateState[iDim+1] = rhoSR * ( Density_j * Velocity_j[iDim] + ( pStar - Pressure_j ) / ( sR - ProjVelocity_j ) * UnitNormal[iDim] ) ; + IntermediateState[nVar-1] = rhoSR * ( Density_j * Energy_j - ( Pressure_j * ProjVelocity_j - pStar * sM ) / ( sR - ProjVelocity_j ) ); Flux[0] = sM * IntermediateState[0]; @@ -238,12 +254,14 @@ CNumerics::ResidualType<> CUpwHLLC_Flow::ComputeResidual(const CConfig* config) } } - for (iVar = 0; iVar < nVar; iVar++) Flux[iVar] *= Area; - /*--- Return early if the Jacobians do not need to be computed. ---*/ + for (iVar = 0; iVar < nVar; iVar++) + Flux[iVar] *= Area; - if (!implicit) return ResidualType<>(Flux, Jacobian_i, Jacobian_j); + /*--- Return early if the Jacobians do not need to be computed. ---*/ + if (implicit) + { if (sM > 0.0) { if (sL > 0.0) { @@ -519,20 +537,27 @@ CNumerics::ResidualType<> CUpwHLLC_Flow::ComputeResidual(const CConfig* config) } } - /*--- Scale Jacobians by area (from Flux *= Area). ---*/ + + /*--- Jacobians of the inviscid flux, scale = k because Flux ~ 0.5*(fc_i+fc_j)*Normal ---*/ + + Area *= kappa; + for (iVar = 0; iVar < nVar; iVar++) { for (jVar = 0; jVar < nVar; jVar++) { - Jacobian_i[iVar][jVar] *= Area; - Jacobian_j[iVar][jVar] *= Area; + Jacobian_i[iVar][jVar] *= Area; + Jacobian_j[iVar][jVar] *= Area; } } + } // end if implicit + return ResidualType<>(Flux, Jacobian_i, Jacobian_j); + } CUpwGeneralHLLC_Flow::CUpwGeneralHLLC_Flow(unsigned short val_nDim, unsigned short val_nVar, const CConfig* config) : CNumerics(val_nDim, val_nVar, config) { implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT); - + kappa = config->GetRoe_Kappa(); /* A grid is defined as dynamic if there's rigid grid movement or grid deformation AND the problem is time domain */ dynamic_grid = config->GetDynamic_Grid(); @@ -767,12 +792,13 @@ CNumerics::ResidualType<> CUpwGeneralHLLC_Flow::ComputeResidual(const CConfig* c } } - for (iVar = 0; iVar < nVar; iVar++) Flux[iVar] *= Area; + for (iVar = 0; iVar < nVar; iVar++) + Flux[iVar] *= Area; /*--- Return early if the Jacobians do not need to be computed. ---*/ - if (!implicit) return ResidualType<>(Flux, Jacobian_i, Jacobian_j); - + if (implicit) + { if (sM > 0.0) { if (sL > 0.0) { @@ -1064,14 +1090,21 @@ CNumerics::ResidualType<> CUpwGeneralHLLC_Flow::ComputeResidual(const CConfig* c } } - /*--- Scale Jacobians by area (from Flux *= Area). ---*/ + + /*--- Jacobians of the inviscid flux, scale = kappa because Flux ~ 0.5*(fc_i+fc_j)*Normal ---*/ + + Area *= kappa; + for (iVar = 0; iVar < nVar; iVar++) { for (jVar = 0; jVar < nVar; jVar++) { Jacobian_i[iVar][jVar] *= Area; Jacobian_j[iVar][jVar] *= Area; } } + } // end if implicit + return ResidualType<>(Flux, Jacobian_i, Jacobian_j); + } void CUpwGeneralHLLC_Flow::VinokurMontagne() { diff --git a/SU2_CFD/src/numerics/flow/convection/roe.cpp b/SU2_CFD/src/numerics/flow/convection/roe.cpp index 7b122119009..07c69f2030d 100644 --- a/SU2_CFD/src/numerics/flow/convection/roe.cpp +++ b/SU2_CFD/src/numerics/flow/convection/roe.cpp @@ -34,7 +34,7 @@ CUpwRoeBase_Flow::CUpwRoeBase_Flow(unsigned short val_nDim, unsigned short val_n implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT); /* A grid is defined as dynamic if there's rigid grid movement or grid deformation AND the problem is time domain */ dynamic_grid = config->GetDynamic_Grid(); - kappa = config->GetRoe_Kappa(); + kappa = config->GetRoe_Kappa(); // 1 is unstable Gamma = config->GetGamma(); Gamma_Minus_One = Gamma - 1.0; @@ -109,7 +109,7 @@ CNumerics::ResidualType<> CUpwRoeBase_Flow::ComputeResidual(const CConfig* confi AD::SetPreaccIn(Dissipation_i); AD::SetPreaccIn(Dissipation_j); } - /*--- Face area (norm of the normal vector) and unit normal ---*/ + /*--- Face area (norm or the normal vector) and unit normal ---*/ Area = GeometryToolbox::Norm(nDim, Normal); @@ -683,7 +683,7 @@ CUpwGeneralRoe_Flow::CUpwGeneralRoe_Flow(unsigned short val_nDim, unsigned short implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT); /* A grid is defined as dynamic if there's rigid grid movement or grid deformation AND the problem is time domain */ dynamic_grid = config->GetDynamic_Grid(); - kappa = config->GetRoe_Kappa(); + kappa = config->GetRoe_Kappa(); // 1 is unstable Flux = new su2double [nVar]; diff --git a/SU2_CFD/src/solvers/CAdjEulerSolver.cpp b/SU2_CFD/src/solvers/CAdjEulerSolver.cpp index b72305e0be2..17128c7fec8 100644 --- a/SU2_CFD/src/solvers/CAdjEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CAdjEulerSolver.cpp @@ -952,11 +952,11 @@ void CAdjEulerSolver::Preprocessing(CGeometry *geometry, CSolver **solver_contai /*--- Gradient computation for MUSCL reconstruction. ---*/ if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS) - SetSolution_Gradient_GG(geometry, config, 1, true); + SetSolution_Gradient_GG(geometry, config, true); if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES) - SetSolution_Gradient_LS(geometry, config, 1, true); + SetSolution_Gradient_LS(geometry, config, true); if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES) - SetSolution_Gradient_LS(geometry, config, 1, true); + SetSolution_Gradient_LS(geometry, config, true); /*--- Limiter computation ---*/ @@ -970,8 +970,8 @@ void CAdjEulerSolver::Preprocessing(CGeometry *geometry, CSolver **solver_contai if ((center_jst) && (iMesh == MESH_0)) { SetCentered_Dissipation_Sensor(geometry, config); SetUndivided_Laplacian(geometry, config); - if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config, 1); - if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config, 1); + if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config); + if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config); } } diff --git a/SU2_CFD/src/solvers/CAdjNSSolver.cpp b/SU2_CFD/src/solvers/CAdjNSSolver.cpp index 3a219b06ea9..c07425a2bdc 100644 --- a/SU2_CFD/src/solvers/CAdjNSSolver.cpp +++ b/SU2_CFD/src/solvers/CAdjNSSolver.cpp @@ -345,14 +345,14 @@ void CAdjNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container if (config->GetReconstructionGradientRequired()) { if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS) - SetSolution_Gradient_GG(geometry, config, 1, true); + SetSolution_Gradient_GG(geometry, config, true); if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES) - SetSolution_Gradient_LS(geometry, config, 1, true); + SetSolution_Gradient_LS(geometry, config, true); if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES) - SetSolution_Gradient_LS(geometry, config, 1, true); + SetSolution_Gradient_LS(geometry, config, true); } - if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config, 1); - if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config, 1); + if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config); + if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config); /*--- Limiter computation (upwind reconstruction) ---*/ @@ -361,8 +361,8 @@ void CAdjNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container /*--- Compute gradients adj for viscous term coupling ---*/ if ((config->GetKind_Solver() == MAIN_SOLVER::ADJ_RANS) && (!config->GetFrozen_Visc_Cont())) { - if (config->GetKind_Gradient_Method() == GREEN_GAUSS) solver_container[ADJTURB_SOL]->SetSolution_Gradient_GG(geometry, config, 1); - if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) solver_container[ADJTURB_SOL]->SetSolution_Gradient_LS(geometry, config, 1); + if (config->GetKind_Gradient_Method() == GREEN_GAUSS) solver_container[ADJTURB_SOL]->SetSolution_Gradient_GG(geometry, config); + if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) solver_container[ADJTURB_SOL]->SetSolution_Gradient_LS(geometry, config); } /*--- Artificial dissipation for centered schemes ---*/ diff --git a/SU2_CFD/src/solvers/CAdjTurbSolver.cpp b/SU2_CFD/src/solvers/CAdjTurbSolver.cpp index cb4a194ca95..3d5b6eb7024 100644 --- a/SU2_CFD/src/solvers/CAdjTurbSolver.cpp +++ b/SU2_CFD/src/solvers/CAdjTurbSolver.cpp @@ -257,12 +257,12 @@ void CAdjTurbSolver::Preprocessing(CGeometry *geometry, CSolver **solver_contain Jacobian.SetValZero(); /*--- Gradient of the adjoint turbulent variables ---*/ - if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config, -1); - if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config, -1); + if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config); + if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config); /*--- Gradient of the turbulent variables ---*/ - if (config->GetKind_Gradient_Method() == GREEN_GAUSS) solver_container[TURB_SOL]->SetSolution_Gradient_GG(geometry, config, -1); - if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) solver_container[TURB_SOL]->SetSolution_Gradient_LS(geometry, config, -1); + if (config->GetKind_Gradient_Method() == GREEN_GAUSS) solver_container[TURB_SOL]->SetSolution_Gradient_GG(geometry, config); + if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) solver_container[TURB_SOL]->SetSolution_Gradient_LS(geometry, config); } diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index b9e290adfc2..8e4c9a01147 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -6120,60 +6120,81 @@ void CEulerSolver::PreprocessBC_Giles(CGeometry *geometry, CConfig *config, CNum void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) { - /*--- Initialisation of data structures ---*/ - - su2double *Normal = new su2double[nDim], - *turboNormal = new su2double[nDim], - *UnitNormal = new su2double[nDim], - *turboVelocity = new su2double[nDim], - *Velocity_i = new su2double[nDim], - *Velocity_b = new su2double[nDim], - *AverageTurboMach = new su2double[nDim], - *S_boundary = new su2double[8], - *delta_c = new su2double[nVar], - *cj = new su2double[nVar], - **R_Matrix = new su2double*[nVar], - *dcjs = new su2double[nVar], - *c_avg = new su2double[nVar], - **R_c = new su2double*[nVar-1], - **R_c_inv = new su2double*[nVar-1], - *R = new su2double[nVar-1], - *deltaprim = new su2double[nVar]; - - for (auto iVar = 0; iVar < nVar; iVar++) + unsigned short iDim, iVar, jVar, iSpan; + unsigned long iPoint, Point_Normal, oldVertex, k, kend, kend_max, iVertex; + su2double *UnitNormal, *turboVelocity, *turboNormal; + + su2double *Velocity_b, Velocity2_b, Enthalpy_b, Energy_b, Density_b, Pressure_b, Temperature_b; + su2double *Velocity_i, Velocity2_i, Energy_i, StaticEnergy_i, Density_i, Pressure_i; + su2double Pressure_e; + su2double *V_boundary, *V_domain, *S_boundary, *S_domain; + unsigned short iZone = config->GetiZone(); + bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); + string Marker_Tag = config->GetMarker_All_TagBound(val_marker); + bool viscous = config->GetViscous(); + unsigned short nSpanWiseSections = geometry->GetnSpanWiseSections(config->GetMarker_All_TurbomachineryFlag(val_marker)); + su2double relfacAvgCfg = config->GetGiles_RelaxFactorAverage(Marker_Tag); + su2double relfacFouCfg = config->GetGiles_RelaxFactorFourier(Marker_Tag); + su2double *Normal; + su2double TwoPiThetaFreq_Pitch, pitch,theta; + const su2double *SpanWiseValues = nullptr, *FlowDir; + su2double spanPercent, extrarelfacAvg = 0.0, deltaSpan = 0.0, relfacAvg, relfacFou, coeffrelfacAvg = 0.0; + unsigned short Turbo_Flag; + + Normal = new su2double[nDim]; + turboNormal = new su2double[nDim]; + UnitNormal = new su2double[nDim]; + turboVelocity = new su2double[nDim]; + Velocity_i = new su2double[nDim]; + Velocity_b = new su2double[nDim]; + + + su2double AverageSoundSpeed, *AverageTurboMach, AverageEntropy, AverageEnthalpy; + AverageTurboMach = new su2double[nDim]; + S_boundary = new su2double[8]; + + su2double AvgMach , *cj, GilesBeta, *delta_c, **R_Matrix, *deltaprim, **R_c_inv,**R_c, alphaIn_BC, gammaIn_BC = 0, + P_Total, T_Total, Enthalpy_BC, Entropy_BC, *R, *c_avg,*dcjs, Beta_inf2, c2js_Re, c3js_Re, cOutjs_Re, avgVel2 =0.0; + + long freq; + + delta_c = new su2double[nVar]; + deltaprim = new su2double[nVar]; + cj = new su2double[nVar]; + R_Matrix = new su2double*[nVar]; + R_c = new su2double*[nVar-1]; + R_c_inv = new su2double*[nVar-1]; + R = new su2double[nVar-1]; + c_avg = new su2double[nVar]; + dcjs = new su2double[nVar]; + + for (iVar = 0; iVar < nVar; iVar++) { R_Matrix[iVar] = new su2double[nVar]; c_avg[iVar] = 0.0; dcjs[iVar] = 0.0; } - for (auto iVar = 0; iVar < nVar-1; iVar++) + for (iVar = 0; iVar < nVar-1; iVar++) { R_c[iVar] = new su2double[nVar-1]; R_c_inv[iVar] = new su2double[nVar-1]; } - auto const I = complex(0.0,1.0); - - /*--- Compute coeff for under relaxation of Avg and Fourier Coefficient for hub and shroud---*/ - auto const Marker_Tag = config->GetMarker_All_TagBound(val_marker); - su2double relfacAvgCfg = config->GetGiles_RelaxFactorAverage(Marker_Tag); - - unsigned short nSpanWiseSections = geometry->GetnSpanWiseSections(config->GetMarker_All_TurbomachineryFlag(val_marker)); - const su2double *SpanWiseValues = nullptr; - - su2double extrarelfacAvg = 0.0, deltaSpan = 0.0, relfacAvg, relfacFou = config->GetGiles_RelaxFactorFourier(Marker_Tag), coeffrelfacAvg = 0.0; + complex I, c2ks, c2js, c3ks, c3js, cOutks, cOutjs, Beta_inf; + I = complex(0.0,1.0); + /*--- Compute coeff for under relaxation of Avg and Fourier Coefficient for hub and shroud---*/ if (nDim == 3){ extrarelfacAvg = config->GetExtraRelFacGiles(0); - auto const spanPercent = config->GetExtraRelFacGiles(1); - auto const Turbo_Flag = config->GetMarker_All_TurbomachineryFlag(val_marker); + spanPercent = config->GetExtraRelFacGiles(1); + Turbo_Flag = config->GetMarker_All_TurbomachineryFlag(val_marker); SpanWiseValues = geometry->GetSpanWiseValue(Turbo_Flag); deltaSpan = SpanWiseValues[nSpanWiseSections-1]*spanPercent; coeffrelfacAvg = (relfacAvgCfg - extrarelfacAvg)/deltaSpan; } - for (unsigned short iSpan= 0; iSpan < nSpanWiseSections ; iSpan++){ + for (iSpan= 0; iSpan < nSpanWiseSections ; iSpan++){ /*--- Compute under relaxation for the Hub and Shroud Avg and Fourier Coefficient---*/ if(nDim == 3){ if(SpanWiseValues[iSpan] <= SpanWiseValues[0] + deltaSpan){ @@ -6186,16 +6207,18 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu } else{ relfacAvg = relfacAvgCfg; + relfacFou = relfacFouCfg; } } else{ { relfacAvg = relfacAvgCfg; + relfacFou = relfacFouCfg; } } GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan]); - auto AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); + AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); AverageTurboMach[0] = AverageTurboVelocity[val_marker][iSpan][0]/AverageSoundSpeed; AverageTurboMach[1] = AverageTurboVelocity[val_marker][iSpan][1]/AverageSoundSpeed; @@ -6203,32 +6226,167 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu AverageTurboMach[1] -= geometry->GetAverageTangGridVel(val_marker,iSpan)/AverageSoundSpeed; } - auto const kend = geometry->GetnFreqSpan(val_marker, iSpan); - auto const kend_max = geometry->GetnFreqSpanMax(config->GetMarker_All_TurbomachineryFlag(val_marker)); - conv_numerics->GetRMatrix(AverageSoundSpeed, AverageDensity[val_marker][iSpan], R_Matrix); + AvgMach = AverageTurboMach[0]*AverageTurboMach[0] + AverageTurboMach[1]*AverageTurboMach[1]; - su2double Pressure_e; //Useful to pass by reference + kend = geometry->GetnFreqSpan(val_marker, iSpan); + kend_max = geometry->GetnFreqSpanMax(config->GetMarker_All_TurbomachineryFlag(val_marker)); + conv_numerics->GetRMatrix(AverageSoundSpeed, AverageDensity[val_marker][iSpan], R_Matrix); switch(config->GetKind_Data_Giles(Marker_Tag)){ case TOTAL_CONDITIONS_PT: - BC_Giles_Total_Inlet(conv_numerics, config, val_marker, c_avg, R, R_c_inv, R_c, iSpan, iSpan); + /*--- Retrieve the specified total conditions for this inlet. ---*/ + P_Total = config->GetGiles_Var1(Marker_Tag); + T_Total = config->GetGiles_Var2(Marker_Tag); + FlowDir = config->GetGiles_FlowDir(Marker_Tag); + alphaIn_BC = atan(FlowDir[1]/FlowDir[0]); + + gammaIn_BC = 0; + if (nDim == 3){ + gammaIn_BC = FlowDir[2]; //atan(FlowDir[2]/FlowDir[0]); + } + + /*--- Non-dim. the inputs---*/ + P_Total /= config->GetPressure_Ref(); + T_Total /= config->GetTemperature_Ref(); + + /* --- Computes the total state --- */ + GetFluidModel()->SetTDState_PT(P_Total, T_Total); + Enthalpy_BC = GetFluidModel()->GetStaticEnergy()+ GetFluidModel()->GetPressure()/GetFluidModel()->GetDensity(); + Entropy_BC = GetFluidModel()->GetEntropy(); + + + /* --- Computes the inverse matrix R_c --- */ + conv_numerics->ComputeResJacobianGiles(GetFluidModel(), AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan], + AverageTurboVelocity[val_marker][iSpan], alphaIn_BC, gammaIn_BC, R_c, R_c_inv); + + GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan]); + AverageEnthalpy = GetFluidModel()->GetStaticEnergy() + AveragePressure[val_marker][iSpan]/AverageDensity[val_marker][iSpan]; + AverageEntropy = GetFluidModel()->GetEntropy(); + + avgVel2 = 0.0; + for (iDim = 0; iDim < nDim; iDim++) avgVel2 += AverageVelocity[val_marker][iSpan][iDim]*AverageVelocity[val_marker][iSpan][iDim]; + if (nDim == 2){ + R[0] = -(AverageEntropy - Entropy_BC); + R[1] = -(AverageTurboVelocity[val_marker][iSpan][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][iSpan][0]); + R[2] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); + } + + else{ + R[0] = -(AverageEntropy - Entropy_BC); + R[1] = -(AverageTurboVelocity[val_marker][iSpan][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][iSpan][0]); + R[2] = -(AverageTurboVelocity[val_marker][iSpan][2] - tan(gammaIn_BC)*AverageTurboVelocity[val_marker][iSpan][0]); + R[3] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); + + } + /* --- Compute the avg component c_avg = R_c^-1 * R --- */ + for (iVar = 0; iVar < nVar-1; iVar++){ + c_avg[iVar] = 0.0; + for (jVar = 0; jVar < nVar-1; jVar++){ + c_avg[iVar] += R_c_inv[iVar][jVar]*R[jVar]; + } + } break; case TOTAL_CONDITIONS_PT_1D: - BC_Giles_Total_Inlet(conv_numerics, config, val_marker, c_avg, R, R_c_inv, R_c, iSpan, nSpanWiseSections); + /*--- Retrieve the specified total conditions for this inlet. ---*/ + P_Total = config->GetGiles_Var1(Marker_Tag); + T_Total = config->GetGiles_Var2(Marker_Tag); + FlowDir = config->GetGiles_FlowDir(Marker_Tag); + alphaIn_BC = atan(FlowDir[1]/FlowDir[0]); + + gammaIn_BC = 0; + if (nDim == 3){ + // Review definition of angle + gammaIn_BC = FlowDir[2]; //atan(FlowDir[2]/FlowDir[0]); + } + + /*--- Non-dim. the inputs---*/ + P_Total /= config->GetPressure_Ref(); + T_Total /= config->GetTemperature_Ref(); + + /* --- Computes the total state --- */ + GetFluidModel()->SetTDState_PT(P_Total, T_Total); + Enthalpy_BC = GetFluidModel()->GetStaticEnergy()+ GetFluidModel()->GetPressure()/GetFluidModel()->GetDensity(); + Entropy_BC = GetFluidModel()->GetEntropy(); + + + /* --- Computes the inverse matrix R_c --- */ + conv_numerics->ComputeResJacobianGiles(GetFluidModel(), AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan], + AverageTurboVelocity[val_marker][iSpan], alphaIn_BC, gammaIn_BC, R_c, R_c_inv); + + GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][nSpanWiseSections], AverageDensity[val_marker][nSpanWiseSections]); + AverageEnthalpy = GetFluidModel()->GetStaticEnergy() + AveragePressure[val_marker][nSpanWiseSections]/AverageDensity[val_marker][nSpanWiseSections]; + AverageEntropy = GetFluidModel()->GetEntropy(); + + + avgVel2 = 0.0; + for (iDim = 0; iDim < nDim; iDim++) avgVel2 += AverageVelocity[val_marker][iSpan][iDim]*AverageVelocity[val_marker][iSpan][iDim]; + if (nDim == 2){ + R[0] = -(AverageEntropy - Entropy_BC); + R[1] = -(AverageTurboVelocity[val_marker][nSpanWiseSections][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][nSpanWiseSections][0]); + R[2] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); + } + + else{ + R[0] = -(AverageEntropy - Entropy_BC); + R[1] = -(AverageTurboVelocity[val_marker][nSpanWiseSections][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][nSpanWiseSections][0]); + R[2] = -(AverageTurboVelocity[val_marker][nSpanWiseSections][2] - tan(gammaIn_BC)*AverageTurboVelocity[val_marker][nSpanWiseSections][0]); + R[3] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); + + } + /* --- Compute the avg component c_avg = R_c^-1 * R --- */ + for (iVar = 0; iVar < nVar-1; iVar++){ + c_avg[iVar] = 0.0; + for (jVar = 0; jVar < nVar-1; jVar++){ + c_avg[iVar] += R_c_inv[iVar][jVar]*R[jVar]; + } + } break; case MIXING_IN: case MIXING_OUT: - BC_Giles_Mixing(conv_numerics, val_marker, deltaprim, c_avg, iSpan); + /* --- Compute average jump of primitive at the mixing-plane interface--- */ + deltaprim[0] = ExtAverageDensity[val_marker][iSpan] - AverageDensity[val_marker][iSpan]; + deltaprim[1] = ExtAverageTurboVelocity[val_marker][iSpan][0] - AverageTurboVelocity[val_marker][iSpan][0]; + deltaprim[2] = ExtAverageTurboVelocity[val_marker][iSpan][1] - AverageTurboVelocity[val_marker][iSpan][1]; + if (nDim == 2){ + deltaprim[3] = ExtAveragePressure[val_marker][iSpan] - AveragePressure[val_marker][iSpan]; + } + else + { + deltaprim[3] = ExtAverageTurboVelocity[val_marker][iSpan][2] - AverageTurboVelocity[val_marker][iSpan][2]; + deltaprim[4] = ExtAveragePressure[val_marker][iSpan] - AveragePressure[val_marker][iSpan]; + } + + + /* --- Compute average jump of charachteristic variable at the mixing-plane interface--- */ + GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan]); + AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); + conv_numerics->GetCharJump(AverageSoundSpeed, AverageDensity[val_marker][iSpan], deltaprim, c_avg); break; case MIXING_IN_1D: case MIXING_OUT_1D: - BC_Giles_Mixing(conv_numerics, val_marker, deltaprim, c_avg, nSpanWiseSections); + /* --- Compute average jump of primitive at the mixing-plane interface--- */ + deltaprim[0] = ExtAverageDensity[val_marker][nSpanWiseSections] - AverageDensity[val_marker][nSpanWiseSections]; + deltaprim[1] = ExtAverageTurboVelocity[val_marker][nSpanWiseSections][0] - AverageTurboVelocity[val_marker][nSpanWiseSections][0]; + deltaprim[2] = ExtAverageTurboVelocity[val_marker][nSpanWiseSections][1] - AverageTurboVelocity[val_marker][nSpanWiseSections][1]; + if (nDim == 2){ + deltaprim[3] = ExtAveragePressure[val_marker][nSpanWiseSections] - AveragePressure[val_marker][nSpanWiseSections]; + } + else + { + deltaprim[3] = ExtAverageTurboVelocity[val_marker][nSpanWiseSections][2] - AverageTurboVelocity[val_marker][nSpanWiseSections][2]; + deltaprim[4] = ExtAveragePressure[val_marker][nSpanWiseSections] - AveragePressure[val_marker][nSpanWiseSections]; + } + + /* --- Compute average jump of charachteristic variable at the mixing-plane interface--- */ + GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][nSpanWiseSections], AverageDensity[val_marker][nSpanWiseSections]); + AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); + conv_numerics->GetCharJump(AverageSoundSpeed, AverageDensity[val_marker][nSpanWiseSections], deltaprim, c_avg); break; @@ -6237,8 +6395,6 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu Pressure_e /= config->GetPressure_Ref(); /* --- Compute avg characteristic jump --- */ - c_avg[nDim+1] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); - c_avg[nDim + 1] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); break; @@ -6247,8 +6403,6 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu Pressure_e /= config->GetPressure_Ref(); /* --- Compute avg characteristic jump --- */ - c_avg[nDim+1] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); - c_avg[nDim + 1] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); break; @@ -6272,66 +6426,67 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu } - auto const iZone = config->GetiZone(); - /*--- Loop over all the vertices on this boundary marker ---*/ SU2_OMP_FOR_DYN(OMP_MIN_SIZE) - for (unsigned long iVertex = 0; iVertex < geometry->GetnVertexSpan(val_marker,iSpan); iVertex++) { + for (iVertex = 0; iVertex < geometry->GetnVertexSpan(val_marker,iSpan); iVertex++) { /*--- using the other vertex information for retrieving some information ---*/ - auto oldVertex = geometry->turbovertex[val_marker][iSpan][iVertex]->GetOldVertex(); - auto V_boundary= GetCharacPrimVar(val_marker, oldVertex); + oldVertex = geometry->turbovertex[val_marker][iSpan][iVertex]->GetOldVertex(); + V_boundary= GetCharacPrimVar(val_marker, oldVertex); /*--- Index of the closest interior node ---*/ - auto Point_Normal = geometry->vertex[val_marker][oldVertex]->GetNormal_Neighbor(); + Point_Normal = geometry->vertex[val_marker][oldVertex]->GetNormal_Neighbor(); /*--- Normal vector for this vertex (negate for outward convention), * this normal is scaled with the area of the face of the element ---*/ geometry->vertex[val_marker][oldVertex]->GetNormal(Normal); - for (unsigned short iDim = 0; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; + for (iDim = 0; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; conv_numerics->SetNormal(Normal); /*--- find the node related to the vertex ---*/ - auto iPoint = geometry->turbovertex[val_marker][iSpan][iVertex]->GetNode(); + iPoint = geometry->turbovertex[val_marker][iSpan][iVertex]->GetNode(); /*--- Normalize Normal vector for this vertex (already for outward convention) ---*/ geometry->turbovertex[val_marker][iSpan][iVertex]->GetNormal(UnitNormal); geometry->turbovertex[val_marker][iSpan][iVertex]->GetTurboNormal(turboNormal); /*--- Retrieve solution at this boundary node ---*/ - auto V_domain = nodes->GetPrimitive(iPoint); + V_domain = nodes->GetPrimitive(iPoint); /*--- Retrieve domain Secondary variables ---*/ - auto S_domain = nodes->GetSecondary(iPoint); + S_domain = nodes->GetSecondary(iPoint); /*--- Compute the internal state u_i ---*/ - su2double Velocity2_i = 0; - for (unsigned short iDim = 0; iDim < nDim; iDim++) + Velocity2_i = 0; + for (iDim = 0; iDim < nDim; iDim++) { Velocity_i[iDim] = nodes->GetVelocity(iPoint,iDim); Velocity2_i += Velocity_i[iDim]*Velocity_i[iDim]; } - auto Density_i = nodes->GetDensity(iPoint); + Density_i = nodes->GetDensity(iPoint); - auto Energy_i = nodes->GetEnergy(iPoint); - auto StaticEnergy_i = Energy_i - 0.5*Velocity2_i; + Energy_i = nodes->GetEnergy(iPoint); + StaticEnergy_i = Energy_i - 0.5*Velocity2_i; GetFluidModel()->SetTDState_rhoe(Density_i, StaticEnergy_i); - auto Pressure_i = GetFluidModel()->GetPressure(); + Pressure_i = GetFluidModel()->GetPressure(); ComputeTurboVelocity(Velocity_i, turboNormal, turboVelocity, config->GetMarker_All_TurbomachineryFlag(val_marker),config->GetKind_TurboMachinery(iZone)); - deltaprim[0] = Density_i - AverageDensity[val_marker][iSpan]; - deltaprim[1] = turboVelocity[0] - AverageTurboVelocity[val_marker][iSpan][0]; - deltaprim[2] = turboVelocity[1] - AverageTurboVelocity[val_marker][iSpan][1]; if (nDim == 2){ + deltaprim[0] = Density_i - AverageDensity[val_marker][iSpan]; + deltaprim[1] = turboVelocity[0] - AverageTurboVelocity[val_marker][iSpan][0]; + deltaprim[2] = turboVelocity[1] - AverageTurboVelocity[val_marker][iSpan][1]; deltaprim[3] = Pressure_i - AveragePressure[val_marker][iSpan]; } else{ + deltaprim[0] = Density_i - AverageDensity[val_marker][iSpan]; + deltaprim[1] = turboVelocity[0] - AverageTurboVelocity[val_marker][iSpan][0]; + deltaprim[2] = turboVelocity[1] - AverageTurboVelocity[val_marker][iSpan][1]; deltaprim[3] = turboVelocity[2] - AverageTurboVelocity[val_marker][iSpan][2]; deltaprim[4] = Pressure_i - AveragePressure[val_marker][iSpan]; } @@ -6341,13 +6496,8 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu conv_numerics->GetCharJump(AverageSoundSpeed, AverageDensity[val_marker][iSpan], deltaprim, cj); - auto pitch = geometry->GetMaxAngularCoord(val_marker, iSpan) - geometry->GetMinAngularCoord(val_marker,iSpan); - auto theta = geometry->turbovertex[val_marker][iSpan][iVertex]->GetRelAngularCoord(); - - auto const AvgMach = AverageTurboMach[0]*AverageTurboMach[0] + AverageTurboMach[1]*AverageTurboMach[1]; - auto Beta_inf= I*complex(sqrt(1.0 - AvgMach)); - su2double TwoPiThetaFreq_Pitch; - long freq; + pitch = geometry->GetMaxAngularCoord(val_marker, iSpan) - geometry->GetMinAngularCoord(val_marker,iSpan); + theta = geometry->turbovertex[val_marker][iSpan][iVertex]->GetRelAngularCoord(); switch(config->GetKind_Data_Giles(Marker_Tag)) { @@ -6357,18 +6507,11 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu case TOTAL_CONDITIONS_PT: case MIXING_IN:case TOTAL_CONDITIONS_PT_1D: case MIXING_IN_1D: if(config->GetSpatialFourier()){ - - /* --- Initial definition of variables ---*/ - auto c2js = complex(0.0,0.0); - auto c3js = complex(0.0,0.0); - auto c2ks = complex(0.0,0.0); - auto c3ks = complex(0.0,0.0); - auto c2js_Re = c2js.real(); - auto c3js_Re = c3js.real(); - su2double Beta_inf2; - if (AvgMach <= 1.0){ - for(unsigned long k=0; k < 2*kend_max+1; k++){ + Beta_inf= I*complex(sqrt(1.0 - AvgMach)); + c2js = complex(0.0,0.0); + c3js = complex(0.0,0.0); + for(k=0; k < 2*kend_max+1; k++){ freq = k - kend_max; if(freq >= (long)(-kend) && freq <= (long)(kend) && AverageTurboMach[0] > config->GetAverageMachLimit()){ TwoPiThetaFreq_Pitch = 2*PI_NUMBER*freq*theta/pitch; @@ -6387,10 +6530,16 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu c2js_Re = c2js.real(); c3js_Re = c3js.real(); - dcjs[0] = 0.0 - cj[0]; - dcjs[1] = c2js_Re - cj[1]; - dcjs[2] = 0.0 - cj[2]; - dcjs[nDim] = c3js_Re - cj[nDim]; // Overwrites previous value in 2D case + if (nDim == 2){ + dcjs[0] = 0.0 - cj[0]; + dcjs[1] = c2js_Re - cj[1]; + dcjs[2] = c3js_Re - cj[2]; + }else{ + dcjs[0] = 0.0 - cj[0]; + dcjs[1] = c2js_Re - cj[1]; + dcjs[2] = 0.0 - cj[2]; + dcjs[3] = c3js_Re - cj[3]; + } }else{ if (AverageTurboVelocity[val_marker][iSpan][1] >= 0.0){ @@ -6398,21 +6547,40 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu }else{ Beta_inf2= sqrt(AvgMach-1.0); } + if (nDim == 2){ + c2js_Re = -cj[3]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); + c3js_Re = cj[3]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); + c3js_Re *= (Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); + }else{ + c2js_Re = -cj[4]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); + c3js_Re = cj[4]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); + c3js_Re *= (Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); + } - c2js_Re = -cj[nDim+1]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - c3js_Re = cj[nDim+1]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - c3js_Re *= (Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - dcjs[0] = 0.0 - cj[0]; - dcjs[1] = c2js_Re - cj[1]; - dcjs[2] = 0.0 - cj[2]; - dcjs[nDim] = c3js_Re - cj[nDim]; + if (nDim == 2){ + dcjs[0] = 0.0 - cj[0]; + dcjs[1] = c2js_Re - cj[1]; + dcjs[2] = c3js_Re - cj[2]; + }else{ + dcjs[0] = 0.0 - cj[0]; + dcjs[1] = c2js_Re - cj[1]; + dcjs[2] = 0.0 - cj[2]; + dcjs[3] = c3js_Re - cj[3]; + } + } + } + else{ + if (nDim == 2){ + dcjs[0] = 0.0; + dcjs[1] = 0.0; + dcjs[2] = 0.0; + }else{ + dcjs[0] = 0.0; + dcjs[1] = 0.0; + dcjs[2] = 0.0; + dcjs[3] = 0.0; } - }else{ - dcjs[0] = 0.0; - dcjs[1] = 0.0; - dcjs[2] = 0.0; - dcjs[nDim] = 0.0; } /* --- Impose Inlet BC Reflecting--- */ delta_c[0] = relfacAvg*c_avg[0] + relfacFou*dcjs[0]; @@ -6431,7 +6599,6 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu /* --- implementation of Giles BC---*/ if(config->GetSpatialFourier()){ - su2double GilesBeta, cOutjs_Re; if (AvgMach > 1.0){ /* --- supersonic Giles implementation ---*/ if (AverageTurboVelocity[val_marker][iSpan][1] >= 0.0){ @@ -6455,9 +6622,9 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu }else{ /* --- subsonic Giles implementation ---*/ - auto cOutjs = complex(0.0,0.0); - auto cOutks = complex(0.0,0.0); - for(unsigned long k=0; k < 2*kend_max+1; k++){ + Beta_inf= I*complex(sqrt(1.0 - AvgMach)); + cOutjs = complex(0.0,0.0); + for(k=0; k < 2*kend_max+1; k++){ freq = k - kend_max; if(freq >= (long)(-kend) && freq <= (long)(kend) && AverageTurboMach[0] > config->GetAverageMachLimit()){ TwoPiThetaFreq_Pitch = 2*PI_NUMBER*freq*theta/pitch; @@ -6472,25 +6639,41 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu } cOutjs_Re = cOutjs.real(); - dcjs[nDim+1] = cOutjs_Re - cj[nDim+1]; + if (nDim == 2){ + dcjs[3] = cOutjs_Re - cj[3]; + } + else{ + dcjs[4] = cOutjs_Re - cj[4]; + } } } else{ - dcjs[nDim+1] = 0.0; + if (nDim == 2){ + dcjs[3] = 0.0; + } + else{ + dcjs[4] = 0.0; + } } /* --- Impose Outlet BC Non-Reflecting --- */ delta_c[0] = cj[0]; delta_c[1] = cj[1]; delta_c[2] = cj[2]; - delta_c[3] = cj[3]; - delta_c[nDim+1] = relfacAvg*c_avg[nDim+1] + relfacFou*dcjs[nDim+1]; + if (nDim == 2){ + delta_c[3] = relfacAvg*c_avg[3] + relfacFou*dcjs[3]; + } + else{ + delta_c[3] = cj[3]; + delta_c[4] = relfacAvg*c_avg[4] + relfacFou*dcjs[4]; + } + /*--- Automatically impose supersonic autoflow ---*/ if (abs(AverageTurboMach[0]) > 1.0000){ delta_c[0] = 0.0; delta_c[1] = 0.0; delta_c[2] = 0.0; - delta_c[3] = 0.0; + delta_c[2] = 0.0; if (nDim == 3)delta_c[4] = 0.0; } @@ -6502,25 +6685,31 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu } /*--- Compute primitive jump from characteristic variables ---*/ - for (unsigned short iVar = 0; iVar < nVar; iVar++) + for (iVar = 0; iVar < nVar; iVar++) { deltaprim[iVar]=0.0; - for (unsigned short jVar = 0; jVar < nVar; jVar++) + for (jVar = 0; jVar < nVar; jVar++) { deltaprim[iVar] += R_Matrix[iVar][jVar]*delta_c[jVar]; } } /*--- retrieve boundary variables ---*/ - su2double Density_b = AverageDensity[val_marker][iSpan] + deltaprim[0]; + Density_b = AverageDensity[val_marker][iSpan] + deltaprim[0]; turboVelocity[0] = AverageTurboVelocity[val_marker][iSpan][0] + deltaprim[1]; turboVelocity[1] = AverageTurboVelocity[val_marker][iSpan][1] + deltaprim[2]; - turboVelocity[nDim-1] = AverageTurboVelocity[val_marker][iSpan][nDim-1] + deltaprim[nDim]; - su2double Pressure_b = AveragePressure[val_marker][iSpan] + deltaprim[nDim+1]; + if(nDim == 2){ + Pressure_b = AveragePressure[val_marker][iSpan] + deltaprim[3]; + } + else{ + turboVelocity[2] = AverageTurboVelocity[val_marker][iSpan][2] + deltaprim[3]; + Pressure_b = AveragePressure[val_marker][iSpan] + deltaprim[4]; + } + ComputeBackVelocity(turboVelocity, turboNormal, Velocity_b, config->GetMarker_All_TurbomachineryFlag(val_marker), config->GetKind_TurboMachinery(iZone)); - su2double Velocity2_b = 0.0; - for (unsigned short iDim = 0; iDim < nDim; iDim++) { + Velocity2_b = 0.0; + for (iDim = 0; iDim < nDim; iDim++) { Velocity2_b+= Velocity_b[iDim]*Velocity_b[iDim]; } @@ -6528,20 +6717,20 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu Pressure_b = Pressure_i; Density_b = Density_i; Velocity2_b = 0.0; - for (unsigned short iDim = 0; iDim < nDim; iDim++) { + for (iDim = 0; iDim < nDim; iDim++) { Velocity_b[iDim] = Velocity_i[iDim]; Velocity2_b+= Velocity_b[iDim]*Velocity_b[iDim]; } } GetFluidModel()->SetTDState_Prho(Pressure_b, Density_b); - su2double Energy_b = GetFluidModel()->GetStaticEnergy() + 0.5*Velocity2_b; - su2double Temperature_b= GetFluidModel()->GetTemperature(); - su2double Enthalpy_b = Energy_b + Pressure_b/Density_b; + Energy_b = GetFluidModel()->GetStaticEnergy() + 0.5*Velocity2_b; + Temperature_b= GetFluidModel()->GetTemperature(); + Enthalpy_b = Energy_b + Pressure_b/Density_b; /*--- Primitive variables, using the derived quantities ---*/ V_boundary[0] = Temperature_b; - for (unsigned short iDim = 0; iDim < nDim; iDim++) + for (iDim = 0; iDim < nDim; iDim++) V_boundary[iDim+1] = Velocity_b[iDim]; V_boundary[nDim+1] = Pressure_b; V_boundary[nDim+2] = Density_b; @@ -6569,12 +6758,12 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu LinSysRes.AddBlock(iPoint, residual); /*--- Jacobian contribution for implicit integration ---*/ - if (config->GetKind_TimeIntScheme() == EULER_IMPLICIT) + if (implicit) Jacobian.AddBlock2Diag(iPoint, residual.jacobian_i); /*--- Viscous contribution ---*/ - if (config->GetViscous()) { + if (viscous) { /*--- Set laminar and eddy viscosity at the infinity ---*/ @@ -6628,7 +6817,7 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu /*--- Jacobian contribution for implicit integration ---*/ - if (config->GetKind_TimeIntScheme() == EULER_IMPLICIT) + if (implicit) Jacobian.SubtractBlock2Diag(iPoint, residual.jacobian_i); } @@ -6650,11 +6839,11 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu delete [] delta_c; delete [] deltaprim; delete [] cj; - for (unsigned short iVar = 0; iVar < nVar; iVar++) + for (iVar = 0; iVar < nVar; iVar++) { delete [] R_Matrix[iVar]; } - for (unsigned short iVar = 0; iVar < nVar-1; iVar++) + for (iVar = 0; iVar < nVar-1; iVar++) { delete [] R_c_inv[iVar]; delete [] R_c[iVar]; @@ -6672,73 +6861,6 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu delete [] turboVelocity; } -void CEulerSolver::BC_Giles_Total_Inlet( CNumerics *conv_numerics, CConfig *config, unsigned short val_marker, - su2double *&c_avg, su2double *&R, su2double **&R_c_inv, su2double **&R_c, unsigned short iSpan, unsigned short SpanwisePosition) { - - /*--- Calculates boundry condition for quasi-3D and 1D total boundary conditions ---*/ - - /*--- Retrieve the specified boundary conditions. ---*/ - auto const Marker_Tag = config->GetMarker_All_TagBound(val_marker); - auto P_Total = config->GetGiles_Var1(Marker_Tag); - auto T_Total = config->GetGiles_Var2(Marker_Tag); - auto const FlowDir = config->GetGiles_FlowDir(Marker_Tag); - auto const alphaIn_BC = atan(FlowDir[1]/FlowDir[0]); - - su2double gammaIn_BC = 0; - if (nDim == 3){ - gammaIn_BC = FlowDir[2]; //atan(FlowDir[2]/FlowDir[0]); - } - - /*--- Non-dim. the inputs---*/ - P_Total /= config->GetPressure_Ref(); - T_Total /= config->GetTemperature_Ref(); - - /* --- Computes the total state --- */ - GetFluidModel()->SetTDState_PT(P_Total, T_Total); - auto const Enthalpy_BC = GetFluidModel()->GetStaticEnergy()+ GetFluidModel()->GetPressure()/GetFluidModel()->GetDensity(); - auto const Entropy_BC = GetFluidModel()->GetEntropy(); - - /* --- Computes the inverse matrix R_c --- */ - conv_numerics->ComputeResJacobianGiles(GetFluidModel(), AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan], - AverageTurboVelocity[val_marker][iSpan], alphaIn_BC, gammaIn_BC, R_c, R_c_inv); - - GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][SpanwisePosition], AverageDensity[val_marker][SpanwisePosition]); - auto AverageEnthalpy = GetFluidModel()->GetStaticEnergy() + AveragePressure[val_marker][SpanwisePosition]/AverageDensity[val_marker][SpanwisePosition]; - auto AverageEntropy = GetFluidModel()->GetEntropy(); - - - su2double avgVel2 = 0.0; - for (unsigned short iDim = 0; iDim < nDim; iDim++) avgVel2 += AverageVelocity[val_marker][iSpan][iDim]*AverageVelocity[val_marker][iSpan][iDim]; - - R[0] = -(AverageEntropy - Entropy_BC); - R[1] = -(AverageTurboVelocity[val_marker][SpanwisePosition][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][SpanwisePosition][0]); - R[2] = -(AverageTurboVelocity[val_marker][SpanwisePosition][2] - tan(gammaIn_BC)*AverageTurboVelocity[val_marker][SpanwisePosition][0]); - R[nDim] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); - - /* --- Compute the avg component c_avg = R_c^-1 * R --- */ - for (unsigned short iVar = 0; iVar < nVar-1; iVar++){ - c_avg[iVar] = 0.0; - for (unsigned short jVar = 0; jVar < nVar-1; jVar++){ - c_avg[iVar] += R_c_inv[iVar][jVar]*R[jVar]; - } - } -} - -void CEulerSolver::BC_Giles_Mixing(CNumerics *conv_numerics, unsigned short val_marker, su2double *&deltaprim, su2double *&c_avg, unsigned short SpanwisePosition) { - - /* --- Compute average jump of primitive at the mixing-plane interface--- */ - deltaprim[0] = ExtAverageDensity[val_marker][SpanwisePosition] - AverageDensity[val_marker][SpanwisePosition]; - deltaprim[1] = ExtAverageTurboVelocity[val_marker][SpanwisePosition][0] - AverageTurboVelocity[val_marker][SpanwisePosition][0]; - deltaprim[2] = ExtAverageTurboVelocity[val_marker][SpanwisePosition][1] - AverageTurboVelocity[val_marker][SpanwisePosition][1]; - deltaprim[3] = ExtAverageTurboVelocity[val_marker][SpanwisePosition][2] - AverageTurboVelocity[val_marker][SpanwisePosition][2]; - deltaprim[nDim+1] = ExtAveragePressure[val_marker][SpanwisePosition] - AveragePressure[val_marker][SpanwisePosition]; - - /* --- Compute average jump of charachteristic variable at the mixing-plane interface--- */ - GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][SpanwisePosition], AverageDensity[val_marker][SpanwisePosition]); - auto const AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); - conv_numerics->GetCharJump(AverageSoundSpeed, AverageDensity[val_marker][SpanwisePosition], deltaprim, c_avg); -} - void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) { @@ -7224,36 +7346,41 @@ void CEulerSolver::BC_Supersonic_Inlet(CGeometry *geometry, CSolver **solver_con const bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST); /*--- Supersonic inlet flow: there are no outgoing characteristics, - so all flow variables can be imposed at the inlet. ---*/ + so all flow variables can be imposed at the inlet. + First, retrieve the specified values for the primitive variables. ---*/ - SU2_OMP_FOR_DYN(OMP_MIN_SIZE) - for (auto iVertex = 0ul; iVertex < geometry->nVertex[val_marker]; iVertex++) { - const auto iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); + const su2double Temperature = config->GetInlet_Temperature(Marker_Tag) / config->GetTemperature_Ref(); + const su2double Pressure = config->GetInlet_Pressure(Marker_Tag) / config->GetPressure_Ref(); + const auto* Vel = config->GetInlet_Velocity(Marker_Tag); - if (!geometry->nodes->GetDomain(iPoint)) continue; + su2double Velocity[MAXNDIM] = {0.0}; + for (unsigned short iDim = 0; iDim < nDim; iDim++) + Velocity[iDim] = Vel[iDim] / config->GetVelocity_Ref(); - /*--- Retrieve the inlet profile, note that total conditions are reused as static. ---*/ + /*--- Density at the inlet from the gas law ---*/ - const su2double Temperature = Inlet_Ttotal[val_marker][iVertex] / config->GetTemperature_Ref(); - const su2double Pressure = Inlet_Ptotal[val_marker][iVertex] / config->GetPressure_Ref(); - su2double Velocity[MAXNDIM] = {0.0}; - for (unsigned short iDim = 0; iDim < nDim; iDim++) { - Velocity[iDim] = Inlet_FlowDir[val_marker][iVertex][iDim] / config->GetVelocity_Ref(); - } + const su2double Density = Pressure / (Gas_Constant * Temperature); + + /*--- Compute the energy from the specified state ---*/ - /*--- Density at the inlet from the gas law. ---*/ + const su2double Velocity2 = GeometryToolbox::SquaredNorm(int(MAXNDIM), Velocity); + su2double Energy = Pressure / (Density * Gamma_Minus_One) + 0.5 * Velocity2; + if (tkeNeeded) Energy += GetTke_Inf(); - const su2double Density = Pressure / (Gas_Constant * Temperature); + /*--- Loop over all the vertices on this boundary marker ---*/ - /*--- Compute the energy from the specified state. ---*/ + SU2_OMP_FOR_DYN(OMP_MIN_SIZE) + for (auto iVertex = 0ul; iVertex < geometry->nVertex[val_marker]; iVertex++) { + const auto iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); - const su2double Velocity2 = GeometryToolbox::SquaredNorm(int(MAXNDIM), Velocity); - su2double Energy = Pressure / (Density * Gamma_Minus_One) + 0.5 * Velocity2; - if (tkeNeeded) Energy += GetTke_Inf(); + if (!geometry->nodes->GetDomain(iPoint)) continue; - /*--- Primitive variables, using the derived quantities. ---*/ + /*--- Allocate the value at the inlet ---*/ auto* V_inlet = GetCharacPrimVar(val_marker, iVertex); + + /*--- Primitive variables, using the derived quantities ---*/ + V_inlet[prim_idx.Temperature()] = Temperature; V_inlet[prim_idx.Pressure()] = Pressure; V_inlet[prim_idx.Density()] = Density; @@ -7261,17 +7388,17 @@ void CEulerSolver::BC_Supersonic_Inlet(CGeometry *geometry, CSolver **solver_con for (unsigned short iDim = 0; iDim < nDim; iDim++) V_inlet[iDim+prim_idx.Velocity()] = Velocity[iDim]; - /*--- Current solution at this boundary node. ---*/ + /*--- Current solution at this boundary node ---*/ - const auto* V_domain = nodes->GetPrimitive(iPoint); + auto* V_domain = nodes->GetPrimitive(iPoint); - /*--- Normal vector for this vertex (negate for outward convention). ---*/ + /*--- Normal vector for this vertex (negate for outward convention) ---*/ su2double Normal[MAXNDIM] = {0.0}; geometry->vertex[val_marker][iVertex]->GetNormal(Normal); for (unsigned short iDim = 0; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; - /*--- Set various quantities in the solver class. ---*/ + /*--- Set various quantities in the solver class ---*/ conv_numerics->SetNormal(Normal); conv_numerics->SetPrimitive(V_domain, V_inlet); @@ -7280,13 +7407,13 @@ void CEulerSolver::BC_Supersonic_Inlet(CGeometry *geometry, CSolver **solver_con conv_numerics->SetGridVel(geometry->nodes->GetGridVel(iPoint), geometry->nodes->GetGridVel(iPoint)); - /*--- Compute the residual using an upwind scheme. ---*/ + /*--- Compute the residual using an upwind scheme ---*/ auto residual = conv_numerics->ComputeResidual(config); LinSysRes.AddBlock(iPoint, residual); - /*--- Jacobian contribution for implicit integration. ---*/ + /*--- Jacobian contribution for implicit integration ---*/ if (implicit) Jacobian.AddBlock2Diag(iPoint, residual.jacobian_i); diff --git a/SU2_CFD/src/solvers/CNEMONSSolver.cpp b/SU2_CFD/src/solvers/CNEMONSSolver.cpp index 5b12013cee2..b30b99edebe 100644 --- a/SU2_CFD/src/solvers/CNEMONSSolver.cpp +++ b/SU2_CFD/src/solvers/CNEMONSSolver.cpp @@ -166,7 +166,7 @@ void CNEMONSSolver::SetPrimitive_Gradient_GG(CGeometry *geometry, const CConfig const auto& primitives = nodes->GetPrimitive_Aux(); - computeGradientsGreenGauss(this, comm, commPer, *geometry, *config, primitives, 0, nPrimVarGrad, prim_idx.Velocity(), gradient); + computeGradientsGreenGauss(this, comm, commPer, *geometry, *config, primitives, 0, nPrimVarGrad, gradient); } void CNEMONSSolver::Viscous_Residual(CGeometry *geometry, diff --git a/SU2_CFD/src/solvers/CRadP1Solver.cpp b/SU2_CFD/src/solvers/CRadP1Solver.cpp index 21e5458a81c..d102e3b1d9a 100644 --- a/SU2_CFD/src/solvers/CRadP1Solver.cpp +++ b/SU2_CFD/src/solvers/CRadP1Solver.cpp @@ -150,12 +150,12 @@ void CRadP1Solver::Preprocessing(CGeometry *geometry, CSolver **solver_container /*--- Compute the Solution gradients ---*/ if (config->GetReconstructionGradientRequired()) { - if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config, -1, true); - if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config, -1, true); - if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config, -1, true); + if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config, true); + if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config, true); + if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config, true); } - if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config, -1); - if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config, -1); + if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config); + if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config); } diff --git a/SU2_CFD/src/solvers/CSolver.cpp b/SU2_CFD/src/solvers/CSolver.cpp index bfbd4edad58..b9d03fe3ee2 100644 --- a/SU2_CFD/src/solvers/CSolver.cpp +++ b/SU2_CFD/src/solvers/CSolver.cpp @@ -2097,7 +2097,7 @@ void CSolver::SetAuxVar_Gradient_GG(CGeometry *geometry, const CConfig *config) auto& gradient = base_nodes->GetAuxVarGradient(); computeGradientsGreenGauss(this, MPI_QUANTITIES::AUXVAR_GRADIENT, PERIODIC_NONE, *geometry, - *config, solution, 0, base_nodes->GetnAuxVar(), -1, gradient); + *config, solution, 0, base_nodes->GetnAuxVar(), gradient); } void CSolver::SetAuxVar_Gradient_LS(CGeometry *geometry, const CConfig *config) { @@ -2108,19 +2108,20 @@ void CSolver::SetAuxVar_Gradient_LS(CGeometry *geometry, const CConfig *config) auto& rmatrix = base_nodes->GetRmatrix(); computeGradientsLeastSquares(this, MPI_QUANTITIES::AUXVAR_GRADIENT, PERIODIC_NONE, *geometry, *config, - weighted, solution, 0, base_nodes->GetnAuxVar(), -1, gradient, rmatrix); + weighted, solution, 0, base_nodes->GetnAuxVar(), gradient, rmatrix); } -void CSolver::SetSolution_Gradient_GG(CGeometry *geometry, const CConfig *config, short idxVel, bool reconstruction) { +void CSolver::SetSolution_Gradient_GG(CGeometry *geometry, const CConfig *config, bool reconstruction) { const auto& solution = base_nodes->GetSolution(); auto& gradient = reconstruction? base_nodes->GetGradient_Reconstruction() : base_nodes->GetGradient(); const auto comm = reconstruction? MPI_QUANTITIES::SOLUTION_GRAD_REC : MPI_QUANTITIES::SOLUTION_GRADIENT; const auto commPer = reconstruction? PERIODIC_SOL_GG_R : PERIODIC_SOL_GG; - computeGradientsGreenGauss(this, comm, commPer, *geometry, *config, solution, 0, nVar, idxVel, gradient); + + computeGradientsGreenGauss(this, comm, commPer, *geometry, *config, solution, 0, nVar, gradient); } -void CSolver::SetSolution_Gradient_LS(CGeometry *geometry, const CConfig *config, short idxVel, bool reconstruction) { +void CSolver::SetSolution_Gradient_LS(CGeometry *geometry, const CConfig *config, bool reconstruction) { /*--- Set a flag for unweighted or weighted least-squares. ---*/ bool weighted; @@ -2140,7 +2141,7 @@ void CSolver::SetSolution_Gradient_LS(CGeometry *geometry, const CConfig *config auto& gradient = reconstruction? base_nodes->GetGradient_Reconstruction() : base_nodes->GetGradient(); const auto comm = reconstruction? MPI_QUANTITIES::SOLUTION_GRAD_REC : MPI_QUANTITIES::SOLUTION_GRADIENT; - computeGradientsLeastSquares(this, comm, commPer, *geometry, *config, weighted, solution, 0, nVar, idxVel, gradient, rmatrix); + computeGradientsLeastSquares(this, comm, commPer, *geometry, *config, weighted, solution, 0, nVar, gradient, rmatrix); } void CSolver::SetUndivided_Laplacian(CGeometry *geometry, const CConfig *config) { @@ -2239,7 +2240,7 @@ void CSolver::SetGridVel_Gradient(CGeometry *geometry, const CConfig *config) co auto rmatrix = CVectorOfMatrix(nPoint,nDim,nDim); computeGradientsLeastSquares(nullptr, MPI_QUANTITIES::GRID_VELOCITY, PERIODIC_NONE, *geometry, *config, - true, gridVel, 0, nDim, 0, gridVelGrad, rmatrix); + true, gridVel, 0, nDim, gridVelGrad, rmatrix); } void CSolver::SetSolution_Limiter(CGeometry *geometry, const CConfig *config) { @@ -3588,26 +3589,15 @@ void CSolver::LoadInletProfile(CGeometry **geometry, /*--- Skip if this is the wrong type of marker. ---*/ if (config->GetMarker_All_KindBC(iMarker) != KIND_MARKER) continue; - const string Marker_Tag = config->GetMarker_All_TagBound(iMarker); - + string Marker_Tag = config->GetMarker_All_TagBound(iMarker); + su2double p_total = config->GetInletPtotal(Marker_Tag); + su2double t_total = config->GetInletTtotal(Marker_Tag); + auto flow_dir = config->GetInletFlowDir(Marker_Tag); std::stringstream columnName,columnValue; + columnValue << setprecision(15); columnValue << std::scientific; - su2double p_total, t_total; - const su2double* flow_dir = nullptr; - - if (KIND_MARKER == INLET_FLOW) { - p_total = config->GetInletPtotal(Marker_Tag); - t_total = config->GetInletTtotal(Marker_Tag); - flow_dir = config->GetInletFlowDir(Marker_Tag); - } else if (KIND_MARKER == SUPERSONIC_INLET) { - p_total = config->GetInlet_Pressure(Marker_Tag); - t_total = config->GetInlet_Temperature(Marker_Tag); - flow_dir = config->GetInlet_Velocity(Marker_Tag); - } else { - SU2_MPI::Error("Unsupported type of inlet.", CURRENT_FUNCTION); - } columnValue << t_total << "\t" << p_total <<"\t"; for (unsigned short iDim = 0; iDim < nDim; iDim++) { columnValue << flow_dir[iDim] <<"\t"; @@ -3616,9 +3606,7 @@ void CSolver::LoadInletProfile(CGeometry **geometry, columnName << "# COORD-X " << setw(24) << "COORD-Y " << setw(24); if(nDim==3) columnName << "COORD-Z " << setw(24); - if (KIND_MARKER == SUPERSONIC_INLET) { - columnName << "TEMPERATURE" << setw(24) << "PRESSURE " << setw(24); - } else if (config->GetKind_Regime() == ENUM_REGIME::COMPRESSIBLE) { + if (config->GetKind_Regime()==ENUM_REGIME::COMPRESSIBLE){ switch (config->GetKind_Inlet()) { /*--- compressible conditions ---*/ case INLET_TYPE::TOTAL_CONDITIONS: @@ -3629,8 +3617,7 @@ void CSolver::LoadInletProfile(CGeometry **geometry, break; default: SU2_MPI::Error("Unsupported INLET_TYPE.", CURRENT_FUNCTION); - break; - } + break; } } else { switch (config->GetKind_Inc_Inlet(Marker_Tag)) { /*--- incompressible conditions ---*/ @@ -3688,16 +3675,10 @@ void CSolver::LoadInletProfile(CGeometry **geometry, } - /*--- There are no markers of this type. ---*/ - - const unsigned short has_names = !columnNames.empty(); - unsigned short any_has_names; - SU2_MPI::Allreduce(&has_names, &any_has_names, 1, MPI_UNSIGNED_SHORT, MPI_MAX, SU2_MPI::GetComm()); - if (!any_has_names) return; /*--- Read the profile data from an ASCII file. ---*/ - CMarkerProfileReaderFVM profileReader(geometry[MESH_0], config, profile_filename, KIND_MARKER, nCol_InletFile, columnNames, columnValues); + CMarkerProfileReaderFVM profileReader(geometry[MESH_0], config, profile_filename, KIND_MARKER, nCol_InletFile, columnNames,columnValues); /*--- Load data from the restart into correct containers. ---*/ @@ -3933,7 +3914,7 @@ void CSolver::LoadInletProfile(CGeometry **geometry, const auto Marker_Tag = config->GetMarker_All_TagBound(iMarker); - /*--- Check the number of columns and allocate temp array. ---*/ + /* Check the number of columns and allocate temp array. */ unsigned short nColumns = 0; for (auto jMarker = 0ul; jMarker < profileReader.GetNumberOfProfiles(); jMarker++) { @@ -3967,10 +3948,12 @@ void CSolver::LoadInletProfile(CGeometry **geometry, the averaging. ---*/ for (auto iChildren = 0u; iChildren < geometry[iMesh]->nodes->GetnChildren_CV(iPoint); iChildren++) { - const auto Area_Children = - solver[iMesh-1][KIND_SOLVER]->GetInletAtVertex(iMarker, iVertex, geometry[iMesh-1], Inlet_Fine.data()); + const auto Point_Fine = geometry[iMesh]->nodes->GetChildren_CV(iPoint, iChildren); + + auto Area_Children = solver[iMesh-1][KIND_SOLVER]->GetInletAtVertex(Inlet_Fine.data(), Point_Fine, KIND_MARKER, + Marker_Tag, geometry[iMesh-1], config); for (auto iVar = 0u; iVar < nColumns; iVar++) - Inlet_Values[iVar] += Inlet_Fine[iVar] * Area_Children / Area_Parent; + Inlet_Values[iVar] += Inlet_Fine[iVar]*Area_Children/Area_Parent; } /*--- Set the boundary area-averaged inlet values for the coarse point. ---*/ diff --git a/SU2_CFD/src/solvers/CSpeciesSolver.cpp b/SU2_CFD/src/solvers/CSpeciesSolver.cpp index 832c9014511..3c7ac895708 100644 --- a/SU2_CFD/src/solvers/CSpeciesSolver.cpp +++ b/SU2_CFD/src/solvers/CSpeciesSolver.cpp @@ -415,16 +415,59 @@ void CSpeciesSolver::SetInletAtVertex(const su2double *val_inlet, } -su2double CSpeciesSolver::GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, - const CGeometry* geometry, su2double* val_inlet) const { - for (unsigned short iVar = 0; iVar < nVar; iVar++) - val_inlet[Inlet_Position + iVar] = Inlet_SpeciesVars[iMarker][iVertex][iVar]; +su2double CSpeciesSolver::GetInletAtVertex(su2double *val_inlet, + unsigned long val_inlet_point, + unsigned short val_kind_marker, + string val_marker, + const CGeometry *geometry, + const CConfig *config) const { + /*--- Local variables ---*/ + + unsigned short iMarker; + unsigned long iPoint, iVertex; + su2double Area = 0.0; + su2double Normal[3] = {0.0,0.0,0.0}; + + /*--- Alias positions within inlet file for readability ---*/ + + if (val_kind_marker == INLET_FLOW) { + + for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { + if ((config->GetMarker_All_KindBC(iMarker) == INLET_FLOW) && + (config->GetMarker_All_TagBound(iMarker) == val_marker)) { + + for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { + + iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); + + if (iPoint == val_inlet_point) { + + /*-- Compute boundary face area for this vertex. ---*/ + + geometry->vertex[iMarker][iVertex]->GetNormal(Normal); + Area = GeometryToolbox::Norm(nDim, Normal); + + /*--- Access and store the inlet variables for this vertex. ---*/ + for (unsigned short iVar = 0; iVar < nVar; iVar++) + val_inlet[Inlet_Position + iVar] = Inlet_SpeciesVars[iMarker][iVertex][iVar]; + + /*--- Exit once we find the point. ---*/ + + return Area; + + } + } + } + } + + } + + /*--- If we don't find a match, then the child point is not on the + current inlet boundary marker. Return zero area so this point does + not contribute to the restriction operator and continue. ---*/ - /*--- Compute boundary face area for this vertex. ---*/ + return Area; - su2double Normal[MAXNDIM] = {0.0}; - geometry->vertex[iMarker][iVertex]->GetNormal(Normal); - return GeometryToolbox::Norm(nDim, Normal); } void CSpeciesSolver::SetUniformInlet(const CConfig* config, unsigned short iMarker) { diff --git a/SU2_CFD/src/solvers/CTransLMSolver.cpp b/SU2_CFD/src/solvers/CTransLMSolver.cpp index 902a67925c4..1fdf2a47de1 100644 --- a/SU2_CFD/src/solvers/CTransLMSolver.cpp +++ b/SU2_CFD/src/solvers/CTransLMSolver.cpp @@ -185,10 +185,10 @@ void CTransLMSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai /*--- Compute LM model gradients. ---*/ if (config->GetKind_Gradient_Method() == GREEN_GAUSS) { - SetSolution_Gradient_GG(geometry, config, -1); + SetSolution_Gradient_GG(geometry, config); } if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) { - SetSolution_Gradient_LS(geometry, config, -1); + SetSolution_Gradient_LS(geometry, config); } AD::StartNoSharedReading(); diff --git a/SU2_CFD/src/solvers/CTurbSASolver.cpp b/SU2_CFD/src/solvers/CTurbSASolver.cpp index 40e19bd024c..f53596e9901 100644 --- a/SU2_CFD/src/solvers/CTurbSASolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSASolver.cpp @@ -308,8 +308,6 @@ void CTurbSASolver::Viscous_Residual(const unsigned long iEdge, const CGeometry* void CTurbSASolver::Source_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics_container, CConfig *config, unsigned short iMesh) { - bool axisymmetric = config->GetAxisymmetric(); - const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); const bool harmonic_balance = (config->GetTime_Marching() == TIME_MARCHING::HARMONIC_BALANCE); const bool transition_BC = config->GetSAParsedOptions().bc; @@ -385,11 +383,6 @@ void CTurbSASolver::Source_Residual(CGeometry *geometry, CSolver **solver_contai numerics->SetIntermittency(solver_container[TRANS_SOL]->GetNodes()->GetSolution(iPoint, 0)); } - if (axisymmetric) { - /*--- Set y coordinate ---*/ - numerics->SetCoord(geometry->nodes->GetCoord(iPoint), geometry->nodes->GetCoord(iPoint)); - } - /*--- Compute the source term ---*/ auto residual = numerics->ComputeResidual(config); @@ -1528,16 +1521,61 @@ void CTurbSASolver::SetInletAtVertex(const su2double *val_inlet, } -su2double CTurbSASolver::GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, - const CGeometry* geometry, su2double* val_inlet) const { - const auto position = nDim + 2 + nDim; - val_inlet[position] = Inlet_TurbVars[iMarker][iVertex][0]; +su2double CTurbSASolver::GetInletAtVertex(su2double *val_inlet, + unsigned long val_inlet_point, + unsigned short val_kind_marker, + string val_marker, + const CGeometry *geometry, + const CConfig *config) const { + /*--- Local variables ---*/ + + unsigned short iMarker; + unsigned long iPoint, iVertex; + su2double Area = 0.0; + su2double Normal[3] = {0.0,0.0,0.0}; + + /*--- Alias positions within inlet file for readability ---*/ + + if (val_kind_marker == INLET_FLOW) { + + unsigned short position = nDim+2+nDim; + + for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { + if ((config->GetMarker_All_KindBC(iMarker) == INLET_FLOW) && + (config->GetMarker_All_TagBound(iMarker) == val_marker)) { + + for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++){ + + iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); + + if (iPoint == val_inlet_point) { + + /*-- Compute boundary face area for this vertex. ---*/ + + geometry->vertex[iMarker][iVertex]->GetNormal(Normal); + Area = GeometryToolbox::Norm(nDim, Normal); + + /*--- Access and store the inlet variables for this vertex. ---*/ + + val_inlet[position] = Inlet_TurbVars[iMarker][iVertex][0]; + + /*--- Exit once we find the point. ---*/ + + return Area; + + } + } + } + } + + } + + /*--- If we don't find a match, then the child point is not on the + current inlet boundary marker. Return zero area so this point does + not contribute to the restriction operator and continue. ---*/ - /*--- Compute boundary face area for this vertex. ---*/ + return Area; - su2double Normal[MAXNDIM] = {0.0}; - geometry->vertex[iMarker][iVertex]->GetNormal(Normal); - return GeometryToolbox::Norm(nDim, Normal); } void CTurbSASolver::SetUniformInlet(const CConfig* config, unsigned short iMarker) { diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 63c29102175..555f8e77155 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -97,6 +97,7 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh constants[5] = 0.0828; //beta_2 constants[6] = 0.09; //betaStar constants[7] = 0.31; //a1 + if (sstParsedOptions.version == SST_OPTIONS::V1994){ constants[8] = constants[4]/constants[6] - constants[2]*0.41*0.41/sqrt(constants[6]); //alfa_1 constants[9] = constants[5]/constants[6] - constants[3]*0.41*0.41/sqrt(constants[6]); //alfa_2 @@ -107,6 +108,12 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh constants[9] = 0.44; //gamma_2 constants[10] = 10.0; // production limiter constant } + /*--- Initialize lower and upper limits---*/ + lowerlimit[0] = 1.0e-10; + upperlimit[0] = 1.0e10; + + lowerlimit[1] = 1.0e-4; + upperlimit[1] = 1.0e15; /*--- Far-field flow state quantities and initialization. ---*/ su2double rhoInf, *VelInf, muLamInf, Intensity, viscRatio, muT_Inf; @@ -125,22 +132,6 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh Solution_Inf[0] = kine_Inf; Solution_Inf[1] = omega_Inf; - /*--- Constants to use for lower limit of turbulence variable. ---*/ - su2double Ck = config->GetKFactor_LowerLimit(); - su2double Cw = config->GetOmegaFactor_LowerLimit(); - - /*--- Initialize lower and upper limits. ---*/ - if (sstParsedOptions.dll) { - lowerlimit[0] = Ck * kine_Inf; - lowerlimit[1] = Cw * omega_Inf; - } else { - lowerlimit[0] = 1.0e-10; - lowerlimit[1] = 1.0e-4; - } - - upperlimit[0] = 1.0e10; - upperlimit[1] = 1.0e15; - /*--- Eddy viscosity, initialized without stress limiter at the infinity ---*/ muT_Inf = rhoInf*kine_Inf/omega_Inf; @@ -209,10 +200,10 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai /*--- Compute turbulence gradients. ---*/ if (config->GetKind_Gradient_Method() == GREEN_GAUSS) { - SetSolution_Gradient_GG(geometry, config, -1); + SetSolution_Gradient_GG(geometry, config); } if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) { - SetSolution_Gradient_LS(geometry, config, -1); + SetSolution_Gradient_LS(geometry, config); } AD::StartNoSharedReading(); @@ -1001,18 +992,63 @@ void CTurbSSTSolver::SetInletAtVertex(const su2double *val_inlet, } -su2double CTurbSSTSolver::GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, - const CGeometry* geometry, su2double* val_inlet) const { - const auto tke_position = nDim + 2 + nDim; - const auto omega_position = tke_position + 1; - val_inlet[tke_position] = Inlet_TurbVars[iMarker][iVertex][0]; - val_inlet[omega_position] = Inlet_TurbVars[iMarker][iVertex][1]; +su2double CTurbSSTSolver::GetInletAtVertex(su2double *val_inlet, + unsigned long val_inlet_point, + unsigned short val_kind_marker, + string val_marker, + const CGeometry *geometry, + const CConfig *config) const { + /*--- Local variables ---*/ + + unsigned short iMarker; + unsigned long iPoint, iVertex; + su2double Area = 0.0; + su2double Normal[3] = {0.0,0.0,0.0}; + + /*--- Alias positions within inlet file for readability ---*/ + + if (val_kind_marker == INLET_FLOW) { + + unsigned short tke_position = nDim+2+nDim; + unsigned short omega_position = nDim+2+nDim+1; + + for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { + if ((config->GetMarker_All_KindBC(iMarker) == INLET_FLOW) && + (config->GetMarker_All_TagBound(iMarker) == val_marker)) { + + for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++){ + + iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); + + if (iPoint == val_inlet_point) { + + /*-- Compute boundary face area for this vertex. ---*/ + + geometry->vertex[iMarker][iVertex]->GetNormal(Normal); + Area = GeometryToolbox::Norm(nDim, Normal); + + /*--- Access and store the inlet variables for this vertex. ---*/ + + val_inlet[tke_position] = Inlet_TurbVars[iMarker][iVertex][0]; + val_inlet[omega_position] = Inlet_TurbVars[iMarker][iVertex][1]; + + /*--- Exit once we find the point. ---*/ + + return Area; + + } + } + } + } + + } + + /*--- If we don't find a match, then the child point is not on the + current inlet boundary marker. Return zero area so this point does + not contribute to the restriction operator and continue. ---*/ - /*--- Compute boundary face area for this vertex. ---*/ + return Area; - su2double Normal[MAXNDIM] = {0.0}; - geometry->vertex[iMarker][iVertex]->GetNormal(Normal); - return GeometryToolbox::Norm(nDim, Normal); } void CTurbSSTSolver::SetUniformInlet(const CConfig* config, unsigned short iMarker) { diff --git a/TestCases/TestCase.py b/TestCases/TestCase.py index 1170ae71e05..0818c6074a0 100644 --- a/TestCases/TestCase.py +++ b/TestCases/TestCase.py @@ -361,7 +361,7 @@ def run_filediff(self, with_tsan=False, with_asan=False): # Assert that both files have the same number of lines if len(fromlines) != len(tolines): - diff = ["ERROR: Number of lines in " + fromfile + " and " + tofile + " differ: " + len(fromlines) + " vs " + len(tolines) + "."] + diff = ["ERROR: Number of lines in " + fromfile + " and " + tofile + " differ."] passed = False # Loop through all lines diff --git a/TestCases/cont_adj_euler/naca0012/of_grad_cd.dat.ref b/TestCases/cont_adj_euler/naca0012/of_grad_cd.dat.ref index c9cda259729..2f88439a0b9 100644 --- a/TestCases/cont_adj_euler/naca0012/of_grad_cd.dat.ref +++ b/TestCases/cont_adj_euler/naca0012/of_grad_cd.dat.ref @@ -1,39 +1,39 @@ VARIABLES="VARIABLE" , "GRADIENT" , "FINDIFF_STEP" - 0 , -0.346339 , 0.0001 - 1 , -0.248052 , 0.0001 - 2 , -0.1713 , 0.0001 - 3 , -0.122543 , 0.0001 - 4 , -0.101101 , 0.0001 - 5 , -0.104377 , 0.0001 - 6 , -0.127816 , 0.0001 - 7 , -0.164567 , 0.0001 - 8 , -0.206037 , 0.0001 - 9 , -0.24378 , 0.0001 - 10 , -0.272396 , 0.0001 - 11 , -0.292059 , 0.0001 - 12 , -0.308757 , 0.0001 - 13 , -0.331226 , 0.0001 - 14 , -0.366529 , 0.0001 - 15 , -0.418919 , 0.0001 - 16 , -0.495353 , 0.0001 - 17 , -0.619083 , 0.0001 - 18 , -0.889061 , 0.0001 - 19 , 0.118474 , 0.0001 - 20 , 0.849882 , 0.0001 - 21 , 1.3251 , 0.0001 - 22 , 1.53508 , 0.0001 - 23 , 1.51368 , 0.0001 - 24 , 1.31908 , 0.0001 - 25 , 1.02001 , 0.0001 - 26 , 0.68317 , 0.0001 - 27 , 0.363758 , 0.0001 - 28 , 0.100704 , 0.0001 - 29 , -0.0830333 , 0.0001 - 30 , -0.176826 , 0.0001 - 31 , -0.178825 , 0.0001 - 32 , -0.096525 , 0.0001 - 33 , 0.0472928 , 0.0001 - 34 , 0.21134 , 0.0001 - 35 , 0.355622 , 0.0001 - 36 , 0.490104 , 0.0001 - 37 , 0.718618 , 0.0001 + 0 , 0.00534068 , 0.0001 + 1 , 0.024277 , 0.0001 + 2 , 0.0299625 , 0.0001 + 3 , 0.0234274 , 0.0001 + 4 , 0.00339532 , 0.0001 + 5 , -0.0308111 , 0.0001 + 6 , -0.0775489 , 0.0001 + 7 , -0.132033 , 0.0001 + 8 , -0.186824 , 0.0001 + 9 , -0.233924 , 0.0001 + 10 , -0.268068 , 0.0001 + 11 , -0.289743 , 0.0001 + 12 , -0.305716 , 0.0001 + 13 , -0.325863 , 0.0001 + 14 , -0.358209 , 0.0001 + 15 , -0.407234 , 0.0001 + 16 , -0.47926 , 0.0001 + 17 , -0.595838 , 0.0001 + 18 , -0.850012 , 0.0001 + 19 , 0.565996 , 0.0001 + 20 , 1.14457 , 0.0001 + 21 , 1.50247 , 0.0001 + 22 , 1.62875 , 0.0001 + 23 , 1.54948 , 0.0001 + 24 , 1.31563 , 0.0001 + 25 , 0.989959 , 0.0001 + 26 , 0.634653 , 0.0001 + 27 , 0.301875 , 0.0001 + 28 , 0.0291654 , 0.0001 + 29 , -0.160196 , 0.0001 + 30 , -0.253741 , 0.0001 + 31 , -0.247195 , 0.0001 + 32 , -0.147396 , 0.0001 + 33 , 0.0181901 , 0.0001 + 34 , 0.197238 , 0.0001 + 35 , 0.341451 , 0.0001 + 36 , 0.467151 , 0.0001 + 37 , 0.682825 , 0.0001 diff --git a/TestCases/cont_adj_euler/naca0012/of_grad_cd_disc.dat.ref b/TestCases/cont_adj_euler/naca0012/of_grad_cd_disc.dat.ref index 6da6f45e3ee..272a21372a2 100644 --- a/TestCases/cont_adj_euler/naca0012/of_grad_cd_disc.dat.ref +++ b/TestCases/cont_adj_euler/naca0012/of_grad_cd_disc.dat.ref @@ -1,39 +1,39 @@ VARIABLES="VARIABLE" , "GRADIENT" , "FINDIFF_STEP" - 0 , -2656.0 , 0.001 - 1 , -7290.69 , 0.001 - 2 , -11252.7 , 0.001 - 3 , -12531.4 , 0.001 - 4 , -10923.7 , 0.001 - 5 , -6826.86 , 0.001 - 6 , -843.71 , 0.001 - 7 , 6462.74 , 0.001 - 8 , 14656.3 , 0.001 - 9 , 23308.0 , 0.001 - 10 , 31688.2 , 0.001 - 11 , 38407.2 , 0.001 - 12 , 41274.9 , 0.001 - 13 , 37812.2 , 0.001 - 14 , 27093.1 , 0.001 - 15 , 14049.9 , 0.001 - 16 , 17583.8 , 0.001 - 17 , 78620.8 , 0.001 - 18 , 140614.0 , 0.001 - 19 , -18263.2 , 0.001 - 20 , -20877.9 , 0.001 - 21 , -22859.6 , 0.001 - 22 , -24751.5 , 0.001 - 23 , -28392.5 , 0.001 - 24 , -35514.1 , 0.001 - 25 , -46855.4 , 0.001 - 26 , -61697.7 , 0.001 - 27 , -77631.1 , 0.001 - 28 , -90537.8 , 0.001 - 29 , -95036.8 , 0.001 - 30 , -85899.0 , 0.001 - 31 , -60885.3 , 0.001 - 32 , -24333.4 , 0.001 - 33 , 12334.3 , 0.001 - 34 , 39948.1 , 0.001 - 35 , 65452.2 , 0.001 - 36 , 82215.8 , 0.001 - 37 , -44066.2 , 0.001 + 0 , -2656.96 , 0.001 + 1 , -12995.9 , 0.001 + 2 , -21781.3 , 0.001 + 3 , -27675.3 , 0.001 + 4 , -30437.9 , 0.001 + 5 , -30443.9 , 0.001 + 6 , -28343.1 , 0.001 + 7 , -24794.2 , 0.001 + 8 , -20329.4 , 0.001 + 9 , -15376.6 , 0.001 + 10 , -10418.0 , 0.001 + 11 , -6201.67 , 0.001 + 12 , -3878.08 , 0.001 + 13 , -4910.93 , 0.001 + 14 , -10573.5 , 0.001 + 15 , -20610.7 , 0.001 + 16 , -30110.4 , 0.001 + 17 , -26294.5 , 0.001 + 18 , -62393.8 , 0.001 + 19 , -2797.26 , 0.001 + 20 , -832.067 , 0.001 + 21 , -668.081 , 0.001 + 22 , -1773.25 , 0.001 + 23 , -5718.86 , 0.001 + 24 , -13717.8 , 0.001 + 25 , -25699.0 , 0.001 + 26 , -40061.9 , 0.001 + 27 , -53729.8 , 0.001 + 28 , -62415.6 , 0.001 + 29 , -61293.4 , 0.001 + 30 , -46505.9 , 0.001 + 31 , -17841.7 , 0.001 + 32 , 18183.8 , 0.001 + 33 , 48447.5 , 0.001 + 34 , 62322.0 , 0.001 + 35 , 64139.5 , 0.001 + 36 , 54568.2 , 0.001 + 37 , 64856.8 , 0.001 diff --git a/TestCases/cont_adj_euler/naca0012/of_grad_directdiff.dat.ref b/TestCases/cont_adj_euler/naca0012/of_grad_directdiff.dat.ref index 1b4c963eeac..4992e46a279 100644 --- a/TestCases/cont_adj_euler/naca0012/of_grad_directdiff.dat.ref +++ b/TestCases/cont_adj_euler/naca0012/of_grad_directdiff.dat.ref @@ -1,4 +1,4 @@ VARIABLES="VARIABLE" , "DRAG" , "EFFICIENCY" , "FORCE_X" , "FORCE_Y" , "FORCE_Z" , "LIFT" , "MOMENT_X" , "MOMENT_Y" , "MOMENT_Z" , "SIDEFORCE" - 0 , 0.2405003164 , -108.3397202 , 0.2752804375 , -1.591326829 , 0.0 , -1.596953347 , 0.0 , 0.0 , 1.18511582 , 0.0 - 1 , 0.4163088272 , -176.5661566 , 0.4692829784 , -2.423229574 , 0.0 , -2.432890265 , 0.0 , 0.0 , 1.020271816 , 0.0 - 2 , 0.5558397416 , -231.7769399 , 0.6239540061 , -3.115569035 , 0.0 , -3.128439099 , 0.0 , 0.0 , 0.6093229584 , 0.0 + 0 , 0.2253591473 , -105.6097088 , 0.2588459007 , -1.5322178 , 0.0 , -1.537499867 , 0.0 , 0.0 , 1.202899757 , 0.0 + 1 , 0.3835809166 , -173.3502205 , 0.4363886002 , -2.415957492 , 0.0 , -2.424902327 , 0.0 , 0.0 , 1.053347497 , 0.0 + 2 , 0.5151776249 , -228.9760041 , 0.5835870252 , -3.129538494 , 0.0 , -3.141524632 , 0.0 , 0.0 , 0.6540715539 , 0.0 diff --git a/TestCases/cont_adj_euler/wedge/of_grad_combo.dat.ref b/TestCases/cont_adj_euler/wedge/of_grad_combo.dat.ref index 51bda5370df..0d54e740402 100644 --- a/TestCases/cont_adj_euler/wedge/of_grad_combo.dat.ref +++ b/TestCases/cont_adj_euler/wedge/of_grad_combo.dat.ref @@ -1,5 +1,5 @@ VARIABLES="VARIABLE" , "GRADIENT" , "FINDIFF_STEP" - 0 , 0.00767644 , 0.0001 - 1 , 0.00498358 , 0.0001 - 2 , 0.00246134 , 0.0001 - 3 , 0.000893054 , 0.0001 + 0 , 0.00766235 , 0.0001 + 1 , 0.00499567 , 0.0001 + 2 , 0.00249665 , 0.0001 + 3 , 0.000904607 , 0.0001 diff --git a/TestCases/disc_adj_fsi/dyn_fsi/grad_dv.opt.ref b/TestCases/disc_adj_fsi/dyn_fsi/grad_dv.opt.ref index d0a338410ba..b2e428bed5a 100644 --- a/TestCases/disc_adj_fsi/dyn_fsi/grad_dv.opt.ref +++ b/TestCases/disc_adj_fsi/dyn_fsi/grad_dv.opt.ref @@ -1,9 +1,9 @@ INDEX GRAD -0 -5.239274142145693e-03 -1 -2.822866261832595e-03 -2 -1.251166631047082e-03 -3 -4.746312021502222e-04 -4 -4.726421390156573e-04 -5 -1.242307153964931e-03 -6 -2.797799332331688e-03 -7 -5.181304648315885e-03 +0 -3.461460667601000e-03 +1 -1.841786311588663e-03 +2 -7.915536257748967e-04 +3 -2.739622082729717e-04 +4 -2.734869133461104e-04 +5 -7.881162428890206e-04 +6 -1.828978290516677e-03 +7 -3.427219398258316e-03 diff --git a/TestCases/disc_adj_heat/disc_adj_heat.cfg b/TestCases/disc_adj_heat/disc_adj_heat.cfg index cb258ec6333..85e7d30e98c 100644 --- a/TestCases/disc_adj_heat/disc_adj_heat.cfg +++ b/TestCases/disc_adj_heat/disc_adj_heat.cfg @@ -208,6 +208,6 @@ SURFACE_FILENAME= surface_flow SURFACE_ADJ_FILENAME= surface_adjoint -OUTPUT_WRT_FREQ= 100 +OUTPUT_WRT_FREQ= 1 SCREEN_OUTPUT= (INNER_ITER, RMS_ADJ_PRESSURE, RMS_ADJ_NU_TILDE, RMS_ADJ_HEAT, SENS_VEL_IN, SENS_PRESS_OUT) diff --git a/TestCases/euler/bluntbody/blunt.cfg b/TestCases/euler/bluntbody/blunt.cfg index a76c6be19ba..f9ece1cbae4 100644 --- a/TestCases/euler/bluntbody/blunt.cfg +++ b/TestCases/euler/bluntbody/blunt.cfg @@ -43,7 +43,7 @@ MARKER_MONITORING = ( wall ) % ------------- COMMON PARAMETERS TO DEFINE THE NUMERICAL METHOD --------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 6.0 +CFL_NUMBER= 3.0 CFL_ADAPT= NO CFL_ADAPT_PARAM= ( 1.1, 0.9, 5.0, 50.0 ) ITER= 2500 diff --git a/TestCases/euler/channel/inv_channel_RK.cfg b/TestCases/euler/channel/inv_channel_RK.cfg index 8e20a09f14c..ee2b3513e14 100644 --- a/TestCases/euler/channel/inv_channel_RK.cfg +++ b/TestCases/euler/channel/inv_channel_RK.cfg @@ -44,7 +44,7 @@ MARKER_MONITORING= ( upper_wall, lower_wall ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 2.5 +CFL_NUMBER= 2.0 CFL_ADAPT= NO CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 ) RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) diff --git a/TestCases/euler/naca0012/inv_NACA0012_Roe.cfg b/TestCases/euler/naca0012/inv_NACA0012_Roe.cfg index 087bca16ebc..6215d0870ae 100644 --- a/TestCases/euler/naca0012/inv_NACA0012_Roe.cfg +++ b/TestCases/euler/naca0012/inv_NACA0012_Roe.cfg @@ -41,11 +41,11 @@ MARKER_MONITORING= ( airfoil ) % ------------- COMMON PARAMETERS TO DEFINE THE NUMERICAL METHOD --------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 20.0 +CFL_NUMBER= 4.0 CFL_ADAPT= NO CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 ) RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) -ITER= 1000 +ITER= 110 LINEAR_SOLVER= BCGSTAB LINEAR_SOLVER_ERROR= 1E-6 LINEAR_SOLVER_ITER= 5 @@ -57,8 +57,8 @@ MGCYCLE= W_CYCLE MG_PRE_SMOOTH= ( 1, 2, 2, 2 ) MG_POST_SMOOTH= ( 1, 1, 1, 1 ) MG_CORRECTION_SMOOTH= ( 1, 1, 1, 1 ) -MG_DAMP_RESTRICTION= 0.80 -MG_DAMP_PROLONGATION= 0.80 +MG_DAMP_RESTRICTION= 1.0 +MG_DAMP_PROLONGATION= 1.0 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % diff --git a/TestCases/euler/wedge/inv_wedge_HLLC.cfg b/TestCases/euler/wedge/inv_wedge_HLLC.cfg index 77c20175c22..30120e792dd 100644 --- a/TestCases/euler/wedge/inv_wedge_HLLC.cfg +++ b/TestCases/euler/wedge/inv_wedge_HLLC.cfg @@ -42,7 +42,7 @@ MARKER_MONITORING= ( upper, lower ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 4.0 +CFL_NUMBER= 1.0 CFL_ADAPT= NO CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 ) RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) diff --git a/TestCases/fixed_cl/naca0012/inv_NACA0012.cfg b/TestCases/fixed_cl/naca0012/inv_NACA0012.cfg index a66afe95074..5842e3848dc 100644 --- a/TestCases/fixed_cl/naca0012/inv_NACA0012.cfg +++ b/TestCases/fixed_cl/naca0012/inv_NACA0012.cfg @@ -55,7 +55,7 @@ MARKER_DESIGNING = ( airfoil ) % NUM_METHOD_GRAD= GREEN_GAUSS OBJECTIVE_FUNCTION= DRAG -CFL_NUMBER=1000 +CFL_NUMBER= 5.0 ITER= 1000 % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% @@ -115,15 +115,15 @@ CONV_CAUCHY_EPS= 1E-6 MESH_FILENAME= mesh_NACA0012_inv.su2 MESH_FORMAT= SU2 MESH_OUT_FILENAME= mesh_out.su2 -SOLUTION_FILENAME= solution_flow -SOLUTION_ADJ_FILENAME= solution_adj +SOLUTION_FILENAME= solution_flow.dat +SOLUTION_ADJ_FILENAME= solution_adj.dat TABULAR_FORMAT= CSV CONV_FILENAME= history -RESTART_FILENAME= restart_flow -RESTART_ADJ_FILENAME= restart_adj +RESTART_FILENAME= restart_flow.dat +RESTART_ADJ_FILENAME= restart_adj.dat VOLUME_FILENAME= flow VOLUME_ADJ_FILENAME= adjoint -GRAD_OBJFUNC_FILENAME= of_grad +GRAD_OBJFUNC_FILENAME= of_grad.dat SURFACE_FILENAME= surface_flow SURFACE_ADJ_FILENAME= surface_adjoint OUTPUT_WRT_FREQ= 250 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 f2b6bd919aa..1b927581780 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 @@ -37,16 +37,15 @@ KIND_SCALAR_MODEL= FLAMELET DIFFUSIVITY_MODEL= FLAMELET VISCOSITY_MODEL= FLAMELET CONDUCTIVITY_MODEL= FLAMELET -FLAME_INIT_METHOD= FLAME_FRONT 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) -CONV_NUM_METHOD_SPECIES= BOUNDED_SCALAR +CONV_NUM_METHOD_SPECIES= SCALAR_UPWIND MUSCL_SPECIES= YES SLOPE_LIMITER_SPECIES= NONE TIME_DISCRE_SPECIES= EULER_IMPLICIT % SCALAR CLIPPING -SPECIES_CLIPPING= NO +SPECIES_CLIPPING= YES SPECIES_CLIPPING_MIN= 0 -2e6 0 0 SPECIES_CLIPPING_MAX= 1 2e6 1 1 % @@ -86,9 +85,9 @@ MARKER_ANALYZE_AVERAGE = AREA % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 50 +CFL_NUMBER= 350 CFL_ADAPT= NO -ITER= 10000 +ITER= 100 OUTPUT_WRT_FREQ= 100 % % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% @@ -127,8 +126,8 @@ MESH_FILENAME = mesh_structured.cgns MESH_OUT_FILENAME= mesh_out.su2 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/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 adf9a65020f..e0828cc4d44 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 @@ -19,7 +19,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) INNER_ITER= 1 @@ -55,7 +55,6 @@ 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= (0.004, 0.0, 0.0, 1.0, 0.0, 0.0, 0.2e-3, 1.0) % -------------------- SPECIES TRANSPORT ---------------------------------------% @@ -89,8 +88,8 @@ VISCOSITY_MODEL= FLAMELET % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% -NUM_METHOD_GRAD= GREEN_GAUSS -%NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES +%NUM_METHOD_GRAD= GREEN_GAUSS +NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES CFL_NUMBER= 25 CFL_ADAPT= NO 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 9a674d7a8e5..1ca70ab9d79 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 @@ -37,7 +37,7 @@ RESTART_ADJ_FILENAME= restart_adj TIME_DOMAIN= NO OUTER_ITER= 10 -OUTPUT_WRT_FREQ= 100 +OUTPUT_WRT_FREQ= 500 SCREEN_WRT_FREQ_INNER= 1 SCREEN_WRT_FREQ_OUTER= 1 diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index c893649c1dd..bd7635e1413 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -51,7 +51,7 @@ def main(): channel.cfg_dir = "euler/channel" channel.cfg_file = "inv_channel_RK.cfg" channel.test_iter = 20 - channel.test_vals = [-2.965605, 2.459083, 0.016007, 0.042277] + channel.test_vals = [-2.667328, 2.797437, 0.018714, 0.006906] test_list.append(channel) # NACA0012 @@ -59,7 +59,7 @@ def main(): naca0012.cfg_dir = "euler/naca0012" naca0012.cfg_file = "inv_NACA0012_Roe.cfg" naca0012.test_iter = 20 - naca0012.test_vals = [-4.444945, -3.941041, 0.318999, 0.022365] + naca0012.test_vals = [-4.023999, -3.515034, 0.339426, 0.022217] test_list.append(naca0012) # Supersonic wedge @@ -67,7 +67,7 @@ def main(): wedge.cfg_dir = "euler/wedge" wedge.cfg_file = "inv_wedge_HLLC.cfg" wedge.test_iter = 20 - wedge.test_vals = [-1.368091, 4.302736, -0.243433, 0.042906] + wedge.test_vals = [-0.942862, 4.784581, -0.208106, 0.036665] test_list.append(wedge) # ONERA M6 Wing @@ -75,7 +75,7 @@ def main(): oneram6.cfg_dir = "euler/oneram6" oneram6.cfg_file = "inv_ONERAM6.cfg" oneram6.test_iter = 10 - oneram6.test_vals = [0.280800, 0.008623] + oneram6.test_vals = [0.281703, 0.011821] test_list.append(oneram6) # Fixed CL NACA0012 @@ -83,7 +83,7 @@ def main(): fixedCL_naca0012.cfg_dir = "fixed_cl/naca0012" fixedCL_naca0012.cfg_file = "inv_NACA0012.cfg" fixedCL_naca0012.test_iter = 10 - fixedCL_naca0012.test_vals = [-3.905038, 1.628019, 0.301067, 0.019483] + fixedCL_naca0012.test_vals = [-7.374806, -1.872330, 0.300000, 0.019471] test_list.append(fixedCL_naca0012) # HYPERSONIC FLOW PAST BLUNT BODY @@ -91,7 +91,7 @@ def main(): bluntbody.cfg_dir = "euler/bluntbody" bluntbody.cfg_file = "blunt.cfg" bluntbody.test_iter = 20 - bluntbody.test_vals = [0.491773, 6.855541, 0.000298, 1.791791] + bluntbody.test_vals = [0.540010, 6.916656, 0.000027, 1.869004] test_list.append(bluntbody) ########################## @@ -103,7 +103,7 @@ def main(): flatplate.cfg_dir = "navierstokes/flatplate" flatplate.cfg_file = "lam_flatplate.cfg" flatplate.test_iter = 100 - flatplate.test_vals = [-7.700620, -2.229886, 0.001084, 0.036235, 2.361500, -2.325300, -1.823400, -1.823400] + flatplate.test_vals = [-9.154123, -3.663185, 0.001112, 0.036277, 2.361500, -2.325300, -2.278800, -2.278800] flatplate.test_vals_aarch64 = [-9.154130, -3.663197, 0.001112, 0.036277, 2.361500, -2.325300, -2.278800, -2.278800] test_list.append(flatplate) @@ -112,7 +112,7 @@ def main(): cylinder.cfg_dir = "navierstokes/cylinder" cylinder.cfg_file = "lam_cylinder.cfg" cylinder.test_iter = 25 - cylinder.test_vals = [-8.265865, -2.783635, -0.019914, 1.614879, -0.010191] + cylinder.test_vals = [-6.765429, -1.297425, 0.019571, 0.310233, 0.123270] cylinder.test_vals_aarch64 = [-6.765429, -1.297425, 0.019571, 0.310231, 0.123270] test_list.append(cylinder) @@ -121,8 +121,8 @@ def main(): cylinder_lowmach.cfg_dir = "navierstokes/cylinder" cylinder_lowmach.cfg_file = "cylinder_lowmach.cfg" cylinder_lowmach.test_iter = 25 - cylinder_lowmach.test_vals = [-6.830996, -1.368850, -0.143956, 73.963354, 0.002457] - cylinder_lowmach.test_vals_aarch64 = [-6.830996, -1.368850, -0.143956, 73.963354, 0.002457] + cylinder_lowmach.test_vals = [-6.850130, -1.388096, -0.056036, 108.140809, 0.007988] + cylinder_lowmach.test_vals_aarch64 = [-6.850130, -1.388096, -0.056036, 108.140813, 0.007988] test_list.append(cylinder_lowmach) # 2D Poiseuille flow (body force driven with periodic inlet / outlet) @@ -139,8 +139,8 @@ def main(): poiseuille_profile.cfg_dir = "navierstokes/poiseuille" poiseuille_profile.cfg_file = "profile_poiseuille.cfg" poiseuille_profile.test_iter = 10 - poiseuille_profile.test_vals = [-12.485957, -7.612048, -0.000000, 2.085796] - poiseuille_profile.test_vals_aarch64 = [-12.485957, -7.612048, -0.000000, 2.085796] + poiseuille_profile.test_vals = [-12.494728, -7.712546, -0.000000, 2.085796] + poiseuille_profile.test_vals_aarch64 = [-12.494717, -7.711274, -0.000000, 2.085796] test_list.append(poiseuille_profile) # 2D Rotational Periodic @@ -185,7 +185,7 @@ def main(): turb_flatplate.cfg_dir = "rans/flatplate" turb_flatplate.cfg_file = "turb_SA_flatplate.cfg" turb_flatplate.test_iter = 20 - turb_flatplate.test_vals = [-4.156553, -6.736064, -0.176184, 0.057478] + turb_flatplate.test_vals = [-4.157358, -6.736289, -0.176258, 0.057431] test_list.append(turb_flatplate) # ONERA M6 Wing @@ -193,7 +193,7 @@ def main(): turb_oneram6.cfg_dir = "rans/oneram6" turb_oneram6.cfg_file = "turb_ONERAM6.cfg" turb_oneram6.test_iter = 10 - turb_oneram6.test_vals = [-2.392863, -6.689822, 0.230745, 0.158812, -33786.000000] + turb_oneram6.test_vals = [-2.388836, -6.689426, 0.230320, 0.157640, -32539.000000] test_list.append(turb_oneram6) # NACA0012 (SA, FUN3D finest grid results: CL=1.0983, CD=0.01242) @@ -255,7 +255,7 @@ def main(): axi_rans_air_nozzle_restart.cfg_dir = "axisymmetric_rans/air_nozzle" axi_rans_air_nozzle_restart.cfg_file = "air_nozzle_restart.cfg" axi_rans_air_nozzle_restart.test_iter = 10 - axi_rans_air_nozzle_restart.test_vals = [-12.155957, -6.610384, -9.237797, -4.532605, -2019.700000] + axi_rans_air_nozzle_restart.test_vals = [-12.060634, -6.992273, -8.808757, -4.097753, -2019.800000] test_list.append(axi_rans_air_nozzle_restart) ################################# @@ -329,7 +329,7 @@ def main(): harmonic_balance.cfg_dir = "harmonic_balance" harmonic_balance.cfg_file = "HB.cfg" harmonic_balance.test_iter = 25 - harmonic_balance.test_vals = [-1.554985, 0.831796, 0.935728, 3.960209] + harmonic_balance.test_vals = [-1.589740, 0.790168, 0.937052, 3.922578] test_list.append(harmonic_balance) # Turbulent pitching NACA 64a010 airfoil @@ -349,7 +349,7 @@ def main(): inc_euler_naca0012.cfg_dir = "incomp_euler/naca0012" inc_euler_naca0012.cfg_file = "incomp_NACA0012.cfg" inc_euler_naca0012.test_iter = 20 - inc_euler_naca0012.test_vals = [-7.104363, -6.354829, 0.531976, 0.008467] + inc_euler_naca0012.test_vals = [-4.858287, -3.810487, 0.491850, 0.007002] test_list.append(inc_euler_naca0012) # C-D nozzle with pressure inlet and mass flow outlet @@ -357,8 +357,8 @@ def main(): inc_nozzle.cfg_dir = "incomp_euler/nozzle" inc_nozzle.cfg_file = "inv_nozzle.cfg" inc_nozzle.test_iter = 20 - inc_nozzle.test_vals = [-6.363748, -5.564772, -0.003840, 0.126592] - inc_nozzle.test_vals_aarch64 = [-5.624385, -4.988472, -0.000096, 0.137032] + inc_nozzle.test_vals = [-5.971249, -4.910844, -0.000196, 0.121635] + inc_nozzle.test_vals_aarch64 = [-5.971248, -4.910844, -0.000196, 0.121635] test_list.append(inc_nozzle) ############################# @@ -395,7 +395,7 @@ def main(): inc_lam_bend.cfg_dir = "incomp_navierstokes/bend" inc_lam_bend.cfg_file = "lam_bend.cfg" inc_lam_bend.test_iter = 10 - inc_lam_bend.test_vals = [-3.547250, -3.225803, -0.015148, 1.006543] + inc_lam_bend.test_vals = [-3.437996, -3.086189, -0.015600, 1.142212] inc_lam_bend.test_vals_aarch64 = [-3.437996, -3.086188, -0.015600, 1.142213] test_list.append(inc_lam_bend) @@ -424,7 +424,7 @@ def main(): inc_weakly_coupled.cfg_dir = "disc_adj_heat" inc_weakly_coupled.cfg_file = "primal.cfg" inc_weakly_coupled.test_iter = 10 - inc_weakly_coupled.test_vals = [-18.894811, -17.879327, -18.412938, -17.855948, -18.343462, -15.659612, 5.545700] + inc_weakly_coupled.test_vals = [-16.498562, -15.335587, -15.570565, -12.867787, -18.185331, -13.071436, 5.545800] test_list.append(inc_weakly_coupled) ###################################### @@ -467,7 +467,7 @@ def main(): sine_gust.cfg_dir = "gust" sine_gust.cfg_file = "inv_gust_NACA0012.cfg" sine_gust.test_iter = 5 - sine_gust.test_vals = [-1.977514, 3.481817, -0.010400, -0.008115] + sine_gust.test_vals = [-1.977520, 3.481804, -0.012402, -0.007454] sine_gust.unsteady = True test_list.append(sine_gust) @@ -476,7 +476,7 @@ def main(): cosine_gust.cfg_dir = "gust" cosine_gust.cfg_file = "cosine_gust_zdir.cfg" cosine_gust.test_iter = 79 - cosine_gust.test_vals = [-2.418805, 0.002013, -0.001504, 0.000445, -0.000558] + cosine_gust.test_vals = [-2.418813, 0.004650, -0.001878, -0.000637, -0.000271] cosine_gust.unsteady = True cosine_gust.enabled_with_tsan = False test_list.append(cosine_gust) @@ -486,7 +486,7 @@ def main(): gust_mesh_defo.cfg_dir = "gust" gust_mesh_defo.cfg_file = "gust_with_mesh_deformation.cfg" gust_mesh_defo.test_iter = 6 - gust_mesh_defo.test_vals = [-1.844761, 0.001116, -0.000265] + gust_mesh_defo.test_vals = [-1.844778, 0.000846, -0.000408] gust_mesh_defo.unsteady = True gust_mesh_defo.enabled_with_tsan = False test_list.append(gust_mesh_defo) @@ -496,8 +496,8 @@ def main(): aeroelastic.cfg_dir = "aeroelastic" aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg" aeroelastic.test_iter = 2 - aeroelastic.test_vals = [0.074058, 0.027628, -0.001641, -0.000128] - aeroelastic.test_vals_aarch64 = [0.074170, 0.027590, -0.001579, -0.000160] + aeroelastic.test_vals = [0.074432, 0.033108, -0.001650, -0.000127] + aeroelastic.test_vals_aarch64 = [0.074836, 0.033102, -0.001650, -0.000127] aeroelastic.unsteady = True aeroelastic.enabled_on_cpu_arch = ["x86_64"] # Requires AVX-capable architecture aeroelastic.enabled_with_tsan = False @@ -508,7 +508,7 @@ def main(): ddes_flatplate.cfg_dir = "ddes/flatplate" ddes_flatplate.cfg_file = "ddes_flatplate.cfg" ddes_flatplate.test_iter = 10 - ddes_flatplate.test_vals = [-2.714785, -5.882681, -0.215041, 0.023758, -617.440000] + ddes_flatplate.test_vals = [-2.714757, -5.882779, -0.215005, 0.023783, -618.130000] ddes_flatplate.unsteady = True test_list.append(ddes_flatplate) @@ -526,7 +526,7 @@ def main(): unst_deforming_naca0012.cfg_dir = "disc_adj_euler/naca0012_pitching_def" unst_deforming_naca0012.cfg_file = "inv_NACA0012_pitching_deform.cfg" unst_deforming_naca0012.test_iter = 5 - unst_deforming_naca0012.test_vals = [-3.665202, -3.793253, -3.716498, -3.148334] + unst_deforming_naca0012.test_vals = [-3.665126, -3.793497, -3.716496, -3.148290] unst_deforming_naca0012.unsteady = True unst_deforming_naca0012.enabled_with_tsan = False test_list.append(unst_deforming_naca0012) @@ -539,17 +539,17 @@ def main(): edge_VW = TestCase('edge_VW') edge_VW.cfg_dir = "nicf/edge" edge_VW.cfg_file = "edge_VW.cfg" - edge_VW.test_iter = 40 - edge_VW.test_vals = [-5.759815, 0.398128, -0.000009, 0.000000] + edge_VW.test_iter = 100 + edge_VW.test_vals = [-5.040246, 1.124521, -0.000009, 0.000000] test_list.append(edge_VW) # Rarefaction shock wave edge_PPR edge_PPR = TestCase('edge_PPR') edge_PPR.cfg_dir = "nicf/edge" edge_PPR.cfg_file = "edge_PPR.cfg" - edge_PPR.test_iter = 40 - edge_PPR.test_vals = [-6.922907, -0.757793, -0.000034, 0.000000] - edge_PPR.test_vals_aarch64 = [-8.573595, -2.391849, -0.000034, 0.000000] + edge_PPR.test_iter = 100 + edge_PPR.test_vals = [-5.401604, 0.738202, -0.000035, 0.000000] + edge_PPR.test_vals_aarch64 = [-5.401642, 0.738164, -0.000035, 0.000000] test_list.append(edge_PPR) ###################################### @@ -561,7 +561,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-6.614627, -3.001324, -14.336143, -8.776079, -11.382919, -5.852328, 73273.000000, 73273.000000, 0.019884, 82.491000] + Jones_tc_restart.test_vals = [-6.614623, -3.001323, -14.336147, -8.776081, -11.382919, -5.852327, 73273, 73273, 0.019884, 82.491] test_list.append(Jones_tc_restart) # 2D axial stage @@ -569,7 +569,7 @@ def main(): axial_stage2D.cfg_dir = "turbomachinery/axial_stage_2D" axial_stage2D.cfg_file = "Axial_stage2D.cfg" axial_stage2D.test_iter = 20 - axial_stage2D.test_vals = [0.983739, 1.534333, -2.888521, 2.606770, -2.418339, 3.087275, 106380.000000, 106380.000000, 5.732600, 64.711000] + axial_stage2D.test_vals = [0.983739, 1.534333, -2.888521, 2.606770, -2.418339, 3.087275, 106380, 106380, 5.7325, 64.711] axial_stage2D.test_vals_aarch64 = [0.983739, 1.534333, -2.888521, 2.606770, -2.418339, 3.087275, 106380, 106380, 5.7325, 64.711] test_list.append(axial_stage2D) @@ -578,7 +578,7 @@ def main(): transonic_stator_restart.cfg_dir = "turbomachinery/transonic_stator_2D" transonic_stator_restart.cfg_file = "transonic_stator_restart.cfg" transonic_stator_restart.test_iter = 20 - transonic_stator_restart.test_vals = [-5.007735, -3.099310, -2.751696, 1.091966, -3.542819, 2.163237, -471630.000000, 94.866000, -0.035738] + transonic_stator_restart.test_vals = [-5.007735, -3.099310, -2.751696, 1.091966, -3.542819, 2.163237, -471630, 94.866, -0.035738] transonic_stator_restart.test_vals_aarch64 = [-5.007735, -3.099310, -2.751696, 1.091966, -3.542819, 2.163237, -471630, 94.866, -0.035738] test_list.append(transonic_stator_restart) @@ -591,7 +591,7 @@ def main(): uniform_flow.cfg_dir = "sliding_interface/uniform_flow" uniform_flow.cfg_file = "uniform_NN.cfg" uniform_flow.test_iter = 5 - uniform_flow.test_vals = [5.000000, 0.000000, -0.185381, -10.631535] + uniform_flow.test_vals = [5.000000, 0.000000, -0.188748, -10.631533] uniform_flow.unsteady = True uniform_flow.multizone = True test_list.append(uniform_flow) @@ -601,7 +601,7 @@ def main(): channel_2D.cfg_dir = "sliding_interface/channel_2D" channel_2D.cfg_file = "channel_2D_WA.cfg" channel_2D.test_iter = 2 - channel_2D.test_vals = [2.000000, 0.000000, 0.419762, 0.352170, 0.404385] + channel_2D.test_vals = [2.000000, 0.000000, 0.397975, 0.352765, 0.405420] channel_2D.unsteady = True channel_2D.multizone = True test_list.append(channel_2D) @@ -611,8 +611,8 @@ def main(): channel_3D.cfg_dir = "sliding_interface/channel_3D" channel_3D.cfg_file = "channel_3D_WA.cfg" channel_3D.test_iter = 2 - channel_3D.test_vals = [2.000000, 0.000000, 0.623108, 0.505077, 0.412801] - channel_3D.test_vals_aarch64 = [2.000000, 0.000000, 0.620558, 0.504323, 0.412729] + channel_3D.test_vals = [2.000000, 0.000000, 0.620170, 0.505179, 0.415317] + channel_3D.test_vals_aarch64 = [2.000000, 0.000000, 0.620189, 0.505311, 0.415246] channel_3D.unsteady = True channel_3D.multizone = True channel_3D.enabled_with_tsan = False @@ -623,7 +623,7 @@ def main(): pipe.cfg_dir = "sliding_interface/pipe" pipe.cfg_file = "pipe_NN.cfg" pipe.test_iter = 2 - pipe.test_vals = [0.116650, 0.481386, 0.648698, 0.982997, 1.018359] + pipe.test_vals = [0.150024, 0.491949, 0.677759, 0.963991, 1.006947] pipe.unsteady = True pipe.multizone = True test_list.append(pipe) @@ -633,7 +633,7 @@ def main(): rotating_cylinders.cfg_dir = "sliding_interface/rotating_cylinders" rotating_cylinders.cfg_file = "rot_cylinders_WA.cfg" rotating_cylinders.test_iter = 3 - rotating_cylinders.test_vals = [3.000000, 0.000000, 0.719776, 1.111045, 1.154066] + rotating_cylinders.test_vals = [3.000000, 0.000000, 0.777568, 1.134807, 1.224137] rotating_cylinders.unsteady = True rotating_cylinders.multizone = True test_list.append(rotating_cylinders) @@ -643,7 +643,7 @@ def main(): supersonic_vortex_shedding.cfg_dir = "sliding_interface/supersonic_vortex_shedding" supersonic_vortex_shedding.cfg_file = "sup_vor_shed_WA.cfg" supersonic_vortex_shedding.test_iter = 5 - supersonic_vortex_shedding.test_vals = [5.000000, 0.000000, 1.207949, 1.036083] + supersonic_vortex_shedding.test_vals = [5.000000, 0.000000, 1.214344, 1.663912] supersonic_vortex_shedding.unsteady = True supersonic_vortex_shedding.multizone = True test_list.append(supersonic_vortex_shedding) @@ -694,7 +694,7 @@ def main(): fsi2d.cfg_dir = "fea_fsi/WallChannel_2d" fsi2d.cfg_file = "configFSI.cfg" fsi2d.test_iter = 4 - fsi2d.test_vals = [4.000000, 0.000000, -3.729243, -4.153954] + fsi2d.test_vals = [4.000000, 0.000000, -3.743227, -4.133479] fsi2d.multizone= True fsi2d.unsteady = True fsi2d.enabled_with_tsan = False @@ -705,7 +705,7 @@ def main(): stat_fsi.cfg_dir = "fea_fsi/stat_fsi" stat_fsi.cfg_file = "config.cfg" stat_fsi.test_iter = 7 - stat_fsi.test_vals = [-5.425896, -5.797242, 0.000000, 6.000000] + stat_fsi.test_vals = [-5.397954, -5.719688, 0.000000, 10.000000] stat_fsi.test_vals_aarch64 = [-5.423016, -5.753459, 0.000000, 10.000000] stat_fsi.multizone = True test_list.append(stat_fsi) @@ -715,8 +715,8 @@ def main(): dyn_fsi.cfg_dir = "fea_fsi/dyn_fsi" dyn_fsi.cfg_file = "config.cfg" dyn_fsi.test_iter = 4 - dyn_fsi.test_vals = [-4.330441, -4.057994, 0.000000, 103.000000] - dyn_fsi.test_vals_aarch64 = [-4.332167, -4.057742, 0.000000, 102.000000] + dyn_fsi.test_vals = [-4.355806, -4.060582, 0.000000, 103.000000] + dyn_fsi.test_vals_aarch64 = [-4.355806, -4.060582, 0.000000, 103.000000] dyn_fsi.multizone = True dyn_fsi.unsteady = True test_list.append(dyn_fsi) @@ -726,8 +726,8 @@ def main(): stat_fsi_restart.cfg_dir = "fea_fsi/stat_fsi" stat_fsi_restart.cfg_file = "config_restart.cfg" stat_fsi_restart.test_iter = 1 - stat_fsi_restart.test_vals = [-3.463348, -4.232710, 0.000000, 37.000000] - stat_fsi_restart.test_vals_aarch64 = [-3.442878, -4.228058, 0.000000, 37.000000] + stat_fsi_restart.test_vals = [-3.474078, -4.242240, 0.000000, 36.000000] + stat_fsi_restart.test_vals_aarch64 = [-3.474081, -4.242372, 0.000000, 37.000000] stat_fsi_restart.multizone = True test_list.append(stat_fsi_restart) diff --git a/TestCases/hybrid_regression_AD.py b/TestCases/hybrid_regression_AD.py index 0669ff42a30..5bf0befa263 100644 --- a/TestCases/hybrid_regression_AD.py +++ b/TestCases/hybrid_regression_AD.py @@ -50,7 +50,7 @@ def main(): discadj_naca0012.cfg_dir = "cont_adj_euler/naca0012" discadj_naca0012.cfg_file = "inv_NACA0012_discadj.cfg" discadj_naca0012.test_iter = 100 - discadj_naca0012.test_vals = [-3.560691, -8.925239, -0.000000, 0.005559] + discadj_naca0012.test_vals = [-3.561506, -8.926634, -0.000000, 0.005587] test_list.append(discadj_naca0012) # Inviscid Cylinder 3D (multiple markers) @@ -58,7 +58,7 @@ def main(): discadj_cylinder3D.cfg_dir = "disc_adj_euler/cylinder3D" discadj_cylinder3D.cfg_file = "inv_cylinder3D.cfg" discadj_cylinder3D.test_iter = 5 - discadj_cylinder3D.test_vals = [-3.764562, -3.719982, -0.000000, 0.000000] + discadj_cylinder3D.test_vals = [-3.730673, -3.832084, -0.000000, 0.000000] test_list.append(discadj_cylinder3D) # Arina nozzle 2D @@ -66,7 +66,7 @@ def main(): discadj_arina2k.cfg_dir = "disc_adj_euler/arina2k" discadj_arina2k.cfg_file = "Arina2KRS.cfg" discadj_arina2k.test_iter = 20 - discadj_arina2k.test_vals = [-3.534954, -3.773310, 0.027244, 0.000000] + discadj_arina2k.test_vals = [-3.087876, -3.481506, 0.068878, 0.000000] test_list.append(discadj_arina2k) #################################### @@ -98,7 +98,7 @@ def main(): discadj_incomp_NACA0012.cfg_dir = "disc_adj_incomp_euler/naca0012" discadj_incomp_NACA0012.cfg_file = "incomp_NACA0012_disc.cfg" discadj_incomp_NACA0012.test_iter = 20 - discadj_incomp_NACA0012.test_vals = [20.000000, -4.087948, -2.655204, 0.000000] + discadj_incomp_NACA0012.test_vals = [20.000000, -4.092007, -2.652751, 0.000000] test_list.append(discadj_incomp_NACA0012) ##################################### @@ -123,7 +123,7 @@ def main(): discadj_incomp_turb_NACA0012_sa.cfg_dir = "disc_adj_incomp_rans/naca0012" discadj_incomp_turb_NACA0012_sa.cfg_file = "turb_naca0012_sa.cfg" discadj_incomp_turb_NACA0012_sa.test_iter = 10 - discadj_incomp_turb_NACA0012_sa.test_vals = [10.000000, -3.845995, -1.031096, 0.000000] + discadj_incomp_turb_NACA0012_sa.test_vals = [10.000000, -3.845995, -1.031097, 0.000000] test_list.append(discadj_incomp_turb_NACA0012_sa) # Adjoint Incompressible Turbulent NACA 0012 SST @@ -143,7 +143,7 @@ def main(): discadj_cylinder.cfg_dir = "disc_adj_rans/cylinder" discadj_cylinder.cfg_file = "cylinder.cfg" discadj_cylinder.test_iter = 9 - discadj_cylinder.test_vals = [3.746907, -1.544883, -0.008321, 0.000014] + discadj_cylinder.test_vals = [3.746907, -1.544882, -0.008321, 0.000014] discadj_cylinder.unsteady = True discadj_cylinder.enabled_with_tsan = False test_list.append(discadj_cylinder) @@ -185,7 +185,7 @@ def main(): discadj_pitchingNACA0012.cfg_dir = "disc_adj_euler/naca0012_pitching" discadj_pitchingNACA0012.cfg_file = "inv_NACA0012_pitching.cfg" discadj_pitchingNACA0012.test_iter = 4 - discadj_pitchingNACA0012.test_vals = [-1.221198, -1.647772, -0.007510, 0.000013] + discadj_pitchingNACA0012.test_vals = [-1.219713, -1.645717, -0.007513, 0.000013] discadj_pitchingNACA0012.unsteady = True discadj_pitchingNACA0012.enabled_with_tsan = False test_list.append(discadj_pitchingNACA0012) @@ -199,7 +199,7 @@ def main(): discadj_trans_stator.cfg_dir = "disc_adj_turbomachinery/transonic_stator_2D" discadj_trans_stator.cfg_file = "transonic_stator.cfg" discadj_trans_stator.test_iter = 79 - discadj_trans_stator.test_vals = [79.000000, 0.770094, 0.383191, 0.472139, -0.996477, 2.153270, -4.444323] + discadj_trans_stator.test_vals = [79, 0.770065, 0.383137, 0.472153, -0.996484, 2.153296, -4.444301] discadj_trans_stator.test_vals_aarch64 = [79, 0.769987, 0.383135, 0.472391, -0.996504, 2.153296, -4.444301] discadj_trans_stator.enabled_with_tsan = False test_list.append(discadj_trans_stator) @@ -238,7 +238,7 @@ def main(): pywrapper_FEA_AD_FlowLoad.cfg_dir = "py_wrapper/disc_adj_fea/flow_load_sens" pywrapper_FEA_AD_FlowLoad.cfg_file = "configAD_fem.cfg" pywrapper_FEA_AD_FlowLoad.test_iter = 100 - pywrapper_FEA_AD_FlowLoad.test_vals = [-0.132037, -0.554472, -0.000364, -0.003101] + pywrapper_FEA_AD_FlowLoad.test_vals = [-0.131415, -0.551701, -0.000364, -0.003101] #last 4 columns pywrapper_FEA_AD_FlowLoad.test_vals_aarch64 = [-0.131745, -0.553214, -0.000364, -0.003101] pywrapper_FEA_AD_FlowLoad.command = TestCase.Command(exec = "python", param = "run_adjoint.py --parallel -f") pywrapper_FEA_AD_FlowLoad.timeout = 1600 @@ -253,8 +253,8 @@ def main(): pywrapper_CFD_AD_MeshDisp.cfg_dir = "py_wrapper/disc_adj_flow/mesh_disp_sens" pywrapper_CFD_AD_MeshDisp.cfg_file = "configAD_flow.cfg" pywrapper_CFD_AD_MeshDisp.test_iter = 1000 - pywrapper_CFD_AD_MeshDisp.test_vals = [30.000000, -2.505480, 1.403813, 0.000000] - pywrapper_CFD_AD_MeshDisp.test_vals_aarch64 = [30.000000, -2.499079, 1.440068, 0.000000] + pywrapper_CFD_AD_MeshDisp.test_vals = [30.000000, -2.521422, 1.372295, 0.000000] #last 4 columns + pywrapper_CFD_AD_MeshDisp.test_vals_aarch64 = [30.000000, -2.516536, 1.386443, 0.000000] pywrapper_CFD_AD_MeshDisp.command = TestCase.Command(exec = "python", param = "run_adjoint.py --parallel -f") pywrapper_CFD_AD_MeshDisp.timeout = 1600 pywrapper_CFD_AD_MeshDisp.tol = 1e-2 diff --git a/TestCases/incomp_euler/naca0012/incomp_NACA0012.cfg b/TestCases/incomp_euler/naca0012/incomp_NACA0012.cfg index 300dd64a5b5..3b7da053aef 100644 --- a/TestCases/incomp_euler/naca0012/incomp_NACA0012.cfg +++ b/TestCases/incomp_euler/naca0012/incomp_NACA0012.cfg @@ -43,7 +43,7 @@ MARKER_MONITORING= ( airfoil ) % ------------- COMMON PARAMETERS TO DEFINE THE NUMERICAL METHOD --------------% % NUM_METHOD_GRAD= GREEN_GAUSS -CFL_NUMBER= 200.0 +CFL_NUMBER= 3.0 CFL_ADAPT= NO CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 ) RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) @@ -51,13 +51,13 @@ ITER= 9999 % -------------------------- MULTIGRID PARAMETERS -----------------------------% % -MGLEVEL= 3 +MGLEVEL= 2 MGCYCLE= W_CYCLE MG_PRE_SMOOTH= ( 1, 2, 3, 3 ) MG_POST_SMOOTH= ( 1, 1, 1, 1 ) MG_CORRECTION_SMOOTH= ( 1, 1, 1, 1 ) -MG_DAMP_RESTRICTION= 0.9 -MG_DAMP_PROLONGATION= 0.9 +MG_DAMP_RESTRICTION= 0.85 +MG_DAMP_PROLONGATION= 0.85 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % diff --git a/TestCases/incomp_euler/nozzle/inv_nozzle.cfg b/TestCases/incomp_euler/nozzle/inv_nozzle.cfg index 9633d08fba5..0c793b2c903 100644 --- a/TestCases/incomp_euler/nozzle/inv_nozzle.cfg +++ b/TestCases/incomp_euler/nozzle/inv_nozzle.cfg @@ -46,7 +46,7 @@ MARKER_ANALYZE_AVERAGE = AREA % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= GREEN_GAUSS -CFL_NUMBER= 500 +CFL_NUMBER= 15.0 % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% % @@ -61,8 +61,8 @@ LINEAR_SOLVER_ITER= 5 MGLEVEL= 3 MGCYCLE= W_CYCLE MG_PRE_SMOOTH= ( 1, 2, 3, 3 ) -MG_POST_SMOOTH= ( 1, 1, 1, 0 ) -MG_CORRECTION_SMOOTH= ( 1, 1, 1, 0 ) +MG_POST_SMOOTH= ( 0, 0, 0, 0 ) +MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 ) MG_DAMP_RESTRICTION= 0.95 MG_DAMP_PROLONGATION= 0.95 diff --git a/TestCases/incomp_navierstokes/sphere/sphere.cfg b/TestCases/incomp_navierstokes/sphere/sphere.cfg deleted file mode 100644 index 7f5ed6dd2fc..00000000000 --- a/TestCases/incomp_navierstokes/sphere/sphere.cfg +++ /dev/null @@ -1,104 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% SU2 configuration file % -% Case description: laminar flow around a sphere % -% Author: Nijso Beishuizen % -% Institution: Technische Universiteit Eindhoven % -% Date: 2024.05.05 % -% File Version 8.0.1 "Harrier" % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% -% -SOLVER= INC_NAVIER_STOKES -KIND_TURB_MODEL= NONE -RESTART_SOL= YES -INC_NONDIM= DIMENSIONAL - -% ---------------- INCOMPRESSIBLE FLOW CONDITION DEFINITION -------------------% -% Re = rho*V*D/mu = 1*1*2.0/2.0 = 1.0 -INC_DENSITY_MODEL= CONSTANT -INC_ENERGY_EQUATION= NO -INC_DENSITY_INIT= 1.0 - -INC_VELOCITY_INIT= (1.0, 0.0, 0.0 ) -INC_VELOCITY_REF = 1 -INC_DENSITY_REF = 1.0 - -% --------------------------- VISCOSITY MODEL ---------------------------------% -% -VISCOSITY_MODEL= CONSTANT_VISCOSITY -MU_CONSTANT= 2.0 -% ---------------------- REFERENCE VALUE DEFINITION ---------------------------% -% -REF_ORIGIN_MOMENT_X = 0.25 -REF_ORIGIN_MOMENT_Y = 0.00 -REF_ORIGIN_MOMENT_Z = 0.00 -% sphere is 1/40 of a complete sphere -% area = pi*r^2 = 3.14159 -% 1/40 slice = 0.07854 -REF_AREA= 0.07854 - -% -------------------- BOUNDARY CONDITION DEFINITION --------------------------% -% -MARKER_HEATFLUX= ( wall, 0.0 ) -MARKER_SYM= ( symmetry_left, symmetry_right ) -MARKER_FAR= ( farfield ) -MARKER_PLOTTING= ( wall ) -MARKER_MONITORING= ( wall ) - -% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% -% -NUM_METHOD_GRAD= GREEN_GAUSS -CFL_NUMBER= 10.0 -CFL_ADAPT= NO -ITER=50000 -VENKAT_LIMITER_COEFF= 0.01 - -% ------------------------ LINEAR SOLVER DEFINITION ---------------------------% -% -LINEAR_SOLVER= FGMRES -LINEAR_SOLVER_PREC= ILU -LINEAR_SOLVER_ERROR= 1E-05 -LINEAR_SOLVER_ITER= 5 - -% -------------------------- MULTIGRID PARAMETERS -----------------------------% -% -MGLEVEL= 1 -MGCYCLE= V_CYCLE -MG_PRE_SMOOTH= ( 1, 2, 3, 3 ) -MG_POST_SMOOTH= ( 1, 1, 1, 1 ) -MG_CORRECTION_SMOOTH= ( 1, 1, 1, 1 ) -MG_DAMP_RESTRICTION= 0.6 -MG_DAMP_PROLONGATION= 0.6 - -% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% -% -CONV_NUM_METHOD_FLOW= FDS -MUSCL_FLOW= YES -SLOPE_LIMITER_FLOW= NONE -JST_SENSOR_COEFF= ( 0.5, 0.04 ) -TIME_DISCRE_FLOW= EULER_IMPLICIT - -% --------------------------- CONVERGENCE PARAMETERS --------------------------% -% -CONV_RESIDUAL_MINVAL= -10 -CONV_STARTITER= 10 -CONV_CAUCHY_ELEMS= 100 -CONV_CAUCHY_EPS= 1E-6 - -% ------------------------- INPUT/OUTPUT INFORMATION --------------------------% -% -MESH_FILENAME= slice_2syms.su2 -MESH_FORMAT= SU2 -SOLUTION_FILENAME= solution_flow.dat -TABULAR_FORMAT= CSV -CONV_FILENAME= history -RESTART_FILENAME= restart_flow.dat -VOLUME_FILENAME= flow -SURFACE_FILENAME= surface_flow -OUTPUT_WRT_FREQ= 100 -WRT_VOLUME_OVERWRITE= YES -SCREEN_OUTPUT= ( INNER_ITER, RMS_PRESSURE, RMS_VELOCITY-X, RMS_VELOCITY-Y, RMS_VELOCITY-Z, LIFT, DRAG) -VOLUME_OUTPUT= ( SOLUTION,PRIMITIVE,RESIDUAL,MULTIGRID, RANK ) 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 2634fca1ff5..f959a481490 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]", "MAXIMUM_HEATFLUX[1]", "TOTAL_HEATFLUX[1]", "FINDIFF_STEP" -0 , 0.0 , -300000.0026077032, -3.3306691000000184e-08, 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , -0.01999999887924986, 0.0 , -0.9000000009140585 , 0.0 , 0.9379999998948563 , 1.649999997743734 , 419.99999780273356 , -69.99999868639861 , 358.9999998609983 , -69.99999868639861 , -0.6000000052353016 , -380.0000001774606, 0.0 , -430.00000005122274, 1e-08 +0 , 0.0 , -199999.9862164259, -5.551100000002363e-08, 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , -0.02000000026702864, 5.550999999230055e-08, -0.6560000001543109 , 0.0 , 0.6520000012111282 , 1.1399999999550658 , 319.9999980552093 , -39.999997625272954 , 260.999999568412 , -39.999997625272954 , -0.4999999969612645 , -269.99999818144715, 0.0 , -560.0000008598727, 1e-08 diff --git a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configMaster.cfg b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configMaster.cfg index d7c2698fc10..8ff23f71359 100644 --- a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configMaster.cfg +++ b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configMaster.cfg @@ -22,7 +22,7 @@ OUTER_ITER = 31 % CONV_RESIDUAL_MINVAL= -26 SCREEN_OUTPUT= (OUTER_ITER, BGS_PRESSURE[0], BGS_TEMPERATURE[0], BGS_TEMPERATURE[1], STREAMWISE_MASSFLOW[0], STREAMWISE_DP[0], AVG_TEMPERATURE[1], TOTAL_HEATFLUX[0] ) -SCREEN_WRT_FREQ_OUTER= 10 +SCREEN_WRT_FREQ_OUTER= 100 % HISTORY_OUTPUT= ( ITER, RMS_RES[0], RMS_RES[1], STREAMWISE_PERIODIC[0], FLOW_COEFF[0], HEAT[1] ) % diff --git a/TestCases/multiple_ffd/naca0012/of_grad_cd.dat.ref b/TestCases/multiple_ffd/naca0012/of_grad_cd.dat.ref index bce05aa9bf6..81759ef4cd7 100644 --- a/TestCases/multiple_ffd/naca0012/of_grad_cd.dat.ref +++ b/TestCases/multiple_ffd/naca0012/of_grad_cd.dat.ref @@ -1,3 +1,3 @@ VARIABLES="VARIABLE" , "GRADIENT" , "FINDIFF_STEP" - 0 , 0.0779208 , 0.001 - 1 , -0.115959 , 0.001 + 0 , 0.0767137 , 0.001 + 1 , -0.113024 , 0.001 diff --git a/TestCases/multiple_ffd/naca0012/of_grad_directdiff.dat.ref b/TestCases/multiple_ffd/naca0012/of_grad_directdiff.dat.ref index 74adba36fa1..da2e3f10472 100644 --- a/TestCases/multiple_ffd/naca0012/of_grad_directdiff.dat.ref +++ b/TestCases/multiple_ffd/naca0012/of_grad_directdiff.dat.ref @@ -1,3 +1,3 @@ VARIABLES="VARIABLE" , "DRAG" , "EFFICIENCY" , "FORCE_X" , "FORCE_Y" , "FORCE_Z" , "LIFT" , "MOMENT_X" , "MOMENT_Y" , "MOMENT_Z" , "SIDEFORCE" - 0 , 0.06149476303 , -0.608748249 , 0.05888315926 , 0.1203589365 , 0.0 , 0.119045765 , 0.0 , 0.0 , 0.009719951712 , 0.0 - 1 , -0.08536237383 , 8.303168487 , -0.09097907726 , 0.2564786779 , 0.0 , 0.2584023411 , 0.0 , 0.0 , 0.004460595335 , 0.0 + 0 , 0.05685349197 , -0.4081397694 , 0.05417489043 , 0.1233787706 , 0.0 , 0.1221675908 , 0.0 , 0.0 , 0.009249264651 , 0.0 + 1 , -0.08020555475 , 8.976256797 , -0.08614647972 , 0.2713937953 , 0.0 , 0.2732084865 , 0.0 , 0.0 , 0.00847918122 , 0.0 diff --git a/TestCases/navierstokes/cylinder/lam_cylinder.cfg b/TestCases/navierstokes/cylinder/lam_cylinder.cfg index eb03eb6c121..8c0efd53259 100644 --- a/TestCases/navierstokes/cylinder/lam_cylinder.cfg +++ b/TestCases/navierstokes/cylinder/lam_cylinder.cfg @@ -42,7 +42,7 @@ MARKER_MONITORING= ( cylinder ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 500.0 +CFL_NUMBER= 4.0 CFL_ADAPT= NO CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 ) RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) diff --git a/TestCases/navierstokes/flatplate/lam_flatplate.cfg b/TestCases/navierstokes/flatplate/lam_flatplate.cfg index 75541961acc..34f572d5598 100644 --- a/TestCases/navierstokes/flatplate/lam_flatplate.cfg +++ b/TestCases/navierstokes/flatplate/lam_flatplate.cfg @@ -46,7 +46,7 @@ MARKER_ANALYZE= (inlet, outlet) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 1000 +CFL_NUMBER= 10000 CFL_ADAPT= NO % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% @@ -60,11 +60,11 @@ LINEAR_SOLVER_ITER= 3 % MGLEVEL= 3 MGCYCLE= V_CYCLE -MG_PRE_SMOOTH= ( 1, 2, 3, 0 ) -MG_POST_SMOOTH= ( 1, 1, 1, 0 ) +MG_PRE_SMOOTH= ( 1, 1, 1, 2 ) +MG_POST_SMOOTH= ( 0, 1, 1, 0 ) MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 ) -MG_DAMP_RESTRICTION= 0.8 -MG_DAMP_PROLONGATION= 0.8 +MG_DAMP_RESTRICTION= 0.75 +MG_DAMP_PROLONGATION= 0.75 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % @@ -78,7 +78,7 @@ TIME_DISCRE_FLOW= EULER_IMPLICIT CONV_FIELD= RMS_DENSITY CONV_RESIDUAL_MINVAL= -12 CONV_STARTITER= 10 -ITER= 5000 +ITER= 500 % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% % diff --git a/TestCases/nicf/edge/edge_PPR.cfg b/TestCases/nicf/edge/edge_PPR.cfg index 34fdba91303..759187d1229 100644 --- a/TestCases/nicf/edge/edge_PPR.cfg +++ b/TestCases/nicf/edge/edge_PPR.cfg @@ -10,7 +10,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% -% +% SOLVER= EULER MATH_PROBLEM= DIRECT RESTART_SOL= NO @@ -50,11 +50,11 @@ MARKER_MONITORING= ( WALL1 ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= GREEN_GAUSS -CFL_NUMBER= 2.5 -CFL_ADAPT= YES -CFL_ADAPT_PARAM= ( 0.9, 1.1, 1.0, 200.0 ) +CFL_NUMBER= 10 +CFL_ADAPT= NO +CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 ) RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) -ITER= 51 +ITER= 500 % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% % @@ -65,8 +65,8 @@ LINEAR_SOLVER_ITER= 10 % -------------------------- MULTIGRID PARAMETERS -----------------------------% % -MGLEVEL= 3 -MGCYCLE= W_CYCLE +MGLEVEL= 2 +MGCYCLE= V_CYCLE MG_PRE_SMOOTH= ( 1, 2, 3, 3 ) MG_POST_SMOOTH= ( 0, 0, 0, 0 ) MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 ) @@ -83,7 +83,6 @@ JST_SENSOR_COEFF= ( 0.5, 0.02 ) TIME_DISCRE_FLOW= EULER_IMPLICIT % --------------------------- CONVERGENCE PARAMETERS --------------------------% -% CONV_RESIDUAL_MINVAL= -12 CONV_STARTITER= 10 CONV_CAUCHY_ELEMS= 100 diff --git a/TestCases/nicf/edge/edge_VW.cfg b/TestCases/nicf/edge/edge_VW.cfg index add439803e6..2646c8efb40 100644 --- a/TestCases/nicf/edge/edge_VW.cfg +++ b/TestCases/nicf/edge/edge_VW.cfg @@ -51,9 +51,9 @@ MARKER_MONITORING= ( WALL1 ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= GREEN_GAUSS -CFL_NUMBER= 2.0 -CFL_ADAPT= YES -CFL_ADAPT_PARAM= ( 0.9, 1.1, 1.0, 200.0 ) +CFL_NUMBER= 10 +CFL_ADAPT= NO +CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 ) RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) ITER= 500 @@ -66,13 +66,13 @@ LINEAR_SOLVER_ITER= 10 % -------------------------- MULTIGRID PARAMETERS -----------------------------% % -MGLEVEL= 3 -MGCYCLE= W_CYCLE +MGLEVEL= 2 +MGCYCLE= V_CYCLE MG_PRE_SMOOTH= ( 1, 2, 3, 3 ) -MG_POST_SMOOTH= ( 1, 1, 1, 1 ) +MG_POST_SMOOTH= ( 0, 0, 0, 0 ) MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 ) -MG_DAMP_RESTRICTION= 0.85 -MG_DAMP_PROLONGATION= 0.85 +MG_DAMP_RESTRICTION= 0.9 +MG_DAMP_PROLONGATION= 0.9 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 0137b08806c..05cca0d50fb 100644 --- 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 = [-13.665072, -12.593885, -14.249600, -6.069756, -14.816937, -17.057821] + cfd_flamelet_ch4.test_vals = [-15.313265, -15.180884, -15.291808, -8.488238, -15.010141, -15.920950] 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.935396, -11.476692, -11.302574, -12.734435, -6.110559] + cfd_flamelet_ch4_axi.test_vals = [-11.054149, -12.276393, -11.299388, -13.877670, -6.291548] 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 = [-9.641526, -11.303947, -3.675920, -13.158386, -11.087893] + cfd_flamelet_ch4_partial_premix.test_vals = [-10.072805, -11.301138, -4.658971, -13.158224, -11.087511] cfd_flamelet_ch4_partial_premix.new_output = True test_list.append(cfd_flamelet_ch4_partial_premix) @@ -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.999540, -9.843936, -3.290033, -11.338454] + cfd_flamelet_h2.test_vals = [-10.003106, -9.843748, -3.289857, -11.338273] cfd_flamelet_h2.new_output = True test_list.append(cfd_flamelet_h2) @@ -112,8 +112,8 @@ def main(): invwedge_a.cfg_dir = "nonequilibrium/invwedge" invwedge_a.cfg_file = "invwedge_ausm.cfg" invwedge_a.test_iter = 10 - invwedge_a.test_vals = [-1.069675, -1.594438, -18.299923, -18.627316, -18.573325, 2.245721, 1.874105, 5.290285, 0.847729] - invwedge_a.test_vals_aarch64 = [-1.070904, -1.595667, -18.299980, -18.627372, -18.573382, 2.244654, 1.871030, 5.289134, 0.846502] + invwedge_a.test_vals = [-1.042842, -1.567605, -18.301264, -18.628631, -18.574668, 2.275192, 1.879772, 5.319421, 0.873699] + invwedge_a.test_vals_aarch64 = [-1.042842, -1.567605, -18.301374, -18.628734, -18.574780, 2.275192, 1.879772, 5.319421, 0.873699] test_list.append(invwedge_a) # Inviscid single wedge, ausm+-up2, implicit @@ -121,8 +121,8 @@ def main(): invwedge_ap2.cfg_dir = "nonequilibrium/invwedge" invwedge_ap2.cfg_file = "invwedge_ausmplusup2.cfg" invwedge_ap2.test_iter = 10 - invwedge_ap2.test_vals = [-0.982059, -1.506822, -16.735977, -17.063993, -17.009083, 2.354326, 1.482256, 5.373931, 0.927155] - invwedge_ap2.test_vals_aarch64 = [-0.982059, -1.506822, -16.735977, -17.063993, -17.009083, 2.354326, 1.482256, 5.373931, 0.927155] + invwedge_ap2.test_vals = [-0.952589, -1.477352, -16.736014, -17.064021, -17.009120, 2.387086, 1.287286, 5.403046, 0.956402] + invwedge_ap2.test_vals_aarch64 = [-0.952589, -1.477352, -16.736014, -17.064021, -17.009120, 2.387086, 1.287286, 5.403046, 0.956402] test_list.append(invwedge_ap2) # Inviscid single wedge, msw, implicit @@ -130,8 +130,8 @@ def main(): invwedge_msw.cfg_dir = "nonequilibrium/invwedge" invwedge_msw.cfg_file = "invwedge_msw.cfg" invwedge_msw.test_iter = 10 - invwedge_msw.test_vals = [-1.212335, -1.737098, -18.299220, -18.626618, -18.572623, 2.106171, 1.651949, 5.143958, 0.704444] - invwedge_msw.test_vals_aarch64 = [-1.224649, -1.749412, -18.299151, -18.626550, -18.572552, 2.094106, 1.635779, 5.131012, 0.692821] + invwedge_msw.test_vals = [-1.165957, -1.690720, -18.298756, -18.626164, -18.572159, 2.151638, 1.721236, 5.193813, 0.751584] + invwedge_msw.test_vals_aarch64 = [-1.165957, -1.690720, -18.301301, -18.628685, -18.574704, 2.151638, 1.721236, 5.193813, 0.751584] test_list.append(invwedge_msw) # Inviscid single wedge, roe, implicit @@ -139,8 +139,8 @@ def main(): invwedge_roe.cfg_dir = "nonequilibrium/invwedge" invwedge_roe.cfg_file = "invwedge_roe.cfg" invwedge_roe.test_iter = 10 - invwedge_roe.test_vals = [-1.062496, -1.587259, -17.208314, -17.538065, -17.481444, 2.255933, 1.853450, 5.293725, 0.890784] - invwedge_roe.test_vals_aarch64 = [-1.069128, -1.593891, -17.208222, -17.537969, -17.481352, 2.249020, 1.852904, 5.287143, 0.879852] + invwedge_roe.test_vals = [-1.038582, -1.563344, -18.300307, -18.627706, -18.573706, 2.278987, 1.861307, 5.323753, 0.874900] + invwedge_roe.test_vals_aarch64 = [-1.038582, -1.563344, -18.299879, -18.627263, -18.573276, 2.278987, 1.861307, 5.323753, 0.874900] test_list.append(invwedge_roe) # Inviscid single wedge, lax, implicit @@ -148,8 +148,8 @@ def main(): invwedge_lax.cfg_dir = "nonequilibrium/invwedge" invwedge_lax.cfg_file = "invwedge_lax.cfg" invwedge_lax.test_iter = 10 - invwedge_lax.test_vals = [-0.877280, -1.402043, -32.000000, -32.000000, -24.952631, 2.451869, 1.857084, 5.486158, 1.051580] - invwedge_lax.test_vals_aarch64 = [-0.877280, -1.402043, -32.000000, -32.000000, -24.952631, 2.451869, 1.857084, 5.486158, 1.051580] + invwedge_lax.test_vals = [-1.075662, -1.600425, -32.000000, -32.000000, -24.972431, 2.252952, 1.725158, 5.282140, 0.848823] + invwedge_lax.test_vals_aarch64 = [-1.075662, -1.600425, -32.000000, -32.000000, -24.972431, 2.252952, 1.725158, 5.282140, 0.848823] test_list.append(invwedge_lax) # Inviscid single wedge, implicit, AUSM+M scheme @@ -157,8 +157,8 @@ def main(): invwedge_ausm_m.cfg_dir = "nonequilibrium/invwedge" invwedge_ausm_m.cfg_file = "invwedge_am.cfg" invwedge_ausm_m.test_iter = 10 - invwedge_ausm_m.test_vals = [-1.173033, -1.697796, -16.739586, -17.063491, -17.012692, 2.124519, 1.963804, 5.182881, 0.747539] - invwedge_ausm_m.test_vals_aarch64 = [-1.171654, -1.696417, -16.739585, -17.063491, -17.012691, 2.125633, 1.966511, 5.184281, 0.749068] + invwedge_ausm_m.test_vals = [-1.055083, -1.579845, -16.739725, -17.063618, -17.012831, 2.265430, 1.797602, 5.302740, 0.856548] + invwedge_ausm_m.test_vals_aarch64 = [-1.055079, -1.579842, -16.739725, -17.063618, -17.012831, 2.265433, 1.797600, 5.302743, 0.856551] test_list.append(invwedge_ausm_m) # Inviscid single wedge, implicit, NEMO supersonic inlet @@ -166,8 +166,8 @@ def main(): invwedge_ss_inlet.cfg_dir = "nonequilibrium/invwedge" invwedge_ss_inlet.cfg_file = "invwedge_ss_inlet.cfg" invwedge_ss_inlet.test_iter = 10 - invwedge_ss_inlet.test_vals = [-1.068592, -1.593355, -18.250183, -18.579524, -18.523255, 2.246972, 1.874197, 5.291273, 0.848771] - invwedge_ss_inlet.test_vals_aarch64 = [-1.069892, -1.594654, -18.250175, -18.579516, -18.523248, 2.245827, 1.871123, 5.290054, 0.847476] + invwedge_ss_inlet.test_vals = [-1.042718, -1.567481, -18.250175, -18.579516, -18.523248, 2.275305, 1.880068, 5.319548, 0.873821] + invwedge_ss_inlet.test_vals_aarch64 = [-1.042718, -1.567481, -18.250175, -18.579516, -18.523248, 2.275305, 1.880068, 5.319548, 0.873821] test_list.append(invwedge_ss_inlet) # Viscous single cone - axisymmetric @@ -175,8 +175,8 @@ def main(): visc_cone.cfg_dir = "nonequilibrium/visc_wedge" visc_cone.cfg_file = "axi_visccone.cfg" visc_cone.test_iter = 10 - visc_cone.test_vals = [-5.222270, -5.746525, -20.560273, -20.510152, -20.409102, 1.255757, -3.208382, -0.016014, 0.093462, 32619.000000] - visc_cone.test_vals_aarch64 = [-5.222267, -5.746523, -20.560279, -20.510152, -20.409102, 1.255758, -3.208380, -0.016014, 0.093462, 32633.000000] + visc_cone.test_vals = [-5.222212, -5.746462, -20.559802, -20.510196, -20.439814, 1.255865, -3.208363, -0.016006, 0.093455, 32633.000000] + visc_cone.test_vals_aarch64 = [-5.222267, -5.746522, -20.559799, -20.510195, -20.440311, 1.255761, -3.208360, -0.016014, 0.093462, 32634.000000] test_list.append(visc_cone) # Viscous single wedge with Mutation++ @@ -192,7 +192,7 @@ def main(): super_cat.cfg_dir = "nonequilibrium/visc_wedge" super_cat.cfg_file = "super_cat.cfg" super_cat.test_iter = 10 - super_cat.test_vals = [-5.232595, -5.757889, -20.641415, -20.640623, -20.541670, 1.246866, -3.205258, -0.028372, 0.250647, 32440.000000] + super_cat.test_vals = [-5.232590, -5.757884, -20.641547, -20.640244, -20.539243, 1.246889, -3.205235, -0.028406, 0.250857, 32459.000000] test_list.append(super_cat) # Viscous single wedge - partially catalytic walls @@ -200,7 +200,7 @@ def main(): partial_cat.cfg_dir = "nonequilibrium/visc_wedge" partial_cat.cfg_file = "partial_cat.cfg" partial_cat.test_iter = 10 - partial_cat.test_vals = [-5.210302, -5.735065, -20.880448, -20.825971, -23.475263, 1.806201, -2.813952, -0.078400, 0.495606, 29020.000000] + partial_cat.test_vals = [-5.210300, -5.735063, -20.880374, -20.825890, -23.475263, 1.806281, -2.813924, -0.078469, 0.496017, 29021.000000] test_list.append(partial_cat) # Viscous cylinder, ionization, Gupta-Yos @@ -220,7 +220,7 @@ def main(): channel.cfg_dir = "euler/channel" channel.cfg_file = "inv_channel_RK.cfg" channel.test_iter = 20 - channel.test_vals = [-2.904385, 2.536048, 0.020906, 0.042348] + channel.test_vals = [-2.647975, 2.818090, 0.022280, 0.004644] test_list.append(channel) # NACA0012 @@ -228,7 +228,7 @@ def main(): naca0012.cfg_dir = "euler/naca0012" naca0012.cfg_file = "inv_NACA0012_Roe.cfg" naca0012.test_iter = 20 - naca0012.test_vals = [-4.322128, -3.813578, 0.321660, 0.022547] + naca0012.test_vals = [-4.014140, -3.537888, 0.333403, 0.021227] test_list.append(naca0012) # Supersonic wedge @@ -236,7 +236,7 @@ def main(): wedge.cfg_dir = "euler/wedge" wedge.cfg_file = "inv_wedge_HLLC.cfg" wedge.test_iter = 20 - wedge.test_vals = [-1.377543, 4.293870, -0.243566, 0.042930] + wedge.test_vals = [-0.944740, 4.782451, -0.208522, 0.036742] test_list.append(wedge) # ONERA M6 Wing @@ -244,7 +244,7 @@ def main(): oneram6.cfg_dir = "euler/oneram6" oneram6.cfg_file = "inv_ONERAM6.cfg" oneram6.test_iter = 10 - oneram6.test_vals = [-11.512364, -10.982009, 0.280800, 0.008623] + oneram6.test_vals = [-9.277150, -8.694005, 0.281703, 0.011821] oneram6.timeout = 3200 test_list.append(oneram6) @@ -253,7 +253,7 @@ def main(): fixedCL_naca0012.cfg_dir = "fixed_cl/naca0012" fixedCL_naca0012.cfg_file = "inv_NACA0012.cfg" fixedCL_naca0012.test_iter = 10 - fixedCL_naca0012.test_vals = [-3.856871, 1.676974, 0.301113, 0.019487] + fixedCL_naca0012.test_vals = [-7.379831, -1.886302, 0.300000, 0.019471] test_list.append(fixedCL_naca0012) # Polar sweep of the inviscid NACA0012 @@ -262,8 +262,8 @@ def main(): polar_naca0012.cfg_file = "inv_NACA0012.cfg" polar_naca0012.polar = True polar_naca0012.test_iter = 10 - polar_naca0012.test_vals = [-1.086730, 4.382703, 0.001762, 0.033013] - polar_naca0012.test_vals_aarch64 = [-1.083394, 4.386134, 0.001588, 0.033513] + polar_naca0012.test_vals = [-1.217981, 4.256386, 0.009084, 0.016823] + polar_naca0012.test_vals_aarch64 = [-1.718925, 3.711429, 0.009217, 0.007784] polar_naca0012.command = TestCase.Command(exec = "compute_polar.py", param = "-i 11") # flaky test on arm64 polar_naca0012.enabled_on_cpu_arch = ["x86_64"] @@ -274,7 +274,7 @@ def main(): bluntbody.cfg_dir = "euler/bluntbody" bluntbody.cfg_file = "blunt.cfg" bluntbody.test_iter = 20 - bluntbody.test_vals = [0.493672, 6.857839, -0.000002, 1.791404] + bluntbody.test_vals = [0.540009, 6.916653, 0.000000, 1.868976] test_list.append(bluntbody) # Equivalent area NACA64-206 @@ -282,7 +282,7 @@ def main(): ea_naca64206.cfg_dir = "optimization_euler/equivalentarea_naca64206" ea_naca64206.cfg_file = "NACA64206.cfg" ea_naca64206.test_iter = 10 - ea_naca64206.test_vals = [-1.188459, -0.522783, -0.003147, 67775.000000] + ea_naca64206.test_vals = [-1.076215, -0.391987, -0.000701, 67775.000000] test_list.append(ea_naca64206) # SUPERSONIC FLOW PAST A RAMP IN A CHANNEL @@ -290,7 +290,7 @@ def main(): ramp.cfg_dir = "euler/ramp" ramp.cfg_file = "inv_ramp.cfg" ramp.test_iter = 10 - ramp.test_vals = [-13.648694, -8.010920, -0.076277, 0.054839] + ramp.test_vals = [-13.399623, -7.788893, -0.081064, 0.056474] ramp.test_vals_aarch64 = [-13.398422, -7.786461, -0.081064, 0.056474] test_list.append(ramp) @@ -303,7 +303,7 @@ def main(): flatplate.cfg_dir = "navierstokes/flatplate" flatplate.cfg_file = "lam_flatplate.cfg" flatplate.test_iter = 100 - flatplate.test_vals = [-7.621750, -2.149876, 0.001084, 0.036232, 2.361500, -2.325300, -1.815200, -1.815200] + flatplate.test_vals = [-9.336395, -3.849426, 0.001112, 0.036276, 2.361500, -2.325300, -2.279700, -2.279700] test_list.append(flatplate) # Custom objective function @@ -311,7 +311,7 @@ def main(): flatplate_udobj.cfg_dir = "user_defined_functions" flatplate_udobj.cfg_file = "lam_flatplate.cfg" flatplate_udobj.test_iter = 20 - flatplate_udobj.test_vals = [-6.664134, -1.190073, -0.954366, 0.000641, -0.000633, 0.000548, -0.001181, 596.940000, 300.020000, 296.920000, 22.201000, 0.525750, 37.278000, 2.347900] + flatplate_udobj.test_vals = [-6.653802, -1.181430, -0.794887, 0.000611, -0.000369, 0.000736, -0.001104, 596.690000, 299.800000, 296.890000, 21.492000, 0.563990, 37.148000, 2.278700] test_list.append(flatplate_udobj) # Laminar cylinder (steady) @@ -319,7 +319,7 @@ def main(): cylinder.cfg_dir = "navierstokes/cylinder" cylinder.cfg_file = "lam_cylinder.cfg" cylinder.test_iter = 25 - cylinder.test_vals = [-8.421986, -2.931138, -0.003382, 1.607685, -0.009905] + cylinder.test_vals = [-6.754517, -1.286785, -0.213640, 0.706519, 0.158870] test_list.append(cylinder) # Laminar cylinder (low Mach correction) @@ -327,7 +327,7 @@ def main(): cylinder_lowmach.cfg_dir = "navierstokes/cylinder" cylinder_lowmach.cfg_file = "cylinder_lowmach.cfg" cylinder_lowmach.test_iter = 25 - cylinder_lowmach.test_vals = [-6.841604, -1.379532, -1.266739, 76.118218, 0.000274] + cylinder_lowmach.test_vals = [-6.858484, -1.396528, -1.854558, 110.033249, 0.001951] test_list.append(cylinder_lowmach) # 2D Poiseuille flow (body force driven with periodic inlet / outlet) @@ -344,8 +344,8 @@ def main(): poiseuille_profile.cfg_dir = "navierstokes/poiseuille" poiseuille_profile.cfg_file = "profile_poiseuille.cfg" poiseuille_profile.test_iter = 10 - poiseuille_profile.test_vals = [-12.483967, -7.577331, -0.000000, 2.085796] - poiseuille_profile.test_vals_aarch64 = [-12.483967, -7.577331, -0.000000, 2.085796] + poiseuille_profile.test_vals = [-12.492939, -7.672950, -0.000000, 2.085796] + poiseuille_profile.test_vals_aarch64 = [-12.492864, -7.671632, -0.000000, 2.085796] test_list.append(poiseuille_profile) ########################## @@ -381,7 +381,7 @@ def main(): turb_flatplate.cfg_dir = "rans/flatplate" turb_flatplate.cfg_file = "turb_SA_flatplate.cfg" turb_flatplate.test_iter = 20 - turb_flatplate.test_vals = [-4.147387, -6.728398, -0.176234, 0.057709] + turb_flatplate.test_vals = [-4.147727, -6.728308, -0.176232, 0.057717] test_list.append(turb_flatplate) # Flat plate (compressible) with species inlet @@ -389,31 +389,15 @@ def main(): turb_flatplate_species.cfg_dir = "rans/flatplate" turb_flatplate_species.cfg_file = "turb_SA_flatplate_species.cfg" turb_flatplate_species.test_iter = 20 - turb_flatplate_species.test_vals = [-4.120225, -0.634021, -1.706720, 1.363240, -3.250204, 9.000000, -6.697079, 5.000000, -6.978731, 10.000000, -6.013196, 0.996237, 0.996237] + turb_flatplate_species.test_vals = [-4.147727, -0.634899, -1.770894, 1.334987, -3.250340, 9.000000, -6.700853, 5.000000, -6.991055, 10.000000, -6.033829, 0.996033, 0.996033] test_list.append(turb_flatplate_species) - # Flat plate SST compressibility correction Wilcox - turb_flatplate_CC_Wilcox = TestCase('turb_flatplate_CC_Wilcox') - turb_flatplate_CC_Wilcox.cfg_dir = "rans/flatplate" - turb_flatplate_CC_Wilcox.cfg_file = "turb_SST_flatplate_compressibility_Wilcox.cfg" - turb_flatplate_CC_Wilcox.test_iter = 20 - turb_flatplate_CC_Wilcox.test_vals = [-1.280875, 1.974212, 1.440458, 5.038402, -4.051125, 8.521136] - test_list.append(turb_flatplate_CC_Wilcox) - - # Flat plate SST compressibility correction Sarkar - turb_flatplate_CC_Sarkar = TestCase('turb_flatplate_CC_Sarkar') - turb_flatplate_CC_Sarkar.cfg_dir = "rans/flatplate" - turb_flatplate_CC_Sarkar.cfg_file = "turb_SST_flatplate_compressibility_Sarkar.cfg" - turb_flatplate_CC_Sarkar.test_iter = 20 - turb_flatplate_CC_Sarkar.test_vals = [-1.280875, 1.974212, 1.440458, 5.038402, -4.051128, 8.521136] - test_list.append(turb_flatplate_CC_Sarkar) - # ONERA M6 Wing turb_oneram6 = TestCase('turb_oneram6') turb_oneram6.cfg_dir = "rans/oneram6" turb_oneram6.cfg_file = "turb_ONERAM6.cfg" turb_oneram6.test_iter = 10 - turb_oneram6.test_vals = [-2.392865, -6.689822, 0.230746, 0.158811, -33786.000000] + turb_oneram6.test_vals = [-2.388839, -6.689426, 0.230321, 0.157640, -32539.000000] turb_oneram6.timeout = 3200 test_list.append(turb_oneram6) @@ -422,7 +406,7 @@ def main(): turb_oneram6_vc.cfg_dir = "rans/oneram6" turb_oneram6_vc.cfg_file = "turb_ONERAM6_vc.cfg" turb_oneram6_vc.test_iter = 15 - turb_oneram6_vc.test_vals = [-2.266212, -6.628059, 0.228692, 0.142105, -28396.000000] + turb_oneram6_vc.test_vals = [-2.262387, -6.626454, 0.228392, 0.140799, -27107.000000] turb_oneram6_vc.timeout = 3200 test_list.append(turb_oneram6_vc) @@ -431,7 +415,7 @@ def main(): turb_oneram6_nk.cfg_dir = "rans/oneram6" turb_oneram6_nk.cfg_file = "turb_ONERAM6_nk.cfg" turb_oneram6_nk.test_iter = 20 - turb_oneram6_nk.test_vals = [-4.803402, -4.393783, -11.445194, 0.218505, 0.048793, 4.000000, -0.607076, 25.924000] + turb_oneram6_nk.test_vals = [-4.892252, -4.514006, -11.432306, 0.221025, 0.045570, 2.000000, -0.899460, 31.384000] turb_oneram6_nk.timeout = 600 turb_oneram6_nk.tol = 0.0001 test_list.append(turb_oneram6_nk) @@ -530,7 +514,7 @@ def main(): axi_rans_air_nozzle_restart.cfg_dir = "axisymmetric_rans/air_nozzle" axi_rans_air_nozzle_restart.cfg_file = "air_nozzle_restart.cfg" axi_rans_air_nozzle_restart.test_iter = 10 - axi_rans_air_nozzle_restart.test_vals = [-12.150822, -6.604726, -9.187292, -4.518261, -2019.700000] + axi_rans_air_nozzle_restart.test_vals = [-12.063597, -7.006585, -8.702557, -4.039824, -2019.8] axi_rans_air_nozzle_restart.tol = 0.0001 test_list.append(axi_rans_air_nozzle_restart) @@ -558,7 +542,7 @@ def main(): inc_euler_naca0012.cfg_dir = "incomp_euler/naca0012" inc_euler_naca0012.cfg_file = "incomp_NACA0012.cfg" inc_euler_naca0012.test_iter = 20 - inc_euler_naca0012.test_vals = [-7.141428, -6.403478, 0.531992, 0.008466] + inc_euler_naca0012.test_vals = [-4.801273, -3.773079, 0.495236, 0.007346] test_list.append(inc_euler_naca0012) # C-D nozzle with pressure inlet and mass flow outlet @@ -566,7 +550,7 @@ def main(): inc_nozzle.cfg_dir = "incomp_euler/nozzle" inc_nozzle.cfg_file = "inv_nozzle.cfg" inc_nozzle.test_iter = 20 - inc_nozzle.test_vals = [-6.308730, -5.512525, -0.004405, 0.126629] + inc_nozzle.test_vals = [-5.982321, -4.953536, 0.000454, 0.121390] test_list.append(inc_nozzle) ############################# @@ -581,14 +565,6 @@ def main(): inc_lam_cylinder.test_vals = [-4.004072, -3.194881, -0.076553, 7.780048] test_list.append(inc_lam_cylinder) - # Laminar sphere, Re=1. Last column: Cd=24/Re - inc_lam_sphere = TestCase('inc_lam_sphere') - inc_lam_sphere.cfg_dir = "incomp_navierstokes/sphere" - inc_lam_sphere.cfg_file = "sphere.cfg" - inc_lam_sphere.test_iter = 5 - inc_lam_sphere.test_vals = [-8.342926, -8.032107, 0.121003, 25.782687] - test_list.append(inc_lam_sphere) - # Buoyancy-driven cavity inc_buoyancy = TestCase('inc_buoyancy') inc_buoyancy.cfg_dir = "incomp_navierstokes/buoyancy_cavity" @@ -610,7 +586,7 @@ def main(): inc_lam_bend.cfg_dir = "incomp_navierstokes/bend" inc_lam_bend.cfg_file = "lam_bend.cfg" inc_lam_bend.test_iter = 10 - inc_lam_bend.test_vals = [-3.550744, -3.220213, -0.017606, 1.015086] + inc_lam_bend.test_vals = [-3.447746, -3.085237, -0.020816, 1.147373] test_list.append(inc_lam_bend) # 3D laminar channnel with 1 cell in flow direction, streamwise periodic @@ -626,7 +602,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.201114, -7.405807, -7.555676, -0.113666, -1671.700000] + inc_heatTransfer_BC.test_vals = [-8.242651, -7.341179, -7.407346, -0.152603, -1667.300000] test_list.append(inc_heatTransfer_BC) ############################ @@ -777,7 +753,7 @@ def main(): schubauer_klebanoff_transition.cfg_dir = "transition/Schubauer_Klebanoff" schubauer_klebanoff_transition.cfg_file = "transitional_BC_model_ConfigFile.cfg" schubauer_klebanoff_transition.test_iter = 10 - schubauer_klebanoff_transition.test_vals = [-8.058933, -13.242001, 0.000048, 0.007993] + schubauer_klebanoff_transition.test_vals = [-7.994740, -13.240225, 0.000046, 0.007987] test_list.append(schubauer_klebanoff_transition) ##################################### @@ -789,7 +765,7 @@ def main(): contadj_naca0012.cfg_dir = "cont_adj_euler/naca0012" contadj_naca0012.cfg_file = "inv_NACA0012.cfg" contadj_naca0012.test_iter = 5 - contadj_naca0012.test_vals = [-9.662585, -14.998832, -0.726250, 0.020280] + contadj_naca0012.test_vals = [-9.300816, -14.587365, 0.300920, 0.019552] test_list.append(contadj_naca0012) # Inviscid ONERA M6 @@ -797,7 +773,7 @@ def main(): contadj_oneram6.cfg_dir = "cont_adj_euler/oneram6" contadj_oneram6.cfg_file = "inv_ONERAM6.cfg" contadj_oneram6.test_iter = 10 - contadj_oneram6.test_vals = [-12.032190, -12.587083, -1.086100, 0.007556] + contadj_oneram6.test_vals = [-12.130993, -12.702085, 0.685900, 0.007594] test_list.append(contadj_oneram6) # Inviscid WEDGE: tests averaged outflow total pressure adjoint @@ -805,7 +781,7 @@ def main(): contadj_wedge.cfg_dir = "cont_adj_euler/wedge" contadj_wedge.cfg_file = "inv_wedge_ROE.cfg" contadj_wedge.test_iter = 10 - contadj_wedge.test_vals = [2.872064, -2.756210, 1010800.000000, 0.000000] + contadj_wedge.test_vals = [2.872691, -2.755572, 853010.000000, -0.000000] test_list.append(contadj_wedge) # Inviscid fixed CL NACA0012 @@ -813,7 +789,7 @@ def main(): contadj_fixed_CL_naca0012.cfg_dir = "fixed_cl/naca0012" contadj_fixed_CL_naca0012.cfg_file = "inv_NACA0012_ContAdj.cfg" contadj_fixed_CL_naca0012.test_iter = 100 - contadj_fixed_CL_naca0012.test_vals = [0.748438, -4.810920, -0.520110, -0.000292] + contadj_fixed_CL_naca0012.test_vals = [0.275856, -5.200511, 0.342710, 0.000105] test_list.append(contadj_fixed_CL_naca0012) ################################### @@ -929,7 +905,7 @@ def main(): harmonic_balance.cfg_dir = "harmonic_balance" harmonic_balance.cfg_file = "HB.cfg" harmonic_balance.test_iter = 25 - harmonic_balance.test_vals = [-1.554985, 0.831796, 0.935729, 3.960210] + harmonic_balance.test_vals = [-1.589739, 0.790169, 0.937053, 3.922579] test_list.append(harmonic_balance) # Turbulent pitching NACA 64a010 airfoil @@ -950,7 +926,7 @@ def main(): rot_naca0012.cfg_dir = "rotating/naca0012" rot_naca0012.cfg_file = "rot_NACA0012.cfg" rot_naca0012.test_iter = 25 - rot_naca0012.test_vals = [-2.709459, 2.836670, -0.081188, 0.002156] + rot_naca0012.test_vals = [-2.698005, 2.845328, -0.079439, 0.002128] test_list.append(rot_naca0012) # Lid-driven cavity @@ -987,7 +963,7 @@ def main(): sine_gust.cfg_dir = "gust" sine_gust.cfg_file = "inv_gust_NACA0012.cfg" sine_gust.test_iter = 5 - sine_gust.test_vals = [-1.977514, 3.481817, -0.010609, -0.007956] + sine_gust.test_vals = [-1.977520, 3.481804, -0.012377, -0.007389] sine_gust.unsteady = True test_list.append(sine_gust) @@ -996,7 +972,7 @@ def main(): aeroelastic.cfg_dir = "aeroelastic" aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg" aeroelastic.test_iter = 2 - aeroelastic.test_vals = [0.075176, 0.027496, -0.001643, -0.000126] + aeroelastic.test_vals = [0.076550, 0.033042, -0.001650, -0.000127] aeroelastic.unsteady = True test_list.append(aeroelastic) @@ -1005,7 +981,7 @@ def main(): ddes_flatplate.cfg_dir = "ddes/flatplate" ddes_flatplate.cfg_file = "ddes_flatplate.cfg" ddes_flatplate.test_iter = 10 - ddes_flatplate.test_vals = [-2.714785, -5.882679, -0.215041, 0.023758, -617.450000] + ddes_flatplate.test_vals = [-2.714757, -5.882779, -0.215005, 0.023783, -618.130000] ddes_flatplate.unsteady = True test_list.append(ddes_flatplate) @@ -1023,7 +999,7 @@ def main(): flatplate_unsteady.cfg_dir = "navierstokes/flatplate" flatplate_unsteady.cfg_file = "lam_flatplate_unst.cfg" flatplate_unsteady.test_iter = 3 - flatplate_unsteady.test_vals = [0.000008, -8.876477, -8.249920, -6.294138, -5.468911, -3.398657, 0.002075, -0.324341] + flatplate_unsteady.test_vals = [7.9509e-06, -8.868859, -8.231652, -6.283262, -5.466675, -3.391163, 0.002078, -0.343642] flatplate_unsteady.unsteady = True test_list.append(flatplate_unsteady) @@ -1035,16 +1011,16 @@ def main(): edge_VW = TestCase('edge_VW') edge_VW.cfg_dir = "nicf/edge" edge_VW.cfg_file = "edge_VW.cfg" - edge_VW.test_iter = 50 - edge_VW.test_vals = [-8.107432, -1.914195, -0.000009, 0.000000] + edge_VW.test_iter = 100 + edge_VW.test_vals = [-5.048044, 1.115667, -0.000009, 0.000000] test_list.append(edge_VW) # Rarefaction shock wave edge_PPR edge_PPR = TestCase('edge_PPR') edge_PPR.cfg_dir = "nicf/edge" edge_PPR.cfg_file = "edge_PPR.cfg" - edge_PPR.test_iter = 50 - edge_PPR.test_vals = [-8.611983, -2.441992, -0.000034, 0.000000] + edge_PPR.test_iter = 100 + edge_PPR.test_vals = [-5.400790, 0.739723, -0.000035, 0.000000] test_list.append(edge_PPR) # Rarefaction Q1D nozzle, include CoolProp fluid model @@ -1052,7 +1028,7 @@ def main(): coolprop_fluidModel.cfg_dir = "nicf/coolprop" coolprop_fluidModel.cfg_file = "fluidModel.cfg" coolprop_fluidModel.test_iter = 5 - coolprop_fluidModel.test_vals = [-4.424953, -1.582877, 3.442422, 0.000000, 0.000000] + coolprop_fluidModel.test_vals = [-4.525459, -1.578697, 3.443116, 0.000000, 0.000000] coolprop_fluidModel.enabled_on_cpu_arch = ["x86_64"] test_list.append(coolprop_fluidModel) @@ -1061,7 +1037,7 @@ def main(): coolprop_transportModel.cfg_dir = "nicf/coolprop" coolprop_transportModel.cfg_file = "transportModel.cfg" coolprop_transportModel.test_iter = 5 - coolprop_transportModel.test_vals = [-4.428098, -1.314332, 4.630872, 0.000000, 0.000000] + coolprop_transportModel.test_vals = [-4.527922, -1.308648, 4.630717, 0.000000, 0.000000] coolprop_transportModel.enabled_on_cpu_arch = ["x86_64"] test_list.append(coolprop_transportModel) @@ -1070,7 +1046,7 @@ def main(): datadriven_fluidModel.cfg_dir = "nicf/datadriven" datadriven_fluidModel.cfg_file = "datadriven_nozzle.cfg" datadriven_fluidModel.test_iter = 50 - datadriven_fluidModel.test_vals = [-2.632817, 0.155922, 4.690917, 0.000000, 0.000000] + datadriven_fluidModel.test_vals = [-2.623890, 0.145236, 4.688439, 0.000000, 0.000000] test_list.append(datadriven_fluidModel) ###################################### @@ -1121,7 +1097,7 @@ def main(): uniform_flow.cfg_dir = "sliding_interface/uniform_flow" uniform_flow.cfg_file = "uniform_NN.cfg" uniform_flow.test_iter = 5 - uniform_flow.test_vals = [5.000000, 0.000000, -0.185381, -10.631539] + uniform_flow.test_vals = [5.000000, 0.000000, -0.188747, -10.631538] uniform_flow.unsteady = True uniform_flow.multizone = True test_list.append(uniform_flow) @@ -1131,7 +1107,7 @@ def main(): channel_2D.cfg_dir = "sliding_interface/channel_2D" channel_2D.cfg_file = "channel_2D_WA.cfg" channel_2D.test_iter = 2 - channel_2D.test_vals = [2.000000, 0.000000, 0.419792, 0.352177, 0.404446] + channel_2D.test_vals = [2.000000, 0.000000, 0.398011, 0.352778, 0.405461] channel_2D.test_vals_aarch64 = [2.000000, 0.000000, 0.398036, 0.352783, 0.405462] channel_2D.timeout = 100 channel_2D.unsteady = True @@ -1143,7 +1119,7 @@ def main(): channel_3D.cfg_dir = "sliding_interface/channel_3D" channel_3D.cfg_file = "channel_3D_WA.cfg" channel_3D.test_iter = 2 - channel_3D.test_vals = [2.000000, 0.000000, 0.623113, 0.505078, 0.412774] + channel_3D.test_vals = [2.000000, 0.000000, 0.620176, 0.505161, 0.415248] channel_3D.test_vals_aarch64 = [2.000000, 0.000000, 0.620182, 0.505302, 0.415257] channel_3D.unsteady = True channel_3D.multizone = True @@ -1154,7 +1130,7 @@ def main(): pipe.cfg_dir = "sliding_interface/pipe" pipe.cfg_file = "pipe_NN.cfg" pipe.test_iter = 2 - pipe.test_vals = [0.116649, 0.481389, 0.648696, 0.982990, 1.018349] + pipe.test_vals = [0.150024, 0.491953, 0.677755, 0.963980, 1.006936] pipe.unsteady = True pipe.multizone = True test_list.append(pipe) @@ -1164,7 +1140,7 @@ def main(): rotating_cylinders.cfg_dir = "sliding_interface/rotating_cylinders" rotating_cylinders.cfg_file = "rot_cylinders_WA.cfg" rotating_cylinders.test_iter = 3 - rotating_cylinders.test_vals = [3.000000, 0.000000, 0.719777, 1.111044, 1.154071] + rotating_cylinders.test_vals = [3.000000, 0.000000, 0.777572, 1.134804, 1.224137] rotating_cylinders.unsteady = True rotating_cylinders.multizone = True test_list.append(rotating_cylinders) @@ -1174,7 +1150,7 @@ def main(): supersonic_vortex_shedding.cfg_dir = "sliding_interface/supersonic_vortex_shedding" supersonic_vortex_shedding.cfg_file = "sup_vor_shed_WA.cfg" supersonic_vortex_shedding.test_iter = 5 - supersonic_vortex_shedding.test_vals = [5.000000, 0.000000, 1.207949, 1.036090] + supersonic_vortex_shedding.test_vals = [5.000000, 0.000000, 1.214350, 1.663914] supersonic_vortex_shedding.unsteady = True supersonic_vortex_shedding.multizone = True test_list.append(supersonic_vortex_shedding) @@ -1238,7 +1214,7 @@ def main(): fsi2d.cfg_dir = "fea_fsi/WallChannel_2d" fsi2d.cfg_file = "configFSI.cfg" fsi2d.test_iter = 4 - fsi2d.test_vals = [4.000000, 0.000000, -3.729224, -4.153951] + fsi2d.test_vals = [4.000000, 0.000000, -3.743210, -4.133483] fsi2d.command = TestCase.Command(exec = "parallel_computation_fsi.py", param = "-f") fsi2d.multizone= True fsi2d.unsteady = True @@ -1249,7 +1225,7 @@ def main(): stat_fsi.cfg_dir = "fea_fsi/stat_fsi" stat_fsi.cfg_file = "config.cfg" stat_fsi.test_iter = 7 - stat_fsi.test_vals = [-3.311842, -4.950580, 0.000000, 8.000000] + stat_fsi.test_vals = [-3.296605, -4.934646, 0.000000, 7.000000] stat_fsi.multizone = True test_list.append(stat_fsi) @@ -1258,7 +1234,7 @@ def main(): dyn_fsi.cfg_dir = "fea_fsi/dyn_fsi" dyn_fsi.cfg_file = "config.cfg" dyn_fsi.test_iter = 4 - dyn_fsi.test_vals = [-4.330462, -4.058005, 0.000000, 97.000000] + dyn_fsi.test_vals = [-4.355829, -4.060587, 5.3837e-08, 98] dyn_fsi.multizone = True dyn_fsi.unsteady = True test_list.append(dyn_fsi) @@ -1268,7 +1244,7 @@ def main(): stat_fsi_restart.cfg_dir = "fea_fsi/stat_fsi" stat_fsi_restart.cfg_file = "config_restart.cfg" stat_fsi_restart.test_iter = 1 - stat_fsi_restart.test_vals = [-3.445617, -4.243213, 0.000000, 28.000000] + stat_fsi_restart.test_vals = [-3.435926, -4.264912, 0.000000, 28.000000] stat_fsi_restart.multizone = True test_list.append(stat_fsi_restart) @@ -1325,7 +1301,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.088580, -0.764276, -1.086940, -0.747450, 208.023676, 344.680000, -0.000000, -0.747450, 0.747450] + sp_pinArray_cht_2d_dp_hf.test_vals = [0.104306, -1.005859, -1.028870, -0.753282, 208.023676, 353.490000, -0.000000, -0.753280, 0.753280] sp_pinArray_cht_2d_dp_hf.multizone = True test_list.append(sp_pinArray_cht_2d_dp_hf) @@ -1334,8 +1310,8 @@ def main(): sp_pinArray_3d_cht_mf_hf_tp.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_3d" sp_pinArray_3d_cht_mf_hf_tp.cfg_file = "configMaster.cfg" sp_pinArray_3d_cht_mf_hf_tp.test_iter = 30 - sp_pinArray_3d_cht_mf_hf_tp.test_vals = [-1.627413, -3.083567, -4.577909, -0.009725, 104.632413, 418.370000, 0.000000] - sp_pinArray_3d_cht_mf_hf_tp.test_vals_aarch64 = [-1.622914, -3.081114, -4.576282, -0.009725, 104.632412, 418.370000, 0.000000] + sp_pinArray_3d_cht_mf_hf_tp.test_vals = [-5.128577, -5.425081, -6.788413, -0.009675, 104.655438, 419.210000, 0.0] + sp_pinArray_3d_cht_mf_hf_tp.test_vals_aarch64 = [-5.128577, -5.425081, -6.788413, -0.009675, 104.655438, 419.210000, 0.0] sp_pinArray_3d_cht_mf_hf_tp.multizone = True test_list.append(sp_pinArray_3d_cht_mf_hf_tp) @@ -1349,7 +1325,7 @@ def main(): pywrapper_naca0012.cfg_dir = "euler/naca0012" pywrapper_naca0012.cfg_file = "inv_NACA0012_Roe.cfg" pywrapper_naca0012.test_iter = 100 - pywrapper_naca0012.test_vals = [-9.569885, -8.966579, 0.335418, 0.023332] + pywrapper_naca0012.test_vals = [-6.747210, -6.149915, 0.333445, 0.021241] pywrapper_naca0012.command = TestCase.Command("mpirun -np 2", "SU2_CFD.py", "--parallel -f") test_list.append(pywrapper_naca0012) @@ -1380,7 +1356,7 @@ def main(): pywrapper_aeroelastic.cfg_dir = "aeroelastic" pywrapper_aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg" pywrapper_aeroelastic.test_iter = 2 - pywrapper_aeroelastic.test_vals = [0.075176, 0.027496, -0.001643, -0.000126] + pywrapper_aeroelastic.test_vals = [0.076550, 0.033042, -0.001650, -0.000127] pywrapper_aeroelastic.command = TestCase.Command("mpirun -np 2", "SU2_CFD.py", "--parallel -f") pywrapper_aeroelastic.unsteady = True test_list.append(pywrapper_aeroelastic) @@ -1400,7 +1376,7 @@ def main(): pywrapper_fsi2d.cfg_dir = "fea_fsi/WallChannel_2d" pywrapper_fsi2d.cfg_file = "configFSI.cfg" pywrapper_fsi2d.test_iter = 4 - pywrapper_fsi2d.test_vals = [4.000000, 0.000000, -3.729224, -4.153951] + pywrapper_fsi2d.test_vals = [4.000000, 0.000000, -3.743210, -4.133483] pywrapper_fsi2d.command = TestCase.Command("mpirun -np 2", "SU2_CFD.py", "--nZone 2 --fsi True --parallel -f") pywrapper_fsi2d.unsteady = True pywrapper_fsi2d.multizone = True @@ -1411,7 +1387,7 @@ def main(): pywrapper_unsteadyFSI.cfg_dir = "py_wrapper/dyn_fsi" pywrapper_unsteadyFSI.cfg_file = "config.cfg" pywrapper_unsteadyFSI.test_iter = 4 - pywrapper_unsteadyFSI.test_vals = [0.000000, 49.000000, 5.000000, 44.000000, -0.589089, -2.800967, -2.603174, -6.722478, 0.000209] + pywrapper_unsteadyFSI.test_vals = [0, 31, 5, 58, -1.756780, -2.828276, -7.652558, -6.863929, 1.5618e-04] pywrapper_unsteadyFSI.command = TestCase.Command("mpirun -np 2", "python", "run.py") pywrapper_unsteadyFSI.unsteady = True pywrapper_unsteadyFSI.multizone = True @@ -1442,7 +1418,7 @@ def main(): pywrapper_deformingBump.cfg_dir = "py_wrapper/deforming_bump_in_channel" pywrapper_deformingBump.cfg_file = "config.cfg" pywrapper_deformingBump.test_iter = 1 - pywrapper_deformingBump.test_vals = [0.500000, 0.000000, -3.037857, -1.603573, -2.074205, 2.424288, 7.765352, -0.220502] + pywrapper_deformingBump.test_vals = [0.500000, 0.000000, -2.554360, -1.084594, -0.024882, 2.907803, 8.785498, -0.363585] pywrapper_deformingBump.command = TestCase.Command("mpirun -np 2", "python", "run.py") pywrapper_deformingBump.unsteady = True test_list.append(pywrapper_deformingBump) @@ -1514,7 +1490,7 @@ def main(): species2_primitiveVenturi_mixingmodel.cfg_dir = "species_transport/venturi_primitive_3species" species2_primitiveVenturi_mixingmodel.cfg_file = "species2_primitiveVenturi_mixingmodel.cfg" species2_primitiveVenturi_mixingmodel.test_iter = 50 - species2_primitiveVenturi_mixingmodel.test_vals = [ -5.407755, -4.557255, -4.635502, -5.642910, -0.059627, -5.546376, 5.000000, -1.879995, 5.000000, -4.898985, 5.000000, -1.169389, 0.000551, 0.000483, 0.000068, 0.000000] + species2_primitiveVenturi_mixingmodel.test_vals = [-5.359429, -4.504612, -4.480004, -5.629196, -0.059934, -5.596051, 5.000000, -1.870943, 5.000000, -4.915279, 5.000000, -1.183531, 0.000429, 0.000393, 0.000036, 0.000000] test_list.append(species2_primitiveVenturi_mixingmodel) # 2 species (1 eq) primitive venturi mixing using mixing model and bounded scalar transport @@ -1522,7 +1498,7 @@ def main(): species2_primitiveVenturi_mixingmodel_boundedscalar.cfg_dir = "species_transport/venturi_primitive_3species" species2_primitiveVenturi_mixingmodel_boundedscalar.cfg_file = "species2_primitiveVenturi_mixingmodel_boundedscalar.cfg" species2_primitiveVenturi_mixingmodel_boundedscalar.test_iter = 50 - species2_primitiveVenturi_mixingmodel_boundedscalar.test_vals = [-5.392378, -4.492373, -4.576491, -5.759780, -0.137797, -5.677531, 5.000000, -1.895013, 5.000000, -4.806816, 5.000000, -1.697769, 0.000275, 0.000275, 0.000000, 0.000000] + species2_primitiveVenturi_mixingmodel_boundedscalar.test_vals = [-5.336209, -4.445047, -4.432074, -5.785385, -0.127631, -5.672217, 5.000000, -1.944369, 5.000000, -4.878272, 5.000000, -1.806657, 0.000272, 0.000272, 0.000000, 0.000000] test_list.append(species2_primitiveVenturi_mixingmodel_boundedscalar) # 2 species (1 eq) primitive venturi mixing using mixing model including viscosity, thermal conductivity and inlet markers for SA turbulence model @@ -1530,7 +1506,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 = [-4.857397, -3.646605, -3.737462, -7.602922, -5.008846, 5.000000, -1.756226, 5.000000, -3.163353, 5.000000, -2.189723, 2.476808, 0.976999, 0.609280, 0.890529] + species2_primitiveVenturi_mixingmodel_viscosity.test_vals = [-4.843481, -3.585988, -3.486593, -7.560545, -5.094245, 5.000000, -1.898097, 5.000000, -3.328995, 5.000000, -2.113241, 2.482221, 0.974142, 0.607219, 0.900860] test_list.append(species2_primitiveVenturi_mixingmodel_viscosity) # 2 species (1 eq) primitive venturi mixing using mixing model including heat capacity and mass diffusivity @@ -1538,7 +1514,7 @@ def main(): species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg_dir = "species_transport/venturi_primitive_3species" species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg_file = "species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg" species2_primitiveVenturi_mixingmodel_heatcapacity_H2.test_iter = 50 - species2_primitiveVenturi_mixingmodel_heatcapacity_H2.test_vals = [-5.688779, -4.556193, -4.513326, -6.563666, 2.298459, -5.423525, 30.000000, -6.903871, 13.000000, -8.224587, 8.000000, -9.119625, 2.078869, 1.000000, 0.600000, 0.478869] + species2_primitiveVenturi_mixingmodel_heatcapacity_H2.test_vals = [-6.118333, -4.985699, -4.918326, -7.249080, 2.445213, -5.624080, 30.000000, -5.681895, 12.000000, -8.186475, 10.000000, -8.853067, 2.083524, 1.000000, 0.600000, 0.483524] test_list.append(species2_primitiveVenturi_mixingmodel_heatcapacity_H2) # 2 species (1 eq) primitive venturi mixing using mixing model including heat capacity and mass diffusivity NonDimensional case @@ -1546,7 +1522,7 @@ def main(): species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg_dir = "species_transport/venturi_primitive_3species" species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg_file = "species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg" species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.test_iter = 50 - species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.test_vals = [-5.287504, -4.852957, -4.798004, -7.501815, 1.991002, -5.023713, 10.000000, -2.696121, 3.000000, -5.182457, 5.000000, -5.561055, 2.078843, 1.000000, 0.600000, 0.478843] + species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.test_vals = [-5.724191, -5.290524, -5.223195, -8.252900, 2.140394, -5.229908, 30.000000, -5.681850, 12.000000, -8.186296, 10.000000, -8.852858, 2.083526, 1.000000, 0.600000, 0.483526] test_list.append(species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND) # 2 species (1 eq) primitive venturi mixing @@ -1554,7 +1530,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.643794, -4.798953, -4.858719, -5.648947, -1.195985, -5.564607, 5.000000, -0.958960, 5.000000, -2.515334, 5.000000, -0.796944, 0.000210, 0.000206, 0.000004, 0.000000] + species2_primitiveVenturi.test_vals = [-5.641112, -4.724266, -4.677148, -5.470711, -1.121455, -5.713132, 5.000000, -0.830412, 5.000000, -2.668654, 5.000000, -0.454161, 0.000092, 0.000091, 0.000001, 0.000000] test_list.append(species2_primitiveVenturi) # 2 species (1 eq) primitive venturi mixing with bounded scalar transport @@ -1562,7 +1538,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.283533, -4.417193, -4.478360, -5.669526, -0.952767, -5.618596, 5.000000, -1.996975, 5.000000, -4.017868, 5.000000, -1.747496, 0.000423, 0.000423, 0.000000, 0.000000] + species_primitiveVenturi_boundedscalar.test_vals = [-5.278467, -4.368236, -4.350556, -5.693359, -0.978845, -5.618393, 5.000000, -1.804015, 5.000000, -4.057089, 5.000000, -2.003816, 0.000415, 0.000415, 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 @@ -1570,7 +1546,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.105910, -1.680056, -1.599493, -0.672401, 1.441091, -3.759601, 23.000000, -5.201473, 11.000000, -5.312651, 4.000000, -6.525448, 2.000000, 1.000000, 0.000000, 1.000000] + species2_primitiveVenturi_mixingmodel_TURBULENT_MARKERS.test_vals = [-4.026294, -1.649804, -1.404882, -0.746005, 1.609256, -3.767237, 23.000000, -5.082019, 10.000000, -5.056739, 4.000000, -6.480965, 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. @@ -1579,7 +1555,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.714428, -4.869589, -4.929349, -5.719577, -1.266622, -5.824037, -5.944720, 5.000000, -0.958918, 5.000000, -2.515337, 5.000000, -0.523677] + species3_primitiveVenturi_inletFile.test_vals = [-5.711734, -4.794814, -4.747694, -5.541323, -1.192017, -5.951964, -6.096677, 5.000000, -0.830172, 5.000000, -2.668819, 5.000000, -0.516308] test_list.append(species3_primitiveVenturi_inletFile) # rectangle passive transport validation @@ -1587,7 +1563,7 @@ def main(): species_passive_val.cfg_dir = "species_transport/passive_transport_validation" species_passive_val.cfg_file = "passive_transport.cfg" species_passive_val.test_iter = 50 - species_passive_val.test_vals = [-16.604279, -16.303255, -16.970059, -4.257599, 10.000000, -4.731945, 8.000000, -5.193350, 0.186610, 0.000000] + species_passive_val.test_vals = [-16.559189, -16.315116, -16.908670, -4.257599, 10, -4.523292, 8, -5.19335, 0.18661, 0] species_passive_val.test_vals_aarch64 = [-16.538551, -16.312552, -16.882823, -4.257599, 10, -4.585464, 8, -5.19335, 0.18661, 0] test_list.append(species_passive_val) @@ -1596,7 +1572,7 @@ def main(): species3_multizone_restart.cfg_dir = "species_transport/multizone" species3_multizone_restart.cfg_file = "configMaster.cfg" species3_multizone_restart.test_iter = 5 - species3_multizone_restart.test_vals = [-6.111017, -5.720050] + species3_multizone_restart.test_vals = [-6.175178, -5.763030] species3_multizone_restart.multizone = True test_list.append(species3_multizone_restart) @@ -1640,14 +1616,14 @@ def main(): cfd_flamelet_ch4_cht = TestCase('cfd_flamelet_ch4_cht') 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_iter = 10 cfd_flamelet_ch4_cht.command = TestCase.Command("mpirun -n 2", "SU2_CFD") cfd_flamelet_ch4_cht.timeout = 1600 cfd_flamelet_ch4_cht.reference_file = "restart_0.csv.ref" cfd_flamelet_ch4_cht.test_file = "restart_0.csv" cfd_flamelet_ch4_cht.multizone = True cfd_flamelet_ch4_cht.comp_threshold = 1e-6 - cfd_flamelet_ch4_cht.tol_file_percent = 1.0 + cfd_flamelet_ch4_cht.tol_file_percent = 0.1 pass_list.append(cfd_flamelet_ch4_cht.run_filediff()) test_list.append(cfd_flamelet_ch4_cht) @@ -1854,18 +1830,16 @@ def main(): test_list.append(naca0012_cst) # 2D FD streamwise periodic cht, avg temp obj func - fd_sp_pinArray_cht_2d_dp_hf = TestCase('fd_sp_pinArray_cht_2d_dp_hf') - fd_sp_pinArray_cht_2d_dp_hf.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_2d" - fd_sp_pinArray_cht_2d_dp_hf.cfg_file = "FD_configMaster.cfg" - fd_sp_pinArray_cht_2d_dp_hf.test_iter = 100 - fd_sp_pinArray_cht_2d_dp_hf.command = TestCase.Command(exec = "finite_differences.py", param = "-z 2 -n 2 -f") - fd_sp_pinArray_cht_2d_dp_hf.timeout = 1600 - fd_sp_pinArray_cht_2d_dp_hf.comp_threshold = 1e-6 - fd_sp_pinArray_cht_2d_dp_hf.tol_file_percent = 0.2 - fd_sp_pinArray_cht_2d_dp_hf.reference_file = "of_grad_findiff.csv.ref" + fd_sp_pinArray_cht_2d_dp_hf = TestCase('fd_sp_pinArray_cht_2d_dp_hf') + fd_sp_pinArray_cht_2d_dp_hf.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_2d" + fd_sp_pinArray_cht_2d_dp_hf.cfg_file = "FD_configMaster.cfg" + fd_sp_pinArray_cht_2d_dp_hf.test_iter = 100 + fd_sp_pinArray_cht_2d_dp_hf.command = TestCase.Command(exec = "finite_differences.py", param = "-z 2 -n 2 -f") + fd_sp_pinArray_cht_2d_dp_hf.timeout = 1600 + fd_sp_pinArray_cht_2d_dp_hf.reference_file = "of_grad_findiff.csv.ref" fd_sp_pinArray_cht_2d_dp_hf.reference_file_aarch64 = "of_grad_findiff_aarch64.csv.ref" - fd_sp_pinArray_cht_2d_dp_hf.test_file = "FINDIFF/of_grad_findiff.csv" - fd_sp_pinArray_cht_2d_dp_hf.multizone = True + fd_sp_pinArray_cht_2d_dp_hf.test_file = "FINDIFF/of_grad_findiff.csv" + fd_sp_pinArray_cht_2d_dp_hf.multizone = True pass_list.append(fd_sp_pinArray_cht_2d_dp_hf.run_filediff()) test_list.append(fd_sp_pinArray_cht_2d_dp_hf) diff --git a/TestCases/parallel_regression_AD.py b/TestCases/parallel_regression_AD.py index a4aa0f57252..59576fdc410 100644 --- a/TestCases/parallel_regression_AD.py +++ b/TestCases/parallel_regression_AD.py @@ -47,7 +47,7 @@ def main(): discadj_naca0012.cfg_dir = "cont_adj_euler/naca0012" discadj_naca0012.cfg_file = "inv_NACA0012_discadj.cfg" discadj_naca0012.test_iter = 100 - discadj_naca0012.test_vals = [-3.560692, -8.925239, -0.000000, 0.005559] + discadj_naca0012.test_vals = [-3.561506, -8.926634, -0.000000, 0.005587] test_list.append(discadj_naca0012) # Inviscid Cylinder 3D (multiple markers) @@ -55,7 +55,7 @@ def main(): discadj_cylinder3D.cfg_dir = "disc_adj_euler/cylinder3D" discadj_cylinder3D.cfg_file = "inv_cylinder3D.cfg" discadj_cylinder3D.test_iter = 5 - discadj_cylinder3D.test_vals = [-3.768909, -3.725727, 0.000000, 0.000000] + discadj_cylinder3D.test_vals = [-3.734502, -3.839637, 0.000000, 0.000000] test_list.append(discadj_cylinder3D) # Arina nozzle 2D @@ -63,7 +63,7 @@ def main(): discadj_arina2k.cfg_dir = "disc_adj_euler/arina2k" discadj_arina2k.cfg_file = "Arina2KRS.cfg" discadj_arina2k.test_iter = 20 - discadj_arina2k.test_vals = [-3.540396, -3.828299, 0.027959, 0.000000] + discadj_arina2k.test_vals = [-3.111181, -3.501516, 6.8705e-02, 0] test_list.append(discadj_arina2k) # Equivalent area NACA64-206 @@ -71,7 +71,7 @@ def main(): ea_naca64206.cfg_dir = "optimization_euler/equivalentarea_naca64206" ea_naca64206.cfg_file = "NACA64206.cfg" ea_naca64206.test_iter = 10 - ea_naca64206.test_vals = [3.127605, 2.411805, -5505700.000000, 10.591000] + ea_naca64206.test_vals = [3.181093, 2.471539, -5487700.0, 8.3604] test_list.append(ea_naca64206) #################################### @@ -104,7 +104,7 @@ def main(): discadj_incomp_NACA0012.cfg_dir = "disc_adj_incomp_euler/naca0012" discadj_incomp_NACA0012.cfg_file = "incomp_NACA0012_disc.cfg" discadj_incomp_NACA0012.test_iter = 20 - discadj_incomp_NACA0012.test_vals = [20.000000, -4.093433, -2.686134, 0.000000] + discadj_incomp_NACA0012.test_vals = [20.000000, -4.095412, -2.690483, 0.000000] test_list.append(discadj_incomp_NACA0012) ##################################### @@ -150,7 +150,7 @@ def main(): discadj_axisymmetric_rans_nozzle.cfg_dir = "axisymmetric_rans/air_nozzle" discadj_axisymmetric_rans_nozzle.cfg_file = "air_nozzle_restart.cfg" discadj_axisymmetric_rans_nozzle.test_iter = 10 - discadj_axisymmetric_rans_nozzle.test_vals = [9.550040, 4.937865, 7.377284, 2.748846] + discadj_axisymmetric_rans_nozzle.test_vals = [9.516464, 5.022130, 7.370705, 2.744551] discadj_axisymmetric_rans_nozzle.no_restart = True test_list.append(discadj_axisymmetric_rans_nozzle) @@ -217,7 +217,7 @@ def main(): discadj_pitchingNACA0012.cfg_dir = "disc_adj_euler/naca0012_pitching" discadj_pitchingNACA0012.cfg_file = "inv_NACA0012_pitching.cfg" discadj_pitchingNACA0012.test_iter = 4 - discadj_pitchingNACA0012.test_vals = [-1.227073, -1.648410, -0.007541, 0.000012] + discadj_pitchingNACA0012.test_vals = [-1.223480, -1.639387, -0.007591, 0.000013] discadj_pitchingNACA0012.unsteady = True test_list.append(discadj_pitchingNACA0012) @@ -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 = [-2.117791, 0.784475, 0.000000, -0.574700] + discadj_heat.test_vals = [-2.226539, 0.605868, 0.000000, -6.256400] discadj_heat.test_vals_aarch64 = [-2.226539, 0.605868, 0.000000, -6.256400] test_list.append(discadj_heat) @@ -277,7 +277,7 @@ def main(): discadj_fsi2.cfg_dir = "disc_adj_fsi/Airfoil_2d" discadj_fsi2.cfg_file = "config.cfg" discadj_fsi2.test_iter = 8 - discadj_fsi2.test_vals = [-2.402639, 2.740269, -1.270185, -1.273900, 3.860200] + discadj_fsi2.test_vals = [-4.349377, 0.192713, -1.303589, 0.75407, 2.3244] discadj_fsi2.test_vals_aarch64 = [-4.349372, 0.190601, -1.303589, 0.754070, 2.324400] discadj_fsi2.tol = 0.00001 test_list.append(discadj_fsi2) @@ -299,7 +299,7 @@ def main(): da_sp_pinArray_cht_2d_dp_hf.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_2d" da_sp_pinArray_cht_2d_dp_hf.cfg_file = "DA_configMaster.cfg" da_sp_pinArray_cht_2d_dp_hf.test_iter = 100 - da_sp_pinArray_cht_2d_dp_hf.test_vals = [-4.706292, -4.062398, -4.137374] + da_sp_pinArray_cht_2d_dp_hf.test_vals = [-4.743218, -4.059800, -4.138231] da_sp_pinArray_cht_2d_dp_hf.multizone = True test_list.append(da_sp_pinArray_cht_2d_dp_hf) @@ -308,7 +308,7 @@ def main(): da_sp_pinArray_cht_2d_mf.cfg_dir = "incomp_navierstokes/streamwise_periodic/dp-adjoint_chtPinArray_2d" da_sp_pinArray_cht_2d_mf.cfg_file = "configMaster.cfg" da_sp_pinArray_cht_2d_mf.test_iter = 100 - da_sp_pinArray_cht_2d_mf.test_vals = [-4.600710, -1.298285, -1.430286, -18.503417, -0.870017, -5.768271, -19.069555, -47.953298] + da_sp_pinArray_cht_2d_mf.test_vals = [-4.611237, -1.290668, -1.453678, -18.507826, -0.859013, -5.755971, -19.067984, -47.993931] da_sp_pinArray_cht_2d_mf.multizone = True test_list.append(da_sp_pinArray_cht_2d_mf) @@ -511,7 +511,7 @@ def main(): pywrapper_CFD_AD_MeshDisp.cfg_dir = "py_wrapper/disc_adj_flow/mesh_disp_sens" pywrapper_CFD_AD_MeshDisp.cfg_file = "configAD_flow.cfg" pywrapper_CFD_AD_MeshDisp.test_iter = 1000 - pywrapper_CFD_AD_MeshDisp.test_vals = [30.000000, -2.506016, 1.407249, 0.000000] + pywrapper_CFD_AD_MeshDisp.test_vals = [30.000000, -2.520972485907894, 1.3848377455328362, 0.000000] #last 4 columns pywrapper_CFD_AD_MeshDisp.command = TestCase.Command("mpirun -n 2", "python", "run_adjoint.py --parallel -f") pywrapper_CFD_AD_MeshDisp.timeout = 1600 pywrapper_CFD_AD_MeshDisp.tol = 0.000001 diff --git a/TestCases/py_wrapper/translating_NACA0012/config.cfg b/TestCases/py_wrapper/translating_NACA0012/config.cfg index a7880927239..8446a5405a1 100644 --- a/TestCases/py_wrapper/translating_NACA0012/config.cfg +++ b/TestCases/py_wrapper/translating_NACA0012/config.cfg @@ -43,33 +43,27 @@ MARKER_DEFORM_MESH= ( airfoil ) % DISCRETIZATION METHODS % CONV_NUM_METHOD_FLOW= ROE -MUSCL_FLOW= NO -NUM_METHOD_GRAD= GREEN_GAUSS +MUSCL_FLOW= YES +NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES SLOPE_LIMITER_FLOW= VENKATAKRISHNAN_WANG VENKAT_LIMITER_COEFF= 0.1 % SOLUTION ACCELERATION % -CFL_NUMBER= 1000 +CFL_NUMBER= 1e3 CFL_ADAPT= NO % MGLEVEL= 3 MGCYCLE= W_CYCLE -MG_PRE_SMOOTH= ( 1, 2, 3, 3 ) -MG_POST_SMOOTH= ( 0, 0, 0, 0 ) -MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 ) -MG_DAMP_RESTRICTION= 0.7 -MG_DAMP_PROLONGATION= 0.7 - % LINEAR_SOLVER= FGMRES LINEAR_SOLVER_PREC= ILU -LINEAR_SOLVER_ERROR= 1.0e-6 -LINEAR_SOLVER_ITER= 25 +LINEAR_SOLVER_ERROR= 0.1 +LINEAR_SOLVER_ITER= 10 % CONVERGENCE PARAMETERS % -ITER= 2500 +ITER= 250 CONV_FIELD= RMS_DENSITY CONV_RESIDUAL_MINVAL= -9 @@ -77,5 +71,5 @@ CONV_RESIDUAL_MINVAL= -9 % MESH_FILENAME= ../../euler/naca0012/mesh_NACA0012_inv.su2 MESH_FORMAT= SU2 -SCREEN_OUTPUT= (INNER_ITER, RMS_RES, LIFT, DRAG, MOMENT_X, MOMENT_Y, MOMENT_Z, LINSOL_RES, LINSOL_ITER) +SCREEN_OUTPUT= (INNER_ITER, RMS_RES, LIFT, DRAG, MOMENT_X, MOMENT_Y, MOMENT_Z) HISTORY_OUTPUT= (INNER_ITER, RMS_RES, AERO_COEFF) diff --git a/TestCases/py_wrapper/translating_NACA0012/forces_0.csv.ref b/TestCases/py_wrapper/translating_NACA0012/forces_0.csv.ref index 56ad73bb9aa..aa9112983d0 100644 --- a/TestCases/py_wrapper/translating_NACA0012/forces_0.csv.ref +++ b/TestCases/py_wrapper/translating_NACA0012/forces_0.csv.ref @@ -1,200 +1,200 @@ -199, -0.85, -0.00, 0.00 -0, -2.66, 18.33, 0.00 -1, -3.73, 25.70, 0.00 -2, -4.53, 31.27, 0.00 -3, -5.24, 36.23, 0.00 -4, -5.81, 40.33, 0.00 -5, -6.25, 43.55, 0.00 -6, -6.60, 46.13, 0.00 -7, -6.83, 47.96, 0.00 -8, -6.95, 49.09, 0.00 -9, -6.97, 49.54, 0.00 -10, -6.90, 49.35, 0.00 -11, -6.74, 48.57, 0.00 -12, -6.50, 47.14, 0.00 -13, -6.17, 45.13, 0.00 -14, -5.76, 42.53, 0.00 -15, -5.29, 39.38, 0.00 -16, -4.75, 35.75, 0.00 -17, -4.16, 31.65, 0.00 -18, -3.53, 27.09, 0.00 -19, -2.85, 22.14, 0.00 -20, -2.14, 16.79, 0.00 -21, -1.39, 11.10, 0.00 -22, -0.63, 5.06, 0.00 -23, 0.16, -1.33, 0.00 -24, 0.98, -8.10, 0.00 -25, 1.82, -15.27, 0.00 -26, 2.68, -22.82, 0.00 -27, 3.56, -30.76, 0.00 -28, 4.45, -39.00, 0.00 -29, 5.32, -47.44, 0.00 -30, 6.19, -56.07, 0.00 -31, 7.05, -64.97, 0.00 -32, 7.91, -74.28, 0.00 -33, 8.78, -83.97, 0.00 -34, 9.63, -93.91, 0.00 -35, 10.46, -104.09, 0.00 -36, 11.25, -114.37, 0.00 -37, 12.00, -124.73, 0.00 -38, 12.71, -135.28, 0.00 -39, 13.38, -145.98, 0.00 -40, 13.99, -156.79, 0.00 -41, 14.55, -167.72, 0.00 -42, 15.06, -178.80, 0.00 -43, 15.48, -189.92, 0.00 -44, 15.83, -201.03, 0.00 -45, 16.07, -211.97, 0.00 -46, 16.22, -222.82, 0.00 -47, 16.27, -233.68, 0.00 -48, 16.23, -244.83, 0.00 -49, 16.13, -256.65, 0.00 -50, 15.93, -269.12, 0.00 -51, 15.62, -282.01, 0.00 -52, 15.14, -294.70, 0.00 -53, 14.49, -307.24, 0.00 -54, 13.68, -319.91, 0.00 -55, 12.67, -332.16, 0.00 -56, 11.42, -342.95, 0.00 -57, 9.91, -351.31, 0.00 -58, 8.15, -356.48, 0.00 -59, 6.19, -358.24, 0.00 -60, 4.07, -357.17, 0.00 -61, 1.85, -353.80, 0.00 -62, -0.43, -348.10, 0.00 -63, -2.73, -340.32, 0.00 -64, -5.01, -331.03, 0.00 -65, -7.24, -320.26, 0.00 -66, -9.38, -308.18, 0.00 -67, -11.42, -295.32, 0.00 -68, -13.34, -281.72, 0.00 -69, -15.11, -267.62, 0.00 -70, -16.72, -253.15, 0.00 -71, -18.14, -238.20, 0.00 -72, -19.34, -222.69, 0.00 -73, -20.27, -206.50, 0.00 -74, -20.91, -189.85, 0.00 -75, -21.24, -172.83, 0.00 -76, -21.19, -155.22, 0.00 -77, -20.73, -137.21, 0.00 -78, -19.84, -118.97, 0.00 -79, -18.47, -100.51, 0.00 -80, -16.59, -82.08, 0.00 -81, -14.17, -63.76, 0.00 -82, -11.16, -45.67, 0.00 -83, -7.51, -27.92, 0.00 -84, -3.16, -10.66, 0.00 -85, 1.96, 5.99, 0.00 -86, 7.98, 21.97, 0.00 -87, 15.01, 37.12, 0.00 -88, 23.22, 51.25, 0.00 -89, 32.70, 63.95, 0.00 -90, 43.60, 74.81, 0.00 -91, 56.10, 83.39, 0.00 -92, 70.04, 88.70, 0.00 -93, 85.41, 90.05, 0.00 -94, 101.82, 86.49, 0.00 -95, 118.17, 76.97, 0.00 -96, 133.74, 61.30, 0.00 -97, 147.39, 39.89, 0.00 -98, 111.90, 15.02, 0.00 -99, 71.22, -0.00, 0.00 -100, 109.26, -14.66, 0.00 -101, 137.60, -37.24, 0.00 -102, 115.95, -53.15, 0.00 -103, 93.75, -61.06, 0.00 -104, 72.27, -61.39, 0.00 -105, 52.36, -55.20, 0.00 -106, 34.79, -44.05, 0.00 -107, 19.66, -29.23, 0.00 -108, 6.81, -11.68, 0.00 -109, -3.93, 7.68, 0.00 -110, -12.86, 28.37, 0.00 -111, -20.21, 49.96, 0.00 -112, -26.23, 72.22, 0.00 -113, -31.05, 94.79, 0.00 -114, -34.88, 117.65, 0.00 -115, -37.90, 140.89, 0.00 -116, -40.20, 164.49, 0.00 -117, -41.88, 188.42, 0.00 -118, -43.00, 212.71, 0.00 -119, -43.62, 237.42, 0.00 -120, -43.64, 261.69, 0.00 -121, -43.10, 285.24, 0.00 -122, -42.11, 308.46, 0.00 -123, -40.72, 331.35, 0.00 -124, -38.94, 353.54, 0.00 -125, -36.84, 375.42, 0.00 -126, -34.48, 397.10, 0.00 -127, -31.85, 418.29, 0.00 -128, -28.97, 438.71, 0.00 -129, -25.85, 458.00, 0.00 -130, -22.55, 476.33, 0.00 -131, -19.10, 493.80, 0.00 -132, -15.54, 510.37, 0.00 -133, -11.90, 526.39, 0.00 -134, -8.20, 541.54, 0.00 -135, -4.46, 556.04, 0.00 -136, -0.70, 570.26, 0.00 -137, 3.05, 583.60, 0.00 -138, 6.79, 596.04, 0.00 -139, 10.50, 608.18, 0.00 -140, 14.17, 619.60, 0.00 -141, 17.77, 629.84, 0.00 -142, 21.29, 639.37, 0.00 -143, 24.72, 648.06, 0.00 -144, 28.03, 655.33, 0.00 -145, 31.19, 661.08, 0.00 -146, 34.20, 665.74, 0.00 -147, 37.05, 669.08, 0.00 -148, 39.71, 670.85, 0.00 -149, 42.17, 671.22, 0.00 -150, 44.38, 669.34, 0.00 -151, 46.26, 664.42, 0.00 -152, 47.51, 652.70, 0.00 -153, 46.78, 616.94, 0.00 -154, 39.70, 504.23, 0.00 -155, 24.94, 305.93, 0.00 -156, 16.44, 195.28, 0.00 -157, 13.94, 160.59, 0.00 -158, 13.18, 147.63, 0.00 -159, 12.74, 138.97, 0.00 -160, 12.29, 130.81, 0.00 -161, 11.80, 122.63, 0.00 -162, 11.26, 114.42, 0.00 -163, 10.66, 106.07, 0.00 -164, 10.01, 97.60, 0.00 -165, 9.32, 89.11, 0.00 -166, 8.57, 80.48, 0.00 -167, 7.78, 71.77, 0.00 -168, 6.96, 63.07, 0.00 -169, 6.10, 54.40, 0.00 -170, 5.22, 45.80, 0.00 -171, 4.33, 37.37, 0.00 -172, 3.44, 29.24, 0.00 -173, 2.56, 21.44, 0.00 -174, 1.69, 13.95, 0.00 -175, 0.83, 6.81, 0.00 -176, 0.01, 0.05, 0.00 -177, -0.80, -6.35, 0.00 -178, -1.58, -12.38, 0.00 -179, -2.32, -18.05, 0.00 -180, -3.04, -23.33, 0.00 -181, -3.71, -28.22, 0.00 -182, -4.34, -32.66, 0.00 -183, -4.92, -36.62, 0.00 -184, -5.43, -40.09, 0.00 -185, -5.87, -42.98, 0.00 -186, -6.24, -45.27, 0.00 -187, -6.52, -46.94, 0.00 -188, -6.70, -47.94, 0.00 -189, -6.80, -48.33, 0.00 -190, -6.80, -48.04, 0.00 -191, -6.70, -47.05, 0.00 -192, -6.48, -45.33, 0.00 -193, -6.15, -42.84, 0.00 -194, -5.72, -39.70, 0.00 -195, -5.15, -35.65, 0.00 -196, -4.45, -30.72, 0.00 -197, -3.65, -25.15, 0.00 -198, -2.59, -17.80, 0.00 +199, -1.01, -0.00, 0.00 +0, -2.07, 14.25, 0.00 +1, -3.62, 24.97, 0.00 +2, -4.84, 33.38, 0.00 +3, -5.85, 40.49, 0.00 +4, -6.69, 46.42, 0.00 +5, -7.36, 51.26, 0.00 +6, -7.92, 55.36, 0.00 +7, -8.34, 58.59, 0.00 +8, -8.64, 61.04, 0.00 +9, -8.83, 62.73, 0.00 +10, -8.91, 63.73, 0.00 +11, -8.90, 64.10, 0.00 +12, -8.79, 63.80, 0.00 +13, -8.59, 62.88, 0.00 +14, -8.31, 61.35, 0.00 +15, -7.95, 59.25, 0.00 +16, -7.53, 56.67, 0.00 +17, -7.05, 53.55, 0.00 +18, -6.50, 49.94, 0.00 +19, -5.90, 45.87, 0.00 +20, -5.26, 41.32, 0.00 +21, -4.57, 36.38, 0.00 +22, -3.85, 31.01, 0.00 +23, -3.09, 25.23, 0.00 +24, -2.31, 19.12, 0.00 +25, -1.51, 12.63, 0.00 +26, -0.68, 5.79, 0.00 +27, 0.16, -1.36, 0.00 +28, 1.01, -8.84, 0.00 +29, 1.86, -16.61, 0.00 +30, 2.72, -24.66, 0.00 +31, 3.58, -32.98, 0.00 +32, 4.43, -41.60, 0.00 +33, 5.28, -50.47, 0.00 +34, 6.11, -59.56, 0.00 +35, 6.93, -68.92, 0.00 +36, 7.73, -78.52, 0.00 +37, 8.50, -88.30, 0.00 +38, 9.24, -98.33, 0.00 +39, 9.95, -108.57, 0.00 +40, 10.62, -118.95, 0.00 +41, 11.24, -129.51, 0.00 +42, 11.81, -140.28, 0.00 +43, 12.33, -151.21, 0.00 +44, 12.78, -162.28, 0.00 +45, 13.15, -173.40, 0.00 +46, 13.44, -184.61, 0.00 +47, 13.64, -195.87, 0.00 +48, 13.73, -207.12, 0.00 +49, 13.72, -218.38, 0.00 +50, 13.58, -229.47, 0.00 +51, 13.30, -240.10, 0.00 +52, 12.85, -250.14, 0.00 +53, 12.31, -261.02, 0.00 +54, 11.62, -271.62, 0.00 +55, 10.32, -270.49, 0.00 +56, 8.26, -248.20, 0.00 +57, 6.94, -245.94, 0.00 +58, 7.97, -348.31, 0.00 +59, 7.61, -440.57, 0.00 +60, 5.11, -448.31, 0.00 +61, 2.28, -436.77, 0.00 +62, -0.53, -428.04, 0.00 +63, -3.36, -418.60, 0.00 +64, -6.17, -407.62, 0.00 +65, -8.93, -395.29, 0.00 +66, -11.62, -381.67, 0.00 +67, -14.20, -367.12, 0.00 +68, -16.64, -351.56, 0.00 +69, -18.92, -335.22, 0.00 +70, -21.01, -318.22, 0.00 +71, -22.89, -300.56, 0.00 +72, -24.52, -282.37, 0.00 +73, -25.88, -263.71, 0.00 +74, -26.96, -244.77, 0.00 +75, -27.72, -225.59, 0.00 +76, -28.12, -205.99, 0.00 +77, -28.13, -186.20, 0.00 +78, -27.76, -166.42, 0.00 +79, -26.92, -146.54, 0.00 +80, -25.62, -126.74, 0.00 +81, -23.79, -107.06, 0.00 +82, -21.39, -87.53, 0.00 +83, -18.36, -68.27, 0.00 +84, -14.63, -49.34, 0.00 +85, -10.10, -30.83, 0.00 +86, -4.66, -12.84, 0.00 +87, 1.82, 4.49, 0.00 +88, 9.54, 21.04, 0.00 +89, 18.64, 36.46, 0.00 +90, 29.42, 50.48, 0.00 +91, 42.11, 62.60, 0.00 +92, 56.77, 71.89, 0.00 +93, 73.41, 77.41, 0.00 +94, 91.92, 78.09, 0.00 +95, 111.10, 72.36, 0.00 +96, 128.91, 59.09, 0.00 +97, 142.62, 38.60, 0.00 +98, 108.87, 14.61, 0.00 +99, 70.25, -0.00, 0.00 +100, 103.25, -13.86, 0.00 +101, 123.24, -33.35, 0.00 +102, 98.16, -44.99, 0.00 +103, 72.48, -47.21, 0.00 +104, 48.60, -41.28, 0.00 +105, 27.56, -29.06, 0.00 +106, 9.78, -12.38, 0.00 +107, -4.77, 7.09, 0.00 +108, -16.59, 28.46, 0.00 +109, -26.11, 51.06, 0.00 +110, -33.64, 74.25, 0.00 +111, -39.61, 97.94, 0.00 +112, -44.31, 122.01, 0.00 +113, -47.92, 146.26, 0.00 +114, -50.63, 170.78, 0.00 +115, -52.57, 195.45, 0.00 +116, -53.80, 220.12, 0.00 +117, -54.43, 244.90, 0.00 +118, -54.50, 269.61, 0.00 +119, -54.06, 294.24, 0.00 +120, -53.18, 318.89, 0.00 +121, -51.86, 343.20, 0.00 +122, -50.17, 367.52, 0.00 +123, -48.12, 391.59, 0.00 +124, -45.70, 414.97, 0.00 +125, -43.01, 438.21, 0.00 +126, -40.06, 461.35, 0.00 +127, -36.86, 484.02, 0.00 +128, -33.42, 506.10, 0.00 +129, -29.77, 527.50, 0.00 +130, -25.96, 548.39, 0.00 +131, -22.00, 568.76, 0.00 +132, -17.91, 588.36, 0.00 +133, -13.73, 607.39, 0.00 +134, -9.47, 625.38, 0.00 +135, -5.15, 642.54, 0.00 +136, -0.81, 659.27, 0.00 +137, 3.53, 674.87, 0.00 +138, 7.85, 689.30, 0.00 +139, 12.15, 703.23, 0.00 +140, 16.38, 716.18, 0.00 +141, 20.53, 727.67, 0.00 +142, 24.59, 738.40, 0.00 +143, 28.55, 748.36, 0.00 +144, 32.38, 757.04, 0.00 +145, 36.06, 764.43, 0.00 +146, 39.61, 771.02, 0.00 +147, 43.00, 776.59, 0.00 +148, 46.22, 780.89, 0.00 +149, 49.29, 784.46, 0.00 +150, 52.17, 786.78, 0.00 +151, 54.87, 788.13, 0.00 +152, 57.40, 788.54, 0.00 +153, 59.77, 788.13, 0.00 +154, 61.95, 786.74, 0.00 +155, 63.49, 778.73, 0.00 +156, 67.16, 797.62, 0.00 +157, 62.16, 716.24, 0.00 +158, 1.28, 14.32, 0.00 +159, -2.99, -32.64, 0.00 +160, 0.35, 3.75, 0.00 +161, -0.04, -0.41, 0.00 +162, 0.11, 1.11, 0.00 +163, 0.13, 1.27, 0.00 +164, 0.00, 0.00, 0.00 +165, -0.22, -2.15, 0.00 +166, -0.53, -5.01, 0.00 +167, -0.91, -8.41, 0.00 +168, -1.35, -12.19, 0.00 +169, -1.83, -16.27, 0.00 +170, -2.34, -20.53, 0.00 +171, -2.88, -24.89, 0.00 +172, -3.44, -29.28, 0.00 +173, -4.01, -33.68, 0.00 +174, -4.59, -37.96, 0.00 +175, -5.16, -42.10, 0.00 +176, -5.72, -46.12, 0.00 +177, -6.27, -49.88, 0.00 +178, -6.79, -53.37, 0.00 +179, -7.28, -56.59, 0.00 +180, -7.74, -59.45, 0.00 +181, -8.15, -61.97, 0.00 +182, -8.52, -64.08, 0.00 +183, -8.82, -65.74, 0.00 +184, -9.08, -67.01, 0.00 +185, -9.26, -67.76, 0.00 +186, -9.37, -67.96, 0.00 +187, -9.39, -67.62, 0.00 +188, -9.32, -66.63, 0.00 +189, -9.16, -65.08, 0.00 +190, -8.90, -62.89, 0.00 +191, -8.54, -59.98, 0.00 +192, -8.06, -56.33, 0.00 +193, -7.45, -51.85, 0.00 +194, -6.73, -46.69, 0.00 +195, -5.85, -40.49, 0.00 +196, -4.79, -33.08, 0.00 +197, -3.55, -24.47, 0.00 +198, -1.91, -13.14, 0.00 diff --git a/TestCases/py_wrapper/updated_moving_frame_NACA12/forces_0.csv.ref b/TestCases/py_wrapper/updated_moving_frame_NACA12/forces_0.csv.ref index 2e4f90bda43..de783b9af84 100644 --- a/TestCases/py_wrapper/updated_moving_frame_NACA12/forces_0.csv.ref +++ b/TestCases/py_wrapper/updated_moving_frame_NACA12/forces_0.csv.ref @@ -1,200 +1,200 @@ -199, -1.01, -0.00, 0.00 -0, -2.98, 20.50, 0.00 -1, -3.99, 27.46, 0.00 -2, -5.22, 36.06, 0.00 -3, -6.10, 42.20, 0.00 -4, -6.90, 47.88, 0.00 -5, -7.54, 52.52, 0.00 -6, -8.08, 56.52, 0.00 -7, -8.50, 59.69, 0.00 -8, -8.79, 62.11, 0.00 -9, -8.98, 63.80, 0.00 -10, -9.06, 64.81, 0.00 -11, -9.06, 65.22, 0.00 -12, -8.95, 64.94, 0.00 -13, -8.75, 64.06, 0.00 -14, -8.48, 62.56, 0.00 -15, -8.12, 60.48, 0.00 -16, -7.70, 57.92, 0.00 -17, -7.21, 54.81, 0.00 -18, -6.66, 51.20, 0.00 -19, -6.07, 47.12, 0.00 -20, -5.42, 42.57, 0.00 -21, -4.73, 37.59, 0.00 -22, -4.00, 32.19, 0.00 -23, -3.23, 26.37, 0.00 -24, -2.44, 20.21, 0.00 -25, -1.63, 13.66, 0.00 -26, -0.79, 6.76, 0.00 -27, 0.05, -0.45, 0.00 -28, 0.91, -7.99, 0.00 -29, 1.77, -15.81, 0.00 -30, 2.64, -23.91, 0.00 -31, 3.50, -32.27, 0.00 -32, 4.36, -40.90, 0.00 -33, 5.20, -49.76, 0.00 -34, 6.03, -58.80, 0.00 -35, 6.84, -68.06, 0.00 -36, 7.63, -77.50, 0.00 -37, 8.37, -87.04, 0.00 -38, 9.09, -96.70, 0.00 -39, 9.76, -106.43, 0.00 -40, 10.37, -116.12, 0.00 -41, 10.91, -125.73, 0.00 -42, 11.39, -135.21, 0.00 -43, 11.77, -144.39, 0.00 -44, 12.05, -153.08, 0.00 -45, 12.21, -161.05, 0.00 -46, 12.22, -167.88, 0.00 -47, 12.01, -172.51, 0.00 -48, 11.61, -175.12, 0.00 -49, 11.25, -179.01, 0.00 -50, 10.12, -170.90, 0.00 -51, 6.24, -112.75, 0.00 -52, 6.61, -128.63, 0.00 -53, 20.84, -441.83, 0.00 -54, 25.65, -599.65, 0.00 -55, 21.77, -570.80, 0.00 -56, 18.66, -560.26, 0.00 -57, 15.64, -554.49, 0.00 -58, 12.51, -546.85, 0.00 -59, 9.28, -537.57, 0.00 -60, 6.01, -527.15, 0.00 -61, 2.70, -515.89, 0.00 -62, -0.62, -503.33, 0.00 -63, -3.92, -489.55, 0.00 -64, -7.19, -475.11, 0.00 -65, -10.39, -459.75, 0.00 -66, -13.50, -443.31, 0.00 -67, -16.49, -426.20, 0.00 -68, -19.33, -408.27, 0.00 -69, -22.00, -389.78, 0.00 -70, -24.49, -370.85, 0.00 -71, -26.76, -351.39, 0.00 -72, -28.78, -331.47, 0.00 -73, -30.52, -311.04, 0.00 -74, -31.97, -290.33, 0.00 -75, -33.11, -269.42, 0.00 -76, -33.86, -248.08, 0.00 -77, -34.24, -226.61, 0.00 -78, -34.22, -205.20, 0.00 -79, -33.74, -183.64, 0.00 -80, -32.78, -162.19, 0.00 -81, -31.29, -140.79, 0.00 -82, -29.21, -119.49, 0.00 -83, -26.48, -98.43, 0.00 -84, -23.02, -77.63, 0.00 -85, -18.75, -57.22, 0.00 -86, -13.54, -37.28, 0.00 -87, -7.23, -17.89, 0.00 -88, 0.32, 0.71, 0.00 -89, 9.35, 18.28, 0.00 -90, 20.02, 34.35, 0.00 -91, 32.65, 48.54, 0.00 -92, 47.34, 59.96, 0.00 -93, 64.24, 67.74, 0.00 -94, 83.11, 70.60, 0.00 -95, 102.71, 66.90, 0.00 -96, 121.38, 55.64, 0.00 -97, 137.08, 37.10, 0.00 -98, 106.89, 14.34, 0.00 -99, 69.93, -0.00, 0.00 -100, 104.81, -14.06, 0.00 -101, 129.39, -35.02, 0.00 -102, 108.98, -49.95, 0.00 -103, 86.90, -56.60, 0.00 -104, 64.97, -55.19, 0.00 -105, 44.71, -47.14, 0.00 -106, 27.08, -34.30, 0.00 -107, 12.21, -18.16, 0.00 -108, -0.23, 0.39, 0.00 -109, -10.50, 20.54, 0.00 -110, -18.96, 41.85, 0.00 -111, -25.82, 63.84, 0.00 -112, -31.39, 86.44, 0.00 -113, -35.84, 109.39, 0.00 -114, -39.33, 132.66, 0.00 -115, -42.01, 156.16, 0.00 -116, -43.95, 179.80, 0.00 -117, -45.26, 203.64, 0.00 -118, -45.98, 227.47, 0.00 -119, -46.16, 251.27, 0.00 -120, -45.89, 275.14, 0.00 -121, -45.14, 298.74, 0.00 -122, -44.00, 322.34, 0.00 -123, -42.49, 345.71, 0.00 -124, -40.58, 368.50, 0.00 -125, -38.39, 391.21, 0.00 -126, -35.94, 413.88, 0.00 -127, -33.21, 436.09, 0.00 -128, -30.22, 457.70, 0.00 -129, -27.02, 478.65, 0.00 -130, -23.62, 499.09, 0.00 -131, -20.08, 519.03, 0.00 -132, -16.39, 538.22, 0.00 -133, -12.59, 556.86, 0.00 -134, -8.70, 574.51, 0.00 -135, -4.74, 591.34, 0.00 -136, -0.75, 607.73, 0.00 -137, 3.26, 623.00, 0.00 -138, 7.26, 637.13, 0.00 -139, 11.24, 650.73, 0.00 -140, 15.17, 663.34, 0.00 -141, 19.03, 674.54, 0.00 -142, 22.81, 684.95, 0.00 -143, 26.50, 694.58, 0.00 -144, 30.06, 702.94, 0.00 -145, 33.49, 710.01, 0.00 -146, 36.79, 716.23, 0.00 -147, 39.95, 721.39, 0.00 -148, 42.93, 725.31, 0.00 -149, 45.77, 728.51, 0.00 -150, 48.44, 730.59, 0.00 -151, 50.61, 726.85, 0.00 -152, 53.86, 739.83, 0.00 -153, 53.31, 702.96, 0.00 -154, 8.15, 103.49, 0.00 -155, -2.34, -28.69, 0.00 -156, 3.10, 36.88, 0.00 -157, 3.81, 43.93, 0.00 -158, 3.88, 43.46, 0.00 -159, 4.18, 45.56, 0.00 -160, 4.24, 45.15, 0.00 -161, 4.13, 42.94, 0.00 -162, 3.90, 39.62, 0.00 -163, 3.56, 35.42, 0.00 -164, 3.14, 30.58, 0.00 -165, 2.64, 25.27, 0.00 -166, 2.09, 19.60, 0.00 -167, 1.48, 13.68, 0.00 -168, 0.84, 7.64, 0.00 -169, 0.17, 1.53, 0.00 -170, -0.52, -4.58, 0.00 -171, -1.23, -10.62, 0.00 -172, -1.94, -16.53, 0.00 -173, -2.66, -22.30, 0.00 -174, -3.37, -27.85, 0.00 -175, -4.06, -33.13, 0.00 -176, -4.74, -38.17, 0.00 -177, -5.39, -42.87, 0.00 -178, -6.01, -47.21, 0.00 -179, -6.59, -51.20, 0.00 -180, -7.13, -54.76, 0.00 -181, -7.62, -57.90, 0.00 -182, -8.05, -60.58, 0.00 -183, -8.42, -62.75, 0.00 -184, -8.74, -64.48, 0.00 -185, -8.97, -65.65, 0.00 -186, -9.13, -66.23, 0.00 -187, -9.20, -66.23, 0.00 -188, -9.17, -65.58, 0.00 -189, -9.06, -64.33, 0.00 -190, -8.84, -62.44, 0.00 -191, -8.52, -59.84, 0.00 -192, -8.08, -56.51, 0.00 -193, -7.52, -52.37, 0.00 -194, -6.86, -47.60, 0.00 -195, -6.05, -41.82, 0.00 -196, -5.16, -35.60, 0.00 -197, -3.91, -26.94, 0.00 -198, -2.89, -19.92, 0.00 +199, -1.02, -0.00, 0.00 +0, -2.05, 14.11, 0.00 +1, -3.63, 25.02, 0.00 +2, -4.85, 33.50, 0.00 +3, -5.88, 40.69, 0.00 +4, -6.73, 46.67, 0.00 +5, -7.41, 51.56, 0.00 +6, -7.97, 55.71, 0.00 +7, -8.40, 58.99, 0.00 +8, -8.71, 61.49, 0.00 +9, -8.90, 63.22, 0.00 +10, -8.98, 64.25, 0.00 +11, -8.98, 64.66, 0.00 +12, -8.87, 64.38, 0.00 +13, -8.68, 63.48, 0.00 +14, -8.39, 61.96, 0.00 +15, -8.03, 59.85, 0.00 +16, -7.61, 57.27, 0.00 +17, -7.12, 54.13, 0.00 +18, -6.57, 50.50, 0.00 +19, -5.97, 46.39, 0.00 +20, -5.32, 41.81, 0.00 +21, -4.63, 36.81, 0.00 +22, -3.90, 31.39, 0.00 +23, -3.13, 25.55, 0.00 +24, -2.34, 19.36, 0.00 +25, -1.53, 12.80, 0.00 +26, -0.69, 5.88, 0.00 +27, 0.16, -1.35, 0.00 +28, 1.02, -8.91, 0.00 +29, 1.88, -16.75, 0.00 +30, 2.74, -24.86, 0.00 +31, 3.61, -33.24, 0.00 +32, 4.46, -41.89, 0.00 +33, 5.31, -50.77, 0.00 +34, 6.14, -59.83, 0.00 +35, 6.95, -69.11, 0.00 +36, 7.73, -78.56, 0.00 +37, 8.48, -88.13, 0.00 +38, 9.19, -97.82, 0.00 +39, 9.86, -107.57, 0.00 +40, 10.47, -117.28, 0.00 +41, 11.01, -126.92, 0.00 +42, 11.49, -136.42, 0.00 +43, 11.87, -145.62, 0.00 +44, 12.15, -154.31, 0.00 +45, 12.30, -162.22, 0.00 +46, 12.31, -169.04, 0.00 +47, 12.11, -173.89, 0.00 +48, 11.66, -175.88, 0.00 +49, 11.13, -177.08, 0.00 +50, 10.20, -172.29, 0.00 +51, 6.86, -123.94, 0.00 +52, 5.97, -116.29, 0.00 +53, 21.77, -461.42, 0.00 +54, 26.12, -610.78, 0.00 +55, 21.89, -573.85, 0.00 +56, 18.71, -561.76, 0.00 +57, 15.72, -557.10, 0.00 +58, 12.57, -549.52, 0.00 +59, 9.33, -540.36, 0.00 +60, 6.04, -530.05, 0.00 +61, 2.71, -518.89, 0.00 +62, -0.62, -506.43, 0.00 +63, -3.95, -492.74, 0.00 +64, -7.24, -478.42, 0.00 +65, -10.47, -463.16, 0.00 +66, -13.60, -446.83, 0.00 +67, -16.63, -429.81, 0.00 +68, -19.50, -411.99, 0.00 +69, -22.22, -393.60, 0.00 +70, -24.75, -374.77, 0.00 +71, -27.06, -355.42, 0.00 +72, -29.14, -335.60, 0.00 +73, -30.94, -315.27, 0.00 +74, -32.45, -294.65, 0.00 +75, -33.65, -273.85, 0.00 +76, -34.49, -252.64, 0.00 +77, -34.95, -231.28, 0.00 +78, -35.02, -209.98, 0.00 +79, -34.64, -188.53, 0.00 +80, -33.79, -167.17, 0.00 +81, -32.42, -145.88, 0.00 +82, -30.48, -124.69, 0.00 +83, -27.91, -103.76, 0.00 +84, -24.63, -83.06, 0.00 +85, -20.55, -62.73, 0.00 +86, -15.56, -42.84, 0.00 +87, -9.50, -23.48, 0.00 +88, -2.17, -4.79, 0.00 +89, 6.62, 12.94, 0.00 +90, 17.16, 29.44, 0.00 +91, 29.73, 44.19, 0.00 +92, 44.58, 56.46, 0.00 +93, 61.71, 65.06, 0.00 +94, 81.10, 68.89, 0.00 +95, 101.88, 66.36, 0.00 +96, 122.09, 55.96, 0.00 +97, 139.13, 37.65, 0.00 +98, 108.84, 14.60, 0.00 +99, 71.28, -0.00, 0.00 +100, 106.29, -14.26, 0.00 +101, 130.33, -35.27, 0.00 +102, 108.14, -49.57, 0.00 +103, 84.37, -54.95, 0.00 +104, 61.43, -52.19, 0.00 +105, 40.94, -43.16, 0.00 +106, 23.22, -29.41, 0.00 +107, 8.42, -12.52, 0.00 +108, -3.78, 6.48, 0.00 +109, -13.76, 26.90, 0.00 +110, -21.85, 48.23, 0.00 +111, -28.39, 70.19, 0.00 +112, -33.65, 92.65, 0.00 +113, -37.82, 115.44, 0.00 +114, -41.08, 138.55, 0.00 +115, -43.55, 161.90, 0.00 +116, -45.31, 185.37, 0.00 +117, -46.46, 209.03, 0.00 +118, -47.03, 232.69, 0.00 +119, -47.10, 256.34, 0.00 +120, -46.71, 280.06, 0.00 +121, -45.86, 303.51, 0.00 +122, -44.63, 326.98, 0.00 +123, -43.04, 350.21, 0.00 +124, -41.06, 372.86, 0.00 +125, -38.81, 395.46, 0.00 +126, -36.30, 418.02, 0.00 +127, -33.51, 440.10, 0.00 +128, -30.48, 461.60, 0.00 +129, -27.23, 482.42, 0.00 +130, -23.80, 502.74, 0.00 +131, -20.21, 522.54, 0.00 +132, -16.49, 541.62, 0.00 +133, -12.66, 560.14, 0.00 +134, -8.74, 577.66, 0.00 +135, -4.77, 594.37, 0.00 +136, -0.75, 610.64, 0.00 +137, 3.27, 625.80, 0.00 +138, 7.29, 639.80, 0.00 +139, 11.28, 653.28, 0.00 +140, 15.23, 665.78, 0.00 +141, 19.09, 676.85, 0.00 +142, 22.88, 687.16, 0.00 +143, 26.58, 696.67, 0.00 +144, 30.15, 704.91, 0.00 +145, 33.58, 711.87, 0.00 +146, 36.88, 717.99, 0.00 +147, 40.04, 723.07, 0.00 +148, 43.03, 726.92, 0.00 +149, 45.86, 729.95, 0.00 +150, 48.47, 730.99, 0.00 +151, 50.57, 726.34, 0.00 +152, 54.71, 751.52, 0.00 +153, 52.81, 696.43, 0.00 +154, 5.64, 71.68, 0.00 +155, -0.65, -7.95, 0.00 +156, 3.46, 41.08, 0.00 +157, 3.63, 41.77, 0.00 +158, 4.01, 44.95, 0.00 +159, 4.28, 46.74, 0.00 +160, 4.32, 46.00, 0.00 +161, 4.21, 43.77, 0.00 +162, 3.98, 40.43, 0.00 +163, 3.64, 36.21, 0.00 +164, 3.22, 31.35, 0.00 +165, 2.72, 26.01, 0.00 +166, 2.16, 20.31, 0.00 +167, 1.56, 14.37, 0.00 +168, 0.92, 8.30, 0.00 +169, 0.24, 2.16, 0.00 +170, -0.45, -3.98, 0.00 +171, -1.16, -10.05, 0.00 +172, -1.88, -15.99, 0.00 +173, -2.60, -21.79, 0.00 +174, -3.31, -27.36, 0.00 +175, -4.00, -32.68, 0.00 +176, -4.69, -37.76, 0.00 +177, -5.34, -42.49, 0.00 +178, -5.96, -46.87, 0.00 +179, -6.55, -50.90, 0.00 +180, -7.09, -54.49, 0.00 +181, -7.59, -57.67, 0.00 +182, -8.03, -60.38, 0.00 +183, -8.40, -62.58, 0.00 +184, -8.72, -64.34, 0.00 +185, -8.96, -65.53, 0.00 +186, -9.11, -66.13, 0.00 +187, -9.18, -66.13, 0.00 +188, -9.15, -65.46, 0.00 +189, -9.04, -64.19, 0.00 +190, -8.81, -62.24, 0.00 +191, -8.48, -59.55, 0.00 +192, -8.02, -56.09, 0.00 +193, -7.44, -51.78, 0.00 +194, -6.74, -46.74, 0.00 +195, -5.87, -40.64, 0.00 +196, -4.83, -33.31, 0.00 +197, -3.59, -24.74, 0.00 +198, -1.96, -13.51, 0.00 diff --git a/TestCases/rans/flatplate/turb_SST_flatplate_compressibility_Sarkar.cfg b/TestCases/rans/flatplate/turb_SST_flatplate_compressibility_Sarkar.cfg deleted file mode 100644 index 9630355c8d5..00000000000 --- a/TestCases/rans/flatplate/turb_SST_flatplate_compressibility_Sarkar.cfg +++ /dev/null @@ -1,150 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% SU2 configuration file % -% Case description: Turbulent flow over flat plate(2DZPH) % -% Author: Sunoh. Kang % -% Institution: Pusan National University % -% Date: 2024.04.30 % -% File Version 8.0.1 "Harrier" % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% -% -SOLVER= RANS -KIND_TURB_MODEL= SST -SST_OPTIONS= V2003m, COMPRESSIBILITY-SARKAR -MATH_PROBLEM= DIRECT -RESTART_SOL= NO - -% ------------------------ COMPRESSIBLE FREE-STREAM DEFINITION ----------------% -% -MACH_NUMBER= 5.0 -AOA= 0.000 -INIT_OPTION= TD_CONDITIONS -FREESTREAM_OPTION= TEMPERATURE_FS -FREESTREAM_TEMPERATURE= 300.3333 -FREESTREAM_PRESSURE= 13753.90558 -FREESTREAM_TURBULENCEINTENSITY = 0.00002 -FREESTREAM_TURB2LAMVISCRATIO = 0.009 -REF_DIMENSIONALIZATION= DIMENSIONAL -REYNOLDS_NUMBER= 15E6 - -% ---- IDEAL GAS, POLYTPOPIC, VAN DER WALLS AND PENG ROBINSOPN CNSTANTS ------ % -% -FLUID_MODEL= IDEAL_GAS -GAMMA_VALUE= 1.4 -GAS_CONSTANT= 287.058 -ACENTRIC_FACTOR= 0.035 -SPECIFIC_HEAT_CP= 1004.703 -THERMAL_EXPANSION_COEFF= 0.00347 -MOLECULAR_WEIGHT= 28.96 - -% --------------------------- VISCOSITY MODEL ---------------------------------% -% - -VISCOSITY_MODEL= SUTHERLAND -MU_REF= 1.716E-5 -MU_T_REF= 273.15 -SUTHERLAND_CONSTANT= 110.4 - -% ------------------------ THERMAL CONDUCTIVITY MODEL -------------------------% -% - -CONDUCTIVITY_MODEL= CONSTANT_PRANDTL -PRANDTL_LAM= 0.72 -TURBULENT_CONDUCTIVITY_MODEL= CONSTANT_PRANDTL_TURB -PRANDTL_TURB= 0.9 - -% ---------------------- REFERENCE VALUE DEFINITION ---------------------------% -% - -REF_ORIGIN_MOMENT_X = 0.00 -REF_ORIGIN_MOMENT_Y = 0.00 -REF_ORIGIN_MOMENT_Z = 0.00 -REF_LENGTH= 1.0 -REF_AREA= 1.0 - -% -------------------- BOUNDARY CONDITION DEFINITION --------------------------% -% - -MARKER_PLOTTING = ( wall ) -MARKER_SUPERSONIC_INLET= ( inlet, 300.3333 , 13753.90558 , 1737.082226 , 0.0 , 0.0 ) -MARKER_FAR= ( farfield ) -MARKER_SYM= ( symmetry ) -MARKER_SUPERSONIC_OUTLET= (outlet, 34384.76396) -MARKER_ISOTHERMAL= ( wall, 327.36297) - -% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% -% - -NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 0.5 -CFL_ADAPT= YES -CFL_ADAPT_PARAM= ( 0.1, 1.5, 0.5, 50.0 ) - -% --------- SLOPE LIMITER DEFINITION, DISSIPATION SENSOR DEFINITION -----------------% -% - -MUSCL_FLOW= YES -SLOPE_LIMITER_FLOW= VENKATAKRISHNAN_WANG -SLOPE_LIMITER_TURB= NONE -VENKAT_LIMITER_COEFF= 0.05 -JST_SENSOR_COEFF= (0.5, 0.02) - -% ------------------------ LINEAR SOLVER DEFINITION ---------------------------% -% - -LINEAR_SOLVER= FGMRES -LINEAR_SOLVER_PREC= LU_SGS -LINEAR_SOLVER_ERROR= 1E-6 -LINEAR_SOLVER_ITER= 5 - -% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% -% - -CONV_NUM_METHOD_FLOW= AUSM -TIME_DISCRE_FLOW= EULER_IMPLICIT - -% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------% -% - -CONV_NUM_METHOD_TURB= SCALAR_UPWIND -TIME_DISCRE_TURB= EULER_IMPLICIT - -% ------------------------- SCREEN/HISTORY VOLUME OUTPUT --------------------------% -% - -SCREEN_OUTPUT= (INNER_ITER, RMS_DENSITY, RMS_MOMENTUM-X, RMS_MOMENTUM-Y, RMS_ENERGY, RMS_TKE, RMS_DISSIPATION) -SCREEN_WRT_FREQ_INNER= 1 -SCREEN_WRT_FREQ_OUTER= 1 -SCREEN_WRT_FREQ_TIME= 1 -HISTORY_WRT_FREQ_INNER= 1 -HISTORY_WRT_FREQ_OUTER= 1 -HISTORY_WRT_FREQ_TIME= 1 -OUTPUT_WRT_FREQ= 1000 - -% ------------------------- INPUT/OUTPUT FILE INFORMATION --------------------------% -% - -MESH_FILENAME= mesh_flatplate_turb_137x97.su2 -MESH_FORMAT= SU2 -MESH_OUT_FILENAME= mesh_out.su2 -SOLUTION_FILENAME= restart_flow.dat -SOLUTION_ADJ_FILENAME= solution_adj.dat -OUTPUT_FILES= (RESTART, PARAVIEW, SURFACE_PARAVIEW, TECPLOT, SURFACE_TECPLOT, CSV, SURFACE_CSV ) -CONV_FILENAME= history -BREAKDOWN_FILENAME= forces_breakdown.dat -RESTART_FILENAME= restart_flow.dat -RESTART_ADJ_FILENAME= restart_adj.dat - -% ------------------------------- SOLVER CONTROL ------------------------------% -% - -ITER= 100 -OUTER_ITER= 1 -TIME_ITER= 100 -CONV_RESIDUAL_MINVAL= -14 -CONV_STARTITER= 10 -CONV_CAUCHY_ELEMS= 100 -CONV_CAUCHY_EPS= 1E-10 diff --git a/TestCases/rans/flatplate/turb_SST_flatplate_compressibility_Wilcox.cfg b/TestCases/rans/flatplate/turb_SST_flatplate_compressibility_Wilcox.cfg deleted file mode 100644 index bec9c121e3a..00000000000 --- a/TestCases/rans/flatplate/turb_SST_flatplate_compressibility_Wilcox.cfg +++ /dev/null @@ -1,150 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% SU2 configuration file % -% Case description: Turbulent flow over flat plate(2DZPH) % -% Author: Sunoh. Kang % -% Institution: Pusan National University % -% Date: 2024.04.30 % -% File Version 8.0.1 "Harrier" % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% -% -SOLVER= RANS -KIND_TURB_MODEL= SST -SST_OPTIONS= V2003m, COMPRESSIBILITY-WILCOX -MATH_PROBLEM= DIRECT -RESTART_SOL= NO - -% ------------------------ COMPRESSIBLE FREE-STREAM DEFINITION ----------------% -% -MACH_NUMBER= 5.0 -AOA= 0.000 -INIT_OPTION= TD_CONDITIONS -FREESTREAM_OPTION= TEMPERATURE_FS -FREESTREAM_TEMPERATURE= 300.3333 -FREESTREAM_PRESSURE= 13753.90558 -FREESTREAM_TURBULENCEINTENSITY = 0.00002 -FREESTREAM_TURB2LAMVISCRATIO = 0.009 -REF_DIMENSIONALIZATION= DIMENSIONAL -REYNOLDS_NUMBER= 15E6 - -% ---- IDEAL GAS, POLYTPOPIC, VAN DER WALLS AND PENG ROBINSOPN CNSTANTS ------ % -% -FLUID_MODEL= IDEAL_GAS -GAMMA_VALUE= 1.4 -GAS_CONSTANT= 287.058 -ACENTRIC_FACTOR= 0.035 -SPECIFIC_HEAT_CP= 1004.703 -THERMAL_EXPANSION_COEFF= 0.00347 -MOLECULAR_WEIGHT= 28.96 - -% --------------------------- VISCOSITY MODEL ---------------------------------% -% - -VISCOSITY_MODEL= SUTHERLAND -MU_REF= 1.716E-5 -MU_T_REF= 273.15 -SUTHERLAND_CONSTANT= 110.4 - -% ------------------------ THERMAL CONDUCTIVITY MODEL -------------------------% -% - -CONDUCTIVITY_MODEL= CONSTANT_PRANDTL -PRANDTL_LAM= 0.72 -TURBULENT_CONDUCTIVITY_MODEL= CONSTANT_PRANDTL_TURB -PRANDTL_TURB= 0.9 - -% ---------------------- REFERENCE VALUE DEFINITION ---------------------------% -% - -REF_ORIGIN_MOMENT_X = 0.00 -REF_ORIGIN_MOMENT_Y = 0.00 -REF_ORIGIN_MOMENT_Z = 0.00 -REF_LENGTH= 1.0 -REF_AREA= 1.0 - -% -------------------- BOUNDARY CONDITION DEFINITION --------------------------% -% - -MARKER_PLOTTING = ( wall ) -MARKER_SUPERSONIC_INLET= ( inlet, 300.3333 , 13753.90558 , 1737.082226 , 0.0 , 0.0 ) -MARKER_FAR= ( farfield ) -MARKER_SYM= ( symmetry ) -MARKER_SUPERSONIC_OUTLET= (outlet, 34384.76396) -MARKER_ISOTHERMAL= ( wall, 327.36297) - -% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% -% - -NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 0.5 -CFL_ADAPT= YES -CFL_ADAPT_PARAM= ( 0.1, 1.5, 0.5, 50.0 ) - -% --------- SLOPE LIMITER DEFINITION, DISSIPATION SENSOR DEFINITION -----------------% -% - -MUSCL_FLOW= YES -SLOPE_LIMITER_FLOW= VENKATAKRISHNAN_WANG -SLOPE_LIMITER_TURB= NONE -VENKAT_LIMITER_COEFF= 0.05 -JST_SENSOR_COEFF= (0.5, 0.02) - -% ------------------------ LINEAR SOLVER DEFINITION ---------------------------% -% - -LINEAR_SOLVER= FGMRES -LINEAR_SOLVER_PREC= LU_SGS -LINEAR_SOLVER_ERROR= 1E-6 -LINEAR_SOLVER_ITER= 5 - -% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% -% - -CONV_NUM_METHOD_FLOW= AUSM -TIME_DISCRE_FLOW= EULER_IMPLICIT - -% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------% -% - -CONV_NUM_METHOD_TURB= SCALAR_UPWIND -TIME_DISCRE_TURB= EULER_IMPLICIT - -% ------------------------- SCREEN/HISTORY VOLUME OUTPUT --------------------------% -% - -SCREEN_OUTPUT= (INNER_ITER, RMS_DENSITY, RMS_MOMENTUM-X, RMS_MOMENTUM-Y, RMS_ENERGY, RMS_TKE, RMS_DISSIPATION) -SCREEN_WRT_FREQ_INNER= 1 -SCREEN_WRT_FREQ_OUTER= 1 -SCREEN_WRT_FREQ_TIME= 1 -HISTORY_WRT_FREQ_INNER= 1 -HISTORY_WRT_FREQ_OUTER= 1 -HISTORY_WRT_FREQ_TIME= 1 -OUTPUT_WRT_FREQ= 1000 - -% ------------------------- INPUT/OUTPUT FILE INFORMATION --------------------------% -% - -MESH_FILENAME= mesh_flatplate_turb_137x97.su2 -MESH_FORMAT= SU2 -MESH_OUT_FILENAME= mesh_out.su2 -SOLUTION_FILENAME= restart_flow.dat -SOLUTION_ADJ_FILENAME= solution_adj.dat -OUTPUT_FILES= (RESTART, PARAVIEW, SURFACE_PARAVIEW, TECPLOT, SURFACE_TECPLOT, CSV, SURFACE_CSV ) -CONV_FILENAME= history -BREAKDOWN_FILENAME= forces_breakdown.dat -RESTART_FILENAME= restart_flow.dat -RESTART_ADJ_FILENAME= restart_adj.dat - -% ------------------------------- SOLVER CONTROL ------------------------------% -% - -ITER= 100 -OUTER_ITER= 1 -TIME_ITER= 100 -CONV_RESIDUAL_MINVAL= -14 -CONV_STARTITER= 10 -CONV_CAUCHY_ELEMS= 100 -CONV_CAUCHY_EPS= 1E-10 diff --git a/TestCases/rotating/naca0012/rot_NACA0012.cfg b/TestCases/rotating/naca0012/rot_NACA0012.cfg index 35c932c33b5..a103c5fbcf6 100644 --- a/TestCases/rotating/naca0012/rot_NACA0012.cfg +++ b/TestCases/rotating/naca0012/rot_NACA0012.cfg @@ -131,7 +131,7 @@ VOLUME_ADJ_FILENAME= adjoint GRAD_OBJFUNC_FILENAME= of_grad.dat SURFACE_FILENAME= surface_flow SURFACE_ADJ_FILENAME= surface_adjoint -OUTPUT_WRT_FREQ= 100 +OUTPUT_WRT_FREQ= 1 % --------------------- OPTIMAL SHAPE DESIGN DEFINITION -----------------------% % diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 080b41053b7..fcdacb032a7 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -64,7 +64,7 @@ def main(): invwedge.cfg_dir = "nonequilibrium/invwedge" invwedge.cfg_file = "invwedge_ausm.cfg" invwedge.test_iter = 10 - invwedge.test_vals = [-1.073699, -1.598462, -18.299911, -18.627322, -18.573334, 2.241760, 1.868575, 5.286072, 0.843741] + invwedge.test_vals = [-1.046323, -1.571086, -18.301251, -18.628639, -18.574676, 2.271778, 1.875687, 5.315769, 0.870008] invwedge.test_vals_aarch64 = [-1.046323, -1.571086, -18.301361, -18.628744, -18.574788, 2.271778, 1.875687, 5.315769, 0.870008] test_list.append(invwedge) @@ -73,7 +73,7 @@ def main(): visc_cone.cfg_dir = "nonequilibrium/visc_wedge" visc_cone.cfg_file = "axi_visccone.cfg" visc_cone.test_iter = 10 - visc_cone.test_vals = [-5.215239, -5.739373, -20.560910, -20.517094, -20.406632, 1.262779, -3.205484, -0.015695, 0.093205, 32641.000000] + visc_cone.test_vals = [-5.215236, -5.739371, -20.556662, -20.517023, -20.436970, 1.262783, -3.205463, -0.015695, 0.093205, 32656.000000] visc_cone.test_vals_aarch64 = [-5.215229, -5.739368, -20.556662, -20.517022, -20.437459, 1.262784, -3.205455, -0.015696, 0.093207, 32656.000000] test_list.append(visc_cone) @@ -93,7 +93,7 @@ def main(): channel.cfg_dir = "euler/channel" channel.cfg_file = "inv_channel_RK.cfg" channel.test_iter = 10 - channel.test_vals = [-2.691364, 2.781660, -0.009405, 0.011874] + channel.test_vals = [-2.475872, 3.046370, -0.203974, 0.036018] test_list.append(channel) # NACA0012 @@ -101,7 +101,7 @@ def main(): naca0012.cfg_dir = "euler/naca0012" naca0012.cfg_file = "inv_NACA0012_Roe.cfg" naca0012.test_iter = 20 - naca0012.test_vals = [-4.444941, -3.941038, 0.318998, 0.022365] + naca0012.test_vals = [-4.023999, -3.515034, 0.339426, 0.022217] test_list.append(naca0012) # Supersonic wedge @@ -109,7 +109,7 @@ def main(): wedge.cfg_dir = "euler/wedge" wedge.cfg_file = "inv_wedge_HLLC.cfg" wedge.test_iter = 20 - wedge.test_vals = [-1.368091, 4.302736, -0.243433, 0.042906] + wedge.test_vals = [-0.942862, 4.784581, -0.208106, 0.036665] test_list.append(wedge) # ONERA M6 Wing @@ -117,7 +117,7 @@ def main(): oneram6.cfg_dir = "euler/oneram6" oneram6.cfg_file = "inv_ONERAM6.cfg" oneram6.test_iter = 10 - oneram6.test_vals = [-11.510606, -10.980023, 0.280800, 0.008623] + oneram6.test_vals = [-9.279396, -8.697739, 0.281703, 0.011821] oneram6.timeout = 9600 test_list.append(oneram6) @@ -126,7 +126,7 @@ def main(): fixedCL_naca0012.cfg_dir = "fixed_cl/naca0012" fixedCL_naca0012.cfg_file = "inv_NACA0012.cfg" fixedCL_naca0012.test_iter = 10 - fixedCL_naca0012.test_vals = [-3.848561, 1.688373, 0.301145, 0.019489] + fixedCL_naca0012.test_vals = [-7.382410, -1.879887, 0.300000, 0.019471] test_list.append(fixedCL_naca0012) # Polar sweep of the inviscid NACA0012 @@ -135,8 +135,8 @@ def main(): polar_naca0012.cfg_file = "inv_NACA0012.cfg" polar_naca0012.polar = True polar_naca0012.test_iter = 10 - polar_naca0012.test_vals = [-1.067859, 4.397227, 0.000060, 0.031134] - polar_naca0012.test_vals_aarch64 = [-1.063447, 4.401847, 0.000291, 0.031696] + polar_naca0012.test_vals = [-1.243326, 4.224483, 0.016432, 0.016145] + polar_naca0012.test_vals_aarch64 = [-1.811046, 3.612379, 0.012330, 0.009194] polar_naca0012.command = TestCase.Command(exec = "compute_polar.py", param = "-n 1 -i 11") # flaky test on arm64 polar_naca0012.enabled_on_cpu_arch = ["x86_64"] @@ -147,7 +147,7 @@ def main(): bluntbody.cfg_dir = "euler/bluntbody" bluntbody.cfg_file = "blunt.cfg" bluntbody.test_iter = 20 - bluntbody.test_vals = [0.493297, 6.857373, -0.000026, 1.791394] + bluntbody.test_vals = [0.540009, 6.916653, -0.000000, 1.868975] test_list.append(bluntbody) ########################## @@ -165,8 +165,8 @@ def main(): flatplate = TestCase('flatplate') flatplate.cfg_dir = "navierstokes/flatplate" flatplate.cfg_file = "lam_flatplate.cfg" - flatplate.test_iter = 20 - flatplate.test_vals = [-5.122306, 0.357174, 0.001311, 0.028230, 2.361600, -2.333300, -2.629100, -2.629100] + flatplate.test_iter = 100 + flatplate.test_vals = [-9.856258, -4.371983, 0.001112, 0.036277, 2.361500, -2.325300, -2.279500, -2.279500] test_list.append(flatplate) # Laminar cylinder (steady) @@ -174,7 +174,7 @@ def main(): cylinder.cfg_dir = "navierstokes/cylinder" cylinder.cfg_file = "lam_cylinder.cfg" cylinder.test_iter = 25 - cylinder.test_vals = [-8.363068, -2.882163, -0.017777, 1.607222, -0.010064] + cylinder.test_vals = [-6.765430, -1.297426, 0.019508, 0.310015, 0.123250] test_list.append(cylinder) # Laminar cylinder (low Mach correction) @@ -182,7 +182,7 @@ def main(): cylinder_lowmach.cfg_dir = "navierstokes/cylinder" cylinder_lowmach.cfg_file = "cylinder_lowmach.cfg" cylinder_lowmach.test_iter = 25 - cylinder_lowmach.test_vals = [-6.830989, -1.368842, -0.143838, 73.962440, 0.002454] + cylinder_lowmach.test_vals = [-6.850123, -1.388088, -0.056090, 108.140176, 0.007983] test_list.append(cylinder_lowmach) # 2D Poiseuille flow (body force driven with periodic inlet / outlet) @@ -198,8 +198,8 @@ def main(): poiseuille_profile.cfg_dir = "navierstokes/poiseuille" poiseuille_profile.cfg_file = "profile_poiseuille.cfg" poiseuille_profile.test_iter = 10 - poiseuille_profile.test_vals = [-12.485974, -7.612341, -0.000000, 2.085796] - poiseuille_profile.test_vals_aarch64 = [-12.485974, -7.612341, -0.000000, 2.085796] + poiseuille_profile.test_vals = [-12.494681, -7.711642, -0.000000, 2.085796] + poiseuille_profile.test_vals_aarch64 = [-12.494684, -7.711379, -0.000000, 2.085796] #last 4 columns test_list.append(poiseuille_profile) ########################## @@ -242,7 +242,7 @@ def main(): turb_flatplate.cfg_dir = "rans/flatplate" turb_flatplate.cfg_file = "turb_SA_flatplate.cfg" turb_flatplate.test_iter = 20 - turb_flatplate.test_vals = [-4.156553, -6.736064, -0.176184, 0.057478] + turb_flatplate.test_vals = [-4.157358, -6.736289, -0.176258, 0.057431] test_list.append(turb_flatplate) # FLAT PLATE, WALL FUNCTIONS, COMPRESSIBLE SST @@ -250,7 +250,7 @@ def main(): turb_wallfunction_flatplate_sst.cfg_dir = "wallfunctions/flatplate/compressible_SST" turb_wallfunction_flatplate_sst.cfg_file = "turb_SST_flatplate.cfg" turb_wallfunction_flatplate_sst.test_iter = 10 - turb_wallfunction_flatplate_sst.test_vals = [-4.177397, -1.880811, -1.943377, 1.263787, -1.254740, 1.538892, 10.000000, -2.097623, 0.074673, 0.002932] + turb_wallfunction_flatplate_sst.test_vals = [-4.181412, -1.864638, -1.966031, 1.259921, -1.487159, 1.544166, 10.000000, -2.130777, 0.073950, 0.002971] test_list.append(turb_wallfunction_flatplate_sst) # FLAT PLATE, WALL FUNCTIONS, COMPRESSIBLE SA @@ -258,7 +258,7 @@ def main(): turb_wallfunction_flatplate_sa.cfg_dir = "wallfunctions/flatplate/compressible_SA" turb_wallfunction_flatplate_sa.cfg_file = "turb_SA_flatplate.cfg" turb_wallfunction_flatplate_sa.test_iter = 10 - turb_wallfunction_flatplate_sa.test_vals = [-4.414833, -2.031596, -2.120806, 1.007586, -5.386444, 10.000000, -1.635112, 0.068983, 0.002640] + turb_wallfunction_flatplate_sa.test_vals = [-4.435719, -2.044696, -2.114266, 0.980115, -5.393813, 10.000000, -1.589802, 0.069744, 0.002686] test_list.append(turb_wallfunction_flatplate_sa) # ONERA M6 Wing @@ -266,7 +266,7 @@ def main(): turb_oneram6.cfg_dir = "rans/oneram6" turb_oneram6.cfg_file = "turb_ONERAM6.cfg" turb_oneram6.test_iter = 10 - turb_oneram6.test_vals = [-2.392867, -6.689823, 0.230746, 0.158811, -33786.000000] + turb_oneram6.test_vals = [-2.388841, -6.689427, 0.230321, 0.157640, -32539.000000] turb_oneram6.timeout = 3200 test_list.append(turb_oneram6) @@ -335,7 +335,7 @@ def main(): axi_rans_air_nozzle_restart.cfg_dir = "axisymmetric_rans/air_nozzle" axi_rans_air_nozzle_restart.cfg_file = "air_nozzle_restart.cfg" axi_rans_air_nozzle_restart.test_iter = 10 - axi_rans_air_nozzle_restart.test_vals = [-12.151701, -6.605756, -9.188910, -4.516059, -2019.700000] + axi_rans_air_nozzle_restart.test_vals = [-12.063377, -7.005051, -8.705733, -4.036815, -2019.8] axi_rans_air_nozzle_restart.test_vals_aarch64 = [-12.063354, -7.004772, -8.705740, -4.036824, -2019.800000] axi_rans_air_nozzle_restart.tol = 0.0001 test_list.append(axi_rans_air_nozzle_restart) @@ -371,7 +371,7 @@ def main(): inc_euler_naca0012.cfg_dir = "incomp_euler/naca0012" inc_euler_naca0012.cfg_file = "incomp_NACA0012.cfg" inc_euler_naca0012.test_iter = 20 - inc_euler_naca0012.test_vals = [-7.128795, -6.375403, 0.531980, 0.008467] + inc_euler_naca0012.test_vals = [-4.858287, -3.810487, 0.491850, 0.007002] test_list.append(inc_euler_naca0012) # C-D nozzle with pressure inlet and mass flow outlet @@ -379,7 +379,7 @@ def main(): inc_nozzle.cfg_dir = "incomp_euler/nozzle" inc_nozzle.cfg_file = "inv_nozzle.cfg" inc_nozzle.test_iter = 20 - inc_nozzle.test_vals = [-6.363763, -5.566528, -0.005348, 0.126610] + inc_nozzle.test_vals = [-5.971283, -4.911145, -0.000201, 0.121631] test_list.append(inc_nozzle) ############################# @@ -422,7 +422,7 @@ def main(): inc_lam_bend.cfg_dir = "incomp_navierstokes/bend" inc_lam_bend.cfg_file = "lam_bend.cfg" inc_lam_bend.test_iter = 10 - inc_lam_bend.test_vals = [-3.558881, -3.234611, -0.016265, 1.024052] + inc_lam_bend.test_vals = [-3.455147, -3.082194, -0.018579, 1.169947] test_list.append(inc_lam_bend) ############################ @@ -457,7 +457,7 @@ def main(): inc_turb_wallfunction_flatplate_sst.cfg_dir = "wallfunctions/flatplate/incompressible_SST" inc_turb_wallfunction_flatplate_sst.cfg_file = "turb_SST_flatplate.cfg" inc_turb_wallfunction_flatplate_sst.test_iter = 10 - inc_turb_wallfunction_flatplate_sst.test_vals = [-6.507362, -5.693894, -6.434063, -4.223774, -7.008049, -1.954102, 10.000000, -3.047554, 0.001081, 0.003644, 0.618140] + inc_turb_wallfunction_flatplate_sst.test_vals = [-6.560775, -5.700721, -6.304284, -4.230488, -7.179831, -1.956057, 10.000000, -2.918240, 0.000887, 0.003680, 0.518450] test_list.append(inc_turb_wallfunction_flatplate_sst) # FLAT PLATE, WALL FUNCTIONS, INCOMPRESSIBLE SA @@ -465,7 +465,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.521493, -5.710967, -6.424313, -4.224459, -9.586823, 10.000000, -3.054800, 0.000999, 0.003759] + inc_turb_wallfunction_flatplate_sa.test_vals = [-6.561303, -5.718581, -6.306403, -4.230225, -9.586904, 10.000000, -2.927392, 0.000858, 0.003792] test_list.append(inc_turb_wallfunction_flatplate_sa) #################### @@ -558,7 +558,7 @@ def main(): schubauer_klebanoff_transition.cfg_dir = "transition/Schubauer_Klebanoff" schubauer_klebanoff_transition.cfg_file = "transitional_BC_model_ConfigFile.cfg" schubauer_klebanoff_transition.test_iter = 10 - schubauer_klebanoff_transition.test_vals = [-8.087369, -13.241874, 0.000055, 0.007992] + schubauer_klebanoff_transition.test_vals = [-8.029786, -13.240213, 0.000053, 0.007986] test_list.append(schubauer_klebanoff_transition) ##################################### @@ -577,7 +577,7 @@ def main(): contadj_naca0012.cfg_dir = "cont_adj_euler/naca0012" contadj_naca0012.cfg_file = "inv_NACA0012.cfg" contadj_naca0012.test_iter = 5 - contadj_naca0012.test_vals = [-9.748339, -15.067997, -0.726250, 0.020280] + contadj_naca0012.test_vals = [-9.289565, -14.563859, 0.300920, 0.019552] contadj_naca0012.tol = 0.001 test_list.append(contadj_naca0012) @@ -586,7 +586,7 @@ def main(): contadj_oneram6.cfg_dir = "cont_adj_euler/oneram6" contadj_oneram6.cfg_file = "inv_ONERAM6.cfg" contadj_oneram6.test_iter = 10 - contadj_oneram6.test_vals = [-12.034680, -12.592674, -1.086100, 0.007556] + contadj_oneram6.test_vals = [-12.133160, -12.706697, 0.685900, 0.007594] test_list.append(contadj_oneram6) # Inviscid WEDGE: tests averaged outflow total pressure adjoint @@ -594,7 +594,7 @@ def main(): contadj_wedge.cfg_dir = "cont_adj_euler/wedge" contadj_wedge.cfg_file = "inv_wedge_ROE.cfg" contadj_wedge.test_iter = 10 - contadj_wedge.test_vals = [2.872064, -2.756210, 1010800.000000, 0.000000] + contadj_wedge.test_vals = [2.872691, -2.755572, 853000.000000, 0.000000] test_list.append(contadj_wedge) # Inviscid fixed CL NACA0012 @@ -602,7 +602,7 @@ def main(): contadj_fixedCL_naca0012.cfg_dir = "fixed_cl/naca0012" contadj_fixedCL_naca0012.cfg_file = "inv_NACA0012_ContAdj.cfg" contadj_fixedCL_naca0012.test_iter = 100 - contadj_fixedCL_naca0012.test_vals = [0.755070, -4.794630, -0.525290, -0.000238] + contadj_fixedCL_naca0012.test_vals = [0.293213, -5.201710, 0.360590, -0.000022] test_list.append(contadj_fixedCL_naca0012) ################################### @@ -725,7 +725,7 @@ def main(): harmonic_balance.cfg_dir = "harmonic_balance" harmonic_balance.cfg_file = "HB.cfg" harmonic_balance.test_iter = 25 - harmonic_balance.test_vals = [-1.554985, 0.831796, 0.935729, 3.960210] + harmonic_balance.test_vals = [-1.589739, 0.790169, 0.937053, 3.922579] test_list.append(harmonic_balance) # Turbulent pitching NACA 64a010 airfoil @@ -745,7 +745,7 @@ def main(): rot_naca0012.cfg_dir = "rotating/naca0012" rot_naca0012.cfg_file = "rot_NACA0012.cfg" rot_naca0012.test_iter = 25 - rot_naca0012.test_vals = [-2.738864, 2.811401, -0.080279, 0.002160] + rot_naca0012.test_vals = [-2.688979, 2.857521, -0.079219, 0.002135] test_list.append(rot_naca0012) # Lid-driven cavity @@ -753,7 +753,7 @@ def main(): cavity.cfg_dir = "moving_wall/cavity" cavity.cfg_file = "lam_cavity.cfg" cavity.test_iter = 25 - cavity.test_vals = [-5.627868, -0.164405, 0.053283, 2.545817] + cavity.test_vals = [ -5.627868, -0.164405, 0.053283, 2.545817] test_list.append(cavity) # Spinning cylinder @@ -782,7 +782,7 @@ def main(): sine_gust.cfg_dir = "gust" sine_gust.cfg_file = "inv_gust_NACA0012.cfg" sine_gust.test_iter = 5 - sine_gust.test_vals = [-1.977514, 3.481817, -0.010465, -0.007859] + sine_gust.test_vals = [-1.977520, 3.481804, -0.012277, -0.007309] sine_gust.unsteady = True test_list.append(sine_gust) @@ -791,7 +791,7 @@ def main(): aeroelastic.cfg_dir = "aeroelastic" aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg" aeroelastic.test_iter = 2 - aeroelastic.test_vals = [0.074291, 0.027620, -0.001641, -0.000128] + aeroelastic.test_vals = [0.074836, 0.033102, -0.001650, -0.000127] aeroelastic.unsteady = True test_list.append(aeroelastic) @@ -800,7 +800,7 @@ def main(): ddes_flatplate.cfg_dir = "ddes/flatplate" ddes_flatplate.cfg_file = "ddes_flatplate.cfg" ddes_flatplate.test_iter = 10 - ddes_flatplate.test_vals = [-2.714785, -5.882680, -0.215041, 0.023758, -617.450000] + ddes_flatplate.test_vals = [-2.714757, -5.882779, -0.215005, 0.023783, -618.130000] ddes_flatplate.unsteady = True test_list.append(ddes_flatplate) @@ -818,7 +818,7 @@ def main(): unst_deforming_naca0012.cfg_dir = "disc_adj_euler/naca0012_pitching_def" unst_deforming_naca0012.cfg_file = "inv_NACA0012_pitching_deform.cfg" unst_deforming_naca0012.test_iter = 5 - unst_deforming_naca0012.test_vals = [-3.665187, -3.793258, -3.716457, -3.148323] + unst_deforming_naca0012.test_vals = [-3.665129, -3.793590, -3.716505, -3.148308] unst_deforming_naca0012.unsteady = True test_list.append(unst_deforming_naca0012) @@ -839,7 +839,7 @@ def main(): edge_VW.cfg_dir = "nicf/edge" edge_VW.cfg_file = "edge_VW.cfg" edge_VW.test_iter = 20 - edge_VW.test_vals = [-0.768929, 5.433202, -0.000628, 0.000000] + edge_VW.test_vals = [-0.711552, 5.490479, -0.000975, 0.000000] test_list.append(edge_VW) # Rarefaction shock wave edge_PPR @@ -847,7 +847,7 @@ def main(): edge_PPR.cfg_dir = "nicf/edge" edge_PPR.cfg_file = "edge_PPR.cfg" edge_PPR.test_iter = 20 - edge_PPR.test_vals = [-2.017812, 4.174560, 0.000019, 0.000000] + edge_PPR.test_vals = [-1.670439, 4.522842, 0.001027, 0.000000] test_list.append(edge_PPR) @@ -868,7 +868,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-6.614623, -3.001323, -14.336147, -8.776081, -11.382919, -5.852327, 73273.000000, 73273.000000, 0.019884, 82.491000] + Jones_tc_restart.test_vals = [-6.614623, -3.001323, -14.336147, -8.776081, -11.382919, -5.852327, 73273, 73273, 0.019884, 82.491] test_list.append(Jones_tc_restart) # 2D axial stage @@ -876,7 +876,7 @@ def main(): axial_stage2D.cfg_dir = "turbomachinery/axial_stage_2D" axial_stage2D.cfg_file = "Axial_stage2D.cfg" axial_stage2D.test_iter = 20 - axial_stage2D.test_vals = [0.983751, 1.534480, -2.888520, 2.606773, -2.418421, 3.087187, 106380.000000, 106380.000000, 5.732500, 64.711000] + axial_stage2D.test_vals = [0.983751, 1.534480, -2.888520, 2.606773, -2.418421, 3.087187, 106380, 106380, 5.7325, 64.711] axial_stage2D.test_vals_aarch64 = [0.983751, 1.534480, -2.888520, 2.606773, -2.418421, 3.087187, 106380, 106380, 5.7325, 64.711] test_list.append(axial_stage2D) @@ -885,7 +885,7 @@ def main(): transonic_stator_restart.cfg_dir = "turbomachinery/transonic_stator_2D" transonic_stator_restart.cfg_file = "transonic_stator_restart.cfg" transonic_stator_restart.test_iter = 20 - transonic_stator_restart.test_vals = [-5.008547, -3.102420, -2.752033, 1.091152, -3.543849, 2.169844, -471630.000000, 94.866000, -0.035806] + transonic_stator_restart.test_vals = [-5.008547, -3.102420, -2.752033, 1.091152, -3.543849, 2.169844, -471630, 94.866, -0.035806] transonic_stator_restart.test_vals_aarch64 = [-5.008547, -3.102420, -2.752033, 1.091152, -3.543849, 2.169844, -471630, 94.866, -0.035806] test_list.append(transonic_stator_restart) @@ -906,7 +906,7 @@ def main(): uniform_flow.cfg_dir = "sliding_interface/uniform_flow" uniform_flow.cfg_file = "uniform_NN.cfg" uniform_flow.test_iter = 2 - uniform_flow.test_vals = [2.000000, 0.000000, -0.202697, -13.249572] + uniform_flow.test_vals = [2.000000, 0.000000, -0.205134, -13.251542] uniform_flow.test_vals_aarch64 = [2.000000, 0.000000, -0.205134, -13.250720] #last 4 columns uniform_flow.tol = 0.000001 uniform_flow.unsteady = True @@ -918,7 +918,7 @@ def main(): channel_2D.cfg_dir = "sliding_interface/channel_2D" channel_2D.cfg_file = "channel_2D_WA.cfg" channel_2D.test_iter = 2 - channel_2D.test_vals = [2.000000, 0.000000, 0.419778, 0.352185, 0.404395] + channel_2D.test_vals = [2.000000, 0.000000, 0.397995, 0.352789, 0.405474] channel_2D.test_vals_aarch64 = [2.000000, 0.000000, 0.398053, 0.352788, 0.405474] #last 5 columns channel_2D.timeout = 100 channel_2D.unsteady = True @@ -930,7 +930,7 @@ def main(): channel_3D.cfg_dir = "sliding_interface/channel_3D" channel_3D.cfg_file = "channel_3D_WA.cfg" channel_3D.test_iter = 1 - channel_3D.test_vals = [1.000000, 0.000000, 0.657678, 0.767752, 0.692208] + channel_3D.test_vals = [1.000000, 0.000000, 0.661408, 0.769988, 0.696033] channel_3D.test_vals_aarch64 = [1.000000, 0.000000, 0.661408, 0.769902, 0.695663] #last 5 columns channel_3D.unsteady = True channel_3D.multizone = True @@ -941,7 +941,7 @@ def main(): pipe.cfg_dir = "sliding_interface/pipe" pipe.cfg_file = "pipe_NN.cfg" pipe.test_iter = 2 - pipe.test_vals = [0.481390, 0.648695, 0.982990, 1.018349] + pipe.test_vals = [0.491954, 0.677756, 0.963981, 1.006936] pipe.unsteady = True pipe.multizone = True test_list.append(pipe) @@ -951,7 +951,7 @@ def main(): rotating_cylinders.cfg_dir = "sliding_interface/rotating_cylinders" rotating_cylinders.cfg_file = "rot_cylinders_WA.cfg" rotating_cylinders.test_iter = 3 - rotating_cylinders.test_vals = [3.000000, 0.000000, 0.719778, 1.111044, 1.154068] + rotating_cylinders.test_vals = [3.000000, 0.000000, 0.777574, 1.134794, 1.224127] rotating_cylinders.unsteady = True rotating_cylinders.multizone = True test_list.append(rotating_cylinders) @@ -961,7 +961,7 @@ def main(): supersonic_vortex_shedding.cfg_dir = "sliding_interface/supersonic_vortex_shedding" supersonic_vortex_shedding.cfg_file = "sup_vor_shed_WA.cfg" supersonic_vortex_shedding.test_iter = 5 - supersonic_vortex_shedding.test_vals = [5.000000, 0.000000, 1.207949, 1.036092] + supersonic_vortex_shedding.test_vals = [5.000000, 0.000000, 1.214359, 1.663910] supersonic_vortex_shedding.unsteady = True supersonic_vortex_shedding.multizone = True test_list.append(supersonic_vortex_shedding) @@ -1039,7 +1039,7 @@ def main(): fsi2d.cfg_dir = "fea_fsi/WallChannel_2d" fsi2d.cfg_file = "configFSI.cfg" fsi2d.test_iter = 4 - fsi2d.test_vals = [4.000000, 0.000000, -3.729228, -4.153949] + fsi2d.test_vals = [4.000000, 0.000000, -3.743214, -4.133482] fsi2d.multizone = True fsi2d.unsteady = True test_list.append(fsi2d) @@ -1049,7 +1049,7 @@ def main(): stat_fsi.cfg_dir = "fea_fsi/stat_fsi" stat_fsi.cfg_file = "config.cfg" stat_fsi.test_iter = 7 - stat_fsi.test_vals = [-3.345064, -4.996078, 0.000000, 7.000000] + stat_fsi.test_vals = [-3.326934, -4.981505, 0.000000, 7.000000] stat_fsi.multizone = True test_list.append(stat_fsi) @@ -1058,7 +1058,7 @@ def main(): stat_fsi_restart.cfg_dir = "fea_fsi/stat_fsi" stat_fsi_restart.cfg_file = "config_restart.cfg" stat_fsi_restart.test_iter = 1 - stat_fsi_restart.test_vals = [-3.404628, -4.288921, 0.000000, 27.000000] + stat_fsi_restart.test_vals = [-3.407486, -4.339837, 0.000000, 27.000000] stat_fsi_restart.multizone = True test_list.append(stat_fsi_restart) @@ -1067,7 +1067,7 @@ def main(): dyn_fsi.cfg_dir = "fea_fsi/dyn_fsi" dyn_fsi.cfg_file = "config.cfg" dyn_fsi.test_iter = 4 - dyn_fsi.test_vals = [-4.330444, -4.058003, 0.000000, 86.000000] + dyn_fsi.test_vals = [-4.355809, -4.060588, 0.000000, 87.000000] dyn_fsi.test_vals_aarch64 = [-4.355809, -4.060588, 0.000000, 86.000000] #last 4 columns dyn_fsi.multizone = True dyn_fsi.unsteady = True @@ -1079,7 +1079,7 @@ def main(): airfoilRBF.cfg_file = "config.cfg" airfoilRBF.test_iter = 1 - airfoilRBF.test_vals = [1.000000, -2.581853, -5.085822] + airfoilRBF.test_vals = [1.000000, -2.786186, -4.977944] airfoilRBF.tol = 0.0001 airfoilRBF.multizone = True test_list.append(airfoilRBF) @@ -1210,7 +1210,7 @@ def main(): naca0012_geo = TestCase('naca0012_geo') naca0012_geo.cfg_dir = "optimization_euler/steady_naca0012" naca0012_geo.cfg_file = "inv_NACA0012_adv.cfg" - naca0012_geo.test_vals = [1.000000, 62.045500, 0.120011, 0.000000] + naca0012_geo.test_vals = [1.0000, 62.0455, 0.120011, 0.0000] #chord, LE radius, ToC, Alpha naca0012_geo.command = TestCase.Command(exec = "SU2_GEO") naca0012_geo.timeout = 1600 naca0012_geo.tol = 0.00001 @@ -1226,7 +1226,7 @@ def main(): intersect_def.cfg_dir = "deformation/intersection_prevention" intersect_def.cfg_file = "def_intersect.cfg" intersect_def.test_iter = 10 - intersect_def.test_vals = [0.000112] + intersect_def.test_vals = [0.000112] #residual intersect_def.command = TestCase.Command(exec = "SU2_DEF") intersect_def.timeout = 1600 intersect_def.tol = 1e-04 @@ -1239,10 +1239,10 @@ def main(): naca0012_def.cfg_dir = "deformation/naca0012" naca0012_def.cfg_file = "def_NACA0012.cfg" naca0012_def.test_iter = 10 - naca0012_def.test_vals = [0.0034470] + naca0012_def.test_vals = [0.00344658] #residual naca0012_def.command = TestCase.Command(exec = "SU2_DEF") naca0012_def.timeout = 1600 - naca0012_def.tol = 1e-06 + naca0012_def.tol = 1e-08 pass_list.append(naca0012_def.run_def(args.tsan, args.asan)) test_list.append(naca0012_def) @@ -1252,10 +1252,10 @@ def main(): naca0012_def_file.cfg_dir = "deformation/naca0012" naca0012_def_file.cfg_file = "surface_file_NACA0012.cfg" naca0012_def_file.test_iter = 10 - naca0012_def_file.test_vals = [0.0034470] + naca0012_def_file.test_vals = [0.00344658] #residual naca0012_def_file.command = TestCase.Command(exec = "SU2_DEF") naca0012_def_file.timeout = 1600 - naca0012_def_file.tol = 1e-6 + naca0012_def_file.tol = 1e-8 pass_list.append(naca0012_def_file.run_def(args.tsan, args.asan)) test_list.append(naca0012_def_file) @@ -1265,10 +1265,10 @@ def main(): rae2822_def.cfg_dir = "deformation/rae2822" rae2822_def.cfg_file = "def_RAE2822.cfg" rae2822_def.test_iter = 10 - rae2822_def.test_vals = [0.0000000] + rae2822_def.test_vals = [7.94218e-09] #residual rae2822_def.command = TestCase.Command(exec = "SU2_DEF") rae2822_def.timeout = 1600 - rae2822_def.tol = 1e-06 + rae2822_def.tol = 1e-13 pass_list.append(rae2822_def.run_def(args.tsan, args.asan)) test_list.append(rae2822_def) @@ -1278,10 +1278,10 @@ def main(): naca4412_def.cfg_dir = "deformation/naca4412" naca4412_def.cfg_file = "def_NACA4412.cfg" naca4412_def.test_iter = 10 - naca4412_def.test_vals = [0.0000000] + naca4412_def.test_vals = [8.855370e-13] #residual naca4412_def.command = TestCase.Command(exec = "SU2_DEF") naca4412_def.timeout = 1600 - naca4412_def.tol = 1e-06 + naca4412_def.tol = 1e-12 pass_list.append(naca4412_def.run_def(args.tsan, args.asan)) test_list.append(naca4412_def) @@ -1291,10 +1291,10 @@ def main(): brick_tets_def.cfg_dir = "deformation/brick_tets" brick_tets_def.cfg_file = "def_brick_tets.cfg" brick_tets_def.test_iter = 10 - brick_tets_def.test_vals = [0.0008970] + brick_tets_def.test_vals = [8.973010e-04] #residual brick_tets_def.command = TestCase.Command(exec = "SU2_DEF") brick_tets_def.timeout = 1600 - brick_tets_def.tol = 1e-06 + brick_tets_def.tol = 1e-09 pass_list.append(brick_tets_def.run_def(args.tsan, args.asan)) test_list.append(brick_tets_def) @@ -1304,10 +1304,10 @@ def main(): brick_hex_def.cfg_dir = "deformation/brick_hex" brick_hex_def.cfg_file = "def_brick_hex.cfg" brick_hex_def.test_iter = 10 - brick_hex_def.test_vals = [0.0002080] + brick_hex_def.test_vals = [2.082100e-04] #residual brick_hex_def.command = TestCase.Command(exec = "SU2_DEF") brick_hex_def.timeout = 1600 - brick_hex_def.tol = 1e-06 + brick_hex_def.tol = 1e-09 pass_list.append(brick_hex_def.run_def(args.tsan, args.asan)) test_list.append(brick_hex_def) @@ -1317,10 +1317,10 @@ def main(): brick_pyra_def.cfg_dir = "deformation/brick_pyra" brick_pyra_def.cfg_file = "def_brick_pyra.cfg" brick_pyra_def.test_iter = 10 - brick_pyra_def.test_vals = [0.0015010] + brick_pyra_def.test_vals = [0.00150063] #residual brick_pyra_def.command = TestCase.Command(exec = "SU2_DEF") brick_pyra_def.timeout = 1600 - brick_pyra_def.tol = 1e-06 + brick_pyra_def.tol = 1e-08 pass_list.append(brick_pyra_def.run_def(args.tsan, args.asan)) test_list.append(brick_pyra_def) @@ -1330,10 +1330,10 @@ def main(): brick_prism_def.cfg_dir = "deformation/brick_prism" brick_prism_def.cfg_file = "def_brick_prism.cfg" brick_prism_def.test_iter = 10 - brick_prism_def.test_vals = [0.0021210] + brick_prism_def.test_vals = [0.00212069] #residual brick_prism_def.command = TestCase.Command(exec = "SU2_DEF") brick_prism_def.timeout = 1600 - brick_prism_def.tol = 1e-06 + brick_prism_def.tol = 1e-08 pass_list.append(brick_prism_def.run_def(args.tsan, args.asan)) test_list.append(brick_prism_def) @@ -1343,10 +1343,10 @@ def main(): brick_prism_rans_def.cfg_dir = "deformation/brick_prism_rans" brick_prism_rans_def.cfg_file = "def_brick_prism_rans.cfg" brick_prism_rans_def.test_iter = 10 - brick_prism_rans_def.test_vals = [0.0000000] + brick_prism_rans_def.test_vals = [4.8066e-08] #residual brick_prism_rans_def.command = TestCase.Command(exec = "SU2_DEF") brick_prism_rans_def.timeout = 1600 - brick_prism_rans_def.tol = 1e-06 + brick_prism_rans_def.tol = 1e-12 pass_list.append(brick_prism_rans_def.run_def(args.tsan, args.asan)) test_list.append(brick_prism_rans_def) @@ -1356,10 +1356,10 @@ def main(): brick_hex_rans_def.cfg_dir = "deformation/brick_hex_rans" brick_hex_rans_def.cfg_file = "def_brick_hex_rans.cfg" brick_hex_rans_def.test_iter = 10 - brick_hex_rans_def.test_vals = [0.0000000] + brick_hex_rans_def.test_vals = [2.260750e-07] #residual brick_hex_rans_def.command = TestCase.Command(exec = "SU2_DEF") brick_hex_rans_def.timeout = 1600 - brick_hex_rans_def.tol = 1e-06 + brick_hex_rans_def.tol = 1e-12 pass_list.append(brick_hex_rans_def.run_def(args.tsan, args.asan)) test_list.append(brick_hex_rans_def) @@ -1369,10 +1369,10 @@ def main(): cylinder_ffd_def.cfg_dir = "deformation/cylindrical_ffd" cylinder_ffd_def.cfg_file = "def_cylindrical.cfg" cylinder_ffd_def.test_iter = 10 - cylinder_ffd_def.test_vals = [0.0004700] + cylinder_ffd_def.test_vals = [0.000470133] #residual cylinder_ffd_def.command = TestCase.Command(exec = "SU2_DEF") cylinder_ffd_def.timeout = 1600 - cylinder_ffd_def.tol = 1e-06 + cylinder_ffd_def.tol = 1e-09 pass_list.append(cylinder_ffd_def.run_def(args.tsan, args.asan)) test_list.append(cylinder_ffd_def) @@ -1382,10 +1382,10 @@ def main(): sphere_ffd_def.cfg_dir = "deformation/spherical_ffd" sphere_ffd_def.cfg_file = "def_spherical.cfg" sphere_ffd_def.test_iter = 10 - sphere_ffd_def.test_vals = [0.0035670] + sphere_ffd_def.test_vals = [0.00356699] #residual sphere_ffd_def.command = TestCase.Command(exec = "SU2_DEF") sphere_ffd_def.timeout = 1600 - sphere_ffd_def.tol = 1e-06 + sphere_ffd_def.tol = 1e-08 pass_list.append(sphere_ffd_def.run_def(args.tsan, args.asan)) test_list.append(sphere_ffd_def) @@ -1395,10 +1395,10 @@ def main(): sphere_ffd_def_bspline.cfg_dir = "deformation/spherical_ffd" sphere_ffd_def_bspline.cfg_file = "def_spherical_bspline.cfg" sphere_ffd_def_bspline.test_iter = 10 - sphere_ffd_def_bspline.test_vals = [0.0020680] + sphere_ffd_def_bspline.test_vals = [0.00206808] #residual sphere_ffd_def_bspline.command = TestCase.Command(exec = "SU2_DEF") sphere_ffd_def_bspline.timeout = 1600 - sphere_ffd_def_bspline.tol = 1e-06 + sphere_ffd_def_bspline.tol = 1e-08 pass_list.append(sphere_ffd_def_bspline.run_def(args.tsan, args.asan)) test_list.append(sphere_ffd_def_bspline) @@ -1425,7 +1425,7 @@ def main(): shape_opt_euler_py.cfg_dir = "optimization_euler/steady_naca0012" shape_opt_euler_py.cfg_file = "inv_NACA0012_adv.cfg" shape_opt_euler_py.test_iter = 1 - shape_opt_euler_py.test_vals = [1.000000, 1.000000, 0.000021, 0.003643] + shape_opt_euler_py.test_vals = [1, 1, 2.134974E-05, 0.003847] #last 4 columns shape_opt_euler_py.command = TestCase.Command(exec = "shape_optimization.py", param = "-g CONTINUOUS_ADJOINT -f") shape_opt_euler_py.timeout = 1600 shape_opt_euler_py.tol = 0.00001 @@ -1477,7 +1477,7 @@ def main(): opt_multiobj1surf_py.cfg_dir = "optimization_euler/multiobjective_wedge" opt_multiobj1surf_py.cfg_file = "inv_wedge_ROE_multiobj_1surf.cfg" opt_multiobj1surf_py.test_iter = 1 - opt_multiobj1surf_py.test_vals = [1.000000, 1.000000, 36.117740, 4.438036] + opt_multiobj1surf_py.test_vals = [1.000000, 1.000000, 30.428280, 2.039416] opt_multiobj1surf_py.command = TestCase.Command(exec = "shape_optimization.py", param = "-g CONTINUOUS_ADJOINT -f") opt_multiobj1surf_py.timeout = 1600 opt_multiobj1surf_py.tol = 0.00001 @@ -1490,7 +1490,7 @@ def main(): opt_2surf1obj_py.cfg_dir = "optimization_euler/multiobjective_wedge" opt_2surf1obj_py.cfg_file = "inv_wedge_ROE_2surf_1obj.cfg" opt_2surf1obj_py.test_iter = 1 - opt_2surf1obj_py.test_vals = [1.000000, 1.000000, 2.005219, 0.000369] + opt_2surf1obj_py.test_vals = [1.000000, 1.000000, 2.005694, 0.000185] opt_2surf1obj_py.command = TestCase.Command(exec = "shape_optimization.py", param = "-g CONTINUOUS_ADJOINT -f") opt_2surf1obj_py.timeout = 1600 opt_2surf1obj_py.tol = 0.00001 @@ -1507,7 +1507,7 @@ def main(): pywrapper_naca0012.cfg_dir = "euler/naca0012" pywrapper_naca0012.cfg_file = "inv_NACA0012_Roe.cfg" pywrapper_naca0012.test_iter = 20 - pywrapper_naca0012.test_vals = [-4.444941, -3.941038, 0.318998, 0.022365] + pywrapper_naca0012.test_vals = [-4.023999, -3.515034, 0.339426, 0.022217] pywrapper_naca0012.command = TestCase.Command(exec = "SU2_CFD.py", param = "-f") pywrapper_naca0012.timeout = 1600 pywrapper_naca0012.tol = 0.00001 @@ -1548,7 +1548,7 @@ def main(): pywrapper_aeroelastic.cfg_dir = "aeroelastic" pywrapper_aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg" pywrapper_aeroelastic.test_iter = 2 - pywrapper_aeroelastic.test_vals = [0.074291, 0.027620, -0.001641, -0.000128] + pywrapper_aeroelastic.test_vals = [0.074836, 0.033102, -0.001650, -0.000127] pywrapper_aeroelastic.command = TestCase.Command(exec = "SU2_CFD.py", param = "-f") pywrapper_aeroelastic.timeout = 1600 pywrapper_aeroelastic.tol = 0.00001 @@ -1562,7 +1562,7 @@ def main(): pywrapper_fsi2d.cfg_dir = "fea_fsi/WallChannel_2d" pywrapper_fsi2d.cfg_file = "configFSI.cfg" pywrapper_fsi2d.test_iter = 4 - pywrapper_fsi2d.test_vals = [4.000000, 0.000000, -3.729228, -4.153949] + pywrapper_fsi2d.test_vals = [4.000000, 0.000000, -3.743214, -4.133482] pywrapper_fsi2d.command = TestCase.Command(exec = "SU2_CFD.py", param = "--nZone 2 --fsi True -f") pywrapper_fsi2d.unsteady = True pywrapper_fsi2d.multizone = True @@ -1605,7 +1605,7 @@ def main(): pywrapper_custom_inlet.cfg_dir = "py_wrapper/custom_inlet" pywrapper_custom_inlet.cfg_file = "lam_flatplate.cfg" pywrapper_custom_inlet.test_iter = 20 - pywrapper_custom_inlet.test_vals = [-4.120494, -1.540195, -3.566114, 1.342509, -0.748827, 0.161349, -0.013214, 0.516000, -0.529220] + pywrapper_custom_inlet.test_vals = [-4.124164, -1.544359, -3.808866, 1.338411, -0.752679, 0.161436, -1.2391e-02, 5.1662e-01, -5.2901e-01] pywrapper_custom_inlet.command = TestCase.Command(exec = "python", param = "run.py") pywrapper_custom_inlet.timeout = 1600 pywrapper_custom_inlet.tol = 0.0001 diff --git a/TestCases/serial_regression_AD.py b/TestCases/serial_regression_AD.py index 6faaeff53af..ac268040cd5 100644 --- a/TestCases/serial_regression_AD.py +++ b/TestCases/serial_regression_AD.py @@ -50,7 +50,7 @@ def main(): discadj_naca0012.cfg_dir = "cont_adj_euler/naca0012" discadj_naca0012.cfg_file = "inv_NACA0012_discadj.cfg" discadj_naca0012.test_iter = 100 - discadj_naca0012.test_vals = [-3.560691, -8.925239, -0.000000, 0.005559] + discadj_naca0012.test_vals = [-3.561506, -8.926634, -0.000000, 0.005587] test_list.append(discadj_naca0012) # Inviscid Cylinder 3D (multiple markers) @@ -58,7 +58,7 @@ def main(): discadj_cylinder3D.cfg_dir = "disc_adj_euler/cylinder3D" discadj_cylinder3D.cfg_file = "inv_cylinder3D.cfg" discadj_cylinder3D.test_iter = 5 - discadj_cylinder3D.test_vals = [-3.771233, -3.727282, -0.000000, 0.000000] + discadj_cylinder3D.test_vals = [-3.737675, -3.842311, -0.000000, 0.000000] test_list.append(discadj_cylinder3D) # Arina nozzle 2D @@ -66,7 +66,7 @@ def main(): discadj_arina2k.cfg_dir = "disc_adj_euler/arina2k" discadj_arina2k.cfg_file = "Arina2KRS.cfg" discadj_arina2k.test_iter = 20 - discadj_arina2k.test_vals = [-3.534947, -3.773294, 0.027242, 0.000000] + discadj_arina2k.test_vals = [-3.087863, -3.481496, 6.8879e-02, 0] test_list.append(discadj_arina2k) ####################################################### @@ -98,7 +98,7 @@ def main(): discadj_incomp_NACA0012.cfg_dir = "disc_adj_incomp_euler/naca0012" discadj_incomp_NACA0012.cfg_file = "incomp_NACA0012_disc.cfg" discadj_incomp_NACA0012.test_iter = 20 - discadj_incomp_NACA0012.test_vals = [20.000000, -4.087948, -2.655204, 0.000000] + discadj_incomp_NACA0012.test_vals = [20.000000, -4.092007, -2.652750, 0.000000] test_list.append(discadj_incomp_NACA0012) ##################################### @@ -110,7 +110,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, -2.373367, -2.368305, 0.000000] + discadj_incomp_cylinder.test_vals = [20.000000, -2.373367, -2.368305, 0.000000] #last 4 columns test_list.append(discadj_incomp_cylinder) ####################################################### @@ -122,7 +122,7 @@ def main(): discadj_cylinder.cfg_dir = "disc_adj_rans/cylinder" discadj_cylinder.cfg_file = "cylinder.cfg" discadj_cylinder.test_iter = 9 - discadj_cylinder.test_vals = [3.746909, -1.544883, -0.008321, 0.000014] + discadj_cylinder.test_vals = [3.746909, -1.544883, -0.008321, 0.000014] #last 4 columns discadj_cylinder.unsteady = True test_list.append(discadj_cylinder) @@ -135,7 +135,7 @@ def main(): discadj_DT_1ST_cylinder.cfg_dir = "disc_adj_rans/cylinder_DT_1ST" discadj_DT_1ST_cylinder.cfg_file = "cylinder.cfg" discadj_DT_1ST_cylinder.test_iter = 9 - discadj_DT_1ST_cylinder.test_vals = [3.698168, -1.607050, -0.002159, 0.000028] + discadj_DT_1ST_cylinder.test_vals = [3.698168, -1.607050, -0.002159, 0.000028] #last 4 columns discadj_DT_1ST_cylinder.unsteady = True test_list.append(discadj_DT_1ST_cylinder) @@ -148,7 +148,7 @@ def main(): discadj_pitchingNACA0012.cfg_dir = "disc_adj_euler/naca0012_pitching" discadj_pitchingNACA0012.cfg_file = "inv_NACA0012_pitching.cfg" discadj_pitchingNACA0012.test_iter = 4 - discadj_pitchingNACA0012.test_vals = [-1.220016, -1.646770, -0.007597, 0.000013] + discadj_pitchingNACA0012.test_vals = [-1.218846, -1.645199, -0.007645, 0.000013] discadj_pitchingNACA0012.unsteady = True test_list.append(discadj_pitchingNACA0012) @@ -157,7 +157,7 @@ def main(): unst_deforming_naca0012.cfg_dir = "disc_adj_euler/naca0012_pitching_def" unst_deforming_naca0012.cfg_file = "inv_NACA0012_pitching_deform_ad.cfg" unst_deforming_naca0012.test_iter = 4 - unst_deforming_naca0012.test_vals = [-1.959357, -1.843601, 2729.700000, 0.000004] + unst_deforming_naca0012.test_vals = [-1.958006, -1.841808, 1081.700000, 0.000004] unst_deforming_naca0012.unsteady = True test_list.append(unst_deforming_naca0012) @@ -170,7 +170,7 @@ def main(): discadj_fea.cfg_dir = "disc_adj_fea" discadj_fea.cfg_file = "configAD_fem.cfg" discadj_fea.test_iter = 4 - discadj_fea.test_vals = [-2.849844, -3.238713, -0.000364, -8.708700] + discadj_fea.test_vals = [-2.849781, -3.238667, -0.000364, -8.708700] discadj_fea.tol = 0.00007 test_list.append(discadj_fea) @@ -183,7 +183,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.122406, 0.693852, 0.000000, -0.869010] + discadj_heat.test_vals = [-2.227530, 0.577932, 0.000000, -7.754000] test_list.append(discadj_heat) ################################### @@ -195,7 +195,7 @@ def main(): discadj_fsi.cfg_dir = "disc_adj_fsi" discadj_fsi.cfg_file = "config.cfg" discadj_fsi.test_iter = 6 - discadj_fsi.test_vals = [6.000000, -1.965877, -3.084381, 0.000440, -1.063100] + discadj_fsi.test_vals = [6.000000, -1.965877, -3.084381, 0.000440, -1.063100] #last 5 columns test_list.append(discadj_fsi) ################################### @@ -207,7 +207,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 = [-2.955506, -3.085551, -3.085518, -3.085513] + discadj_cht.test_vals = [-2.955506, -3.085551, -3.085518, -3.085513] #last 4 columns test_list.append(discadj_cht) ###################################### @@ -323,7 +323,7 @@ def main(): pywrapper_FEA_AD_FlowLoad.cfg_dir = "py_wrapper/disc_adj_fea/flow_load_sens" pywrapper_FEA_AD_FlowLoad.cfg_file = "configAD_fem.cfg" pywrapper_FEA_AD_FlowLoad.test_iter = 100 - pywrapper_FEA_AD_FlowLoad.test_vals = [-0.139456, -0.585986, -0.000364, -0.003101] + pywrapper_FEA_AD_FlowLoad.test_vals = [-0.13945587401579657, -0.585985886606256, -0.00036377840086080753, -0.0031005670174756375] #last 4 columns pywrapper_FEA_AD_FlowLoad.command = TestCase.Command(exec = "python", param = "run_adjoint.py -f") pywrapper_FEA_AD_FlowLoad.timeout = 1600 pywrapper_FEA_AD_FlowLoad.tol = 0.000001 @@ -337,7 +337,7 @@ def main(): pywrapper_CFD_AD_MeshDisp.cfg_dir = "py_wrapper/disc_adj_flow/mesh_disp_sens" pywrapper_CFD_AD_MeshDisp.cfg_file = "configAD_flow.cfg" pywrapper_CFD_AD_MeshDisp.test_iter = 1000 - pywrapper_CFD_AD_MeshDisp.test_vals = [30.000000, -2.505330, 1.409290, 0.000000] + pywrapper_CFD_AD_MeshDisp.test_vals = [30.000000, -2.518695, 1.390150, 0.000000] #last 4 columns pywrapper_CFD_AD_MeshDisp.command = TestCase.Command(exec = "python", param = "run_adjoint.py -f") pywrapper_CFD_AD_MeshDisp.timeout = 1600 pywrapper_CFD_AD_MeshDisp.tol = 0.000001 diff --git a/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg b/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg index 7ce89091193..239ae7647de 100644 --- a/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg +++ b/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg @@ -81,7 +81,7 @@ MARKER_OUTLET= ( outlet, 0.0 ) % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES % -CFL_NUMBER= 80 +CFL_NUMBER= 150 CFL_REDUCTION_SPECIES= 0.1 CFL_REDUCTION_TURB= 1.0 % diff --git a/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg b/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg index f851455c179..1ba87a48301 100644 --- a/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg +++ b/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg @@ -82,7 +82,7 @@ MARKER_OUTLET= ( outlet, 0.0 ) % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES % -CFL_NUMBER= 80 +CFL_NUMBER= 150 CFL_REDUCTION_SPECIES= 0.1 CFL_REDUCTION_TURB= 1.0 % @@ -93,8 +93,8 @@ ITER= 1000 % LINEAR_SOLVER= FGMRES LINEAR_SOLVER_PREC= ILU -LINEAR_SOLVER_ERROR= 1E-5 -LINEAR_SOLVER_ITER= 10 +LINEAR_SOLVER_ERROR= 1E-8 +LINEAR_SOLVER_ITER= 30 % % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % diff --git a/TestCases/tutorials.py b/TestCases/tutorials.py index b4c8534d8a1..6406f452631 100644 --- a/TestCases/tutorials.py +++ b/TestCases/tutorials.py @@ -80,7 +80,7 @@ def main(): sp_pinArray_2d_mf_hf.cfg_dir = "../Tutorials/incompressible_flow/Inc_Streamwise_Periodic" sp_pinArray_2d_mf_hf.cfg_file = "sp_pinArray_2d_mf_hf.cfg" sp_pinArray_2d_mf_hf.test_iter = 25 - sp_pinArray_2d_mf_hf.test_vals = [-4.613682, 1.471278, -0.748987, 241.667177] + sp_pinArray_2d_mf_hf.test_vals = [-4.625757, 1.445108, -0.750969, 241.762883] test_list.append(sp_pinArray_2d_mf_hf) # 2D pin case pressure drop periodic with heatflux BC and temperature periodicity @@ -88,7 +88,7 @@ def main(): sp_pinArray_2d_dp_hf_tp.cfg_dir = "../Tutorials/incompressible_flow/Inc_Streamwise_Periodic" sp_pinArray_2d_dp_hf_tp.cfg_file = "sp_pinArray_2d_dp_hf_tp.cfg" sp_pinArray_2d_dp_hf_tp.test_iter = 25 - sp_pinArray_2d_dp_hf_tp.test_vals = [-4.640621, 1.436697, -0.707302, 208.023676] + sp_pinArray_2d_dp_hf_tp.test_vals = [-4.666547, 1.396426, -0.709267, 208.023676] test_list.append(sp_pinArray_2d_dp_hf_tp) ### Species Transport @@ -98,7 +98,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.869509, -5.252493, -5.127926, -5.912790, -1.767067, -6.152558, -6.304196, 5.000000, -0.933280, 5.000000, -2.314730, 5.000000, -0.680255, 1.649865, 0.500678, 0.596475, 0.552712] + species3_primitiveVenturi.test_vals = [-6.082040, -5.293756, -5.131970, -5.933415, -1.606563, -6.274241, -6.408477, 5.000000, -0.811535, 5.000000, -2.344697, 5.000000, -0.388358, 1.647440, 0.499101, 0.600978, 0.547361] test_list.append(species3_primitiveVenturi) # 3 species (2 eq) primitive venturi mixing @@ -106,8 +106,8 @@ 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 = [-7.584508, -7.211527, -6.740742, -6.896386, -11.472089, -10.865347, -10.096770] - DAspecies3_primitiveVenturi.test_vals_aarch64 = [-7.865411, -7.548131, -7.347978, -7.217536, -11.822422, -10.968444, -10.193225] + DAspecies3_primitiveVenturi.test_vals = [-8.443103, -7.715615, -7.706589, -7.428740, -12.067471, -12.205189, -11.368995] + DAspecies3_primitiveVenturi.test_vals_aarch64 = [-8.443103, -7.715615, -7.706589, -7.428740, -12.067471, -12.205189, -11.368995] DAspecies3_primitiveVenturi.command = TestCase.Command("mpirun -n 2", "SU2_CFD_AD") test_list.append(DAspecies3_primitiveVenturi) @@ -125,7 +125,7 @@ def main(): sudo_tutorial.cfg_dir = "../Tutorials/incompressible_flow/Inc_Turbulent_Bend_Wallfunctions" sudo_tutorial.cfg_file = "sudo.cfg" sudo_tutorial.test_iter = 10 - sudo_tutorial.test_vals = [-14.579462, -13.203791, -13.601782, -12.616876, -14.005299, -10.817605, 15.000000, -2.296083] + sudo_tutorial.test_vals = [-13.618610, -12.647974, -12.296537, -11.658760, -13.136523, -9.550829, 15.000000, -2.369703] sudo_tutorial.command = TestCase.Command("mpirun -n 2", "SU2_CFD") test_list.append(sudo_tutorial) @@ -136,7 +136,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.809794, -10.369804, -11.044267, -4.332945, -11.883789] + premixed_hydrogen.test_vals = [-9.905856, -10.449512, -11.035999, -4.331440, -11.882740] test_list.append(premixed_hydrogen) ### Compressible Flow @@ -146,7 +146,7 @@ def main(): tutorial_inv_bump.cfg_dir = "../Tutorials/compressible_flow/Inviscid_Bump" tutorial_inv_bump.cfg_file = "inv_channel.cfg" tutorial_inv_bump.test_iter = 0 - tutorial_inv_bump.test_vals = [-1.548003, 3.983585, 0.020973, 0.071064] + tutorial_inv_bump.test_vals = [-1.437425, 4.075857, 0.005439, 0.012998] test_list.append(tutorial_inv_bump) # Inviscid Wedge @@ -154,7 +154,7 @@ def main(): tutorial_inv_wedge.cfg_dir = "../Tutorials/compressible_flow/Inviscid_Wedge" tutorial_inv_wedge.cfg_file = "inv_wedge_HLLC.cfg" tutorial_inv_wedge.test_iter = 0 - tutorial_inv_wedge.test_vals = [-0.864206, 4.850246, -0.245674, 0.043209] + tutorial_inv_wedge.test_vals = [-0.481460, 5.253008, -0.291747, 0.052515] tutorial_inv_wedge.no_restart = True test_list.append(tutorial_inv_wedge) @@ -163,7 +163,7 @@ def main(): tutorial_inv_onera.cfg_dir = "../Tutorials/compressible_flow/Inviscid_ONERAM6" tutorial_inv_onera.cfg_file = "inv_ONERAM6.cfg" tutorial_inv_onera.test_iter = 0 - tutorial_inv_onera.test_vals = [-5.504789, -4.895776, 0.249157, 0.118834] + tutorial_inv_onera.test_vals = [-5.204928, -4.597762, 0.247451, 0.085770] tutorial_inv_onera.no_restart = True test_list.append(tutorial_inv_onera) @@ -181,7 +181,7 @@ def main(): tutorial_lam_flatplate.cfg_dir = "../Tutorials/compressible_flow/Laminar_Flat_Plate" tutorial_lam_flatplate.cfg_file = "lam_flatplate.cfg" tutorial_lam_flatplate.test_iter = 0 - tutorial_lam_flatplate.test_vals = [-2.821818, 2.657591, -0.400044, 0.029365] #last 4 columns + tutorial_lam_flatplate.test_vals = [-2.821818, 2.657591, -0.400044, 0.029413] #last 4 columns tutorial_lam_flatplate.no_restart = True test_list.append(tutorial_lam_flatplate) @@ -190,7 +190,7 @@ def main(): tutorial_turb_flatplate.cfg_dir = "../Tutorials/compressible_flow/Turbulent_Flat_Plate" tutorial_turb_flatplate.cfg_file = "turb_SA_flatplate.cfg" tutorial_turb_flatplate.test_iter = 0 - tutorial_turb_flatplate.test_vals = [-2.258584, -4.901015, -0.429373, 0.201034] + tutorial_turb_flatplate.test_vals = [-2.258584, -4.901015, -0.429375, 0.201236] tutorial_turb_flatplate.no_restart = True test_list.append(tutorial_turb_flatplate) @@ -208,8 +208,8 @@ def main(): tutorial_trans_flatplate_T3A.cfg_dir = "../Tutorials/compressible_flow/Transitional_Flat_Plate/Langtry_and_Menter/T3A" tutorial_trans_flatplate_T3A.cfg_file = "transitional_LM_model_ConfigFile.cfg" tutorial_trans_flatplate_T3A.test_iter = 20 - tutorial_trans_flatplate_T3A.test_vals = [-5.837399, -2.092246, -3.983493, -0.302381, -1.920868, 1.667180, -3.496278, 0.391608] - tutorial_trans_flatplate_T3A.test_vals_aarch64 = [-5.837368, -2.092246, -3.984172, -0.302357, -1.928108, 1.667157, -3.496279, 0.391610] + tutorial_trans_flatplate_T3A.test_vals = [-5.837186, -2.092246, -3.982633, -0.302219, -1.921235, 1.667190, -3.496277, 0.391605] + tutorial_trans_flatplate_T3A.test_vals_aarch64 = [-5.837191, -2.092246, -3.982640, -0.302224, -1.922554, 1.667190, -3.496277, 0.391605] tutorial_trans_flatplate_T3A.no_restart = True test_list.append(tutorial_trans_flatplate_T3A) @@ -218,8 +218,8 @@ def main(): tutorial_trans_flatplate_T3Am.cfg_dir = "../Tutorials/compressible_flow/Transitional_Flat_Plate/Langtry_and_Menter/T3A-" tutorial_trans_flatplate_T3Am.cfg_file = "transitional_LM_model_ConfigFile.cfg" tutorial_trans_flatplate_T3Am.test_iter = 20 - tutorial_trans_flatplate_T3Am.test_vals = [-6.063700, -1.945073, -3.946836, -0.549147, -3.863792, 2.664440, -2.517610, 1.112977] - tutorial_trans_flatplate_T3Am.test_vals_aarch64 = [-6.063726, -1.945088, -3.946923, -0.549166, -3.863794, 2.664439, -2.517601, 1.112978] + tutorial_trans_flatplate_T3Am.test_vals = [-6.063600, -1.945057, -3.946760, -0.549063, -3.863792, 2.664453, -2.517606, 1.112979] + tutorial_trans_flatplate_T3Am.test_vals_aarch64 = [-6.063598, -1.945057, -3.946744, -0.549062, -3.863792, 2.664453, -2.517606, 1.112979] tutorial_trans_flatplate_T3Am.no_restart = True test_list.append(tutorial_trans_flatplate_T3Am) @@ -246,7 +246,7 @@ def main(): tutorial_turb_oneram6.cfg_dir = "../Tutorials/compressible_flow/Turbulent_ONERAM6" tutorial_turb_oneram6.cfg_file = "turb_ONERAM6.cfg" tutorial_turb_oneram6.test_iter = 0 - tutorial_turb_oneram6.test_vals = [-4.564441, -11.524295, 0.327905, 0.097340] + tutorial_turb_oneram6.test_vals = [-4.564441, -11.524476, 0.327954, 0.097349] test_list.append(tutorial_turb_oneram6) # NICD Nozzle @@ -254,7 +254,7 @@ def main(): tutorial_nicfd_nozzle.cfg_dir = "../Tutorials/compressible_flow/NICFD_nozzle" tutorial_nicfd_nozzle.cfg_file = "NICFD_nozzle.cfg" tutorial_nicfd_nozzle.test_iter = 20 - tutorial_nicfd_nozzle.test_vals = [-2.056675, -2.124123, 3.687027, 0.000000, 0.000000] + tutorial_nicfd_nozzle.test_vals = [-2.187397, -2.338457, 3.617301, 0.000000, 0.000000] tutorial_nicfd_nozzle.no_restart = True test_list.append(tutorial_nicfd_nozzle) @@ -284,7 +284,7 @@ def main(): tutorial_design_inv_naca0012.cfg_dir = "../Tutorials/design/Inviscid_2D_Unconstrained_NACA0012" tutorial_design_inv_naca0012.cfg_file = "inv_NACA0012_basic.cfg" tutorial_design_inv_naca0012.test_iter = 0 - tutorial_design_inv_naca0012.test_vals = [-3.918503, -3.332494, 0.134359, 0.218097] + tutorial_design_inv_naca0012.test_vals = [-3.585391, -2.989014, 0.135070, 0.208565] tutorial_design_inv_naca0012.no_restart = True test_list.append(tutorial_design_inv_naca0012) @@ -302,7 +302,7 @@ def main(): tutorial_design_multiobj.cfg_dir = "../Tutorials/design/Multi_Objective_Shape_Design" tutorial_design_multiobj.cfg_file = "inv_wedge_ROE_multiobj_combo.cfg" tutorial_design_multiobj.test_iter = 0 - tutorial_design_multiobj.test_vals = [2.657333, -3.020635, 370220.000000, 0.000000] + tutorial_design_multiobj.test_vals = [2.657333, -3.020635, 324840.000000, 0.000000] #last 4 columns tutorial_design_multiobj.no_restart = True test_list.append(tutorial_design_multiobj) diff --git a/TestCases/user_defined_functions/lam_flatplate.cfg b/TestCases/user_defined_functions/lam_flatplate.cfg index c3d55cd45c0..35cdc97b9c9 100644 --- a/TestCases/user_defined_functions/lam_flatplate.cfg +++ b/TestCases/user_defined_functions/lam_flatplate.cfg @@ -114,7 +114,7 @@ SLOPE_LIMITER_FLOW= NONE % CONV_RESIDUAL_MINVAL= -11 CONV_STARTITER= 0 -INNER_ITER= 21 +INNER_ITER= 1000 % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% % diff --git a/TestCases/vandv.py b/TestCases/vandv.py index 06c74d893f8..16ea373e8c1 100644 --- a/TestCases/vandv.py +++ b/TestCases/vandv.py @@ -54,8 +54,8 @@ def main(): flatplate_sst1994m.cfg_dir = "vandv/rans/flatplate" flatplate_sst1994m.cfg_file = "turb_flatplate_sst.cfg" flatplate_sst1994m.test_iter = 5 - flatplate_sst1994m.test_vals = [-13.027926, -10.276119, -11.311717, -8.137517, -10.520065, -5.127385, 0.002775] - flatplate_sst1994m.test_vals_aarch64 = [-13.028095, -11.271115, -11.532461, -8.387610, -11.417974, -5.116988, 0.002808] + flatplate_sst1994m.test_vals = [-13.023358, -9.956752, -11.099910, -7.933220, -10.206577, -5.132343, 0.002808] + flatplate_sst1994m.test_vals_aarch64 = [-13.022835, -9.956652, -11.102384, -7.928197, -10.206580, -5.132317, 0.002808] test_list.append(flatplate_sst1994m) # bump in channel - sst-v1994m @@ -63,8 +63,8 @@ def main(): bump_sst1994m.cfg_dir = "vandv/rans/bump_in_channel" bump_sst1994m.cfg_file = "turb_bump_sst.cfg" bump_sst1994m.test_iter = 5 - bump_sst1994m.test_vals = [-13.022054, -9.882710, -10.557148, -7.605034, -10.172437, -5.549948, 0.004904] - bump_sst1994m.test_vals_aarch64 = [-13.034665, -10.510699, -10.627802, -7.661320, -10.680337, -5.749566, 0.004972] + bump_sst1994m.test_vals = [-12.986182, -10.719941, -10.556276, -7.606531, -10.774915, -5.605156, 0.004972] + bump_sst1994m.test_vals_aarch64 = [-13.039365, -10.729085, -10.609923, -7.682911, -10.774915, -5.605087, 0.004972] test_list.append(bump_sst1994m) # SWBLI SA @@ -72,8 +72,8 @@ def main(): swbli_sa.cfg_dir = "vandv/rans/swbli" swbli_sa.cfg_file = "config_sa.cfg" swbli_sa.test_iter = 5 - swbli_sa.test_vals = [-11.564511, -10.836187, -11.792765, -10.383947, -15.718717, 0.002212, -2.993991, 1.340100] - swbli_sa.test_vals_aarch64 = [-11.564511, -10.836187, -11.792765, -10.383947, -15.718717, 0.002212, -2.993991, 1.340100] + swbli_sa.test_vals = [-11.530796, -10.915564, -12.034495, -10.538719, -15.922522, 0.002233, -3.359164, 1.340100] + swbli_sa.test_vals_aarch64 = [-11.530796, -10.915564, -12.034495, -10.538719, -15.922522, 0.002233, -3.359164, 1.340100] test_list.append(swbli_sa) @@ -82,7 +82,7 @@ def main(): swbli_sst.cfg_dir = "vandv/rans/swbli" swbli_sst.cfg_file = "config_sst.cfg" swbli_sst.test_iter = 5 - swbli_sst.test_vals = [-11.528112, -10.961624, -11.903226, -10.630539, -11.117619, -4.573066, 0.002318, -2.905628, -4.037947, 1.340100] + swbli_sst.test_vals = [-11.527743, -11.150388, -11.944923, -10.750834, -11.116769, -4.030059, 0.002339, -2.730391, -4.067274, 1.276300] test_list.append(swbli_sst) ########################## @@ -94,8 +94,8 @@ def main(): sandiajet_sst.cfg_dir = "vandv/species_transport/sandia_jet" sandiajet_sst.cfg_file = "validation.cfg" sandiajet_sst.test_iter = 5 - sandiajet_sst.test_vals = [-17.169907, -13.518707, -15.442566, -12.021165, -9.660040, -15.289842, 5.000000, -2.746249, 5.000000, -4.836800, 5.000000, -3.966350, 0.000259, 0.000000, 0.000000, 0.000259, 4047.400000, 3946.800000, 49.161000, 51.433000] - sandiajet_sst.test_vals_aarch64 = [-17.069026, -13.156800, -15.290567, -11.689831, -9.349978, -14.907311, 5.000000, -2.738947, 5.000000, -4.813747, 5.000000, -3.981740, 0.000259, 0.000000, 0.000000, 0.000259, 4047.400000, 3946.800000, 49.161000, 51.433000] + sandiajet_sst.test_vals = [-16.249917, -13.835991, -14.303372, -13.276035, -10.074262, -14.027223, 5, -1.672359, 5, -4.938477, 5, -3.462217, 2.5859e-04, 2.8215e-32, 4.5010e-68, 2.5859e-04, 4.0474e+03, 3.9468e+03, 4.9170e+01, 5.1441e+01] + sandiajet_sst.test_vals_aarch64 = [-16.249289, -13.833785, -14.303058, -13.276559, -10.267928, -14.027240, 5, -1.676412, 5, -4.815216, 5, -3.462247, 0.000259, 0, 0, 0.000259, 4047.4, 3946.8, 49.17, 51.441] test_list.append(sandiajet_sst) ################# diff --git a/UnitTests/SU2_CFD/gradients.cpp b/UnitTests/SU2_CFD/gradients.cpp index af3ad8a2fee..2f69d407d3a 100644 --- a/UnitTests/SU2_CFD/gradients.cpp +++ b/UnitTests/SU2_CFD/gradients.cpp @@ -133,7 +133,7 @@ void testGreenGauss() { C3DDoubleMatrix gradient(field.geometry->GetnPoint(), field.nVar, field.geometry->GetnDim()); computeGradientsGreenGauss(nullptr, MPI_QUANTITIES::SOLUTION, PERIODIC_NONE, *field.geometry.get(), - *field.config.get(), field, 0, field.nVar, -1, gradient); + *field.config.get(), field, 0, field.nVar, gradient); check(field, gradient); } @@ -145,7 +145,7 @@ void testLeastSquares(bool weighted) { C3DDoubleMatrix gradient(field.geometry->GetnPoint(), field.nVar, nDim); computeGradientsLeastSquares(nullptr, MPI_QUANTITIES::SOLUTION, PERIODIC_NONE, *field.geometry.get(), - *field.config.get(), weighted, field, 0, field.nVar, -1, gradient, R); + *field.config.get(), weighted, field, 0, field.nVar, gradient, R); check(field, gradient); } diff --git a/config_template.cfg b/config_template.cfg index 00334732b30..74832ef98db 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -21,7 +21,7 @@ SOLVER= EULER % Specify turbulence model (NONE, SA, SST) KIND_TURB_MODEL= NONE % -% Specify versions/corrections of the SST model (V2003m, V1994m, VORTICITY, KATO_LAUNDER, UQ, SUSTAINING, COMPRESSIBILITY-WILCOX, COMPRESSIBILITY-SARKAR, DIMENSIONLESS_LIMIT) +% Specify versions/corrections of the SST model (V2003m, V1994m, VORTICITY, KATO_LAUNDER, UQ, SUSTAINING) SST_OPTIONS= NONE % % Specify versions/corrections of the SA model (NEGATIVE, EDWARDS, WITHFT2, QCR2000, COMPRESSIBILITY, ROTATION, BCM, EXPERIMENTAL) @@ -1567,7 +1567,7 @@ CONV_NUM_METHOD_FLOW= ROE % Roe Low Dissipation function for Hybrid RANS/LES simulations (FD, NTS, NTS_DUCROS) ROE_LOW_DISSIPATION= FD % -% Roe dissipation coefficient +% Roe coefficient ROE_KAPPA= 0.5 % % Minimum value for beta for the Roe-Turkel preconditioner @@ -1801,10 +1801,6 @@ TIME_DISCRE_TURB= EULER_IMPLICIT % Reduction factor of the CFL coefficient in the turbulence problem CFL_REDUCTION_TURB= 1.0 -% Control lower limit constants of the SST model (C*phi_infinity) -LOWER_LIMIT_K_FACTOR= 1e-15 -LOWER_LIMIT_OMEGA_FACTOR= 1e-5 - % --------------------- HEAT NUMERICAL METHOD DEFINITION ----------------------% % % Value of the thermal diffusivity From 9db6939723251991b6de2fc716f42e369c7ecf97 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 4 Sep 2024 15:16:05 +0200 Subject: [PATCH 36/61] Changes for comments and reversion error fix --- Common/src/CConfig.cpp | 4 +++- SU2_CFD/include/interfaces/CInterface.hpp | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 9ffe757462a..d0a66d0763a 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -6050,8 +6050,10 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { if (Marker_MixingPlaneInterface != nullptr){ // Necessary in cases where no mixing plane interfaces are defined if (Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] != 0) { //Is a mixing plane /*--- Find which list position this marker is in turbomachinery markers ---*/ - const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); + const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2], Marker_CfgFile_TagBound[iMarker_CfgFile]); const auto target_index = target - Marker_Turbomachinery; + /*--- Assert that we find the marker within the turbomachienry markers ---*/ + assert(target != &Marker_Turbomachinery[nMarker_Turbomachinery*2]); /*--- Assign the correct interface ---*/ SetKind_TurboInterface(target_index - 1, TURBO_INTERFACE_KIND::MIXING_PLANE); // Need to subtract 1 from index as to not consider the inlet an interface } diff --git a/SU2_CFD/include/interfaces/CInterface.hpp b/SU2_CFD/include/interfaces/CInterface.hpp index 9ec0599827e..a86db24b12a 100644 --- a/SU2_CFD/include/interfaces/CInterface.hpp +++ b/SU2_CFD/include/interfaces/CInterface.hpp @@ -219,4 +219,9 @@ class CInterface { */ void GatherAverageValues(CSolver *donor_solution, CSolver *target_solution, unsigned short donorZone); + /*! + * \brief Set the contact resistance value for the solid-to-solid heat transfer interface. + * \param[in] val_contact_resistance - Contact resistance value in m^2/W + */ + inline virtual void SetContactResistance(su2double val_contact_resistance) {}; }; From d1064010667c8dd86368afe1f1b786d6d39c57b0 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 4 Sep 2024 17:20:26 +0200 Subject: [PATCH 37/61] Some changes after discussions --- Common/src/CConfig.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index d0a66d0763a..c90b6b79518 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -6050,16 +6050,16 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { if (Marker_MixingPlaneInterface != nullptr){ // Necessary in cases where no mixing plane interfaces are defined if (Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] != 0) { //Is a mixing plane /*--- Find which list position this marker is in turbomachinery markers ---*/ - const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2], Marker_CfgFile_TagBound[iMarker_CfgFile]); + const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); const auto target_index = target - Marker_Turbomachinery; /*--- Assert that we find the marker within the turbomachienry markers ---*/ - assert(target != &Marker_Turbomachinery[nMarker_Turbomachinery*2]); + assert(target != &Marker_Turbomachinery[nMarker_Turbomachinery*2-1]); /*--- Assign the correct interface ---*/ SetKind_TurboInterface(target_index - 1, TURBO_INTERFACE_KIND::MIXING_PLANE); // Need to subtract 1 from index as to not consider the inlet an interface } } - if (Marker_Fluid_InterfaceBound != nullptr){ // Necessary in cases where no fluid interfaces are defined - if (Marker_CfgFile_KindBC[iMarker_CfgFile] == BC_TYPE::FLUID_INTERFACE) { //Is a fluid interface + if (Marker_Fluid_InterfaceBound != nullptr){ // No fluid interfaces are defined in the config file (nullptr if no interfaces defined) + if (Marker_CfgFile_KindBC[iMarker_CfgFile] == BC_TYPE::FLUID_INTERFACE) { // iMarker_CfgFile is a fluid interface const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); const auto target_index = target - Marker_Turbomachinery; SetKind_TurboInterface(target_index-1, TURBO_INTERFACE_KIND::FROZEN_ROTOR); From ef3416af29fa5e607f4e6033dd8e7767c5cf820a Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 4 Sep 2024 17:55:40 +0200 Subject: [PATCH 38/61] This hopefully resolves the merge error I was having --- Common/include/CConfig.hpp | 17 +- Common/include/geometry/CGeometry.hpp | 24 +- .../include/geometry/CMultiGridGeometry.hpp | 3 +- Common/include/geometry/CPhysicalGeometry.hpp | 9 +- Common/include/geometry/dual_grid/CPoint.hpp | 8 +- .../meshreader/CCGNSMeshReaderFVM.hpp | 9 +- Common/include/option_structure.hpp | 25 + Common/src/CConfig.cpp | 28 +- Common/src/geometry/CGeometry.cpp | 182 ++---- Common/src/geometry/CMultiGridGeometry.cpp | 121 ++-- Common/src/geometry/CPhysicalGeometry.cpp | 8 +- .../src/grid_movement/CVolumetricMovement.cpp | 2 +- .../gradients/computeGradientsGreenGauss.hpp | 139 ++--- .../computeGradientsLeastSquares.hpp | 20 +- .../gradients/correctGradientsSymmetry.hpp | 146 +++++ SU2_CFD/include/interfaces/CInterface.hpp | 27 +- .../include/numerics/flow/convection/hllc.hpp | 4 +- .../numerics/turbulent/turb_sources.hpp | 81 ++- SU2_CFD/include/solvers/CEulerSolver.hpp | 34 +- .../include/solvers/CFVMFlowSolverBase.hpp | 19 +- .../include/solvers/CFVMFlowSolverBase.inl | 402 ++++--------- SU2_CFD/include/solvers/CScalarSolver.inl | 10 +- SU2_CFD/include/solvers/CSolver.hpp | 59 +- SU2_CFD/include/solvers/CSpeciesSolver.hpp | 13 +- SU2_CFD/include/solvers/CTurbSASolver.hpp | 17 +- SU2_CFD/include/solvers/CTurbSSTSolver.hpp | 17 +- SU2_CFD/include/variables/CEulerVariable.hpp | 4 +- SU2_CFD/include/variables/CVariable.hpp | 10 + SU2_CFD/src/drivers/CDriver.cpp | 44 +- SU2_CFD/src/drivers/CMultizoneDriver.cpp | 16 +- SU2_CFD/src/integration/CIntegration.cpp | 15 +- SU2_CFD/src/interfaces/CInterface.cpp | 11 +- .../src/iteration/CDiscAdjFluidIteration.cpp | 4 + SU2_CFD/src/numerics/flow/convection/fds.cpp | 2 +- SU2_CFD/src/numerics/flow/convection/hllc.cpp | 83 +-- SU2_CFD/src/numerics/flow/convection/roe.cpp | 6 +- SU2_CFD/src/solvers/CAdjEulerSolver.cpp | 10 +- SU2_CFD/src/solvers/CAdjNSSolver.cpp | 14 +- SU2_CFD/src/solvers/CAdjTurbSolver.cpp | 8 +- SU2_CFD/src/solvers/CEulerSolver.cpp | 565 +++++++----------- SU2_CFD/src/solvers/CNEMONSSolver.cpp | 2 +- SU2_CFD/src/solvers/CRadP1Solver.cpp | 10 +- SU2_CFD/src/solvers/CSolver.cpp | 61 +- SU2_CFD/src/solvers/CSpeciesSolver.cpp | 59 +- SU2_CFD/src/solvers/CTransLMSolver.cpp | 4 +- SU2_CFD/src/solvers/CTurbSASolver.cpp | 68 +-- SU2_CFD/src/solvers/CTurbSSTSolver.cpp | 92 +-- TestCases/TestCase.py | 2 +- .../naca0012/of_grad_cd.dat.ref | 76 +-- .../naca0012/of_grad_cd_disc.dat.ref | 76 +-- .../naca0012/of_grad_directdiff.dat.ref | 6 +- .../wedge/of_grad_combo.dat.ref | 8 +- .../disc_adj_fsi/dyn_fsi/grad_dv.opt.ref | 16 +- TestCases/disc_adj_heat/disc_adj_heat.cfg | 2 +- TestCases/euler/bluntbody/blunt.cfg | 2 +- TestCases/euler/channel/inv_channel_RK.cfg | 2 +- TestCases/euler/naca0012/inv_NACA0012_Roe.cfg | 8 +- TestCases/euler/wedge/inv_wedge_HLLC.cfg | 2 +- TestCases/fixed_cl/naca0012/inv_NACA0012.cfg | 12 +- .../lam_prem_ch4_cfd.cfg | 13 +- .../lam_prem_ch4_cht_cfd_fluid.cfg | 7 +- .../lam_prem_ch4_cht_cfd_master.cfg | 2 +- TestCases/hybrid_regression.py | 98 +-- TestCases/hybrid_regression_AD.py | 22 +- .../incomp_euler/naca0012/incomp_NACA0012.cfg | 8 +- TestCases/incomp_euler/nozzle/inv_nozzle.cfg | 6 +- .../incomp_navierstokes/sphere/sphere.cfg | 104 ++++ .../chtPinArray_2d/of_grad_findiff.csv.ref | 2 +- .../chtPinArray_3d/configMaster.cfg | 2 +- .../multiple_ffd/naca0012/of_grad_cd.dat.ref | 4 +- .../naca0012/of_grad_directdiff.dat.ref | 4 +- .../navierstokes/cylinder/lam_cylinder.cfg | 2 +- .../navierstokes/flatplate/lam_flatplate.cfg | 12 +- TestCases/nicf/edge/edge_PPR.cfg | 15 +- TestCases/nicf/edge/edge_VW.cfg | 16 +- TestCases/parallel_regression.py | 238 ++++---- TestCases/parallel_regression_AD.py | 24 +- .../translating_NACA0012/config.cfg | 20 +- .../translating_NACA0012/forces_0.csv.ref | 400 ++++++------- .../forces_0.csv.ref | 400 ++++++------- ...b_SST_flatplate_compressibility_Sarkar.cfg | 150 +++++ ...b_SST_flatplate_compressibility_Wilcox.cfg | 150 +++++ TestCases/rotating/naca0012/rot_NACA0012.cfg | 2 +- TestCases/serial_regression.py | 178 +++--- TestCases/serial_regression_AD.py | 30 +- ...iveVenturi_mixingmodel_heatcapacity_H2.cfg | 2 +- ...Venturi_mixingmodel_heatcapacity_H2_ND.cfg | 6 +- TestCases/tutorials.py | 40 +- .../user_defined_functions/lam_flatplate.cfg | 2 +- TestCases/vandv.py | 18 +- UnitTests/SU2_CFD/gradients.cpp | 4 +- config_template.cfg | 8 +- externals/codi | 2 +- subprojects/MLPCpp | 2 +- 94 files changed, 2531 insertions(+), 2186 deletions(-) create mode 100644 SU2_CFD/include/gradients/correctGradientsSymmetry.hpp create mode 100644 TestCases/incomp_navierstokes/sphere/sphere.cfg create mode 100644 TestCases/rans/flatplate/turb_SST_flatplate_compressibility_Sarkar.cfg create mode 100644 TestCases/rans/flatplate/turb_SST_flatplate_compressibility_Wilcox.cfg diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 0bec4282207..474deacf6a5 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -884,6 +884,8 @@ class CConfig { ReThetaT_FreeStream, /*!< \brief Freestream Transition Momentum Thickness Reynolds Number (for LM transition model) of the fluid. */ NuFactor_FreeStream, /*!< \brief Ratio of turbulent to laminar viscosity. */ NuFactor_Engine, /*!< \brief Ratio of turbulent to laminar viscosity at the engine. */ + KFactor_LowerLimit, /*!< \Non dimensional coefficient for lower limit of K in SST model. */ + OmegaFactor_LowerLimit, /*!< \Non dimensional coefficient for lower limit of omega in SST model. */ SecondaryFlow_ActDisk, /*!< \brief Ratio of turbulent to laminar viscosity at the actuator disk. */ Initial_BCThrust, /*!< \brief Ratio of turbulent to laminar viscosity at the actuator disk. */ Pressure_FreeStream, /*!< \brief Total pressure of the fluid. */ @@ -2014,6 +2016,18 @@ class CConfig { */ su2double GetNuFactor_FreeStream(void) const { return NuFactor_FreeStream; } + /*! + * \brief Get the k constant factor define a lower limit by multiplication with values in SST turbulence model. + * \return Non-dimensionalized freestream intensity. + */ + su2double GetKFactor_LowerLimit(void) const { return KFactor_LowerLimit; } + + /*! + * \brief Get the w constant factor define a lower limit by multiplication with values in SST turbulencemodel. + * \return Non-dimensionalized freestream intensity. + */ + su2double GetOmegaFactor_LowerLimit(void) const { return OmegaFactor_LowerLimit; } + /*! * \brief Get the value of the non-dimensionalized engine turbulence intensity. * \return Non-dimensionalized engine intensity. @@ -4334,8 +4348,7 @@ class CConfig { array GetNewtonKrylovDblParam(void) const { return NK_DblParam; } /*! - * \brief Get the relaxation coefficient of the linear solver for the implicit formulation. - * \return relaxation coefficient of the linear solver for the implicit formulation. + * \brief Returns the Roe kappa (multipler of the dissipation term). */ su2double GetRoe_Kappa(void) const { return Roe_Kappa; } diff --git a/Common/include/geometry/CGeometry.hpp b/Common/include/geometry/CGeometry.hpp index 582679ca6af..015aaf1fdc2 100644 --- a/Common/include/geometry/CGeometry.hpp +++ b/Common/include/geometry/CGeometry.hpp @@ -240,8 +240,10 @@ class CGeometry { unsigned long* nVertex{nullptr}; /*!< \brief Number of vertex for each marker. */ unsigned long* nElem_Bound{nullptr}; /*!< \brief Number of elements of the boundary. */ string* Tag_to_Marker{nullptr}; /*!< \brief Names of boundary markers. */ - vector - bound_is_straight; /*!< \brief Bool if boundary-marker is straight(2D)/plane(3D) for each local marker. */ + + /*!< \brief Corrected normals on nodes with shared symmetry markers. */ + vector>> symmetryNormals; + vector SurfaceAreaCfgFile; /*!< \brief Total Surface area for all markers. */ /*--- Partitioning-specific variables ---*/ @@ -819,6 +821,12 @@ class CGeometry { */ inline virtual void SetBoundControlVolume(const CConfig* config, unsigned short action) {} + /*! + * \brief Computes modified normals at intersecting symmetry planes. + * \param[in] config - Definition of the particular problem. + */ + void ComputeModifiedSymmetryNormals(const CConfig* config); + /*! * \brief A virtual member. * \param[in] config_filename - Name of the file where the tecplot information is going to be stored. @@ -936,9 +944,10 @@ class CGeometry { /*! * \brief A virtual member. * \param[in] fine_grid - Geometrical definition of the problem. + * \param[in] config - Definition of the particular problem. * \param[in] action - Allocate or not the new elements. */ - inline virtual void SetBoundControlVolume(const CGeometry* fine_grid, unsigned short action) {} + inline virtual void SetBoundControlVolume(const CGeometry* fine_grid, const CConfig* config, unsigned short action) {} /*! * \brief A virtual member. @@ -1005,15 +1014,6 @@ class CGeometry { */ su2double GetSurfaceArea(const CConfig* config, unsigned short val_marker) const; - /*! - * \brief Check if a boundary is straight(2D) / plane(3D) for EULER_WALL and SYMMETRY_PLANE - * only and store the information in bound_is_straight. For all other boundary types - * this will return false and could therfore be wrong. Used ultimately for BC_Slip_Wall. - * \param[in] config - Definition of the particular problem. - * \param[in] print_on_screen - Boolean whether to print result on screen. - */ - void ComputeSurf_Straightness(CConfig* config, bool print_on_screen); - /*! * \brief Find and store all vertices on a sharp corner in the geometry. * \param[in] config - Definition of the particular problem. diff --git a/Common/include/geometry/CMultiGridGeometry.hpp b/Common/include/geometry/CMultiGridGeometry.hpp index 1a7f7f9ab58..541aaa88d6d 100644 --- a/Common/include/geometry/CMultiGridGeometry.hpp +++ b/Common/include/geometry/CMultiGridGeometry.hpp @@ -104,9 +104,10 @@ class CMultiGridGeometry final : public CGeometry { /*! * \brief Set boundary vertex structure of the agglomerated control volume. * \param[in] fine_grid - Geometrical definition of the problem. + * \param[in] config - Definition of the particular problem. * \param[in] action - Allocate or not the new elements. */ - void SetBoundControlVolume(const CGeometry* fine_grid, unsigned short action) override; + void SetBoundControlVolume(const CGeometry* fine_grid, const CConfig* config, unsigned short action) override; /*! * \brief Set a representative coordinates of the agglomerated control volume. diff --git a/Common/include/geometry/CPhysicalGeometry.hpp b/Common/include/geometry/CPhysicalGeometry.hpp index 10e781cb85e..070bf015ab8 100644 --- a/Common/include/geometry/CPhysicalGeometry.hpp +++ b/Common/include/geometry/CPhysicalGeometry.hpp @@ -208,10 +208,13 @@ class CPhysicalGeometry final : public CGeometry { * \brief Routine to launch non-blocking sends and recvs amongst all processors. * \param[in] bufSend - Buffer of data to be sent. * \param[in] nElemSend - Array containing the number of elements to send to other processors in cumulative storage - * format. \param[in] sendReq - Array of MPI send requests. \param[in] bufRecv - Buffer of data to be received. + * format. + * \param[in] sendReq - Array of MPI send requests. + * \param[in] bufRecv - Buffer of data to be received. * \param[in] nElemSend - Array containing the number of elements to receive from other processors in cumulative - * storage format. \param[in] sendReq - Array of MPI recv requests. \param[in] countPerElem - Pieces of data per - * element communicated. + * storage format. + * \param[in] sendReq - Array of MPI recv requests. + * \param[in] countPerElem - Pieces of data per element communicated. */ void InitiateCommsAll(void* bufSend, const int* nElemSend, SU2_MPI::Request* sendReq, void* bufRecv, const int* nElemRecv, SU2_MPI::Request* recvReq, unsigned short countPerElem, diff --git a/Common/include/geometry/dual_grid/CPoint.hpp b/Common/include/geometry/dual_grid/CPoint.hpp index 9c73fdeaa9a..c297b1b5df9 100644 --- a/Common/include/geometry/dual_grid/CPoint.hpp +++ b/Common/include/geometry/dual_grid/CPoint.hpp @@ -314,10 +314,8 @@ class CPoint { * \return Index of the vertex. */ inline long GetVertex(unsigned long iPoint, unsigned long iMarker) const { - if (Boundary(iPoint)) - return Vertex[iPoint][iMarker]; - else - return -1; + if (Boundary(iPoint)) return Vertex[iPoint][iMarker]; + return -1; } /*! @@ -369,7 +367,7 @@ class CPoint { inline bool GetPhysicalBoundary(unsigned long iPoint) const { return PhysicalBoundary(iPoint); } /*! - * \brief Set if a point belong to the boundary. + * \brief Set if a point belong to the solid wall boundary. * \param[in] iPoint - Index of the point. * \param[in] boundary - TRUE if the point belong to the physical boundary; otherwise FALSE. */ diff --git a/Common/include/geometry/meshreader/CCGNSMeshReaderFVM.hpp b/Common/include/geometry/meshreader/CCGNSMeshReaderFVM.hpp index 7ef5ef88206..3b072222d41 100644 --- a/Common/include/geometry/meshreader/CCGNSMeshReaderFVM.hpp +++ b/Common/include/geometry/meshreader/CCGNSMeshReaderFVM.hpp @@ -121,10 +121,13 @@ class CCGNSMeshReaderFVM : public CMeshReaderFVM { * \brief Routine to launch non-blocking sends and recvs amongst all processors. * \param[in] bufSend - Buffer of data to be sent. * \param[in] nElemSend - Array containing the number of elements to send to other processors in cumulative storage - * format. \param[in] sendReq - Array of MPI send requests. \param[in] bufRecv - Buffer of data to be received. + * format. + * \param[in] sendReq - Array of MPI send requests. + * \param[in] bufRecv - Buffer of data to be received. * \param[in] nElemSend - Array containing the number of elements to receive from other processors in cumulative - * storage format. \param[in] sendReq - Array of MPI recv requests. \param[in] countPerElem - Pieces of data per - * element communicated. + * storage format. + * \param[in] sendReq - Array of MPI recv requests. + * \param[in] countPerElem - Pieces of data per element communicated. */ void InitiateCommsAll(void* bufSend, const int* nElemSend, SU2_MPI::Request* sendReq, void* bufRecv, const int* nElemRecv, SU2_MPI::Request* recvReq, unsigned short countPerElem, diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index ab32f398e76..7d36d111bda 100644 --- a/Common/include/option_structure.hpp +++ b/Common/include/option_structure.hpp @@ -991,6 +991,9 @@ enum class SST_OPTIONS { V, /*!< \brief Menter k-w SST model with vorticity production terms. */ KL, /*!< \brief Menter k-w SST model with Kato-Launder production terms. */ UQ, /*!< \brief Menter k-w SST model with uncertainty quantification modifications. */ + COMP_Wilcox, /*!< \brief Menter k-w SST model with Compressibility correction of Wilcox. */ + COMP_Sarkar, /*!< \brief Menter k-w SST model with Compressibility correction of Sarkar. */ + DLL, /*!< \brief Menter k-w SST model with dimensionless lower limit clipping of turbulence variables. */ }; static const MapType SST_Options_Map = { MakePair("NONE", SST_OPTIONS::NONE) @@ -1003,6 +1006,9 @@ static const MapType SST_Options_Map = { MakePair("VORTICITY", SST_OPTIONS::V) MakePair("KATO-LAUNDER", SST_OPTIONS::KL) MakePair("UQ", SST_OPTIONS::UQ) + MakePair("COMPRESSIBILITY-WILCOX", SST_OPTIONS::COMP_Wilcox) + MakePair("COMPRESSIBILITY-SARKAR", SST_OPTIONS::COMP_Sarkar) + MakePair("DIMENSIONLESS_LIMIT", SST_OPTIONS::DLL) }; /*! @@ -1014,6 +1020,9 @@ struct SST_ParsedOptions { bool sust = false; /*!< \brief Bool for SST model with sustaining terms. */ bool uq = false; /*!< \brief Bool for using uncertainty quantification. */ bool modified = false; /*!< \brief Bool for modified (m) SST model. */ + bool compWilcox = false; /*!< \brief Bool for compressibility correction of Wilcox. */ + bool compSarkar = false; /*!< \brief Bool for compressibility correction of Sarkar. */ + bool dll = false; /*!< \brief Bool dimensionless lower limit. */ }; /*! @@ -1049,6 +1058,9 @@ inline SST_ParsedOptions ParseSSTOptions(const SST_OPTIONS *SST_Options, unsigne const bool sst_v = IsPresent(SST_OPTIONS::V); const bool sst_kl = IsPresent(SST_OPTIONS::KL); const bool sst_uq = IsPresent(SST_OPTIONS::UQ); + const bool sst_compWilcox = IsPresent(SST_OPTIONS::COMP_Wilcox); + const bool sst_compSarkar = IsPresent(SST_OPTIONS::COMP_Sarkar); + const bool sst_dll = IsPresent(SST_OPTIONS::DLL); if (sst_1994 && sst_2003) { SU2_MPI::Error("Two versions (1994 and 2003) selected for SST_OPTIONS. Please choose only one.", CURRENT_FUNCTION); @@ -1069,9 +1081,22 @@ inline SST_ParsedOptions ParseSSTOptions(const SST_OPTIONS *SST_Options, unsigne SSTParsedOptions.production = SST_OPTIONS::UQ; } + // Parse compressibility options + if (sst_compWilcox && sst_compSarkar) { + SU2_MPI::Error("Please select only one compressibility correction (COMPRESSIBILITY-WILCOX or COMPRESSIBILITY-SARKAR).", CURRENT_FUNCTION); + } else if (sst_compWilcox) { + SSTParsedOptions.production = SST_OPTIONS::COMP_Wilcox; + } else if (sst_compSarkar) { + SSTParsedOptions.production = SST_OPTIONS::COMP_Sarkar; + } + SSTParsedOptions.sust = sst_sust; SSTParsedOptions.modified = sst_m; SSTParsedOptions.uq = sst_uq; + SSTParsedOptions.compWilcox = sst_compWilcox; + SSTParsedOptions.compSarkar = sst_compSarkar; + SSTParsedOptions.dll = sst_dll; + return SSTParsedOptions; } diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index c90b6b79518..4c6d8797ee6 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -1421,6 +1421,10 @@ void CConfig::SetConfig_Options() { /* DESCRIPTION: */ addDoubleOption("FREESTREAM_NU_FACTOR", NuFactor_FreeStream, 3.0); /* DESCRIPTION: */ + addDoubleOption("LOWER_LIMIT_K_FACTOR", KFactor_LowerLimit, 1.0e-15); + /* DESCRIPTION: */ + addDoubleOption("LOWER_LIMIT_OMEGA_FACTOR", OmegaFactor_LowerLimit, 1e-05); + /* DESCRIPTION: */ addDoubleOption("ENGINE_NU_FACTOR", NuFactor_Engine, 3.0); /* DESCRIPTION: */ addDoubleOption("ACTDISK_SECONDARY_FLOW", SecondaryFlow_ActDisk, 0.0); @@ -3478,9 +3482,12 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i saParsedOptions = ParseSAOptions(SA_Options, nSA_Options, rank); } - /*--- Check if turbulence model can be used for AXISYMMETRIC case---*/ - if (Axisymmetric && Kind_Turb_Model != TURB_MODEL::NONE && Kind_Turb_Model != TURB_MODEL::SST){ - SU2_MPI::Error("Axisymmetry is currently only supported for KIND_TURB_MODEL chosen as SST", CURRENT_FUNCTION); + if (Kind_Solver == MAIN_SOLVER::INC_RANS && sstParsedOptions.compSarkar){ + SU2_MPI::Error("COMPRESSIBILITY-SARKAR only supported for SOLVER= RANS", CURRENT_FUNCTION); + } + + if (Kind_Solver == MAIN_SOLVER::INC_RANS && sstParsedOptions.compWilcox){ + SU2_MPI::Error("COMPRESSIBILITY-WILCOX only supported for SOLVER= RANS", CURRENT_FUNCTION); } /*--- Postprocess LM_OPTIONS into structure. ---*/ @@ -6217,7 +6224,7 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { if (sstParsedOptions.version == SST_OPTIONS::V1994) cout << "-1994"; else cout << "-2003"; if (sstParsedOptions.modified) cout << "m"; - if (sstParsedOptions.sust) cout << " with sustaining terms, and"; + if (sstParsedOptions.sust) cout << " with sustaining terms,"; switch (sstParsedOptions.production) { case SST_OPTIONS::KL: @@ -6230,10 +6237,23 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { cout << "\nperturbing the Reynold's Stress Matrix towards " << eig_val_comp << " component turbulence"; if (uq_permute) cout << " (permuting eigenvectors)"; break; + case SST_OPTIONS::COMP_Wilcox: + cout << " with compressibility correction of Wilcox"; + break; + case SST_OPTIONS::COMP_Sarkar: + cout << " with compressibility correction of Sarkar"; + break; default: cout << " with no production modification"; break; } + + if (sstParsedOptions.dll){ + cout << "\nusing non dimensional lower limits relative to infinity values clipping by Coefficients:" ; + cout << " C_w= " << OmegaFactor_LowerLimit << " and C_k= " <SetControlVolume(geometry_container[iMesh - 1], UPDATE); - geometry_container[iMesh]->SetBoundControlVolume(geometry_container[iMesh - 1], UPDATE); + geometry_container[iMesh]->SetBoundControlVolume(geometry_container[iMesh - 1], config, UPDATE); geometry_container[iMesh]->SetCoord(geometry_container[iMesh - 1]); } @@ -2453,123 +2453,71 @@ su2double CGeometry::GetSurfaceArea(const CConfig* config, unsigned short val_ma return 0.0; } -void CGeometry::ComputeSurf_Straightness(CConfig* config, bool print_on_screen) { - bool RefUnitNormal_defined; - unsigned short iDim, iMarker, iMarker_Global, nMarker_Global = config->GetnMarker_CfgFile(); - unsigned long iVertex; - constexpr passivedouble epsilon = 1.0e-6; - su2double Area; - string Local_TagBound, Global_TagBound; - - vector Normal(nDim), UnitNormal(nDim), RefUnitNormal(nDim); - - /*--- Assume now that this boundary marker is straight. As soon as one - AreaElement is found that is not aligend with a Reference then it is - certain that the boundary marker is not straight and one can stop - searching. Another possibility is that this process doesn't own - any nodes of that boundary, in that case we also have to assume the - boundary is straight. - Any boundary type other than SYMMETRY_PLANE or EULER_WALL gets - the value false (or see cases specified in the conditional below) - which could be wrong. ---*/ - bound_is_straight.resize(nMarker); - fill(bound_is_straight.begin(), bound_is_straight.end(), true); - - /*--- Loop over all local markers ---*/ - for (iMarker = 0; iMarker < nMarker; iMarker++) { - Local_TagBound = config->GetMarker_All_TagBound(iMarker); - - /*--- Marker has to be Symmetry or Euler. Additionally marker can't be a - moving surface and Grid Movement Elasticity is forbidden as well. All - other GridMovements are rigid. ---*/ - if ((config->GetMarker_All_KindBC(iMarker) == SYMMETRY_PLANE || - config->GetMarker_All_KindBC(iMarker) == EULER_WALL) && - !config->GetMarker_Moving_Bool(Local_TagBound) && !config->GetMarker_Deform_Mesh_Bool(Local_TagBound)) { - /*--- Loop over all global markers, and find the local-global pair via - matching unique string tags. ---*/ - for (iMarker_Global = 0; iMarker_Global < nMarker_Global; iMarker_Global++) { - Global_TagBound = config->GetMarker_CfgFile_TagBound(iMarker_Global); - if (Local_TagBound == Global_TagBound) { - RefUnitNormal_defined = false; - iVertex = 0; - - while (bound_is_straight[iMarker] && iVertex < nVertex[iMarker]) { - vertex[iMarker][iVertex]->GetNormal(Normal.data()); - UnitNormal = Normal; - - /*--- Compute unit normal. ---*/ - Area = 0.0; - for (iDim = 0; iDim < nDim; iDim++) Area += Normal[iDim] * Normal[iDim]; - Area = sqrt(Area); - - /*--- Negate for outward convention. ---*/ - for (iDim = 0; iDim < nDim; iDim++) UnitNormal[iDim] /= -Area; - - /*--- Check if unit normal is within tolerance of the Reference unit normal. - Reference unit normal = first unit normal found. ---*/ - if (RefUnitNormal_defined) { - for (iDim = 0; iDim < nDim; iDim++) { - if (abs(RefUnitNormal[iDim] - UnitNormal[iDim]) > epsilon) { - bound_is_straight[iMarker] = false; - break; - } - } - } else { - RefUnitNormal = UnitNormal; // deep copy of values - RefUnitNormal_defined = true; - } +void CGeometry::ComputeModifiedSymmetryNormals(const CConfig* config) { + /* Check how many symmetry planes there are and use the first (lowest ID) as the basis to orthogonalize against. + * All nodes that are shared by multiple symmetries have to get a corrected normal. */ + symmetryNormals.resize(nMarker); + std::vector symMarkers; - iVertex++; - } // while iVertex - } // if Local == Global - } // for iMarker_Global - } else { - /*--- Enforce default value: false ---*/ - bound_is_straight[iMarker] = false; - } // if sym or euler ... - } // for iMarker - - /*--- Communicate results and print on screen. ---*/ - if (print_on_screen) { - /*--- Additional vector which can later be MPI::Allreduce(d) to pring the results - on screen as nMarker (local) can vary across ranks. Default 'true' as it can - happen that a local rank does not contain an element of each surface marker. ---*/ - vector bound_is_straight_Global(nMarker_Global, true); - /*--- Match local with global tag bound and fill a Global Marker vector. ---*/ - for (iMarker = 0; iMarker < nMarker; iMarker++) { - Local_TagBound = config->GetMarker_All_TagBound(iMarker); - for (iMarker_Global = 0; iMarker_Global < nMarker_Global; iMarker_Global++) { - Global_TagBound = config->GetMarker_CfgFile_TagBound(iMarker_Global); - - if (Local_TagBound == Global_TagBound) bound_is_straight_Global[iMarker_Global] = bound_is_straight[iMarker]; - - } // for iMarker_Global - } // for iMarker - - vector Buff_Send_isStraight(nMarker_Global), Buff_Recv_isStraight(nMarker_Global); - - /*--- Cast to int as std::vector can be a special construct. MPI handling using - is more straight-forward. ---*/ - for (iMarker_Global = 0; iMarker_Global < nMarker_Global; iMarker_Global++) - Buff_Send_isStraight[iMarker_Global] = static_cast(bound_is_straight_Global[iMarker_Global]); - - /*--- Product of type (bool) is equivalnt to a 'logical and' ---*/ - SU2_MPI::Allreduce(Buff_Send_isStraight.data(), Buff_Recv_isStraight.data(), nMarker_Global, MPI_INT, MPI_PROD, - SU2_MPI::GetComm()); - - /*--- Print results on screen. ---*/ - if (rank == MASTER_NODE) { - for (iMarker_Global = 0; iMarker_Global < nMarker_Global; iMarker_Global++) { - if (config->GetMarker_CfgFile_KindBC(config->GetMarker_CfgFile_TagBound(iMarker_Global)) == SYMMETRY_PLANE || - config->GetMarker_CfgFile_KindBC(config->GetMarker_CfgFile_TagBound(iMarker_Global)) == EULER_WALL) { - cout << "Boundary marker " << config->GetMarker_CfgFile_TagBound(iMarker_Global) << " is"; - if (!static_cast(Buff_Recv_isStraight[iMarker_Global])) cout << " NOT"; - if (nDim == 2) cout << " a single straight." << endl; - if (nDim == 3) cout << " a single plane." << endl; - } // if sym or euler - } // for iMarker_Global - } // if rank==MASTER - } // if print_on_scren + for (auto iMarker = 0u; iMarker < nMarker; ++iMarker) { + if ((config->GetMarker_All_KindBC(iMarker) == SYMMETRY_PLANE) || + (config->GetMarker_All_KindBC(iMarker) == EULER_WALL)) { + symMarkers.push_back(iMarker); + } + } + + /*--- Loop over all markers and find nodes on symmetry planes that are shared with other symmetries. ---*/ + /*--- The first symmetry does not need a corrected normal vector, hence start at 1. ---*/ + for (size_t i = 1; i < symMarkers.size(); ++i) { + const auto iMarker = symMarkers[i]; + + for (auto iVertex = 0ul; iVertex < nVertex[iMarker]; iVertex++) { + const auto iPoint = vertex[iMarker][iVertex]->GetNode(); + + /*--- Halo points do not need to be considered. ---*/ + if (!nodes->GetDomain(iPoint)) continue; + + /*--- Get the vertex normal on the current symmetry. ---*/ + std::array iNormal = {}; + vertex[iMarker][iVertex]->GetNormal(iNormal.data()); + + /*--- Loop over previous symmetries and if this point shares them, make this normal orthogonal to them. ---*/ + bool isShared = false; + + for (size_t j = 0; j < i; ++j) { + const auto jMarker = symMarkers[j]; + const auto jVertex = nodes->GetVertex(iPoint, jMarker); + if (jVertex < 0) continue; + + isShared = true; + + std::array jNormal = {}; + const auto it = symmetryNormals[jMarker].find(jVertex); + + if (it != symmetryNormals[jMarker].end()) { + jNormal = it->second; + } else { + vertex[jMarker][jVertex]->GetNormal(jNormal.data()); + const su2double area = GeometryToolbox::Norm(nDim, jNormal.data()); + for (auto iDim = 0u; iDim < nDim; iDim++) jNormal[iDim] /= area; + } + + const auto proj = GeometryToolbox::DotProduct(nDim, jNormal.data(), iNormal.data()); + for (auto iDim = 0u; iDim < nDim; iDim++) iNormal[iDim] -= proj * jNormal[iDim]; + } + + if (!isShared) continue; + + /*--- Normalize. If the norm is close to zero it means the normal is a linear combination of previous + * normals, in this case we don't need to store the corrected normal, using the original in the gradient + * correction will have no effect since previous corrections will remove components in this direction). ---*/ + const su2double area = GeometryToolbox::Norm(nDim, iNormal.data()); + if (area > EPS) { + for (auto iDim = 0u; iDim < nDim; iDim++) iNormal[iDim] /= area; + symmetryNormals[iMarker][iVertex] = iNormal; + } + } + } } void CGeometry::ComputeSurf_Curvature(CConfig* config) { diff --git a/Common/src/geometry/CMultiGridGeometry.cpp b/Common/src/geometry/CMultiGridGeometry.cpp index 5ae064d778f..00cc4ebf009 100644 --- a/Common/src/geometry/CMultiGridGeometry.cpp +++ b/Common/src/geometry/CMultiGridGeometry.cpp @@ -108,17 +108,27 @@ CMultiGridGeometry::CMultiGridGeometry(CGeometry* fine_grid, CConfig* config, un This can be improved. If there is only a marker, it is a good candidate for agglomeration ---*/ - if (counter == 1) agglomerate_seed = true; + if (counter == 1) { + agglomerate_seed = true; - /*--- If there are two markers, we will aglomerate if any of the + /*--- Euler walls can be curved and agglomerating them leads to difficulties ---*/ + if (config->GetMarker_All_KindBC(marker_seed) == EULER_WALL) agglomerate_seed = false; + } + /*--- If there are two markers, we will agglomerate if any of the markers is SEND_RECEIVE ---*/ if (counter == 2) { agglomerate_seed = (config->GetMarker_All_KindBC(copy_marker[0]) == SEND_RECEIVE) || (config->GetMarker_All_KindBC(copy_marker[1]) == SEND_RECEIVE); + + /* --- Euler walls can also not be agglomerated when the point has 2 markers ---*/ + if ((config->GetMarker_All_KindBC(copy_marker[0]) == EULER_WALL) || + (config->GetMarker_All_KindBC(copy_marker[1]) == EULER_WALL)) { + agglomerate_seed = false; + } } - /*--- If there are more than 2 markers, the aglomeration will be discarted ---*/ + /*--- If there are more than 2 markers, the aglomeration will be discarded ---*/ if (counter > 2) agglomerate_seed = false; @@ -220,7 +230,7 @@ CMultiGridGeometry::CMultiGridGeometry(CGeometry* fine_grid, CConfig* config, un const auto iPoint = MGQueue_InnerCV.NextCV(); iteration++; - /*--- If the element has not being previously agglomerated, belongs to the physical domain, + /*--- If the element has not been previously agglomerated, belongs to the physical domain, and satisfies several geometrical criteria then the seed CV is accepted for agglomeration. ---*/ if ((!fine_grid->nodes->GetAgglomerate(iPoint)) && (fine_grid->nodes->GetDomain(iPoint)) && @@ -438,7 +448,6 @@ CMultiGridGeometry::CMultiGridGeometry(CGeometry* fine_grid, CConfig* config, un /*--- Be careful, it is possible that a node changes the agglomeration configuration, the priority is always when receiving the information. ---*/ - fine_grid->nodes->SetParent_CV(iPoint_Fine, iPoint_Coarse); nodes->SetChildren_CV(iPoint_Coarse, nChildren_MPI[iPoint_Coarse], iPoint_Fine); nChildren_MPI[iPoint_Coarse]++; @@ -501,7 +510,7 @@ bool CMultiGridGeometry::SetBoundAgglomeration(unsigned long CVPoint, short mark const CConfig* config) const { bool agglomerate_CV = false; - /*--- Basic condition, the point has not being previously agglomerated, it belongs to the domain, + /*--- Basic condition, the point has not been previously agglomerated, it belongs to the domain, and has passed some basic geometrical checks. ---*/ if ((!fine_grid->nodes->GetAgglomerate(CVPoint)) && (fine_grid->nodes->GetDomain(CVPoint)) && @@ -511,6 +520,7 @@ bool CMultiGridGeometry::SetBoundAgglomeration(unsigned long CVPoint, short mark if (fine_grid->nodes->GetBoundary(CVPoint)) { /*--- Identify the markers of the vertex that we want to agglomerate ---*/ + // count number of markers on the agglomeration candidate int counter = 0; unsigned short copy_marker[3] = {}; for (auto jMarker = 0u; jMarker < fine_grid->GetnMarker() && counter < 3; jMarker++) { @@ -526,13 +536,22 @@ bool CMultiGridGeometry::SetBoundAgglomeration(unsigned long CVPoint, short mark /*--- Only one marker in the vertex that is going to be aglomerated ---*/ if (counter == 1) { - /*--- We agglomerate if there is only a marker and is the same marker as the seed marker ---*/ - + /*--- We agglomerate if there is only one marker and it is the same marker as the seed marker ---*/ + // note that this should be the same marker id, not just the same marker type if (copy_marker[0] == marker_seed) agglomerate_CV = true; /*--- If there is only one marker, but the marker is the SEND_RECEIVE ---*/ - if (config->GetMarker_All_KindBC(copy_marker[0]) == SEND_RECEIVE) agglomerate_CV = true; + if (config->GetMarker_All_KindBC(copy_marker[0]) == SEND_RECEIVE) { + agglomerate_CV = true; + } + + if ((config->GetMarker_All_KindBC(marker_seed) == SYMMETRY_PLANE) || + (config->GetMarker_All_KindBC(marker_seed) == EULER_WALL)) { + if (config->GetMarker_All_KindBC(copy_marker[0]) == SEND_RECEIVE) { + agglomerate_CV = false; + } + } } /*--- If there are two markers in the vertex that is going to be aglomerated ---*/ @@ -541,20 +560,25 @@ bool CMultiGridGeometry::SetBoundAgglomeration(unsigned long CVPoint, short mark /*--- First we verify that the seed is a physical boundary ---*/ if (config->GetMarker_All_KindBC(marker_seed) != SEND_RECEIVE) { - /*--- Then we check that one of the marker is equal to the seed marker, and the other is send/receive ---*/ + /*--- Then we check that one of the markers is equal to the seed marker, and the other is send/receive ---*/ if (((copy_marker[0] == marker_seed) && (config->GetMarker_All_KindBC(copy_marker[1]) == SEND_RECEIVE)) || - ((config->GetMarker_All_KindBC(copy_marker[0]) == SEND_RECEIVE) && (copy_marker[1] == marker_seed))) + ((config->GetMarker_All_KindBC(copy_marker[0]) == SEND_RECEIVE) && (copy_marker[1] == marker_seed))) { agglomerate_CV = true; + } } } - } - - /*--- If the element belongs to the domain, it is allways aglomerated. ---*/ - + /*--- If the element belongs to the domain, it is always agglomerated. ---*/ else { agglomerate_CV = true; + + // actually, for symmetry (and possibly other cells) we only agglomerate cells that are on the marker + // at this point, the seed was on the boundary and the CV was not. so we check if the seed is a symmetry + if ((config->GetMarker_All_KindBC(marker_seed) == SYMMETRY_PLANE) || + (config->GetMarker_All_KindBC(marker_seed) == EULER_WALL)) { + agglomerate_CV = false; + } } } @@ -900,44 +924,47 @@ void CMultiGridGeometry::SetControlVolume(const CGeometry* fine_grid, unsigned s END_SU2_OMP_SAFE_GLOBAL_ACCESS } -void CMultiGridGeometry::SetBoundControlVolume(const CGeometry* fine_grid, unsigned short action) { - BEGIN_SU2_OMP_SAFE_GLOBAL_ACCESS { - unsigned long iCoarsePoint, iFinePoint, FineVertex, iVertex; - unsigned short iMarker, iChildren, iDim; - su2double *Normal, Area, *NormalFace = nullptr; - - Normal = new su2double[nDim]; +void CMultiGridGeometry::SetBoundControlVolume(const CGeometry* fine_grid, const CConfig* config, + unsigned short action) { + unsigned long iCoarsePoint, iFinePoint, FineVertex, iVertex; + su2double Normal[MAXNDIM] = {0.0}, Area, *NormalFace = nullptr; - if (action != ALLOCATE) { - for (iMarker = 0; iMarker < nMarker; iMarker++) - for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) vertex[iMarker][iVertex]->SetZeroValues(); - } + if (action != ALLOCATE) { + SU2_OMP_FOR_DYN(1) + for (auto iMarker = 0; iMarker < nMarker; iMarker++) + for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) vertex[iMarker][iVertex]->SetZeroValues(); + END_SU2_OMP_FOR + } - for (iMarker = 0; iMarker < nMarker; iMarker++) - for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { - iCoarsePoint = vertex[iMarker][iVertex]->GetNode(); - for (iChildren = 0; iChildren < nodes->GetnChildren_CV(iCoarsePoint); iChildren++) { - iFinePoint = nodes->GetChildren_CV(iCoarsePoint, iChildren); - if (fine_grid->nodes->GetVertex(iFinePoint, iMarker) != -1) { - FineVertex = fine_grid->nodes->GetVertex(iFinePoint, iMarker); - fine_grid->vertex[iMarker][FineVertex]->GetNormal(Normal); - vertex[iMarker][iVertex]->AddNormal(Normal); - } + SU2_OMP_FOR_DYN(1) + for (auto iMarker = 0; iMarker < nMarker; iMarker++) { + for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { + iCoarsePoint = vertex[iMarker][iVertex]->GetNode(); + for (auto iChildren = 0; iChildren < nodes->GetnChildren_CV(iCoarsePoint); iChildren++) { + iFinePoint = nodes->GetChildren_CV(iCoarsePoint, iChildren); + if (fine_grid->nodes->GetVertex(iFinePoint, iMarker) != -1) { + FineVertex = fine_grid->nodes->GetVertex(iFinePoint, iMarker); + fine_grid->vertex[iMarker][FineVertex]->GetNormal(Normal); + vertex[iMarker][iVertex]->AddNormal(Normal); } } + } + } + END_SU2_OMP_FOR - delete[] Normal; - - /*--- Check if there is a normal with null area ---*/ - for (iMarker = 0; iMarker < nMarker; iMarker++) - for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { - NormalFace = vertex[iMarker][iVertex]->GetNormal(); - Area = GeometryToolbox::Norm(nDim, NormalFace); - if (Area == 0.0) - for (iDim = 0; iDim < nDim; iDim++) NormalFace[iDim] = EPS * EPS; - } + /*--- Check if there is a normal with null area ---*/ + SU2_OMP_FOR_DYN(1) + for (auto iMarker = 0; iMarker < nMarker; iMarker++) { + for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { + NormalFace = vertex[iMarker][iVertex]->GetNormal(); + Area = GeometryToolbox::Norm(nDim, NormalFace); + if (Area == 0.0) + for (auto iDim = 0; iDim < nDim; iDim++) NormalFace[iDim] = EPS * EPS; + } } - END_SU2_OMP_SAFE_GLOBAL_ACCESS + END_SU2_OMP_FOR + + SU2_OMP_SAFE_GLOBAL_ACCESS(ComputeModifiedSymmetryNormals(config);) } void CMultiGridGeometry::SetCoord(const CGeometry* fine_grid) { diff --git a/Common/src/geometry/CPhysicalGeometry.cpp b/Common/src/geometry/CPhysicalGeometry.cpp index 29f10a492b3..a069424c666 100644 --- a/Common/src/geometry/CPhysicalGeometry.cpp +++ b/Common/src/geometry/CPhysicalGeometry.cpp @@ -4124,7 +4124,7 @@ void CPhysicalGeometry::Check_IntElem_Orientation(const CConfig* config) { if (tria_flip + quad_flip + tet_flip + hexa_flip + pyram_flip + prism_flip + quad_error + pyram_error + prism_error + hexa_error == 0) { - cout << "All volume elements are correctly orientend." << endl; + cout << "All volume elements are correctly oriented." << endl; } } } @@ -4260,7 +4260,7 @@ void CPhysicalGeometry::Check_BoundElem_Orientation(const CConfig* config) { } if (line_flip + tria_flip + quad_flip + quad_error == 0) { - cout << "All surface elements are correctly orientend." << endl; + cout << "All surface elements are correctly oriented." << endl; } } } @@ -7283,6 +7283,8 @@ void CPhysicalGeometry::SetBoundControlVolume(const CConfig* config, unsigned sh } } END_SU2_OMP_FOR + + SU2_OMP_SAFE_GLOBAL_ACCESS(ComputeModifiedSymmetryNormals(config);) } void CPhysicalGeometry::VisualizeControlVolume(const CConfig* config) const { @@ -9558,7 +9560,7 @@ su2double CPhysicalGeometry::Compute_Length(su2double* Plane_P0, su2double* Plan su2double DeltaZ, DeltaX; /*--- Not that in a symmetry plane configuration there is an extra edge that connects - the two extremes, and we really don't now the curve orientation. We will evaluate + the two extremes, and we really don't know the curve orientation. We will evaluate both distance and picked the smallest one ---*/ Length_Value = 0.0; diff --git a/Common/src/grid_movement/CVolumetricMovement.cpp b/Common/src/grid_movement/CVolumetricMovement.cpp index a3f91fa36c1..efd2a6f2b74 100644 --- a/Common/src/grid_movement/CVolumetricMovement.cpp +++ b/Common/src/grid_movement/CVolumetricMovement.cpp @@ -98,7 +98,7 @@ void CVolumetricMovement::UpdateMultiGrid(CGeometry** geometry, CConfig* config) for (iMGlevel = 1; iMGlevel <= nMGlevel; iMGlevel++) { iMGfine = iMGlevel - 1; geometry[iMGlevel]->SetControlVolume(geometry[iMGfine], UPDATE); - geometry[iMGlevel]->SetBoundControlVolume(geometry[iMGfine], UPDATE); + geometry[iMGlevel]->SetBoundControlVolume(geometry[iMGfine], config, UPDATE); geometry[iMGlevel]->SetCoord(geometry[iMGfine]); if (config->GetGrid_Movement()) geometry[iMGlevel]->SetRestricted_GridVelocity(geometry[iMGfine]); } diff --git a/SU2_CFD/include/gradients/computeGradientsGreenGauss.hpp b/SU2_CFD/include/gradients/computeGradientsGreenGauss.hpp index 5d0abbb8537..f03668cafa1 100644 --- a/SU2_CFD/include/gradients/computeGradientsGreenGauss.hpp +++ b/SU2_CFD/include/gradients/computeGradientsGreenGauss.hpp @@ -27,7 +27,12 @@ * License along with SU2. If not, see . */ +#include +#include + #include "../../../Common/include/parallelization/omp_structure.hpp" +#include "../../../Common/include/toolboxes/geometry_toolbox.hpp" +#include "correctGradientsSymmetry.hpp" namespace detail { @@ -49,19 +54,13 @@ namespace detail { * \param[in] field - Generic object implementing operator (iPoint, iVar). * \param[in] varBegin - Index of first variable for which to compute the gradient. * \param[in] varEnd - Index of last variable for which to compute the gradient. + * \param[in] idxVel - Index of velocity, or -1 if no velocity present. * \param[out] gradient - Generic object implementing operator (iPoint, iVar, iDim). */ -template -void computeGradientsGreenGauss(CSolver* solver, - MPI_QUANTITIES kindMpiComm, - PERIODIC_QUANTITIES kindPeriodicComm, - CGeometry& geometry, - const CConfig& config, - const FieldType& field, - size_t varBegin, - size_t varEnd, - GradientType& gradient) -{ +template +void computeGradientsGreenGauss(CSolver* solver, MPI_QUANTITIES kindMpiComm, PERIODIC_QUANTITIES kindPeriodicComm, + CGeometry& geometry, const CConfig& config, const FieldType& field, + const size_t varBegin, const size_t varEnd, const int idxVel, GradientType& gradient) { const size_t nPointDomain = geometry.GetnPointDomain(); #ifdef HAVE_OMP @@ -70,11 +69,12 @@ void computeGradientsGreenGauss(CSolver* solver, const auto chunkSize = computeStaticChunkSize(nPointDomain, omp_get_max_threads(), OMP_MAX_CHUNK); #endif + static constexpr size_t MAXNVAR = 20; + /*--- For each (non-halo) volume integrate over its faces (edges). ---*/ SU2_OMP_FOR_DYN(chunkSize) - for (size_t iPoint = 0; iPoint < nPointDomain; ++iPoint) - { + for (size_t iPoint = 0; iPoint < nPointDomain; ++iPoint) { auto nodes = geometry.nodes; /*--- Cannot preaccumulate if hybrid parallel due to shared reading. ---*/ @@ -82,69 +82,59 @@ void computeGradientsGreenGauss(CSolver* solver, AD::SetPreaccIn(nodes->GetVolume(iPoint)); AD::SetPreaccIn(nodes->GetPeriodicVolume(iPoint)); - for (size_t iVar = varBegin; iVar < varEnd; ++iVar) - AD::SetPreaccIn(field(iPoint,iVar)); + for (size_t iVar = varBegin; iVar < varEnd; ++iVar) AD::SetPreaccIn(field(iPoint, iVar)); /*--- Clear the gradient. --*/ for (size_t iVar = varBegin; iVar < varEnd; ++iVar) - for (size_t iDim = 0; iDim < nDim; ++iDim) - gradient(iPoint, iVar, iDim) = 0.0; + for (size_t iDim = 0; iDim < nDim; ++iDim) gradient(iPoint, iVar, iDim) = 0.0; /*--- Handle averaging and division by volume in one constant. ---*/ - su2double halfOnVol = 0.5 / (nodes->GetVolume(iPoint)+nodes->GetPeriodicVolume(iPoint)); + su2double halfOnVol = 0.5 / (nodes->GetVolume(iPoint) + nodes->GetPeriodicVolume(iPoint)); /*--- Add a contribution due to each neighbor. ---*/ - for (size_t iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); ++iNeigh) - { - size_t iEdge = nodes->GetEdge(iPoint,iNeigh); - size_t jPoint = nodes->GetPoint(iPoint,iNeigh); + for (size_t iNeigh = 0; iNeigh < nodes->GetnPoint(iPoint); ++iNeigh) { + size_t iEdge = nodes->GetEdge(iPoint, iNeigh); + size_t jPoint = nodes->GetPoint(iPoint, iNeigh); /*--- Determine if edge points inwards or outwards of iPoint. * If inwards we need to flip the area vector. ---*/ - su2double dir = (iPoint < jPoint)? 1.0 : -1.0; + su2double dir = (iPoint < jPoint) ? 1.0 : -1.0; su2double weight = dir * halfOnVol; const auto area = geometry.edges->GetNormal(iEdge); AD::SetPreaccIn(area, nDim); - for (size_t iVar = varBegin; iVar < varEnd; ++iVar) - { - AD::SetPreaccIn(field(jPoint,iVar)); - - su2double flux = weight * (field(iPoint,iVar) + field(jPoint,iVar)); + for (size_t iVar = varBegin; iVar < varEnd; ++iVar) { + AD::SetPreaccIn(field(jPoint, iVar)); + su2double flux = weight * (field(iPoint, iVar) + field(jPoint, iVar)); - for (size_t iDim = 0; iDim < nDim; ++iDim) - gradient(iPoint, iVar, iDim) += flux * area[iDim]; + for (size_t iDim = 0; iDim < nDim; ++iDim) gradient(iPoint, iVar, iDim) += flux * area[iDim]; } - } for (size_t iVar = varBegin; iVar < varEnd; ++iVar) - for (size_t iDim = 0; iDim < nDim; ++iDim) - AD::SetPreaccOut(gradient(iPoint,iVar,iDim)); + for (size_t iDim = 0; iDim < nDim; ++iDim) AD::SetPreaccOut(gradient(iPoint, iVar, iDim)); AD::EndPreacc(); } END_SU2_OMP_FOR - /*--- Add boundary fluxes. ---*/ + su2double flux[MAXNVAR] = {0.0}; - for (size_t iMarker = 0; iMarker < geometry.GetnMarker(); ++iMarker) - { + /*--- Add edges of markers that contribute to the gradients ---*/ + for (size_t iMarker = 0; iMarker < geometry.GetnMarker(); ++iMarker) { if ((config.GetMarker_All_KindBC(iMarker) != INTERNAL_BOUNDARY) && (config.GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY) && - (config.GetMarker_All_KindBC(iMarker) != PERIODIC_BOUNDARY)) - { + (config.GetMarker_All_KindBC(iMarker) != PERIODIC_BOUNDARY)) { /*--- Work is shared in inner loop as two markers * may try to update the same point. ---*/ SU2_OMP_FOR_STAT(32) - for (size_t iVertex = 0; iVertex < geometry.GetnVertex(iMarker); ++iVertex) - { + for (size_t iVertex = 0; iVertex < geometry.GetnVertex(iMarker); ++iVertex) { size_t iPoint = geometry.vertex[iMarker][iVertex]->GetNode(); auto nodes = geometry.nodes; @@ -153,20 +143,25 @@ void computeGradientsGreenGauss(CSolver* solver, if (!nodes->GetDomain(iPoint)) continue; su2double volume = nodes->GetVolume(iPoint) + nodes->GetPeriodicVolume(iPoint); - const auto area = geometry.vertex[iMarker][iVertex]->GetNormal(); for (size_t iVar = varBegin; iVar < varEnd; iVar++) - { - su2double flux = field(iPoint,iVar) / volume; - - for (size_t iDim = 0; iDim < nDim; iDim++) - gradient(iPoint, iVar, iDim) -= flux * area[iDim]; - } - } + flux[iVar] = field(iPoint,iVar) / volume; + + for (size_t iVar = varBegin; iVar < varEnd; iVar++) { + for (size_t iDim = 0; iDim < nDim; iDim++) { + gradient(iPoint, iVar, iDim) -= flux[iVar] * area[iDim]; + } + } // loop over variables + } // vertices END_SU2_OMP_FOR - } - } + } //found right marker + } // iMarkers + + + /*--- Compute the corrections for symmetry planes and Euler walls. ---*/ + + correctGradientsSymmetry(geometry, config, varBegin, varEnd, idxVel, gradient); /*--- If no solver was provided we do not communicate ---*/ @@ -174,8 +169,7 @@ void computeGradientsGreenGauss(CSolver* solver, /*--- Account for periodic contributions. ---*/ - for (size_t iPeriodic = 1; iPeriodic <= config.GetnMarker_Periodic()/2; ++iPeriodic) - { + for (size_t iPeriodic = 1; iPeriodic <= config.GetnMarker_Periodic() / 2; ++iPeriodic) { solver->InitiatePeriodicComms(&geometry, &config, iPeriodic, kindPeriodicComm); solver->CompletePeriodicComms(&geometry, &config, iPeriodic, kindPeriodicComm); } @@ -184,35 +178,30 @@ void computeGradientsGreenGauss(CSolver* solver, solver->InitiateComms(&geometry, &config, kindMpiComm); solver->CompleteComms(&geometry, &config, kindMpiComm); - } -} // end namespace +} // namespace detail + + /*! * \brief Instantiations for 2D and 3D. * \ingroup FvmAlgos */ -template -void computeGradientsGreenGauss(CSolver* solver, - MPI_QUANTITIES kindMpiComm, - PERIODIC_QUANTITIES kindPeriodicComm, - CGeometry& geometry, - const CConfig& config, - const FieldType& field, - size_t varBegin, - size_t varEnd, - GradientType& gradient) { +template +void computeGradientsGreenGauss(CSolver* solver, MPI_QUANTITIES kindMpiComm, PERIODIC_QUANTITIES kindPeriodicComm, + CGeometry& geometry, const CConfig& config, const FieldType& field, + const size_t varBegin, const size_t varEnd, const int idxVel, GradientType& gradient) { switch (geometry.GetnDim()) { - case 2: - detail::computeGradientsGreenGauss<2>(solver, kindMpiComm, kindPeriodicComm, geometry, - config, field, varBegin, varEnd, gradient); - break; - case 3: - detail::computeGradientsGreenGauss<3>(solver, kindMpiComm, kindPeriodicComm, geometry, - config, field, varBegin, varEnd, gradient); - break; - default: - SU2_MPI::Error("Too many dimensions to compute gradients.", CURRENT_FUNCTION); - break; + case 2: + detail::computeGradientsGreenGauss<2>(solver, kindMpiComm, kindPeriodicComm, geometry, config, field, varBegin, + varEnd, idxVel, gradient); + break; + case 3: + detail::computeGradientsGreenGauss<3>(solver, kindMpiComm, kindPeriodicComm, geometry, config, field, varBegin, + varEnd, idxVel, gradient); + break; + default: + SU2_MPI::Error("Too many dimensions to compute gradients.", CURRENT_FUNCTION); + break; } } diff --git a/SU2_CFD/include/gradients/computeGradientsLeastSquares.hpp b/SU2_CFD/include/gradients/computeGradientsLeastSquares.hpp index 29daee7f06e..ef476e7a3df 100644 --- a/SU2_CFD/include/gradients/computeGradientsLeastSquares.hpp +++ b/SU2_CFD/include/gradients/computeGradientsLeastSquares.hpp @@ -28,6 +28,7 @@ #include "../../../Common/include/parallelization/omp_structure.hpp" #include "../../../Common/include/toolboxes/geometry_toolbox.hpp" +#include "correctGradientsSymmetry.hpp" namespace detail { @@ -175,6 +176,7 @@ FORCEINLINE void solveLeastSquares(size_t iPoint, * \param[in] field - Generic object implementing operator (iPoint, iVar). * \param[in] varBegin - Index of first variable for which to compute the gradient. * \param[in] varEnd - Index of last variable for which to compute the gradient. + * \param[in] idxVel - Index to velocity, -1 if no velocity is present in the solver. * \param[out] gradient - Generic object implementing operator (iPoint, iVar, iDim). * \param[out] Rmatrix - Generic object implementing operator (iPoint, iDim, iDim). */ @@ -186,8 +188,9 @@ void computeGradientsLeastSquares(CSolver* solver, const CConfig& config, bool weighted, const FieldType& field, - size_t varBegin, - size_t varEnd, + const size_t varBegin, + const size_t varEnd, + const int idxVel, GradientType& gradient, RMatrixType& Rmatrix) { @@ -312,6 +315,10 @@ void computeGradientsLeastSquares(CSolver* solver, END_SU2_OMP_FOR } + /* --- compute the corrections for symmetry planes and Euler walls. --- */ + + correctGradientsSymmetry(geometry, config, varBegin, varEnd, idxVel, gradient); + /*--- If no solver was provided we do not communicate ---*/ if (solver != nullptr) @@ -337,18 +344,19 @@ void computeGradientsLeastSquares(CSolver* solver, const CConfig& config, bool weighted, const FieldType& field, - size_t varBegin, - size_t varEnd, + const size_t varBegin, + const size_t varEnd, + const int idxVel, GradientType& gradient, RMatrixType& Rmatrix) { switch (geometry.GetnDim()) { case 2: detail::computeGradientsLeastSquares<2>(solver, kindMpiComm, kindPeriodicComm, geometry, config, - weighted, field, varBegin, varEnd, gradient, Rmatrix); + weighted, field, varBegin, varEnd, idxVel, gradient, Rmatrix); break; case 3: detail::computeGradientsLeastSquares<3>(solver, kindMpiComm, kindPeriodicComm, geometry, config, - weighted, field, varBegin, varEnd, gradient, Rmatrix); + weighted, field, varBegin, varEnd, idxVel, gradient, Rmatrix); break; default: SU2_MPI::Error("Too many dimensions to compute gradients.", CURRENT_FUNCTION); diff --git a/SU2_CFD/include/gradients/correctGradientsSymmetry.hpp b/SU2_CFD/include/gradients/correctGradientsSymmetry.hpp new file mode 100644 index 00000000000..a17ce827184 --- /dev/null +++ b/SU2_CFD/include/gradients/correctGradientsSymmetry.hpp @@ -0,0 +1,146 @@ +/*! + * \file correctGradientsSymmetry.hpp + * \brief Implements the symmetry boundary conditions for the gradient computations. + * \author N. Beishuizen + * \version 8.0.1 "Harrier" + * + * SU2 Project Website: https://su2code.github.io + * + * The SU2 Project is maintained by the SU2 Foundation + * (http://su2foundation.org) + * + * Copyright 2012-2024, SU2 Contributors (cf. AUTHORS.md) + * + * SU2 is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * SU2 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with SU2. If not, see . + */ + +#pragma once + +#include +#include + +#include "../../../Common/include/parallelization/omp_structure.hpp" +#include "../../../Common/include/toolboxes/geometry_toolbox.hpp" + +namespace detail { +/*! + * \brief Correct the gradient on a symmetry plane. + * \ingroup FvmAlgos + * \param[in] varBegin - Start of the variables. + * \param[in] varEnd - End of the variables. + * \param[in] idxVel - Variable index where velocity gradients start (-1 if all variables are scalars). + * \param[in] n - Normal direction. + * \param[in, out] gradients - The gradients to be modified. + */ +template +inline void correctGradient(const size_t varBegin, const size_t varEnd, const int idxVel, const Scalar* n, + Matrix&& gradients) { + + /*--- First we correct the part that involves velocities. ---*/ + + if (idxVel >= static_cast(varBegin) && idxVel + nDim <= varEnd) { + /*--- Normal gradient of velocity components and gradient of normal velocity. ---*/ + su2double normalGrad[nDim] = {}, gradNormalVel[nDim] = {}; + + for (size_t iDim = 0; iDim < nDim; iDim++) { + normalGrad[iDim] = GeometryToolbox::DotProduct(nDim, gradients[idxVel + iDim], n); + + for (size_t jDim = 0; jDim < nDim; jDim++) { + gradNormalVel[jDim] += n[iDim] * gradients[idxVel + iDim][jDim]; + } + } + + /*--- Normal gradient of the normal velocity. ---*/ + const su2double normalGradNormalVel = GeometryToolbox::DotProduct(nDim, n, gradNormalVel); + + /*--- Remove the tangential projection (I - n.n^T) of the normal gradients. + * And the normal projection (n.n^T) of the tangential gradients. + * dV = dV - (I - n.n^T) dV n.n^T - n.n^T dV (I - n.n^T) ---*/ + + for (size_t iDim = 0; iDim < nDim; iDim++) { + for (size_t jDim = 0; jDim < nDim; jDim++) { + gradients[idxVel + iDim][jDim] -= normalGrad[iDim] * n[jDim] + n[iDim] * gradNormalVel[jDim]; + gradients[idxVel + iDim][jDim] += 2 * n[iDim] * normalGradNormalVel * n[jDim]; + } + } + } + + /*--- Remove the normal component for all scalars (excluding velocities). ---*/ + + for (auto iVar = varBegin; iVar < varEnd; iVar++) { + if (idxVel != -1 && static_cast(iVar) >= idxVel && iVar < idxVel + nDim) continue; + + const su2double normalGrad = GeometryToolbox::DotProduct(nDim, n, gradients[iVar]); + for (size_t iDim = 0; iDim < nDim; iDim++) { + gradients[iVar][iDim] -= normalGrad * n[iDim]; + } + } +} +} + +/*! + * \brief Correct gradients on symmetry and Euler (slip) markers to respect the conditions: + * 1. n.grad(phi) = 0 + * 2. n.grad(v.t) = 0 + * 3. t.grad(v.n) = 0 + * \note See Blazek eq. 8.40. + * \ingroup FvmAlgos + * \param[in] geometry - Geometric grid properties. + * \param[in] config - Configuration of the problem, used to identify types of boundaries. + * \param[in] varBegin - Index of first variable for which to compute the gradient. + * \param[in] varEnd - Index of last variable for which to compute the gradient. + * \param[in] idxVel - Index to velocity, -1 if no velocity is present in the solver. + * \param[in,out] gradient - Generic object implementing operator (iPoint, iVar, iDim). + */ +template +void correctGradientsSymmetry(CGeometry& geometry, const CConfig& config, const size_t varBegin, + const size_t varEnd, const int idxVel, GradientType& gradient) { + + /*--- Check how many symmetry planes there are. ---*/ + std::vector symMarkers; + for (auto iMarker = 0u; iMarker < geometry.GetnMarker(); ++iMarker) { + if (config.GetMarker_All_KindBC(iMarker) == SYMMETRY_PLANE || + config.GetMarker_All_KindBC(iMarker) == EULER_WALL) { + symMarkers.push_back(iMarker); + } + } + + for (const auto iMarker : symMarkers) { + SU2_OMP_FOR_STAT(32) + for (size_t iVertex = 0; iVertex < geometry.GetnVertex(iMarker); ++iVertex) { + + const auto iPoint = geometry.vertex[iMarker][iVertex]->GetNode(); + + /*--- Get the normal of the current symmetry. This may be the original normal of the vertex + * or a modified normal if there are intersecting symmetries. ---*/ + + su2double unitNormal[nDim] = {}; + const auto it = geometry.symmetryNormals[iMarker].find(iVertex); + + if (it != geometry.symmetryNormals[iMarker].end()) { + for (auto iDim = 0u; iDim < nDim; iDim++) unitNormal[iDim] = it->second[iDim]; + } else { + geometry.vertex[iMarker][iVertex]->GetNormal(unitNormal); + const su2double area = GeometryToolbox::Norm(nDim, unitNormal); + for (auto iDim = 0u; iDim < nDim; iDim++) unitNormal[iDim] /= area; + } + + detail::correctGradient(varBegin, varEnd, idxVel, unitNormal, gradient[iPoint]); + + } // loop over vertices + END_SU2_OMP_FOR + } // markers + +} + diff --git a/SU2_CFD/include/interfaces/CInterface.hpp b/SU2_CFD/include/interfaces/CInterface.hpp index a86db24b12a..9c10f8c4dfe 100644 --- a/SU2_CFD/include/interfaces/CInterface.hpp +++ b/SU2_CFD/include/interfaces/CInterface.hpp @@ -159,14 +159,14 @@ class CInterface { const CConfig *target_config, unsigned long Marker_Target, unsigned long Vertex_Target, unsigned long Point_Target) = 0; - /*! - * \brief A virtual member. - * \param[in] target_solution - Solution from the target mesh. - * \param[in] target_solution - Solution from the target mesh. - * \param[in] donor_zone - Index of the donorZone. - */ - inline virtual void SetAverageValues(CSolver *donor_solution, CSolver *target_solution, - unsigned short donorZone) { } + // /*! + // * \brief A virtual member. + // * \param[in] target_solution - Solution from the target mesh. + // * \param[in] target_solution - Solution from the target mesh. + // * \param[in] donor_zone - Index of the donorZone. + // */ + // inline virtual void SetAverageValues(CSolver *donor_solution, CSolver *target_solution, + // unsigned short donorZone) { } /*! * \brief A virtual member. @@ -185,6 +185,15 @@ class CInterface { */ inline virtual void SetSpanWiseLevels(const CConfig *donor_config, const CConfig *target_config) { } + /*! + * \brief A virtual member. + * \param[in] target_solution - Solution from the target mesh. + * \param[in] target_solution - Solution from the target mesh. + * \param[in] donor_zone - Index of the donorZone. + */ + inline virtual void SetAverageValues(CSolver *donor_solution, CSolver *target_solution, + unsigned short donorZone) { } + /*! * \brief Transfer pre-processing for the mixing plane inteface. * \param[in] donor_geometry - Geometry of the donor mesh. @@ -207,7 +216,7 @@ class CInterface { void AllgatherAverage(CSolver *donor_solution, CSolver *target_solution, CGeometry *donor_geometry, CGeometry *target_geometry, const CConfig *donor_config, const CConfig *target_config, unsigned short iMarkerInt); - + /*! * \brief Interpolate data and scatter it into different processors, for matching meshes. * \param[in] donor_solution - Solution from the donor mesh. diff --git a/SU2_CFD/include/numerics/flow/convection/hllc.hpp b/SU2_CFD/include/numerics/flow/convection/hllc.hpp index 5cac798825e..62d46a7d211 100644 --- a/SU2_CFD/include/numerics/flow/convection/hllc.hpp +++ b/SU2_CFD/include/numerics/flow/convection/hllc.hpp @@ -49,7 +49,7 @@ class CUpwHLLC_Flow final : public CNumerics { su2double sq_velRoe, RoeDensity, RoeEnthalpy, RoeSoundSpeed, RoeProjVelocity, ProjInterfaceVel; - su2double sL, sR, sM, pStar, EStar, rhoSL, rhoSR, Rrho, kappa; + su2double sL, sR, sM, pStar, EStar, rhoSL, rhoSR, Rrho; su2double Omega, RHO, OmegaSM; su2double *dSm_dU, *dPI_dU, *drhoStar_dU, *dpStar_dU, *dEStar_dU; @@ -102,7 +102,7 @@ class CUpwGeneralHLLC_Flow final : public CNumerics { su2double sq_velRoe, RoeDensity, RoeEnthalpy, RoeSoundSpeed, RoeProjVelocity, ProjInterfaceVel; su2double Kappa_i, Kappa_j, Chi_i, Chi_j, RoeKappa, RoeChi, RoeKappaStaticEnthalpy; - su2double sL, sR, sM, pStar, EStar, rhoSL, rhoSR, Rrho, kappa; + su2double sL, sR, sM, pStar, EStar, rhoSL, rhoSR, Rrho; su2double Omega, RHO, OmegaSM; su2double *dSm_dU, *dPI_dU, *drhoStar_dU, *dpStar_dU, *dEStar_dU; diff --git a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp index bdf9d0c6fc4..ce75b38f115 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp @@ -77,9 +77,41 @@ class CSourceBase_TurbSA : public CNumerics { const FlowIndices idx; /*!< \brief Object to manage the access to the flow primitives. */ const SA_ParsedOptions options; /*!< \brief Struct with SA options. */ + const bool axisymmetric = false; bool transition_LM; + /*! + * \brief Add contribution from diffusion due to axisymmetric formulation to 2D residual + */ + inline void ResidualAxisymmetricDiffusion(su2double sigma) { + if (Coord_i[1] < EPS) return; + + const su2double yinv = 1.0 / Coord_i[1]; + const su2double& nue = ScalarVar_i[0]; + + const auto& density = V_i[idx.Density()]; + const auto& laminar_viscosity = V_i[idx.LaminarViscosity()]; + + const su2double nu = laminar_viscosity/density; + + su2double nu_e; + + if (options.version == SA_OPTIONS::NEG && nue < 0.0) { + const su2double cn1 = 16.0; + const su2double Xi = nue / nu; + const su2double fn = (cn1 + Xi*Xi*Xi) / (cn1 - Xi*Xi*Xi); + nu_e = nu + fn * nue; + } else { + nu_e = nu + nue; + } + + /* Diffusion source term */ + const su2double dv_axi = (1.0/sigma)*nu_e*ScalarVar_Grad_i[0][1]; + + Residual += yinv * dv_axi * Volume; + } + public: /*! * \brief Constructor of the class. @@ -90,6 +122,7 @@ class CSourceBase_TurbSA : public CNumerics { : CNumerics(nDim, 1, config), idx(nDim, config->GetnSpecies()), options(config->GetSAParsedOptions()), + axisymmetric(config->GetAxisymmetric()), transition_LM(config->GetKind_Trans_Model() == TURB_TRANS_MODEL::LM) { /*--- Setup the Jacobian pointer, we need to return su2double** but we know * the Jacobian is 1x1 so we use this trick to avoid heap allocation. ---*/ @@ -217,6 +250,9 @@ class CSourceBase_TurbSA : public CNumerics { SourceTerms::get(ScalarVar_i[0], var, Production, Destruction, CrossProduction, Jacobian_i[0]); Residual = (Production - Destruction + CrossProduction) * Volume; + + if (axisymmetric) ResidualAxisymmetricDiffusion(var.sigma); + Jacobian_i[0] *= Volume; } @@ -520,6 +556,19 @@ class CCompressibilityCorrection final : public ParentClass { const su2double d_CompCorrection = 2.0 * c5 * ScalarVar_i[0] / pow(sound_speed, 2) * aux_cc * Volume; const su2double CompCorrection = 0.5 * ScalarVar_i[0] * d_CompCorrection; + /*--- Axisymmetric contribution ---*/ + if (this->axisymmetric && this->Coord_i[1] > EPS) { + const su2double yinv = 1.0 / this->Coord_i[1]; + const su2double nue = ScalarVar_i[0]; + const su2double v = V_i[idx.Velocity() + 1]; + + const su2double d_axiCorrection = 2.0 * c5 * nue * pow(v * yinv / sound_speed, 2) * Volume; + const su2double axiCorrection = 0.5 * nue * d_axiCorrection; + + this->Residual -= axiCorrection; + this->Jacobian_i[0] -= d_axiCorrection; + } + this->Residual -= CompCorrection; this->Jacobian_i[0] -= d_CompCorrection; @@ -740,6 +789,7 @@ class CSourcePieceWise_TurbSST final : public CNumerics { AD::SetPreaccIn(Vorticity_i, 3); AD::SetPreaccIn(V_i[idx.Density()], V_i[idx.LaminarViscosity()], V_i[idx.EddyViscosity()]); AD::SetPreaccIn(V_i[idx.Velocity() + 1]); + AD::SetPreaccIn(V_i[idx.SoundSpeed()]); Density_i = V_i[idx.Density()]; Laminar_Viscosity_i = V_i[idx.LaminarViscosity()]; @@ -778,6 +828,8 @@ class CSourcePieceWise_TurbSST final : public CNumerics { const su2double VorticityMag = GeometryToolbox::Norm(3, Vorticity_i); su2double P_Base = 0; + su2double zetaFMt = 0.0; + const su2double Mt = sqrt(2.0 * ScalarVar_i[0]) / V_i[idx.SoundSpeed()]; /*--- Apply production term modifications ---*/ switch (sstParsedOptions.production) { @@ -795,6 +847,20 @@ class CSourcePieceWise_TurbSST final : public CNumerics { P_Base = sqrt(StrainMag_i*VorticityMag); break; + case SST_OPTIONS::COMP_Wilcox: + P_Base = StrainMag_i; + if (Mt >= 0.25) { + zetaFMt = 2.0 * (Mt * Mt - 0.25 * 0.25); + } + break; + + case SST_OPTIONS::COMP_Sarkar: + P_Base = StrainMag_i; + if (Mt >= 0.25) { + zetaFMt = 0.5 * (Mt * Mt); + } + break; + default: /*--- Base production term for SST-1994 and SST-2003 ---*/ P_Base = StrainMag_i; @@ -831,10 +897,15 @@ class CSourcePieceWise_TurbSST final : public CNumerics { pw = max(pw, sust_w); } + if (sstParsedOptions.production == SST_OPTIONS::COMP_Sarkar) { + const su2double Dilatation_Sarkar = -0.15 * pk * Mt + 0.2 * beta_star * (1.0 +zetaFMt) * Density_i * ScalarVar_i[1] * ScalarVar_i[0] * Mt * Mt; + pk += Dilatation_Sarkar; + } + /*--- Dissipation ---*/ - su2double dk = beta_star * Density_i * ScalarVar_i[1] * ScalarVar_i[0]; - su2double dw = beta_blended * Density_i * ScalarVar_i[1] * ScalarVar_i[1]; + su2double dk = beta_star * Density_i * ScalarVar_i[1] * ScalarVar_i[0] * (1.0 + zetaFMt); + su2double dw = beta_blended * Density_i * ScalarVar_i[1] * ScalarVar_i[1] * (1.0 - 0.09/beta_blended * zetaFMt); /*--- LM model coupling with production and dissipation term for k transport equation---*/ if (config->GetKind_Trans_Model() == TURB_TRANS_MODEL::LM) { @@ -862,10 +933,10 @@ class CSourcePieceWise_TurbSST final : public CNumerics { /*--- Implicit part ---*/ - Jacobian_i[0][0] = -beta_star * ScalarVar_i[1] * Volume; - Jacobian_i[0][1] = -beta_star * ScalarVar_i[0] * Volume; + Jacobian_i[0][0] = -beta_star * ScalarVar_i[1] * Volume * (1.0 + zetaFMt); + Jacobian_i[0][1] = -beta_star * ScalarVar_i[0] * Volume * (1.0 + zetaFMt); Jacobian_i[1][0] = 0.0; - Jacobian_i[1][1] = -2.0 * beta_blended * ScalarVar_i[1] * Volume; + Jacobian_i[1][1] = -2.0 * beta_blended * ScalarVar_i[1] * Volume * (1.0 - 0.09/beta_blended * zetaFMt); } AD::SetPreaccOut(Residual, nVar); diff --git a/SU2_CFD/include/solvers/CEulerSolver.hpp b/SU2_CFD/include/solvers/CEulerSolver.hpp index d498b84c225..87700590937 100644 --- a/SU2_CFD/include/solvers/CEulerSolver.hpp +++ b/SU2_CFD/include/solvers/CEulerSolver.hpp @@ -590,7 +590,7 @@ class CEulerSolver : public CFVMFlowSolverBaseGetnMarker(); iMarker++) { if ((config->GetMarker_All_KindBC(iMarker) != INTERNAL_BOUNDARY) && + (config->GetMarker_All_KindBC(iMarker) != SYMMETRY_PLANE) && + (config->GetMarker_All_KindBC(iMarker) != EULER_WALL) && (config->GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY) && (config->GetMarker_All_KindBC(iMarker) != PERIODIC_BOUNDARY)) { @@ -667,6 +669,8 @@ class CFVMFlowSolverBase : public CSolver { for (unsigned short iMarker = 0; iMarker < geometry->GetnMarker(); iMarker++) { if ((config->GetMarker_All_KindBC(iMarker) != INTERNAL_BOUNDARY) && + (config->GetMarker_All_KindBC(iMarker) != SYMMETRY_PLANE) && + (config->GetMarker_All_KindBC(iMarker) != EULER_WALL) && (config->GetMarker_All_KindBC(iMarker) != NEARFIELD_BOUNDARY) && (config->GetMarker_All_KindBC(iMarker) != PERIODIC_BOUNDARY)) { @@ -1095,22 +1099,21 @@ class CFVMFlowSolverBase : public CSolver { /*! * \brief Store of a set of provided inlet profile values at a vertex. * \param[in] val_inlet - vector containing the inlet values for the current vertex. - * \param[in] iMarker - Surface marker where the coefficient is computed. + * \param[in] iMarker - Index of the surface marker. * \param[in] iVertex - Vertex of the marker iMarker where the inlet is being set. */ void SetInletAtVertex(const su2double* val_inlet, unsigned short iMarker, unsigned long iVertex) final; /*! - * \brief Get the set of value imposed at an inlet. - * \param[in] val_inlet - vector returning the inlet values for the current vertex. - * \param[in] val_inlet_point - Node index where the inlet is being set. - * \param[in] val_kind_marker - Enumerated type for the particular inlet type. + * \brief Get the set of values imposed at an inlet. + * \param[in] iMarker - Index of the surface marker. + * \param[in] iVertex - Vertex of the marker iMarker where the inlet is being set. * \param[in] geometry - Geometrical definition of the problem. - * \param config - Definition of the particular problem. + * \param[in,out] val_inlet - vector returning the inlet values for the current vertex. * \return Value of the face area at the vertex. */ - su2double GetInletAtVertex(su2double* val_inlet, unsigned long val_inlet_point, unsigned short val_kind_marker, - string val_marker, const CGeometry* geometry, const CConfig* config) const final; + su2double GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, + const CGeometry* geometry, su2double* val_inlet) const final; /*! * \author T. Kattmann diff --git a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl index eb3edb511db..f60db438e18 100644 --- a/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl +++ b/SU2_CFD/include/solvers/CFVMFlowSolverBase.inl @@ -386,7 +386,7 @@ void CFVMFlowSolverBase::SetPrimitive_Gradient_GG(CGeometry* geometry, con const auto comm = reconstruction? MPI_QUANTITIES::PRIMITIVE_GRAD_REC : MPI_QUANTITIES::PRIMITIVE_GRADIENT; const auto commPer = reconstruction? PERIODIC_PRIM_GG_R : PERIODIC_PRIM_GG; - computeGradientsGreenGauss(this, comm, commPer, *geometry, *config, primitives, 0, nPrimVarGrad, gradient); + computeGradientsGreenGauss(this, comm, commPer, *geometry, *config, primitives, 0, nPrimVarGrad, prim_idx.Velocity(), gradient); } template @@ -411,7 +411,7 @@ void CFVMFlowSolverBase::SetPrimitive_Gradient_LS(CGeometry* geometry, con const auto comm = reconstruction? MPI_QUANTITIES::PRIMITIVE_GRAD_REC : MPI_QUANTITIES::PRIMITIVE_GRADIENT; computeGradientsLeastSquares(this, comm, commPer, *geometry, *config, weighted, - primitives, 0, nPrimVarGrad, gradient, rmatrix); + primitives, 0, nPrimVarGrad, prim_idx.Velocity(), gradient, rmatrix); } template @@ -722,73 +722,48 @@ void CFVMFlowSolverBase::SetInletAtVertex(const su2double* val_inlet, unsi } template -su2double CFVMFlowSolverBase::GetInletAtVertex(su2double* val_inlet, unsigned long val_inlet_point, - unsigned short val_kind_marker, string val_marker, - const CGeometry* geometry, const CConfig* config) const { - /*--- Local variables ---*/ - - unsigned short iMarker, iDim; - unsigned long iPoint, iVertex; - su2double Area = 0.0; - su2double Normal[3] = {0.0, 0.0, 0.0}; - - /*--- Alias positions within inlet file for readability ---*/ - - unsigned short T_position = nDim; - unsigned short P_position = nDim + 1; - unsigned short FlowDir_position = nDim + 2; - - if (val_kind_marker == INLET_FLOW) { - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - if ((config->GetMarker_All_KindBC(iMarker) == INLET_FLOW) && - (config->GetMarker_All_TagBound(iMarker) == val_marker)) { - for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { - iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); - - if (iPoint == val_inlet_point) { - /*-- Compute boundary face area for this vertex. ---*/ - - geometry->vertex[iMarker][iVertex]->GetNormal(Normal); - Area = GeometryToolbox::Norm(nDim, Normal); - - /*--- Access and store the inlet variables for this vertex. ---*/ - - val_inlet[T_position] = Inlet_Ttotal[iMarker][iVertex]; - val_inlet[P_position] = Inlet_Ptotal[iMarker][iVertex]; - for (iDim = 0; iDim < nDim; iDim++) { - val_inlet[FlowDir_position + iDim] = Inlet_FlowDir[iMarker][iVertex][iDim]; - } - - /*--- Exit once we find the point. ---*/ - - return Area; - } - } - } - } +su2double CFVMFlowSolverBase::GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, + const CGeometry* geometry, su2double* val_inlet) const { + const auto T_position = nDim; + const auto P_position = nDim + 1; + const auto FlowDir_position = nDim + 2; + val_inlet[T_position] = Inlet_Ttotal[iMarker][iVertex]; + val_inlet[P_position] = Inlet_Ptotal[iMarker][iVertex]; + for (unsigned short iDim = 0; iDim < nDim; iDim++) { + val_inlet[FlowDir_position + iDim] = Inlet_FlowDir[iMarker][iVertex][iDim]; } - /*--- If we don't find a match, then the child point is not on the - current inlet boundary marker. Return zero area so this point does - not contribute to the restriction operator and continue. ---*/ + /*--- Compute boundary face area for this vertex. ---*/ - return Area; + su2double Normal[MAXNDIM] = {0.0}; + geometry->vertex[iMarker][iVertex]->GetNormal(Normal); + return GeometryToolbox::Norm(nDim, Normal); } template void CFVMFlowSolverBase::SetUniformInlet(const CConfig* config, unsigned short iMarker) { if (config->GetMarker_All_KindBC(iMarker) == INLET_FLOW) { - string Marker_Tag = config->GetMarker_All_TagBound(iMarker); - su2double p_total = config->GetInletPtotal(Marker_Tag); - su2double t_total = config->GetInletTtotal(Marker_Tag); - auto flow_dir = config->GetInletFlowDir(Marker_Tag); + const string Marker_Tag = config->GetMarker_All_TagBound(iMarker); + const su2double p_total = config->GetInletPtotal(Marker_Tag); + const su2double t_total = config->GetInletTtotal(Marker_Tag); + const su2double* flow_dir = config->GetInletFlowDir(Marker_Tag); for (unsigned long iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { Inlet_Ttotal[iMarker][iVertex] = t_total; Inlet_Ptotal[iMarker][iVertex] = p_total; for (unsigned short iDim = 0; iDim < nDim; iDim++) Inlet_FlowDir[iMarker][iVertex][iDim] = flow_dir[iDim]; } + } else if (config->GetMarker_All_KindBC(iMarker) == SUPERSONIC_INLET) { + const string Marker_Tag = config->GetMarker_All_TagBound(iMarker); + const su2double p = config->GetInlet_Pressure(Marker_Tag); + const su2double t = config->GetInlet_Temperature(Marker_Tag); + const su2double* vel = config->GetInlet_Velocity(Marker_Tag); + for (unsigned long iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { + Inlet_Ttotal[iMarker][iVertex] = t; + Inlet_Ptotal[iMarker][iVertex] = p; + for (unsigned short iDim = 0; iDim < nDim; iDim++) Inlet_FlowDir[iMarker][iVertex][iDim] = vel[iDim]; + } } else { /*--- For now, non-inlets just get set to zero. In the future, we can do more customization for other boundary types here. ---*/ @@ -1089,7 +1064,7 @@ void CFVMFlowSolverBase::PushSolutionBackInTime(unsigned long TimeIter, bo CSolver*** solver_container, CGeometry** geometry, CConfig* config) { /*--- Push back the initial condition to previous solution containers - for a 1st-order restart or when simply intitializing to freestream. ---*/ + for a 1st-order restart or when simply initializing to freestream. ---*/ for (unsigned short iMesh = 0; iMesh <= config->GetnMGLevels(); iMesh++) { solver_container[iMesh][FLOW_SOL]->GetNodes()->Set_Solution_time_n(); @@ -1132,248 +1107,127 @@ void CFVMFlowSolverBase::PushSolutionBackInTime(unsigned long TimeIter, bo } } -template -void CFVMFlowSolverBase::BC_Sym_Plane(CGeometry* geometry, CSolver** solver_container, CNumerics* conv_numerics, - CNumerics* visc_numerics, CConfig* config, unsigned short val_marker) { - unsigned short iDim, iVar; - unsigned long iVertex, iPoint; +template +void CFVMFlowSolverBase::BC_Sym_Plane(CGeometry* geometry, CSolver** solver_container, CNumerics* conv_numerics, + CNumerics* visc_numerics, CConfig* config, unsigned short val_marker) { + const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); + const auto iVel = prim_idx.Velocity(); - bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); - bool viscous = config->GetViscous(); - bool preprocessed = false; + /*--- Blazek chapter 8.: + * The components of the momentum residual normal to the symmetry plane are zeroed out. + * The gradients have already been corrected acording to Eq. (8.40). + * Contrary to Blazek we keep some scalar fluxes computed on the boundary to improve stability (see below). ---*/ - /*--- Allocation of variables necessary for convective fluxes. ---*/ - su2double Area, ProjVelocity_i, *V_reflected, *V_domain, Normal[MAXNDIM] = {0.0}, UnitNormal[MAXNDIM] = {0.0}; + /*--- Loop over all the vertices on this boundary marker. ---*/ - /*--- Allocation of variables necessary for viscous fluxes. ---*/ - su2double ProjGradient, ProjNormVelGrad, ProjTangVelGrad, TangentialNorm, - Tangential[MAXNDIM] = {0.0}, GradNormVel[MAXNDIM] = {0.0}, GradTangVel[MAXNDIM] = {0.0}; + SU2_OMP_FOR_DYN(OMP_MIN_SIZE) + for (auto iVertex = 0ul; iVertex < geometry->nVertex[val_marker]; iVertex++) { + const auto iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); - /*--- Allocation of primitive gradient arrays for viscous fluxes. ---*/ - su2activematrix Grad_Reflected(nPrimVarGrad, nDim); + /*--- Halo points do not need to be considered. ---*/ + if (!geometry->nodes->GetDomain(iPoint)) continue; - /*--- Loop over all the vertices on this boundary marker. ---*/ + /*--- Get the normal of the current symmetry. This may be the original normal of the vertex + * or a modified normal if there are intersecting symmetries. ---*/ - SU2_OMP_FOR_DYN(OMP_MIN_SIZE) - for (iVertex = 0; iVertex < geometry->nVertex[val_marker]; iVertex++) { - if (!preprocessed || geometry->bound_is_straight[val_marker] != true) { - /*----------------------------------------------------------------------------------------------*/ - /*--- Preprocessing: ---*/ - /*--- Compute the unit normal and (in case of viscous flow) a corresponding unit tangential ---*/ - /*--- to that normal. On a straight(2D)/plane(3D) boundary these two vectors are constant. ---*/ - /*--- This circumstance is checked in geometry->ComputeSurf_Straightness(...) and stored ---*/ - /*--- such that the recomputation does not occur for each node. On true symmetry planes, the ---*/ - /*--- normal is constant but this routines is used for Symmetry, Euler-Wall in inviscid flow ---*/ - /*--- and Euler Wall in viscous flow as well. In the latter curvy boundaries are likely to ---*/ - /*--- happen. In doubt, the conditional above which checks straightness can be thrown out ---*/ - /*--- such that the recomputation is done for each node (which comes with a tiny performance ---*/ - /*--- penalty). ---*/ - /*----------------------------------------------------------------------------------------------*/ - - preprocessed = true; - - /*--- Normal vector for a random vertex (zero) on this marker (negate for outward convention). ---*/ - geometry->vertex[val_marker][iVertex]->GetNormal(Normal); - for (iDim = 0; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; - - /*--- Compute unit normal, to be used for unit tangential, projected velocity and velocity - component gradients. ---*/ - Area = GeometryToolbox::Norm(nDim, Normal); + su2double Normal[MAXNDIM] = {}, UnitNormal[MAXNDIM] = {}; + geometry->vertex[val_marker][iVertex]->GetNormal(Normal); + const auto it = geometry->symmetryNormals[val_marker].find(iVertex); - for (iDim = 0; iDim < nDim; iDim++) UnitNormal[iDim] = -Normal[iDim] / Area; + if (it != geometry->symmetryNormals[val_marker].end()) { + for (auto iDim = 0u; iDim < nDim; iDim++) UnitNormal[iDim] = it->second[iDim]; + } else { + const su2double Area = GeometryToolbox::Norm(nDim, Normal); + for (auto iDim = 0u; iDim < nDim; iDim++) UnitNormal[iDim] = Normal[iDim] / Area; + } - /*--- Preprocessing: Compute unit tangential, the direction is arbitrary as long as - t*n=0 && |t|_2 = 1 ---*/ - if (viscous) { - switch (nDim) { - case 2: { - Tangential[0] = -UnitNormal[1]; - Tangential[1] = UnitNormal[0]; - break; - } - case 3: { - /*--- n = ai + bj + ck, if |b| > |c| ---*/ - if (abs(UnitNormal[1]) > abs(UnitNormal[2])) { - /*--- t = bi + (c-a)j - bk ---*/ - Tangential[0] = UnitNormal[1]; - Tangential[1] = UnitNormal[2] - UnitNormal[0]; - Tangential[2] = -UnitNormal[1]; - } else { - /*--- t = ci - cj + (b-a)k ---*/ - Tangential[0] = UnitNormal[2]; - Tangential[1] = -UnitNormal[2]; - Tangential[2] = UnitNormal[1] - UnitNormal[0]; - } - /*--- Make it a unit vector. ---*/ - TangentialNorm = sqrt(pow(Tangential[0], 2) + pow(Tangential[1], 2) + pow(Tangential[2], 2)); - Tangential[0] = Tangential[0] / TangentialNorm; - Tangential[1] = Tangential[1] / TangentialNorm; - Tangential[2] = Tangential[2] / TangentialNorm; - break; - } - } // switch - } // if viscous - } // if bound_is_straight - - iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); - - /*--- Check if the node belongs to the domain (i.e., not a halo node) ---*/ - if (geometry->nodes->GetDomain(iPoint)) { - /*-------------------------------------------------------------------------------*/ - /*--- Step 1: For the convective fluxes, create a reflected state of the ---*/ - /*--- Primitive variables by copying all interior values to the ---*/ - /*--- reflected. Only the velocity is mirrored along the symmetry ---*/ - /*--- axis. Based on the Upwind_Residual routine. ---*/ - /*-------------------------------------------------------------------------------*/ - - /*--- Allocate the reflected state at the symmetry boundary. ---*/ - V_reflected = GetCharacPrimVar(val_marker, iVertex); - - /*--- Grid movement ---*/ - if (dynamic_grid) - conv_numerics->SetGridVel(geometry->nodes->GetGridVel(iPoint), geometry->nodes->GetGridVel(iPoint)); - - /*--- Normal vector for this vertex (negate for outward convention). ---*/ - geometry->vertex[val_marker][iVertex]->GetNormal(Normal); - for (iDim = 0; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; - conv_numerics->SetNormal(Normal); - - /*--- Get current solution at this boundary node ---*/ - V_domain = nodes->GetPrimitive(iPoint); - - /*--- Set the reflected state based on the boundary node. Scalars are copied and - the velocity is mirrored along the symmetry boundary, i.e. the velocity in - normal direction is substracted twice. ---*/ - for (iVar = 0; iVar < nPrimVar; iVar++) V_reflected[iVar] = nodes->GetPrimitive(iPoint, iVar); - - /*--- Compute velocity in normal direction (ProjVelcity_i=(v*n)) und substract twice from - velocity in normal direction: v_r = v - 2 (v*n)n ---*/ - ProjVelocity_i = nodes->GetProjVel(iPoint, UnitNormal); - - /*--- Adjustment to v.n due to grid movement. ---*/ - if (dynamic_grid) { - ProjVelocity_i -= GeometryToolbox::DotProduct(nDim, geometry->nodes->GetGridVel(iPoint), UnitNormal); - } + su2double* V_reflected = GetCharacPrimVar(val_marker, iVertex); - for (iDim = 0; iDim < nDim; iDim++) - V_reflected[iDim + 1] = nodes->GetVelocity(iPoint, iDim) - 2.0 * ProjVelocity_i * UnitNormal[iDim]; + /*--- Grid movement ---*/ + if (dynamic_grid) + conv_numerics->SetGridVel(geometry->nodes->GetGridVel(iPoint), geometry->nodes->GetGridVel(iPoint)); - /*--- Set Primitive and Secondary for numerics class. ---*/ - conv_numerics->SetPrimitive(V_domain, V_reflected); - conv_numerics->SetSecondary(nodes->GetSecondary(iPoint), nodes->GetSecondary(iPoint)); + /*--- Normal vector for this vertex (negate for outward convention). ---*/ + for (auto iDim = 0u; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; + conv_numerics->SetNormal(Normal); - /*--- Compute the residual using an upwind scheme. ---*/ + for (auto iVar = 0u; iVar < nPrimVar; iVar++) + V_reflected[iVar] = nodes->GetPrimitive(iPoint, iVar); - auto residual = conv_numerics->ComputeResidual(config); + su2double ProjVelocity_i = nodes->GetProjVel(iPoint, UnitNormal); + /*--- Adjustment to v.n due to grid movement. ---*/ + if (dynamic_grid) + ProjVelocity_i -= GeometryToolbox::DotProduct(nDim, geometry->nodes->GetGridVel(iPoint), UnitNormal); - /*--- Update residual value ---*/ - LinSysRes.AddBlock(iPoint, residual); + for (auto iDim = 0u; iDim < nDim; iDim++) + V_reflected[iDim + iVel] = nodes->GetVelocity(iPoint, iDim) - ProjVelocity_i * UnitNormal[iDim]; - /*--- Jacobian contribution for implicit integration. ---*/ - if (implicit) { - Jacobian.AddBlock2Diag(iPoint, residual.jacobian_i); - } + /*--- Get current solution at this boundary node ---*/ + const su2double* V_domain = nodes->GetPrimitive(iPoint); - if (viscous) { - /*-------------------------------------------------------------------------------*/ - /*--- Step 2: The viscous fluxes of the Navier-Stokes equations depend on the ---*/ - /*--- Primitive variables and their gradients. The viscous numerics ---*/ - /*--- container is filled just as the convective numerics container, ---*/ - /*--- but the primitive gradients of the reflected state have to be ---*/ - /*--- determined additionally such that symmetry at the boundary is ---*/ - /*--- enforced. Based on the Viscous_Residual routine. ---*/ - /*-------------------------------------------------------------------------------*/ - - /*--- Set the normal vector and the coordinates. ---*/ - visc_numerics->SetCoord(geometry->nodes->GetCoord(iPoint), geometry->nodes->GetCoord(iPoint)); - visc_numerics->SetNormal(Normal); - - /*--- Set the primitive and Secondary variables. ---*/ - visc_numerics->SetPrimitive(V_domain, V_reflected); - visc_numerics->SetSecondary(nodes->GetSecondary(iPoint), nodes->GetSecondary(iPoint)); - - /*--- For viscous Fluxes also the gradients of the primitives need to be determined. - 1. The gradients of scalars are mirrored along the sym plane just as velocity for the primitives - 2. The gradients of the velocity components need more attention, i.e. the gradient of the - normal velocity in tangential direction is mirrored and the gradient of the tangential velocity in - normal direction is mirrored. ---*/ - - /*--- Get gradients of primitives of boundary cell ---*/ - for (iVar = 0; iVar < nPrimVarGrad; iVar++) - for (iDim = 0; iDim < nDim; iDim++) - Grad_Reflected[iVar][iDim] = nodes->GetGradient_Primitive(iPoint, iVar, iDim); + /*--- Set Primitive and Secondary for numerics class. ---*/ + conv_numerics->SetPrimitive(V_domain, V_reflected); + conv_numerics->SetSecondary(nodes->GetSecondary(iPoint), nodes->GetSecondary(iPoint)); - /*--- Reflect the gradients for all scalars including the velocity components. - The gradients of the velocity components are set later with the - correct values: grad(V)_r = grad(V) - 2 [grad(V)*n]n, V beeing any primitive ---*/ - for (iVar = 0; iVar < nPrimVarGrad; iVar++) { - if (iVar == 0 || iVar > nDim) { // Exclude velocity component gradients + /*--- Compute the residual using an upwind scheme. ---*/ + auto residual = conv_numerics->ComputeResidual(config); - /*--- Compute projected part of the gradient in a dot product ---*/ - ProjGradient = 0.0; - for (iDim = 0; iDim < nDim; iDim++) ProjGradient += Grad_Reflected[iVar][iDim] * UnitNormal[iDim]; + /*--- We include an update of the continuity and energy here, this is important for stability since + * these fluxes include numerical diffusion. ---*/ + for (auto iVar = 0u; iVar < nVar; iVar++) { + if (iVar < iVel || iVar >= iVel + nDim) LinSysRes(iPoint, iVar) += residual.residual[iVar]; + } - for (iDim = 0; iDim < nDim; iDim++) - Grad_Reflected[iVar][iDim] = Grad_Reflected[iVar][iDim] - 2.0 * ProjGradient * UnitNormal[iDim]; - } - } + /*--- Explicitly set the velocity components normal to the symmetry plane to zero. + * This is necessary because the modification of the residual leaves the problem + * underconstrained (the normal residual is zero regardless of the normal velocity). ---*/ - /*--- Compute gradients of normal and tangential velocity: - grad(v*n) = grad(v_x) n_x + grad(v_y) n_y (+ grad(v_z) n_z) - grad(v*t) = grad(v_x) t_x + grad(v_y) t_y (+ grad(v_z) t_z) ---*/ - for (iVar = 0; iVar < nDim; iVar++) { // counts gradient components - GradNormVel[iVar] = 0.0; - GradTangVel[iVar] = 0.0; - for (iDim = 0; iDim < nDim; iDim++) { // counts sum with unit normal/tangential - GradNormVel[iVar] += Grad_Reflected[iDim + 1][iVar] * UnitNormal[iDim]; - GradTangVel[iVar] += Grad_Reflected[iDim + 1][iVar] * Tangential[iDim]; - } - } + su2double* solutionOld = nodes->GetSolution_Old(iPoint); - /*--- Refelect gradients in tangential and normal direction by substracting the normal/tangential - component twice, just as done with velocity above. - grad(v*n)_r = grad(v*n) - 2 {grad([v*n])*t}t - grad(v*t)_r = grad(v*t) - 2 {grad([v*t])*n}n ---*/ - ProjNormVelGrad = 0.0; - ProjTangVelGrad = 0.0; - for (iDim = 0; iDim < nDim; iDim++) { - ProjNormVelGrad += GradNormVel[iDim] * Tangential[iDim]; // grad([v*n])*t - ProjTangVelGrad += GradTangVel[iDim] * UnitNormal[iDim]; // grad([v*t])*n + su2double gridVel[MAXNVAR] = {}; + if (dynamic_grid) { + for (auto iDim = 0u; iDim < nDim; iDim++) { + gridVel[iDim] = geometry->nodes->GetGridVel(iPoint)[iDim]; + } + if (FlowRegime == ENUM_REGIME::COMPRESSIBLE) { + for(auto iDim = 0u; iDim < nDim; iDim++) { + /*--- Multiply by density since we are correcting conservative variables. ---*/ + gridVel[iDim] *= nodes->GetDensity(iPoint); } + } + } + su2double vp = 0.0; + for (auto iDim = 0u; iDim < nDim; iDim++) { + vp += (solutionOld[iVel + iDim] - gridVel[iDim]) * UnitNormal[iDim]; + } + for (auto iDim = 0u; iDim < nDim; iDim++) { + solutionOld[iVel + iDim] -= vp * UnitNormal[iDim]; + } - for (iDim = 0; iDim < nDim; iDim++) { - GradNormVel[iDim] = GradNormVel[iDim] - 2.0 * ProjNormVelGrad * Tangential[iDim]; - GradTangVel[iDim] = GradTangVel[iDim] - 2.0 * ProjTangVelGrad * UnitNormal[iDim]; - } + /*--- Keep only the tangential part of the momentum residuals. ---*/ + su2double normalRes = 0.0; + for (auto iDim = 0u; iDim < nDim; iDim++) { + normalRes += LinSysRes(iPoint, iVel + iDim) * UnitNormal[iDim]; + } + for (auto iDim = 0u; iDim < nDim; iDim++) { + LinSysRes(iPoint, iVel + iDim) -= normalRes * UnitNormal[iDim]; + } + + /*--- Jacobian contribution for implicit integration. ---*/ + if (implicit) { + Jacobian.AddBlock2Diag(iPoint, residual.jacobian_i); + } - /*--- Transfer reflected gradients back into the Cartesian Coordinate system: - grad(v_x)_r = grad(v*n)_r n_x + grad(v*t)_r t_x - grad(v_y)_r = grad(v*n)_r n_y + grad(v*t)_r t_y - ( grad(v_z)_r = grad(v*n)_r n_z + grad(v*t)_r t_z ) ---*/ - for (iVar = 0; iVar < nDim; iVar++) // loops over the velocity component gradients - for (iDim = 0; iDim < nDim; iDim++) // loops over the entries of the above - Grad_Reflected[iVar + 1][iDim] = - GradNormVel[iDim] * UnitNormal[iVar] + GradTangVel[iDim] * Tangential[iVar]; - - /*--- Set the primitive gradients of the boundary and reflected state. ---*/ - visc_numerics->SetPrimVarGradient(nodes->GetGradient_Primitive(iPoint), CMatrixView(Grad_Reflected)); - - /*--- Turbulent kinetic energy. ---*/ - if (config->GetKind_Turb_Model() == TURB_MODEL::SST) - visc_numerics->SetTurbKineticEnergy(solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint, 0), - solver_container[TURB_SOL]->GetNodes()->GetSolution(iPoint, 0)); - - /*--- Compute and update residual. Note that the viscous shear stress tensor is computed in the - following routine based upon the velocity-component gradients. ---*/ - auto residual = visc_numerics->ComputeResidual(config); - - LinSysRes.SubtractBlock(iPoint, residual); - - /*--- Jacobian contribution for implicit integration. ---*/ - if (implicit) Jacobian.SubtractBlock2Diag(iPoint, residual.jacobian_i); - } // if viscous - } // if GetDomain - } // for iVertex + /*--- Correction for multigrid. ---*/ + normalRes = 0.0; + su2double* Res_TruncError = nodes->GetResTruncError(iPoint); + for (auto iDim = 0u; iDim < nDim; iDim++) { + normalRes += Res_TruncError[iVel + iDim] * UnitNormal[iDim]; + } + for (auto iDim = 0u; iDim < nDim; iDim++) { + Res_TruncError[iVel + iDim] -= normalRes * UnitNormal[iDim]; + } + } END_SU2_OMP_FOR } diff --git a/SU2_CFD/include/solvers/CScalarSolver.inl b/SU2_CFD/include/solvers/CScalarSolver.inl index 1777fa2e289..63936187185 100644 --- a/SU2_CFD/include/solvers/CScalarSolver.inl +++ b/SU2_CFD/include/solvers/CScalarSolver.inl @@ -111,15 +111,15 @@ void CScalarSolver::CommonPreprocessing(CGeometry *geometry, const if (config->GetReconstructionGradientRequired()) { switch(config->GetKind_Gradient_Method_Recon()) { - case GREEN_GAUSS: SetSolution_Gradient_GG(geometry, config, true); break; - case LEAST_SQUARES: SetSolution_Gradient_LS(geometry, config, true); break; - case WEIGHTED_LEAST_SQUARES: SetSolution_Gradient_LS(geometry, config, true); break; + case GREEN_GAUSS: SetSolution_Gradient_GG(geometry, config, -1, true); break; + case LEAST_SQUARES: SetSolution_Gradient_LS(geometry, config, -1, true); break; + case WEIGHTED_LEAST_SQUARES: SetSolution_Gradient_LS(geometry, config, -1, true); break; } } switch(config->GetKind_Gradient_Method()) { - case GREEN_GAUSS: SetSolution_Gradient_GG(geometry, config); break; - case WEIGHTED_LEAST_SQUARES: SetSolution_Gradient_LS(geometry, config); break; + case GREEN_GAUSS: SetSolution_Gradient_GG(geometry, config, -1); break; + case WEIGHTED_LEAST_SQUARES: SetSolution_Gradient_LS(geometry, config, -1); break; } if (limiter && muscl) SetSolution_Limiter(geometry, config); diff --git a/SU2_CFD/include/solvers/CSolver.hpp b/SU2_CFD/include/solvers/CSolver.hpp index 3c1062def94..29c9b9d9d20 100644 --- a/SU2_CFD/include/solvers/CSolver.hpp +++ b/SU2_CFD/include/solvers/CSolver.hpp @@ -543,17 +543,19 @@ class CSolver { * \brief Compute the Green-Gauss gradient of the solution. * \param[in] geometry - Geometrical definition of the problem. * \param[in] config - Definition of the particular problem. + * \param[in] idxVel - Index to velocity, -1 if no velocity is present in the solver. * \param[in] reconstruction - indicator that the gradient being computed is for upwind reconstruction. */ - void SetSolution_Gradient_GG(CGeometry *geometry, const CConfig *config, bool reconstruction = false); + void SetSolution_Gradient_GG(CGeometry *geometry, const CConfig *config, short idxVel, bool reconstruction = false); /*! * \brief Compute the Least Squares gradient of the solution. * \param[in] geometry - Geometrical definition of the problem. * \param[in] config - Definition of the particular problem. + * \param[in] idxVel - Index to velocity, -1 if no velocity is present in the solver. * \param[in] reconstruction - indicator that the gradient being computed is for upwind reconstruction. */ - void SetSolution_Gradient_LS(CGeometry *geometry, const CConfig *config, bool reconstruction = false); + void SetSolution_Gradient_LS(CGeometry *geometry, const CConfig *config, short idxVel, bool reconstruction = false); /*! * \brief Compute the Least Squares gradient of the grid velocity. @@ -1087,6 +1089,38 @@ class CSolver { CConfig *config, unsigned short val_marker) { } + /*! + * + * \brief Generalized handling of calculation of total inlet boundary condition inputs + * \param[in] conv_numerics - Description of the numerical method. + * \param[in] config - Definition of the particular problem. + * \param[in] val_marker - Surface marker where the boundary condition is applied. + * \param[in] iSpan - Current spanwise position + * \param[in] SpanwisePosition - Spanwise position where flow quantaties are evaluated + */ + inline virtual void BC_Giles_Total_Inlet(CNumerics *conv_numerics, + CConfig *config, + unsigned short val_marker, + su2double *&c_avg, + su2double *&R, + su2double **&R_c_inv, + su2double **&R_c, + unsigned short iSpan, + unsigned short SpanwisePosition) { } + + /*! + * + * \brief Generalized handling of calculation of mixing plane boundary condition inputs + * \param[in] conv_numerics - Description of the numerical method. + * \param[in] val_marker - Surface marker where the boundary condition is applied. + * \param[in] SpanwisePosition - Spanwise position where flow quantaties are evaluated + */ + inline virtual void BC_Giles_Mixing(CNumerics *conv_numerics, + unsigned short val_marker, + su2double *&deltaprim, + su2double *&c_avg, + unsigned short SpanwisePosition) { } + /*! * \brief A virtual member. * \param[in] geometry - Geometrical definition of the problem. @@ -2893,7 +2927,7 @@ class CSolver { * \param[in] config - Definition of the particular problem. * \param[in] iMarker - Surface marker where the coefficient is computed. */ - inline virtual void SetUniformInlet(const CConfig* config, unsigned short iMarker) {}; + inline virtual void SetUniformInlet(const CConfig* config, unsigned short iMarker) {} /*! * \brief A virtual member @@ -2903,23 +2937,18 @@ class CSolver { */ inline virtual void SetInletAtVertex(const su2double *val_inlet, unsigned short iMarker, - unsigned long iVertex) { }; + unsigned long iVertex) { } /*! - * \brief A virtual member - * \param[in] val_inlet - vector returning the inlet values for the current vertex. - * \param[in] val_inlet_point - Node index where the inlet is being set. - * \param[in] val_kind_marker - Enumerated type for the particular inlet type. + * \brief Get the set of values imposed at an inlet. + * \param[in] iMarker - Index of the surface marker. + * \param[in] iVertex - Vertex of the marker iMarker where the inlet is being set. * \param[in] geometry - Geometrical definition of the problem. - * \param config - Definition of the particular problem. + * \param[in,out] val_inlet - vector returning the inlet values for the current vertex. * \return Value of the face area at the vertex. */ - inline virtual su2double GetInletAtVertex(su2double *val_inlet, - unsigned long val_inlet_point, - unsigned short val_kind_marker, - string val_marker, - const CGeometry *geometry, - const CConfig *config) const { return 0; } + inline virtual su2double GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, + const CGeometry* geometry, su2double* val_inlet) const { return 0; } /*! * \brief Update the multi-grid structure for the customized boundary conditions. diff --git a/SU2_CFD/include/solvers/CSpeciesSolver.hpp b/SU2_CFD/include/solvers/CSpeciesSolver.hpp index 4fbb9419117..8b838cd0e61 100644 --- a/SU2_CFD/include/solvers/CSpeciesSolver.hpp +++ b/SU2_CFD/include/solvers/CSpeciesSolver.hpp @@ -113,16 +113,15 @@ class CSpeciesSolver : public CScalarSolver { void SetInletAtVertex(const su2double* val_inlet, unsigned short iMarker, unsigned long iVertex) override; /*! - * \brief Get the set of value imposed at an inlet. - * \param[in] val_inlet - vector returning the inlet values for the current vertex. - * \param[in] val_inlet_point - Node index where the inlet is being set. - * \param[in] val_kind_marker - Enumerated type for the particular inlet type. + * \brief Get the set of values imposed at an inlet. + * \param[in] iMarker - Index of the surface marker. + * \param[in] iVertex - Vertex of the marker iMarker where the inlet is being set. * \param[in] geometry - Geometrical definition of the problem. - * \param config - Definition of the particular problem. + * \param[in,out] val_inlet - vector returning the inlet values for the current vertex. * \return Value of the face area at the vertex. */ - su2double GetInletAtVertex(su2double* val_inlet, unsigned long val_inlet_point, unsigned short val_kind_marker, - string val_marker, const CGeometry* geometry, const CConfig* config) const override; + su2double GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, + const CGeometry* geometry, su2double* val_inlet) const override; /*! * \brief Set a uniform inlet profile diff --git a/SU2_CFD/include/solvers/CTurbSASolver.hpp b/SU2_CFD/include/solvers/CTurbSASolver.hpp index c79649799cc..1bf7d929d0e 100644 --- a/SU2_CFD/include/solvers/CTurbSASolver.hpp +++ b/SU2_CFD/include/solvers/CTurbSASolver.hpp @@ -345,20 +345,15 @@ class CTurbSASolver final : public CTurbSolver { unsigned long iVertex) override; /*! - * \brief Get the set of value imposed at an inlet. - * \param[in] val_inlet - vector returning the inlet values for the current vertex. - * \param[in] val_inlet_point - Node index where the inlet is being set. - * \param[in] val_kind_marker - Enumerated type for the particular inlet type. + * \brief Get the set of values imposed at an inlet. + * \param[in] iMarker - Index of the surface marker. + * \param[in] iVertex - Vertex of the marker iMarker where the inlet is being set. * \param[in] geometry - Geometrical definition of the problem. - * \param config - Definition of the particular problem. + * \param[in,out] val_inlet - vector returning the inlet values for the current vertex. * \return Value of the face area at the vertex. */ - su2double GetInletAtVertex(su2double *val_inlet, - unsigned long val_inlet_point, - unsigned short val_kind_marker, - string val_marker, - const CGeometry *geometry, - const CConfig *config) const override; + su2double GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, + const CGeometry* geometry, su2double* val_inlet) const override; /*! * \brief Set a uniform inlet profile diff --git a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp index bdb4227a191..4ab59ec73a8 100644 --- a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp +++ b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp @@ -269,20 +269,15 @@ class CTurbSSTSolver final : public CTurbSolver { unsigned long iVertex) override; /*! - * \brief Get the set of value imposed at an inlet. - * \param[in] val_inlet - vector returning the inlet values for the current vertex. - * \param[in] val_inlet_point - Node index where the inlet is being set. - * \param[in] val_kind_marker - Enumerated type for the particular inlet type. + * \brief Get the set of values imposed at an inlet. + * \param[in] iMarker - Index of the surface marker. + * \param[in] iVertex - Vertex of the marker iMarker where the inlet is being set. * \param[in] geometry - Geometrical definition of the problem. - * \param config - Definition of the particular problem. + * \param[in,out] val_inlet - vector returning the inlet values for the current vertex. * \return Value of the face area at the vertex. */ - su2double GetInletAtVertex(su2double *val_inlet, - unsigned long val_inlet_point, - unsigned short val_kind_marker, - string val_marker, - const CGeometry *geometry, - const CConfig *config) const override; + su2double GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, + const CGeometry* geometry, su2double* val_inlet) const override; /*! * \brief Set a uniform inlet profile diff --git a/SU2_CFD/include/variables/CEulerVariable.hpp b/SU2_CFD/include/variables/CEulerVariable.hpp index d2880fce420..4dc91781c4b 100644 --- a/SU2_CFD/include/variables/CEulerVariable.hpp +++ b/SU2_CFD/include/variables/CEulerVariable.hpp @@ -237,7 +237,7 @@ class CEulerVariable : public CFlowVariable { * \return Value of the velocity for the dimension iDim. */ inline su2double GetVelocity(unsigned long iPoint, unsigned long iDim) const final { - return Primitive(iPoint,iDim+indices.Velocity()); + return Primitive(iPoint, iDim+indices.Velocity()); } /*! @@ -256,7 +256,7 @@ class CEulerVariable : public CFlowVariable { inline su2double GetProjVel(unsigned long iPoint, const su2double *val_vector) const final { su2double ProjVel = 0.0; for (unsigned long iDim = 0; iDim < nDim; iDim++) - ProjVel += Primitive(iPoint,iDim+indices.Velocity())*val_vector[iDim]; + ProjVel += Primitive(iPoint, iDim+indices.Velocity())*val_vector[iDim]; return ProjVel; } diff --git a/SU2_CFD/include/variables/CVariable.hpp b/SU2_CFD/include/variables/CVariable.hpp index 358824ae8d7..920f5680915 100644 --- a/SU2_CFD/include/variables/CVariable.hpp +++ b/SU2_CFD/include/variables/CVariable.hpp @@ -702,6 +702,16 @@ class CVariable { val_trunc_error[iVar] = Res_TruncError(iPoint, iVar); } + /*! + * \brief Set the truncation error. + * \param[in] iPoint - Point index. + * \param[in] val_trunc_error - Pointer to the truncation error. + */ + inline void SetResTruncError(unsigned long iPoint, su2double *val_trunc_error) { + for (unsigned long iVar = 0; iVar < nVar; iVar++) + Res_TruncError(iPoint, iVar) = val_trunc_error[iVar]; + } + /*! * \brief Set the gradient of the solution. * \param[in] iPoint - Point index. diff --git a/SU2_CFD/src/drivers/CDriver.cpp b/SU2_CFD/src/drivers/CDriver.cpp index 645e79ff47b..0c3c4a10c4e 100644 --- a/SU2_CFD/src/drivers/CDriver.cpp +++ b/SU2_CFD/src/drivers/CDriver.cpp @@ -679,20 +679,6 @@ void CDriver::InitializeGeometry(CConfig* config, CGeometry **&geometry, bool du } #endif - /*--- Check if Euler & Symmetry markers are straight/plane. This information - is used in the Euler & Symmetry boundary routines. ---*/ - if((config_container[iZone]->GetnMarker_Euler() != 0 || - config_container[iZone]->GetnMarker_SymWall() != 0) && - !fem_solver) { - - if (rank == MASTER_NODE) - cout << "Checking if Euler & Symmetry markers are straight/plane:" << endl; - - for (iMesh = 0; iMesh <= config_container[iZone]->GetnMGLevels(); iMesh++) - geometry_container[iZone][iInst][iMesh]->ComputeSurf_Straightness(config_container[iZone], (iMesh==MESH_0) ); - - } - /*--- Keep a reference to the main (ZONE_0, INST_0, MESH_0) geometry. ---*/ main_geometry = geometry_container[ZONE_0][INST_0][MESH_0]; @@ -844,7 +830,7 @@ void CDriver::InitializeGeometryFVM(CConfig *config, CGeometry **&geometry) { /*--- Create the control volume structures ---*/ geometry[iMGlevel]->SetControlVolume(geometry[iMGlevel-1], ALLOCATE); - geometry[iMGlevel]->SetBoundControlVolume(geometry[iMGlevel-1], ALLOCATE); + geometry[iMGlevel]->SetBoundControlVolume(geometry[iMGlevel-1], config, ALLOCATE); geometry[iMGlevel]->SetCoord(geometry[iMGlevel-1]); /*--- Find closest neighbor to a surface point ---*/ @@ -1066,27 +1052,27 @@ void CDriver::PreprocessInlet(CSolver ***solver, CGeometry **geometry, CConfig * /*--- Use LoadInletProfile() routines for the particular solver. ---*/ if (rank == MASTER_NODE) { - cout << endl; - cout << "Reading inlet profile from file: "; - cout << config->GetInlet_FileName() << endl; + cout << "\nReading inlet profile from file: " << config->GetInlet_FileName() << endl; } - if (solver[MESH_0][FLOW_SOL]) { - solver[MESH_0][FLOW_SOL]->LoadInletProfile(geometry, solver, config, val_iter, FLOW_SOL, INLET_FLOW); - } - if (solver[MESH_0][TURB_SOL]) { - solver[MESH_0][TURB_SOL]->LoadInletProfile(geometry, solver, config, val_iter, TURB_SOL, INLET_FLOW); - } - if (solver[MESH_0][SPECIES_SOL]) { - solver[MESH_0][SPECIES_SOL]->LoadInletProfile(geometry, solver, config, val_iter, SPECIES_SOL, INLET_FLOW); + for (const auto marker_type : {INLET_FLOW, SUPERSONIC_INLET}) { + if (solver[MESH_0][FLOW_SOL]) { + solver[MESH_0][FLOW_SOL]->LoadInletProfile(geometry, solver, config, val_iter, FLOW_SOL, marker_type); + } + if (solver[MESH_0][TURB_SOL]) { + solver[MESH_0][TURB_SOL]->LoadInletProfile(geometry, solver, config, val_iter, TURB_SOL, marker_type); + } + if (solver[MESH_0][SPECIES_SOL]) { + solver[MESH_0][SPECIES_SOL]->LoadInletProfile(geometry, solver, config, val_iter, SPECIES_SOL, marker_type); + } } /*--- Exit if profiles were requested for a solver that is not available. ---*/ if (!config->GetFluidProblem()) { - SU2_MPI::Error(string("Inlet profile specification via file (C++) has not been \n") + - string("implemented yet for this solver.\n") + - string("Please set SPECIFIED_INLET_PROFILE= NO and try again."), CURRENT_FUNCTION); + SU2_MPI::Error("Inlet profile specification via file (C++) has not been \n" + "implemented yet for this solver.\n" + "Please set SPECIFIED_INLET_PROFILE= NO and try again.", CURRENT_FUNCTION); } } else { diff --git a/SU2_CFD/src/drivers/CMultizoneDriver.cpp b/SU2_CFD/src/drivers/CMultizoneDriver.cpp index 07069b4d0ab..368a598e514 100644 --- a/SU2_CFD/src/drivers/CMultizoneDriver.cpp +++ b/SU2_CFD/src/drivers/CMultizoneDriver.cpp @@ -589,19 +589,19 @@ bool CMultizoneDriver::TransferData(unsigned short donorZone, unsigned short tar { const auto nMarkerInt = config_container[donorZone]->GetnMarker_MixingPlaneInterface() / 2; - /*--- Transfer the average value from the donorZone to the targetZone ---*/ + /*--- Transfer the average value from the donorZone to the targetZone ---*/ + /*--- Loops over the mixing planes defined in the config file to find the correct mixing plane for the donor-target combination ---*/ for (auto iMarkerInt = 1; iMarkerInt <= nMarkerInt; iMarkerInt++) { interface_container[donorZone][targetZone]->AllgatherAverage(solver_container[donorZone][INST_0][MESH_0][FLOW_SOL],solver_container[targetZone][INST_0][MESH_0][FLOW_SOL], geometry_container[donorZone][INST_0][MESH_0],geometry_container[targetZone][INST_0][MESH_0], config_container[donorZone], config_container[targetZone], iMarkerInt ); } - for (donorZone = 0; donorZone < nZone; donorZone++) { - if (interface_types[donorZone][targetZone]==MIXING_PLANE) { - interface_container[donorZone][targetZone]->GatherAverageValues(solver_container[donorZone][INST_0][MESH_0][FLOW_SOL],solver_container[targetZone][INST_0][MESH_0][FLOW_SOL], donorZone); - geometry_container[targetZone][INST_0][MESH_0]->SetAvgTurboGeoValues(config_container[iZone],geometry_container[iZone][INST_0][MESH_0], iZone); - } - } + /*--- Set average value donorZone->targetZone ---*/ + interface_container[donorZone][targetZone]->SetAverageValues(solver_container[donorZone][INST_0][MESH_0][FLOW_SOL],solver_container[targetZone][INST_0][MESH_0][FLOW_SOL], donorZone); + + /*--- Set average geometrical properties FROM donorZone IN targetZone ---*/ + geometry_container[targetZone][INST_0][MESH_0]->SetAvgTurboGeoValues(config_container[iZone],geometry_container[iZone][INST_0][MESH_0], iZone); break; } @@ -623,7 +623,7 @@ bool CMultizoneDriver::TransferData(unsigned short donorZone, unsigned short tar void CMultizoneDriver::SetTurboPerformance() { for (auto donorZone = 1u; donorZone < nZone; donorZone++) { - interface_container[donorZone][ZONE_0]->GatherAverageValues(solver_container[donorZone][INST_0][MESH_0][FLOW_SOL], + interface_container[donorZone][ZONE_0]->SetAverageValues(solver_container[donorZone][INST_0][MESH_0][FLOW_SOL], solver_container[ZONE_0][INST_0][MESH_0][FLOW_SOL], donorZone); } diff --git a/SU2_CFD/src/integration/CIntegration.cpp b/SU2_CFD/src/integration/CIntegration.cpp index f53d50639cc..65406ae4e16 100644 --- a/SU2_CFD/src/integration/CIntegration.cpp +++ b/SU2_CFD/src/integration/CIntegration.cpp @@ -91,7 +91,7 @@ void CIntegration::Space_Integration(CGeometry *geometry, BEGIN_SU2_OMP_SAFE_GLOBAL_ACCESS { if (config->GetBoolTurbomachinery()){ - /*--- Average quantities at the inflow and outflow boundaries ---*/ + /*--- Average quantities at the inflow and outflow boundaries ---*/ solver_container[MainSolver]->TurboAverageProcess(solver_container, geometry,config,INFLOW); solver_container[MainSolver]->TurboAverageProcess(solver_container, geometry, config, OUTFLOW); } @@ -103,9 +103,6 @@ void CIntegration::Space_Integration(CGeometry *geometry, for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { KindBC = config->GetMarker_All_KindBC(iMarker); switch (KindBC) { - case EULER_WALL: - solver_container[MainSolver]->BC_Euler_Wall(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker); - break; case ACTDISK_INLET: solver_container[MainSolver]->BC_ActDisk_Inlet(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker); break; @@ -144,9 +141,6 @@ void CIntegration::Space_Integration(CGeometry *geometry, case FAR_FIELD: solver_container[MainSolver]->BC_Far_Field(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker); break; - case SYMMETRY_PLANE: - solver_container[MainSolver]->BC_Sym_Plane(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker); - break; } } @@ -195,6 +189,13 @@ void CIntegration::Space_Integration(CGeometry *geometry, solver_container[MainSolver]->BC_Periodic(geometry, solver_container, conv_bound_numerics, config); } + + for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { + if (config->GetMarker_All_KindBC(iMarker)==SYMMETRY_PLANE) + solver_container[MainSolver]->BC_Sym_Plane(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker); + else if (config->GetMarker_All_KindBC(iMarker)==EULER_WALL) + solver_container[MainSolver]->BC_Euler_Wall(geometry, solver_container, conv_bound_numerics, visc_bound_numerics, config, iMarker); + } //AD::ResumePreaccumulation(pausePreacc); } diff --git a/SU2_CFD/src/interfaces/CInterface.cpp b/SU2_CFD/src/interfaces/CInterface.cpp index bad7c06dae1..3ae5d0787b4 100644 --- a/SU2_CFD/src/interfaces/CInterface.cpp +++ b/SU2_CFD/src/interfaces/CInterface.cpp @@ -291,7 +291,7 @@ void CInterface::PreprocessAverage(CGeometry *donor_geometry, CGeometry *target_ for(iSpan = 1; iSpan SpanValuesDonor[jSpan]){ @@ -639,12 +639,3 @@ void CInterface::AllgatherAverage(CSolver *donor_solution, CSolver *target_solut delete [] avgKineTarget; delete [] avgOmegaTarget; } - -void CInterface::GatherAverageValues(CSolver *donor_solution, CSolver *target_solution, unsigned short donorZone){ - - - /*--- here we made the strong assumption that the mesh zone order - * follows the same order of the turbomachinery markers ---*/ - SetAverageValues(donor_solution, target_solution, donorZone); - -} diff --git a/SU2_CFD/src/iteration/CDiscAdjFluidIteration.cpp b/SU2_CFD/src/iteration/CDiscAdjFluidIteration.cpp index 27173f3357e..24fd1602e6e 100644 --- a/SU2_CFD/src/iteration/CDiscAdjFluidIteration.cpp +++ b/SU2_CFD/src/iteration/CDiscAdjFluidIteration.cpp @@ -471,6 +471,10 @@ void CDiscAdjFluidIteration::SetDependencies(CSolver***** solver, CGeometry**** solvers0[FLOW_SOL]->InitiateComms(geometry0, config[iZone], MPI_QUANTITIES::SOLUTION); solvers0[FLOW_SOL]->CompleteComms(geometry0, config[iZone], MPI_QUANTITIES::SOLUTION); + if (config[iZone]->GetBoolTurbomachinery()) { + solvers0[FLOW_SOL]->TurboAverageProcess(solvers0, geometry0, config[iZone], INFLOW); + solvers0[FLOW_SOL]->TurboAverageProcess(solvers0, geometry0, config[iZone], OUTFLOW); + } if (turbulent && !config[iZone]->GetFrozen_Visc_Disc()) { solvers0[TURB_SOL]->Postprocessing(geometry0, solvers0, config[iZone], MESH_0); diff --git a/SU2_CFD/src/numerics/flow/convection/fds.cpp b/SU2_CFD/src/numerics/flow/convection/fds.cpp index 4a83dfe275d..eeffeb1cb57 100644 --- a/SU2_CFD/src/numerics/flow/convection/fds.cpp +++ b/SU2_CFD/src/numerics/flow/convection/fds.cpp @@ -104,7 +104,7 @@ CNumerics::ResidualType<> CUpwFDSInc_Flow::ComputeResidual(const CConfig *config Area = GeometryToolbox::Norm(nDim, Normal); - /*--- Compute and unitary normal vector ---*/ + /*--- Compute the unit normal vector ---*/ for (iDim = 0; iDim < nDim; iDim++) { UnitNormal[iDim] = Normal[iDim]/Area; diff --git a/SU2_CFD/src/numerics/flow/convection/hllc.cpp b/SU2_CFD/src/numerics/flow/convection/hllc.cpp index d574f929b20..d94b44759a7 100644 --- a/SU2_CFD/src/numerics/flow/convection/hllc.cpp +++ b/SU2_CFD/src/numerics/flow/convection/hllc.cpp @@ -31,7 +31,7 @@ CUpwHLLC_Flow::CUpwHLLC_Flow(unsigned short val_nDim, unsigned short val_nVar, const CConfig* config) : CNumerics(val_nDim, val_nVar, config) { implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT); - kappa = config->GetRoe_Kappa(); + /* A grid is defined as dynamic if there's rigid grid movement or grid deformation AND the problem is time domain */ dynamic_grid = config->GetDynamic_Grid(); @@ -114,30 +114,19 @@ CNumerics::ResidualType<> CUpwHLLC_Flow::ComputeResidual(const CConfig* config) Density_j = V_j[nDim+2]; Enthalpy_j = V_j[nDim+3]; - - sq_vel_i = 0.0; - sq_vel_j = 0.0; - - for (iDim = 0; iDim < nDim; iDim++) { - sq_vel_i += Velocity_i[iDim] * Velocity_i[iDim]; - sq_vel_j += Velocity_j[iDim] * Velocity_j[iDim]; - } + sq_vel_i = GeometryToolbox::SquaredNorm(nDim, Velocity_i); + sq_vel_j = GeometryToolbox::SquaredNorm(nDim, Velocity_j); Energy_i = Enthalpy_i - Pressure_i / Density_i; Energy_j = Enthalpy_j - Pressure_j / Density_j; - SoundSpeed_i = sqrt( (Enthalpy_i - 0.5 * sq_vel_i) * Gamma_Minus_One ); - SoundSpeed_j = sqrt( (Enthalpy_j - 0.5 * sq_vel_j) * Gamma_Minus_One ); + SoundSpeed_i = sqrt((Enthalpy_i - 0.5 * sq_vel_i) * Gamma_Minus_One); + SoundSpeed_j = sqrt((Enthalpy_j - 0.5 * sq_vel_j) * Gamma_Minus_One); /*--- Projected velocities ---*/ - ProjVelocity_i = 0; - ProjVelocity_j = 0; - - for (iDim = 0; iDim < nDim; iDim++) { - ProjVelocity_i += Velocity_i[iDim] * UnitNormal[iDim]; - ProjVelocity_j += Velocity_j[iDim] * UnitNormal[iDim]; - } + ProjVelocity_i = GeometryToolbox::DotProduct(nDim, Velocity_i, UnitNormal); + ProjVelocity_j = GeometryToolbox::DotProduct(nDim, Velocity_j, UnitNormal); /*--- Projected Grid Velocity ---*/ @@ -146,7 +135,7 @@ CNumerics::ResidualType<> CUpwHLLC_Flow::ComputeResidual(const CConfig* config) if (dynamic_grid) { for (iDim = 0; iDim < nDim; iDim++) - ProjInterfaceVel += 0.5 * ( GridVel_i[iDim] + GridVel_j[iDim] )*UnitNormal[iDim]; + ProjInterfaceVel += 0.5 * (GridVel_i[iDim] + GridVel_j[iDim]) * UnitNormal[iDim]; SoundSpeed_i -= ProjInterfaceVel; SoundSpeed_j += ProjInterfaceVel; @@ -159,14 +148,11 @@ CNumerics::ResidualType<> CUpwHLLC_Flow::ComputeResidual(const CConfig* config) Rrho = ( sqrt(Density_i) + sqrt(Density_j) ); - sq_velRoe = 0.0; - RoeProjVelocity = - ProjInterfaceVel; - for (iDim = 0; iDim < nDim; iDim++) { RoeVelocity[iDim] = ( Velocity_i[iDim] * sqrt(Density_i) + Velocity_j[iDim] * sqrt(Density_j) ) / Rrho; - sq_velRoe += RoeVelocity[iDim] * RoeVelocity[iDim]; - RoeProjVelocity += RoeVelocity[iDim] * UnitNormal[iDim]; } + sq_velRoe = GeometryToolbox::SquaredNorm(nDim, RoeVelocity); + RoeProjVelocity = GeometryToolbox::DotProduct(nDim, RoeVelocity, UnitNormal) - ProjInterfaceVel; /*--- Mean Roe variables iPoint and jPoint ---*/ @@ -175,10 +161,8 @@ CNumerics::ResidualType<> CUpwHLLC_Flow::ComputeResidual(const CConfig* config) /*--- Roe-averaged speed of sound ---*/ - //RoeSoundSpeed2 = Gamma_Minus_One * ( RoeEnthalpy - 0.5 * sq_velRoe ); RoeSoundSpeed = sqrt( Gamma_Minus_One * ( RoeEnthalpy - 0.5 * sq_velRoe ) ) - ProjInterfaceVel; - /*--- Speed of sound at L and R ---*/ sL = min( RoeProjVelocity - RoeSoundSpeed, ProjVelocity_i - SoundSpeed_i); @@ -214,8 +198,8 @@ CNumerics::ResidualType<> CUpwHLLC_Flow::ComputeResidual(const CConfig* config) IntermediateState[0] = rhoSL * Density_i; for (iDim = 0; iDim < nDim; iDim++) - IntermediateState[iDim+1] = rhoSL * ( Density_i * Velocity_i[iDim] + ( pStar - Pressure_i ) / ( sL - ProjVelocity_i ) * UnitNormal[iDim] ) ; - IntermediateState[nVar-1] = rhoSL * ( Density_i * Energy_i - ( Pressure_i * ProjVelocity_i - pStar * sM) / ( sL - ProjVelocity_i ) ); + IntermediateState[iDim+1] = rhoSL * Density_i * Velocity_i[iDim] + (pStar - Pressure_i) * UnitNormal[iDim] / (sL - sM); + IntermediateState[nVar-1] = rhoSL * Density_i * Energy_i - (Pressure_i * ProjVelocity_i - pStar * sM) / (sL - sM); Flux[0] = sM * IntermediateState[0]; @@ -243,8 +227,8 @@ CNumerics::ResidualType<> CUpwHLLC_Flow::ComputeResidual(const CConfig* config) IntermediateState[0] = rhoSR * Density_j; for (iDim = 0; iDim < nDim; iDim++) - IntermediateState[iDim+1] = rhoSR * ( Density_j * Velocity_j[iDim] + ( pStar - Pressure_j ) / ( sR - ProjVelocity_j ) * UnitNormal[iDim] ) ; - IntermediateState[nVar-1] = rhoSR * ( Density_j * Energy_j - ( Pressure_j * ProjVelocity_j - pStar * sM ) / ( sR - ProjVelocity_j ) ); + IntermediateState[iDim+1] = rhoSR * Density_j * Velocity_j[iDim] + (pStar - Pressure_j) * UnitNormal[iDim] / (sR - sM); + IntermediateState[nVar-1] = rhoSR * Density_j * Energy_j - (Pressure_j * ProjVelocity_j - pStar * sM) / (sR - sM); Flux[0] = sM * IntermediateState[0]; @@ -254,14 +238,12 @@ CNumerics::ResidualType<> CUpwHLLC_Flow::ComputeResidual(const CConfig* config) } } - - for (iVar = 0; iVar < nVar; iVar++) - Flux[iVar] *= Area; + for (iVar = 0; iVar < nVar; iVar++) Flux[iVar] *= Area; /*--- Return early if the Jacobians do not need to be computed. ---*/ - if (implicit) - { + if (!implicit) return ResidualType<>(Flux, Jacobian_i, Jacobian_j); + if (sM > 0.0) { if (sL > 0.0) { @@ -537,27 +519,20 @@ CNumerics::ResidualType<> CUpwHLLC_Flow::ComputeResidual(const CConfig* config) } } - - /*--- Jacobians of the inviscid flux, scale = k because Flux ~ 0.5*(fc_i+fc_j)*Normal ---*/ - - Area *= kappa; - + /*--- Scale Jacobians by area (from Flux *= Area). ---*/ for (iVar = 0; iVar < nVar; iVar++) { for (jVar = 0; jVar < nVar; jVar++) { - Jacobian_i[iVar][jVar] *= Area; - Jacobian_j[iVar][jVar] *= Area; + Jacobian_i[iVar][jVar] *= Area; + Jacobian_j[iVar][jVar] *= Area; } } - } // end if implicit - return ResidualType<>(Flux, Jacobian_i, Jacobian_j); - } CUpwGeneralHLLC_Flow::CUpwGeneralHLLC_Flow(unsigned short val_nDim, unsigned short val_nVar, const CConfig* config) : CNumerics(val_nDim, val_nVar, config) { implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT); - kappa = config->GetRoe_Kappa(); + /* A grid is defined as dynamic if there's rigid grid movement or grid deformation AND the problem is time domain */ dynamic_grid = config->GetDynamic_Grid(); @@ -792,13 +767,12 @@ CNumerics::ResidualType<> CUpwGeneralHLLC_Flow::ComputeResidual(const CConfig* c } } - for (iVar = 0; iVar < nVar; iVar++) - Flux[iVar] *= Area; + for (iVar = 0; iVar < nVar; iVar++) Flux[iVar] *= Area; /*--- Return early if the Jacobians do not need to be computed. ---*/ - if (implicit) - { + if (!implicit) return ResidualType<>(Flux, Jacobian_i, Jacobian_j); + if (sM > 0.0) { if (sL > 0.0) { @@ -1090,21 +1064,14 @@ CNumerics::ResidualType<> CUpwGeneralHLLC_Flow::ComputeResidual(const CConfig* c } } - - /*--- Jacobians of the inviscid flux, scale = kappa because Flux ~ 0.5*(fc_i+fc_j)*Normal ---*/ - - Area *= kappa; - + /*--- Scale Jacobians by area (from Flux *= Area). ---*/ for (iVar = 0; iVar < nVar; iVar++) { for (jVar = 0; jVar < nVar; jVar++) { Jacobian_i[iVar][jVar] *= Area; Jacobian_j[iVar][jVar] *= Area; } } - } // end if implicit - return ResidualType<>(Flux, Jacobian_i, Jacobian_j); - } void CUpwGeneralHLLC_Flow::VinokurMontagne() { diff --git a/SU2_CFD/src/numerics/flow/convection/roe.cpp b/SU2_CFD/src/numerics/flow/convection/roe.cpp index 07c69f2030d..7b122119009 100644 --- a/SU2_CFD/src/numerics/flow/convection/roe.cpp +++ b/SU2_CFD/src/numerics/flow/convection/roe.cpp @@ -34,7 +34,7 @@ CUpwRoeBase_Flow::CUpwRoeBase_Flow(unsigned short val_nDim, unsigned short val_n implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT); /* A grid is defined as dynamic if there's rigid grid movement or grid deformation AND the problem is time domain */ dynamic_grid = config->GetDynamic_Grid(); - kappa = config->GetRoe_Kappa(); // 1 is unstable + kappa = config->GetRoe_Kappa(); Gamma = config->GetGamma(); Gamma_Minus_One = Gamma - 1.0; @@ -109,7 +109,7 @@ CNumerics::ResidualType<> CUpwRoeBase_Flow::ComputeResidual(const CConfig* confi AD::SetPreaccIn(Dissipation_i); AD::SetPreaccIn(Dissipation_j); } - /*--- Face area (norm or the normal vector) and unit normal ---*/ + /*--- Face area (norm of the normal vector) and unit normal ---*/ Area = GeometryToolbox::Norm(nDim, Normal); @@ -683,7 +683,7 @@ CUpwGeneralRoe_Flow::CUpwGeneralRoe_Flow(unsigned short val_nDim, unsigned short implicit = (config->GetKind_TimeIntScheme_Flow() == EULER_IMPLICIT); /* A grid is defined as dynamic if there's rigid grid movement or grid deformation AND the problem is time domain */ dynamic_grid = config->GetDynamic_Grid(); - kappa = config->GetRoe_Kappa(); // 1 is unstable + kappa = config->GetRoe_Kappa(); Flux = new su2double [nVar]; diff --git a/SU2_CFD/src/solvers/CAdjEulerSolver.cpp b/SU2_CFD/src/solvers/CAdjEulerSolver.cpp index 17128c7fec8..b72305e0be2 100644 --- a/SU2_CFD/src/solvers/CAdjEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CAdjEulerSolver.cpp @@ -952,11 +952,11 @@ void CAdjEulerSolver::Preprocessing(CGeometry *geometry, CSolver **solver_contai /*--- Gradient computation for MUSCL reconstruction. ---*/ if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS) - SetSolution_Gradient_GG(geometry, config, true); + SetSolution_Gradient_GG(geometry, config, 1, true); if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES) - SetSolution_Gradient_LS(geometry, config, true); + SetSolution_Gradient_LS(geometry, config, 1, true); if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES) - SetSolution_Gradient_LS(geometry, config, true); + SetSolution_Gradient_LS(geometry, config, 1, true); /*--- Limiter computation ---*/ @@ -970,8 +970,8 @@ void CAdjEulerSolver::Preprocessing(CGeometry *geometry, CSolver **solver_contai if ((center_jst) && (iMesh == MESH_0)) { SetCentered_Dissipation_Sensor(geometry, config); SetUndivided_Laplacian(geometry, config); - if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config); - if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config); + if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config, 1); + if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config, 1); } } diff --git a/SU2_CFD/src/solvers/CAdjNSSolver.cpp b/SU2_CFD/src/solvers/CAdjNSSolver.cpp index c07425a2bdc..3a219b06ea9 100644 --- a/SU2_CFD/src/solvers/CAdjNSSolver.cpp +++ b/SU2_CFD/src/solvers/CAdjNSSolver.cpp @@ -345,14 +345,14 @@ void CAdjNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container if (config->GetReconstructionGradientRequired()) { if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS) - SetSolution_Gradient_GG(geometry, config, true); + SetSolution_Gradient_GG(geometry, config, 1, true); if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES) - SetSolution_Gradient_LS(geometry, config, true); + SetSolution_Gradient_LS(geometry, config, 1, true); if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES) - SetSolution_Gradient_LS(geometry, config, true); + SetSolution_Gradient_LS(geometry, config, 1, true); } - if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config); - if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config); + if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config, 1); + if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config, 1); /*--- Limiter computation (upwind reconstruction) ---*/ @@ -361,8 +361,8 @@ void CAdjNSSolver::Preprocessing(CGeometry *geometry, CSolver **solver_container /*--- Compute gradients adj for viscous term coupling ---*/ if ((config->GetKind_Solver() == MAIN_SOLVER::ADJ_RANS) && (!config->GetFrozen_Visc_Cont())) { - if (config->GetKind_Gradient_Method() == GREEN_GAUSS) solver_container[ADJTURB_SOL]->SetSolution_Gradient_GG(geometry, config); - if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) solver_container[ADJTURB_SOL]->SetSolution_Gradient_LS(geometry, config); + if (config->GetKind_Gradient_Method() == GREEN_GAUSS) solver_container[ADJTURB_SOL]->SetSolution_Gradient_GG(geometry, config, 1); + if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) solver_container[ADJTURB_SOL]->SetSolution_Gradient_LS(geometry, config, 1); } /*--- Artificial dissipation for centered schemes ---*/ diff --git a/SU2_CFD/src/solvers/CAdjTurbSolver.cpp b/SU2_CFD/src/solvers/CAdjTurbSolver.cpp index 3d5b6eb7024..cb4a194ca95 100644 --- a/SU2_CFD/src/solvers/CAdjTurbSolver.cpp +++ b/SU2_CFD/src/solvers/CAdjTurbSolver.cpp @@ -257,12 +257,12 @@ void CAdjTurbSolver::Preprocessing(CGeometry *geometry, CSolver **solver_contain Jacobian.SetValZero(); /*--- Gradient of the adjoint turbulent variables ---*/ - if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config); - if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config); + if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config, -1); + if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config, -1); /*--- Gradient of the turbulent variables ---*/ - if (config->GetKind_Gradient_Method() == GREEN_GAUSS) solver_container[TURB_SOL]->SetSolution_Gradient_GG(geometry, config); - if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) solver_container[TURB_SOL]->SetSolution_Gradient_LS(geometry, config); + if (config->GetKind_Gradient_Method() == GREEN_GAUSS) solver_container[TURB_SOL]->SetSolution_Gradient_GG(geometry, config, -1); + if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) solver_container[TURB_SOL]->SetSolution_Gradient_LS(geometry, config, -1); } diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index 8e4c9a01147..b9e290adfc2 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -6120,81 +6120,60 @@ void CEulerSolver::PreprocessBC_Giles(CGeometry *geometry, CConfig *config, CNum void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) { - unsigned short iDim, iVar, jVar, iSpan; - unsigned long iPoint, Point_Normal, oldVertex, k, kend, kend_max, iVertex; - su2double *UnitNormal, *turboVelocity, *turboNormal; - - su2double *Velocity_b, Velocity2_b, Enthalpy_b, Energy_b, Density_b, Pressure_b, Temperature_b; - su2double *Velocity_i, Velocity2_i, Energy_i, StaticEnergy_i, Density_i, Pressure_i; - su2double Pressure_e; - su2double *V_boundary, *V_domain, *S_boundary, *S_domain; - unsigned short iZone = config->GetiZone(); - bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); - string Marker_Tag = config->GetMarker_All_TagBound(val_marker); - bool viscous = config->GetViscous(); - unsigned short nSpanWiseSections = geometry->GetnSpanWiseSections(config->GetMarker_All_TurbomachineryFlag(val_marker)); - su2double relfacAvgCfg = config->GetGiles_RelaxFactorAverage(Marker_Tag); - su2double relfacFouCfg = config->GetGiles_RelaxFactorFourier(Marker_Tag); - su2double *Normal; - su2double TwoPiThetaFreq_Pitch, pitch,theta; - const su2double *SpanWiseValues = nullptr, *FlowDir; - su2double spanPercent, extrarelfacAvg = 0.0, deltaSpan = 0.0, relfacAvg, relfacFou, coeffrelfacAvg = 0.0; - unsigned short Turbo_Flag; - - Normal = new su2double[nDim]; - turboNormal = new su2double[nDim]; - UnitNormal = new su2double[nDim]; - turboVelocity = new su2double[nDim]; - Velocity_i = new su2double[nDim]; - Velocity_b = new su2double[nDim]; - - - su2double AverageSoundSpeed, *AverageTurboMach, AverageEntropy, AverageEnthalpy; - AverageTurboMach = new su2double[nDim]; - S_boundary = new su2double[8]; - - su2double AvgMach , *cj, GilesBeta, *delta_c, **R_Matrix, *deltaprim, **R_c_inv,**R_c, alphaIn_BC, gammaIn_BC = 0, - P_Total, T_Total, Enthalpy_BC, Entropy_BC, *R, *c_avg,*dcjs, Beta_inf2, c2js_Re, c3js_Re, cOutjs_Re, avgVel2 =0.0; - - long freq; - - delta_c = new su2double[nVar]; - deltaprim = new su2double[nVar]; - cj = new su2double[nVar]; - R_Matrix = new su2double*[nVar]; - R_c = new su2double*[nVar-1]; - R_c_inv = new su2double*[nVar-1]; - R = new su2double[nVar-1]; - c_avg = new su2double[nVar]; - dcjs = new su2double[nVar]; - - for (iVar = 0; iVar < nVar; iVar++) + /*--- Initialisation of data structures ---*/ + + su2double *Normal = new su2double[nDim], + *turboNormal = new su2double[nDim], + *UnitNormal = new su2double[nDim], + *turboVelocity = new su2double[nDim], + *Velocity_i = new su2double[nDim], + *Velocity_b = new su2double[nDim], + *AverageTurboMach = new su2double[nDim], + *S_boundary = new su2double[8], + *delta_c = new su2double[nVar], + *cj = new su2double[nVar], + **R_Matrix = new su2double*[nVar], + *dcjs = new su2double[nVar], + *c_avg = new su2double[nVar], + **R_c = new su2double*[nVar-1], + **R_c_inv = new su2double*[nVar-1], + *R = new su2double[nVar-1], + *deltaprim = new su2double[nVar]; + + for (auto iVar = 0; iVar < nVar; iVar++) { R_Matrix[iVar] = new su2double[nVar]; c_avg[iVar] = 0.0; dcjs[iVar] = 0.0; } - for (iVar = 0; iVar < nVar-1; iVar++) + for (auto iVar = 0; iVar < nVar-1; iVar++) { R_c[iVar] = new su2double[nVar-1]; R_c_inv[iVar] = new su2double[nVar-1]; } - - complex I, c2ks, c2js, c3ks, c3js, cOutks, cOutjs, Beta_inf; - I = complex(0.0,1.0); + auto const I = complex(0.0,1.0); /*--- Compute coeff for under relaxation of Avg and Fourier Coefficient for hub and shroud---*/ + auto const Marker_Tag = config->GetMarker_All_TagBound(val_marker); + su2double relfacAvgCfg = config->GetGiles_RelaxFactorAverage(Marker_Tag); + + unsigned short nSpanWiseSections = geometry->GetnSpanWiseSections(config->GetMarker_All_TurbomachineryFlag(val_marker)); + + const su2double *SpanWiseValues = nullptr; + + su2double extrarelfacAvg = 0.0, deltaSpan = 0.0, relfacAvg, relfacFou = config->GetGiles_RelaxFactorFourier(Marker_Tag), coeffrelfacAvg = 0.0; + if (nDim == 3){ extrarelfacAvg = config->GetExtraRelFacGiles(0); - spanPercent = config->GetExtraRelFacGiles(1); - Turbo_Flag = config->GetMarker_All_TurbomachineryFlag(val_marker); + auto const spanPercent = config->GetExtraRelFacGiles(1); + auto const Turbo_Flag = config->GetMarker_All_TurbomachineryFlag(val_marker); SpanWiseValues = geometry->GetSpanWiseValue(Turbo_Flag); deltaSpan = SpanWiseValues[nSpanWiseSections-1]*spanPercent; coeffrelfacAvg = (relfacAvgCfg - extrarelfacAvg)/deltaSpan; } - for (iSpan= 0; iSpan < nSpanWiseSections ; iSpan++){ + for (unsigned short iSpan= 0; iSpan < nSpanWiseSections ; iSpan++){ /*--- Compute under relaxation for the Hub and Shroud Avg and Fourier Coefficient---*/ if(nDim == 3){ if(SpanWiseValues[iSpan] <= SpanWiseValues[0] + deltaSpan){ @@ -6207,18 +6186,16 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu } else{ relfacAvg = relfacAvgCfg; - relfacFou = relfacFouCfg; } } else{ { relfacAvg = relfacAvgCfg; - relfacFou = relfacFouCfg; } } GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan]); - AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); + auto AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); AverageTurboMach[0] = AverageTurboVelocity[val_marker][iSpan][0]/AverageSoundSpeed; AverageTurboMach[1] = AverageTurboVelocity[val_marker][iSpan][1]/AverageSoundSpeed; @@ -6226,167 +6203,32 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu AverageTurboMach[1] -= geometry->GetAverageTangGridVel(val_marker,iSpan)/AverageSoundSpeed; } - AvgMach = AverageTurboMach[0]*AverageTurboMach[0] + AverageTurboMach[1]*AverageTurboMach[1]; - - kend = geometry->GetnFreqSpan(val_marker, iSpan); - kend_max = geometry->GetnFreqSpanMax(config->GetMarker_All_TurbomachineryFlag(val_marker)); + auto const kend = geometry->GetnFreqSpan(val_marker, iSpan); + auto const kend_max = geometry->GetnFreqSpanMax(config->GetMarker_All_TurbomachineryFlag(val_marker)); conv_numerics->GetRMatrix(AverageSoundSpeed, AverageDensity[val_marker][iSpan], R_Matrix); + su2double Pressure_e; //Useful to pass by reference + switch(config->GetKind_Data_Giles(Marker_Tag)){ case TOTAL_CONDITIONS_PT: - /*--- Retrieve the specified total conditions for this inlet. ---*/ - P_Total = config->GetGiles_Var1(Marker_Tag); - T_Total = config->GetGiles_Var2(Marker_Tag); - FlowDir = config->GetGiles_FlowDir(Marker_Tag); - alphaIn_BC = atan(FlowDir[1]/FlowDir[0]); - - gammaIn_BC = 0; - if (nDim == 3){ - gammaIn_BC = FlowDir[2]; //atan(FlowDir[2]/FlowDir[0]); - } - - /*--- Non-dim. the inputs---*/ - P_Total /= config->GetPressure_Ref(); - T_Total /= config->GetTemperature_Ref(); - - /* --- Computes the total state --- */ - GetFluidModel()->SetTDState_PT(P_Total, T_Total); - Enthalpy_BC = GetFluidModel()->GetStaticEnergy()+ GetFluidModel()->GetPressure()/GetFluidModel()->GetDensity(); - Entropy_BC = GetFluidModel()->GetEntropy(); - - - /* --- Computes the inverse matrix R_c --- */ - conv_numerics->ComputeResJacobianGiles(GetFluidModel(), AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan], - AverageTurboVelocity[val_marker][iSpan], alphaIn_BC, gammaIn_BC, R_c, R_c_inv); - - GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan]); - AverageEnthalpy = GetFluidModel()->GetStaticEnergy() + AveragePressure[val_marker][iSpan]/AverageDensity[val_marker][iSpan]; - AverageEntropy = GetFluidModel()->GetEntropy(); - - avgVel2 = 0.0; - for (iDim = 0; iDim < nDim; iDim++) avgVel2 += AverageVelocity[val_marker][iSpan][iDim]*AverageVelocity[val_marker][iSpan][iDim]; - if (nDim == 2){ - R[0] = -(AverageEntropy - Entropy_BC); - R[1] = -(AverageTurboVelocity[val_marker][iSpan][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][iSpan][0]); - R[2] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); - } - - else{ - R[0] = -(AverageEntropy - Entropy_BC); - R[1] = -(AverageTurboVelocity[val_marker][iSpan][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][iSpan][0]); - R[2] = -(AverageTurboVelocity[val_marker][iSpan][2] - tan(gammaIn_BC)*AverageTurboVelocity[val_marker][iSpan][0]); - R[3] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); - - } - /* --- Compute the avg component c_avg = R_c^-1 * R --- */ - for (iVar = 0; iVar < nVar-1; iVar++){ - c_avg[iVar] = 0.0; - for (jVar = 0; jVar < nVar-1; jVar++){ - c_avg[iVar] += R_c_inv[iVar][jVar]*R[jVar]; - } - } + BC_Giles_Total_Inlet(conv_numerics, config, val_marker, c_avg, R, R_c_inv, R_c, iSpan, iSpan); break; case TOTAL_CONDITIONS_PT_1D: - /*--- Retrieve the specified total conditions for this inlet. ---*/ - P_Total = config->GetGiles_Var1(Marker_Tag); - T_Total = config->GetGiles_Var2(Marker_Tag); - FlowDir = config->GetGiles_FlowDir(Marker_Tag); - alphaIn_BC = atan(FlowDir[1]/FlowDir[0]); - - gammaIn_BC = 0; - if (nDim == 3){ - // Review definition of angle - gammaIn_BC = FlowDir[2]; //atan(FlowDir[2]/FlowDir[0]); - } - - /*--- Non-dim. the inputs---*/ - P_Total /= config->GetPressure_Ref(); - T_Total /= config->GetTemperature_Ref(); - - /* --- Computes the total state --- */ - GetFluidModel()->SetTDState_PT(P_Total, T_Total); - Enthalpy_BC = GetFluidModel()->GetStaticEnergy()+ GetFluidModel()->GetPressure()/GetFluidModel()->GetDensity(); - Entropy_BC = GetFluidModel()->GetEntropy(); - - - /* --- Computes the inverse matrix R_c --- */ - conv_numerics->ComputeResJacobianGiles(GetFluidModel(), AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan], - AverageTurboVelocity[val_marker][iSpan], alphaIn_BC, gammaIn_BC, R_c, R_c_inv); - - GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][nSpanWiseSections], AverageDensity[val_marker][nSpanWiseSections]); - AverageEnthalpy = GetFluidModel()->GetStaticEnergy() + AveragePressure[val_marker][nSpanWiseSections]/AverageDensity[val_marker][nSpanWiseSections]; - AverageEntropy = GetFluidModel()->GetEntropy(); - - - avgVel2 = 0.0; - for (iDim = 0; iDim < nDim; iDim++) avgVel2 += AverageVelocity[val_marker][iSpan][iDim]*AverageVelocity[val_marker][iSpan][iDim]; - if (nDim == 2){ - R[0] = -(AverageEntropy - Entropy_BC); - R[1] = -(AverageTurboVelocity[val_marker][nSpanWiseSections][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][nSpanWiseSections][0]); - R[2] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); - } - - else{ - R[0] = -(AverageEntropy - Entropy_BC); - R[1] = -(AverageTurboVelocity[val_marker][nSpanWiseSections][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][nSpanWiseSections][0]); - R[2] = -(AverageTurboVelocity[val_marker][nSpanWiseSections][2] - tan(gammaIn_BC)*AverageTurboVelocity[val_marker][nSpanWiseSections][0]); - R[3] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); - - } - /* --- Compute the avg component c_avg = R_c^-1 * R --- */ - for (iVar = 0; iVar < nVar-1; iVar++){ - c_avg[iVar] = 0.0; - for (jVar = 0; jVar < nVar-1; jVar++){ - c_avg[iVar] += R_c_inv[iVar][jVar]*R[jVar]; - } - } + BC_Giles_Total_Inlet(conv_numerics, config, val_marker, c_avg, R, R_c_inv, R_c, iSpan, nSpanWiseSections); break; case MIXING_IN: case MIXING_OUT: - /* --- Compute average jump of primitive at the mixing-plane interface--- */ - deltaprim[0] = ExtAverageDensity[val_marker][iSpan] - AverageDensity[val_marker][iSpan]; - deltaprim[1] = ExtAverageTurboVelocity[val_marker][iSpan][0] - AverageTurboVelocity[val_marker][iSpan][0]; - deltaprim[2] = ExtAverageTurboVelocity[val_marker][iSpan][1] - AverageTurboVelocity[val_marker][iSpan][1]; - if (nDim == 2){ - deltaprim[3] = ExtAveragePressure[val_marker][iSpan] - AveragePressure[val_marker][iSpan]; - } - else - { - deltaprim[3] = ExtAverageTurboVelocity[val_marker][iSpan][2] - AverageTurboVelocity[val_marker][iSpan][2]; - deltaprim[4] = ExtAveragePressure[val_marker][iSpan] - AveragePressure[val_marker][iSpan]; - } - - - /* --- Compute average jump of charachteristic variable at the mixing-plane interface--- */ - GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan]); - AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); - conv_numerics->GetCharJump(AverageSoundSpeed, AverageDensity[val_marker][iSpan], deltaprim, c_avg); + BC_Giles_Mixing(conv_numerics, val_marker, deltaprim, c_avg, iSpan); break; case MIXING_IN_1D: case MIXING_OUT_1D: - /* --- Compute average jump of primitive at the mixing-plane interface--- */ - deltaprim[0] = ExtAverageDensity[val_marker][nSpanWiseSections] - AverageDensity[val_marker][nSpanWiseSections]; - deltaprim[1] = ExtAverageTurboVelocity[val_marker][nSpanWiseSections][0] - AverageTurboVelocity[val_marker][nSpanWiseSections][0]; - deltaprim[2] = ExtAverageTurboVelocity[val_marker][nSpanWiseSections][1] - AverageTurboVelocity[val_marker][nSpanWiseSections][1]; - if (nDim == 2){ - deltaprim[3] = ExtAveragePressure[val_marker][nSpanWiseSections] - AveragePressure[val_marker][nSpanWiseSections]; - } - else - { - deltaprim[3] = ExtAverageTurboVelocity[val_marker][nSpanWiseSections][2] - AverageTurboVelocity[val_marker][nSpanWiseSections][2]; - deltaprim[4] = ExtAveragePressure[val_marker][nSpanWiseSections] - AveragePressure[val_marker][nSpanWiseSections]; - } - - /* --- Compute average jump of charachteristic variable at the mixing-plane interface--- */ - GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][nSpanWiseSections], AverageDensity[val_marker][nSpanWiseSections]); - AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); - conv_numerics->GetCharJump(AverageSoundSpeed, AverageDensity[val_marker][nSpanWiseSections], deltaprim, c_avg); + BC_Giles_Mixing(conv_numerics, val_marker, deltaprim, c_avg, nSpanWiseSections); break; @@ -6395,6 +6237,8 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu Pressure_e /= config->GetPressure_Ref(); /* --- Compute avg characteristic jump --- */ + c_avg[nDim+1] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); + c_avg[nDim + 1] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); break; @@ -6403,6 +6247,8 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu Pressure_e /= config->GetPressure_Ref(); /* --- Compute avg characteristic jump --- */ + c_avg[nDim+1] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); + c_avg[nDim + 1] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); break; @@ -6426,67 +6272,66 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu } + auto const iZone = config->GetiZone(); + /*--- Loop over all the vertices on this boundary marker ---*/ SU2_OMP_FOR_DYN(OMP_MIN_SIZE) - for (iVertex = 0; iVertex < geometry->GetnVertexSpan(val_marker,iSpan); iVertex++) { + for (unsigned long iVertex = 0; iVertex < geometry->GetnVertexSpan(val_marker,iSpan); iVertex++) { /*--- using the other vertex information for retrieving some information ---*/ - oldVertex = geometry->turbovertex[val_marker][iSpan][iVertex]->GetOldVertex(); - V_boundary= GetCharacPrimVar(val_marker, oldVertex); + auto oldVertex = geometry->turbovertex[val_marker][iSpan][iVertex]->GetOldVertex(); + auto V_boundary= GetCharacPrimVar(val_marker, oldVertex); /*--- Index of the closest interior node ---*/ - Point_Normal = geometry->vertex[val_marker][oldVertex]->GetNormal_Neighbor(); + auto Point_Normal = geometry->vertex[val_marker][oldVertex]->GetNormal_Neighbor(); /*--- Normal vector for this vertex (negate for outward convention), * this normal is scaled with the area of the face of the element ---*/ geometry->vertex[val_marker][oldVertex]->GetNormal(Normal); - for (iDim = 0; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; + for (unsigned short iDim = 0; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; conv_numerics->SetNormal(Normal); /*--- find the node related to the vertex ---*/ - iPoint = geometry->turbovertex[val_marker][iSpan][iVertex]->GetNode(); + auto iPoint = geometry->turbovertex[val_marker][iSpan][iVertex]->GetNode(); /*--- Normalize Normal vector for this vertex (already for outward convention) ---*/ geometry->turbovertex[val_marker][iSpan][iVertex]->GetNormal(UnitNormal); geometry->turbovertex[val_marker][iSpan][iVertex]->GetTurboNormal(turboNormal); /*--- Retrieve solution at this boundary node ---*/ - V_domain = nodes->GetPrimitive(iPoint); + auto V_domain = nodes->GetPrimitive(iPoint); /*--- Retrieve domain Secondary variables ---*/ - S_domain = nodes->GetSecondary(iPoint); + auto S_domain = nodes->GetSecondary(iPoint); /*--- Compute the internal state u_i ---*/ - Velocity2_i = 0; - for (iDim = 0; iDim < nDim; iDim++) + su2double Velocity2_i = 0; + for (unsigned short iDim = 0; iDim < nDim; iDim++) { Velocity_i[iDim] = nodes->GetVelocity(iPoint,iDim); Velocity2_i += Velocity_i[iDim]*Velocity_i[iDim]; } - Density_i = nodes->GetDensity(iPoint); + auto Density_i = nodes->GetDensity(iPoint); - Energy_i = nodes->GetEnergy(iPoint); - StaticEnergy_i = Energy_i - 0.5*Velocity2_i; + auto Energy_i = nodes->GetEnergy(iPoint); + auto StaticEnergy_i = Energy_i - 0.5*Velocity2_i; GetFluidModel()->SetTDState_rhoe(Density_i, StaticEnergy_i); - Pressure_i = GetFluidModel()->GetPressure(); + auto Pressure_i = GetFluidModel()->GetPressure(); ComputeTurboVelocity(Velocity_i, turboNormal, turboVelocity, config->GetMarker_All_TurbomachineryFlag(val_marker),config->GetKind_TurboMachinery(iZone)); + deltaprim[0] = Density_i - AverageDensity[val_marker][iSpan]; + deltaprim[1] = turboVelocity[0] - AverageTurboVelocity[val_marker][iSpan][0]; + deltaprim[2] = turboVelocity[1] - AverageTurboVelocity[val_marker][iSpan][1]; if (nDim == 2){ - deltaprim[0] = Density_i - AverageDensity[val_marker][iSpan]; - deltaprim[1] = turboVelocity[0] - AverageTurboVelocity[val_marker][iSpan][0]; - deltaprim[2] = turboVelocity[1] - AverageTurboVelocity[val_marker][iSpan][1]; deltaprim[3] = Pressure_i - AveragePressure[val_marker][iSpan]; } else{ - deltaprim[0] = Density_i - AverageDensity[val_marker][iSpan]; - deltaprim[1] = turboVelocity[0] - AverageTurboVelocity[val_marker][iSpan][0]; - deltaprim[2] = turboVelocity[1] - AverageTurboVelocity[val_marker][iSpan][1]; deltaprim[3] = turboVelocity[2] - AverageTurboVelocity[val_marker][iSpan][2]; deltaprim[4] = Pressure_i - AveragePressure[val_marker][iSpan]; } @@ -6496,8 +6341,13 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu conv_numerics->GetCharJump(AverageSoundSpeed, AverageDensity[val_marker][iSpan], deltaprim, cj); - pitch = geometry->GetMaxAngularCoord(val_marker, iSpan) - geometry->GetMinAngularCoord(val_marker,iSpan); - theta = geometry->turbovertex[val_marker][iSpan][iVertex]->GetRelAngularCoord(); + auto pitch = geometry->GetMaxAngularCoord(val_marker, iSpan) - geometry->GetMinAngularCoord(val_marker,iSpan); + auto theta = geometry->turbovertex[val_marker][iSpan][iVertex]->GetRelAngularCoord(); + + auto const AvgMach = AverageTurboMach[0]*AverageTurboMach[0] + AverageTurboMach[1]*AverageTurboMach[1]; + auto Beta_inf= I*complex(sqrt(1.0 - AvgMach)); + su2double TwoPiThetaFreq_Pitch; + long freq; switch(config->GetKind_Data_Giles(Marker_Tag)) { @@ -6507,11 +6357,18 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu case TOTAL_CONDITIONS_PT: case MIXING_IN:case TOTAL_CONDITIONS_PT_1D: case MIXING_IN_1D: if(config->GetSpatialFourier()){ + + /* --- Initial definition of variables ---*/ + auto c2js = complex(0.0,0.0); + auto c3js = complex(0.0,0.0); + auto c2ks = complex(0.0,0.0); + auto c3ks = complex(0.0,0.0); + auto c2js_Re = c2js.real(); + auto c3js_Re = c3js.real(); + su2double Beta_inf2; + if (AvgMach <= 1.0){ - Beta_inf= I*complex(sqrt(1.0 - AvgMach)); - c2js = complex(0.0,0.0); - c3js = complex(0.0,0.0); - for(k=0; k < 2*kend_max+1; k++){ + for(unsigned long k=0; k < 2*kend_max+1; k++){ freq = k - kend_max; if(freq >= (long)(-kend) && freq <= (long)(kend) && AverageTurboMach[0] > config->GetAverageMachLimit()){ TwoPiThetaFreq_Pitch = 2*PI_NUMBER*freq*theta/pitch; @@ -6530,16 +6387,10 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu c2js_Re = c2js.real(); c3js_Re = c3js.real(); - if (nDim == 2){ - dcjs[0] = 0.0 - cj[0]; - dcjs[1] = c2js_Re - cj[1]; - dcjs[2] = c3js_Re - cj[2]; - }else{ - dcjs[0] = 0.0 - cj[0]; - dcjs[1] = c2js_Re - cj[1]; - dcjs[2] = 0.0 - cj[2]; - dcjs[3] = c3js_Re - cj[3]; - } + dcjs[0] = 0.0 - cj[0]; + dcjs[1] = c2js_Re - cj[1]; + dcjs[2] = 0.0 - cj[2]; + dcjs[nDim] = c3js_Re - cj[nDim]; // Overwrites previous value in 2D case }else{ if (AverageTurboVelocity[val_marker][iSpan][1] >= 0.0){ @@ -6547,40 +6398,21 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu }else{ Beta_inf2= sqrt(AvgMach-1.0); } - if (nDim == 2){ - c2js_Re = -cj[3]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - c3js_Re = cj[3]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - c3js_Re *= (Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - }else{ - c2js_Re = -cj[4]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - c3js_Re = cj[4]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - c3js_Re *= (Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - } + c2js_Re = -cj[nDim+1]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); + c3js_Re = cj[nDim+1]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); + c3js_Re *= (Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - if (nDim == 2){ - dcjs[0] = 0.0 - cj[0]; - dcjs[1] = c2js_Re - cj[1]; - dcjs[2] = c3js_Re - cj[2]; - }else{ - dcjs[0] = 0.0 - cj[0]; - dcjs[1] = c2js_Re - cj[1]; - dcjs[2] = 0.0 - cj[2]; - dcjs[3] = c3js_Re - cj[3]; - } - } - } - else{ - if (nDim == 2){ - dcjs[0] = 0.0; - dcjs[1] = 0.0; - dcjs[2] = 0.0; - }else{ - dcjs[0] = 0.0; - dcjs[1] = 0.0; - dcjs[2] = 0.0; - dcjs[3] = 0.0; + dcjs[0] = 0.0 - cj[0]; + dcjs[1] = c2js_Re - cj[1]; + dcjs[2] = 0.0 - cj[2]; + dcjs[nDim] = c3js_Re - cj[nDim]; } + }else{ + dcjs[0] = 0.0; + dcjs[1] = 0.0; + dcjs[2] = 0.0; + dcjs[nDim] = 0.0; } /* --- Impose Inlet BC Reflecting--- */ delta_c[0] = relfacAvg*c_avg[0] + relfacFou*dcjs[0]; @@ -6599,6 +6431,7 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu /* --- implementation of Giles BC---*/ if(config->GetSpatialFourier()){ + su2double GilesBeta, cOutjs_Re; if (AvgMach > 1.0){ /* --- supersonic Giles implementation ---*/ if (AverageTurboVelocity[val_marker][iSpan][1] >= 0.0){ @@ -6622,9 +6455,9 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu }else{ /* --- subsonic Giles implementation ---*/ - Beta_inf= I*complex(sqrt(1.0 - AvgMach)); - cOutjs = complex(0.0,0.0); - for(k=0; k < 2*kend_max+1; k++){ + auto cOutjs = complex(0.0,0.0); + auto cOutks = complex(0.0,0.0); + for(unsigned long k=0; k < 2*kend_max+1; k++){ freq = k - kend_max; if(freq >= (long)(-kend) && freq <= (long)(kend) && AverageTurboMach[0] > config->GetAverageMachLimit()){ TwoPiThetaFreq_Pitch = 2*PI_NUMBER*freq*theta/pitch; @@ -6639,41 +6472,25 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu } cOutjs_Re = cOutjs.real(); - if (nDim == 2){ - dcjs[3] = cOutjs_Re - cj[3]; - } - else{ - dcjs[4] = cOutjs_Re - cj[4]; - } + dcjs[nDim+1] = cOutjs_Re - cj[nDim+1]; } } else{ - if (nDim == 2){ - dcjs[3] = 0.0; - } - else{ - dcjs[4] = 0.0; - } + dcjs[nDim+1] = 0.0; } /* --- Impose Outlet BC Non-Reflecting --- */ delta_c[0] = cj[0]; delta_c[1] = cj[1]; delta_c[2] = cj[2]; - if (nDim == 2){ - delta_c[3] = relfacAvg*c_avg[3] + relfacFou*dcjs[3]; - } - else{ - delta_c[3] = cj[3]; - delta_c[4] = relfacAvg*c_avg[4] + relfacFou*dcjs[4]; - } - + delta_c[3] = cj[3]; + delta_c[nDim+1] = relfacAvg*c_avg[nDim+1] + relfacFou*dcjs[nDim+1]; /*--- Automatically impose supersonic autoflow ---*/ if (abs(AverageTurboMach[0]) > 1.0000){ delta_c[0] = 0.0; delta_c[1] = 0.0; delta_c[2] = 0.0; - delta_c[2] = 0.0; + delta_c[3] = 0.0; if (nDim == 3)delta_c[4] = 0.0; } @@ -6685,31 +6502,25 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu } /*--- Compute primitive jump from characteristic variables ---*/ - for (iVar = 0; iVar < nVar; iVar++) + for (unsigned short iVar = 0; iVar < nVar; iVar++) { deltaprim[iVar]=0.0; - for (jVar = 0; jVar < nVar; jVar++) + for (unsigned short jVar = 0; jVar < nVar; jVar++) { deltaprim[iVar] += R_Matrix[iVar][jVar]*delta_c[jVar]; } } /*--- retrieve boundary variables ---*/ - Density_b = AverageDensity[val_marker][iSpan] + deltaprim[0]; + su2double Density_b = AverageDensity[val_marker][iSpan] + deltaprim[0]; turboVelocity[0] = AverageTurboVelocity[val_marker][iSpan][0] + deltaprim[1]; turboVelocity[1] = AverageTurboVelocity[val_marker][iSpan][1] + deltaprim[2]; - if(nDim == 2){ - Pressure_b = AveragePressure[val_marker][iSpan] + deltaprim[3]; - } - else{ - turboVelocity[2] = AverageTurboVelocity[val_marker][iSpan][2] + deltaprim[3]; - Pressure_b = AveragePressure[val_marker][iSpan] + deltaprim[4]; - } - + turboVelocity[nDim-1] = AverageTurboVelocity[val_marker][iSpan][nDim-1] + deltaprim[nDim]; + su2double Pressure_b = AveragePressure[val_marker][iSpan] + deltaprim[nDim+1]; ComputeBackVelocity(turboVelocity, turboNormal, Velocity_b, config->GetMarker_All_TurbomachineryFlag(val_marker), config->GetKind_TurboMachinery(iZone)); - Velocity2_b = 0.0; - for (iDim = 0; iDim < nDim; iDim++) { + su2double Velocity2_b = 0.0; + for (unsigned short iDim = 0; iDim < nDim; iDim++) { Velocity2_b+= Velocity_b[iDim]*Velocity_b[iDim]; } @@ -6717,20 +6528,20 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu Pressure_b = Pressure_i; Density_b = Density_i; Velocity2_b = 0.0; - for (iDim = 0; iDim < nDim; iDim++) { + for (unsigned short iDim = 0; iDim < nDim; iDim++) { Velocity_b[iDim] = Velocity_i[iDim]; Velocity2_b+= Velocity_b[iDim]*Velocity_b[iDim]; } } GetFluidModel()->SetTDState_Prho(Pressure_b, Density_b); - Energy_b = GetFluidModel()->GetStaticEnergy() + 0.5*Velocity2_b; - Temperature_b= GetFluidModel()->GetTemperature(); - Enthalpy_b = Energy_b + Pressure_b/Density_b; + su2double Energy_b = GetFluidModel()->GetStaticEnergy() + 0.5*Velocity2_b; + su2double Temperature_b= GetFluidModel()->GetTemperature(); + su2double Enthalpy_b = Energy_b + Pressure_b/Density_b; /*--- Primitive variables, using the derived quantities ---*/ V_boundary[0] = Temperature_b; - for (iDim = 0; iDim < nDim; iDim++) + for (unsigned short iDim = 0; iDim < nDim; iDim++) V_boundary[iDim+1] = Velocity_b[iDim]; V_boundary[nDim+1] = Pressure_b; V_boundary[nDim+2] = Density_b; @@ -6758,12 +6569,12 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu LinSysRes.AddBlock(iPoint, residual); /*--- Jacobian contribution for implicit integration ---*/ - if (implicit) + if (config->GetKind_TimeIntScheme() == EULER_IMPLICIT) Jacobian.AddBlock2Diag(iPoint, residual.jacobian_i); /*--- Viscous contribution ---*/ - if (viscous) { + if (config->GetViscous()) { /*--- Set laminar and eddy viscosity at the infinity ---*/ @@ -6817,7 +6628,7 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu /*--- Jacobian contribution for implicit integration ---*/ - if (implicit) + if (config->GetKind_TimeIntScheme() == EULER_IMPLICIT) Jacobian.SubtractBlock2Diag(iPoint, residual.jacobian_i); } @@ -6839,11 +6650,11 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu delete [] delta_c; delete [] deltaprim; delete [] cj; - for (iVar = 0; iVar < nVar; iVar++) + for (unsigned short iVar = 0; iVar < nVar; iVar++) { delete [] R_Matrix[iVar]; } - for (iVar = 0; iVar < nVar-1; iVar++) + for (unsigned short iVar = 0; iVar < nVar-1; iVar++) { delete [] R_c_inv[iVar]; delete [] R_c[iVar]; @@ -6861,6 +6672,73 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu delete [] turboVelocity; } +void CEulerSolver::BC_Giles_Total_Inlet( CNumerics *conv_numerics, CConfig *config, unsigned short val_marker, + su2double *&c_avg, su2double *&R, su2double **&R_c_inv, su2double **&R_c, unsigned short iSpan, unsigned short SpanwisePosition) { + + /*--- Calculates boundry condition for quasi-3D and 1D total boundary conditions ---*/ + + /*--- Retrieve the specified boundary conditions. ---*/ + auto const Marker_Tag = config->GetMarker_All_TagBound(val_marker); + auto P_Total = config->GetGiles_Var1(Marker_Tag); + auto T_Total = config->GetGiles_Var2(Marker_Tag); + auto const FlowDir = config->GetGiles_FlowDir(Marker_Tag); + auto const alphaIn_BC = atan(FlowDir[1]/FlowDir[0]); + + su2double gammaIn_BC = 0; + if (nDim == 3){ + gammaIn_BC = FlowDir[2]; //atan(FlowDir[2]/FlowDir[0]); + } + + /*--- Non-dim. the inputs---*/ + P_Total /= config->GetPressure_Ref(); + T_Total /= config->GetTemperature_Ref(); + + /* --- Computes the total state --- */ + GetFluidModel()->SetTDState_PT(P_Total, T_Total); + auto const Enthalpy_BC = GetFluidModel()->GetStaticEnergy()+ GetFluidModel()->GetPressure()/GetFluidModel()->GetDensity(); + auto const Entropy_BC = GetFluidModel()->GetEntropy(); + + /* --- Computes the inverse matrix R_c --- */ + conv_numerics->ComputeResJacobianGiles(GetFluidModel(), AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan], + AverageTurboVelocity[val_marker][iSpan], alphaIn_BC, gammaIn_BC, R_c, R_c_inv); + + GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][SpanwisePosition], AverageDensity[val_marker][SpanwisePosition]); + auto AverageEnthalpy = GetFluidModel()->GetStaticEnergy() + AveragePressure[val_marker][SpanwisePosition]/AverageDensity[val_marker][SpanwisePosition]; + auto AverageEntropy = GetFluidModel()->GetEntropy(); + + + su2double avgVel2 = 0.0; + for (unsigned short iDim = 0; iDim < nDim; iDim++) avgVel2 += AverageVelocity[val_marker][iSpan][iDim]*AverageVelocity[val_marker][iSpan][iDim]; + + R[0] = -(AverageEntropy - Entropy_BC); + R[1] = -(AverageTurboVelocity[val_marker][SpanwisePosition][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][SpanwisePosition][0]); + R[2] = -(AverageTurboVelocity[val_marker][SpanwisePosition][2] - tan(gammaIn_BC)*AverageTurboVelocity[val_marker][SpanwisePosition][0]); + R[nDim] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); + + /* --- Compute the avg component c_avg = R_c^-1 * R --- */ + for (unsigned short iVar = 0; iVar < nVar-1; iVar++){ + c_avg[iVar] = 0.0; + for (unsigned short jVar = 0; jVar < nVar-1; jVar++){ + c_avg[iVar] += R_c_inv[iVar][jVar]*R[jVar]; + } + } +} + +void CEulerSolver::BC_Giles_Mixing(CNumerics *conv_numerics, unsigned short val_marker, su2double *&deltaprim, su2double *&c_avg, unsigned short SpanwisePosition) { + + /* --- Compute average jump of primitive at the mixing-plane interface--- */ + deltaprim[0] = ExtAverageDensity[val_marker][SpanwisePosition] - AverageDensity[val_marker][SpanwisePosition]; + deltaprim[1] = ExtAverageTurboVelocity[val_marker][SpanwisePosition][0] - AverageTurboVelocity[val_marker][SpanwisePosition][0]; + deltaprim[2] = ExtAverageTurboVelocity[val_marker][SpanwisePosition][1] - AverageTurboVelocity[val_marker][SpanwisePosition][1]; + deltaprim[3] = ExtAverageTurboVelocity[val_marker][SpanwisePosition][2] - AverageTurboVelocity[val_marker][SpanwisePosition][2]; + deltaprim[nDim+1] = ExtAveragePressure[val_marker][SpanwisePosition] - AveragePressure[val_marker][SpanwisePosition]; + + /* --- Compute average jump of charachteristic variable at the mixing-plane interface--- */ + GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][SpanwisePosition], AverageDensity[val_marker][SpanwisePosition]); + auto const AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); + conv_numerics->GetCharJump(AverageSoundSpeed, AverageDensity[val_marker][SpanwisePosition], deltaprim, c_avg); +} + void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) { @@ -7346,41 +7224,36 @@ void CEulerSolver::BC_Supersonic_Inlet(CGeometry *geometry, CSolver **solver_con const bool tkeNeeded = (config->GetKind_Turb_Model() == TURB_MODEL::SST); /*--- Supersonic inlet flow: there are no outgoing characteristics, - so all flow variables can be imposed at the inlet. - First, retrieve the specified values for the primitive variables. ---*/ - - const su2double Temperature = config->GetInlet_Temperature(Marker_Tag) / config->GetTemperature_Ref(); - const su2double Pressure = config->GetInlet_Pressure(Marker_Tag) / config->GetPressure_Ref(); - const auto* Vel = config->GetInlet_Velocity(Marker_Tag); + so all flow variables can be imposed at the inlet. ---*/ - su2double Velocity[MAXNDIM] = {0.0}; - for (unsigned short iDim = 0; iDim < nDim; iDim++) - Velocity[iDim] = Vel[iDim] / config->GetVelocity_Ref(); + SU2_OMP_FOR_DYN(OMP_MIN_SIZE) + for (auto iVertex = 0ul; iVertex < geometry->nVertex[val_marker]; iVertex++) { + const auto iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); - /*--- Density at the inlet from the gas law ---*/ + if (!geometry->nodes->GetDomain(iPoint)) continue; - const su2double Density = Pressure / (Gas_Constant * Temperature); + /*--- Retrieve the inlet profile, note that total conditions are reused as static. ---*/ - /*--- Compute the energy from the specified state ---*/ + const su2double Temperature = Inlet_Ttotal[val_marker][iVertex] / config->GetTemperature_Ref(); + const su2double Pressure = Inlet_Ptotal[val_marker][iVertex] / config->GetPressure_Ref(); + su2double Velocity[MAXNDIM] = {0.0}; + for (unsigned short iDim = 0; iDim < nDim; iDim++) { + Velocity[iDim] = Inlet_FlowDir[val_marker][iVertex][iDim] / config->GetVelocity_Ref(); + } - const su2double Velocity2 = GeometryToolbox::SquaredNorm(int(MAXNDIM), Velocity); - su2double Energy = Pressure / (Density * Gamma_Minus_One) + 0.5 * Velocity2; - if (tkeNeeded) Energy += GetTke_Inf(); + /*--- Density at the inlet from the gas law. ---*/ - /*--- Loop over all the vertices on this boundary marker ---*/ + const su2double Density = Pressure / (Gas_Constant * Temperature); - SU2_OMP_FOR_DYN(OMP_MIN_SIZE) - for (auto iVertex = 0ul; iVertex < geometry->nVertex[val_marker]; iVertex++) { - const auto iPoint = geometry->vertex[val_marker][iVertex]->GetNode(); + /*--- Compute the energy from the specified state. ---*/ - if (!geometry->nodes->GetDomain(iPoint)) continue; + const su2double Velocity2 = GeometryToolbox::SquaredNorm(int(MAXNDIM), Velocity); + su2double Energy = Pressure / (Density * Gamma_Minus_One) + 0.5 * Velocity2; + if (tkeNeeded) Energy += GetTke_Inf(); - /*--- Allocate the value at the inlet ---*/ + /*--- Primitive variables, using the derived quantities. ---*/ auto* V_inlet = GetCharacPrimVar(val_marker, iVertex); - - /*--- Primitive variables, using the derived quantities ---*/ - V_inlet[prim_idx.Temperature()] = Temperature; V_inlet[prim_idx.Pressure()] = Pressure; V_inlet[prim_idx.Density()] = Density; @@ -7388,17 +7261,17 @@ void CEulerSolver::BC_Supersonic_Inlet(CGeometry *geometry, CSolver **solver_con for (unsigned short iDim = 0; iDim < nDim; iDim++) V_inlet[iDim+prim_idx.Velocity()] = Velocity[iDim]; - /*--- Current solution at this boundary node ---*/ + /*--- Current solution at this boundary node. ---*/ - auto* V_domain = nodes->GetPrimitive(iPoint); + const auto* V_domain = nodes->GetPrimitive(iPoint); - /*--- Normal vector for this vertex (negate for outward convention) ---*/ + /*--- Normal vector for this vertex (negate for outward convention). ---*/ su2double Normal[MAXNDIM] = {0.0}; geometry->vertex[val_marker][iVertex]->GetNormal(Normal); for (unsigned short iDim = 0; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; - /*--- Set various quantities in the solver class ---*/ + /*--- Set various quantities in the solver class. ---*/ conv_numerics->SetNormal(Normal); conv_numerics->SetPrimitive(V_domain, V_inlet); @@ -7407,13 +7280,13 @@ void CEulerSolver::BC_Supersonic_Inlet(CGeometry *geometry, CSolver **solver_con conv_numerics->SetGridVel(geometry->nodes->GetGridVel(iPoint), geometry->nodes->GetGridVel(iPoint)); - /*--- Compute the residual using an upwind scheme ---*/ + /*--- Compute the residual using an upwind scheme. ---*/ auto residual = conv_numerics->ComputeResidual(config); LinSysRes.AddBlock(iPoint, residual); - /*--- Jacobian contribution for implicit integration ---*/ + /*--- Jacobian contribution for implicit integration. ---*/ if (implicit) Jacobian.AddBlock2Diag(iPoint, residual.jacobian_i); diff --git a/SU2_CFD/src/solvers/CNEMONSSolver.cpp b/SU2_CFD/src/solvers/CNEMONSSolver.cpp index b30b99edebe..5b12013cee2 100644 --- a/SU2_CFD/src/solvers/CNEMONSSolver.cpp +++ b/SU2_CFD/src/solvers/CNEMONSSolver.cpp @@ -166,7 +166,7 @@ void CNEMONSSolver::SetPrimitive_Gradient_GG(CGeometry *geometry, const CConfig const auto& primitives = nodes->GetPrimitive_Aux(); - computeGradientsGreenGauss(this, comm, commPer, *geometry, *config, primitives, 0, nPrimVarGrad, gradient); + computeGradientsGreenGauss(this, comm, commPer, *geometry, *config, primitives, 0, nPrimVarGrad, prim_idx.Velocity(), gradient); } void CNEMONSSolver::Viscous_Residual(CGeometry *geometry, diff --git a/SU2_CFD/src/solvers/CRadP1Solver.cpp b/SU2_CFD/src/solvers/CRadP1Solver.cpp index d102e3b1d9a..21e5458a81c 100644 --- a/SU2_CFD/src/solvers/CRadP1Solver.cpp +++ b/SU2_CFD/src/solvers/CRadP1Solver.cpp @@ -150,12 +150,12 @@ void CRadP1Solver::Preprocessing(CGeometry *geometry, CSolver **solver_container /*--- Compute the Solution gradients ---*/ if (config->GetReconstructionGradientRequired()) { - if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config, true); - if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config, true); - if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config, true); + if (config->GetKind_Gradient_Method_Recon() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config, -1, true); + if (config->GetKind_Gradient_Method_Recon() == LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config, -1, true); + if (config->GetKind_Gradient_Method_Recon() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config, -1, true); } - if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config); - if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config); + if (config->GetKind_Gradient_Method() == GREEN_GAUSS) SetSolution_Gradient_GG(geometry, config, -1); + if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) SetSolution_Gradient_LS(geometry, config, -1); } diff --git a/SU2_CFD/src/solvers/CSolver.cpp b/SU2_CFD/src/solvers/CSolver.cpp index b9d03fe3ee2..bfbd4edad58 100644 --- a/SU2_CFD/src/solvers/CSolver.cpp +++ b/SU2_CFD/src/solvers/CSolver.cpp @@ -2097,7 +2097,7 @@ void CSolver::SetAuxVar_Gradient_GG(CGeometry *geometry, const CConfig *config) auto& gradient = base_nodes->GetAuxVarGradient(); computeGradientsGreenGauss(this, MPI_QUANTITIES::AUXVAR_GRADIENT, PERIODIC_NONE, *geometry, - *config, solution, 0, base_nodes->GetnAuxVar(), gradient); + *config, solution, 0, base_nodes->GetnAuxVar(), -1, gradient); } void CSolver::SetAuxVar_Gradient_LS(CGeometry *geometry, const CConfig *config) { @@ -2108,20 +2108,19 @@ void CSolver::SetAuxVar_Gradient_LS(CGeometry *geometry, const CConfig *config) auto& rmatrix = base_nodes->GetRmatrix(); computeGradientsLeastSquares(this, MPI_QUANTITIES::AUXVAR_GRADIENT, PERIODIC_NONE, *geometry, *config, - weighted, solution, 0, base_nodes->GetnAuxVar(), gradient, rmatrix); + weighted, solution, 0, base_nodes->GetnAuxVar(), -1, gradient, rmatrix); } -void CSolver::SetSolution_Gradient_GG(CGeometry *geometry, const CConfig *config, bool reconstruction) { +void CSolver::SetSolution_Gradient_GG(CGeometry *geometry, const CConfig *config, short idxVel, bool reconstruction) { const auto& solution = base_nodes->GetSolution(); auto& gradient = reconstruction? base_nodes->GetGradient_Reconstruction() : base_nodes->GetGradient(); const auto comm = reconstruction? MPI_QUANTITIES::SOLUTION_GRAD_REC : MPI_QUANTITIES::SOLUTION_GRADIENT; const auto commPer = reconstruction? PERIODIC_SOL_GG_R : PERIODIC_SOL_GG; - - computeGradientsGreenGauss(this, comm, commPer, *geometry, *config, solution, 0, nVar, gradient); + computeGradientsGreenGauss(this, comm, commPer, *geometry, *config, solution, 0, nVar, idxVel, gradient); } -void CSolver::SetSolution_Gradient_LS(CGeometry *geometry, const CConfig *config, bool reconstruction) { +void CSolver::SetSolution_Gradient_LS(CGeometry *geometry, const CConfig *config, short idxVel, bool reconstruction) { /*--- Set a flag for unweighted or weighted least-squares. ---*/ bool weighted; @@ -2141,7 +2140,7 @@ void CSolver::SetSolution_Gradient_LS(CGeometry *geometry, const CConfig *config auto& gradient = reconstruction? base_nodes->GetGradient_Reconstruction() : base_nodes->GetGradient(); const auto comm = reconstruction? MPI_QUANTITIES::SOLUTION_GRAD_REC : MPI_QUANTITIES::SOLUTION_GRADIENT; - computeGradientsLeastSquares(this, comm, commPer, *geometry, *config, weighted, solution, 0, nVar, gradient, rmatrix); + computeGradientsLeastSquares(this, comm, commPer, *geometry, *config, weighted, solution, 0, nVar, idxVel, gradient, rmatrix); } void CSolver::SetUndivided_Laplacian(CGeometry *geometry, const CConfig *config) { @@ -2240,7 +2239,7 @@ void CSolver::SetGridVel_Gradient(CGeometry *geometry, const CConfig *config) co auto rmatrix = CVectorOfMatrix(nPoint,nDim,nDim); computeGradientsLeastSquares(nullptr, MPI_QUANTITIES::GRID_VELOCITY, PERIODIC_NONE, *geometry, *config, - true, gridVel, 0, nDim, gridVelGrad, rmatrix); + true, gridVel, 0, nDim, 0, gridVelGrad, rmatrix); } void CSolver::SetSolution_Limiter(CGeometry *geometry, const CConfig *config) { @@ -3589,15 +3588,26 @@ void CSolver::LoadInletProfile(CGeometry **geometry, /*--- Skip if this is the wrong type of marker. ---*/ if (config->GetMarker_All_KindBC(iMarker) != KIND_MARKER) continue; - string Marker_Tag = config->GetMarker_All_TagBound(iMarker); - su2double p_total = config->GetInletPtotal(Marker_Tag); - su2double t_total = config->GetInletTtotal(Marker_Tag); - auto flow_dir = config->GetInletFlowDir(Marker_Tag); - std::stringstream columnName,columnValue; + const string Marker_Tag = config->GetMarker_All_TagBound(iMarker); + std::stringstream columnName,columnValue; columnValue << setprecision(15); columnValue << std::scientific; + su2double p_total, t_total; + const su2double* flow_dir = nullptr; + + if (KIND_MARKER == INLET_FLOW) { + p_total = config->GetInletPtotal(Marker_Tag); + t_total = config->GetInletTtotal(Marker_Tag); + flow_dir = config->GetInletFlowDir(Marker_Tag); + } else if (KIND_MARKER == SUPERSONIC_INLET) { + p_total = config->GetInlet_Pressure(Marker_Tag); + t_total = config->GetInlet_Temperature(Marker_Tag); + flow_dir = config->GetInlet_Velocity(Marker_Tag); + } else { + SU2_MPI::Error("Unsupported type of inlet.", CURRENT_FUNCTION); + } columnValue << t_total << "\t" << p_total <<"\t"; for (unsigned short iDim = 0; iDim < nDim; iDim++) { columnValue << flow_dir[iDim] <<"\t"; @@ -3606,7 +3616,9 @@ void CSolver::LoadInletProfile(CGeometry **geometry, columnName << "# COORD-X " << setw(24) << "COORD-Y " << setw(24); if(nDim==3) columnName << "COORD-Z " << setw(24); - if (config->GetKind_Regime()==ENUM_REGIME::COMPRESSIBLE){ + if (KIND_MARKER == SUPERSONIC_INLET) { + columnName << "TEMPERATURE" << setw(24) << "PRESSURE " << setw(24); + } else if (config->GetKind_Regime() == ENUM_REGIME::COMPRESSIBLE) { switch (config->GetKind_Inlet()) { /*--- compressible conditions ---*/ case INLET_TYPE::TOTAL_CONDITIONS: @@ -3617,7 +3629,8 @@ void CSolver::LoadInletProfile(CGeometry **geometry, break; default: SU2_MPI::Error("Unsupported INLET_TYPE.", CURRENT_FUNCTION); - break; } + break; + } } else { switch (config->GetKind_Inc_Inlet(Marker_Tag)) { /*--- incompressible conditions ---*/ @@ -3675,10 +3688,16 @@ void CSolver::LoadInletProfile(CGeometry **geometry, } + /*--- There are no markers of this type. ---*/ + + const unsigned short has_names = !columnNames.empty(); + unsigned short any_has_names; + SU2_MPI::Allreduce(&has_names, &any_has_names, 1, MPI_UNSIGNED_SHORT, MPI_MAX, SU2_MPI::GetComm()); + if (!any_has_names) return; /*--- Read the profile data from an ASCII file. ---*/ - CMarkerProfileReaderFVM profileReader(geometry[MESH_0], config, profile_filename, KIND_MARKER, nCol_InletFile, columnNames,columnValues); + CMarkerProfileReaderFVM profileReader(geometry[MESH_0], config, profile_filename, KIND_MARKER, nCol_InletFile, columnNames, columnValues); /*--- Load data from the restart into correct containers. ---*/ @@ -3914,7 +3933,7 @@ void CSolver::LoadInletProfile(CGeometry **geometry, const auto Marker_Tag = config->GetMarker_All_TagBound(iMarker); - /* Check the number of columns and allocate temp array. */ + /*--- Check the number of columns and allocate temp array. ---*/ unsigned short nColumns = 0; for (auto jMarker = 0ul; jMarker < profileReader.GetNumberOfProfiles(); jMarker++) { @@ -3948,12 +3967,10 @@ void CSolver::LoadInletProfile(CGeometry **geometry, the averaging. ---*/ for (auto iChildren = 0u; iChildren < geometry[iMesh]->nodes->GetnChildren_CV(iPoint); iChildren++) { - const auto Point_Fine = geometry[iMesh]->nodes->GetChildren_CV(iPoint, iChildren); - - auto Area_Children = solver[iMesh-1][KIND_SOLVER]->GetInletAtVertex(Inlet_Fine.data(), Point_Fine, KIND_MARKER, - Marker_Tag, geometry[iMesh-1], config); + const auto Area_Children = + solver[iMesh-1][KIND_SOLVER]->GetInletAtVertex(iMarker, iVertex, geometry[iMesh-1], Inlet_Fine.data()); for (auto iVar = 0u; iVar < nColumns; iVar++) - Inlet_Values[iVar] += Inlet_Fine[iVar]*Area_Children/Area_Parent; + Inlet_Values[iVar] += Inlet_Fine[iVar] * Area_Children / Area_Parent; } /*--- Set the boundary area-averaged inlet values for the coarse point. ---*/ diff --git a/SU2_CFD/src/solvers/CSpeciesSolver.cpp b/SU2_CFD/src/solvers/CSpeciesSolver.cpp index 3c7ac895708..832c9014511 100644 --- a/SU2_CFD/src/solvers/CSpeciesSolver.cpp +++ b/SU2_CFD/src/solvers/CSpeciesSolver.cpp @@ -415,59 +415,16 @@ void CSpeciesSolver::SetInletAtVertex(const su2double *val_inlet, } -su2double CSpeciesSolver::GetInletAtVertex(su2double *val_inlet, - unsigned long val_inlet_point, - unsigned short val_kind_marker, - string val_marker, - const CGeometry *geometry, - const CConfig *config) const { - /*--- Local variables ---*/ - - unsigned short iMarker; - unsigned long iPoint, iVertex; - su2double Area = 0.0; - su2double Normal[3] = {0.0,0.0,0.0}; - - /*--- Alias positions within inlet file for readability ---*/ - - if (val_kind_marker == INLET_FLOW) { - - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - if ((config->GetMarker_All_KindBC(iMarker) == INLET_FLOW) && - (config->GetMarker_All_TagBound(iMarker) == val_marker)) { - - for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++) { - - iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); - - if (iPoint == val_inlet_point) { - - /*-- Compute boundary face area for this vertex. ---*/ - - geometry->vertex[iMarker][iVertex]->GetNormal(Normal); - Area = GeometryToolbox::Norm(nDim, Normal); - - /*--- Access and store the inlet variables for this vertex. ---*/ - for (unsigned short iVar = 0; iVar < nVar; iVar++) - val_inlet[Inlet_Position + iVar] = Inlet_SpeciesVars[iMarker][iVertex][iVar]; - - /*--- Exit once we find the point. ---*/ - - return Area; - - } - } - } - } - - } - - /*--- If we don't find a match, then the child point is not on the - current inlet boundary marker. Return zero area so this point does - not contribute to the restriction operator and continue. ---*/ +su2double CSpeciesSolver::GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, + const CGeometry* geometry, su2double* val_inlet) const { + for (unsigned short iVar = 0; iVar < nVar; iVar++) + val_inlet[Inlet_Position + iVar] = Inlet_SpeciesVars[iMarker][iVertex][iVar]; - return Area; + /*--- Compute boundary face area for this vertex. ---*/ + su2double Normal[MAXNDIM] = {0.0}; + geometry->vertex[iMarker][iVertex]->GetNormal(Normal); + return GeometryToolbox::Norm(nDim, Normal); } void CSpeciesSolver::SetUniformInlet(const CConfig* config, unsigned short iMarker) { diff --git a/SU2_CFD/src/solvers/CTransLMSolver.cpp b/SU2_CFD/src/solvers/CTransLMSolver.cpp index 1fdf2a47de1..902a67925c4 100644 --- a/SU2_CFD/src/solvers/CTransLMSolver.cpp +++ b/SU2_CFD/src/solvers/CTransLMSolver.cpp @@ -185,10 +185,10 @@ void CTransLMSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai /*--- Compute LM model gradients. ---*/ if (config->GetKind_Gradient_Method() == GREEN_GAUSS) { - SetSolution_Gradient_GG(geometry, config); + SetSolution_Gradient_GG(geometry, config, -1); } if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) { - SetSolution_Gradient_LS(geometry, config); + SetSolution_Gradient_LS(geometry, config, -1); } AD::StartNoSharedReading(); diff --git a/SU2_CFD/src/solvers/CTurbSASolver.cpp b/SU2_CFD/src/solvers/CTurbSASolver.cpp index f53596e9901..40e19bd024c 100644 --- a/SU2_CFD/src/solvers/CTurbSASolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSASolver.cpp @@ -308,6 +308,8 @@ void CTurbSASolver::Viscous_Residual(const unsigned long iEdge, const CGeometry* void CTurbSASolver::Source_Residual(CGeometry *geometry, CSolver **solver_container, CNumerics **numerics_container, CConfig *config, unsigned short iMesh) { + bool axisymmetric = config->GetAxisymmetric(); + const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); const bool harmonic_balance = (config->GetTime_Marching() == TIME_MARCHING::HARMONIC_BALANCE); const bool transition_BC = config->GetSAParsedOptions().bc; @@ -383,6 +385,11 @@ void CTurbSASolver::Source_Residual(CGeometry *geometry, CSolver **solver_contai numerics->SetIntermittency(solver_container[TRANS_SOL]->GetNodes()->GetSolution(iPoint, 0)); } + if (axisymmetric) { + /*--- Set y coordinate ---*/ + numerics->SetCoord(geometry->nodes->GetCoord(iPoint), geometry->nodes->GetCoord(iPoint)); + } + /*--- Compute the source term ---*/ auto residual = numerics->ComputeResidual(config); @@ -1521,61 +1528,16 @@ void CTurbSASolver::SetInletAtVertex(const su2double *val_inlet, } -su2double CTurbSASolver::GetInletAtVertex(su2double *val_inlet, - unsigned long val_inlet_point, - unsigned short val_kind_marker, - string val_marker, - const CGeometry *geometry, - const CConfig *config) const { - /*--- Local variables ---*/ - - unsigned short iMarker; - unsigned long iPoint, iVertex; - su2double Area = 0.0; - su2double Normal[3] = {0.0,0.0,0.0}; - - /*--- Alias positions within inlet file for readability ---*/ - - if (val_kind_marker == INLET_FLOW) { - - unsigned short position = nDim+2+nDim; - - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - if ((config->GetMarker_All_KindBC(iMarker) == INLET_FLOW) && - (config->GetMarker_All_TagBound(iMarker) == val_marker)) { - - for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++){ - - iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); - - if (iPoint == val_inlet_point) { - - /*-- Compute boundary face area for this vertex. ---*/ - - geometry->vertex[iMarker][iVertex]->GetNormal(Normal); - Area = GeometryToolbox::Norm(nDim, Normal); - - /*--- Access and store the inlet variables for this vertex. ---*/ - - val_inlet[position] = Inlet_TurbVars[iMarker][iVertex][0]; - - /*--- Exit once we find the point. ---*/ - - return Area; - - } - } - } - } - - } - - /*--- If we don't find a match, then the child point is not on the - current inlet boundary marker. Return zero area so this point does - not contribute to the restriction operator and continue. ---*/ +su2double CTurbSASolver::GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, + const CGeometry* geometry, su2double* val_inlet) const { + const auto position = nDim + 2 + nDim; + val_inlet[position] = Inlet_TurbVars[iMarker][iVertex][0]; - return Area; + /*--- Compute boundary face area for this vertex. ---*/ + su2double Normal[MAXNDIM] = {0.0}; + geometry->vertex[iMarker][iVertex]->GetNormal(Normal); + return GeometryToolbox::Norm(nDim, Normal); } void CTurbSASolver::SetUniformInlet(const CConfig* config, unsigned short iMarker) { diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index 555f8e77155..63c29102175 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -97,7 +97,6 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh constants[5] = 0.0828; //beta_2 constants[6] = 0.09; //betaStar constants[7] = 0.31; //a1 - if (sstParsedOptions.version == SST_OPTIONS::V1994){ constants[8] = constants[4]/constants[6] - constants[2]*0.41*0.41/sqrt(constants[6]); //alfa_1 constants[9] = constants[5]/constants[6] - constants[3]*0.41*0.41/sqrt(constants[6]); //alfa_2 @@ -108,12 +107,6 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh constants[9] = 0.44; //gamma_2 constants[10] = 10.0; // production limiter constant } - /*--- Initialize lower and upper limits---*/ - lowerlimit[0] = 1.0e-10; - upperlimit[0] = 1.0e10; - - lowerlimit[1] = 1.0e-4; - upperlimit[1] = 1.0e15; /*--- Far-field flow state quantities and initialization. ---*/ su2double rhoInf, *VelInf, muLamInf, Intensity, viscRatio, muT_Inf; @@ -132,6 +125,22 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh Solution_Inf[0] = kine_Inf; Solution_Inf[1] = omega_Inf; + /*--- Constants to use for lower limit of turbulence variable. ---*/ + su2double Ck = config->GetKFactor_LowerLimit(); + su2double Cw = config->GetOmegaFactor_LowerLimit(); + + /*--- Initialize lower and upper limits. ---*/ + if (sstParsedOptions.dll) { + lowerlimit[0] = Ck * kine_Inf; + lowerlimit[1] = Cw * omega_Inf; + } else { + lowerlimit[0] = 1.0e-10; + lowerlimit[1] = 1.0e-4; + } + + upperlimit[0] = 1.0e10; + upperlimit[1] = 1.0e15; + /*--- Eddy viscosity, initialized without stress limiter at the infinity ---*/ muT_Inf = rhoInf*kine_Inf/omega_Inf; @@ -200,10 +209,10 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai /*--- Compute turbulence gradients. ---*/ if (config->GetKind_Gradient_Method() == GREEN_GAUSS) { - SetSolution_Gradient_GG(geometry, config); + SetSolution_Gradient_GG(geometry, config, -1); } if (config->GetKind_Gradient_Method() == WEIGHTED_LEAST_SQUARES) { - SetSolution_Gradient_LS(geometry, config); + SetSolution_Gradient_LS(geometry, config, -1); } AD::StartNoSharedReading(); @@ -992,63 +1001,18 @@ void CTurbSSTSolver::SetInletAtVertex(const su2double *val_inlet, } -su2double CTurbSSTSolver::GetInletAtVertex(su2double *val_inlet, - unsigned long val_inlet_point, - unsigned short val_kind_marker, - string val_marker, - const CGeometry *geometry, - const CConfig *config) const { - /*--- Local variables ---*/ - - unsigned short iMarker; - unsigned long iPoint, iVertex; - su2double Area = 0.0; - su2double Normal[3] = {0.0,0.0,0.0}; - - /*--- Alias positions within inlet file for readability ---*/ - - if (val_kind_marker == INLET_FLOW) { - - unsigned short tke_position = nDim+2+nDim; - unsigned short omega_position = nDim+2+nDim+1; - - for (iMarker = 0; iMarker < config->GetnMarker_All(); iMarker++) { - if ((config->GetMarker_All_KindBC(iMarker) == INLET_FLOW) && - (config->GetMarker_All_TagBound(iMarker) == val_marker)) { - - for (iVertex = 0; iVertex < nVertex[iMarker]; iVertex++){ - - iPoint = geometry->vertex[iMarker][iVertex]->GetNode(); - - if (iPoint == val_inlet_point) { - - /*-- Compute boundary face area for this vertex. ---*/ - - geometry->vertex[iMarker][iVertex]->GetNormal(Normal); - Area = GeometryToolbox::Norm(nDim, Normal); - - /*--- Access and store the inlet variables for this vertex. ---*/ - - val_inlet[tke_position] = Inlet_TurbVars[iMarker][iVertex][0]; - val_inlet[omega_position] = Inlet_TurbVars[iMarker][iVertex][1]; - - /*--- Exit once we find the point. ---*/ - - return Area; - - } - } - } - } - - } - - /*--- If we don't find a match, then the child point is not on the - current inlet boundary marker. Return zero area so this point does - not contribute to the restriction operator and continue. ---*/ +su2double CTurbSSTSolver::GetInletAtVertex(unsigned short iMarker, unsigned long iVertex, + const CGeometry* geometry, su2double* val_inlet) const { + const auto tke_position = nDim + 2 + nDim; + const auto omega_position = tke_position + 1; + val_inlet[tke_position] = Inlet_TurbVars[iMarker][iVertex][0]; + val_inlet[omega_position] = Inlet_TurbVars[iMarker][iVertex][1]; - return Area; + /*--- Compute boundary face area for this vertex. ---*/ + su2double Normal[MAXNDIM] = {0.0}; + geometry->vertex[iMarker][iVertex]->GetNormal(Normal); + return GeometryToolbox::Norm(nDim, Normal); } void CTurbSSTSolver::SetUniformInlet(const CConfig* config, unsigned short iMarker) { diff --git a/TestCases/TestCase.py b/TestCases/TestCase.py index 0818c6074a0..1170ae71e05 100644 --- a/TestCases/TestCase.py +++ b/TestCases/TestCase.py @@ -361,7 +361,7 @@ def run_filediff(self, with_tsan=False, with_asan=False): # Assert that both files have the same number of lines if len(fromlines) != len(tolines): - diff = ["ERROR: Number of lines in " + fromfile + " and " + tofile + " differ."] + diff = ["ERROR: Number of lines in " + fromfile + " and " + tofile + " differ: " + len(fromlines) + " vs " + len(tolines) + "."] passed = False # Loop through all lines diff --git a/TestCases/cont_adj_euler/naca0012/of_grad_cd.dat.ref b/TestCases/cont_adj_euler/naca0012/of_grad_cd.dat.ref index 2f88439a0b9..c9cda259729 100644 --- a/TestCases/cont_adj_euler/naca0012/of_grad_cd.dat.ref +++ b/TestCases/cont_adj_euler/naca0012/of_grad_cd.dat.ref @@ -1,39 +1,39 @@ VARIABLES="VARIABLE" , "GRADIENT" , "FINDIFF_STEP" - 0 , 0.00534068 , 0.0001 - 1 , 0.024277 , 0.0001 - 2 , 0.0299625 , 0.0001 - 3 , 0.0234274 , 0.0001 - 4 , 0.00339532 , 0.0001 - 5 , -0.0308111 , 0.0001 - 6 , -0.0775489 , 0.0001 - 7 , -0.132033 , 0.0001 - 8 , -0.186824 , 0.0001 - 9 , -0.233924 , 0.0001 - 10 , -0.268068 , 0.0001 - 11 , -0.289743 , 0.0001 - 12 , -0.305716 , 0.0001 - 13 , -0.325863 , 0.0001 - 14 , -0.358209 , 0.0001 - 15 , -0.407234 , 0.0001 - 16 , -0.47926 , 0.0001 - 17 , -0.595838 , 0.0001 - 18 , -0.850012 , 0.0001 - 19 , 0.565996 , 0.0001 - 20 , 1.14457 , 0.0001 - 21 , 1.50247 , 0.0001 - 22 , 1.62875 , 0.0001 - 23 , 1.54948 , 0.0001 - 24 , 1.31563 , 0.0001 - 25 , 0.989959 , 0.0001 - 26 , 0.634653 , 0.0001 - 27 , 0.301875 , 0.0001 - 28 , 0.0291654 , 0.0001 - 29 , -0.160196 , 0.0001 - 30 , -0.253741 , 0.0001 - 31 , -0.247195 , 0.0001 - 32 , -0.147396 , 0.0001 - 33 , 0.0181901 , 0.0001 - 34 , 0.197238 , 0.0001 - 35 , 0.341451 , 0.0001 - 36 , 0.467151 , 0.0001 - 37 , 0.682825 , 0.0001 + 0 , -0.346339 , 0.0001 + 1 , -0.248052 , 0.0001 + 2 , -0.1713 , 0.0001 + 3 , -0.122543 , 0.0001 + 4 , -0.101101 , 0.0001 + 5 , -0.104377 , 0.0001 + 6 , -0.127816 , 0.0001 + 7 , -0.164567 , 0.0001 + 8 , -0.206037 , 0.0001 + 9 , -0.24378 , 0.0001 + 10 , -0.272396 , 0.0001 + 11 , -0.292059 , 0.0001 + 12 , -0.308757 , 0.0001 + 13 , -0.331226 , 0.0001 + 14 , -0.366529 , 0.0001 + 15 , -0.418919 , 0.0001 + 16 , -0.495353 , 0.0001 + 17 , -0.619083 , 0.0001 + 18 , -0.889061 , 0.0001 + 19 , 0.118474 , 0.0001 + 20 , 0.849882 , 0.0001 + 21 , 1.3251 , 0.0001 + 22 , 1.53508 , 0.0001 + 23 , 1.51368 , 0.0001 + 24 , 1.31908 , 0.0001 + 25 , 1.02001 , 0.0001 + 26 , 0.68317 , 0.0001 + 27 , 0.363758 , 0.0001 + 28 , 0.100704 , 0.0001 + 29 , -0.0830333 , 0.0001 + 30 , -0.176826 , 0.0001 + 31 , -0.178825 , 0.0001 + 32 , -0.096525 , 0.0001 + 33 , 0.0472928 , 0.0001 + 34 , 0.21134 , 0.0001 + 35 , 0.355622 , 0.0001 + 36 , 0.490104 , 0.0001 + 37 , 0.718618 , 0.0001 diff --git a/TestCases/cont_adj_euler/naca0012/of_grad_cd_disc.dat.ref b/TestCases/cont_adj_euler/naca0012/of_grad_cd_disc.dat.ref index 272a21372a2..6da6f45e3ee 100644 --- a/TestCases/cont_adj_euler/naca0012/of_grad_cd_disc.dat.ref +++ b/TestCases/cont_adj_euler/naca0012/of_grad_cd_disc.dat.ref @@ -1,39 +1,39 @@ VARIABLES="VARIABLE" , "GRADIENT" , "FINDIFF_STEP" - 0 , -2656.96 , 0.001 - 1 , -12995.9 , 0.001 - 2 , -21781.3 , 0.001 - 3 , -27675.3 , 0.001 - 4 , -30437.9 , 0.001 - 5 , -30443.9 , 0.001 - 6 , -28343.1 , 0.001 - 7 , -24794.2 , 0.001 - 8 , -20329.4 , 0.001 - 9 , -15376.6 , 0.001 - 10 , -10418.0 , 0.001 - 11 , -6201.67 , 0.001 - 12 , -3878.08 , 0.001 - 13 , -4910.93 , 0.001 - 14 , -10573.5 , 0.001 - 15 , -20610.7 , 0.001 - 16 , -30110.4 , 0.001 - 17 , -26294.5 , 0.001 - 18 , -62393.8 , 0.001 - 19 , -2797.26 , 0.001 - 20 , -832.067 , 0.001 - 21 , -668.081 , 0.001 - 22 , -1773.25 , 0.001 - 23 , -5718.86 , 0.001 - 24 , -13717.8 , 0.001 - 25 , -25699.0 , 0.001 - 26 , -40061.9 , 0.001 - 27 , -53729.8 , 0.001 - 28 , -62415.6 , 0.001 - 29 , -61293.4 , 0.001 - 30 , -46505.9 , 0.001 - 31 , -17841.7 , 0.001 - 32 , 18183.8 , 0.001 - 33 , 48447.5 , 0.001 - 34 , 62322.0 , 0.001 - 35 , 64139.5 , 0.001 - 36 , 54568.2 , 0.001 - 37 , 64856.8 , 0.001 + 0 , -2656.0 , 0.001 + 1 , -7290.69 , 0.001 + 2 , -11252.7 , 0.001 + 3 , -12531.4 , 0.001 + 4 , -10923.7 , 0.001 + 5 , -6826.86 , 0.001 + 6 , -843.71 , 0.001 + 7 , 6462.74 , 0.001 + 8 , 14656.3 , 0.001 + 9 , 23308.0 , 0.001 + 10 , 31688.2 , 0.001 + 11 , 38407.2 , 0.001 + 12 , 41274.9 , 0.001 + 13 , 37812.2 , 0.001 + 14 , 27093.1 , 0.001 + 15 , 14049.9 , 0.001 + 16 , 17583.8 , 0.001 + 17 , 78620.8 , 0.001 + 18 , 140614.0 , 0.001 + 19 , -18263.2 , 0.001 + 20 , -20877.9 , 0.001 + 21 , -22859.6 , 0.001 + 22 , -24751.5 , 0.001 + 23 , -28392.5 , 0.001 + 24 , -35514.1 , 0.001 + 25 , -46855.4 , 0.001 + 26 , -61697.7 , 0.001 + 27 , -77631.1 , 0.001 + 28 , -90537.8 , 0.001 + 29 , -95036.8 , 0.001 + 30 , -85899.0 , 0.001 + 31 , -60885.3 , 0.001 + 32 , -24333.4 , 0.001 + 33 , 12334.3 , 0.001 + 34 , 39948.1 , 0.001 + 35 , 65452.2 , 0.001 + 36 , 82215.8 , 0.001 + 37 , -44066.2 , 0.001 diff --git a/TestCases/cont_adj_euler/naca0012/of_grad_directdiff.dat.ref b/TestCases/cont_adj_euler/naca0012/of_grad_directdiff.dat.ref index 4992e46a279..1b4c963eeac 100644 --- a/TestCases/cont_adj_euler/naca0012/of_grad_directdiff.dat.ref +++ b/TestCases/cont_adj_euler/naca0012/of_grad_directdiff.dat.ref @@ -1,4 +1,4 @@ VARIABLES="VARIABLE" , "DRAG" , "EFFICIENCY" , "FORCE_X" , "FORCE_Y" , "FORCE_Z" , "LIFT" , "MOMENT_X" , "MOMENT_Y" , "MOMENT_Z" , "SIDEFORCE" - 0 , 0.2253591473 , -105.6097088 , 0.2588459007 , -1.5322178 , 0.0 , -1.537499867 , 0.0 , 0.0 , 1.202899757 , 0.0 - 1 , 0.3835809166 , -173.3502205 , 0.4363886002 , -2.415957492 , 0.0 , -2.424902327 , 0.0 , 0.0 , 1.053347497 , 0.0 - 2 , 0.5151776249 , -228.9760041 , 0.5835870252 , -3.129538494 , 0.0 , -3.141524632 , 0.0 , 0.0 , 0.6540715539 , 0.0 + 0 , 0.2405003164 , -108.3397202 , 0.2752804375 , -1.591326829 , 0.0 , -1.596953347 , 0.0 , 0.0 , 1.18511582 , 0.0 + 1 , 0.4163088272 , -176.5661566 , 0.4692829784 , -2.423229574 , 0.0 , -2.432890265 , 0.0 , 0.0 , 1.020271816 , 0.0 + 2 , 0.5558397416 , -231.7769399 , 0.6239540061 , -3.115569035 , 0.0 , -3.128439099 , 0.0 , 0.0 , 0.6093229584 , 0.0 diff --git a/TestCases/cont_adj_euler/wedge/of_grad_combo.dat.ref b/TestCases/cont_adj_euler/wedge/of_grad_combo.dat.ref index 0d54e740402..51bda5370df 100644 --- a/TestCases/cont_adj_euler/wedge/of_grad_combo.dat.ref +++ b/TestCases/cont_adj_euler/wedge/of_grad_combo.dat.ref @@ -1,5 +1,5 @@ VARIABLES="VARIABLE" , "GRADIENT" , "FINDIFF_STEP" - 0 , 0.00766235 , 0.0001 - 1 , 0.00499567 , 0.0001 - 2 , 0.00249665 , 0.0001 - 3 , 0.000904607 , 0.0001 + 0 , 0.00767644 , 0.0001 + 1 , 0.00498358 , 0.0001 + 2 , 0.00246134 , 0.0001 + 3 , 0.000893054 , 0.0001 diff --git a/TestCases/disc_adj_fsi/dyn_fsi/grad_dv.opt.ref b/TestCases/disc_adj_fsi/dyn_fsi/grad_dv.opt.ref index b2e428bed5a..d0a338410ba 100644 --- a/TestCases/disc_adj_fsi/dyn_fsi/grad_dv.opt.ref +++ b/TestCases/disc_adj_fsi/dyn_fsi/grad_dv.opt.ref @@ -1,9 +1,9 @@ INDEX GRAD -0 -3.461460667601000e-03 -1 -1.841786311588663e-03 -2 -7.915536257748967e-04 -3 -2.739622082729717e-04 -4 -2.734869133461104e-04 -5 -7.881162428890206e-04 -6 -1.828978290516677e-03 -7 -3.427219398258316e-03 +0 -5.239274142145693e-03 +1 -2.822866261832595e-03 +2 -1.251166631047082e-03 +3 -4.746312021502222e-04 +4 -4.726421390156573e-04 +5 -1.242307153964931e-03 +6 -2.797799332331688e-03 +7 -5.181304648315885e-03 diff --git a/TestCases/disc_adj_heat/disc_adj_heat.cfg b/TestCases/disc_adj_heat/disc_adj_heat.cfg index 85e7d30e98c..cb258ec6333 100644 --- a/TestCases/disc_adj_heat/disc_adj_heat.cfg +++ b/TestCases/disc_adj_heat/disc_adj_heat.cfg @@ -208,6 +208,6 @@ SURFACE_FILENAME= surface_flow SURFACE_ADJ_FILENAME= surface_adjoint -OUTPUT_WRT_FREQ= 1 +OUTPUT_WRT_FREQ= 100 SCREEN_OUTPUT= (INNER_ITER, RMS_ADJ_PRESSURE, RMS_ADJ_NU_TILDE, RMS_ADJ_HEAT, SENS_VEL_IN, SENS_PRESS_OUT) diff --git a/TestCases/euler/bluntbody/blunt.cfg b/TestCases/euler/bluntbody/blunt.cfg index f9ece1cbae4..a76c6be19ba 100644 --- a/TestCases/euler/bluntbody/blunt.cfg +++ b/TestCases/euler/bluntbody/blunt.cfg @@ -43,7 +43,7 @@ MARKER_MONITORING = ( wall ) % ------------- COMMON PARAMETERS TO DEFINE THE NUMERICAL METHOD --------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 3.0 +CFL_NUMBER= 6.0 CFL_ADAPT= NO CFL_ADAPT_PARAM= ( 1.1, 0.9, 5.0, 50.0 ) ITER= 2500 diff --git a/TestCases/euler/channel/inv_channel_RK.cfg b/TestCases/euler/channel/inv_channel_RK.cfg index ee2b3513e14..8e20a09f14c 100644 --- a/TestCases/euler/channel/inv_channel_RK.cfg +++ b/TestCases/euler/channel/inv_channel_RK.cfg @@ -44,7 +44,7 @@ MARKER_MONITORING= ( upper_wall, lower_wall ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 2.0 +CFL_NUMBER= 2.5 CFL_ADAPT= NO CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 ) RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) diff --git a/TestCases/euler/naca0012/inv_NACA0012_Roe.cfg b/TestCases/euler/naca0012/inv_NACA0012_Roe.cfg index 6215d0870ae..087bca16ebc 100644 --- a/TestCases/euler/naca0012/inv_NACA0012_Roe.cfg +++ b/TestCases/euler/naca0012/inv_NACA0012_Roe.cfg @@ -41,11 +41,11 @@ MARKER_MONITORING= ( airfoil ) % ------------- COMMON PARAMETERS TO DEFINE THE NUMERICAL METHOD --------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 4.0 +CFL_NUMBER= 20.0 CFL_ADAPT= NO CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 ) RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) -ITER= 110 +ITER= 1000 LINEAR_SOLVER= BCGSTAB LINEAR_SOLVER_ERROR= 1E-6 LINEAR_SOLVER_ITER= 5 @@ -57,8 +57,8 @@ MGCYCLE= W_CYCLE MG_PRE_SMOOTH= ( 1, 2, 2, 2 ) MG_POST_SMOOTH= ( 1, 1, 1, 1 ) MG_CORRECTION_SMOOTH= ( 1, 1, 1, 1 ) -MG_DAMP_RESTRICTION= 1.0 -MG_DAMP_PROLONGATION= 1.0 +MG_DAMP_RESTRICTION= 0.80 +MG_DAMP_PROLONGATION= 0.80 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % diff --git a/TestCases/euler/wedge/inv_wedge_HLLC.cfg b/TestCases/euler/wedge/inv_wedge_HLLC.cfg index 30120e792dd..77c20175c22 100644 --- a/TestCases/euler/wedge/inv_wedge_HLLC.cfg +++ b/TestCases/euler/wedge/inv_wedge_HLLC.cfg @@ -42,7 +42,7 @@ MARKER_MONITORING= ( upper, lower ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 1.0 +CFL_NUMBER= 4.0 CFL_ADAPT= NO CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 ) RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) diff --git a/TestCases/fixed_cl/naca0012/inv_NACA0012.cfg b/TestCases/fixed_cl/naca0012/inv_NACA0012.cfg index 5842e3848dc..a66afe95074 100644 --- a/TestCases/fixed_cl/naca0012/inv_NACA0012.cfg +++ b/TestCases/fixed_cl/naca0012/inv_NACA0012.cfg @@ -55,7 +55,7 @@ MARKER_DESIGNING = ( airfoil ) % NUM_METHOD_GRAD= GREEN_GAUSS OBJECTIVE_FUNCTION= DRAG -CFL_NUMBER= 5.0 +CFL_NUMBER=1000 ITER= 1000 % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% @@ -115,15 +115,15 @@ CONV_CAUCHY_EPS= 1E-6 MESH_FILENAME= mesh_NACA0012_inv.su2 MESH_FORMAT= SU2 MESH_OUT_FILENAME= mesh_out.su2 -SOLUTION_FILENAME= solution_flow.dat -SOLUTION_ADJ_FILENAME= solution_adj.dat +SOLUTION_FILENAME= solution_flow +SOLUTION_ADJ_FILENAME= solution_adj TABULAR_FORMAT= CSV CONV_FILENAME= history -RESTART_FILENAME= restart_flow.dat -RESTART_ADJ_FILENAME= restart_adj.dat +RESTART_FILENAME= restart_flow +RESTART_ADJ_FILENAME= restart_adj VOLUME_FILENAME= flow VOLUME_ADJ_FILENAME= adjoint -GRAD_OBJFUNC_FILENAME= of_grad.dat +GRAD_OBJFUNC_FILENAME= of_grad SURFACE_FILENAME= surface_flow SURFACE_ADJ_FILENAME= surface_adjoint OUTPUT_WRT_FREQ= 250 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 1b927581780..f2b6bd919aa 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 @@ -37,15 +37,16 @@ KIND_SCALAR_MODEL= FLAMELET DIFFUSIVITY_MODEL= FLAMELET VISCOSITY_MODEL= FLAMELET CONDUCTIVITY_MODEL= FLAMELET +FLAME_INIT_METHOD= FLAME_FRONT 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) -CONV_NUM_METHOD_SPECIES= SCALAR_UPWIND +CONV_NUM_METHOD_SPECIES= BOUNDED_SCALAR MUSCL_SPECIES= YES SLOPE_LIMITER_SPECIES= NONE TIME_DISCRE_SPECIES= EULER_IMPLICIT % SCALAR CLIPPING -SPECIES_CLIPPING= YES +SPECIES_CLIPPING= NO SPECIES_CLIPPING_MIN= 0 -2e6 0 0 SPECIES_CLIPPING_MAX= 1 2e6 1 1 % @@ -85,9 +86,9 @@ MARKER_ANALYZE_AVERAGE = AREA % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 350 +CFL_NUMBER= 50 CFL_ADAPT= NO -ITER= 100 +ITER= 10000 OUTPUT_WRT_FREQ= 100 % % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% @@ -126,8 +127,8 @@ MESH_FILENAME = mesh_structured.cgns MESH_OUT_FILENAME= mesh_out.su2 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/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 e0828cc4d44..adf9a65020f 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 @@ -19,7 +19,7 @@ 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) INNER_ITER= 1 @@ -55,6 +55,7 @@ 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= (0.004, 0.0, 0.0, 1.0, 0.0, 0.0, 0.2e-3, 1.0) % -------------------- SPECIES TRANSPORT ---------------------------------------% @@ -88,8 +89,8 @@ VISCOSITY_MODEL= FLAMELET % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% -%NUM_METHOD_GRAD= GREEN_GAUSS -NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES +NUM_METHOD_GRAD= GREEN_GAUSS +%NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES CFL_NUMBER= 25 CFL_ADAPT= NO 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 1ca70ab9d79..9a674d7a8e5 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 @@ -37,7 +37,7 @@ RESTART_ADJ_FILENAME= restart_adj TIME_DOMAIN= NO OUTER_ITER= 10 -OUTPUT_WRT_FREQ= 500 +OUTPUT_WRT_FREQ= 100 SCREEN_WRT_FREQ_INNER= 1 SCREEN_WRT_FREQ_OUTER= 1 diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index bd7635e1413..c893649c1dd 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -51,7 +51,7 @@ def main(): channel.cfg_dir = "euler/channel" channel.cfg_file = "inv_channel_RK.cfg" channel.test_iter = 20 - channel.test_vals = [-2.667328, 2.797437, 0.018714, 0.006906] + channel.test_vals = [-2.965605, 2.459083, 0.016007, 0.042277] test_list.append(channel) # NACA0012 @@ -59,7 +59,7 @@ def main(): naca0012.cfg_dir = "euler/naca0012" naca0012.cfg_file = "inv_NACA0012_Roe.cfg" naca0012.test_iter = 20 - naca0012.test_vals = [-4.023999, -3.515034, 0.339426, 0.022217] + naca0012.test_vals = [-4.444945, -3.941041, 0.318999, 0.022365] test_list.append(naca0012) # Supersonic wedge @@ -67,7 +67,7 @@ def main(): wedge.cfg_dir = "euler/wedge" wedge.cfg_file = "inv_wedge_HLLC.cfg" wedge.test_iter = 20 - wedge.test_vals = [-0.942862, 4.784581, -0.208106, 0.036665] + wedge.test_vals = [-1.368091, 4.302736, -0.243433, 0.042906] test_list.append(wedge) # ONERA M6 Wing @@ -75,7 +75,7 @@ def main(): oneram6.cfg_dir = "euler/oneram6" oneram6.cfg_file = "inv_ONERAM6.cfg" oneram6.test_iter = 10 - oneram6.test_vals = [0.281703, 0.011821] + oneram6.test_vals = [0.280800, 0.008623] test_list.append(oneram6) # Fixed CL NACA0012 @@ -83,7 +83,7 @@ def main(): fixedCL_naca0012.cfg_dir = "fixed_cl/naca0012" fixedCL_naca0012.cfg_file = "inv_NACA0012.cfg" fixedCL_naca0012.test_iter = 10 - fixedCL_naca0012.test_vals = [-7.374806, -1.872330, 0.300000, 0.019471] + fixedCL_naca0012.test_vals = [-3.905038, 1.628019, 0.301067, 0.019483] test_list.append(fixedCL_naca0012) # HYPERSONIC FLOW PAST BLUNT BODY @@ -91,7 +91,7 @@ def main(): bluntbody.cfg_dir = "euler/bluntbody" bluntbody.cfg_file = "blunt.cfg" bluntbody.test_iter = 20 - bluntbody.test_vals = [0.540010, 6.916656, 0.000027, 1.869004] + bluntbody.test_vals = [0.491773, 6.855541, 0.000298, 1.791791] test_list.append(bluntbody) ########################## @@ -103,7 +103,7 @@ def main(): flatplate.cfg_dir = "navierstokes/flatplate" flatplate.cfg_file = "lam_flatplate.cfg" flatplate.test_iter = 100 - flatplate.test_vals = [-9.154123, -3.663185, 0.001112, 0.036277, 2.361500, -2.325300, -2.278800, -2.278800] + flatplate.test_vals = [-7.700620, -2.229886, 0.001084, 0.036235, 2.361500, -2.325300, -1.823400, -1.823400] flatplate.test_vals_aarch64 = [-9.154130, -3.663197, 0.001112, 0.036277, 2.361500, -2.325300, -2.278800, -2.278800] test_list.append(flatplate) @@ -112,7 +112,7 @@ def main(): cylinder.cfg_dir = "navierstokes/cylinder" cylinder.cfg_file = "lam_cylinder.cfg" cylinder.test_iter = 25 - cylinder.test_vals = [-6.765429, -1.297425, 0.019571, 0.310233, 0.123270] + cylinder.test_vals = [-8.265865, -2.783635, -0.019914, 1.614879, -0.010191] cylinder.test_vals_aarch64 = [-6.765429, -1.297425, 0.019571, 0.310231, 0.123270] test_list.append(cylinder) @@ -121,8 +121,8 @@ def main(): cylinder_lowmach.cfg_dir = "navierstokes/cylinder" cylinder_lowmach.cfg_file = "cylinder_lowmach.cfg" cylinder_lowmach.test_iter = 25 - cylinder_lowmach.test_vals = [-6.850130, -1.388096, -0.056036, 108.140809, 0.007988] - cylinder_lowmach.test_vals_aarch64 = [-6.850130, -1.388096, -0.056036, 108.140813, 0.007988] + cylinder_lowmach.test_vals = [-6.830996, -1.368850, -0.143956, 73.963354, 0.002457] + cylinder_lowmach.test_vals_aarch64 = [-6.830996, -1.368850, -0.143956, 73.963354, 0.002457] test_list.append(cylinder_lowmach) # 2D Poiseuille flow (body force driven with periodic inlet / outlet) @@ -139,8 +139,8 @@ def main(): poiseuille_profile.cfg_dir = "navierstokes/poiseuille" poiseuille_profile.cfg_file = "profile_poiseuille.cfg" poiseuille_profile.test_iter = 10 - poiseuille_profile.test_vals = [-12.494728, -7.712546, -0.000000, 2.085796] - poiseuille_profile.test_vals_aarch64 = [-12.494717, -7.711274, -0.000000, 2.085796] + poiseuille_profile.test_vals = [-12.485957, -7.612048, -0.000000, 2.085796] + poiseuille_profile.test_vals_aarch64 = [-12.485957, -7.612048, -0.000000, 2.085796] test_list.append(poiseuille_profile) # 2D Rotational Periodic @@ -185,7 +185,7 @@ def main(): turb_flatplate.cfg_dir = "rans/flatplate" turb_flatplate.cfg_file = "turb_SA_flatplate.cfg" turb_flatplate.test_iter = 20 - turb_flatplate.test_vals = [-4.157358, -6.736289, -0.176258, 0.057431] + turb_flatplate.test_vals = [-4.156553, -6.736064, -0.176184, 0.057478] test_list.append(turb_flatplate) # ONERA M6 Wing @@ -193,7 +193,7 @@ def main(): turb_oneram6.cfg_dir = "rans/oneram6" turb_oneram6.cfg_file = "turb_ONERAM6.cfg" turb_oneram6.test_iter = 10 - turb_oneram6.test_vals = [-2.388836, -6.689426, 0.230320, 0.157640, -32539.000000] + turb_oneram6.test_vals = [-2.392863, -6.689822, 0.230745, 0.158812, -33786.000000] test_list.append(turb_oneram6) # NACA0012 (SA, FUN3D finest grid results: CL=1.0983, CD=0.01242) @@ -255,7 +255,7 @@ def main(): axi_rans_air_nozzle_restart.cfg_dir = "axisymmetric_rans/air_nozzle" axi_rans_air_nozzle_restart.cfg_file = "air_nozzle_restart.cfg" axi_rans_air_nozzle_restart.test_iter = 10 - axi_rans_air_nozzle_restart.test_vals = [-12.060634, -6.992273, -8.808757, -4.097753, -2019.800000] + axi_rans_air_nozzle_restart.test_vals = [-12.155957, -6.610384, -9.237797, -4.532605, -2019.700000] test_list.append(axi_rans_air_nozzle_restart) ################################# @@ -329,7 +329,7 @@ def main(): harmonic_balance.cfg_dir = "harmonic_balance" harmonic_balance.cfg_file = "HB.cfg" harmonic_balance.test_iter = 25 - harmonic_balance.test_vals = [-1.589740, 0.790168, 0.937052, 3.922578] + harmonic_balance.test_vals = [-1.554985, 0.831796, 0.935728, 3.960209] test_list.append(harmonic_balance) # Turbulent pitching NACA 64a010 airfoil @@ -349,7 +349,7 @@ def main(): inc_euler_naca0012.cfg_dir = "incomp_euler/naca0012" inc_euler_naca0012.cfg_file = "incomp_NACA0012.cfg" inc_euler_naca0012.test_iter = 20 - inc_euler_naca0012.test_vals = [-4.858287, -3.810487, 0.491850, 0.007002] + inc_euler_naca0012.test_vals = [-7.104363, -6.354829, 0.531976, 0.008467] test_list.append(inc_euler_naca0012) # C-D nozzle with pressure inlet and mass flow outlet @@ -357,8 +357,8 @@ def main(): inc_nozzle.cfg_dir = "incomp_euler/nozzle" inc_nozzle.cfg_file = "inv_nozzle.cfg" inc_nozzle.test_iter = 20 - inc_nozzle.test_vals = [-5.971249, -4.910844, -0.000196, 0.121635] - inc_nozzle.test_vals_aarch64 = [-5.971248, -4.910844, -0.000196, 0.121635] + inc_nozzle.test_vals = [-6.363748, -5.564772, -0.003840, 0.126592] + inc_nozzle.test_vals_aarch64 = [-5.624385, -4.988472, -0.000096, 0.137032] test_list.append(inc_nozzle) ############################# @@ -395,7 +395,7 @@ def main(): inc_lam_bend.cfg_dir = "incomp_navierstokes/bend" inc_lam_bend.cfg_file = "lam_bend.cfg" inc_lam_bend.test_iter = 10 - inc_lam_bend.test_vals = [-3.437996, -3.086189, -0.015600, 1.142212] + inc_lam_bend.test_vals = [-3.547250, -3.225803, -0.015148, 1.006543] inc_lam_bend.test_vals_aarch64 = [-3.437996, -3.086188, -0.015600, 1.142213] test_list.append(inc_lam_bend) @@ -424,7 +424,7 @@ def main(): inc_weakly_coupled.cfg_dir = "disc_adj_heat" inc_weakly_coupled.cfg_file = "primal.cfg" inc_weakly_coupled.test_iter = 10 - inc_weakly_coupled.test_vals = [-16.498562, -15.335587, -15.570565, -12.867787, -18.185331, -13.071436, 5.545800] + inc_weakly_coupled.test_vals = [-18.894811, -17.879327, -18.412938, -17.855948, -18.343462, -15.659612, 5.545700] test_list.append(inc_weakly_coupled) ###################################### @@ -467,7 +467,7 @@ def main(): sine_gust.cfg_dir = "gust" sine_gust.cfg_file = "inv_gust_NACA0012.cfg" sine_gust.test_iter = 5 - sine_gust.test_vals = [-1.977520, 3.481804, -0.012402, -0.007454] + sine_gust.test_vals = [-1.977514, 3.481817, -0.010400, -0.008115] sine_gust.unsteady = True test_list.append(sine_gust) @@ -476,7 +476,7 @@ def main(): cosine_gust.cfg_dir = "gust" cosine_gust.cfg_file = "cosine_gust_zdir.cfg" cosine_gust.test_iter = 79 - cosine_gust.test_vals = [-2.418813, 0.004650, -0.001878, -0.000637, -0.000271] + cosine_gust.test_vals = [-2.418805, 0.002013, -0.001504, 0.000445, -0.000558] cosine_gust.unsteady = True cosine_gust.enabled_with_tsan = False test_list.append(cosine_gust) @@ -486,7 +486,7 @@ def main(): gust_mesh_defo.cfg_dir = "gust" gust_mesh_defo.cfg_file = "gust_with_mesh_deformation.cfg" gust_mesh_defo.test_iter = 6 - gust_mesh_defo.test_vals = [-1.844778, 0.000846, -0.000408] + gust_mesh_defo.test_vals = [-1.844761, 0.001116, -0.000265] gust_mesh_defo.unsteady = True gust_mesh_defo.enabled_with_tsan = False test_list.append(gust_mesh_defo) @@ -496,8 +496,8 @@ def main(): aeroelastic.cfg_dir = "aeroelastic" aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg" aeroelastic.test_iter = 2 - aeroelastic.test_vals = [0.074432, 0.033108, -0.001650, -0.000127] - aeroelastic.test_vals_aarch64 = [0.074836, 0.033102, -0.001650, -0.000127] + aeroelastic.test_vals = [0.074058, 0.027628, -0.001641, -0.000128] + aeroelastic.test_vals_aarch64 = [0.074170, 0.027590, -0.001579, -0.000160] aeroelastic.unsteady = True aeroelastic.enabled_on_cpu_arch = ["x86_64"] # Requires AVX-capable architecture aeroelastic.enabled_with_tsan = False @@ -508,7 +508,7 @@ def main(): ddes_flatplate.cfg_dir = "ddes/flatplate" ddes_flatplate.cfg_file = "ddes_flatplate.cfg" ddes_flatplate.test_iter = 10 - ddes_flatplate.test_vals = [-2.714757, -5.882779, -0.215005, 0.023783, -618.130000] + ddes_flatplate.test_vals = [-2.714785, -5.882681, -0.215041, 0.023758, -617.440000] ddes_flatplate.unsteady = True test_list.append(ddes_flatplate) @@ -526,7 +526,7 @@ def main(): unst_deforming_naca0012.cfg_dir = "disc_adj_euler/naca0012_pitching_def" unst_deforming_naca0012.cfg_file = "inv_NACA0012_pitching_deform.cfg" unst_deforming_naca0012.test_iter = 5 - unst_deforming_naca0012.test_vals = [-3.665126, -3.793497, -3.716496, -3.148290] + unst_deforming_naca0012.test_vals = [-3.665202, -3.793253, -3.716498, -3.148334] unst_deforming_naca0012.unsteady = True unst_deforming_naca0012.enabled_with_tsan = False test_list.append(unst_deforming_naca0012) @@ -539,17 +539,17 @@ def main(): edge_VW = TestCase('edge_VW') edge_VW.cfg_dir = "nicf/edge" edge_VW.cfg_file = "edge_VW.cfg" - edge_VW.test_iter = 100 - edge_VW.test_vals = [-5.040246, 1.124521, -0.000009, 0.000000] + edge_VW.test_iter = 40 + edge_VW.test_vals = [-5.759815, 0.398128, -0.000009, 0.000000] test_list.append(edge_VW) # Rarefaction shock wave edge_PPR edge_PPR = TestCase('edge_PPR') edge_PPR.cfg_dir = "nicf/edge" edge_PPR.cfg_file = "edge_PPR.cfg" - edge_PPR.test_iter = 100 - edge_PPR.test_vals = [-5.401604, 0.738202, -0.000035, 0.000000] - edge_PPR.test_vals_aarch64 = [-5.401642, 0.738164, -0.000035, 0.000000] + edge_PPR.test_iter = 40 + edge_PPR.test_vals = [-6.922907, -0.757793, -0.000034, 0.000000] + edge_PPR.test_vals_aarch64 = [-8.573595, -2.391849, -0.000034, 0.000000] test_list.append(edge_PPR) ###################################### @@ -561,7 +561,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-6.614623, -3.001323, -14.336147, -8.776081, -11.382919, -5.852327, 73273, 73273, 0.019884, 82.491] + Jones_tc_restart.test_vals = [-6.614627, -3.001324, -14.336143, -8.776079, -11.382919, -5.852328, 73273.000000, 73273.000000, 0.019884, 82.491000] test_list.append(Jones_tc_restart) # 2D axial stage @@ -569,7 +569,7 @@ def main(): axial_stage2D.cfg_dir = "turbomachinery/axial_stage_2D" axial_stage2D.cfg_file = "Axial_stage2D.cfg" axial_stage2D.test_iter = 20 - axial_stage2D.test_vals = [0.983739, 1.534333, -2.888521, 2.606770, -2.418339, 3.087275, 106380, 106380, 5.7325, 64.711] + axial_stage2D.test_vals = [0.983739, 1.534333, -2.888521, 2.606770, -2.418339, 3.087275, 106380.000000, 106380.000000, 5.732600, 64.711000] axial_stage2D.test_vals_aarch64 = [0.983739, 1.534333, -2.888521, 2.606770, -2.418339, 3.087275, 106380, 106380, 5.7325, 64.711] test_list.append(axial_stage2D) @@ -578,7 +578,7 @@ def main(): transonic_stator_restart.cfg_dir = "turbomachinery/transonic_stator_2D" transonic_stator_restart.cfg_file = "transonic_stator_restart.cfg" transonic_stator_restart.test_iter = 20 - transonic_stator_restart.test_vals = [-5.007735, -3.099310, -2.751696, 1.091966, -3.542819, 2.163237, -471630, 94.866, -0.035738] + transonic_stator_restart.test_vals = [-5.007735, -3.099310, -2.751696, 1.091966, -3.542819, 2.163237, -471630.000000, 94.866000, -0.035738] transonic_stator_restart.test_vals_aarch64 = [-5.007735, -3.099310, -2.751696, 1.091966, -3.542819, 2.163237, -471630, 94.866, -0.035738] test_list.append(transonic_stator_restart) @@ -591,7 +591,7 @@ def main(): uniform_flow.cfg_dir = "sliding_interface/uniform_flow" uniform_flow.cfg_file = "uniform_NN.cfg" uniform_flow.test_iter = 5 - uniform_flow.test_vals = [5.000000, 0.000000, -0.188748, -10.631533] + uniform_flow.test_vals = [5.000000, 0.000000, -0.185381, -10.631535] uniform_flow.unsteady = True uniform_flow.multizone = True test_list.append(uniform_flow) @@ -601,7 +601,7 @@ def main(): channel_2D.cfg_dir = "sliding_interface/channel_2D" channel_2D.cfg_file = "channel_2D_WA.cfg" channel_2D.test_iter = 2 - channel_2D.test_vals = [2.000000, 0.000000, 0.397975, 0.352765, 0.405420] + channel_2D.test_vals = [2.000000, 0.000000, 0.419762, 0.352170, 0.404385] channel_2D.unsteady = True channel_2D.multizone = True test_list.append(channel_2D) @@ -611,8 +611,8 @@ def main(): channel_3D.cfg_dir = "sliding_interface/channel_3D" channel_3D.cfg_file = "channel_3D_WA.cfg" channel_3D.test_iter = 2 - channel_3D.test_vals = [2.000000, 0.000000, 0.620170, 0.505179, 0.415317] - channel_3D.test_vals_aarch64 = [2.000000, 0.000000, 0.620189, 0.505311, 0.415246] + channel_3D.test_vals = [2.000000, 0.000000, 0.623108, 0.505077, 0.412801] + channel_3D.test_vals_aarch64 = [2.000000, 0.000000, 0.620558, 0.504323, 0.412729] channel_3D.unsteady = True channel_3D.multizone = True channel_3D.enabled_with_tsan = False @@ -623,7 +623,7 @@ def main(): pipe.cfg_dir = "sliding_interface/pipe" pipe.cfg_file = "pipe_NN.cfg" pipe.test_iter = 2 - pipe.test_vals = [0.150024, 0.491949, 0.677759, 0.963991, 1.006947] + pipe.test_vals = [0.116650, 0.481386, 0.648698, 0.982997, 1.018359] pipe.unsteady = True pipe.multizone = True test_list.append(pipe) @@ -633,7 +633,7 @@ def main(): rotating_cylinders.cfg_dir = "sliding_interface/rotating_cylinders" rotating_cylinders.cfg_file = "rot_cylinders_WA.cfg" rotating_cylinders.test_iter = 3 - rotating_cylinders.test_vals = [3.000000, 0.000000, 0.777568, 1.134807, 1.224137] + rotating_cylinders.test_vals = [3.000000, 0.000000, 0.719776, 1.111045, 1.154066] rotating_cylinders.unsteady = True rotating_cylinders.multizone = True test_list.append(rotating_cylinders) @@ -643,7 +643,7 @@ def main(): supersonic_vortex_shedding.cfg_dir = "sliding_interface/supersonic_vortex_shedding" supersonic_vortex_shedding.cfg_file = "sup_vor_shed_WA.cfg" supersonic_vortex_shedding.test_iter = 5 - supersonic_vortex_shedding.test_vals = [5.000000, 0.000000, 1.214344, 1.663912] + supersonic_vortex_shedding.test_vals = [5.000000, 0.000000, 1.207949, 1.036083] supersonic_vortex_shedding.unsteady = True supersonic_vortex_shedding.multizone = True test_list.append(supersonic_vortex_shedding) @@ -694,7 +694,7 @@ def main(): fsi2d.cfg_dir = "fea_fsi/WallChannel_2d" fsi2d.cfg_file = "configFSI.cfg" fsi2d.test_iter = 4 - fsi2d.test_vals = [4.000000, 0.000000, -3.743227, -4.133479] + fsi2d.test_vals = [4.000000, 0.000000, -3.729243, -4.153954] fsi2d.multizone= True fsi2d.unsteady = True fsi2d.enabled_with_tsan = False @@ -705,7 +705,7 @@ def main(): stat_fsi.cfg_dir = "fea_fsi/stat_fsi" stat_fsi.cfg_file = "config.cfg" stat_fsi.test_iter = 7 - stat_fsi.test_vals = [-5.397954, -5.719688, 0.000000, 10.000000] + stat_fsi.test_vals = [-5.425896, -5.797242, 0.000000, 6.000000] stat_fsi.test_vals_aarch64 = [-5.423016, -5.753459, 0.000000, 10.000000] stat_fsi.multizone = True test_list.append(stat_fsi) @@ -715,8 +715,8 @@ def main(): dyn_fsi.cfg_dir = "fea_fsi/dyn_fsi" dyn_fsi.cfg_file = "config.cfg" dyn_fsi.test_iter = 4 - dyn_fsi.test_vals = [-4.355806, -4.060582, 0.000000, 103.000000] - dyn_fsi.test_vals_aarch64 = [-4.355806, -4.060582, 0.000000, 103.000000] + dyn_fsi.test_vals = [-4.330441, -4.057994, 0.000000, 103.000000] + dyn_fsi.test_vals_aarch64 = [-4.332167, -4.057742, 0.000000, 102.000000] dyn_fsi.multizone = True dyn_fsi.unsteady = True test_list.append(dyn_fsi) @@ -726,8 +726,8 @@ def main(): stat_fsi_restart.cfg_dir = "fea_fsi/stat_fsi" stat_fsi_restart.cfg_file = "config_restart.cfg" stat_fsi_restart.test_iter = 1 - stat_fsi_restart.test_vals = [-3.474078, -4.242240, 0.000000, 36.000000] - stat_fsi_restart.test_vals_aarch64 = [-3.474081, -4.242372, 0.000000, 37.000000] + stat_fsi_restart.test_vals = [-3.463348, -4.232710, 0.000000, 37.000000] + stat_fsi_restart.test_vals_aarch64 = [-3.442878, -4.228058, 0.000000, 37.000000] stat_fsi_restart.multizone = True test_list.append(stat_fsi_restart) diff --git a/TestCases/hybrid_regression_AD.py b/TestCases/hybrid_regression_AD.py index 5bf0befa263..0669ff42a30 100644 --- a/TestCases/hybrid_regression_AD.py +++ b/TestCases/hybrid_regression_AD.py @@ -50,7 +50,7 @@ def main(): discadj_naca0012.cfg_dir = "cont_adj_euler/naca0012" discadj_naca0012.cfg_file = "inv_NACA0012_discadj.cfg" discadj_naca0012.test_iter = 100 - discadj_naca0012.test_vals = [-3.561506, -8.926634, -0.000000, 0.005587] + discadj_naca0012.test_vals = [-3.560691, -8.925239, -0.000000, 0.005559] test_list.append(discadj_naca0012) # Inviscid Cylinder 3D (multiple markers) @@ -58,7 +58,7 @@ def main(): discadj_cylinder3D.cfg_dir = "disc_adj_euler/cylinder3D" discadj_cylinder3D.cfg_file = "inv_cylinder3D.cfg" discadj_cylinder3D.test_iter = 5 - discadj_cylinder3D.test_vals = [-3.730673, -3.832084, -0.000000, 0.000000] + discadj_cylinder3D.test_vals = [-3.764562, -3.719982, -0.000000, 0.000000] test_list.append(discadj_cylinder3D) # Arina nozzle 2D @@ -66,7 +66,7 @@ def main(): discadj_arina2k.cfg_dir = "disc_adj_euler/arina2k" discadj_arina2k.cfg_file = "Arina2KRS.cfg" discadj_arina2k.test_iter = 20 - discadj_arina2k.test_vals = [-3.087876, -3.481506, 0.068878, 0.000000] + discadj_arina2k.test_vals = [-3.534954, -3.773310, 0.027244, 0.000000] test_list.append(discadj_arina2k) #################################### @@ -98,7 +98,7 @@ def main(): discadj_incomp_NACA0012.cfg_dir = "disc_adj_incomp_euler/naca0012" discadj_incomp_NACA0012.cfg_file = "incomp_NACA0012_disc.cfg" discadj_incomp_NACA0012.test_iter = 20 - discadj_incomp_NACA0012.test_vals = [20.000000, -4.092007, -2.652751, 0.000000] + discadj_incomp_NACA0012.test_vals = [20.000000, -4.087948, -2.655204, 0.000000] test_list.append(discadj_incomp_NACA0012) ##################################### @@ -123,7 +123,7 @@ def main(): discadj_incomp_turb_NACA0012_sa.cfg_dir = "disc_adj_incomp_rans/naca0012" discadj_incomp_turb_NACA0012_sa.cfg_file = "turb_naca0012_sa.cfg" discadj_incomp_turb_NACA0012_sa.test_iter = 10 - discadj_incomp_turb_NACA0012_sa.test_vals = [10.000000, -3.845995, -1.031097, 0.000000] + discadj_incomp_turb_NACA0012_sa.test_vals = [10.000000, -3.845995, -1.031096, 0.000000] test_list.append(discadj_incomp_turb_NACA0012_sa) # Adjoint Incompressible Turbulent NACA 0012 SST @@ -143,7 +143,7 @@ def main(): discadj_cylinder.cfg_dir = "disc_adj_rans/cylinder" discadj_cylinder.cfg_file = "cylinder.cfg" discadj_cylinder.test_iter = 9 - discadj_cylinder.test_vals = [3.746907, -1.544882, -0.008321, 0.000014] + discadj_cylinder.test_vals = [3.746907, -1.544883, -0.008321, 0.000014] discadj_cylinder.unsteady = True discadj_cylinder.enabled_with_tsan = False test_list.append(discadj_cylinder) @@ -185,7 +185,7 @@ def main(): discadj_pitchingNACA0012.cfg_dir = "disc_adj_euler/naca0012_pitching" discadj_pitchingNACA0012.cfg_file = "inv_NACA0012_pitching.cfg" discadj_pitchingNACA0012.test_iter = 4 - discadj_pitchingNACA0012.test_vals = [-1.219713, -1.645717, -0.007513, 0.000013] + discadj_pitchingNACA0012.test_vals = [-1.221198, -1.647772, -0.007510, 0.000013] discadj_pitchingNACA0012.unsteady = True discadj_pitchingNACA0012.enabled_with_tsan = False test_list.append(discadj_pitchingNACA0012) @@ -199,7 +199,7 @@ def main(): discadj_trans_stator.cfg_dir = "disc_adj_turbomachinery/transonic_stator_2D" discadj_trans_stator.cfg_file = "transonic_stator.cfg" discadj_trans_stator.test_iter = 79 - discadj_trans_stator.test_vals = [79, 0.770065, 0.383137, 0.472153, -0.996484, 2.153296, -4.444301] + discadj_trans_stator.test_vals = [79.000000, 0.770094, 0.383191, 0.472139, -0.996477, 2.153270, -4.444323] discadj_trans_stator.test_vals_aarch64 = [79, 0.769987, 0.383135, 0.472391, -0.996504, 2.153296, -4.444301] discadj_trans_stator.enabled_with_tsan = False test_list.append(discadj_trans_stator) @@ -238,7 +238,7 @@ def main(): pywrapper_FEA_AD_FlowLoad.cfg_dir = "py_wrapper/disc_adj_fea/flow_load_sens" pywrapper_FEA_AD_FlowLoad.cfg_file = "configAD_fem.cfg" pywrapper_FEA_AD_FlowLoad.test_iter = 100 - pywrapper_FEA_AD_FlowLoad.test_vals = [-0.131415, -0.551701, -0.000364, -0.003101] #last 4 columns + pywrapper_FEA_AD_FlowLoad.test_vals = [-0.132037, -0.554472, -0.000364, -0.003101] pywrapper_FEA_AD_FlowLoad.test_vals_aarch64 = [-0.131745, -0.553214, -0.000364, -0.003101] pywrapper_FEA_AD_FlowLoad.command = TestCase.Command(exec = "python", param = "run_adjoint.py --parallel -f") pywrapper_FEA_AD_FlowLoad.timeout = 1600 @@ -253,8 +253,8 @@ def main(): pywrapper_CFD_AD_MeshDisp.cfg_dir = "py_wrapper/disc_adj_flow/mesh_disp_sens" pywrapper_CFD_AD_MeshDisp.cfg_file = "configAD_flow.cfg" pywrapper_CFD_AD_MeshDisp.test_iter = 1000 - pywrapper_CFD_AD_MeshDisp.test_vals = [30.000000, -2.521422, 1.372295, 0.000000] #last 4 columns - pywrapper_CFD_AD_MeshDisp.test_vals_aarch64 = [30.000000, -2.516536, 1.386443, 0.000000] + pywrapper_CFD_AD_MeshDisp.test_vals = [30.000000, -2.505480, 1.403813, 0.000000] + pywrapper_CFD_AD_MeshDisp.test_vals_aarch64 = [30.000000, -2.499079, 1.440068, 0.000000] pywrapper_CFD_AD_MeshDisp.command = TestCase.Command(exec = "python", param = "run_adjoint.py --parallel -f") pywrapper_CFD_AD_MeshDisp.timeout = 1600 pywrapper_CFD_AD_MeshDisp.tol = 1e-2 diff --git a/TestCases/incomp_euler/naca0012/incomp_NACA0012.cfg b/TestCases/incomp_euler/naca0012/incomp_NACA0012.cfg index 3b7da053aef..300dd64a5b5 100644 --- a/TestCases/incomp_euler/naca0012/incomp_NACA0012.cfg +++ b/TestCases/incomp_euler/naca0012/incomp_NACA0012.cfg @@ -43,7 +43,7 @@ MARKER_MONITORING= ( airfoil ) % ------------- COMMON PARAMETERS TO DEFINE THE NUMERICAL METHOD --------------% % NUM_METHOD_GRAD= GREEN_GAUSS -CFL_NUMBER= 3.0 +CFL_NUMBER= 200.0 CFL_ADAPT= NO CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 ) RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) @@ -51,13 +51,13 @@ ITER= 9999 % -------------------------- MULTIGRID PARAMETERS -----------------------------% % -MGLEVEL= 2 +MGLEVEL= 3 MGCYCLE= W_CYCLE MG_PRE_SMOOTH= ( 1, 2, 3, 3 ) MG_POST_SMOOTH= ( 1, 1, 1, 1 ) MG_CORRECTION_SMOOTH= ( 1, 1, 1, 1 ) -MG_DAMP_RESTRICTION= 0.85 -MG_DAMP_PROLONGATION= 0.85 +MG_DAMP_RESTRICTION= 0.9 +MG_DAMP_PROLONGATION= 0.9 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % diff --git a/TestCases/incomp_euler/nozzle/inv_nozzle.cfg b/TestCases/incomp_euler/nozzle/inv_nozzle.cfg index 0c793b2c903..9633d08fba5 100644 --- a/TestCases/incomp_euler/nozzle/inv_nozzle.cfg +++ b/TestCases/incomp_euler/nozzle/inv_nozzle.cfg @@ -46,7 +46,7 @@ MARKER_ANALYZE_AVERAGE = AREA % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= GREEN_GAUSS -CFL_NUMBER= 15.0 +CFL_NUMBER= 500 % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% % @@ -61,8 +61,8 @@ LINEAR_SOLVER_ITER= 5 MGLEVEL= 3 MGCYCLE= W_CYCLE MG_PRE_SMOOTH= ( 1, 2, 3, 3 ) -MG_POST_SMOOTH= ( 0, 0, 0, 0 ) -MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 ) +MG_POST_SMOOTH= ( 1, 1, 1, 0 ) +MG_CORRECTION_SMOOTH= ( 1, 1, 1, 0 ) MG_DAMP_RESTRICTION= 0.95 MG_DAMP_PROLONGATION= 0.95 diff --git a/TestCases/incomp_navierstokes/sphere/sphere.cfg b/TestCases/incomp_navierstokes/sphere/sphere.cfg new file mode 100644 index 00000000000..7f5ed6dd2fc --- /dev/null +++ b/TestCases/incomp_navierstokes/sphere/sphere.cfg @@ -0,0 +1,104 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% SU2 configuration file % +% Case description: laminar flow around a sphere % +% Author: Nijso Beishuizen % +% Institution: Technische Universiteit Eindhoven % +% Date: 2024.05.05 % +% File Version 8.0.1 "Harrier" % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% +% +SOLVER= INC_NAVIER_STOKES +KIND_TURB_MODEL= NONE +RESTART_SOL= YES +INC_NONDIM= DIMENSIONAL + +% ---------------- INCOMPRESSIBLE FLOW CONDITION DEFINITION -------------------% +% Re = rho*V*D/mu = 1*1*2.0/2.0 = 1.0 +INC_DENSITY_MODEL= CONSTANT +INC_ENERGY_EQUATION= NO +INC_DENSITY_INIT= 1.0 + +INC_VELOCITY_INIT= (1.0, 0.0, 0.0 ) +INC_VELOCITY_REF = 1 +INC_DENSITY_REF = 1.0 + +% --------------------------- VISCOSITY MODEL ---------------------------------% +% +VISCOSITY_MODEL= CONSTANT_VISCOSITY +MU_CONSTANT= 2.0 +% ---------------------- REFERENCE VALUE DEFINITION ---------------------------% +% +REF_ORIGIN_MOMENT_X = 0.25 +REF_ORIGIN_MOMENT_Y = 0.00 +REF_ORIGIN_MOMENT_Z = 0.00 +% sphere is 1/40 of a complete sphere +% area = pi*r^2 = 3.14159 +% 1/40 slice = 0.07854 +REF_AREA= 0.07854 + +% -------------------- BOUNDARY CONDITION DEFINITION --------------------------% +% +MARKER_HEATFLUX= ( wall, 0.0 ) +MARKER_SYM= ( symmetry_left, symmetry_right ) +MARKER_FAR= ( farfield ) +MARKER_PLOTTING= ( wall ) +MARKER_MONITORING= ( wall ) + +% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% +% +NUM_METHOD_GRAD= GREEN_GAUSS +CFL_NUMBER= 10.0 +CFL_ADAPT= NO +ITER=50000 +VENKAT_LIMITER_COEFF= 0.01 + +% ------------------------ LINEAR SOLVER DEFINITION ---------------------------% +% +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= ILU +LINEAR_SOLVER_ERROR= 1E-05 +LINEAR_SOLVER_ITER= 5 + +% -------------------------- MULTIGRID PARAMETERS -----------------------------% +% +MGLEVEL= 1 +MGCYCLE= V_CYCLE +MG_PRE_SMOOTH= ( 1, 2, 3, 3 ) +MG_POST_SMOOTH= ( 1, 1, 1, 1 ) +MG_CORRECTION_SMOOTH= ( 1, 1, 1, 1 ) +MG_DAMP_RESTRICTION= 0.6 +MG_DAMP_PROLONGATION= 0.6 + +% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% +% +CONV_NUM_METHOD_FLOW= FDS +MUSCL_FLOW= YES +SLOPE_LIMITER_FLOW= NONE +JST_SENSOR_COEFF= ( 0.5, 0.04 ) +TIME_DISCRE_FLOW= EULER_IMPLICIT + +% --------------------------- CONVERGENCE PARAMETERS --------------------------% +% +CONV_RESIDUAL_MINVAL= -10 +CONV_STARTITER= 10 +CONV_CAUCHY_ELEMS= 100 +CONV_CAUCHY_EPS= 1E-6 + +% ------------------------- INPUT/OUTPUT INFORMATION --------------------------% +% +MESH_FILENAME= slice_2syms.su2 +MESH_FORMAT= SU2 +SOLUTION_FILENAME= solution_flow.dat +TABULAR_FORMAT= CSV +CONV_FILENAME= history +RESTART_FILENAME= restart_flow.dat +VOLUME_FILENAME= flow +SURFACE_FILENAME= surface_flow +OUTPUT_WRT_FREQ= 100 +WRT_VOLUME_OVERWRITE= YES +SCREEN_OUTPUT= ( INNER_ITER, RMS_PRESSURE, RMS_VELOCITY-X, RMS_VELOCITY-Y, RMS_VELOCITY-Z, LIFT, DRAG) +VOLUME_OUTPUT= ( SOLUTION,PRIMITIVE,RESIDUAL,MULTIGRID, RANK ) 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 f959a481490..2634fca1ff5 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]", "MAXIMUM_HEATFLUX[1]", "TOTAL_HEATFLUX[1]", "FINDIFF_STEP" -0 , 0.0 , -199999.9862164259, -5.551100000002363e-08, 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , -0.02000000026702864, 5.550999999230055e-08, -0.6560000001543109 , 0.0 , 0.6520000012111282 , 1.1399999999550658 , 319.9999980552093 , -39.999997625272954 , 260.999999568412 , -39.999997625272954 , -0.4999999969612645 , -269.99999818144715, 0.0 , -560.0000008598727, 1e-08 +0 , 0.0 , -300000.0026077032, -3.3306691000000184e-08, 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , -0.01999999887924986, 0.0 , -0.9000000009140585 , 0.0 , 0.9379999998948563 , 1.649999997743734 , 419.99999780273356 , -69.99999868639861 , 358.9999998609983 , -69.99999868639861 , -0.6000000052353016 , -380.0000001774606, 0.0 , -430.00000005122274, 1e-08 diff --git a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configMaster.cfg b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configMaster.cfg index 8ff23f71359..d7c2698fc10 100644 --- a/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configMaster.cfg +++ b/TestCases/incomp_navierstokes/streamwise_periodic/chtPinArray_3d/configMaster.cfg @@ -22,7 +22,7 @@ OUTER_ITER = 31 % CONV_RESIDUAL_MINVAL= -26 SCREEN_OUTPUT= (OUTER_ITER, BGS_PRESSURE[0], BGS_TEMPERATURE[0], BGS_TEMPERATURE[1], STREAMWISE_MASSFLOW[0], STREAMWISE_DP[0], AVG_TEMPERATURE[1], TOTAL_HEATFLUX[0] ) -SCREEN_WRT_FREQ_OUTER= 100 +SCREEN_WRT_FREQ_OUTER= 10 % HISTORY_OUTPUT= ( ITER, RMS_RES[0], RMS_RES[1], STREAMWISE_PERIODIC[0], FLOW_COEFF[0], HEAT[1] ) % diff --git a/TestCases/multiple_ffd/naca0012/of_grad_cd.dat.ref b/TestCases/multiple_ffd/naca0012/of_grad_cd.dat.ref index 81759ef4cd7..bce05aa9bf6 100644 --- a/TestCases/multiple_ffd/naca0012/of_grad_cd.dat.ref +++ b/TestCases/multiple_ffd/naca0012/of_grad_cd.dat.ref @@ -1,3 +1,3 @@ VARIABLES="VARIABLE" , "GRADIENT" , "FINDIFF_STEP" - 0 , 0.0767137 , 0.001 - 1 , -0.113024 , 0.001 + 0 , 0.0779208 , 0.001 + 1 , -0.115959 , 0.001 diff --git a/TestCases/multiple_ffd/naca0012/of_grad_directdiff.dat.ref b/TestCases/multiple_ffd/naca0012/of_grad_directdiff.dat.ref index da2e3f10472..74adba36fa1 100644 --- a/TestCases/multiple_ffd/naca0012/of_grad_directdiff.dat.ref +++ b/TestCases/multiple_ffd/naca0012/of_grad_directdiff.dat.ref @@ -1,3 +1,3 @@ VARIABLES="VARIABLE" , "DRAG" , "EFFICIENCY" , "FORCE_X" , "FORCE_Y" , "FORCE_Z" , "LIFT" , "MOMENT_X" , "MOMENT_Y" , "MOMENT_Z" , "SIDEFORCE" - 0 , 0.05685349197 , -0.4081397694 , 0.05417489043 , 0.1233787706 , 0.0 , 0.1221675908 , 0.0 , 0.0 , 0.009249264651 , 0.0 - 1 , -0.08020555475 , 8.976256797 , -0.08614647972 , 0.2713937953 , 0.0 , 0.2732084865 , 0.0 , 0.0 , 0.00847918122 , 0.0 + 0 , 0.06149476303 , -0.608748249 , 0.05888315926 , 0.1203589365 , 0.0 , 0.119045765 , 0.0 , 0.0 , 0.009719951712 , 0.0 + 1 , -0.08536237383 , 8.303168487 , -0.09097907726 , 0.2564786779 , 0.0 , 0.2584023411 , 0.0 , 0.0 , 0.004460595335 , 0.0 diff --git a/TestCases/navierstokes/cylinder/lam_cylinder.cfg b/TestCases/navierstokes/cylinder/lam_cylinder.cfg index 8c0efd53259..eb03eb6c121 100644 --- a/TestCases/navierstokes/cylinder/lam_cylinder.cfg +++ b/TestCases/navierstokes/cylinder/lam_cylinder.cfg @@ -42,7 +42,7 @@ MARKER_MONITORING= ( cylinder ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 4.0 +CFL_NUMBER= 500.0 CFL_ADAPT= NO CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 ) RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) diff --git a/TestCases/navierstokes/flatplate/lam_flatplate.cfg b/TestCases/navierstokes/flatplate/lam_flatplate.cfg index 34f572d5598..75541961acc 100644 --- a/TestCases/navierstokes/flatplate/lam_flatplate.cfg +++ b/TestCases/navierstokes/flatplate/lam_flatplate.cfg @@ -46,7 +46,7 @@ MARKER_ANALYZE= (inlet, outlet) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES -CFL_NUMBER= 10000 +CFL_NUMBER= 1000 CFL_ADAPT= NO % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% @@ -60,11 +60,11 @@ LINEAR_SOLVER_ITER= 3 % MGLEVEL= 3 MGCYCLE= V_CYCLE -MG_PRE_SMOOTH= ( 1, 1, 1, 2 ) -MG_POST_SMOOTH= ( 0, 1, 1, 0 ) +MG_PRE_SMOOTH= ( 1, 2, 3, 0 ) +MG_POST_SMOOTH= ( 1, 1, 1, 0 ) MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 ) -MG_DAMP_RESTRICTION= 0.75 -MG_DAMP_PROLONGATION= 0.75 +MG_DAMP_RESTRICTION= 0.8 +MG_DAMP_PROLONGATION= 0.8 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % @@ -78,7 +78,7 @@ TIME_DISCRE_FLOW= EULER_IMPLICIT CONV_FIELD= RMS_DENSITY CONV_RESIDUAL_MINVAL= -12 CONV_STARTITER= 10 -ITER= 500 +ITER= 5000 % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% % diff --git a/TestCases/nicf/edge/edge_PPR.cfg b/TestCases/nicf/edge/edge_PPR.cfg index 759187d1229..34fdba91303 100644 --- a/TestCases/nicf/edge/edge_PPR.cfg +++ b/TestCases/nicf/edge/edge_PPR.cfg @@ -10,7 +10,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% -% +% SOLVER= EULER MATH_PROBLEM= DIRECT RESTART_SOL= NO @@ -50,11 +50,11 @@ MARKER_MONITORING= ( WALL1 ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= GREEN_GAUSS -CFL_NUMBER= 10 -CFL_ADAPT= NO -CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 ) +CFL_NUMBER= 2.5 +CFL_ADAPT= YES +CFL_ADAPT_PARAM= ( 0.9, 1.1, 1.0, 200.0 ) RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) -ITER= 500 +ITER= 51 % ------------------------ LINEAR SOLVER DEFINITION ---------------------------% % @@ -65,8 +65,8 @@ LINEAR_SOLVER_ITER= 10 % -------------------------- MULTIGRID PARAMETERS -----------------------------% % -MGLEVEL= 2 -MGCYCLE= V_CYCLE +MGLEVEL= 3 +MGCYCLE= W_CYCLE MG_PRE_SMOOTH= ( 1, 2, 3, 3 ) MG_POST_SMOOTH= ( 0, 0, 0, 0 ) MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 ) @@ -83,6 +83,7 @@ JST_SENSOR_COEFF= ( 0.5, 0.02 ) TIME_DISCRE_FLOW= EULER_IMPLICIT % --------------------------- CONVERGENCE PARAMETERS --------------------------% +% CONV_RESIDUAL_MINVAL= -12 CONV_STARTITER= 10 CONV_CAUCHY_ELEMS= 100 diff --git a/TestCases/nicf/edge/edge_VW.cfg b/TestCases/nicf/edge/edge_VW.cfg index 2646c8efb40..add439803e6 100644 --- a/TestCases/nicf/edge/edge_VW.cfg +++ b/TestCases/nicf/edge/edge_VW.cfg @@ -51,9 +51,9 @@ MARKER_MONITORING= ( WALL1 ) % ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% % NUM_METHOD_GRAD= GREEN_GAUSS -CFL_NUMBER= 10 -CFL_ADAPT= NO -CFL_ADAPT_PARAM= ( 1.5, 0.5, 1.0, 100.0 ) +CFL_NUMBER= 2.0 +CFL_ADAPT= YES +CFL_ADAPT_PARAM= ( 0.9, 1.1, 1.0, 200.0 ) RK_ALPHA_COEFF= ( 0.66667, 0.66667, 1.000000 ) ITER= 500 @@ -66,13 +66,13 @@ LINEAR_SOLVER_ITER= 10 % -------------------------- MULTIGRID PARAMETERS -----------------------------% % -MGLEVEL= 2 -MGCYCLE= V_CYCLE +MGLEVEL= 3 +MGCYCLE= W_CYCLE MG_PRE_SMOOTH= ( 1, 2, 3, 3 ) -MG_POST_SMOOTH= ( 0, 0, 0, 0 ) +MG_POST_SMOOTH= ( 1, 1, 1, 1 ) MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 ) -MG_DAMP_RESTRICTION= 0.9 -MG_DAMP_PROLONGATION= 0.9 +MG_DAMP_RESTRICTION= 0.85 +MG_DAMP_PROLONGATION= 0.85 % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 05cca0d50fb..0137b08806c 100644 --- 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 = [-15.313265, -15.180884, -15.291808, -8.488238, -15.010141, -15.920950] + cfd_flamelet_ch4.test_vals = [-13.665072, -12.593885, -14.249600, -6.069756, -14.816937, -17.057821] 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.054149, -12.276393, -11.299388, -13.877670, -6.291548] + cfd_flamelet_ch4_axi.test_vals = [-10.935396, -11.476692, -11.302574, -12.734435, -6.110559] 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.072805, -11.301138, -4.658971, -13.158224, -11.087511] + cfd_flamelet_ch4_partial_premix.test_vals = [-9.641526, -11.303947, -3.675920, -13.158386, -11.087893] cfd_flamelet_ch4_partial_premix.new_output = True test_list.append(cfd_flamelet_ch4_partial_premix) @@ -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 = [-10.003106, -9.843748, -3.289857, -11.338273] + cfd_flamelet_h2.test_vals = [-9.999540, -9.843936, -3.290033, -11.338454] cfd_flamelet_h2.new_output = True test_list.append(cfd_flamelet_h2) @@ -112,8 +112,8 @@ def main(): invwedge_a.cfg_dir = "nonequilibrium/invwedge" invwedge_a.cfg_file = "invwedge_ausm.cfg" invwedge_a.test_iter = 10 - invwedge_a.test_vals = [-1.042842, -1.567605, -18.301264, -18.628631, -18.574668, 2.275192, 1.879772, 5.319421, 0.873699] - invwedge_a.test_vals_aarch64 = [-1.042842, -1.567605, -18.301374, -18.628734, -18.574780, 2.275192, 1.879772, 5.319421, 0.873699] + invwedge_a.test_vals = [-1.069675, -1.594438, -18.299923, -18.627316, -18.573325, 2.245721, 1.874105, 5.290285, 0.847729] + invwedge_a.test_vals_aarch64 = [-1.070904, -1.595667, -18.299980, -18.627372, -18.573382, 2.244654, 1.871030, 5.289134, 0.846502] test_list.append(invwedge_a) # Inviscid single wedge, ausm+-up2, implicit @@ -121,8 +121,8 @@ def main(): invwedge_ap2.cfg_dir = "nonequilibrium/invwedge" invwedge_ap2.cfg_file = "invwedge_ausmplusup2.cfg" invwedge_ap2.test_iter = 10 - invwedge_ap2.test_vals = [-0.952589, -1.477352, -16.736014, -17.064021, -17.009120, 2.387086, 1.287286, 5.403046, 0.956402] - invwedge_ap2.test_vals_aarch64 = [-0.952589, -1.477352, -16.736014, -17.064021, -17.009120, 2.387086, 1.287286, 5.403046, 0.956402] + invwedge_ap2.test_vals = [-0.982059, -1.506822, -16.735977, -17.063993, -17.009083, 2.354326, 1.482256, 5.373931, 0.927155] + invwedge_ap2.test_vals_aarch64 = [-0.982059, -1.506822, -16.735977, -17.063993, -17.009083, 2.354326, 1.482256, 5.373931, 0.927155] test_list.append(invwedge_ap2) # Inviscid single wedge, msw, implicit @@ -130,8 +130,8 @@ def main(): invwedge_msw.cfg_dir = "nonequilibrium/invwedge" invwedge_msw.cfg_file = "invwedge_msw.cfg" invwedge_msw.test_iter = 10 - invwedge_msw.test_vals = [-1.165957, -1.690720, -18.298756, -18.626164, -18.572159, 2.151638, 1.721236, 5.193813, 0.751584] - invwedge_msw.test_vals_aarch64 = [-1.165957, -1.690720, -18.301301, -18.628685, -18.574704, 2.151638, 1.721236, 5.193813, 0.751584] + invwedge_msw.test_vals = [-1.212335, -1.737098, -18.299220, -18.626618, -18.572623, 2.106171, 1.651949, 5.143958, 0.704444] + invwedge_msw.test_vals_aarch64 = [-1.224649, -1.749412, -18.299151, -18.626550, -18.572552, 2.094106, 1.635779, 5.131012, 0.692821] test_list.append(invwedge_msw) # Inviscid single wedge, roe, implicit @@ -139,8 +139,8 @@ def main(): invwedge_roe.cfg_dir = "nonequilibrium/invwedge" invwedge_roe.cfg_file = "invwedge_roe.cfg" invwedge_roe.test_iter = 10 - invwedge_roe.test_vals = [-1.038582, -1.563344, -18.300307, -18.627706, -18.573706, 2.278987, 1.861307, 5.323753, 0.874900] - invwedge_roe.test_vals_aarch64 = [-1.038582, -1.563344, -18.299879, -18.627263, -18.573276, 2.278987, 1.861307, 5.323753, 0.874900] + invwedge_roe.test_vals = [-1.062496, -1.587259, -17.208314, -17.538065, -17.481444, 2.255933, 1.853450, 5.293725, 0.890784] + invwedge_roe.test_vals_aarch64 = [-1.069128, -1.593891, -17.208222, -17.537969, -17.481352, 2.249020, 1.852904, 5.287143, 0.879852] test_list.append(invwedge_roe) # Inviscid single wedge, lax, implicit @@ -148,8 +148,8 @@ def main(): invwedge_lax.cfg_dir = "nonequilibrium/invwedge" invwedge_lax.cfg_file = "invwedge_lax.cfg" invwedge_lax.test_iter = 10 - invwedge_lax.test_vals = [-1.075662, -1.600425, -32.000000, -32.000000, -24.972431, 2.252952, 1.725158, 5.282140, 0.848823] - invwedge_lax.test_vals_aarch64 = [-1.075662, -1.600425, -32.000000, -32.000000, -24.972431, 2.252952, 1.725158, 5.282140, 0.848823] + invwedge_lax.test_vals = [-0.877280, -1.402043, -32.000000, -32.000000, -24.952631, 2.451869, 1.857084, 5.486158, 1.051580] + invwedge_lax.test_vals_aarch64 = [-0.877280, -1.402043, -32.000000, -32.000000, -24.952631, 2.451869, 1.857084, 5.486158, 1.051580] test_list.append(invwedge_lax) # Inviscid single wedge, implicit, AUSM+M scheme @@ -157,8 +157,8 @@ def main(): invwedge_ausm_m.cfg_dir = "nonequilibrium/invwedge" invwedge_ausm_m.cfg_file = "invwedge_am.cfg" invwedge_ausm_m.test_iter = 10 - invwedge_ausm_m.test_vals = [-1.055083, -1.579845, -16.739725, -17.063618, -17.012831, 2.265430, 1.797602, 5.302740, 0.856548] - invwedge_ausm_m.test_vals_aarch64 = [-1.055079, -1.579842, -16.739725, -17.063618, -17.012831, 2.265433, 1.797600, 5.302743, 0.856551] + invwedge_ausm_m.test_vals = [-1.173033, -1.697796, -16.739586, -17.063491, -17.012692, 2.124519, 1.963804, 5.182881, 0.747539] + invwedge_ausm_m.test_vals_aarch64 = [-1.171654, -1.696417, -16.739585, -17.063491, -17.012691, 2.125633, 1.966511, 5.184281, 0.749068] test_list.append(invwedge_ausm_m) # Inviscid single wedge, implicit, NEMO supersonic inlet @@ -166,8 +166,8 @@ def main(): invwedge_ss_inlet.cfg_dir = "nonequilibrium/invwedge" invwedge_ss_inlet.cfg_file = "invwedge_ss_inlet.cfg" invwedge_ss_inlet.test_iter = 10 - invwedge_ss_inlet.test_vals = [-1.042718, -1.567481, -18.250175, -18.579516, -18.523248, 2.275305, 1.880068, 5.319548, 0.873821] - invwedge_ss_inlet.test_vals_aarch64 = [-1.042718, -1.567481, -18.250175, -18.579516, -18.523248, 2.275305, 1.880068, 5.319548, 0.873821] + invwedge_ss_inlet.test_vals = [-1.068592, -1.593355, -18.250183, -18.579524, -18.523255, 2.246972, 1.874197, 5.291273, 0.848771] + invwedge_ss_inlet.test_vals_aarch64 = [-1.069892, -1.594654, -18.250175, -18.579516, -18.523248, 2.245827, 1.871123, 5.290054, 0.847476] test_list.append(invwedge_ss_inlet) # Viscous single cone - axisymmetric @@ -175,8 +175,8 @@ def main(): visc_cone.cfg_dir = "nonequilibrium/visc_wedge" visc_cone.cfg_file = "axi_visccone.cfg" visc_cone.test_iter = 10 - visc_cone.test_vals = [-5.222212, -5.746462, -20.559802, -20.510196, -20.439814, 1.255865, -3.208363, -0.016006, 0.093455, 32633.000000] - visc_cone.test_vals_aarch64 = [-5.222267, -5.746522, -20.559799, -20.510195, -20.440311, 1.255761, -3.208360, -0.016014, 0.093462, 32634.000000] + visc_cone.test_vals = [-5.222270, -5.746525, -20.560273, -20.510152, -20.409102, 1.255757, -3.208382, -0.016014, 0.093462, 32619.000000] + visc_cone.test_vals_aarch64 = [-5.222267, -5.746523, -20.560279, -20.510152, -20.409102, 1.255758, -3.208380, -0.016014, 0.093462, 32633.000000] test_list.append(visc_cone) # Viscous single wedge with Mutation++ @@ -192,7 +192,7 @@ def main(): super_cat.cfg_dir = "nonequilibrium/visc_wedge" super_cat.cfg_file = "super_cat.cfg" super_cat.test_iter = 10 - super_cat.test_vals = [-5.232590, -5.757884, -20.641547, -20.640244, -20.539243, 1.246889, -3.205235, -0.028406, 0.250857, 32459.000000] + super_cat.test_vals = [-5.232595, -5.757889, -20.641415, -20.640623, -20.541670, 1.246866, -3.205258, -0.028372, 0.250647, 32440.000000] test_list.append(super_cat) # Viscous single wedge - partially catalytic walls @@ -200,7 +200,7 @@ def main(): partial_cat.cfg_dir = "nonequilibrium/visc_wedge" partial_cat.cfg_file = "partial_cat.cfg" partial_cat.test_iter = 10 - partial_cat.test_vals = [-5.210300, -5.735063, -20.880374, -20.825890, -23.475263, 1.806281, -2.813924, -0.078469, 0.496017, 29021.000000] + partial_cat.test_vals = [-5.210302, -5.735065, -20.880448, -20.825971, -23.475263, 1.806201, -2.813952, -0.078400, 0.495606, 29020.000000] test_list.append(partial_cat) # Viscous cylinder, ionization, Gupta-Yos @@ -220,7 +220,7 @@ def main(): channel.cfg_dir = "euler/channel" channel.cfg_file = "inv_channel_RK.cfg" channel.test_iter = 20 - channel.test_vals = [-2.647975, 2.818090, 0.022280, 0.004644] + channel.test_vals = [-2.904385, 2.536048, 0.020906, 0.042348] test_list.append(channel) # NACA0012 @@ -228,7 +228,7 @@ def main(): naca0012.cfg_dir = "euler/naca0012" naca0012.cfg_file = "inv_NACA0012_Roe.cfg" naca0012.test_iter = 20 - naca0012.test_vals = [-4.014140, -3.537888, 0.333403, 0.021227] + naca0012.test_vals = [-4.322128, -3.813578, 0.321660, 0.022547] test_list.append(naca0012) # Supersonic wedge @@ -236,7 +236,7 @@ def main(): wedge.cfg_dir = "euler/wedge" wedge.cfg_file = "inv_wedge_HLLC.cfg" wedge.test_iter = 20 - wedge.test_vals = [-0.944740, 4.782451, -0.208522, 0.036742] + wedge.test_vals = [-1.377543, 4.293870, -0.243566, 0.042930] test_list.append(wedge) # ONERA M6 Wing @@ -244,7 +244,7 @@ def main(): oneram6.cfg_dir = "euler/oneram6" oneram6.cfg_file = "inv_ONERAM6.cfg" oneram6.test_iter = 10 - oneram6.test_vals = [-9.277150, -8.694005, 0.281703, 0.011821] + oneram6.test_vals = [-11.512364, -10.982009, 0.280800, 0.008623] oneram6.timeout = 3200 test_list.append(oneram6) @@ -253,7 +253,7 @@ def main(): fixedCL_naca0012.cfg_dir = "fixed_cl/naca0012" fixedCL_naca0012.cfg_file = "inv_NACA0012.cfg" fixedCL_naca0012.test_iter = 10 - fixedCL_naca0012.test_vals = [-7.379831, -1.886302, 0.300000, 0.019471] + fixedCL_naca0012.test_vals = [-3.856871, 1.676974, 0.301113, 0.019487] test_list.append(fixedCL_naca0012) # Polar sweep of the inviscid NACA0012 @@ -262,8 +262,8 @@ def main(): polar_naca0012.cfg_file = "inv_NACA0012.cfg" polar_naca0012.polar = True polar_naca0012.test_iter = 10 - polar_naca0012.test_vals = [-1.217981, 4.256386, 0.009084, 0.016823] - polar_naca0012.test_vals_aarch64 = [-1.718925, 3.711429, 0.009217, 0.007784] + polar_naca0012.test_vals = [-1.086730, 4.382703, 0.001762, 0.033013] + polar_naca0012.test_vals_aarch64 = [-1.083394, 4.386134, 0.001588, 0.033513] polar_naca0012.command = TestCase.Command(exec = "compute_polar.py", param = "-i 11") # flaky test on arm64 polar_naca0012.enabled_on_cpu_arch = ["x86_64"] @@ -274,7 +274,7 @@ def main(): bluntbody.cfg_dir = "euler/bluntbody" bluntbody.cfg_file = "blunt.cfg" bluntbody.test_iter = 20 - bluntbody.test_vals = [0.540009, 6.916653, 0.000000, 1.868976] + bluntbody.test_vals = [0.493672, 6.857839, -0.000002, 1.791404] test_list.append(bluntbody) # Equivalent area NACA64-206 @@ -282,7 +282,7 @@ def main(): ea_naca64206.cfg_dir = "optimization_euler/equivalentarea_naca64206" ea_naca64206.cfg_file = "NACA64206.cfg" ea_naca64206.test_iter = 10 - ea_naca64206.test_vals = [-1.076215, -0.391987, -0.000701, 67775.000000] + ea_naca64206.test_vals = [-1.188459, -0.522783, -0.003147, 67775.000000] test_list.append(ea_naca64206) # SUPERSONIC FLOW PAST A RAMP IN A CHANNEL @@ -290,7 +290,7 @@ def main(): ramp.cfg_dir = "euler/ramp" ramp.cfg_file = "inv_ramp.cfg" ramp.test_iter = 10 - ramp.test_vals = [-13.399623, -7.788893, -0.081064, 0.056474] + ramp.test_vals = [-13.648694, -8.010920, -0.076277, 0.054839] ramp.test_vals_aarch64 = [-13.398422, -7.786461, -0.081064, 0.056474] test_list.append(ramp) @@ -303,7 +303,7 @@ def main(): flatplate.cfg_dir = "navierstokes/flatplate" flatplate.cfg_file = "lam_flatplate.cfg" flatplate.test_iter = 100 - flatplate.test_vals = [-9.336395, -3.849426, 0.001112, 0.036276, 2.361500, -2.325300, -2.279700, -2.279700] + flatplate.test_vals = [-7.621750, -2.149876, 0.001084, 0.036232, 2.361500, -2.325300, -1.815200, -1.815200] test_list.append(flatplate) # Custom objective function @@ -311,7 +311,7 @@ def main(): flatplate_udobj.cfg_dir = "user_defined_functions" flatplate_udobj.cfg_file = "lam_flatplate.cfg" flatplate_udobj.test_iter = 20 - flatplate_udobj.test_vals = [-6.653802, -1.181430, -0.794887, 0.000611, -0.000369, 0.000736, -0.001104, 596.690000, 299.800000, 296.890000, 21.492000, 0.563990, 37.148000, 2.278700] + flatplate_udobj.test_vals = [-6.664134, -1.190073, -0.954366, 0.000641, -0.000633, 0.000548, -0.001181, 596.940000, 300.020000, 296.920000, 22.201000, 0.525750, 37.278000, 2.347900] test_list.append(flatplate_udobj) # Laminar cylinder (steady) @@ -319,7 +319,7 @@ def main(): cylinder.cfg_dir = "navierstokes/cylinder" cylinder.cfg_file = "lam_cylinder.cfg" cylinder.test_iter = 25 - cylinder.test_vals = [-6.754517, -1.286785, -0.213640, 0.706519, 0.158870] + cylinder.test_vals = [-8.421986, -2.931138, -0.003382, 1.607685, -0.009905] test_list.append(cylinder) # Laminar cylinder (low Mach correction) @@ -327,7 +327,7 @@ def main(): cylinder_lowmach.cfg_dir = "navierstokes/cylinder" cylinder_lowmach.cfg_file = "cylinder_lowmach.cfg" cylinder_lowmach.test_iter = 25 - cylinder_lowmach.test_vals = [-6.858484, -1.396528, -1.854558, 110.033249, 0.001951] + cylinder_lowmach.test_vals = [-6.841604, -1.379532, -1.266739, 76.118218, 0.000274] test_list.append(cylinder_lowmach) # 2D Poiseuille flow (body force driven with periodic inlet / outlet) @@ -344,8 +344,8 @@ def main(): poiseuille_profile.cfg_dir = "navierstokes/poiseuille" poiseuille_profile.cfg_file = "profile_poiseuille.cfg" poiseuille_profile.test_iter = 10 - poiseuille_profile.test_vals = [-12.492939, -7.672950, -0.000000, 2.085796] - poiseuille_profile.test_vals_aarch64 = [-12.492864, -7.671632, -0.000000, 2.085796] + poiseuille_profile.test_vals = [-12.483967, -7.577331, -0.000000, 2.085796] + poiseuille_profile.test_vals_aarch64 = [-12.483967, -7.577331, -0.000000, 2.085796] test_list.append(poiseuille_profile) ########################## @@ -381,7 +381,7 @@ def main(): turb_flatplate.cfg_dir = "rans/flatplate" turb_flatplate.cfg_file = "turb_SA_flatplate.cfg" turb_flatplate.test_iter = 20 - turb_flatplate.test_vals = [-4.147727, -6.728308, -0.176232, 0.057717] + turb_flatplate.test_vals = [-4.147387, -6.728398, -0.176234, 0.057709] test_list.append(turb_flatplate) # Flat plate (compressible) with species inlet @@ -389,15 +389,31 @@ def main(): turb_flatplate_species.cfg_dir = "rans/flatplate" turb_flatplate_species.cfg_file = "turb_SA_flatplate_species.cfg" turb_flatplate_species.test_iter = 20 - turb_flatplate_species.test_vals = [-4.147727, -0.634899, -1.770894, 1.334987, -3.250340, 9.000000, -6.700853, 5.000000, -6.991055, 10.000000, -6.033829, 0.996033, 0.996033] + turb_flatplate_species.test_vals = [-4.120225, -0.634021, -1.706720, 1.363240, -3.250204, 9.000000, -6.697079, 5.000000, -6.978731, 10.000000, -6.013196, 0.996237, 0.996237] test_list.append(turb_flatplate_species) + # Flat plate SST compressibility correction Wilcox + turb_flatplate_CC_Wilcox = TestCase('turb_flatplate_CC_Wilcox') + turb_flatplate_CC_Wilcox.cfg_dir = "rans/flatplate" + turb_flatplate_CC_Wilcox.cfg_file = "turb_SST_flatplate_compressibility_Wilcox.cfg" + turb_flatplate_CC_Wilcox.test_iter = 20 + turb_flatplate_CC_Wilcox.test_vals = [-1.280875, 1.974212, 1.440458, 5.038402, -4.051125, 8.521136] + test_list.append(turb_flatplate_CC_Wilcox) + + # Flat plate SST compressibility correction Sarkar + turb_flatplate_CC_Sarkar = TestCase('turb_flatplate_CC_Sarkar') + turb_flatplate_CC_Sarkar.cfg_dir = "rans/flatplate" + turb_flatplate_CC_Sarkar.cfg_file = "turb_SST_flatplate_compressibility_Sarkar.cfg" + turb_flatplate_CC_Sarkar.test_iter = 20 + turb_flatplate_CC_Sarkar.test_vals = [-1.280875, 1.974212, 1.440458, 5.038402, -4.051128, 8.521136] + test_list.append(turb_flatplate_CC_Sarkar) + # ONERA M6 Wing turb_oneram6 = TestCase('turb_oneram6') turb_oneram6.cfg_dir = "rans/oneram6" turb_oneram6.cfg_file = "turb_ONERAM6.cfg" turb_oneram6.test_iter = 10 - turb_oneram6.test_vals = [-2.388839, -6.689426, 0.230321, 0.157640, -32539.000000] + turb_oneram6.test_vals = [-2.392865, -6.689822, 0.230746, 0.158811, -33786.000000] turb_oneram6.timeout = 3200 test_list.append(turb_oneram6) @@ -406,7 +422,7 @@ def main(): turb_oneram6_vc.cfg_dir = "rans/oneram6" turb_oneram6_vc.cfg_file = "turb_ONERAM6_vc.cfg" turb_oneram6_vc.test_iter = 15 - turb_oneram6_vc.test_vals = [-2.262387, -6.626454, 0.228392, 0.140799, -27107.000000] + turb_oneram6_vc.test_vals = [-2.266212, -6.628059, 0.228692, 0.142105, -28396.000000] turb_oneram6_vc.timeout = 3200 test_list.append(turb_oneram6_vc) @@ -415,7 +431,7 @@ def main(): turb_oneram6_nk.cfg_dir = "rans/oneram6" turb_oneram6_nk.cfg_file = "turb_ONERAM6_nk.cfg" turb_oneram6_nk.test_iter = 20 - turb_oneram6_nk.test_vals = [-4.892252, -4.514006, -11.432306, 0.221025, 0.045570, 2.000000, -0.899460, 31.384000] + turb_oneram6_nk.test_vals = [-4.803402, -4.393783, -11.445194, 0.218505, 0.048793, 4.000000, -0.607076, 25.924000] turb_oneram6_nk.timeout = 600 turb_oneram6_nk.tol = 0.0001 test_list.append(turb_oneram6_nk) @@ -514,7 +530,7 @@ def main(): axi_rans_air_nozzle_restart.cfg_dir = "axisymmetric_rans/air_nozzle" axi_rans_air_nozzle_restart.cfg_file = "air_nozzle_restart.cfg" axi_rans_air_nozzle_restart.test_iter = 10 - axi_rans_air_nozzle_restart.test_vals = [-12.063597, -7.006585, -8.702557, -4.039824, -2019.8] + axi_rans_air_nozzle_restart.test_vals = [-12.150822, -6.604726, -9.187292, -4.518261, -2019.700000] axi_rans_air_nozzle_restart.tol = 0.0001 test_list.append(axi_rans_air_nozzle_restart) @@ -542,7 +558,7 @@ def main(): inc_euler_naca0012.cfg_dir = "incomp_euler/naca0012" inc_euler_naca0012.cfg_file = "incomp_NACA0012.cfg" inc_euler_naca0012.test_iter = 20 - inc_euler_naca0012.test_vals = [-4.801273, -3.773079, 0.495236, 0.007346] + inc_euler_naca0012.test_vals = [-7.141428, -6.403478, 0.531992, 0.008466] test_list.append(inc_euler_naca0012) # C-D nozzle with pressure inlet and mass flow outlet @@ -550,7 +566,7 @@ def main(): inc_nozzle.cfg_dir = "incomp_euler/nozzle" inc_nozzle.cfg_file = "inv_nozzle.cfg" inc_nozzle.test_iter = 20 - inc_nozzle.test_vals = [-5.982321, -4.953536, 0.000454, 0.121390] + inc_nozzle.test_vals = [-6.308730, -5.512525, -0.004405, 0.126629] test_list.append(inc_nozzle) ############################# @@ -565,6 +581,14 @@ def main(): inc_lam_cylinder.test_vals = [-4.004072, -3.194881, -0.076553, 7.780048] test_list.append(inc_lam_cylinder) + # Laminar sphere, Re=1. Last column: Cd=24/Re + inc_lam_sphere = TestCase('inc_lam_sphere') + inc_lam_sphere.cfg_dir = "incomp_navierstokes/sphere" + inc_lam_sphere.cfg_file = "sphere.cfg" + inc_lam_sphere.test_iter = 5 + inc_lam_sphere.test_vals = [-8.342926, -8.032107, 0.121003, 25.782687] + test_list.append(inc_lam_sphere) + # Buoyancy-driven cavity inc_buoyancy = TestCase('inc_buoyancy') inc_buoyancy.cfg_dir = "incomp_navierstokes/buoyancy_cavity" @@ -586,7 +610,7 @@ def main(): inc_lam_bend.cfg_dir = "incomp_navierstokes/bend" inc_lam_bend.cfg_file = "lam_bend.cfg" inc_lam_bend.test_iter = 10 - inc_lam_bend.test_vals = [-3.447746, -3.085237, -0.020816, 1.147373] + inc_lam_bend.test_vals = [-3.550744, -3.220213, -0.017606, 1.015086] test_list.append(inc_lam_bend) # 3D laminar channnel with 1 cell in flow direction, streamwise periodic @@ -602,7 +626,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.242651, -7.341179, -7.407346, -0.152603, -1667.300000] + inc_heatTransfer_BC.test_vals = [-8.201114, -7.405807, -7.555676, -0.113666, -1671.700000] test_list.append(inc_heatTransfer_BC) ############################ @@ -753,7 +777,7 @@ def main(): schubauer_klebanoff_transition.cfg_dir = "transition/Schubauer_Klebanoff" schubauer_klebanoff_transition.cfg_file = "transitional_BC_model_ConfigFile.cfg" schubauer_klebanoff_transition.test_iter = 10 - schubauer_klebanoff_transition.test_vals = [-7.994740, -13.240225, 0.000046, 0.007987] + schubauer_klebanoff_transition.test_vals = [-8.058933, -13.242001, 0.000048, 0.007993] test_list.append(schubauer_klebanoff_transition) ##################################### @@ -765,7 +789,7 @@ def main(): contadj_naca0012.cfg_dir = "cont_adj_euler/naca0012" contadj_naca0012.cfg_file = "inv_NACA0012.cfg" contadj_naca0012.test_iter = 5 - contadj_naca0012.test_vals = [-9.300816, -14.587365, 0.300920, 0.019552] + contadj_naca0012.test_vals = [-9.662585, -14.998832, -0.726250, 0.020280] test_list.append(contadj_naca0012) # Inviscid ONERA M6 @@ -773,7 +797,7 @@ def main(): contadj_oneram6.cfg_dir = "cont_adj_euler/oneram6" contadj_oneram6.cfg_file = "inv_ONERAM6.cfg" contadj_oneram6.test_iter = 10 - contadj_oneram6.test_vals = [-12.130993, -12.702085, 0.685900, 0.007594] + contadj_oneram6.test_vals = [-12.032190, -12.587083, -1.086100, 0.007556] test_list.append(contadj_oneram6) # Inviscid WEDGE: tests averaged outflow total pressure adjoint @@ -781,7 +805,7 @@ def main(): contadj_wedge.cfg_dir = "cont_adj_euler/wedge" contadj_wedge.cfg_file = "inv_wedge_ROE.cfg" contadj_wedge.test_iter = 10 - contadj_wedge.test_vals = [2.872691, -2.755572, 853010.000000, -0.000000] + contadj_wedge.test_vals = [2.872064, -2.756210, 1010800.000000, 0.000000] test_list.append(contadj_wedge) # Inviscid fixed CL NACA0012 @@ -789,7 +813,7 @@ def main(): contadj_fixed_CL_naca0012.cfg_dir = "fixed_cl/naca0012" contadj_fixed_CL_naca0012.cfg_file = "inv_NACA0012_ContAdj.cfg" contadj_fixed_CL_naca0012.test_iter = 100 - contadj_fixed_CL_naca0012.test_vals = [0.275856, -5.200511, 0.342710, 0.000105] + contadj_fixed_CL_naca0012.test_vals = [0.748438, -4.810920, -0.520110, -0.000292] test_list.append(contadj_fixed_CL_naca0012) ################################### @@ -905,7 +929,7 @@ def main(): harmonic_balance.cfg_dir = "harmonic_balance" harmonic_balance.cfg_file = "HB.cfg" harmonic_balance.test_iter = 25 - harmonic_balance.test_vals = [-1.589739, 0.790169, 0.937053, 3.922579] + harmonic_balance.test_vals = [-1.554985, 0.831796, 0.935729, 3.960210] test_list.append(harmonic_balance) # Turbulent pitching NACA 64a010 airfoil @@ -926,7 +950,7 @@ def main(): rot_naca0012.cfg_dir = "rotating/naca0012" rot_naca0012.cfg_file = "rot_NACA0012.cfg" rot_naca0012.test_iter = 25 - rot_naca0012.test_vals = [-2.698005, 2.845328, -0.079439, 0.002128] + rot_naca0012.test_vals = [-2.709459, 2.836670, -0.081188, 0.002156] test_list.append(rot_naca0012) # Lid-driven cavity @@ -963,7 +987,7 @@ def main(): sine_gust.cfg_dir = "gust" sine_gust.cfg_file = "inv_gust_NACA0012.cfg" sine_gust.test_iter = 5 - sine_gust.test_vals = [-1.977520, 3.481804, -0.012377, -0.007389] + sine_gust.test_vals = [-1.977514, 3.481817, -0.010609, -0.007956] sine_gust.unsteady = True test_list.append(sine_gust) @@ -972,7 +996,7 @@ def main(): aeroelastic.cfg_dir = "aeroelastic" aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg" aeroelastic.test_iter = 2 - aeroelastic.test_vals = [0.076550, 0.033042, -0.001650, -0.000127] + aeroelastic.test_vals = [0.075176, 0.027496, -0.001643, -0.000126] aeroelastic.unsteady = True test_list.append(aeroelastic) @@ -981,7 +1005,7 @@ def main(): ddes_flatplate.cfg_dir = "ddes/flatplate" ddes_flatplate.cfg_file = "ddes_flatplate.cfg" ddes_flatplate.test_iter = 10 - ddes_flatplate.test_vals = [-2.714757, -5.882779, -0.215005, 0.023783, -618.130000] + ddes_flatplate.test_vals = [-2.714785, -5.882679, -0.215041, 0.023758, -617.450000] ddes_flatplate.unsteady = True test_list.append(ddes_flatplate) @@ -999,7 +1023,7 @@ def main(): flatplate_unsteady.cfg_dir = "navierstokes/flatplate" flatplate_unsteady.cfg_file = "lam_flatplate_unst.cfg" flatplate_unsteady.test_iter = 3 - flatplate_unsteady.test_vals = [7.9509e-06, -8.868859, -8.231652, -6.283262, -5.466675, -3.391163, 0.002078, -0.343642] + flatplate_unsteady.test_vals = [0.000008, -8.876477, -8.249920, -6.294138, -5.468911, -3.398657, 0.002075, -0.324341] flatplate_unsteady.unsteady = True test_list.append(flatplate_unsteady) @@ -1011,16 +1035,16 @@ def main(): edge_VW = TestCase('edge_VW') edge_VW.cfg_dir = "nicf/edge" edge_VW.cfg_file = "edge_VW.cfg" - edge_VW.test_iter = 100 - edge_VW.test_vals = [-5.048044, 1.115667, -0.000009, 0.000000] + edge_VW.test_iter = 50 + edge_VW.test_vals = [-8.107432, -1.914195, -0.000009, 0.000000] test_list.append(edge_VW) # Rarefaction shock wave edge_PPR edge_PPR = TestCase('edge_PPR') edge_PPR.cfg_dir = "nicf/edge" edge_PPR.cfg_file = "edge_PPR.cfg" - edge_PPR.test_iter = 100 - edge_PPR.test_vals = [-5.400790, 0.739723, -0.000035, 0.000000] + edge_PPR.test_iter = 50 + edge_PPR.test_vals = [-8.611983, -2.441992, -0.000034, 0.000000] test_list.append(edge_PPR) # Rarefaction Q1D nozzle, include CoolProp fluid model @@ -1028,7 +1052,7 @@ def main(): coolprop_fluidModel.cfg_dir = "nicf/coolprop" coolprop_fluidModel.cfg_file = "fluidModel.cfg" coolprop_fluidModel.test_iter = 5 - coolprop_fluidModel.test_vals = [-4.525459, -1.578697, 3.443116, 0.000000, 0.000000] + coolprop_fluidModel.test_vals = [-4.424953, -1.582877, 3.442422, 0.000000, 0.000000] coolprop_fluidModel.enabled_on_cpu_arch = ["x86_64"] test_list.append(coolprop_fluidModel) @@ -1037,7 +1061,7 @@ def main(): coolprop_transportModel.cfg_dir = "nicf/coolprop" coolprop_transportModel.cfg_file = "transportModel.cfg" coolprop_transportModel.test_iter = 5 - coolprop_transportModel.test_vals = [-4.527922, -1.308648, 4.630717, 0.000000, 0.000000] + coolprop_transportModel.test_vals = [-4.428098, -1.314332, 4.630872, 0.000000, 0.000000] coolprop_transportModel.enabled_on_cpu_arch = ["x86_64"] test_list.append(coolprop_transportModel) @@ -1046,7 +1070,7 @@ def main(): datadriven_fluidModel.cfg_dir = "nicf/datadriven" datadriven_fluidModel.cfg_file = "datadriven_nozzle.cfg" datadriven_fluidModel.test_iter = 50 - datadriven_fluidModel.test_vals = [-2.623890, 0.145236, 4.688439, 0.000000, 0.000000] + datadriven_fluidModel.test_vals = [-2.632817, 0.155922, 4.690917, 0.000000, 0.000000] test_list.append(datadriven_fluidModel) ###################################### @@ -1097,7 +1121,7 @@ def main(): uniform_flow.cfg_dir = "sliding_interface/uniform_flow" uniform_flow.cfg_file = "uniform_NN.cfg" uniform_flow.test_iter = 5 - uniform_flow.test_vals = [5.000000, 0.000000, -0.188747, -10.631538] + uniform_flow.test_vals = [5.000000, 0.000000, -0.185381, -10.631539] uniform_flow.unsteady = True uniform_flow.multizone = True test_list.append(uniform_flow) @@ -1107,7 +1131,7 @@ def main(): channel_2D.cfg_dir = "sliding_interface/channel_2D" channel_2D.cfg_file = "channel_2D_WA.cfg" channel_2D.test_iter = 2 - channel_2D.test_vals = [2.000000, 0.000000, 0.398011, 0.352778, 0.405461] + channel_2D.test_vals = [2.000000, 0.000000, 0.419792, 0.352177, 0.404446] channel_2D.test_vals_aarch64 = [2.000000, 0.000000, 0.398036, 0.352783, 0.405462] channel_2D.timeout = 100 channel_2D.unsteady = True @@ -1119,7 +1143,7 @@ def main(): channel_3D.cfg_dir = "sliding_interface/channel_3D" channel_3D.cfg_file = "channel_3D_WA.cfg" channel_3D.test_iter = 2 - channel_3D.test_vals = [2.000000, 0.000000, 0.620176, 0.505161, 0.415248] + channel_3D.test_vals = [2.000000, 0.000000, 0.623113, 0.505078, 0.412774] channel_3D.test_vals_aarch64 = [2.000000, 0.000000, 0.620182, 0.505302, 0.415257] channel_3D.unsteady = True channel_3D.multizone = True @@ -1130,7 +1154,7 @@ def main(): pipe.cfg_dir = "sliding_interface/pipe" pipe.cfg_file = "pipe_NN.cfg" pipe.test_iter = 2 - pipe.test_vals = [0.150024, 0.491953, 0.677755, 0.963980, 1.006936] + pipe.test_vals = [0.116649, 0.481389, 0.648696, 0.982990, 1.018349] pipe.unsteady = True pipe.multizone = True test_list.append(pipe) @@ -1140,7 +1164,7 @@ def main(): rotating_cylinders.cfg_dir = "sliding_interface/rotating_cylinders" rotating_cylinders.cfg_file = "rot_cylinders_WA.cfg" rotating_cylinders.test_iter = 3 - rotating_cylinders.test_vals = [3.000000, 0.000000, 0.777572, 1.134804, 1.224137] + rotating_cylinders.test_vals = [3.000000, 0.000000, 0.719777, 1.111044, 1.154071] rotating_cylinders.unsteady = True rotating_cylinders.multizone = True test_list.append(rotating_cylinders) @@ -1150,7 +1174,7 @@ def main(): supersonic_vortex_shedding.cfg_dir = "sliding_interface/supersonic_vortex_shedding" supersonic_vortex_shedding.cfg_file = "sup_vor_shed_WA.cfg" supersonic_vortex_shedding.test_iter = 5 - supersonic_vortex_shedding.test_vals = [5.000000, 0.000000, 1.214350, 1.663914] + supersonic_vortex_shedding.test_vals = [5.000000, 0.000000, 1.207949, 1.036090] supersonic_vortex_shedding.unsteady = True supersonic_vortex_shedding.multizone = True test_list.append(supersonic_vortex_shedding) @@ -1214,7 +1238,7 @@ def main(): fsi2d.cfg_dir = "fea_fsi/WallChannel_2d" fsi2d.cfg_file = "configFSI.cfg" fsi2d.test_iter = 4 - fsi2d.test_vals = [4.000000, 0.000000, -3.743210, -4.133483] + fsi2d.test_vals = [4.000000, 0.000000, -3.729224, -4.153951] fsi2d.command = TestCase.Command(exec = "parallel_computation_fsi.py", param = "-f") fsi2d.multizone= True fsi2d.unsteady = True @@ -1225,7 +1249,7 @@ def main(): stat_fsi.cfg_dir = "fea_fsi/stat_fsi" stat_fsi.cfg_file = "config.cfg" stat_fsi.test_iter = 7 - stat_fsi.test_vals = [-3.296605, -4.934646, 0.000000, 7.000000] + stat_fsi.test_vals = [-3.311842, -4.950580, 0.000000, 8.000000] stat_fsi.multizone = True test_list.append(stat_fsi) @@ -1234,7 +1258,7 @@ def main(): dyn_fsi.cfg_dir = "fea_fsi/dyn_fsi" dyn_fsi.cfg_file = "config.cfg" dyn_fsi.test_iter = 4 - dyn_fsi.test_vals = [-4.355829, -4.060587, 5.3837e-08, 98] + dyn_fsi.test_vals = [-4.330462, -4.058005, 0.000000, 97.000000] dyn_fsi.multizone = True dyn_fsi.unsteady = True test_list.append(dyn_fsi) @@ -1244,7 +1268,7 @@ def main(): stat_fsi_restart.cfg_dir = "fea_fsi/stat_fsi" stat_fsi_restart.cfg_file = "config_restart.cfg" stat_fsi_restart.test_iter = 1 - stat_fsi_restart.test_vals = [-3.435926, -4.264912, 0.000000, 28.000000] + stat_fsi_restart.test_vals = [-3.445617, -4.243213, 0.000000, 28.000000] stat_fsi_restart.multizone = True test_list.append(stat_fsi_restart) @@ -1301,7 +1325,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.104306, -1.005859, -1.028870, -0.753282, 208.023676, 353.490000, -0.000000, -0.753280, 0.753280] + sp_pinArray_cht_2d_dp_hf.test_vals = [0.088580, -0.764276, -1.086940, -0.747450, 208.023676, 344.680000, -0.000000, -0.747450, 0.747450] sp_pinArray_cht_2d_dp_hf.multizone = True test_list.append(sp_pinArray_cht_2d_dp_hf) @@ -1310,8 +1334,8 @@ 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 = [-5.128577, -5.425081, -6.788413, -0.009675, 104.655438, 419.210000, 0.0] - sp_pinArray_3d_cht_mf_hf_tp.test_vals_aarch64 = [-5.128577, -5.425081, -6.788413, -0.009675, 104.655438, 419.210000, 0.0] + sp_pinArray_3d_cht_mf_hf_tp.test_vals = [-1.627413, -3.083567, -4.577909, -0.009725, 104.632413, 418.370000, 0.000000] + sp_pinArray_3d_cht_mf_hf_tp.test_vals_aarch64 = [-1.622914, -3.081114, -4.576282, -0.009725, 104.632412, 418.370000, 0.000000] sp_pinArray_3d_cht_mf_hf_tp.multizone = True test_list.append(sp_pinArray_3d_cht_mf_hf_tp) @@ -1325,7 +1349,7 @@ def main(): pywrapper_naca0012.cfg_dir = "euler/naca0012" pywrapper_naca0012.cfg_file = "inv_NACA0012_Roe.cfg" pywrapper_naca0012.test_iter = 100 - pywrapper_naca0012.test_vals = [-6.747210, -6.149915, 0.333445, 0.021241] + pywrapper_naca0012.test_vals = [-9.569885, -8.966579, 0.335418, 0.023332] pywrapper_naca0012.command = TestCase.Command("mpirun -np 2", "SU2_CFD.py", "--parallel -f") test_list.append(pywrapper_naca0012) @@ -1356,7 +1380,7 @@ def main(): pywrapper_aeroelastic.cfg_dir = "aeroelastic" pywrapper_aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg" pywrapper_aeroelastic.test_iter = 2 - pywrapper_aeroelastic.test_vals = [0.076550, 0.033042, -0.001650, -0.000127] + pywrapper_aeroelastic.test_vals = [0.075176, 0.027496, -0.001643, -0.000126] pywrapper_aeroelastic.command = TestCase.Command("mpirun -np 2", "SU2_CFD.py", "--parallel -f") pywrapper_aeroelastic.unsteady = True test_list.append(pywrapper_aeroelastic) @@ -1376,7 +1400,7 @@ def main(): pywrapper_fsi2d.cfg_dir = "fea_fsi/WallChannel_2d" pywrapper_fsi2d.cfg_file = "configFSI.cfg" pywrapper_fsi2d.test_iter = 4 - pywrapper_fsi2d.test_vals = [4.000000, 0.000000, -3.743210, -4.133483] + pywrapper_fsi2d.test_vals = [4.000000, 0.000000, -3.729224, -4.153951] pywrapper_fsi2d.command = TestCase.Command("mpirun -np 2", "SU2_CFD.py", "--nZone 2 --fsi True --parallel -f") pywrapper_fsi2d.unsteady = True pywrapper_fsi2d.multizone = True @@ -1387,7 +1411,7 @@ def main(): pywrapper_unsteadyFSI.cfg_dir = "py_wrapper/dyn_fsi" pywrapper_unsteadyFSI.cfg_file = "config.cfg" pywrapper_unsteadyFSI.test_iter = 4 - pywrapper_unsteadyFSI.test_vals = [0, 31, 5, 58, -1.756780, -2.828276, -7.652558, -6.863929, 1.5618e-04] + pywrapper_unsteadyFSI.test_vals = [0.000000, 49.000000, 5.000000, 44.000000, -0.589089, -2.800967, -2.603174, -6.722478, 0.000209] pywrapper_unsteadyFSI.command = TestCase.Command("mpirun -np 2", "python", "run.py") pywrapper_unsteadyFSI.unsteady = True pywrapper_unsteadyFSI.multizone = True @@ -1418,7 +1442,7 @@ def main(): pywrapper_deformingBump.cfg_dir = "py_wrapper/deforming_bump_in_channel" pywrapper_deformingBump.cfg_file = "config.cfg" pywrapper_deformingBump.test_iter = 1 - pywrapper_deformingBump.test_vals = [0.500000, 0.000000, -2.554360, -1.084594, -0.024882, 2.907803, 8.785498, -0.363585] + pywrapper_deformingBump.test_vals = [0.500000, 0.000000, -3.037857, -1.603573, -2.074205, 2.424288, 7.765352, -0.220502] pywrapper_deformingBump.command = TestCase.Command("mpirun -np 2", "python", "run.py") pywrapper_deformingBump.unsteady = True test_list.append(pywrapper_deformingBump) @@ -1490,7 +1514,7 @@ def main(): species2_primitiveVenturi_mixingmodel.cfg_dir = "species_transport/venturi_primitive_3species" species2_primitiveVenturi_mixingmodel.cfg_file = "species2_primitiveVenturi_mixingmodel.cfg" species2_primitiveVenturi_mixingmodel.test_iter = 50 - species2_primitiveVenturi_mixingmodel.test_vals = [-5.359429, -4.504612, -4.480004, -5.629196, -0.059934, -5.596051, 5.000000, -1.870943, 5.000000, -4.915279, 5.000000, -1.183531, 0.000429, 0.000393, 0.000036, 0.000000] + species2_primitiveVenturi_mixingmodel.test_vals = [ -5.407755, -4.557255, -4.635502, -5.642910, -0.059627, -5.546376, 5.000000, -1.879995, 5.000000, -4.898985, 5.000000, -1.169389, 0.000551, 0.000483, 0.000068, 0.000000] test_list.append(species2_primitiveVenturi_mixingmodel) # 2 species (1 eq) primitive venturi mixing using mixing model and bounded scalar transport @@ -1498,7 +1522,7 @@ def main(): species2_primitiveVenturi_mixingmodel_boundedscalar.cfg_dir = "species_transport/venturi_primitive_3species" species2_primitiveVenturi_mixingmodel_boundedscalar.cfg_file = "species2_primitiveVenturi_mixingmodel_boundedscalar.cfg" species2_primitiveVenturi_mixingmodel_boundedscalar.test_iter = 50 - species2_primitiveVenturi_mixingmodel_boundedscalar.test_vals = [-5.336209, -4.445047, -4.432074, -5.785385, -0.127631, -5.672217, 5.000000, -1.944369, 5.000000, -4.878272, 5.000000, -1.806657, 0.000272, 0.000272, 0.000000, 0.000000] + species2_primitiveVenturi_mixingmodel_boundedscalar.test_vals = [-5.392378, -4.492373, -4.576491, -5.759780, -0.137797, -5.677531, 5.000000, -1.895013, 5.000000, -4.806816, 5.000000, -1.697769, 0.000275, 0.000275, 0.000000, 0.000000] test_list.append(species2_primitiveVenturi_mixingmodel_boundedscalar) # 2 species (1 eq) primitive venturi mixing using mixing model including viscosity, thermal conductivity and inlet markers for SA turbulence model @@ -1506,7 +1530,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 = [-4.843481, -3.585988, -3.486593, -7.560545, -5.094245, 5.000000, -1.898097, 5.000000, -3.328995, 5.000000, -2.113241, 2.482221, 0.974142, 0.607219, 0.900860] + species2_primitiveVenturi_mixingmodel_viscosity.test_vals = [-4.857397, -3.646605, -3.737462, -7.602922, -5.008846, 5.000000, -1.756226, 5.000000, -3.163353, 5.000000, -2.189723, 2.476808, 0.976999, 0.609280, 0.890529] test_list.append(species2_primitiveVenturi_mixingmodel_viscosity) # 2 species (1 eq) primitive venturi mixing using mixing model including heat capacity and mass diffusivity @@ -1514,7 +1538,7 @@ def main(): species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg_dir = "species_transport/venturi_primitive_3species" species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg_file = "species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg" species2_primitiveVenturi_mixingmodel_heatcapacity_H2.test_iter = 50 - species2_primitiveVenturi_mixingmodel_heatcapacity_H2.test_vals = [-6.118333, -4.985699, -4.918326, -7.249080, 2.445213, -5.624080, 30.000000, -5.681895, 12.000000, -8.186475, 10.000000, -8.853067, 2.083524, 1.000000, 0.600000, 0.483524] + species2_primitiveVenturi_mixingmodel_heatcapacity_H2.test_vals = [-5.688779, -4.556193, -4.513326, -6.563666, 2.298459, -5.423525, 30.000000, -6.903871, 13.000000, -8.224587, 8.000000, -9.119625, 2.078869, 1.000000, 0.600000, 0.478869] test_list.append(species2_primitiveVenturi_mixingmodel_heatcapacity_H2) # 2 species (1 eq) primitive venturi mixing using mixing model including heat capacity and mass diffusivity NonDimensional case @@ -1522,7 +1546,7 @@ def main(): species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg_dir = "species_transport/venturi_primitive_3species" species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg_file = "species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg" species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.test_iter = 50 - species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.test_vals = [-5.724191, -5.290524, -5.223195, -8.252900, 2.140394, -5.229908, 30.000000, -5.681850, 12.000000, -8.186296, 10.000000, -8.852858, 2.083526, 1.000000, 0.600000, 0.483526] + species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.test_vals = [-5.287504, -4.852957, -4.798004, -7.501815, 1.991002, -5.023713, 10.000000, -2.696121, 3.000000, -5.182457, 5.000000, -5.561055, 2.078843, 1.000000, 0.600000, 0.478843] test_list.append(species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND) # 2 species (1 eq) primitive venturi mixing @@ -1530,7 +1554,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.641112, -4.724266, -4.677148, -5.470711, -1.121455, -5.713132, 5.000000, -0.830412, 5.000000, -2.668654, 5.000000, -0.454161, 0.000092, 0.000091, 0.000001, 0.000000] + species2_primitiveVenturi.test_vals = [-5.643794, -4.798953, -4.858719, -5.648947, -1.195985, -5.564607, 5.000000, -0.958960, 5.000000, -2.515334, 5.000000, -0.796944, 0.000210, 0.000206, 0.000004, 0.000000] test_list.append(species2_primitiveVenturi) # 2 species (1 eq) primitive venturi mixing with bounded scalar transport @@ -1538,7 +1562,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.278467, -4.368236, -4.350556, -5.693359, -0.978845, -5.618393, 5.000000, -1.804015, 5.000000, -4.057089, 5.000000, -2.003816, 0.000415, 0.000415, 0.000000, 0.000000] + species_primitiveVenturi_boundedscalar.test_vals = [-5.283533, -4.417193, -4.478360, -5.669526, -0.952767, -5.618596, 5.000000, -1.996975, 5.000000, -4.017868, 5.000000, -1.747496, 0.000423, 0.000423, 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 @@ -1546,7 +1570,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.026294, -1.649804, -1.404882, -0.746005, 1.609256, -3.767237, 23.000000, -5.082019, 10.000000, -5.056739, 4.000000, -6.480965, 2.000000, 1.000000, 0.000000, 1.000000] + species2_primitiveVenturi_mixingmodel_TURBULENT_MARKERS.test_vals = [-4.105910, -1.680056, -1.599493, -0.672401, 1.441091, -3.759601, 23.000000, -5.201473, 11.000000, -5.312651, 4.000000, -6.525448, 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. @@ -1555,7 +1579,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.711734, -4.794814, -4.747694, -5.541323, -1.192017, -5.951964, -6.096677, 5.000000, -0.830172, 5.000000, -2.668819, 5.000000, -0.516308] + species3_primitiveVenturi_inletFile.test_vals = [-5.714428, -4.869589, -4.929349, -5.719577, -1.266622, -5.824037, -5.944720, 5.000000, -0.958918, 5.000000, -2.515337, 5.000000, -0.523677] test_list.append(species3_primitiveVenturi_inletFile) # rectangle passive transport validation @@ -1563,7 +1587,7 @@ def main(): species_passive_val.cfg_dir = "species_transport/passive_transport_validation" species_passive_val.cfg_file = "passive_transport.cfg" species_passive_val.test_iter = 50 - species_passive_val.test_vals = [-16.559189, -16.315116, -16.908670, -4.257599, 10, -4.523292, 8, -5.19335, 0.18661, 0] + species_passive_val.test_vals = [-16.604279, -16.303255, -16.970059, -4.257599, 10.000000, -4.731945, 8.000000, -5.193350, 0.186610, 0.000000] species_passive_val.test_vals_aarch64 = [-16.538551, -16.312552, -16.882823, -4.257599, 10, -4.585464, 8, -5.19335, 0.18661, 0] test_list.append(species_passive_val) @@ -1572,7 +1596,7 @@ def main(): species3_multizone_restart.cfg_dir = "species_transport/multizone" species3_multizone_restart.cfg_file = "configMaster.cfg" species3_multizone_restart.test_iter = 5 - species3_multizone_restart.test_vals = [-6.175178, -5.763030] + species3_multizone_restart.test_vals = [-6.111017, -5.720050] species3_multizone_restart.multizone = True test_list.append(species3_multizone_restart) @@ -1616,14 +1640,14 @@ def main(): cfd_flamelet_ch4_cht = TestCase('cfd_flamelet_ch4_cht') 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 = 10 + cfd_flamelet_ch4_cht.test_iter = 5 cfd_flamelet_ch4_cht.command = TestCase.Command("mpirun -n 2", "SU2_CFD") cfd_flamelet_ch4_cht.timeout = 1600 cfd_flamelet_ch4_cht.reference_file = "restart_0.csv.ref" cfd_flamelet_ch4_cht.test_file = "restart_0.csv" cfd_flamelet_ch4_cht.multizone = True cfd_flamelet_ch4_cht.comp_threshold = 1e-6 - cfd_flamelet_ch4_cht.tol_file_percent = 0.1 + cfd_flamelet_ch4_cht.tol_file_percent = 1.0 pass_list.append(cfd_flamelet_ch4_cht.run_filediff()) test_list.append(cfd_flamelet_ch4_cht) @@ -1830,16 +1854,18 @@ def main(): test_list.append(naca0012_cst) # 2D FD streamwise periodic cht, avg temp obj func - fd_sp_pinArray_cht_2d_dp_hf = TestCase('fd_sp_pinArray_cht_2d_dp_hf') - fd_sp_pinArray_cht_2d_dp_hf.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_2d" - fd_sp_pinArray_cht_2d_dp_hf.cfg_file = "FD_configMaster.cfg" - fd_sp_pinArray_cht_2d_dp_hf.test_iter = 100 - fd_sp_pinArray_cht_2d_dp_hf.command = TestCase.Command(exec = "finite_differences.py", param = "-z 2 -n 2 -f") - fd_sp_pinArray_cht_2d_dp_hf.timeout = 1600 - fd_sp_pinArray_cht_2d_dp_hf.reference_file = "of_grad_findiff.csv.ref" + fd_sp_pinArray_cht_2d_dp_hf = TestCase('fd_sp_pinArray_cht_2d_dp_hf') + fd_sp_pinArray_cht_2d_dp_hf.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_2d" + fd_sp_pinArray_cht_2d_dp_hf.cfg_file = "FD_configMaster.cfg" + fd_sp_pinArray_cht_2d_dp_hf.test_iter = 100 + fd_sp_pinArray_cht_2d_dp_hf.command = TestCase.Command(exec = "finite_differences.py", param = "-z 2 -n 2 -f") + fd_sp_pinArray_cht_2d_dp_hf.timeout = 1600 + fd_sp_pinArray_cht_2d_dp_hf.comp_threshold = 1e-6 + fd_sp_pinArray_cht_2d_dp_hf.tol_file_percent = 0.2 + fd_sp_pinArray_cht_2d_dp_hf.reference_file = "of_grad_findiff.csv.ref" fd_sp_pinArray_cht_2d_dp_hf.reference_file_aarch64 = "of_grad_findiff_aarch64.csv.ref" - fd_sp_pinArray_cht_2d_dp_hf.test_file = "FINDIFF/of_grad_findiff.csv" - fd_sp_pinArray_cht_2d_dp_hf.multizone = True + fd_sp_pinArray_cht_2d_dp_hf.test_file = "FINDIFF/of_grad_findiff.csv" + fd_sp_pinArray_cht_2d_dp_hf.multizone = True pass_list.append(fd_sp_pinArray_cht_2d_dp_hf.run_filediff()) test_list.append(fd_sp_pinArray_cht_2d_dp_hf) diff --git a/TestCases/parallel_regression_AD.py b/TestCases/parallel_regression_AD.py index 59576fdc410..a4aa0f57252 100644 --- a/TestCases/parallel_regression_AD.py +++ b/TestCases/parallel_regression_AD.py @@ -47,7 +47,7 @@ def main(): discadj_naca0012.cfg_dir = "cont_adj_euler/naca0012" discadj_naca0012.cfg_file = "inv_NACA0012_discadj.cfg" discadj_naca0012.test_iter = 100 - discadj_naca0012.test_vals = [-3.561506, -8.926634, -0.000000, 0.005587] + discadj_naca0012.test_vals = [-3.560692, -8.925239, -0.000000, 0.005559] test_list.append(discadj_naca0012) # Inviscid Cylinder 3D (multiple markers) @@ -55,7 +55,7 @@ def main(): discadj_cylinder3D.cfg_dir = "disc_adj_euler/cylinder3D" discadj_cylinder3D.cfg_file = "inv_cylinder3D.cfg" discadj_cylinder3D.test_iter = 5 - discadj_cylinder3D.test_vals = [-3.734502, -3.839637, 0.000000, 0.000000] + discadj_cylinder3D.test_vals = [-3.768909, -3.725727, 0.000000, 0.000000] test_list.append(discadj_cylinder3D) # Arina nozzle 2D @@ -63,7 +63,7 @@ def main(): discadj_arina2k.cfg_dir = "disc_adj_euler/arina2k" discadj_arina2k.cfg_file = "Arina2KRS.cfg" discadj_arina2k.test_iter = 20 - discadj_arina2k.test_vals = [-3.111181, -3.501516, 6.8705e-02, 0] + discadj_arina2k.test_vals = [-3.540396, -3.828299, 0.027959, 0.000000] test_list.append(discadj_arina2k) # Equivalent area NACA64-206 @@ -71,7 +71,7 @@ def main(): ea_naca64206.cfg_dir = "optimization_euler/equivalentarea_naca64206" ea_naca64206.cfg_file = "NACA64206.cfg" ea_naca64206.test_iter = 10 - ea_naca64206.test_vals = [3.181093, 2.471539, -5487700.0, 8.3604] + ea_naca64206.test_vals = [3.127605, 2.411805, -5505700.000000, 10.591000] test_list.append(ea_naca64206) #################################### @@ -104,7 +104,7 @@ def main(): discadj_incomp_NACA0012.cfg_dir = "disc_adj_incomp_euler/naca0012" discadj_incomp_NACA0012.cfg_file = "incomp_NACA0012_disc.cfg" discadj_incomp_NACA0012.test_iter = 20 - discadj_incomp_NACA0012.test_vals = [20.000000, -4.095412, -2.690483, 0.000000] + discadj_incomp_NACA0012.test_vals = [20.000000, -4.093433, -2.686134, 0.000000] test_list.append(discadj_incomp_NACA0012) ##################################### @@ -150,7 +150,7 @@ def main(): discadj_axisymmetric_rans_nozzle.cfg_dir = "axisymmetric_rans/air_nozzle" discadj_axisymmetric_rans_nozzle.cfg_file = "air_nozzle_restart.cfg" discadj_axisymmetric_rans_nozzle.test_iter = 10 - discadj_axisymmetric_rans_nozzle.test_vals = [9.516464, 5.022130, 7.370705, 2.744551] + discadj_axisymmetric_rans_nozzle.test_vals = [9.550040, 4.937865, 7.377284, 2.748846] discadj_axisymmetric_rans_nozzle.no_restart = True test_list.append(discadj_axisymmetric_rans_nozzle) @@ -217,7 +217,7 @@ def main(): discadj_pitchingNACA0012.cfg_dir = "disc_adj_euler/naca0012_pitching" discadj_pitchingNACA0012.cfg_file = "inv_NACA0012_pitching.cfg" discadj_pitchingNACA0012.test_iter = 4 - discadj_pitchingNACA0012.test_vals = [-1.223480, -1.639387, -0.007591, 0.000013] + discadj_pitchingNACA0012.test_vals = [-1.227073, -1.648410, -0.007541, 0.000012] discadj_pitchingNACA0012.unsteady = True test_list.append(discadj_pitchingNACA0012) @@ -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 = [-2.226539, 0.605868, 0.000000, -6.256400] + discadj_heat.test_vals = [-2.117791, 0.784475, 0.000000, -0.574700] discadj_heat.test_vals_aarch64 = [-2.226539, 0.605868, 0.000000, -6.256400] test_list.append(discadj_heat) @@ -277,7 +277,7 @@ def main(): discadj_fsi2.cfg_dir = "disc_adj_fsi/Airfoil_2d" discadj_fsi2.cfg_file = "config.cfg" discadj_fsi2.test_iter = 8 - discadj_fsi2.test_vals = [-4.349377, 0.192713, -1.303589, 0.75407, 2.3244] + discadj_fsi2.test_vals = [-2.402639, 2.740269, -1.270185, -1.273900, 3.860200] discadj_fsi2.test_vals_aarch64 = [-4.349372, 0.190601, -1.303589, 0.754070, 2.324400] discadj_fsi2.tol = 0.00001 test_list.append(discadj_fsi2) @@ -299,7 +299,7 @@ def main(): da_sp_pinArray_cht_2d_dp_hf.cfg_dir = "incomp_navierstokes/streamwise_periodic/chtPinArray_2d" da_sp_pinArray_cht_2d_dp_hf.cfg_file = "DA_configMaster.cfg" da_sp_pinArray_cht_2d_dp_hf.test_iter = 100 - da_sp_pinArray_cht_2d_dp_hf.test_vals = [-4.743218, -4.059800, -4.138231] + da_sp_pinArray_cht_2d_dp_hf.test_vals = [-4.706292, -4.062398, -4.137374] da_sp_pinArray_cht_2d_dp_hf.multizone = True test_list.append(da_sp_pinArray_cht_2d_dp_hf) @@ -308,7 +308,7 @@ def main(): da_sp_pinArray_cht_2d_mf.cfg_dir = "incomp_navierstokes/streamwise_periodic/dp-adjoint_chtPinArray_2d" da_sp_pinArray_cht_2d_mf.cfg_file = "configMaster.cfg" da_sp_pinArray_cht_2d_mf.test_iter = 100 - da_sp_pinArray_cht_2d_mf.test_vals = [-4.611237, -1.290668, -1.453678, -18.507826, -0.859013, -5.755971, -19.067984, -47.993931] + da_sp_pinArray_cht_2d_mf.test_vals = [-4.600710, -1.298285, -1.430286, -18.503417, -0.870017, -5.768271, -19.069555, -47.953298] da_sp_pinArray_cht_2d_mf.multizone = True test_list.append(da_sp_pinArray_cht_2d_mf) @@ -511,7 +511,7 @@ def main(): pywrapper_CFD_AD_MeshDisp.cfg_dir = "py_wrapper/disc_adj_flow/mesh_disp_sens" pywrapper_CFD_AD_MeshDisp.cfg_file = "configAD_flow.cfg" pywrapper_CFD_AD_MeshDisp.test_iter = 1000 - pywrapper_CFD_AD_MeshDisp.test_vals = [30.000000, -2.520972485907894, 1.3848377455328362, 0.000000] #last 4 columns + pywrapper_CFD_AD_MeshDisp.test_vals = [30.000000, -2.506016, 1.407249, 0.000000] pywrapper_CFD_AD_MeshDisp.command = TestCase.Command("mpirun -n 2", "python", "run_adjoint.py --parallel -f") pywrapper_CFD_AD_MeshDisp.timeout = 1600 pywrapper_CFD_AD_MeshDisp.tol = 0.000001 diff --git a/TestCases/py_wrapper/translating_NACA0012/config.cfg b/TestCases/py_wrapper/translating_NACA0012/config.cfg index 8446a5405a1..a7880927239 100644 --- a/TestCases/py_wrapper/translating_NACA0012/config.cfg +++ b/TestCases/py_wrapper/translating_NACA0012/config.cfg @@ -43,27 +43,33 @@ MARKER_DEFORM_MESH= ( airfoil ) % DISCRETIZATION METHODS % CONV_NUM_METHOD_FLOW= ROE -MUSCL_FLOW= YES -NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES +MUSCL_FLOW= NO +NUM_METHOD_GRAD= GREEN_GAUSS SLOPE_LIMITER_FLOW= VENKATAKRISHNAN_WANG VENKAT_LIMITER_COEFF= 0.1 % SOLUTION ACCELERATION % -CFL_NUMBER= 1e3 +CFL_NUMBER= 1000 CFL_ADAPT= NO % MGLEVEL= 3 MGCYCLE= W_CYCLE +MG_PRE_SMOOTH= ( 1, 2, 3, 3 ) +MG_POST_SMOOTH= ( 0, 0, 0, 0 ) +MG_CORRECTION_SMOOTH= ( 0, 0, 0, 0 ) +MG_DAMP_RESTRICTION= 0.7 +MG_DAMP_PROLONGATION= 0.7 + % LINEAR_SOLVER= FGMRES LINEAR_SOLVER_PREC= ILU -LINEAR_SOLVER_ERROR= 0.1 -LINEAR_SOLVER_ITER= 10 +LINEAR_SOLVER_ERROR= 1.0e-6 +LINEAR_SOLVER_ITER= 25 % CONVERGENCE PARAMETERS % -ITER= 250 +ITER= 2500 CONV_FIELD= RMS_DENSITY CONV_RESIDUAL_MINVAL= -9 @@ -71,5 +77,5 @@ CONV_RESIDUAL_MINVAL= -9 % MESH_FILENAME= ../../euler/naca0012/mesh_NACA0012_inv.su2 MESH_FORMAT= SU2 -SCREEN_OUTPUT= (INNER_ITER, RMS_RES, LIFT, DRAG, MOMENT_X, MOMENT_Y, MOMENT_Z) +SCREEN_OUTPUT= (INNER_ITER, RMS_RES, LIFT, DRAG, MOMENT_X, MOMENT_Y, MOMENT_Z, LINSOL_RES, LINSOL_ITER) HISTORY_OUTPUT= (INNER_ITER, RMS_RES, AERO_COEFF) diff --git a/TestCases/py_wrapper/translating_NACA0012/forces_0.csv.ref b/TestCases/py_wrapper/translating_NACA0012/forces_0.csv.ref index aa9112983d0..56ad73bb9aa 100644 --- a/TestCases/py_wrapper/translating_NACA0012/forces_0.csv.ref +++ b/TestCases/py_wrapper/translating_NACA0012/forces_0.csv.ref @@ -1,200 +1,200 @@ -199, -1.01, -0.00, 0.00 -0, -2.07, 14.25, 0.00 -1, -3.62, 24.97, 0.00 -2, -4.84, 33.38, 0.00 -3, -5.85, 40.49, 0.00 -4, -6.69, 46.42, 0.00 -5, -7.36, 51.26, 0.00 -6, -7.92, 55.36, 0.00 -7, -8.34, 58.59, 0.00 -8, -8.64, 61.04, 0.00 -9, -8.83, 62.73, 0.00 -10, -8.91, 63.73, 0.00 -11, -8.90, 64.10, 0.00 -12, -8.79, 63.80, 0.00 -13, -8.59, 62.88, 0.00 -14, -8.31, 61.35, 0.00 -15, -7.95, 59.25, 0.00 -16, -7.53, 56.67, 0.00 -17, -7.05, 53.55, 0.00 -18, -6.50, 49.94, 0.00 -19, -5.90, 45.87, 0.00 -20, -5.26, 41.32, 0.00 -21, -4.57, 36.38, 0.00 -22, -3.85, 31.01, 0.00 -23, -3.09, 25.23, 0.00 -24, -2.31, 19.12, 0.00 -25, -1.51, 12.63, 0.00 -26, -0.68, 5.79, 0.00 -27, 0.16, -1.36, 0.00 -28, 1.01, -8.84, 0.00 -29, 1.86, -16.61, 0.00 -30, 2.72, -24.66, 0.00 -31, 3.58, -32.98, 0.00 -32, 4.43, -41.60, 0.00 -33, 5.28, -50.47, 0.00 -34, 6.11, -59.56, 0.00 -35, 6.93, -68.92, 0.00 -36, 7.73, -78.52, 0.00 -37, 8.50, -88.30, 0.00 -38, 9.24, -98.33, 0.00 -39, 9.95, -108.57, 0.00 -40, 10.62, -118.95, 0.00 -41, 11.24, -129.51, 0.00 -42, 11.81, -140.28, 0.00 -43, 12.33, -151.21, 0.00 -44, 12.78, -162.28, 0.00 -45, 13.15, -173.40, 0.00 -46, 13.44, -184.61, 0.00 -47, 13.64, -195.87, 0.00 -48, 13.73, -207.12, 0.00 -49, 13.72, -218.38, 0.00 -50, 13.58, -229.47, 0.00 -51, 13.30, -240.10, 0.00 -52, 12.85, -250.14, 0.00 -53, 12.31, -261.02, 0.00 -54, 11.62, -271.62, 0.00 -55, 10.32, -270.49, 0.00 -56, 8.26, -248.20, 0.00 -57, 6.94, -245.94, 0.00 -58, 7.97, -348.31, 0.00 -59, 7.61, -440.57, 0.00 -60, 5.11, -448.31, 0.00 -61, 2.28, -436.77, 0.00 -62, -0.53, -428.04, 0.00 -63, -3.36, -418.60, 0.00 -64, -6.17, -407.62, 0.00 -65, -8.93, -395.29, 0.00 -66, -11.62, -381.67, 0.00 -67, -14.20, -367.12, 0.00 -68, -16.64, -351.56, 0.00 -69, -18.92, -335.22, 0.00 -70, -21.01, -318.22, 0.00 -71, -22.89, -300.56, 0.00 -72, -24.52, -282.37, 0.00 -73, -25.88, -263.71, 0.00 -74, -26.96, -244.77, 0.00 -75, -27.72, -225.59, 0.00 -76, -28.12, -205.99, 0.00 -77, -28.13, -186.20, 0.00 -78, -27.76, -166.42, 0.00 -79, -26.92, -146.54, 0.00 -80, -25.62, -126.74, 0.00 -81, -23.79, -107.06, 0.00 -82, -21.39, -87.53, 0.00 -83, -18.36, -68.27, 0.00 -84, -14.63, -49.34, 0.00 -85, -10.10, -30.83, 0.00 -86, -4.66, -12.84, 0.00 -87, 1.82, 4.49, 0.00 -88, 9.54, 21.04, 0.00 -89, 18.64, 36.46, 0.00 -90, 29.42, 50.48, 0.00 -91, 42.11, 62.60, 0.00 -92, 56.77, 71.89, 0.00 -93, 73.41, 77.41, 0.00 -94, 91.92, 78.09, 0.00 -95, 111.10, 72.36, 0.00 -96, 128.91, 59.09, 0.00 -97, 142.62, 38.60, 0.00 -98, 108.87, 14.61, 0.00 -99, 70.25, -0.00, 0.00 -100, 103.25, -13.86, 0.00 -101, 123.24, -33.35, 0.00 -102, 98.16, -44.99, 0.00 -103, 72.48, -47.21, 0.00 -104, 48.60, -41.28, 0.00 -105, 27.56, -29.06, 0.00 -106, 9.78, -12.38, 0.00 -107, -4.77, 7.09, 0.00 -108, -16.59, 28.46, 0.00 -109, -26.11, 51.06, 0.00 -110, -33.64, 74.25, 0.00 -111, -39.61, 97.94, 0.00 -112, -44.31, 122.01, 0.00 -113, -47.92, 146.26, 0.00 -114, -50.63, 170.78, 0.00 -115, -52.57, 195.45, 0.00 -116, -53.80, 220.12, 0.00 -117, -54.43, 244.90, 0.00 -118, -54.50, 269.61, 0.00 -119, -54.06, 294.24, 0.00 -120, -53.18, 318.89, 0.00 -121, -51.86, 343.20, 0.00 -122, -50.17, 367.52, 0.00 -123, -48.12, 391.59, 0.00 -124, -45.70, 414.97, 0.00 -125, -43.01, 438.21, 0.00 -126, -40.06, 461.35, 0.00 -127, -36.86, 484.02, 0.00 -128, -33.42, 506.10, 0.00 -129, -29.77, 527.50, 0.00 -130, -25.96, 548.39, 0.00 -131, -22.00, 568.76, 0.00 -132, -17.91, 588.36, 0.00 -133, -13.73, 607.39, 0.00 -134, -9.47, 625.38, 0.00 -135, -5.15, 642.54, 0.00 -136, -0.81, 659.27, 0.00 -137, 3.53, 674.87, 0.00 -138, 7.85, 689.30, 0.00 -139, 12.15, 703.23, 0.00 -140, 16.38, 716.18, 0.00 -141, 20.53, 727.67, 0.00 -142, 24.59, 738.40, 0.00 -143, 28.55, 748.36, 0.00 -144, 32.38, 757.04, 0.00 -145, 36.06, 764.43, 0.00 -146, 39.61, 771.02, 0.00 -147, 43.00, 776.59, 0.00 -148, 46.22, 780.89, 0.00 -149, 49.29, 784.46, 0.00 -150, 52.17, 786.78, 0.00 -151, 54.87, 788.13, 0.00 -152, 57.40, 788.54, 0.00 -153, 59.77, 788.13, 0.00 -154, 61.95, 786.74, 0.00 -155, 63.49, 778.73, 0.00 -156, 67.16, 797.62, 0.00 -157, 62.16, 716.24, 0.00 -158, 1.28, 14.32, 0.00 -159, -2.99, -32.64, 0.00 -160, 0.35, 3.75, 0.00 -161, -0.04, -0.41, 0.00 -162, 0.11, 1.11, 0.00 -163, 0.13, 1.27, 0.00 -164, 0.00, 0.00, 0.00 -165, -0.22, -2.15, 0.00 -166, -0.53, -5.01, 0.00 -167, -0.91, -8.41, 0.00 -168, -1.35, -12.19, 0.00 -169, -1.83, -16.27, 0.00 -170, -2.34, -20.53, 0.00 -171, -2.88, -24.89, 0.00 -172, -3.44, -29.28, 0.00 -173, -4.01, -33.68, 0.00 -174, -4.59, -37.96, 0.00 -175, -5.16, -42.10, 0.00 -176, -5.72, -46.12, 0.00 -177, -6.27, -49.88, 0.00 -178, -6.79, -53.37, 0.00 -179, -7.28, -56.59, 0.00 -180, -7.74, -59.45, 0.00 -181, -8.15, -61.97, 0.00 -182, -8.52, -64.08, 0.00 -183, -8.82, -65.74, 0.00 -184, -9.08, -67.01, 0.00 -185, -9.26, -67.76, 0.00 -186, -9.37, -67.96, 0.00 -187, -9.39, -67.62, 0.00 -188, -9.32, -66.63, 0.00 -189, -9.16, -65.08, 0.00 -190, -8.90, -62.89, 0.00 -191, -8.54, -59.98, 0.00 -192, -8.06, -56.33, 0.00 -193, -7.45, -51.85, 0.00 -194, -6.73, -46.69, 0.00 -195, -5.85, -40.49, 0.00 -196, -4.79, -33.08, 0.00 -197, -3.55, -24.47, 0.00 -198, -1.91, -13.14, 0.00 +199, -0.85, -0.00, 0.00 +0, -2.66, 18.33, 0.00 +1, -3.73, 25.70, 0.00 +2, -4.53, 31.27, 0.00 +3, -5.24, 36.23, 0.00 +4, -5.81, 40.33, 0.00 +5, -6.25, 43.55, 0.00 +6, -6.60, 46.13, 0.00 +7, -6.83, 47.96, 0.00 +8, -6.95, 49.09, 0.00 +9, -6.97, 49.54, 0.00 +10, -6.90, 49.35, 0.00 +11, -6.74, 48.57, 0.00 +12, -6.50, 47.14, 0.00 +13, -6.17, 45.13, 0.00 +14, -5.76, 42.53, 0.00 +15, -5.29, 39.38, 0.00 +16, -4.75, 35.75, 0.00 +17, -4.16, 31.65, 0.00 +18, -3.53, 27.09, 0.00 +19, -2.85, 22.14, 0.00 +20, -2.14, 16.79, 0.00 +21, -1.39, 11.10, 0.00 +22, -0.63, 5.06, 0.00 +23, 0.16, -1.33, 0.00 +24, 0.98, -8.10, 0.00 +25, 1.82, -15.27, 0.00 +26, 2.68, -22.82, 0.00 +27, 3.56, -30.76, 0.00 +28, 4.45, -39.00, 0.00 +29, 5.32, -47.44, 0.00 +30, 6.19, -56.07, 0.00 +31, 7.05, -64.97, 0.00 +32, 7.91, -74.28, 0.00 +33, 8.78, -83.97, 0.00 +34, 9.63, -93.91, 0.00 +35, 10.46, -104.09, 0.00 +36, 11.25, -114.37, 0.00 +37, 12.00, -124.73, 0.00 +38, 12.71, -135.28, 0.00 +39, 13.38, -145.98, 0.00 +40, 13.99, -156.79, 0.00 +41, 14.55, -167.72, 0.00 +42, 15.06, -178.80, 0.00 +43, 15.48, -189.92, 0.00 +44, 15.83, -201.03, 0.00 +45, 16.07, -211.97, 0.00 +46, 16.22, -222.82, 0.00 +47, 16.27, -233.68, 0.00 +48, 16.23, -244.83, 0.00 +49, 16.13, -256.65, 0.00 +50, 15.93, -269.12, 0.00 +51, 15.62, -282.01, 0.00 +52, 15.14, -294.70, 0.00 +53, 14.49, -307.24, 0.00 +54, 13.68, -319.91, 0.00 +55, 12.67, -332.16, 0.00 +56, 11.42, -342.95, 0.00 +57, 9.91, -351.31, 0.00 +58, 8.15, -356.48, 0.00 +59, 6.19, -358.24, 0.00 +60, 4.07, -357.17, 0.00 +61, 1.85, -353.80, 0.00 +62, -0.43, -348.10, 0.00 +63, -2.73, -340.32, 0.00 +64, -5.01, -331.03, 0.00 +65, -7.24, -320.26, 0.00 +66, -9.38, -308.18, 0.00 +67, -11.42, -295.32, 0.00 +68, -13.34, -281.72, 0.00 +69, -15.11, -267.62, 0.00 +70, -16.72, -253.15, 0.00 +71, -18.14, -238.20, 0.00 +72, -19.34, -222.69, 0.00 +73, -20.27, -206.50, 0.00 +74, -20.91, -189.85, 0.00 +75, -21.24, -172.83, 0.00 +76, -21.19, -155.22, 0.00 +77, -20.73, -137.21, 0.00 +78, -19.84, -118.97, 0.00 +79, -18.47, -100.51, 0.00 +80, -16.59, -82.08, 0.00 +81, -14.17, -63.76, 0.00 +82, -11.16, -45.67, 0.00 +83, -7.51, -27.92, 0.00 +84, -3.16, -10.66, 0.00 +85, 1.96, 5.99, 0.00 +86, 7.98, 21.97, 0.00 +87, 15.01, 37.12, 0.00 +88, 23.22, 51.25, 0.00 +89, 32.70, 63.95, 0.00 +90, 43.60, 74.81, 0.00 +91, 56.10, 83.39, 0.00 +92, 70.04, 88.70, 0.00 +93, 85.41, 90.05, 0.00 +94, 101.82, 86.49, 0.00 +95, 118.17, 76.97, 0.00 +96, 133.74, 61.30, 0.00 +97, 147.39, 39.89, 0.00 +98, 111.90, 15.02, 0.00 +99, 71.22, -0.00, 0.00 +100, 109.26, -14.66, 0.00 +101, 137.60, -37.24, 0.00 +102, 115.95, -53.15, 0.00 +103, 93.75, -61.06, 0.00 +104, 72.27, -61.39, 0.00 +105, 52.36, -55.20, 0.00 +106, 34.79, -44.05, 0.00 +107, 19.66, -29.23, 0.00 +108, 6.81, -11.68, 0.00 +109, -3.93, 7.68, 0.00 +110, -12.86, 28.37, 0.00 +111, -20.21, 49.96, 0.00 +112, -26.23, 72.22, 0.00 +113, -31.05, 94.79, 0.00 +114, -34.88, 117.65, 0.00 +115, -37.90, 140.89, 0.00 +116, -40.20, 164.49, 0.00 +117, -41.88, 188.42, 0.00 +118, -43.00, 212.71, 0.00 +119, -43.62, 237.42, 0.00 +120, -43.64, 261.69, 0.00 +121, -43.10, 285.24, 0.00 +122, -42.11, 308.46, 0.00 +123, -40.72, 331.35, 0.00 +124, -38.94, 353.54, 0.00 +125, -36.84, 375.42, 0.00 +126, -34.48, 397.10, 0.00 +127, -31.85, 418.29, 0.00 +128, -28.97, 438.71, 0.00 +129, -25.85, 458.00, 0.00 +130, -22.55, 476.33, 0.00 +131, -19.10, 493.80, 0.00 +132, -15.54, 510.37, 0.00 +133, -11.90, 526.39, 0.00 +134, -8.20, 541.54, 0.00 +135, -4.46, 556.04, 0.00 +136, -0.70, 570.26, 0.00 +137, 3.05, 583.60, 0.00 +138, 6.79, 596.04, 0.00 +139, 10.50, 608.18, 0.00 +140, 14.17, 619.60, 0.00 +141, 17.77, 629.84, 0.00 +142, 21.29, 639.37, 0.00 +143, 24.72, 648.06, 0.00 +144, 28.03, 655.33, 0.00 +145, 31.19, 661.08, 0.00 +146, 34.20, 665.74, 0.00 +147, 37.05, 669.08, 0.00 +148, 39.71, 670.85, 0.00 +149, 42.17, 671.22, 0.00 +150, 44.38, 669.34, 0.00 +151, 46.26, 664.42, 0.00 +152, 47.51, 652.70, 0.00 +153, 46.78, 616.94, 0.00 +154, 39.70, 504.23, 0.00 +155, 24.94, 305.93, 0.00 +156, 16.44, 195.28, 0.00 +157, 13.94, 160.59, 0.00 +158, 13.18, 147.63, 0.00 +159, 12.74, 138.97, 0.00 +160, 12.29, 130.81, 0.00 +161, 11.80, 122.63, 0.00 +162, 11.26, 114.42, 0.00 +163, 10.66, 106.07, 0.00 +164, 10.01, 97.60, 0.00 +165, 9.32, 89.11, 0.00 +166, 8.57, 80.48, 0.00 +167, 7.78, 71.77, 0.00 +168, 6.96, 63.07, 0.00 +169, 6.10, 54.40, 0.00 +170, 5.22, 45.80, 0.00 +171, 4.33, 37.37, 0.00 +172, 3.44, 29.24, 0.00 +173, 2.56, 21.44, 0.00 +174, 1.69, 13.95, 0.00 +175, 0.83, 6.81, 0.00 +176, 0.01, 0.05, 0.00 +177, -0.80, -6.35, 0.00 +178, -1.58, -12.38, 0.00 +179, -2.32, -18.05, 0.00 +180, -3.04, -23.33, 0.00 +181, -3.71, -28.22, 0.00 +182, -4.34, -32.66, 0.00 +183, -4.92, -36.62, 0.00 +184, -5.43, -40.09, 0.00 +185, -5.87, -42.98, 0.00 +186, -6.24, -45.27, 0.00 +187, -6.52, -46.94, 0.00 +188, -6.70, -47.94, 0.00 +189, -6.80, -48.33, 0.00 +190, -6.80, -48.04, 0.00 +191, -6.70, -47.05, 0.00 +192, -6.48, -45.33, 0.00 +193, -6.15, -42.84, 0.00 +194, -5.72, -39.70, 0.00 +195, -5.15, -35.65, 0.00 +196, -4.45, -30.72, 0.00 +197, -3.65, -25.15, 0.00 +198, -2.59, -17.80, 0.00 diff --git a/TestCases/py_wrapper/updated_moving_frame_NACA12/forces_0.csv.ref b/TestCases/py_wrapper/updated_moving_frame_NACA12/forces_0.csv.ref index de783b9af84..2e4f90bda43 100644 --- a/TestCases/py_wrapper/updated_moving_frame_NACA12/forces_0.csv.ref +++ b/TestCases/py_wrapper/updated_moving_frame_NACA12/forces_0.csv.ref @@ -1,200 +1,200 @@ -199, -1.02, -0.00, 0.00 -0, -2.05, 14.11, 0.00 -1, -3.63, 25.02, 0.00 -2, -4.85, 33.50, 0.00 -3, -5.88, 40.69, 0.00 -4, -6.73, 46.67, 0.00 -5, -7.41, 51.56, 0.00 -6, -7.97, 55.71, 0.00 -7, -8.40, 58.99, 0.00 -8, -8.71, 61.49, 0.00 -9, -8.90, 63.22, 0.00 -10, -8.98, 64.25, 0.00 -11, -8.98, 64.66, 0.00 -12, -8.87, 64.38, 0.00 -13, -8.68, 63.48, 0.00 -14, -8.39, 61.96, 0.00 -15, -8.03, 59.85, 0.00 -16, -7.61, 57.27, 0.00 -17, -7.12, 54.13, 0.00 -18, -6.57, 50.50, 0.00 -19, -5.97, 46.39, 0.00 -20, -5.32, 41.81, 0.00 -21, -4.63, 36.81, 0.00 -22, -3.90, 31.39, 0.00 -23, -3.13, 25.55, 0.00 -24, -2.34, 19.36, 0.00 -25, -1.53, 12.80, 0.00 -26, -0.69, 5.88, 0.00 -27, 0.16, -1.35, 0.00 -28, 1.02, -8.91, 0.00 -29, 1.88, -16.75, 0.00 -30, 2.74, -24.86, 0.00 -31, 3.61, -33.24, 0.00 -32, 4.46, -41.89, 0.00 -33, 5.31, -50.77, 0.00 -34, 6.14, -59.83, 0.00 -35, 6.95, -69.11, 0.00 -36, 7.73, -78.56, 0.00 -37, 8.48, -88.13, 0.00 -38, 9.19, -97.82, 0.00 -39, 9.86, -107.57, 0.00 -40, 10.47, -117.28, 0.00 -41, 11.01, -126.92, 0.00 -42, 11.49, -136.42, 0.00 -43, 11.87, -145.62, 0.00 -44, 12.15, -154.31, 0.00 -45, 12.30, -162.22, 0.00 -46, 12.31, -169.04, 0.00 -47, 12.11, -173.89, 0.00 -48, 11.66, -175.88, 0.00 -49, 11.13, -177.08, 0.00 -50, 10.20, -172.29, 0.00 -51, 6.86, -123.94, 0.00 -52, 5.97, -116.29, 0.00 -53, 21.77, -461.42, 0.00 -54, 26.12, -610.78, 0.00 -55, 21.89, -573.85, 0.00 -56, 18.71, -561.76, 0.00 -57, 15.72, -557.10, 0.00 -58, 12.57, -549.52, 0.00 -59, 9.33, -540.36, 0.00 -60, 6.04, -530.05, 0.00 -61, 2.71, -518.89, 0.00 -62, -0.62, -506.43, 0.00 -63, -3.95, -492.74, 0.00 -64, -7.24, -478.42, 0.00 -65, -10.47, -463.16, 0.00 -66, -13.60, -446.83, 0.00 -67, -16.63, -429.81, 0.00 -68, -19.50, -411.99, 0.00 -69, -22.22, -393.60, 0.00 -70, -24.75, -374.77, 0.00 -71, -27.06, -355.42, 0.00 -72, -29.14, -335.60, 0.00 -73, -30.94, -315.27, 0.00 -74, -32.45, -294.65, 0.00 -75, -33.65, -273.85, 0.00 -76, -34.49, -252.64, 0.00 -77, -34.95, -231.28, 0.00 -78, -35.02, -209.98, 0.00 -79, -34.64, -188.53, 0.00 -80, -33.79, -167.17, 0.00 -81, -32.42, -145.88, 0.00 -82, -30.48, -124.69, 0.00 -83, -27.91, -103.76, 0.00 -84, -24.63, -83.06, 0.00 -85, -20.55, -62.73, 0.00 -86, -15.56, -42.84, 0.00 -87, -9.50, -23.48, 0.00 -88, -2.17, -4.79, 0.00 -89, 6.62, 12.94, 0.00 -90, 17.16, 29.44, 0.00 -91, 29.73, 44.19, 0.00 -92, 44.58, 56.46, 0.00 -93, 61.71, 65.06, 0.00 -94, 81.10, 68.89, 0.00 -95, 101.88, 66.36, 0.00 -96, 122.09, 55.96, 0.00 -97, 139.13, 37.65, 0.00 -98, 108.84, 14.60, 0.00 -99, 71.28, -0.00, 0.00 -100, 106.29, -14.26, 0.00 -101, 130.33, -35.27, 0.00 -102, 108.14, -49.57, 0.00 -103, 84.37, -54.95, 0.00 -104, 61.43, -52.19, 0.00 -105, 40.94, -43.16, 0.00 -106, 23.22, -29.41, 0.00 -107, 8.42, -12.52, 0.00 -108, -3.78, 6.48, 0.00 -109, -13.76, 26.90, 0.00 -110, -21.85, 48.23, 0.00 -111, -28.39, 70.19, 0.00 -112, -33.65, 92.65, 0.00 -113, -37.82, 115.44, 0.00 -114, -41.08, 138.55, 0.00 -115, -43.55, 161.90, 0.00 -116, -45.31, 185.37, 0.00 -117, -46.46, 209.03, 0.00 -118, -47.03, 232.69, 0.00 -119, -47.10, 256.34, 0.00 -120, -46.71, 280.06, 0.00 -121, -45.86, 303.51, 0.00 -122, -44.63, 326.98, 0.00 -123, -43.04, 350.21, 0.00 -124, -41.06, 372.86, 0.00 -125, -38.81, 395.46, 0.00 -126, -36.30, 418.02, 0.00 -127, -33.51, 440.10, 0.00 -128, -30.48, 461.60, 0.00 -129, -27.23, 482.42, 0.00 -130, -23.80, 502.74, 0.00 -131, -20.21, 522.54, 0.00 -132, -16.49, 541.62, 0.00 -133, -12.66, 560.14, 0.00 -134, -8.74, 577.66, 0.00 -135, -4.77, 594.37, 0.00 -136, -0.75, 610.64, 0.00 -137, 3.27, 625.80, 0.00 -138, 7.29, 639.80, 0.00 -139, 11.28, 653.28, 0.00 -140, 15.23, 665.78, 0.00 -141, 19.09, 676.85, 0.00 -142, 22.88, 687.16, 0.00 -143, 26.58, 696.67, 0.00 -144, 30.15, 704.91, 0.00 -145, 33.58, 711.87, 0.00 -146, 36.88, 717.99, 0.00 -147, 40.04, 723.07, 0.00 -148, 43.03, 726.92, 0.00 -149, 45.86, 729.95, 0.00 -150, 48.47, 730.99, 0.00 -151, 50.57, 726.34, 0.00 -152, 54.71, 751.52, 0.00 -153, 52.81, 696.43, 0.00 -154, 5.64, 71.68, 0.00 -155, -0.65, -7.95, 0.00 -156, 3.46, 41.08, 0.00 -157, 3.63, 41.77, 0.00 -158, 4.01, 44.95, 0.00 -159, 4.28, 46.74, 0.00 -160, 4.32, 46.00, 0.00 -161, 4.21, 43.77, 0.00 -162, 3.98, 40.43, 0.00 -163, 3.64, 36.21, 0.00 -164, 3.22, 31.35, 0.00 -165, 2.72, 26.01, 0.00 -166, 2.16, 20.31, 0.00 -167, 1.56, 14.37, 0.00 -168, 0.92, 8.30, 0.00 -169, 0.24, 2.16, 0.00 -170, -0.45, -3.98, 0.00 -171, -1.16, -10.05, 0.00 -172, -1.88, -15.99, 0.00 -173, -2.60, -21.79, 0.00 -174, -3.31, -27.36, 0.00 -175, -4.00, -32.68, 0.00 -176, -4.69, -37.76, 0.00 -177, -5.34, -42.49, 0.00 -178, -5.96, -46.87, 0.00 -179, -6.55, -50.90, 0.00 -180, -7.09, -54.49, 0.00 -181, -7.59, -57.67, 0.00 -182, -8.03, -60.38, 0.00 -183, -8.40, -62.58, 0.00 -184, -8.72, -64.34, 0.00 -185, -8.96, -65.53, 0.00 -186, -9.11, -66.13, 0.00 -187, -9.18, -66.13, 0.00 -188, -9.15, -65.46, 0.00 -189, -9.04, -64.19, 0.00 -190, -8.81, -62.24, 0.00 -191, -8.48, -59.55, 0.00 -192, -8.02, -56.09, 0.00 -193, -7.44, -51.78, 0.00 -194, -6.74, -46.74, 0.00 -195, -5.87, -40.64, 0.00 -196, -4.83, -33.31, 0.00 -197, -3.59, -24.74, 0.00 -198, -1.96, -13.51, 0.00 +199, -1.01, -0.00, 0.00 +0, -2.98, 20.50, 0.00 +1, -3.99, 27.46, 0.00 +2, -5.22, 36.06, 0.00 +3, -6.10, 42.20, 0.00 +4, -6.90, 47.88, 0.00 +5, -7.54, 52.52, 0.00 +6, -8.08, 56.52, 0.00 +7, -8.50, 59.69, 0.00 +8, -8.79, 62.11, 0.00 +9, -8.98, 63.80, 0.00 +10, -9.06, 64.81, 0.00 +11, -9.06, 65.22, 0.00 +12, -8.95, 64.94, 0.00 +13, -8.75, 64.06, 0.00 +14, -8.48, 62.56, 0.00 +15, -8.12, 60.48, 0.00 +16, -7.70, 57.92, 0.00 +17, -7.21, 54.81, 0.00 +18, -6.66, 51.20, 0.00 +19, -6.07, 47.12, 0.00 +20, -5.42, 42.57, 0.00 +21, -4.73, 37.59, 0.00 +22, -4.00, 32.19, 0.00 +23, -3.23, 26.37, 0.00 +24, -2.44, 20.21, 0.00 +25, -1.63, 13.66, 0.00 +26, -0.79, 6.76, 0.00 +27, 0.05, -0.45, 0.00 +28, 0.91, -7.99, 0.00 +29, 1.77, -15.81, 0.00 +30, 2.64, -23.91, 0.00 +31, 3.50, -32.27, 0.00 +32, 4.36, -40.90, 0.00 +33, 5.20, -49.76, 0.00 +34, 6.03, -58.80, 0.00 +35, 6.84, -68.06, 0.00 +36, 7.63, -77.50, 0.00 +37, 8.37, -87.04, 0.00 +38, 9.09, -96.70, 0.00 +39, 9.76, -106.43, 0.00 +40, 10.37, -116.12, 0.00 +41, 10.91, -125.73, 0.00 +42, 11.39, -135.21, 0.00 +43, 11.77, -144.39, 0.00 +44, 12.05, -153.08, 0.00 +45, 12.21, -161.05, 0.00 +46, 12.22, -167.88, 0.00 +47, 12.01, -172.51, 0.00 +48, 11.61, -175.12, 0.00 +49, 11.25, -179.01, 0.00 +50, 10.12, -170.90, 0.00 +51, 6.24, -112.75, 0.00 +52, 6.61, -128.63, 0.00 +53, 20.84, -441.83, 0.00 +54, 25.65, -599.65, 0.00 +55, 21.77, -570.80, 0.00 +56, 18.66, -560.26, 0.00 +57, 15.64, -554.49, 0.00 +58, 12.51, -546.85, 0.00 +59, 9.28, -537.57, 0.00 +60, 6.01, -527.15, 0.00 +61, 2.70, -515.89, 0.00 +62, -0.62, -503.33, 0.00 +63, -3.92, -489.55, 0.00 +64, -7.19, -475.11, 0.00 +65, -10.39, -459.75, 0.00 +66, -13.50, -443.31, 0.00 +67, -16.49, -426.20, 0.00 +68, -19.33, -408.27, 0.00 +69, -22.00, -389.78, 0.00 +70, -24.49, -370.85, 0.00 +71, -26.76, -351.39, 0.00 +72, -28.78, -331.47, 0.00 +73, -30.52, -311.04, 0.00 +74, -31.97, -290.33, 0.00 +75, -33.11, -269.42, 0.00 +76, -33.86, -248.08, 0.00 +77, -34.24, -226.61, 0.00 +78, -34.22, -205.20, 0.00 +79, -33.74, -183.64, 0.00 +80, -32.78, -162.19, 0.00 +81, -31.29, -140.79, 0.00 +82, -29.21, -119.49, 0.00 +83, -26.48, -98.43, 0.00 +84, -23.02, -77.63, 0.00 +85, -18.75, -57.22, 0.00 +86, -13.54, -37.28, 0.00 +87, -7.23, -17.89, 0.00 +88, 0.32, 0.71, 0.00 +89, 9.35, 18.28, 0.00 +90, 20.02, 34.35, 0.00 +91, 32.65, 48.54, 0.00 +92, 47.34, 59.96, 0.00 +93, 64.24, 67.74, 0.00 +94, 83.11, 70.60, 0.00 +95, 102.71, 66.90, 0.00 +96, 121.38, 55.64, 0.00 +97, 137.08, 37.10, 0.00 +98, 106.89, 14.34, 0.00 +99, 69.93, -0.00, 0.00 +100, 104.81, -14.06, 0.00 +101, 129.39, -35.02, 0.00 +102, 108.98, -49.95, 0.00 +103, 86.90, -56.60, 0.00 +104, 64.97, -55.19, 0.00 +105, 44.71, -47.14, 0.00 +106, 27.08, -34.30, 0.00 +107, 12.21, -18.16, 0.00 +108, -0.23, 0.39, 0.00 +109, -10.50, 20.54, 0.00 +110, -18.96, 41.85, 0.00 +111, -25.82, 63.84, 0.00 +112, -31.39, 86.44, 0.00 +113, -35.84, 109.39, 0.00 +114, -39.33, 132.66, 0.00 +115, -42.01, 156.16, 0.00 +116, -43.95, 179.80, 0.00 +117, -45.26, 203.64, 0.00 +118, -45.98, 227.47, 0.00 +119, -46.16, 251.27, 0.00 +120, -45.89, 275.14, 0.00 +121, -45.14, 298.74, 0.00 +122, -44.00, 322.34, 0.00 +123, -42.49, 345.71, 0.00 +124, -40.58, 368.50, 0.00 +125, -38.39, 391.21, 0.00 +126, -35.94, 413.88, 0.00 +127, -33.21, 436.09, 0.00 +128, -30.22, 457.70, 0.00 +129, -27.02, 478.65, 0.00 +130, -23.62, 499.09, 0.00 +131, -20.08, 519.03, 0.00 +132, -16.39, 538.22, 0.00 +133, -12.59, 556.86, 0.00 +134, -8.70, 574.51, 0.00 +135, -4.74, 591.34, 0.00 +136, -0.75, 607.73, 0.00 +137, 3.26, 623.00, 0.00 +138, 7.26, 637.13, 0.00 +139, 11.24, 650.73, 0.00 +140, 15.17, 663.34, 0.00 +141, 19.03, 674.54, 0.00 +142, 22.81, 684.95, 0.00 +143, 26.50, 694.58, 0.00 +144, 30.06, 702.94, 0.00 +145, 33.49, 710.01, 0.00 +146, 36.79, 716.23, 0.00 +147, 39.95, 721.39, 0.00 +148, 42.93, 725.31, 0.00 +149, 45.77, 728.51, 0.00 +150, 48.44, 730.59, 0.00 +151, 50.61, 726.85, 0.00 +152, 53.86, 739.83, 0.00 +153, 53.31, 702.96, 0.00 +154, 8.15, 103.49, 0.00 +155, -2.34, -28.69, 0.00 +156, 3.10, 36.88, 0.00 +157, 3.81, 43.93, 0.00 +158, 3.88, 43.46, 0.00 +159, 4.18, 45.56, 0.00 +160, 4.24, 45.15, 0.00 +161, 4.13, 42.94, 0.00 +162, 3.90, 39.62, 0.00 +163, 3.56, 35.42, 0.00 +164, 3.14, 30.58, 0.00 +165, 2.64, 25.27, 0.00 +166, 2.09, 19.60, 0.00 +167, 1.48, 13.68, 0.00 +168, 0.84, 7.64, 0.00 +169, 0.17, 1.53, 0.00 +170, -0.52, -4.58, 0.00 +171, -1.23, -10.62, 0.00 +172, -1.94, -16.53, 0.00 +173, -2.66, -22.30, 0.00 +174, -3.37, -27.85, 0.00 +175, -4.06, -33.13, 0.00 +176, -4.74, -38.17, 0.00 +177, -5.39, -42.87, 0.00 +178, -6.01, -47.21, 0.00 +179, -6.59, -51.20, 0.00 +180, -7.13, -54.76, 0.00 +181, -7.62, -57.90, 0.00 +182, -8.05, -60.58, 0.00 +183, -8.42, -62.75, 0.00 +184, -8.74, -64.48, 0.00 +185, -8.97, -65.65, 0.00 +186, -9.13, -66.23, 0.00 +187, -9.20, -66.23, 0.00 +188, -9.17, -65.58, 0.00 +189, -9.06, -64.33, 0.00 +190, -8.84, -62.44, 0.00 +191, -8.52, -59.84, 0.00 +192, -8.08, -56.51, 0.00 +193, -7.52, -52.37, 0.00 +194, -6.86, -47.60, 0.00 +195, -6.05, -41.82, 0.00 +196, -5.16, -35.60, 0.00 +197, -3.91, -26.94, 0.00 +198, -2.89, -19.92, 0.00 diff --git a/TestCases/rans/flatplate/turb_SST_flatplate_compressibility_Sarkar.cfg b/TestCases/rans/flatplate/turb_SST_flatplate_compressibility_Sarkar.cfg new file mode 100644 index 00000000000..9630355c8d5 --- /dev/null +++ b/TestCases/rans/flatplate/turb_SST_flatplate_compressibility_Sarkar.cfg @@ -0,0 +1,150 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% SU2 configuration file % +% Case description: Turbulent flow over flat plate(2DZPH) % +% Author: Sunoh. Kang % +% Institution: Pusan National University % +% Date: 2024.04.30 % +% File Version 8.0.1 "Harrier" % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% +% +SOLVER= RANS +KIND_TURB_MODEL= SST +SST_OPTIONS= V2003m, COMPRESSIBILITY-SARKAR +MATH_PROBLEM= DIRECT +RESTART_SOL= NO + +% ------------------------ COMPRESSIBLE FREE-STREAM DEFINITION ----------------% +% +MACH_NUMBER= 5.0 +AOA= 0.000 +INIT_OPTION= TD_CONDITIONS +FREESTREAM_OPTION= TEMPERATURE_FS +FREESTREAM_TEMPERATURE= 300.3333 +FREESTREAM_PRESSURE= 13753.90558 +FREESTREAM_TURBULENCEINTENSITY = 0.00002 +FREESTREAM_TURB2LAMVISCRATIO = 0.009 +REF_DIMENSIONALIZATION= DIMENSIONAL +REYNOLDS_NUMBER= 15E6 + +% ---- IDEAL GAS, POLYTPOPIC, VAN DER WALLS AND PENG ROBINSOPN CNSTANTS ------ % +% +FLUID_MODEL= IDEAL_GAS +GAMMA_VALUE= 1.4 +GAS_CONSTANT= 287.058 +ACENTRIC_FACTOR= 0.035 +SPECIFIC_HEAT_CP= 1004.703 +THERMAL_EXPANSION_COEFF= 0.00347 +MOLECULAR_WEIGHT= 28.96 + +% --------------------------- VISCOSITY MODEL ---------------------------------% +% + +VISCOSITY_MODEL= SUTHERLAND +MU_REF= 1.716E-5 +MU_T_REF= 273.15 +SUTHERLAND_CONSTANT= 110.4 + +% ------------------------ THERMAL CONDUCTIVITY MODEL -------------------------% +% + +CONDUCTIVITY_MODEL= CONSTANT_PRANDTL +PRANDTL_LAM= 0.72 +TURBULENT_CONDUCTIVITY_MODEL= CONSTANT_PRANDTL_TURB +PRANDTL_TURB= 0.9 + +% ---------------------- REFERENCE VALUE DEFINITION ---------------------------% +% + +REF_ORIGIN_MOMENT_X = 0.00 +REF_ORIGIN_MOMENT_Y = 0.00 +REF_ORIGIN_MOMENT_Z = 0.00 +REF_LENGTH= 1.0 +REF_AREA= 1.0 + +% -------------------- BOUNDARY CONDITION DEFINITION --------------------------% +% + +MARKER_PLOTTING = ( wall ) +MARKER_SUPERSONIC_INLET= ( inlet, 300.3333 , 13753.90558 , 1737.082226 , 0.0 , 0.0 ) +MARKER_FAR= ( farfield ) +MARKER_SYM= ( symmetry ) +MARKER_SUPERSONIC_OUTLET= (outlet, 34384.76396) +MARKER_ISOTHERMAL= ( wall, 327.36297) + +% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% +% + +NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES +CFL_NUMBER= 0.5 +CFL_ADAPT= YES +CFL_ADAPT_PARAM= ( 0.1, 1.5, 0.5, 50.0 ) + +% --------- SLOPE LIMITER DEFINITION, DISSIPATION SENSOR DEFINITION -----------------% +% + +MUSCL_FLOW= YES +SLOPE_LIMITER_FLOW= VENKATAKRISHNAN_WANG +SLOPE_LIMITER_TURB= NONE +VENKAT_LIMITER_COEFF= 0.05 +JST_SENSOR_COEFF= (0.5, 0.02) + +% ------------------------ LINEAR SOLVER DEFINITION ---------------------------% +% + +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= LU_SGS +LINEAR_SOLVER_ERROR= 1E-6 +LINEAR_SOLVER_ITER= 5 + +% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% +% + +CONV_NUM_METHOD_FLOW= AUSM +TIME_DISCRE_FLOW= EULER_IMPLICIT + +% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------% +% + +CONV_NUM_METHOD_TURB= SCALAR_UPWIND +TIME_DISCRE_TURB= EULER_IMPLICIT + +% ------------------------- SCREEN/HISTORY VOLUME OUTPUT --------------------------% +% + +SCREEN_OUTPUT= (INNER_ITER, RMS_DENSITY, RMS_MOMENTUM-X, RMS_MOMENTUM-Y, RMS_ENERGY, RMS_TKE, RMS_DISSIPATION) +SCREEN_WRT_FREQ_INNER= 1 +SCREEN_WRT_FREQ_OUTER= 1 +SCREEN_WRT_FREQ_TIME= 1 +HISTORY_WRT_FREQ_INNER= 1 +HISTORY_WRT_FREQ_OUTER= 1 +HISTORY_WRT_FREQ_TIME= 1 +OUTPUT_WRT_FREQ= 1000 + +% ------------------------- INPUT/OUTPUT FILE INFORMATION --------------------------% +% + +MESH_FILENAME= mesh_flatplate_turb_137x97.su2 +MESH_FORMAT= SU2 +MESH_OUT_FILENAME= mesh_out.su2 +SOLUTION_FILENAME= restart_flow.dat +SOLUTION_ADJ_FILENAME= solution_adj.dat +OUTPUT_FILES= (RESTART, PARAVIEW, SURFACE_PARAVIEW, TECPLOT, SURFACE_TECPLOT, CSV, SURFACE_CSV ) +CONV_FILENAME= history +BREAKDOWN_FILENAME= forces_breakdown.dat +RESTART_FILENAME= restart_flow.dat +RESTART_ADJ_FILENAME= restart_adj.dat + +% ------------------------------- SOLVER CONTROL ------------------------------% +% + +ITER= 100 +OUTER_ITER= 1 +TIME_ITER= 100 +CONV_RESIDUAL_MINVAL= -14 +CONV_STARTITER= 10 +CONV_CAUCHY_ELEMS= 100 +CONV_CAUCHY_EPS= 1E-10 diff --git a/TestCases/rans/flatplate/turb_SST_flatplate_compressibility_Wilcox.cfg b/TestCases/rans/flatplate/turb_SST_flatplate_compressibility_Wilcox.cfg new file mode 100644 index 00000000000..bec9c121e3a --- /dev/null +++ b/TestCases/rans/flatplate/turb_SST_flatplate_compressibility_Wilcox.cfg @@ -0,0 +1,150 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% SU2 configuration file % +% Case description: Turbulent flow over flat plate(2DZPH) % +% Author: Sunoh. Kang % +% Institution: Pusan National University % +% Date: 2024.04.30 % +% File Version 8.0.1 "Harrier" % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% +% +SOLVER= RANS +KIND_TURB_MODEL= SST +SST_OPTIONS= V2003m, COMPRESSIBILITY-WILCOX +MATH_PROBLEM= DIRECT +RESTART_SOL= NO + +% ------------------------ COMPRESSIBLE FREE-STREAM DEFINITION ----------------% +% +MACH_NUMBER= 5.0 +AOA= 0.000 +INIT_OPTION= TD_CONDITIONS +FREESTREAM_OPTION= TEMPERATURE_FS +FREESTREAM_TEMPERATURE= 300.3333 +FREESTREAM_PRESSURE= 13753.90558 +FREESTREAM_TURBULENCEINTENSITY = 0.00002 +FREESTREAM_TURB2LAMVISCRATIO = 0.009 +REF_DIMENSIONALIZATION= DIMENSIONAL +REYNOLDS_NUMBER= 15E6 + +% ---- IDEAL GAS, POLYTPOPIC, VAN DER WALLS AND PENG ROBINSOPN CNSTANTS ------ % +% +FLUID_MODEL= IDEAL_GAS +GAMMA_VALUE= 1.4 +GAS_CONSTANT= 287.058 +ACENTRIC_FACTOR= 0.035 +SPECIFIC_HEAT_CP= 1004.703 +THERMAL_EXPANSION_COEFF= 0.00347 +MOLECULAR_WEIGHT= 28.96 + +% --------------------------- VISCOSITY MODEL ---------------------------------% +% + +VISCOSITY_MODEL= SUTHERLAND +MU_REF= 1.716E-5 +MU_T_REF= 273.15 +SUTHERLAND_CONSTANT= 110.4 + +% ------------------------ THERMAL CONDUCTIVITY MODEL -------------------------% +% + +CONDUCTIVITY_MODEL= CONSTANT_PRANDTL +PRANDTL_LAM= 0.72 +TURBULENT_CONDUCTIVITY_MODEL= CONSTANT_PRANDTL_TURB +PRANDTL_TURB= 0.9 + +% ---------------------- REFERENCE VALUE DEFINITION ---------------------------% +% + +REF_ORIGIN_MOMENT_X = 0.00 +REF_ORIGIN_MOMENT_Y = 0.00 +REF_ORIGIN_MOMENT_Z = 0.00 +REF_LENGTH= 1.0 +REF_AREA= 1.0 + +% -------------------- BOUNDARY CONDITION DEFINITION --------------------------% +% + +MARKER_PLOTTING = ( wall ) +MARKER_SUPERSONIC_INLET= ( inlet, 300.3333 , 13753.90558 , 1737.082226 , 0.0 , 0.0 ) +MARKER_FAR= ( farfield ) +MARKER_SYM= ( symmetry ) +MARKER_SUPERSONIC_OUTLET= (outlet, 34384.76396) +MARKER_ISOTHERMAL= ( wall, 327.36297) + +% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% +% + +NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES +CFL_NUMBER= 0.5 +CFL_ADAPT= YES +CFL_ADAPT_PARAM= ( 0.1, 1.5, 0.5, 50.0 ) + +% --------- SLOPE LIMITER DEFINITION, DISSIPATION SENSOR DEFINITION -----------------% +% + +MUSCL_FLOW= YES +SLOPE_LIMITER_FLOW= VENKATAKRISHNAN_WANG +SLOPE_LIMITER_TURB= NONE +VENKAT_LIMITER_COEFF= 0.05 +JST_SENSOR_COEFF= (0.5, 0.02) + +% ------------------------ LINEAR SOLVER DEFINITION ---------------------------% +% + +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= LU_SGS +LINEAR_SOLVER_ERROR= 1E-6 +LINEAR_SOLVER_ITER= 5 + +% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% +% + +CONV_NUM_METHOD_FLOW= AUSM +TIME_DISCRE_FLOW= EULER_IMPLICIT + +% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------% +% + +CONV_NUM_METHOD_TURB= SCALAR_UPWIND +TIME_DISCRE_TURB= EULER_IMPLICIT + +% ------------------------- SCREEN/HISTORY VOLUME OUTPUT --------------------------% +% + +SCREEN_OUTPUT= (INNER_ITER, RMS_DENSITY, RMS_MOMENTUM-X, RMS_MOMENTUM-Y, RMS_ENERGY, RMS_TKE, RMS_DISSIPATION) +SCREEN_WRT_FREQ_INNER= 1 +SCREEN_WRT_FREQ_OUTER= 1 +SCREEN_WRT_FREQ_TIME= 1 +HISTORY_WRT_FREQ_INNER= 1 +HISTORY_WRT_FREQ_OUTER= 1 +HISTORY_WRT_FREQ_TIME= 1 +OUTPUT_WRT_FREQ= 1000 + +% ------------------------- INPUT/OUTPUT FILE INFORMATION --------------------------% +% + +MESH_FILENAME= mesh_flatplate_turb_137x97.su2 +MESH_FORMAT= SU2 +MESH_OUT_FILENAME= mesh_out.su2 +SOLUTION_FILENAME= restart_flow.dat +SOLUTION_ADJ_FILENAME= solution_adj.dat +OUTPUT_FILES= (RESTART, PARAVIEW, SURFACE_PARAVIEW, TECPLOT, SURFACE_TECPLOT, CSV, SURFACE_CSV ) +CONV_FILENAME= history +BREAKDOWN_FILENAME= forces_breakdown.dat +RESTART_FILENAME= restart_flow.dat +RESTART_ADJ_FILENAME= restart_adj.dat + +% ------------------------------- SOLVER CONTROL ------------------------------% +% + +ITER= 100 +OUTER_ITER= 1 +TIME_ITER= 100 +CONV_RESIDUAL_MINVAL= -14 +CONV_STARTITER= 10 +CONV_CAUCHY_ELEMS= 100 +CONV_CAUCHY_EPS= 1E-10 diff --git a/TestCases/rotating/naca0012/rot_NACA0012.cfg b/TestCases/rotating/naca0012/rot_NACA0012.cfg index a103c5fbcf6..35c932c33b5 100644 --- a/TestCases/rotating/naca0012/rot_NACA0012.cfg +++ b/TestCases/rotating/naca0012/rot_NACA0012.cfg @@ -131,7 +131,7 @@ VOLUME_ADJ_FILENAME= adjoint GRAD_OBJFUNC_FILENAME= of_grad.dat SURFACE_FILENAME= surface_flow SURFACE_ADJ_FILENAME= surface_adjoint -OUTPUT_WRT_FREQ= 1 +OUTPUT_WRT_FREQ= 100 % --------------------- OPTIMAL SHAPE DESIGN DEFINITION -----------------------% % diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index fcdacb032a7..080b41053b7 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -64,7 +64,7 @@ def main(): invwedge.cfg_dir = "nonequilibrium/invwedge" invwedge.cfg_file = "invwedge_ausm.cfg" invwedge.test_iter = 10 - invwedge.test_vals = [-1.046323, -1.571086, -18.301251, -18.628639, -18.574676, 2.271778, 1.875687, 5.315769, 0.870008] + invwedge.test_vals = [-1.073699, -1.598462, -18.299911, -18.627322, -18.573334, 2.241760, 1.868575, 5.286072, 0.843741] invwedge.test_vals_aarch64 = [-1.046323, -1.571086, -18.301361, -18.628744, -18.574788, 2.271778, 1.875687, 5.315769, 0.870008] test_list.append(invwedge) @@ -73,7 +73,7 @@ def main(): visc_cone.cfg_dir = "nonequilibrium/visc_wedge" visc_cone.cfg_file = "axi_visccone.cfg" visc_cone.test_iter = 10 - visc_cone.test_vals = [-5.215236, -5.739371, -20.556662, -20.517023, -20.436970, 1.262783, -3.205463, -0.015695, 0.093205, 32656.000000] + visc_cone.test_vals = [-5.215239, -5.739373, -20.560910, -20.517094, -20.406632, 1.262779, -3.205484, -0.015695, 0.093205, 32641.000000] visc_cone.test_vals_aarch64 = [-5.215229, -5.739368, -20.556662, -20.517022, -20.437459, 1.262784, -3.205455, -0.015696, 0.093207, 32656.000000] test_list.append(visc_cone) @@ -93,7 +93,7 @@ def main(): channel.cfg_dir = "euler/channel" channel.cfg_file = "inv_channel_RK.cfg" channel.test_iter = 10 - channel.test_vals = [-2.475872, 3.046370, -0.203974, 0.036018] + channel.test_vals = [-2.691364, 2.781660, -0.009405, 0.011874] test_list.append(channel) # NACA0012 @@ -101,7 +101,7 @@ def main(): naca0012.cfg_dir = "euler/naca0012" naca0012.cfg_file = "inv_NACA0012_Roe.cfg" naca0012.test_iter = 20 - naca0012.test_vals = [-4.023999, -3.515034, 0.339426, 0.022217] + naca0012.test_vals = [-4.444941, -3.941038, 0.318998, 0.022365] test_list.append(naca0012) # Supersonic wedge @@ -109,7 +109,7 @@ def main(): wedge.cfg_dir = "euler/wedge" wedge.cfg_file = "inv_wedge_HLLC.cfg" wedge.test_iter = 20 - wedge.test_vals = [-0.942862, 4.784581, -0.208106, 0.036665] + wedge.test_vals = [-1.368091, 4.302736, -0.243433, 0.042906] test_list.append(wedge) # ONERA M6 Wing @@ -117,7 +117,7 @@ def main(): oneram6.cfg_dir = "euler/oneram6" oneram6.cfg_file = "inv_ONERAM6.cfg" oneram6.test_iter = 10 - oneram6.test_vals = [-9.279396, -8.697739, 0.281703, 0.011821] + oneram6.test_vals = [-11.510606, -10.980023, 0.280800, 0.008623] oneram6.timeout = 9600 test_list.append(oneram6) @@ -126,7 +126,7 @@ def main(): fixedCL_naca0012.cfg_dir = "fixed_cl/naca0012" fixedCL_naca0012.cfg_file = "inv_NACA0012.cfg" fixedCL_naca0012.test_iter = 10 - fixedCL_naca0012.test_vals = [-7.382410, -1.879887, 0.300000, 0.019471] + fixedCL_naca0012.test_vals = [-3.848561, 1.688373, 0.301145, 0.019489] test_list.append(fixedCL_naca0012) # Polar sweep of the inviscid NACA0012 @@ -135,8 +135,8 @@ def main(): polar_naca0012.cfg_file = "inv_NACA0012.cfg" polar_naca0012.polar = True polar_naca0012.test_iter = 10 - polar_naca0012.test_vals = [-1.243326, 4.224483, 0.016432, 0.016145] - polar_naca0012.test_vals_aarch64 = [-1.811046, 3.612379, 0.012330, 0.009194] + polar_naca0012.test_vals = [-1.067859, 4.397227, 0.000060, 0.031134] + polar_naca0012.test_vals_aarch64 = [-1.063447, 4.401847, 0.000291, 0.031696] polar_naca0012.command = TestCase.Command(exec = "compute_polar.py", param = "-n 1 -i 11") # flaky test on arm64 polar_naca0012.enabled_on_cpu_arch = ["x86_64"] @@ -147,7 +147,7 @@ def main(): bluntbody.cfg_dir = "euler/bluntbody" bluntbody.cfg_file = "blunt.cfg" bluntbody.test_iter = 20 - bluntbody.test_vals = [0.540009, 6.916653, -0.000000, 1.868975] + bluntbody.test_vals = [0.493297, 6.857373, -0.000026, 1.791394] test_list.append(bluntbody) ########################## @@ -165,8 +165,8 @@ def main(): flatplate = TestCase('flatplate') flatplate.cfg_dir = "navierstokes/flatplate" flatplate.cfg_file = "lam_flatplate.cfg" - flatplate.test_iter = 100 - flatplate.test_vals = [-9.856258, -4.371983, 0.001112, 0.036277, 2.361500, -2.325300, -2.279500, -2.279500] + flatplate.test_iter = 20 + flatplate.test_vals = [-5.122306, 0.357174, 0.001311, 0.028230, 2.361600, -2.333300, -2.629100, -2.629100] test_list.append(flatplate) # Laminar cylinder (steady) @@ -174,7 +174,7 @@ def main(): cylinder.cfg_dir = "navierstokes/cylinder" cylinder.cfg_file = "lam_cylinder.cfg" cylinder.test_iter = 25 - cylinder.test_vals = [-6.765430, -1.297426, 0.019508, 0.310015, 0.123250] + cylinder.test_vals = [-8.363068, -2.882163, -0.017777, 1.607222, -0.010064] test_list.append(cylinder) # Laminar cylinder (low Mach correction) @@ -182,7 +182,7 @@ def main(): cylinder_lowmach.cfg_dir = "navierstokes/cylinder" cylinder_lowmach.cfg_file = "cylinder_lowmach.cfg" cylinder_lowmach.test_iter = 25 - cylinder_lowmach.test_vals = [-6.850123, -1.388088, -0.056090, 108.140176, 0.007983] + cylinder_lowmach.test_vals = [-6.830989, -1.368842, -0.143838, 73.962440, 0.002454] test_list.append(cylinder_lowmach) # 2D Poiseuille flow (body force driven with periodic inlet / outlet) @@ -198,8 +198,8 @@ def main(): poiseuille_profile.cfg_dir = "navierstokes/poiseuille" poiseuille_profile.cfg_file = "profile_poiseuille.cfg" poiseuille_profile.test_iter = 10 - poiseuille_profile.test_vals = [-12.494681, -7.711642, -0.000000, 2.085796] - poiseuille_profile.test_vals_aarch64 = [-12.494684, -7.711379, -0.000000, 2.085796] #last 4 columns + poiseuille_profile.test_vals = [-12.485974, -7.612341, -0.000000, 2.085796] + poiseuille_profile.test_vals_aarch64 = [-12.485974, -7.612341, -0.000000, 2.085796] test_list.append(poiseuille_profile) ########################## @@ -242,7 +242,7 @@ def main(): turb_flatplate.cfg_dir = "rans/flatplate" turb_flatplate.cfg_file = "turb_SA_flatplate.cfg" turb_flatplate.test_iter = 20 - turb_flatplate.test_vals = [-4.157358, -6.736289, -0.176258, 0.057431] + turb_flatplate.test_vals = [-4.156553, -6.736064, -0.176184, 0.057478] test_list.append(turb_flatplate) # FLAT PLATE, WALL FUNCTIONS, COMPRESSIBLE SST @@ -250,7 +250,7 @@ def main(): turb_wallfunction_flatplate_sst.cfg_dir = "wallfunctions/flatplate/compressible_SST" turb_wallfunction_flatplate_sst.cfg_file = "turb_SST_flatplate.cfg" turb_wallfunction_flatplate_sst.test_iter = 10 - turb_wallfunction_flatplate_sst.test_vals = [-4.181412, -1.864638, -1.966031, 1.259921, -1.487159, 1.544166, 10.000000, -2.130777, 0.073950, 0.002971] + turb_wallfunction_flatplate_sst.test_vals = [-4.177397, -1.880811, -1.943377, 1.263787, -1.254740, 1.538892, 10.000000, -2.097623, 0.074673, 0.002932] test_list.append(turb_wallfunction_flatplate_sst) # FLAT PLATE, WALL FUNCTIONS, COMPRESSIBLE SA @@ -258,7 +258,7 @@ def main(): turb_wallfunction_flatplate_sa.cfg_dir = "wallfunctions/flatplate/compressible_SA" turb_wallfunction_flatplate_sa.cfg_file = "turb_SA_flatplate.cfg" turb_wallfunction_flatplate_sa.test_iter = 10 - turb_wallfunction_flatplate_sa.test_vals = [-4.435719, -2.044696, -2.114266, 0.980115, -5.393813, 10.000000, -1.589802, 0.069744, 0.002686] + turb_wallfunction_flatplate_sa.test_vals = [-4.414833, -2.031596, -2.120806, 1.007586, -5.386444, 10.000000, -1.635112, 0.068983, 0.002640] test_list.append(turb_wallfunction_flatplate_sa) # ONERA M6 Wing @@ -266,7 +266,7 @@ def main(): turb_oneram6.cfg_dir = "rans/oneram6" turb_oneram6.cfg_file = "turb_ONERAM6.cfg" turb_oneram6.test_iter = 10 - turb_oneram6.test_vals = [-2.388841, -6.689427, 0.230321, 0.157640, -32539.000000] + turb_oneram6.test_vals = [-2.392867, -6.689823, 0.230746, 0.158811, -33786.000000] turb_oneram6.timeout = 3200 test_list.append(turb_oneram6) @@ -335,7 +335,7 @@ def main(): axi_rans_air_nozzle_restart.cfg_dir = "axisymmetric_rans/air_nozzle" axi_rans_air_nozzle_restart.cfg_file = "air_nozzle_restart.cfg" axi_rans_air_nozzle_restart.test_iter = 10 - axi_rans_air_nozzle_restart.test_vals = [-12.063377, -7.005051, -8.705733, -4.036815, -2019.8] + axi_rans_air_nozzle_restart.test_vals = [-12.151701, -6.605756, -9.188910, -4.516059, -2019.700000] axi_rans_air_nozzle_restart.test_vals_aarch64 = [-12.063354, -7.004772, -8.705740, -4.036824, -2019.800000] axi_rans_air_nozzle_restart.tol = 0.0001 test_list.append(axi_rans_air_nozzle_restart) @@ -371,7 +371,7 @@ def main(): inc_euler_naca0012.cfg_dir = "incomp_euler/naca0012" inc_euler_naca0012.cfg_file = "incomp_NACA0012.cfg" inc_euler_naca0012.test_iter = 20 - inc_euler_naca0012.test_vals = [-4.858287, -3.810487, 0.491850, 0.007002] + inc_euler_naca0012.test_vals = [-7.128795, -6.375403, 0.531980, 0.008467] test_list.append(inc_euler_naca0012) # C-D nozzle with pressure inlet and mass flow outlet @@ -379,7 +379,7 @@ def main(): inc_nozzle.cfg_dir = "incomp_euler/nozzle" inc_nozzle.cfg_file = "inv_nozzle.cfg" inc_nozzle.test_iter = 20 - inc_nozzle.test_vals = [-5.971283, -4.911145, -0.000201, 0.121631] + inc_nozzle.test_vals = [-6.363763, -5.566528, -0.005348, 0.126610] test_list.append(inc_nozzle) ############################# @@ -422,7 +422,7 @@ def main(): inc_lam_bend.cfg_dir = "incomp_navierstokes/bend" inc_lam_bend.cfg_file = "lam_bend.cfg" inc_lam_bend.test_iter = 10 - inc_lam_bend.test_vals = [-3.455147, -3.082194, -0.018579, 1.169947] + inc_lam_bend.test_vals = [-3.558881, -3.234611, -0.016265, 1.024052] test_list.append(inc_lam_bend) ############################ @@ -457,7 +457,7 @@ def main(): inc_turb_wallfunction_flatplate_sst.cfg_dir = "wallfunctions/flatplate/incompressible_SST" inc_turb_wallfunction_flatplate_sst.cfg_file = "turb_SST_flatplate.cfg" inc_turb_wallfunction_flatplate_sst.test_iter = 10 - inc_turb_wallfunction_flatplate_sst.test_vals = [-6.560775, -5.700721, -6.304284, -4.230488, -7.179831, -1.956057, 10.000000, -2.918240, 0.000887, 0.003680, 0.518450] + inc_turb_wallfunction_flatplate_sst.test_vals = [-6.507362, -5.693894, -6.434063, -4.223774, -7.008049, -1.954102, 10.000000, -3.047554, 0.001081, 0.003644, 0.618140] test_list.append(inc_turb_wallfunction_flatplate_sst) # FLAT PLATE, WALL FUNCTIONS, INCOMPRESSIBLE SA @@ -465,7 +465,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.561303, -5.718581, -6.306403, -4.230225, -9.586904, 10.000000, -2.927392, 0.000858, 0.003792] + inc_turb_wallfunction_flatplate_sa.test_vals = [-6.521493, -5.710967, -6.424313, -4.224459, -9.586823, 10.000000, -3.054800, 0.000999, 0.003759] test_list.append(inc_turb_wallfunction_flatplate_sa) #################### @@ -558,7 +558,7 @@ def main(): schubauer_klebanoff_transition.cfg_dir = "transition/Schubauer_Klebanoff" schubauer_klebanoff_transition.cfg_file = "transitional_BC_model_ConfigFile.cfg" schubauer_klebanoff_transition.test_iter = 10 - schubauer_klebanoff_transition.test_vals = [-8.029786, -13.240213, 0.000053, 0.007986] + schubauer_klebanoff_transition.test_vals = [-8.087369, -13.241874, 0.000055, 0.007992] test_list.append(schubauer_klebanoff_transition) ##################################### @@ -577,7 +577,7 @@ def main(): contadj_naca0012.cfg_dir = "cont_adj_euler/naca0012" contadj_naca0012.cfg_file = "inv_NACA0012.cfg" contadj_naca0012.test_iter = 5 - contadj_naca0012.test_vals = [-9.289565, -14.563859, 0.300920, 0.019552] + contadj_naca0012.test_vals = [-9.748339, -15.067997, -0.726250, 0.020280] contadj_naca0012.tol = 0.001 test_list.append(contadj_naca0012) @@ -586,7 +586,7 @@ def main(): contadj_oneram6.cfg_dir = "cont_adj_euler/oneram6" contadj_oneram6.cfg_file = "inv_ONERAM6.cfg" contadj_oneram6.test_iter = 10 - contadj_oneram6.test_vals = [-12.133160, -12.706697, 0.685900, 0.007594] + contadj_oneram6.test_vals = [-12.034680, -12.592674, -1.086100, 0.007556] test_list.append(contadj_oneram6) # Inviscid WEDGE: tests averaged outflow total pressure adjoint @@ -594,7 +594,7 @@ def main(): contadj_wedge.cfg_dir = "cont_adj_euler/wedge" contadj_wedge.cfg_file = "inv_wedge_ROE.cfg" contadj_wedge.test_iter = 10 - contadj_wedge.test_vals = [2.872691, -2.755572, 853000.000000, 0.000000] + contadj_wedge.test_vals = [2.872064, -2.756210, 1010800.000000, 0.000000] test_list.append(contadj_wedge) # Inviscid fixed CL NACA0012 @@ -602,7 +602,7 @@ def main(): contadj_fixedCL_naca0012.cfg_dir = "fixed_cl/naca0012" contadj_fixedCL_naca0012.cfg_file = "inv_NACA0012_ContAdj.cfg" contadj_fixedCL_naca0012.test_iter = 100 - contadj_fixedCL_naca0012.test_vals = [0.293213, -5.201710, 0.360590, -0.000022] + contadj_fixedCL_naca0012.test_vals = [0.755070, -4.794630, -0.525290, -0.000238] test_list.append(contadj_fixedCL_naca0012) ################################### @@ -725,7 +725,7 @@ def main(): harmonic_balance.cfg_dir = "harmonic_balance" harmonic_balance.cfg_file = "HB.cfg" harmonic_balance.test_iter = 25 - harmonic_balance.test_vals = [-1.589739, 0.790169, 0.937053, 3.922579] + harmonic_balance.test_vals = [-1.554985, 0.831796, 0.935729, 3.960210] test_list.append(harmonic_balance) # Turbulent pitching NACA 64a010 airfoil @@ -745,7 +745,7 @@ def main(): rot_naca0012.cfg_dir = "rotating/naca0012" rot_naca0012.cfg_file = "rot_NACA0012.cfg" rot_naca0012.test_iter = 25 - rot_naca0012.test_vals = [-2.688979, 2.857521, -0.079219, 0.002135] + rot_naca0012.test_vals = [-2.738864, 2.811401, -0.080279, 0.002160] test_list.append(rot_naca0012) # Lid-driven cavity @@ -753,7 +753,7 @@ def main(): cavity.cfg_dir = "moving_wall/cavity" cavity.cfg_file = "lam_cavity.cfg" cavity.test_iter = 25 - cavity.test_vals = [ -5.627868, -0.164405, 0.053283, 2.545817] + cavity.test_vals = [-5.627868, -0.164405, 0.053283, 2.545817] test_list.append(cavity) # Spinning cylinder @@ -782,7 +782,7 @@ def main(): sine_gust.cfg_dir = "gust" sine_gust.cfg_file = "inv_gust_NACA0012.cfg" sine_gust.test_iter = 5 - sine_gust.test_vals = [-1.977520, 3.481804, -0.012277, -0.007309] + sine_gust.test_vals = [-1.977514, 3.481817, -0.010465, -0.007859] sine_gust.unsteady = True test_list.append(sine_gust) @@ -791,7 +791,7 @@ def main(): aeroelastic.cfg_dir = "aeroelastic" aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg" aeroelastic.test_iter = 2 - aeroelastic.test_vals = [0.074836, 0.033102, -0.001650, -0.000127] + aeroelastic.test_vals = [0.074291, 0.027620, -0.001641, -0.000128] aeroelastic.unsteady = True test_list.append(aeroelastic) @@ -800,7 +800,7 @@ def main(): ddes_flatplate.cfg_dir = "ddes/flatplate" ddes_flatplate.cfg_file = "ddes_flatplate.cfg" ddes_flatplate.test_iter = 10 - ddes_flatplate.test_vals = [-2.714757, -5.882779, -0.215005, 0.023783, -618.130000] + ddes_flatplate.test_vals = [-2.714785, -5.882680, -0.215041, 0.023758, -617.450000] ddes_flatplate.unsteady = True test_list.append(ddes_flatplate) @@ -818,7 +818,7 @@ def main(): unst_deforming_naca0012.cfg_dir = "disc_adj_euler/naca0012_pitching_def" unst_deforming_naca0012.cfg_file = "inv_NACA0012_pitching_deform.cfg" unst_deforming_naca0012.test_iter = 5 - unst_deforming_naca0012.test_vals = [-3.665129, -3.793590, -3.716505, -3.148308] + unst_deforming_naca0012.test_vals = [-3.665187, -3.793258, -3.716457, -3.148323] unst_deforming_naca0012.unsteady = True test_list.append(unst_deforming_naca0012) @@ -839,7 +839,7 @@ def main(): edge_VW.cfg_dir = "nicf/edge" edge_VW.cfg_file = "edge_VW.cfg" edge_VW.test_iter = 20 - edge_VW.test_vals = [-0.711552, 5.490479, -0.000975, 0.000000] + edge_VW.test_vals = [-0.768929, 5.433202, -0.000628, 0.000000] test_list.append(edge_VW) # Rarefaction shock wave edge_PPR @@ -847,7 +847,7 @@ def main(): edge_PPR.cfg_dir = "nicf/edge" edge_PPR.cfg_file = "edge_PPR.cfg" edge_PPR.test_iter = 20 - edge_PPR.test_vals = [-1.670439, 4.522842, 0.001027, 0.000000] + edge_PPR.test_vals = [-2.017812, 4.174560, 0.000019, 0.000000] test_list.append(edge_PPR) @@ -868,7 +868,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-6.614623, -3.001323, -14.336147, -8.776081, -11.382919, -5.852327, 73273, 73273, 0.019884, 82.491] + Jones_tc_restart.test_vals = [-6.614623, -3.001323, -14.336147, -8.776081, -11.382919, -5.852327, 73273.000000, 73273.000000, 0.019884, 82.491000] test_list.append(Jones_tc_restart) # 2D axial stage @@ -876,7 +876,7 @@ def main(): axial_stage2D.cfg_dir = "turbomachinery/axial_stage_2D" axial_stage2D.cfg_file = "Axial_stage2D.cfg" axial_stage2D.test_iter = 20 - axial_stage2D.test_vals = [0.983751, 1.534480, -2.888520, 2.606773, -2.418421, 3.087187, 106380, 106380, 5.7325, 64.711] + axial_stage2D.test_vals = [0.983751, 1.534480, -2.888520, 2.606773, -2.418421, 3.087187, 106380.000000, 106380.000000, 5.732500, 64.711000] axial_stage2D.test_vals_aarch64 = [0.983751, 1.534480, -2.888520, 2.606773, -2.418421, 3.087187, 106380, 106380, 5.7325, 64.711] test_list.append(axial_stage2D) @@ -885,7 +885,7 @@ def main(): transonic_stator_restart.cfg_dir = "turbomachinery/transonic_stator_2D" transonic_stator_restart.cfg_file = "transonic_stator_restart.cfg" transonic_stator_restart.test_iter = 20 - transonic_stator_restart.test_vals = [-5.008547, -3.102420, -2.752033, 1.091152, -3.543849, 2.169844, -471630, 94.866, -0.035806] + transonic_stator_restart.test_vals = [-5.008547, -3.102420, -2.752033, 1.091152, -3.543849, 2.169844, -471630.000000, 94.866000, -0.035806] transonic_stator_restart.test_vals_aarch64 = [-5.008547, -3.102420, -2.752033, 1.091152, -3.543849, 2.169844, -471630, 94.866, -0.035806] test_list.append(transonic_stator_restart) @@ -906,7 +906,7 @@ def main(): uniform_flow.cfg_dir = "sliding_interface/uniform_flow" uniform_flow.cfg_file = "uniform_NN.cfg" uniform_flow.test_iter = 2 - uniform_flow.test_vals = [2.000000, 0.000000, -0.205134, -13.251542] + uniform_flow.test_vals = [2.000000, 0.000000, -0.202697, -13.249572] uniform_flow.test_vals_aarch64 = [2.000000, 0.000000, -0.205134, -13.250720] #last 4 columns uniform_flow.tol = 0.000001 uniform_flow.unsteady = True @@ -918,7 +918,7 @@ def main(): channel_2D.cfg_dir = "sliding_interface/channel_2D" channel_2D.cfg_file = "channel_2D_WA.cfg" channel_2D.test_iter = 2 - channel_2D.test_vals = [2.000000, 0.000000, 0.397995, 0.352789, 0.405474] + channel_2D.test_vals = [2.000000, 0.000000, 0.419778, 0.352185, 0.404395] channel_2D.test_vals_aarch64 = [2.000000, 0.000000, 0.398053, 0.352788, 0.405474] #last 5 columns channel_2D.timeout = 100 channel_2D.unsteady = True @@ -930,7 +930,7 @@ def main(): channel_3D.cfg_dir = "sliding_interface/channel_3D" channel_3D.cfg_file = "channel_3D_WA.cfg" channel_3D.test_iter = 1 - channel_3D.test_vals = [1.000000, 0.000000, 0.661408, 0.769988, 0.696033] + channel_3D.test_vals = [1.000000, 0.000000, 0.657678, 0.767752, 0.692208] channel_3D.test_vals_aarch64 = [1.000000, 0.000000, 0.661408, 0.769902, 0.695663] #last 5 columns channel_3D.unsteady = True channel_3D.multizone = True @@ -941,7 +941,7 @@ def main(): pipe.cfg_dir = "sliding_interface/pipe" pipe.cfg_file = "pipe_NN.cfg" pipe.test_iter = 2 - pipe.test_vals = [0.491954, 0.677756, 0.963981, 1.006936] + pipe.test_vals = [0.481390, 0.648695, 0.982990, 1.018349] pipe.unsteady = True pipe.multizone = True test_list.append(pipe) @@ -951,7 +951,7 @@ def main(): rotating_cylinders.cfg_dir = "sliding_interface/rotating_cylinders" rotating_cylinders.cfg_file = "rot_cylinders_WA.cfg" rotating_cylinders.test_iter = 3 - rotating_cylinders.test_vals = [3.000000, 0.000000, 0.777574, 1.134794, 1.224127] + rotating_cylinders.test_vals = [3.000000, 0.000000, 0.719778, 1.111044, 1.154068] rotating_cylinders.unsteady = True rotating_cylinders.multizone = True test_list.append(rotating_cylinders) @@ -961,7 +961,7 @@ def main(): supersonic_vortex_shedding.cfg_dir = "sliding_interface/supersonic_vortex_shedding" supersonic_vortex_shedding.cfg_file = "sup_vor_shed_WA.cfg" supersonic_vortex_shedding.test_iter = 5 - supersonic_vortex_shedding.test_vals = [5.000000, 0.000000, 1.214359, 1.663910] + supersonic_vortex_shedding.test_vals = [5.000000, 0.000000, 1.207949, 1.036092] supersonic_vortex_shedding.unsteady = True supersonic_vortex_shedding.multizone = True test_list.append(supersonic_vortex_shedding) @@ -1039,7 +1039,7 @@ def main(): fsi2d.cfg_dir = "fea_fsi/WallChannel_2d" fsi2d.cfg_file = "configFSI.cfg" fsi2d.test_iter = 4 - fsi2d.test_vals = [4.000000, 0.000000, -3.743214, -4.133482] + fsi2d.test_vals = [4.000000, 0.000000, -3.729228, -4.153949] fsi2d.multizone = True fsi2d.unsteady = True test_list.append(fsi2d) @@ -1049,7 +1049,7 @@ def main(): stat_fsi.cfg_dir = "fea_fsi/stat_fsi" stat_fsi.cfg_file = "config.cfg" stat_fsi.test_iter = 7 - stat_fsi.test_vals = [-3.326934, -4.981505, 0.000000, 7.000000] + stat_fsi.test_vals = [-3.345064, -4.996078, 0.000000, 7.000000] stat_fsi.multizone = True test_list.append(stat_fsi) @@ -1058,7 +1058,7 @@ def main(): stat_fsi_restart.cfg_dir = "fea_fsi/stat_fsi" stat_fsi_restart.cfg_file = "config_restart.cfg" stat_fsi_restart.test_iter = 1 - stat_fsi_restart.test_vals = [-3.407486, -4.339837, 0.000000, 27.000000] + stat_fsi_restart.test_vals = [-3.404628, -4.288921, 0.000000, 27.000000] stat_fsi_restart.multizone = True test_list.append(stat_fsi_restart) @@ -1067,7 +1067,7 @@ def main(): dyn_fsi.cfg_dir = "fea_fsi/dyn_fsi" dyn_fsi.cfg_file = "config.cfg" dyn_fsi.test_iter = 4 - dyn_fsi.test_vals = [-4.355809, -4.060588, 0.000000, 87.000000] + dyn_fsi.test_vals = [-4.330444, -4.058003, 0.000000, 86.000000] dyn_fsi.test_vals_aarch64 = [-4.355809, -4.060588, 0.000000, 86.000000] #last 4 columns dyn_fsi.multizone = True dyn_fsi.unsteady = True @@ -1079,7 +1079,7 @@ def main(): airfoilRBF.cfg_file = "config.cfg" airfoilRBF.test_iter = 1 - airfoilRBF.test_vals = [1.000000, -2.786186, -4.977944] + airfoilRBF.test_vals = [1.000000, -2.581853, -5.085822] airfoilRBF.tol = 0.0001 airfoilRBF.multizone = True test_list.append(airfoilRBF) @@ -1210,7 +1210,7 @@ def main(): naca0012_geo = TestCase('naca0012_geo') naca0012_geo.cfg_dir = "optimization_euler/steady_naca0012" naca0012_geo.cfg_file = "inv_NACA0012_adv.cfg" - naca0012_geo.test_vals = [1.0000, 62.0455, 0.120011, 0.0000] #chord, LE radius, ToC, Alpha + naca0012_geo.test_vals = [1.000000, 62.045500, 0.120011, 0.000000] naca0012_geo.command = TestCase.Command(exec = "SU2_GEO") naca0012_geo.timeout = 1600 naca0012_geo.tol = 0.00001 @@ -1226,7 +1226,7 @@ def main(): intersect_def.cfg_dir = "deformation/intersection_prevention" intersect_def.cfg_file = "def_intersect.cfg" intersect_def.test_iter = 10 - intersect_def.test_vals = [0.000112] #residual + intersect_def.test_vals = [0.000112] intersect_def.command = TestCase.Command(exec = "SU2_DEF") intersect_def.timeout = 1600 intersect_def.tol = 1e-04 @@ -1239,10 +1239,10 @@ def main(): naca0012_def.cfg_dir = "deformation/naca0012" naca0012_def.cfg_file = "def_NACA0012.cfg" naca0012_def.test_iter = 10 - naca0012_def.test_vals = [0.00344658] #residual + naca0012_def.test_vals = [0.0034470] naca0012_def.command = TestCase.Command(exec = "SU2_DEF") naca0012_def.timeout = 1600 - naca0012_def.tol = 1e-08 + naca0012_def.tol = 1e-06 pass_list.append(naca0012_def.run_def(args.tsan, args.asan)) test_list.append(naca0012_def) @@ -1252,10 +1252,10 @@ def main(): naca0012_def_file.cfg_dir = "deformation/naca0012" naca0012_def_file.cfg_file = "surface_file_NACA0012.cfg" naca0012_def_file.test_iter = 10 - naca0012_def_file.test_vals = [0.00344658] #residual + naca0012_def_file.test_vals = [0.0034470] naca0012_def_file.command = TestCase.Command(exec = "SU2_DEF") naca0012_def_file.timeout = 1600 - naca0012_def_file.tol = 1e-8 + naca0012_def_file.tol = 1e-6 pass_list.append(naca0012_def_file.run_def(args.tsan, args.asan)) test_list.append(naca0012_def_file) @@ -1265,10 +1265,10 @@ def main(): rae2822_def.cfg_dir = "deformation/rae2822" rae2822_def.cfg_file = "def_RAE2822.cfg" rae2822_def.test_iter = 10 - rae2822_def.test_vals = [7.94218e-09] #residual + rae2822_def.test_vals = [0.0000000] rae2822_def.command = TestCase.Command(exec = "SU2_DEF") rae2822_def.timeout = 1600 - rae2822_def.tol = 1e-13 + rae2822_def.tol = 1e-06 pass_list.append(rae2822_def.run_def(args.tsan, args.asan)) test_list.append(rae2822_def) @@ -1278,10 +1278,10 @@ def main(): naca4412_def.cfg_dir = "deformation/naca4412" naca4412_def.cfg_file = "def_NACA4412.cfg" naca4412_def.test_iter = 10 - naca4412_def.test_vals = [8.855370e-13] #residual + naca4412_def.test_vals = [0.0000000] naca4412_def.command = TestCase.Command(exec = "SU2_DEF") naca4412_def.timeout = 1600 - naca4412_def.tol = 1e-12 + naca4412_def.tol = 1e-06 pass_list.append(naca4412_def.run_def(args.tsan, args.asan)) test_list.append(naca4412_def) @@ -1291,10 +1291,10 @@ def main(): brick_tets_def.cfg_dir = "deformation/brick_tets" brick_tets_def.cfg_file = "def_brick_tets.cfg" brick_tets_def.test_iter = 10 - brick_tets_def.test_vals = [8.973010e-04] #residual + brick_tets_def.test_vals = [0.0008970] brick_tets_def.command = TestCase.Command(exec = "SU2_DEF") brick_tets_def.timeout = 1600 - brick_tets_def.tol = 1e-09 + brick_tets_def.tol = 1e-06 pass_list.append(brick_tets_def.run_def(args.tsan, args.asan)) test_list.append(brick_tets_def) @@ -1304,10 +1304,10 @@ def main(): brick_hex_def.cfg_dir = "deformation/brick_hex" brick_hex_def.cfg_file = "def_brick_hex.cfg" brick_hex_def.test_iter = 10 - brick_hex_def.test_vals = [2.082100e-04] #residual + brick_hex_def.test_vals = [0.0002080] brick_hex_def.command = TestCase.Command(exec = "SU2_DEF") brick_hex_def.timeout = 1600 - brick_hex_def.tol = 1e-09 + brick_hex_def.tol = 1e-06 pass_list.append(brick_hex_def.run_def(args.tsan, args.asan)) test_list.append(brick_hex_def) @@ -1317,10 +1317,10 @@ def main(): brick_pyra_def.cfg_dir = "deformation/brick_pyra" brick_pyra_def.cfg_file = "def_brick_pyra.cfg" brick_pyra_def.test_iter = 10 - brick_pyra_def.test_vals = [0.00150063] #residual + brick_pyra_def.test_vals = [0.0015010] brick_pyra_def.command = TestCase.Command(exec = "SU2_DEF") brick_pyra_def.timeout = 1600 - brick_pyra_def.tol = 1e-08 + brick_pyra_def.tol = 1e-06 pass_list.append(brick_pyra_def.run_def(args.tsan, args.asan)) test_list.append(brick_pyra_def) @@ -1330,10 +1330,10 @@ def main(): brick_prism_def.cfg_dir = "deformation/brick_prism" brick_prism_def.cfg_file = "def_brick_prism.cfg" brick_prism_def.test_iter = 10 - brick_prism_def.test_vals = [0.00212069] #residual + brick_prism_def.test_vals = [0.0021210] brick_prism_def.command = TestCase.Command(exec = "SU2_DEF") brick_prism_def.timeout = 1600 - brick_prism_def.tol = 1e-08 + brick_prism_def.tol = 1e-06 pass_list.append(brick_prism_def.run_def(args.tsan, args.asan)) test_list.append(brick_prism_def) @@ -1343,10 +1343,10 @@ def main(): brick_prism_rans_def.cfg_dir = "deformation/brick_prism_rans" brick_prism_rans_def.cfg_file = "def_brick_prism_rans.cfg" brick_prism_rans_def.test_iter = 10 - brick_prism_rans_def.test_vals = [4.8066e-08] #residual + brick_prism_rans_def.test_vals = [0.0000000] brick_prism_rans_def.command = TestCase.Command(exec = "SU2_DEF") brick_prism_rans_def.timeout = 1600 - brick_prism_rans_def.tol = 1e-12 + brick_prism_rans_def.tol = 1e-06 pass_list.append(brick_prism_rans_def.run_def(args.tsan, args.asan)) test_list.append(brick_prism_rans_def) @@ -1356,10 +1356,10 @@ def main(): brick_hex_rans_def.cfg_dir = "deformation/brick_hex_rans" brick_hex_rans_def.cfg_file = "def_brick_hex_rans.cfg" brick_hex_rans_def.test_iter = 10 - brick_hex_rans_def.test_vals = [2.260750e-07] #residual + brick_hex_rans_def.test_vals = [0.0000000] brick_hex_rans_def.command = TestCase.Command(exec = "SU2_DEF") brick_hex_rans_def.timeout = 1600 - brick_hex_rans_def.tol = 1e-12 + brick_hex_rans_def.tol = 1e-06 pass_list.append(brick_hex_rans_def.run_def(args.tsan, args.asan)) test_list.append(brick_hex_rans_def) @@ -1369,10 +1369,10 @@ def main(): cylinder_ffd_def.cfg_dir = "deformation/cylindrical_ffd" cylinder_ffd_def.cfg_file = "def_cylindrical.cfg" cylinder_ffd_def.test_iter = 10 - cylinder_ffd_def.test_vals = [0.000470133] #residual + cylinder_ffd_def.test_vals = [0.0004700] cylinder_ffd_def.command = TestCase.Command(exec = "SU2_DEF") cylinder_ffd_def.timeout = 1600 - cylinder_ffd_def.tol = 1e-09 + cylinder_ffd_def.tol = 1e-06 pass_list.append(cylinder_ffd_def.run_def(args.tsan, args.asan)) test_list.append(cylinder_ffd_def) @@ -1382,10 +1382,10 @@ def main(): sphere_ffd_def.cfg_dir = "deformation/spherical_ffd" sphere_ffd_def.cfg_file = "def_spherical.cfg" sphere_ffd_def.test_iter = 10 - sphere_ffd_def.test_vals = [0.00356699] #residual + sphere_ffd_def.test_vals = [0.0035670] sphere_ffd_def.command = TestCase.Command(exec = "SU2_DEF") sphere_ffd_def.timeout = 1600 - sphere_ffd_def.tol = 1e-08 + sphere_ffd_def.tol = 1e-06 pass_list.append(sphere_ffd_def.run_def(args.tsan, args.asan)) test_list.append(sphere_ffd_def) @@ -1395,10 +1395,10 @@ def main(): sphere_ffd_def_bspline.cfg_dir = "deformation/spherical_ffd" sphere_ffd_def_bspline.cfg_file = "def_spherical_bspline.cfg" sphere_ffd_def_bspline.test_iter = 10 - sphere_ffd_def_bspline.test_vals = [0.00206808] #residual + sphere_ffd_def_bspline.test_vals = [0.0020680] sphere_ffd_def_bspline.command = TestCase.Command(exec = "SU2_DEF") sphere_ffd_def_bspline.timeout = 1600 - sphere_ffd_def_bspline.tol = 1e-08 + sphere_ffd_def_bspline.tol = 1e-06 pass_list.append(sphere_ffd_def_bspline.run_def(args.tsan, args.asan)) test_list.append(sphere_ffd_def_bspline) @@ -1425,7 +1425,7 @@ def main(): shape_opt_euler_py.cfg_dir = "optimization_euler/steady_naca0012" shape_opt_euler_py.cfg_file = "inv_NACA0012_adv.cfg" shape_opt_euler_py.test_iter = 1 - shape_opt_euler_py.test_vals = [1, 1, 2.134974E-05, 0.003847] #last 4 columns + shape_opt_euler_py.test_vals = [1.000000, 1.000000, 0.000021, 0.003643] shape_opt_euler_py.command = TestCase.Command(exec = "shape_optimization.py", param = "-g CONTINUOUS_ADJOINT -f") shape_opt_euler_py.timeout = 1600 shape_opt_euler_py.tol = 0.00001 @@ -1477,7 +1477,7 @@ def main(): opt_multiobj1surf_py.cfg_dir = "optimization_euler/multiobjective_wedge" opt_multiobj1surf_py.cfg_file = "inv_wedge_ROE_multiobj_1surf.cfg" opt_multiobj1surf_py.test_iter = 1 - opt_multiobj1surf_py.test_vals = [1.000000, 1.000000, 30.428280, 2.039416] + opt_multiobj1surf_py.test_vals = [1.000000, 1.000000, 36.117740, 4.438036] opt_multiobj1surf_py.command = TestCase.Command(exec = "shape_optimization.py", param = "-g CONTINUOUS_ADJOINT -f") opt_multiobj1surf_py.timeout = 1600 opt_multiobj1surf_py.tol = 0.00001 @@ -1490,7 +1490,7 @@ def main(): opt_2surf1obj_py.cfg_dir = "optimization_euler/multiobjective_wedge" opt_2surf1obj_py.cfg_file = "inv_wedge_ROE_2surf_1obj.cfg" opt_2surf1obj_py.test_iter = 1 - opt_2surf1obj_py.test_vals = [1.000000, 1.000000, 2.005694, 0.000185] + opt_2surf1obj_py.test_vals = [1.000000, 1.000000, 2.005219, 0.000369] opt_2surf1obj_py.command = TestCase.Command(exec = "shape_optimization.py", param = "-g CONTINUOUS_ADJOINT -f") opt_2surf1obj_py.timeout = 1600 opt_2surf1obj_py.tol = 0.00001 @@ -1507,7 +1507,7 @@ def main(): pywrapper_naca0012.cfg_dir = "euler/naca0012" pywrapper_naca0012.cfg_file = "inv_NACA0012_Roe.cfg" pywrapper_naca0012.test_iter = 20 - pywrapper_naca0012.test_vals = [-4.023999, -3.515034, 0.339426, 0.022217] + pywrapper_naca0012.test_vals = [-4.444941, -3.941038, 0.318998, 0.022365] pywrapper_naca0012.command = TestCase.Command(exec = "SU2_CFD.py", param = "-f") pywrapper_naca0012.timeout = 1600 pywrapper_naca0012.tol = 0.00001 @@ -1548,7 +1548,7 @@ def main(): pywrapper_aeroelastic.cfg_dir = "aeroelastic" pywrapper_aeroelastic.cfg_file = "aeroelastic_NACA64A010.cfg" pywrapper_aeroelastic.test_iter = 2 - pywrapper_aeroelastic.test_vals = [0.074836, 0.033102, -0.001650, -0.000127] + pywrapper_aeroelastic.test_vals = [0.074291, 0.027620, -0.001641, -0.000128] pywrapper_aeroelastic.command = TestCase.Command(exec = "SU2_CFD.py", param = "-f") pywrapper_aeroelastic.timeout = 1600 pywrapper_aeroelastic.tol = 0.00001 @@ -1562,7 +1562,7 @@ def main(): pywrapper_fsi2d.cfg_dir = "fea_fsi/WallChannel_2d" pywrapper_fsi2d.cfg_file = "configFSI.cfg" pywrapper_fsi2d.test_iter = 4 - pywrapper_fsi2d.test_vals = [4.000000, 0.000000, -3.743214, -4.133482] + pywrapper_fsi2d.test_vals = [4.000000, 0.000000, -3.729228, -4.153949] pywrapper_fsi2d.command = TestCase.Command(exec = "SU2_CFD.py", param = "--nZone 2 --fsi True -f") pywrapper_fsi2d.unsteady = True pywrapper_fsi2d.multizone = True @@ -1605,7 +1605,7 @@ def main(): pywrapper_custom_inlet.cfg_dir = "py_wrapper/custom_inlet" pywrapper_custom_inlet.cfg_file = "lam_flatplate.cfg" pywrapper_custom_inlet.test_iter = 20 - pywrapper_custom_inlet.test_vals = [-4.124164, -1.544359, -3.808866, 1.338411, -0.752679, 0.161436, -1.2391e-02, 5.1662e-01, -5.2901e-01] + pywrapper_custom_inlet.test_vals = [-4.120494, -1.540195, -3.566114, 1.342509, -0.748827, 0.161349, -0.013214, 0.516000, -0.529220] pywrapper_custom_inlet.command = TestCase.Command(exec = "python", param = "run.py") pywrapper_custom_inlet.timeout = 1600 pywrapper_custom_inlet.tol = 0.0001 diff --git a/TestCases/serial_regression_AD.py b/TestCases/serial_regression_AD.py index ac268040cd5..6faaeff53af 100644 --- a/TestCases/serial_regression_AD.py +++ b/TestCases/serial_regression_AD.py @@ -50,7 +50,7 @@ def main(): discadj_naca0012.cfg_dir = "cont_adj_euler/naca0012" discadj_naca0012.cfg_file = "inv_NACA0012_discadj.cfg" discadj_naca0012.test_iter = 100 - discadj_naca0012.test_vals = [-3.561506, -8.926634, -0.000000, 0.005587] + discadj_naca0012.test_vals = [-3.560691, -8.925239, -0.000000, 0.005559] test_list.append(discadj_naca0012) # Inviscid Cylinder 3D (multiple markers) @@ -58,7 +58,7 @@ def main(): discadj_cylinder3D.cfg_dir = "disc_adj_euler/cylinder3D" discadj_cylinder3D.cfg_file = "inv_cylinder3D.cfg" discadj_cylinder3D.test_iter = 5 - discadj_cylinder3D.test_vals = [-3.737675, -3.842311, -0.000000, 0.000000] + discadj_cylinder3D.test_vals = [-3.771233, -3.727282, -0.000000, 0.000000] test_list.append(discadj_cylinder3D) # Arina nozzle 2D @@ -66,7 +66,7 @@ def main(): discadj_arina2k.cfg_dir = "disc_adj_euler/arina2k" discadj_arina2k.cfg_file = "Arina2KRS.cfg" discadj_arina2k.test_iter = 20 - discadj_arina2k.test_vals = [-3.087863, -3.481496, 6.8879e-02, 0] + discadj_arina2k.test_vals = [-3.534947, -3.773294, 0.027242, 0.000000] test_list.append(discadj_arina2k) ####################################################### @@ -98,7 +98,7 @@ def main(): discadj_incomp_NACA0012.cfg_dir = "disc_adj_incomp_euler/naca0012" discadj_incomp_NACA0012.cfg_file = "incomp_NACA0012_disc.cfg" discadj_incomp_NACA0012.test_iter = 20 - discadj_incomp_NACA0012.test_vals = [20.000000, -4.092007, -2.652750, 0.000000] + discadj_incomp_NACA0012.test_vals = [20.000000, -4.087948, -2.655204, 0.000000] test_list.append(discadj_incomp_NACA0012) ##################################### @@ -110,7 +110,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, -2.373367, -2.368305, 0.000000] #last 4 columns + discadj_incomp_cylinder.test_vals = [20.000000, -2.373367, -2.368305, 0.000000] test_list.append(discadj_incomp_cylinder) ####################################################### @@ -122,7 +122,7 @@ def main(): discadj_cylinder.cfg_dir = "disc_adj_rans/cylinder" discadj_cylinder.cfg_file = "cylinder.cfg" discadj_cylinder.test_iter = 9 - discadj_cylinder.test_vals = [3.746909, -1.544883, -0.008321, 0.000014] #last 4 columns + discadj_cylinder.test_vals = [3.746909, -1.544883, -0.008321, 0.000014] discadj_cylinder.unsteady = True test_list.append(discadj_cylinder) @@ -135,7 +135,7 @@ def main(): discadj_DT_1ST_cylinder.cfg_dir = "disc_adj_rans/cylinder_DT_1ST" discadj_DT_1ST_cylinder.cfg_file = "cylinder.cfg" discadj_DT_1ST_cylinder.test_iter = 9 - discadj_DT_1ST_cylinder.test_vals = [3.698168, -1.607050, -0.002159, 0.000028] #last 4 columns + discadj_DT_1ST_cylinder.test_vals = [3.698168, -1.607050, -0.002159, 0.000028] discadj_DT_1ST_cylinder.unsteady = True test_list.append(discadj_DT_1ST_cylinder) @@ -148,7 +148,7 @@ def main(): discadj_pitchingNACA0012.cfg_dir = "disc_adj_euler/naca0012_pitching" discadj_pitchingNACA0012.cfg_file = "inv_NACA0012_pitching.cfg" discadj_pitchingNACA0012.test_iter = 4 - discadj_pitchingNACA0012.test_vals = [-1.218846, -1.645199, -0.007645, 0.000013] + discadj_pitchingNACA0012.test_vals = [-1.220016, -1.646770, -0.007597, 0.000013] discadj_pitchingNACA0012.unsteady = True test_list.append(discadj_pitchingNACA0012) @@ -157,7 +157,7 @@ def main(): unst_deforming_naca0012.cfg_dir = "disc_adj_euler/naca0012_pitching_def" unst_deforming_naca0012.cfg_file = "inv_NACA0012_pitching_deform_ad.cfg" unst_deforming_naca0012.test_iter = 4 - unst_deforming_naca0012.test_vals = [-1.958006, -1.841808, 1081.700000, 0.000004] + unst_deforming_naca0012.test_vals = [-1.959357, -1.843601, 2729.700000, 0.000004] unst_deforming_naca0012.unsteady = True test_list.append(unst_deforming_naca0012) @@ -170,7 +170,7 @@ def main(): discadj_fea.cfg_dir = "disc_adj_fea" discadj_fea.cfg_file = "configAD_fem.cfg" discadj_fea.test_iter = 4 - discadj_fea.test_vals = [-2.849781, -3.238667, -0.000364, -8.708700] + discadj_fea.test_vals = [-2.849844, -3.238713, -0.000364, -8.708700] discadj_fea.tol = 0.00007 test_list.append(discadj_fea) @@ -183,7 +183,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.227530, 0.577932, 0.000000, -7.754000] + discadj_heat.test_vals = [-2.122406, 0.693852, 0.000000, -0.869010] test_list.append(discadj_heat) ################################### @@ -195,7 +195,7 @@ def main(): discadj_fsi.cfg_dir = "disc_adj_fsi" discadj_fsi.cfg_file = "config.cfg" discadj_fsi.test_iter = 6 - discadj_fsi.test_vals = [6.000000, -1.965877, -3.084381, 0.000440, -1.063100] #last 5 columns + discadj_fsi.test_vals = [6.000000, -1.965877, -3.084381, 0.000440, -1.063100] test_list.append(discadj_fsi) ################################### @@ -207,7 +207,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 = [-2.955506, -3.085551, -3.085518, -3.085513] #last 4 columns + discadj_cht.test_vals = [-2.955506, -3.085551, -3.085518, -3.085513] test_list.append(discadj_cht) ###################################### @@ -323,7 +323,7 @@ def main(): pywrapper_FEA_AD_FlowLoad.cfg_dir = "py_wrapper/disc_adj_fea/flow_load_sens" pywrapper_FEA_AD_FlowLoad.cfg_file = "configAD_fem.cfg" pywrapper_FEA_AD_FlowLoad.test_iter = 100 - pywrapper_FEA_AD_FlowLoad.test_vals = [-0.13945587401579657, -0.585985886606256, -0.00036377840086080753, -0.0031005670174756375] #last 4 columns + pywrapper_FEA_AD_FlowLoad.test_vals = [-0.139456, -0.585986, -0.000364, -0.003101] pywrapper_FEA_AD_FlowLoad.command = TestCase.Command(exec = "python", param = "run_adjoint.py -f") pywrapper_FEA_AD_FlowLoad.timeout = 1600 pywrapper_FEA_AD_FlowLoad.tol = 0.000001 @@ -337,7 +337,7 @@ def main(): pywrapper_CFD_AD_MeshDisp.cfg_dir = "py_wrapper/disc_adj_flow/mesh_disp_sens" pywrapper_CFD_AD_MeshDisp.cfg_file = "configAD_flow.cfg" pywrapper_CFD_AD_MeshDisp.test_iter = 1000 - pywrapper_CFD_AD_MeshDisp.test_vals = [30.000000, -2.518695, 1.390150, 0.000000] #last 4 columns + pywrapper_CFD_AD_MeshDisp.test_vals = [30.000000, -2.505330, 1.409290, 0.000000] pywrapper_CFD_AD_MeshDisp.command = TestCase.Command(exec = "python", param = "run_adjoint.py -f") pywrapper_CFD_AD_MeshDisp.timeout = 1600 pywrapper_CFD_AD_MeshDisp.tol = 0.000001 diff --git a/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg b/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg index 239ae7647de..7ce89091193 100644 --- a/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg +++ b/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2.cfg @@ -81,7 +81,7 @@ MARKER_OUTLET= ( outlet, 0.0 ) % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES % -CFL_NUMBER= 150 +CFL_NUMBER= 80 CFL_REDUCTION_SPECIES= 0.1 CFL_REDUCTION_TURB= 1.0 % diff --git a/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg b/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg index 1ba87a48301..f851455c179 100644 --- a/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg +++ b/TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND.cfg @@ -82,7 +82,7 @@ MARKER_OUTLET= ( outlet, 0.0 ) % NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES % -CFL_NUMBER= 150 +CFL_NUMBER= 80 CFL_REDUCTION_SPECIES= 0.1 CFL_REDUCTION_TURB= 1.0 % @@ -93,8 +93,8 @@ ITER= 1000 % LINEAR_SOLVER= FGMRES LINEAR_SOLVER_PREC= ILU -LINEAR_SOLVER_ERROR= 1E-8 -LINEAR_SOLVER_ITER= 30 +LINEAR_SOLVER_ERROR= 1E-5 +LINEAR_SOLVER_ITER= 10 % % -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% % diff --git a/TestCases/tutorials.py b/TestCases/tutorials.py index 6406f452631..b4c8534d8a1 100644 --- a/TestCases/tutorials.py +++ b/TestCases/tutorials.py @@ -80,7 +80,7 @@ def main(): sp_pinArray_2d_mf_hf.cfg_dir = "../Tutorials/incompressible_flow/Inc_Streamwise_Periodic" sp_pinArray_2d_mf_hf.cfg_file = "sp_pinArray_2d_mf_hf.cfg" sp_pinArray_2d_mf_hf.test_iter = 25 - sp_pinArray_2d_mf_hf.test_vals = [-4.625757, 1.445108, -0.750969, 241.762883] + sp_pinArray_2d_mf_hf.test_vals = [-4.613682, 1.471278, -0.748987, 241.667177] test_list.append(sp_pinArray_2d_mf_hf) # 2D pin case pressure drop periodic with heatflux BC and temperature periodicity @@ -88,7 +88,7 @@ def main(): sp_pinArray_2d_dp_hf_tp.cfg_dir = "../Tutorials/incompressible_flow/Inc_Streamwise_Periodic" sp_pinArray_2d_dp_hf_tp.cfg_file = "sp_pinArray_2d_dp_hf_tp.cfg" sp_pinArray_2d_dp_hf_tp.test_iter = 25 - sp_pinArray_2d_dp_hf_tp.test_vals = [-4.666547, 1.396426, -0.709267, 208.023676] + sp_pinArray_2d_dp_hf_tp.test_vals = [-4.640621, 1.436697, -0.707302, 208.023676] test_list.append(sp_pinArray_2d_dp_hf_tp) ### Species Transport @@ -98,7 +98,7 @@ def main(): species3_primitiveVenturi.cfg_dir = "../Tutorials/incompressible_flow/Inc_Species_Transport" species3_primitiveVenturi.cfg_file = "species3_primitiveVenturi.cfg" species3_primitiveVenturi.test_iter = 50 - species3_primitiveVenturi.test_vals = [-6.082040, -5.293756, -5.131970, -5.933415, -1.606563, -6.274241, -6.408477, 5.000000, -0.811535, 5.000000, -2.344697, 5.000000, -0.388358, 1.647440, 0.499101, 0.600978, 0.547361] + species3_primitiveVenturi.test_vals = [-5.869509, -5.252493, -5.127926, -5.912790, -1.767067, -6.152558, -6.304196, 5.000000, -0.933280, 5.000000, -2.314730, 5.000000, -0.680255, 1.649865, 0.500678, 0.596475, 0.552712] test_list.append(species3_primitiveVenturi) # 3 species (2 eq) primitive venturi mixing @@ -106,8 +106,8 @@ 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 = [-8.443103, -7.715615, -7.706589, -7.428740, -12.067471, -12.205189, -11.368995] - DAspecies3_primitiveVenturi.test_vals_aarch64 = [-8.443103, -7.715615, -7.706589, -7.428740, -12.067471, -12.205189, -11.368995] + DAspecies3_primitiveVenturi.test_vals = [-7.584508, -7.211527, -6.740742, -6.896386, -11.472089, -10.865347, -10.096770] + DAspecies3_primitiveVenturi.test_vals_aarch64 = [-7.865411, -7.548131, -7.347978, -7.217536, -11.822422, -10.968444, -10.193225] DAspecies3_primitiveVenturi.command = TestCase.Command("mpirun -n 2", "SU2_CFD_AD") test_list.append(DAspecies3_primitiveVenturi) @@ -125,7 +125,7 @@ def main(): sudo_tutorial.cfg_dir = "../Tutorials/incompressible_flow/Inc_Turbulent_Bend_Wallfunctions" sudo_tutorial.cfg_file = "sudo.cfg" sudo_tutorial.test_iter = 10 - sudo_tutorial.test_vals = [-13.618610, -12.647974, -12.296537, -11.658760, -13.136523, -9.550829, 15.000000, -2.369703] + sudo_tutorial.test_vals = [-14.579462, -13.203791, -13.601782, -12.616876, -14.005299, -10.817605, 15.000000, -2.296083] sudo_tutorial.command = TestCase.Command("mpirun -n 2", "SU2_CFD") test_list.append(sudo_tutorial) @@ -136,7 +136,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.905856, -10.449512, -11.035999, -4.331440, -11.882740] + premixed_hydrogen.test_vals = [-9.809794, -10.369804, -11.044267, -4.332945, -11.883789] test_list.append(premixed_hydrogen) ### Compressible Flow @@ -146,7 +146,7 @@ def main(): tutorial_inv_bump.cfg_dir = "../Tutorials/compressible_flow/Inviscid_Bump" tutorial_inv_bump.cfg_file = "inv_channel.cfg" tutorial_inv_bump.test_iter = 0 - tutorial_inv_bump.test_vals = [-1.437425, 4.075857, 0.005439, 0.012998] + tutorial_inv_bump.test_vals = [-1.548003, 3.983585, 0.020973, 0.071064] test_list.append(tutorial_inv_bump) # Inviscid Wedge @@ -154,7 +154,7 @@ def main(): tutorial_inv_wedge.cfg_dir = "../Tutorials/compressible_flow/Inviscid_Wedge" tutorial_inv_wedge.cfg_file = "inv_wedge_HLLC.cfg" tutorial_inv_wedge.test_iter = 0 - tutorial_inv_wedge.test_vals = [-0.481460, 5.253008, -0.291747, 0.052515] + tutorial_inv_wedge.test_vals = [-0.864206, 4.850246, -0.245674, 0.043209] tutorial_inv_wedge.no_restart = True test_list.append(tutorial_inv_wedge) @@ -163,7 +163,7 @@ def main(): tutorial_inv_onera.cfg_dir = "../Tutorials/compressible_flow/Inviscid_ONERAM6" tutorial_inv_onera.cfg_file = "inv_ONERAM6.cfg" tutorial_inv_onera.test_iter = 0 - tutorial_inv_onera.test_vals = [-5.204928, -4.597762, 0.247451, 0.085770] + tutorial_inv_onera.test_vals = [-5.504789, -4.895776, 0.249157, 0.118834] tutorial_inv_onera.no_restart = True test_list.append(tutorial_inv_onera) @@ -181,7 +181,7 @@ def main(): tutorial_lam_flatplate.cfg_dir = "../Tutorials/compressible_flow/Laminar_Flat_Plate" tutorial_lam_flatplate.cfg_file = "lam_flatplate.cfg" tutorial_lam_flatplate.test_iter = 0 - tutorial_lam_flatplate.test_vals = [-2.821818, 2.657591, -0.400044, 0.029413] #last 4 columns + tutorial_lam_flatplate.test_vals = [-2.821818, 2.657591, -0.400044, 0.029365] #last 4 columns tutorial_lam_flatplate.no_restart = True test_list.append(tutorial_lam_flatplate) @@ -190,7 +190,7 @@ def main(): tutorial_turb_flatplate.cfg_dir = "../Tutorials/compressible_flow/Turbulent_Flat_Plate" tutorial_turb_flatplate.cfg_file = "turb_SA_flatplate.cfg" tutorial_turb_flatplate.test_iter = 0 - tutorial_turb_flatplate.test_vals = [-2.258584, -4.901015, -0.429375, 0.201236] + tutorial_turb_flatplate.test_vals = [-2.258584, -4.901015, -0.429373, 0.201034] tutorial_turb_flatplate.no_restart = True test_list.append(tutorial_turb_flatplate) @@ -208,8 +208,8 @@ def main(): tutorial_trans_flatplate_T3A.cfg_dir = "../Tutorials/compressible_flow/Transitional_Flat_Plate/Langtry_and_Menter/T3A" tutorial_trans_flatplate_T3A.cfg_file = "transitional_LM_model_ConfigFile.cfg" tutorial_trans_flatplate_T3A.test_iter = 20 - tutorial_trans_flatplate_T3A.test_vals = [-5.837186, -2.092246, -3.982633, -0.302219, -1.921235, 1.667190, -3.496277, 0.391605] - tutorial_trans_flatplate_T3A.test_vals_aarch64 = [-5.837191, -2.092246, -3.982640, -0.302224, -1.922554, 1.667190, -3.496277, 0.391605] + tutorial_trans_flatplate_T3A.test_vals = [-5.837399, -2.092246, -3.983493, -0.302381, -1.920868, 1.667180, -3.496278, 0.391608] + tutorial_trans_flatplate_T3A.test_vals_aarch64 = [-5.837368, -2.092246, -3.984172, -0.302357, -1.928108, 1.667157, -3.496279, 0.391610] tutorial_trans_flatplate_T3A.no_restart = True test_list.append(tutorial_trans_flatplate_T3A) @@ -218,8 +218,8 @@ def main(): tutorial_trans_flatplate_T3Am.cfg_dir = "../Tutorials/compressible_flow/Transitional_Flat_Plate/Langtry_and_Menter/T3A-" tutorial_trans_flatplate_T3Am.cfg_file = "transitional_LM_model_ConfigFile.cfg" tutorial_trans_flatplate_T3Am.test_iter = 20 - tutorial_trans_flatplate_T3Am.test_vals = [-6.063600, -1.945057, -3.946760, -0.549063, -3.863792, 2.664453, -2.517606, 1.112979] - tutorial_trans_flatplate_T3Am.test_vals_aarch64 = [-6.063598, -1.945057, -3.946744, -0.549062, -3.863792, 2.664453, -2.517606, 1.112979] + tutorial_trans_flatplate_T3Am.test_vals = [-6.063700, -1.945073, -3.946836, -0.549147, -3.863792, 2.664440, -2.517610, 1.112977] + tutorial_trans_flatplate_T3Am.test_vals_aarch64 = [-6.063726, -1.945088, -3.946923, -0.549166, -3.863794, 2.664439, -2.517601, 1.112978] tutorial_trans_flatplate_T3Am.no_restart = True test_list.append(tutorial_trans_flatplate_T3Am) @@ -246,7 +246,7 @@ def main(): tutorial_turb_oneram6.cfg_dir = "../Tutorials/compressible_flow/Turbulent_ONERAM6" tutorial_turb_oneram6.cfg_file = "turb_ONERAM6.cfg" tutorial_turb_oneram6.test_iter = 0 - tutorial_turb_oneram6.test_vals = [-4.564441, -11.524476, 0.327954, 0.097349] + tutorial_turb_oneram6.test_vals = [-4.564441, -11.524295, 0.327905, 0.097340] test_list.append(tutorial_turb_oneram6) # NICD Nozzle @@ -254,7 +254,7 @@ def main(): tutorial_nicfd_nozzle.cfg_dir = "../Tutorials/compressible_flow/NICFD_nozzle" tutorial_nicfd_nozzle.cfg_file = "NICFD_nozzle.cfg" tutorial_nicfd_nozzle.test_iter = 20 - tutorial_nicfd_nozzle.test_vals = [-2.187397, -2.338457, 3.617301, 0.000000, 0.000000] + tutorial_nicfd_nozzle.test_vals = [-2.056675, -2.124123, 3.687027, 0.000000, 0.000000] tutorial_nicfd_nozzle.no_restart = True test_list.append(tutorial_nicfd_nozzle) @@ -284,7 +284,7 @@ def main(): tutorial_design_inv_naca0012.cfg_dir = "../Tutorials/design/Inviscid_2D_Unconstrained_NACA0012" tutorial_design_inv_naca0012.cfg_file = "inv_NACA0012_basic.cfg" tutorial_design_inv_naca0012.test_iter = 0 - tutorial_design_inv_naca0012.test_vals = [-3.585391, -2.989014, 0.135070, 0.208565] + tutorial_design_inv_naca0012.test_vals = [-3.918503, -3.332494, 0.134359, 0.218097] tutorial_design_inv_naca0012.no_restart = True test_list.append(tutorial_design_inv_naca0012) @@ -302,7 +302,7 @@ def main(): tutorial_design_multiobj.cfg_dir = "../Tutorials/design/Multi_Objective_Shape_Design" tutorial_design_multiobj.cfg_file = "inv_wedge_ROE_multiobj_combo.cfg" tutorial_design_multiobj.test_iter = 0 - tutorial_design_multiobj.test_vals = [2.657333, -3.020635, 324840.000000, 0.000000] #last 4 columns + tutorial_design_multiobj.test_vals = [2.657333, -3.020635, 370220.000000, 0.000000] tutorial_design_multiobj.no_restart = True test_list.append(tutorial_design_multiobj) diff --git a/TestCases/user_defined_functions/lam_flatplate.cfg b/TestCases/user_defined_functions/lam_flatplate.cfg index 35cdc97b9c9..c3d55cd45c0 100644 --- a/TestCases/user_defined_functions/lam_flatplate.cfg +++ b/TestCases/user_defined_functions/lam_flatplate.cfg @@ -114,7 +114,7 @@ SLOPE_LIMITER_FLOW= NONE % CONV_RESIDUAL_MINVAL= -11 CONV_STARTITER= 0 -INNER_ITER= 1000 +INNER_ITER= 21 % ------------------------- INPUT/OUTPUT INFORMATION --------------------------% % diff --git a/TestCases/vandv.py b/TestCases/vandv.py index 16ea373e8c1..06c74d893f8 100644 --- a/TestCases/vandv.py +++ b/TestCases/vandv.py @@ -54,8 +54,8 @@ def main(): flatplate_sst1994m.cfg_dir = "vandv/rans/flatplate" flatplate_sst1994m.cfg_file = "turb_flatplate_sst.cfg" flatplate_sst1994m.test_iter = 5 - flatplate_sst1994m.test_vals = [-13.023358, -9.956752, -11.099910, -7.933220, -10.206577, -5.132343, 0.002808] - flatplate_sst1994m.test_vals_aarch64 = [-13.022835, -9.956652, -11.102384, -7.928197, -10.206580, -5.132317, 0.002808] + flatplate_sst1994m.test_vals = [-13.027926, -10.276119, -11.311717, -8.137517, -10.520065, -5.127385, 0.002775] + flatplate_sst1994m.test_vals_aarch64 = [-13.028095, -11.271115, -11.532461, -8.387610, -11.417974, -5.116988, 0.002808] test_list.append(flatplate_sst1994m) # bump in channel - sst-v1994m @@ -63,8 +63,8 @@ def main(): bump_sst1994m.cfg_dir = "vandv/rans/bump_in_channel" bump_sst1994m.cfg_file = "turb_bump_sst.cfg" bump_sst1994m.test_iter = 5 - bump_sst1994m.test_vals = [-12.986182, -10.719941, -10.556276, -7.606531, -10.774915, -5.605156, 0.004972] - bump_sst1994m.test_vals_aarch64 = [-13.039365, -10.729085, -10.609923, -7.682911, -10.774915, -5.605087, 0.004972] + bump_sst1994m.test_vals = [-13.022054, -9.882710, -10.557148, -7.605034, -10.172437, -5.549948, 0.004904] + bump_sst1994m.test_vals_aarch64 = [-13.034665, -10.510699, -10.627802, -7.661320, -10.680337, -5.749566, 0.004972] test_list.append(bump_sst1994m) # SWBLI SA @@ -72,8 +72,8 @@ def main(): swbli_sa.cfg_dir = "vandv/rans/swbli" swbli_sa.cfg_file = "config_sa.cfg" swbli_sa.test_iter = 5 - swbli_sa.test_vals = [-11.530796, -10.915564, -12.034495, -10.538719, -15.922522, 0.002233, -3.359164, 1.340100] - swbli_sa.test_vals_aarch64 = [-11.530796, -10.915564, -12.034495, -10.538719, -15.922522, 0.002233, -3.359164, 1.340100] + swbli_sa.test_vals = [-11.564511, -10.836187, -11.792765, -10.383947, -15.718717, 0.002212, -2.993991, 1.340100] + swbli_sa.test_vals_aarch64 = [-11.564511, -10.836187, -11.792765, -10.383947, -15.718717, 0.002212, -2.993991, 1.340100] test_list.append(swbli_sa) @@ -82,7 +82,7 @@ def main(): swbli_sst.cfg_dir = "vandv/rans/swbli" swbli_sst.cfg_file = "config_sst.cfg" swbli_sst.test_iter = 5 - swbli_sst.test_vals = [-11.527743, -11.150388, -11.944923, -10.750834, -11.116769, -4.030059, 0.002339, -2.730391, -4.067274, 1.276300] + swbli_sst.test_vals = [-11.528112, -10.961624, -11.903226, -10.630539, -11.117619, -4.573066, 0.002318, -2.905628, -4.037947, 1.340100] test_list.append(swbli_sst) ########################## @@ -94,8 +94,8 @@ 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 = [-16.249917, -13.835991, -14.303372, -13.276035, -10.074262, -14.027223, 5, -1.672359, 5, -4.938477, 5, -3.462217, 2.5859e-04, 2.8215e-32, 4.5010e-68, 2.5859e-04, 4.0474e+03, 3.9468e+03, 4.9170e+01, 5.1441e+01] - sandiajet_sst.test_vals_aarch64 = [-16.249289, -13.833785, -14.303058, -13.276559, -10.267928, -14.027240, 5, -1.676412, 5, -4.815216, 5, -3.462247, 0.000259, 0, 0, 0.000259, 4047.4, 3946.8, 49.17, 51.441] + sandiajet_sst.test_vals = [-17.169907, -13.518707, -15.442566, -12.021165, -9.660040, -15.289842, 5.000000, -2.746249, 5.000000, -4.836800, 5.000000, -3.966350, 0.000259, 0.000000, 0.000000, 0.000259, 4047.400000, 3946.800000, 49.161000, 51.433000] + sandiajet_sst.test_vals_aarch64 = [-17.069026, -13.156800, -15.290567, -11.689831, -9.349978, -14.907311, 5.000000, -2.738947, 5.000000, -4.813747, 5.000000, -3.981740, 0.000259, 0.000000, 0.000000, 0.000259, 4047.400000, 3946.800000, 49.161000, 51.433000] test_list.append(sandiajet_sst) ################# diff --git a/UnitTests/SU2_CFD/gradients.cpp b/UnitTests/SU2_CFD/gradients.cpp index 2f69d407d3a..af3ad8a2fee 100644 --- a/UnitTests/SU2_CFD/gradients.cpp +++ b/UnitTests/SU2_CFD/gradients.cpp @@ -133,7 +133,7 @@ void testGreenGauss() { C3DDoubleMatrix gradient(field.geometry->GetnPoint(), field.nVar, field.geometry->GetnDim()); computeGradientsGreenGauss(nullptr, MPI_QUANTITIES::SOLUTION, PERIODIC_NONE, *field.geometry.get(), - *field.config.get(), field, 0, field.nVar, gradient); + *field.config.get(), field, 0, field.nVar, -1, gradient); check(field, gradient); } @@ -145,7 +145,7 @@ void testLeastSquares(bool weighted) { C3DDoubleMatrix gradient(field.geometry->GetnPoint(), field.nVar, nDim); computeGradientsLeastSquares(nullptr, MPI_QUANTITIES::SOLUTION, PERIODIC_NONE, *field.geometry.get(), - *field.config.get(), weighted, field, 0, field.nVar, gradient, R); + *field.config.get(), weighted, field, 0, field.nVar, -1, gradient, R); check(field, gradient); } diff --git a/config_template.cfg b/config_template.cfg index 74832ef98db..00334732b30 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -21,7 +21,7 @@ SOLVER= EULER % Specify turbulence model (NONE, SA, SST) KIND_TURB_MODEL= NONE % -% Specify versions/corrections of the SST model (V2003m, V1994m, VORTICITY, KATO_LAUNDER, UQ, SUSTAINING) +% Specify versions/corrections of the SST model (V2003m, V1994m, VORTICITY, KATO_LAUNDER, UQ, SUSTAINING, COMPRESSIBILITY-WILCOX, COMPRESSIBILITY-SARKAR, DIMENSIONLESS_LIMIT) SST_OPTIONS= NONE % % Specify versions/corrections of the SA model (NEGATIVE, EDWARDS, WITHFT2, QCR2000, COMPRESSIBILITY, ROTATION, BCM, EXPERIMENTAL) @@ -1567,7 +1567,7 @@ CONV_NUM_METHOD_FLOW= ROE % Roe Low Dissipation function for Hybrid RANS/LES simulations (FD, NTS, NTS_DUCROS) ROE_LOW_DISSIPATION= FD % -% Roe coefficient +% Roe dissipation coefficient ROE_KAPPA= 0.5 % % Minimum value for beta for the Roe-Turkel preconditioner @@ -1801,6 +1801,10 @@ TIME_DISCRE_TURB= EULER_IMPLICIT % Reduction factor of the CFL coefficient in the turbulence problem CFL_REDUCTION_TURB= 1.0 +% Control lower limit constants of the SST model (C*phi_infinity) +LOWER_LIMIT_K_FACTOR= 1e-15 +LOWER_LIMIT_OMEGA_FACTOR= 1e-5 + % --------------------- HEAT NUMERICAL METHOD DEFINITION ----------------------% % % Value of the thermal diffusivity diff --git a/externals/codi b/externals/codi index c6b039e5c9e..9ca6c382806 160000 --- a/externals/codi +++ b/externals/codi @@ -1 +1 @@ -Subproject commit c6b039e5c9edb7675f90ffc725f9dd8e66571264 +Subproject commit 9ca6c38280610b3ea5337ca3e5b5085ee1c66b59 diff --git a/subprojects/MLPCpp b/subprojects/MLPCpp index c19c53ea2b8..665c45b7d35 160000 --- a/subprojects/MLPCpp +++ b/subprojects/MLPCpp @@ -1 +1 @@ -Subproject commit c19c53ea2b85ccfb185f1c6c87044dc0b5bc7ae0 +Subproject commit 665c45b7d3533c977eb1f637918d5b8b75c07d3b From 7f50852c9bdc5e1d9c60a275b928e9d1e809e70e Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 4 Sep 2024 18:03:17 +0200 Subject: [PATCH 39/61] submodule updates --- externals/codi | 2 +- subprojects/MLPCpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/externals/codi b/externals/codi index 9ca6c382806..c6b039e5c9e 160000 --- a/externals/codi +++ b/externals/codi @@ -1 +1 @@ -Subproject commit 9ca6c38280610b3ea5337ca3e5b5085ee1c66b59 +Subproject commit c6b039e5c9edb7675f90ffc725f9dd8e66571264 diff --git a/subprojects/MLPCpp b/subprojects/MLPCpp index 665c45b7d35..c19c53ea2b8 160000 --- a/subprojects/MLPCpp +++ b/subprojects/MLPCpp @@ -1 +1 @@ -Subproject commit 665c45b7d3533c977eb1f637918d5b8b75c07d3b +Subproject commit c19c53ea2b85ccfb185f1c6c87044dc0b5bc7ae0 From 4c7327d3f1ec3257ba38d569997aa6fa3041e32c Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 4 Sep 2024 18:54:30 +0200 Subject: [PATCH 40/61] Revert changes in Giles BC that have persisted --- SU2_CFD/include/solvers/CEulerSolver.hpp | 34 +- SU2_CFD/include/solvers/CSolver.hpp | 32 -- SU2_CFD/src/solvers/CEulerSolver.cpp | 526 ++++++++++++++--------- 3 files changed, 331 insertions(+), 261 deletions(-) diff --git a/SU2_CFD/include/solvers/CEulerSolver.hpp b/SU2_CFD/include/solvers/CEulerSolver.hpp index 87700590937..d498b84c225 100644 --- a/SU2_CFD/include/solvers/CEulerSolver.hpp +++ b/SU2_CFD/include/solvers/CEulerSolver.hpp @@ -590,7 +590,7 @@ class CEulerSolver : public CFVMFlowSolverBaseGetiZone(); + bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT); + string Marker_Tag = config->GetMarker_All_TagBound(val_marker); + bool viscous = config->GetViscous(); + unsigned short nSpanWiseSections = geometry->GetnSpanWiseSections(config->GetMarker_All_TurbomachineryFlag(val_marker)); + su2double relfacAvgCfg = config->GetGiles_RelaxFactorAverage(Marker_Tag); + su2double relfacFouCfg = config->GetGiles_RelaxFactorFourier(Marker_Tag); + su2double *Normal; + su2double TwoPiThetaFreq_Pitch, pitch,theta; + const su2double *SpanWiseValues = nullptr, *FlowDir; + su2double spanPercent, extrarelfacAvg = 0.0, deltaSpan = 0.0, relfacAvg, relfacFou, coeffrelfacAvg = 0.0; + unsigned short Turbo_Flag; + + Normal = new su2double[nDim]; + turboNormal = new su2double[nDim]; + UnitNormal = new su2double[nDim]; + turboVelocity = new su2double[nDim]; + Velocity_i = new su2double[nDim]; + Velocity_b = new su2double[nDim]; + + + su2double AverageSoundSpeed, *AverageTurboMach, AverageEntropy, AverageEnthalpy; + AverageTurboMach = new su2double[nDim]; + S_boundary = new su2double[8]; + + su2double AvgMach , *cj, GilesBeta, *delta_c, **R_Matrix, *deltaprim, **R_c_inv,**R_c, alphaIn_BC, gammaIn_BC = 0, + P_Total, T_Total, Enthalpy_BC, Entropy_BC, *R, *c_avg,*dcjs, Beta_inf2, c2js_Re, c3js_Re, cOutjs_Re, avgVel2 =0.0; + + long freq; + + delta_c = new su2double[nVar]; + deltaprim = new su2double[nVar]; + cj = new su2double[nVar]; + R_Matrix = new su2double*[nVar]; + R_c = new su2double*[nVar-1]; + R_c_inv = new su2double*[nVar-1]; + R = new su2double[nVar-1]; + c_avg = new su2double[nVar]; + dcjs = new su2double[nVar]; + + for (iVar = 0; iVar < nVar; iVar++) { R_Matrix[iVar] = new su2double[nVar]; c_avg[iVar] = 0.0; dcjs[iVar] = 0.0; } - for (auto iVar = 0; iVar < nVar-1; iVar++) + for (iVar = 0; iVar < nVar-1; iVar++) { R_c[iVar] = new su2double[nVar-1]; R_c_inv[iVar] = new su2double[nVar-1]; } - auto const I = complex(0.0,1.0); - - /*--- Compute coeff for under relaxation of Avg and Fourier Coefficient for hub and shroud---*/ - auto const Marker_Tag = config->GetMarker_All_TagBound(val_marker); - su2double relfacAvgCfg = config->GetGiles_RelaxFactorAverage(Marker_Tag); - - unsigned short nSpanWiseSections = geometry->GetnSpanWiseSections(config->GetMarker_All_TurbomachineryFlag(val_marker)); - - const su2double *SpanWiseValues = nullptr; - su2double extrarelfacAvg = 0.0, deltaSpan = 0.0, relfacAvg, relfacFou = config->GetGiles_RelaxFactorFourier(Marker_Tag), coeffrelfacAvg = 0.0; + complex I, c2ks, c2js, c3ks, c3js, cOutks, cOutjs, Beta_inf; + I = complex(0.0,1.0); + /*--- Compute coeff for under relaxation of Avg and Fourier Coefficient for hub and shroud---*/ if (nDim == 3){ extrarelfacAvg = config->GetExtraRelFacGiles(0); - auto const spanPercent = config->GetExtraRelFacGiles(1); - auto const Turbo_Flag = config->GetMarker_All_TurbomachineryFlag(val_marker); + spanPercent = config->GetExtraRelFacGiles(1); + Turbo_Flag = config->GetMarker_All_TurbomachineryFlag(val_marker); SpanWiseValues = geometry->GetSpanWiseValue(Turbo_Flag); deltaSpan = SpanWiseValues[nSpanWiseSections-1]*spanPercent; coeffrelfacAvg = (relfacAvgCfg - extrarelfacAvg)/deltaSpan; } - for (unsigned short iSpan= 0; iSpan < nSpanWiseSections ; iSpan++){ + for (iSpan= 0; iSpan < nSpanWiseSections ; iSpan++){ /*--- Compute under relaxation for the Hub and Shroud Avg and Fourier Coefficient---*/ if(nDim == 3){ if(SpanWiseValues[iSpan] <= SpanWiseValues[0] + deltaSpan){ @@ -6186,16 +6207,18 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu } else{ relfacAvg = relfacAvgCfg; + relfacFou = relfacFouCfg; } } else{ { relfacAvg = relfacAvgCfg; + relfacFou = relfacFouCfg; } } GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan]); - auto AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); + AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); AverageTurboMach[0] = AverageTurboVelocity[val_marker][iSpan][0]/AverageSoundSpeed; AverageTurboMach[1] = AverageTurboVelocity[val_marker][iSpan][1]/AverageSoundSpeed; @@ -6203,32 +6226,167 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu AverageTurboMach[1] -= geometry->GetAverageTangGridVel(val_marker,iSpan)/AverageSoundSpeed; } - auto const kend = geometry->GetnFreqSpan(val_marker, iSpan); - auto const kend_max = geometry->GetnFreqSpanMax(config->GetMarker_All_TurbomachineryFlag(val_marker)); - conv_numerics->GetRMatrix(AverageSoundSpeed, AverageDensity[val_marker][iSpan], R_Matrix); + AvgMach = AverageTurboMach[0]*AverageTurboMach[0] + AverageTurboMach[1]*AverageTurboMach[1]; - su2double Pressure_e; //Useful to pass by reference + kend = geometry->GetnFreqSpan(val_marker, iSpan); + kend_max = geometry->GetnFreqSpanMax(config->GetMarker_All_TurbomachineryFlag(val_marker)); + conv_numerics->GetRMatrix(AverageSoundSpeed, AverageDensity[val_marker][iSpan], R_Matrix); switch(config->GetKind_Data_Giles(Marker_Tag)){ case TOTAL_CONDITIONS_PT: - BC_Giles_Total_Inlet(conv_numerics, config, val_marker, c_avg, R, R_c_inv, R_c, iSpan, iSpan); + /*--- Retrieve the specified total conditions for this inlet. ---*/ + P_Total = config->GetGiles_Var1(Marker_Tag); + T_Total = config->GetGiles_Var2(Marker_Tag); + FlowDir = config->GetGiles_FlowDir(Marker_Tag); + alphaIn_BC = atan(FlowDir[1]/FlowDir[0]); + + gammaIn_BC = 0; + if (nDim == 3){ + gammaIn_BC = FlowDir[2]; //atan(FlowDir[2]/FlowDir[0]); + } + + /*--- Non-dim. the inputs---*/ + P_Total /= config->GetPressure_Ref(); + T_Total /= config->GetTemperature_Ref(); + + /* --- Computes the total state --- */ + GetFluidModel()->SetTDState_PT(P_Total, T_Total); + Enthalpy_BC = GetFluidModel()->GetStaticEnergy()+ GetFluidModel()->GetPressure()/GetFluidModel()->GetDensity(); + Entropy_BC = GetFluidModel()->GetEntropy(); + + + /* --- Computes the inverse matrix R_c --- */ + conv_numerics->ComputeResJacobianGiles(GetFluidModel(), AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan], + AverageTurboVelocity[val_marker][iSpan], alphaIn_BC, gammaIn_BC, R_c, R_c_inv); + + GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan]); + AverageEnthalpy = GetFluidModel()->GetStaticEnergy() + AveragePressure[val_marker][iSpan]/AverageDensity[val_marker][iSpan]; + AverageEntropy = GetFluidModel()->GetEntropy(); + + avgVel2 = 0.0; + for (iDim = 0; iDim < nDim; iDim++) avgVel2 += AverageVelocity[val_marker][iSpan][iDim]*AverageVelocity[val_marker][iSpan][iDim]; + if (nDim == 2){ + R[0] = -(AverageEntropy - Entropy_BC); + R[1] = -(AverageTurboVelocity[val_marker][iSpan][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][iSpan][0]); + R[2] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); + } + + else{ + R[0] = -(AverageEntropy - Entropy_BC); + R[1] = -(AverageTurboVelocity[val_marker][iSpan][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][iSpan][0]); + R[2] = -(AverageTurboVelocity[val_marker][iSpan][2] - tan(gammaIn_BC)*AverageTurboVelocity[val_marker][iSpan][0]); + R[3] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); + + } + /* --- Compute the avg component c_avg = R_c^-1 * R --- */ + for (iVar = 0; iVar < nVar-1; iVar++){ + c_avg[iVar] = 0.0; + for (jVar = 0; jVar < nVar-1; jVar++){ + c_avg[iVar] += R_c_inv[iVar][jVar]*R[jVar]; + } + } break; case TOTAL_CONDITIONS_PT_1D: - BC_Giles_Total_Inlet(conv_numerics, config, val_marker, c_avg, R, R_c_inv, R_c, iSpan, nSpanWiseSections); + /*--- Retrieve the specified total conditions for this inlet. ---*/ + P_Total = config->GetGiles_Var1(Marker_Tag); + T_Total = config->GetGiles_Var2(Marker_Tag); + FlowDir = config->GetGiles_FlowDir(Marker_Tag); + alphaIn_BC = atan(FlowDir[1]/FlowDir[0]); + + gammaIn_BC = 0; + if (nDim == 3){ + // Review definition of angle + gammaIn_BC = FlowDir[2]; //atan(FlowDir[2]/FlowDir[0]); + } + + /*--- Non-dim. the inputs---*/ + P_Total /= config->GetPressure_Ref(); + T_Total /= config->GetTemperature_Ref(); + + /* --- Computes the total state --- */ + GetFluidModel()->SetTDState_PT(P_Total, T_Total); + Enthalpy_BC = GetFluidModel()->GetStaticEnergy()+ GetFluidModel()->GetPressure()/GetFluidModel()->GetDensity(); + Entropy_BC = GetFluidModel()->GetEntropy(); + + + /* --- Computes the inverse matrix R_c --- */ + conv_numerics->ComputeResJacobianGiles(GetFluidModel(), AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan], + AverageTurboVelocity[val_marker][iSpan], alphaIn_BC, gammaIn_BC, R_c, R_c_inv); + + GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][nSpanWiseSections], AverageDensity[val_marker][nSpanWiseSections]); + AverageEnthalpy = GetFluidModel()->GetStaticEnergy() + AveragePressure[val_marker][nSpanWiseSections]/AverageDensity[val_marker][nSpanWiseSections]; + AverageEntropy = GetFluidModel()->GetEntropy(); + + + avgVel2 = 0.0; + for (iDim = 0; iDim < nDim; iDim++) avgVel2 += AverageVelocity[val_marker][iSpan][iDim]*AverageVelocity[val_marker][iSpan][iDim]; + if (nDim == 2){ + R[0] = -(AverageEntropy - Entropy_BC); + R[1] = -(AverageTurboVelocity[val_marker][nSpanWiseSections][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][nSpanWiseSections][0]); + R[2] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); + } + + else{ + R[0] = -(AverageEntropy - Entropy_BC); + R[1] = -(AverageTurboVelocity[val_marker][nSpanWiseSections][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][nSpanWiseSections][0]); + R[2] = -(AverageTurboVelocity[val_marker][nSpanWiseSections][2] - tan(gammaIn_BC)*AverageTurboVelocity[val_marker][nSpanWiseSections][0]); + R[3] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); + + } + /* --- Compute the avg component c_avg = R_c^-1 * R --- */ + for (iVar = 0; iVar < nVar-1; iVar++){ + c_avg[iVar] = 0.0; + for (jVar = 0; jVar < nVar-1; jVar++){ + c_avg[iVar] += R_c_inv[iVar][jVar]*R[jVar]; + } + } break; case MIXING_IN: case MIXING_OUT: - BC_Giles_Mixing(conv_numerics, val_marker, deltaprim, c_avg, iSpan); + /* --- Compute average jump of primitive at the mixing-plane interface--- */ + deltaprim[0] = ExtAverageDensity[val_marker][iSpan] - AverageDensity[val_marker][iSpan]; + deltaprim[1] = ExtAverageTurboVelocity[val_marker][iSpan][0] - AverageTurboVelocity[val_marker][iSpan][0]; + deltaprim[2] = ExtAverageTurboVelocity[val_marker][iSpan][1] - AverageTurboVelocity[val_marker][iSpan][1]; + if (nDim == 2){ + deltaprim[3] = ExtAveragePressure[val_marker][iSpan] - AveragePressure[val_marker][iSpan]; + } + else + { + deltaprim[3] = ExtAverageTurboVelocity[val_marker][iSpan][2] - AverageTurboVelocity[val_marker][iSpan][2]; + deltaprim[4] = ExtAveragePressure[val_marker][iSpan] - AveragePressure[val_marker][iSpan]; + } + + + /* --- Compute average jump of charachteristic variable at the mixing-plane interface--- */ + GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan]); + AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); + conv_numerics->GetCharJump(AverageSoundSpeed, AverageDensity[val_marker][iSpan], deltaprim, c_avg); break; case MIXING_IN_1D: case MIXING_OUT_1D: - BC_Giles_Mixing(conv_numerics, val_marker, deltaprim, c_avg, nSpanWiseSections); + /* --- Compute average jump of primitive at the mixing-plane interface--- */ + deltaprim[0] = ExtAverageDensity[val_marker][nSpanWiseSections] - AverageDensity[val_marker][nSpanWiseSections]; + deltaprim[1] = ExtAverageTurboVelocity[val_marker][nSpanWiseSections][0] - AverageTurboVelocity[val_marker][nSpanWiseSections][0]; + deltaprim[2] = ExtAverageTurboVelocity[val_marker][nSpanWiseSections][1] - AverageTurboVelocity[val_marker][nSpanWiseSections][1]; + if (nDim == 2){ + deltaprim[3] = ExtAveragePressure[val_marker][nSpanWiseSections] - AveragePressure[val_marker][nSpanWiseSections]; + } + else + { + deltaprim[3] = ExtAverageTurboVelocity[val_marker][nSpanWiseSections][2] - AverageTurboVelocity[val_marker][nSpanWiseSections][2]; + deltaprim[4] = ExtAveragePressure[val_marker][nSpanWiseSections] - AveragePressure[val_marker][nSpanWiseSections]; + } + + /* --- Compute average jump of charachteristic variable at the mixing-plane interface--- */ + GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][nSpanWiseSections], AverageDensity[val_marker][nSpanWiseSections]); + AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); + conv_numerics->GetCharJump(AverageSoundSpeed, AverageDensity[val_marker][nSpanWiseSections], deltaprim, c_avg); break; @@ -6237,9 +6395,13 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu Pressure_e /= config->GetPressure_Ref(); /* --- Compute avg characteristic jump --- */ - c_avg[nDim+1] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); - - c_avg[nDim + 1] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); + if (nDim == 2){ + c_avg[3] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); + } + else + { + c_avg[4] = -2.0*(AveragePressure[val_marker][iSpan]-Pressure_e); + } break; case STATIC_PRESSURE_1D: @@ -6247,9 +6409,13 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu Pressure_e /= config->GetPressure_Ref(); /* --- Compute avg characteristic jump --- */ - c_avg[nDim+1] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); - - c_avg[nDim + 1] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); + if (nDim == 2){ + c_avg[3] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); + } + else + { + c_avg[4] = -2.0*(AveragePressure[val_marker][nSpanWiseSections]-Pressure_e); + } break; case RADIAL_EQUILIBRIUM: @@ -6272,66 +6438,67 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu } - auto const iZone = config->GetiZone(); - /*--- Loop over all the vertices on this boundary marker ---*/ SU2_OMP_FOR_DYN(OMP_MIN_SIZE) - for (unsigned long iVertex = 0; iVertex < geometry->GetnVertexSpan(val_marker,iSpan); iVertex++) { + for (iVertex = 0; iVertex < geometry->GetnVertexSpan(val_marker,iSpan); iVertex++) { /*--- using the other vertex information for retrieving some information ---*/ - auto oldVertex = geometry->turbovertex[val_marker][iSpan][iVertex]->GetOldVertex(); - auto V_boundary= GetCharacPrimVar(val_marker, oldVertex); + oldVertex = geometry->turbovertex[val_marker][iSpan][iVertex]->GetOldVertex(); + V_boundary= GetCharacPrimVar(val_marker, oldVertex); /*--- Index of the closest interior node ---*/ - auto Point_Normal = geometry->vertex[val_marker][oldVertex]->GetNormal_Neighbor(); + Point_Normal = geometry->vertex[val_marker][oldVertex]->GetNormal_Neighbor(); /*--- Normal vector for this vertex (negate for outward convention), * this normal is scaled with the area of the face of the element ---*/ geometry->vertex[val_marker][oldVertex]->GetNormal(Normal); - for (unsigned short iDim = 0; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; + for (iDim = 0; iDim < nDim; iDim++) Normal[iDim] = -Normal[iDim]; conv_numerics->SetNormal(Normal); /*--- find the node related to the vertex ---*/ - auto iPoint = geometry->turbovertex[val_marker][iSpan][iVertex]->GetNode(); + iPoint = geometry->turbovertex[val_marker][iSpan][iVertex]->GetNode(); /*--- Normalize Normal vector for this vertex (already for outward convention) ---*/ geometry->turbovertex[val_marker][iSpan][iVertex]->GetNormal(UnitNormal); geometry->turbovertex[val_marker][iSpan][iVertex]->GetTurboNormal(turboNormal); /*--- Retrieve solution at this boundary node ---*/ - auto V_domain = nodes->GetPrimitive(iPoint); + V_domain = nodes->GetPrimitive(iPoint); /*--- Retrieve domain Secondary variables ---*/ - auto S_domain = nodes->GetSecondary(iPoint); + S_domain = nodes->GetSecondary(iPoint); /*--- Compute the internal state u_i ---*/ - su2double Velocity2_i = 0; - for (unsigned short iDim = 0; iDim < nDim; iDim++) + Velocity2_i = 0; + for (iDim = 0; iDim < nDim; iDim++) { Velocity_i[iDim] = nodes->GetVelocity(iPoint,iDim); Velocity2_i += Velocity_i[iDim]*Velocity_i[iDim]; } - auto Density_i = nodes->GetDensity(iPoint); + Density_i = nodes->GetDensity(iPoint); - auto Energy_i = nodes->GetEnergy(iPoint); - auto StaticEnergy_i = Energy_i - 0.5*Velocity2_i; + Energy_i = nodes->GetEnergy(iPoint); + StaticEnergy_i = Energy_i - 0.5*Velocity2_i; GetFluidModel()->SetTDState_rhoe(Density_i, StaticEnergy_i); - auto Pressure_i = GetFluidModel()->GetPressure(); + Pressure_i = GetFluidModel()->GetPressure(); ComputeTurboVelocity(Velocity_i, turboNormal, turboVelocity, config->GetMarker_All_TurbomachineryFlag(val_marker),config->GetKind_TurboMachinery(iZone)); - deltaprim[0] = Density_i - AverageDensity[val_marker][iSpan]; - deltaprim[1] = turboVelocity[0] - AverageTurboVelocity[val_marker][iSpan][0]; - deltaprim[2] = turboVelocity[1] - AverageTurboVelocity[val_marker][iSpan][1]; if (nDim == 2){ + deltaprim[0] = Density_i - AverageDensity[val_marker][iSpan]; + deltaprim[1] = turboVelocity[0] - AverageTurboVelocity[val_marker][iSpan][0]; + deltaprim[2] = turboVelocity[1] - AverageTurboVelocity[val_marker][iSpan][1]; deltaprim[3] = Pressure_i - AveragePressure[val_marker][iSpan]; } else{ + deltaprim[0] = Density_i - AverageDensity[val_marker][iSpan]; + deltaprim[1] = turboVelocity[0] - AverageTurboVelocity[val_marker][iSpan][0]; + deltaprim[2] = turboVelocity[1] - AverageTurboVelocity[val_marker][iSpan][1]; deltaprim[3] = turboVelocity[2] - AverageTurboVelocity[val_marker][iSpan][2]; deltaprim[4] = Pressure_i - AveragePressure[val_marker][iSpan]; } @@ -6341,13 +6508,8 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu conv_numerics->GetCharJump(AverageSoundSpeed, AverageDensity[val_marker][iSpan], deltaprim, cj); - auto pitch = geometry->GetMaxAngularCoord(val_marker, iSpan) - geometry->GetMinAngularCoord(val_marker,iSpan); - auto theta = geometry->turbovertex[val_marker][iSpan][iVertex]->GetRelAngularCoord(); - - auto const AvgMach = AverageTurboMach[0]*AverageTurboMach[0] + AverageTurboMach[1]*AverageTurboMach[1]; - auto Beta_inf= I*complex(sqrt(1.0 - AvgMach)); - su2double TwoPiThetaFreq_Pitch; - long freq; + pitch = geometry->GetMaxAngularCoord(val_marker, iSpan) - geometry->GetMinAngularCoord(val_marker,iSpan); + theta = geometry->turbovertex[val_marker][iSpan][iVertex]->GetRelAngularCoord(); switch(config->GetKind_Data_Giles(Marker_Tag)) { @@ -6357,18 +6519,11 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu case TOTAL_CONDITIONS_PT: case MIXING_IN:case TOTAL_CONDITIONS_PT_1D: case MIXING_IN_1D: if(config->GetSpatialFourier()){ - - /* --- Initial definition of variables ---*/ - auto c2js = complex(0.0,0.0); - auto c3js = complex(0.0,0.0); - auto c2ks = complex(0.0,0.0); - auto c3ks = complex(0.0,0.0); - auto c2js_Re = c2js.real(); - auto c3js_Re = c3js.real(); - su2double Beta_inf2; - if (AvgMach <= 1.0){ - for(unsigned long k=0; k < 2*kend_max+1; k++){ + Beta_inf= I*complex(sqrt(1.0 - AvgMach)); + c2js = complex(0.0,0.0); + c3js = complex(0.0,0.0); + for(k=0; k < 2*kend_max+1; k++){ freq = k - kend_max; if(freq >= (long)(-kend) && freq <= (long)(kend) && AverageTurboMach[0] > config->GetAverageMachLimit()){ TwoPiThetaFreq_Pitch = 2*PI_NUMBER*freq*theta/pitch; @@ -6387,10 +6542,16 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu c2js_Re = c2js.real(); c3js_Re = c3js.real(); - dcjs[0] = 0.0 - cj[0]; - dcjs[1] = c2js_Re - cj[1]; - dcjs[2] = 0.0 - cj[2]; - dcjs[nDim] = c3js_Re - cj[nDim]; // Overwrites previous value in 2D case + if (nDim == 2){ + dcjs[0] = 0.0 - cj[0]; + dcjs[1] = c2js_Re - cj[1]; + dcjs[2] = c3js_Re - cj[2]; + }else{ + dcjs[0] = 0.0 - cj[0]; + dcjs[1] = c2js_Re - cj[1]; + dcjs[2] = 0.0 - cj[2]; + dcjs[3] = c3js_Re - cj[3]; + } }else{ if (AverageTurboVelocity[val_marker][iSpan][1] >= 0.0){ @@ -6398,21 +6559,40 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu }else{ Beta_inf2= sqrt(AvgMach-1.0); } + if (nDim == 2){ + c2js_Re = -cj[3]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); + c3js_Re = cj[3]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); + c3js_Re *= (Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); + }else{ + c2js_Re = -cj[4]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); + c3js_Re = cj[4]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); + c3js_Re *= (Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); + } - c2js_Re = -cj[nDim+1]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - c3js_Re = cj[nDim+1]*(Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - c3js_Re *= (Beta_inf2 + AverageTurboMach[1])/( 1.0 + AverageTurboMach[0]); - dcjs[0] = 0.0 - cj[0]; - dcjs[1] = c2js_Re - cj[1]; - dcjs[2] = 0.0 - cj[2]; - dcjs[nDim] = c3js_Re - cj[nDim]; + if (nDim == 2){ + dcjs[0] = 0.0 - cj[0]; + dcjs[1] = c2js_Re - cj[1]; + dcjs[2] = c3js_Re - cj[2]; + }else{ + dcjs[0] = 0.0 - cj[0]; + dcjs[1] = c2js_Re - cj[1]; + dcjs[2] = 0.0 - cj[2]; + dcjs[3] = c3js_Re - cj[3]; + } + } + } + else{ + if (nDim == 2){ + dcjs[0] = 0.0; + dcjs[1] = 0.0; + dcjs[2] = 0.0; + }else{ + dcjs[0] = 0.0; + dcjs[1] = 0.0; + dcjs[2] = 0.0; + dcjs[3] = 0.0; } - }else{ - dcjs[0] = 0.0; - dcjs[1] = 0.0; - dcjs[2] = 0.0; - dcjs[nDim] = 0.0; } /* --- Impose Inlet BC Reflecting--- */ delta_c[0] = relfacAvg*c_avg[0] + relfacFou*dcjs[0]; @@ -6431,7 +6611,6 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu /* --- implementation of Giles BC---*/ if(config->GetSpatialFourier()){ - su2double GilesBeta, cOutjs_Re; if (AvgMach > 1.0){ /* --- supersonic Giles implementation ---*/ if (AverageTurboVelocity[val_marker][iSpan][1] >= 0.0){ @@ -6455,9 +6634,9 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu }else{ /* --- subsonic Giles implementation ---*/ - auto cOutjs = complex(0.0,0.0); - auto cOutks = complex(0.0,0.0); - for(unsigned long k=0; k < 2*kend_max+1; k++){ + Beta_inf= I*complex(sqrt(1.0 - AvgMach)); + cOutjs = complex(0.0,0.0); + for(k=0; k < 2*kend_max+1; k++){ freq = k - kend_max; if(freq >= (long)(-kend) && freq <= (long)(kend) && AverageTurboMach[0] > config->GetAverageMachLimit()){ TwoPiThetaFreq_Pitch = 2*PI_NUMBER*freq*theta/pitch; @@ -6472,25 +6651,41 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu } cOutjs_Re = cOutjs.real(); - dcjs[nDim+1] = cOutjs_Re - cj[nDim+1]; + if (nDim == 2){ + dcjs[3] = cOutjs_Re - cj[3]; + } + else{ + dcjs[4] = cOutjs_Re - cj[4]; + } } } else{ - dcjs[nDim+1] = 0.0; + if (nDim == 2){ + dcjs[3] = 0.0; + } + else{ + dcjs[4] = 0.0; + } } /* --- Impose Outlet BC Non-Reflecting --- */ delta_c[0] = cj[0]; delta_c[1] = cj[1]; delta_c[2] = cj[2]; - delta_c[3] = cj[3]; - delta_c[nDim+1] = relfacAvg*c_avg[nDim+1] + relfacFou*dcjs[nDim+1]; + if (nDim == 2){ + delta_c[3] = relfacAvg*c_avg[3] + relfacFou*dcjs[3]; + } + else{ + delta_c[3] = cj[3]; + delta_c[4] = relfacAvg*c_avg[4] + relfacFou*dcjs[4]; + } + /*--- Automatically impose supersonic autoflow ---*/ if (abs(AverageTurboMach[0]) > 1.0000){ delta_c[0] = 0.0; delta_c[1] = 0.0; delta_c[2] = 0.0; - delta_c[3] = 0.0; + delta_c[2] = 0.0; if (nDim == 3)delta_c[4] = 0.0; } @@ -6502,25 +6697,31 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu } /*--- Compute primitive jump from characteristic variables ---*/ - for (unsigned short iVar = 0; iVar < nVar; iVar++) + for (iVar = 0; iVar < nVar; iVar++) { deltaprim[iVar]=0.0; - for (unsigned short jVar = 0; jVar < nVar; jVar++) + for (jVar = 0; jVar < nVar; jVar++) { deltaprim[iVar] += R_Matrix[iVar][jVar]*delta_c[jVar]; } } /*--- retrieve boundary variables ---*/ - su2double Density_b = AverageDensity[val_marker][iSpan] + deltaprim[0]; + Density_b = AverageDensity[val_marker][iSpan] + deltaprim[0]; turboVelocity[0] = AverageTurboVelocity[val_marker][iSpan][0] + deltaprim[1]; turboVelocity[1] = AverageTurboVelocity[val_marker][iSpan][1] + deltaprim[2]; - turboVelocity[nDim-1] = AverageTurboVelocity[val_marker][iSpan][nDim-1] + deltaprim[nDim]; - su2double Pressure_b = AveragePressure[val_marker][iSpan] + deltaprim[nDim+1]; + if(nDim == 2){ + Pressure_b = AveragePressure[val_marker][iSpan] + deltaprim[3]; + } + else{ + turboVelocity[2] = AverageTurboVelocity[val_marker][iSpan][2] + deltaprim[3]; + Pressure_b = AveragePressure[val_marker][iSpan] + deltaprim[4]; + } + ComputeBackVelocity(turboVelocity, turboNormal, Velocity_b, config->GetMarker_All_TurbomachineryFlag(val_marker), config->GetKind_TurboMachinery(iZone)); - su2double Velocity2_b = 0.0; - for (unsigned short iDim = 0; iDim < nDim; iDim++) { + Velocity2_b = 0.0; + for (iDim = 0; iDim < nDim; iDim++) { Velocity2_b+= Velocity_b[iDim]*Velocity_b[iDim]; } @@ -6528,20 +6729,20 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu Pressure_b = Pressure_i; Density_b = Density_i; Velocity2_b = 0.0; - for (unsigned short iDim = 0; iDim < nDim; iDim++) { + for (iDim = 0; iDim < nDim; iDim++) { Velocity_b[iDim] = Velocity_i[iDim]; Velocity2_b+= Velocity_b[iDim]*Velocity_b[iDim]; } } GetFluidModel()->SetTDState_Prho(Pressure_b, Density_b); - su2double Energy_b = GetFluidModel()->GetStaticEnergy() + 0.5*Velocity2_b; - su2double Temperature_b= GetFluidModel()->GetTemperature(); - su2double Enthalpy_b = Energy_b + Pressure_b/Density_b; + Energy_b = GetFluidModel()->GetStaticEnergy() + 0.5*Velocity2_b; + Temperature_b= GetFluidModel()->GetTemperature(); + Enthalpy_b = Energy_b + Pressure_b/Density_b; /*--- Primitive variables, using the derived quantities ---*/ V_boundary[0] = Temperature_b; - for (unsigned short iDim = 0; iDim < nDim; iDim++) + for (iDim = 0; iDim < nDim; iDim++) V_boundary[iDim+1] = Velocity_b[iDim]; V_boundary[nDim+1] = Pressure_b; V_boundary[nDim+2] = Density_b; @@ -6569,12 +6770,12 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu LinSysRes.AddBlock(iPoint, residual); /*--- Jacobian contribution for implicit integration ---*/ - if (config->GetKind_TimeIntScheme() == EULER_IMPLICIT) + if (implicit) Jacobian.AddBlock2Diag(iPoint, residual.jacobian_i); /*--- Viscous contribution ---*/ - if (config->GetViscous()) { + if (viscous) { /*--- Set laminar and eddy viscosity at the infinity ---*/ @@ -6628,7 +6829,7 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu /*--- Jacobian contribution for implicit integration ---*/ - if (config->GetKind_TimeIntScheme() == EULER_IMPLICIT) + if (implicit) Jacobian.SubtractBlock2Diag(iPoint, residual.jacobian_i); } @@ -6650,11 +6851,11 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu delete [] delta_c; delete [] deltaprim; delete [] cj; - for (unsigned short iVar = 0; iVar < nVar; iVar++) + for (iVar = 0; iVar < nVar; iVar++) { delete [] R_Matrix[iVar]; } - for (unsigned short iVar = 0; iVar < nVar-1; iVar++) + for (iVar = 0; iVar < nVar-1; iVar++) { delete [] R_c_inv[iVar]; delete [] R_c[iVar]; @@ -6672,73 +6873,6 @@ void CEulerSolver::BC_Giles(CGeometry *geometry, CSolver **solver_container, CNu delete [] turboVelocity; } -void CEulerSolver::BC_Giles_Total_Inlet( CNumerics *conv_numerics, CConfig *config, unsigned short val_marker, - su2double *&c_avg, su2double *&R, su2double **&R_c_inv, su2double **&R_c, unsigned short iSpan, unsigned short SpanwisePosition) { - - /*--- Calculates boundry condition for quasi-3D and 1D total boundary conditions ---*/ - - /*--- Retrieve the specified boundary conditions. ---*/ - auto const Marker_Tag = config->GetMarker_All_TagBound(val_marker); - auto P_Total = config->GetGiles_Var1(Marker_Tag); - auto T_Total = config->GetGiles_Var2(Marker_Tag); - auto const FlowDir = config->GetGiles_FlowDir(Marker_Tag); - auto const alphaIn_BC = atan(FlowDir[1]/FlowDir[0]); - - su2double gammaIn_BC = 0; - if (nDim == 3){ - gammaIn_BC = FlowDir[2]; //atan(FlowDir[2]/FlowDir[0]); - } - - /*--- Non-dim. the inputs---*/ - P_Total /= config->GetPressure_Ref(); - T_Total /= config->GetTemperature_Ref(); - - /* --- Computes the total state --- */ - GetFluidModel()->SetTDState_PT(P_Total, T_Total); - auto const Enthalpy_BC = GetFluidModel()->GetStaticEnergy()+ GetFluidModel()->GetPressure()/GetFluidModel()->GetDensity(); - auto const Entropy_BC = GetFluidModel()->GetEntropy(); - - /* --- Computes the inverse matrix R_c --- */ - conv_numerics->ComputeResJacobianGiles(GetFluidModel(), AveragePressure[val_marker][iSpan], AverageDensity[val_marker][iSpan], - AverageTurboVelocity[val_marker][iSpan], alphaIn_BC, gammaIn_BC, R_c, R_c_inv); - - GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][SpanwisePosition], AverageDensity[val_marker][SpanwisePosition]); - auto AverageEnthalpy = GetFluidModel()->GetStaticEnergy() + AveragePressure[val_marker][SpanwisePosition]/AverageDensity[val_marker][SpanwisePosition]; - auto AverageEntropy = GetFluidModel()->GetEntropy(); - - - su2double avgVel2 = 0.0; - for (unsigned short iDim = 0; iDim < nDim; iDim++) avgVel2 += AverageVelocity[val_marker][iSpan][iDim]*AverageVelocity[val_marker][iSpan][iDim]; - - R[0] = -(AverageEntropy - Entropy_BC); - R[1] = -(AverageTurboVelocity[val_marker][SpanwisePosition][1] - tan(alphaIn_BC)*AverageTurboVelocity[val_marker][SpanwisePosition][0]); - R[2] = -(AverageTurboVelocity[val_marker][SpanwisePosition][2] - tan(gammaIn_BC)*AverageTurboVelocity[val_marker][SpanwisePosition][0]); - R[nDim] = -(AverageEnthalpy + 0.5*avgVel2 - Enthalpy_BC); - - /* --- Compute the avg component c_avg = R_c^-1 * R --- */ - for (unsigned short iVar = 0; iVar < nVar-1; iVar++){ - c_avg[iVar] = 0.0; - for (unsigned short jVar = 0; jVar < nVar-1; jVar++){ - c_avg[iVar] += R_c_inv[iVar][jVar]*R[jVar]; - } - } -} - -void CEulerSolver::BC_Giles_Mixing(CNumerics *conv_numerics, unsigned short val_marker, su2double *&deltaprim, su2double *&c_avg, unsigned short SpanwisePosition) { - - /* --- Compute average jump of primitive at the mixing-plane interface--- */ - deltaprim[0] = ExtAverageDensity[val_marker][SpanwisePosition] - AverageDensity[val_marker][SpanwisePosition]; - deltaprim[1] = ExtAverageTurboVelocity[val_marker][SpanwisePosition][0] - AverageTurboVelocity[val_marker][SpanwisePosition][0]; - deltaprim[2] = ExtAverageTurboVelocity[val_marker][SpanwisePosition][1] - AverageTurboVelocity[val_marker][SpanwisePosition][1]; - deltaprim[3] = ExtAverageTurboVelocity[val_marker][SpanwisePosition][2] - AverageTurboVelocity[val_marker][SpanwisePosition][2]; - deltaprim[nDim+1] = ExtAveragePressure[val_marker][SpanwisePosition] - AveragePressure[val_marker][SpanwisePosition]; - - /* --- Compute average jump of charachteristic variable at the mixing-plane interface--- */ - GetFluidModel()->SetTDState_Prho(AveragePressure[val_marker][SpanwisePosition], AverageDensity[val_marker][SpanwisePosition]); - auto const AverageSoundSpeed = GetFluidModel()->GetSoundSpeed(); - conv_numerics->GetCharJump(AverageSoundSpeed, AverageDensity[val_marker][SpanwisePosition], deltaprim, c_avg); -} - void CEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solver_container, CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) { From c5872c4ded8f6c14e3cdc4488abf138418ca1af9 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Thu, 5 Sep 2024 16:04:55 +0200 Subject: [PATCH 41/61] Resolving releasing resources warning --- Common/include/option_structure.inl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Common/include/option_structure.inl b/Common/include/option_structure.inl index 01ed6de9bf9..40a2a26dbc5 100644 --- a/Common/include/option_structure.inl +++ b/Common/include/option_structure.inl @@ -1618,7 +1618,11 @@ class COptionTurboPerformance : public COptionBase { this->name = option_field_name; } - ~COptionTurboPerformance() override{}; + ~COptionTurboPerformance() override{ + delete[] *markers; + delete[] *marker_turboIn; + delete[] *marker_turboOut; + }; string SetValue(const vector& option_value) override { COptionBase::SetValue(option_value); const int mod_num = 2; From 52d8ca921e806b7424ff4b3fe6e3b6d63d7195f3 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Thu, 5 Sep 2024 16:24:00 +0200 Subject: [PATCH 42/61] Actually releasing resources --- Common/include/option_structure.inl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Common/include/option_structure.inl b/Common/include/option_structure.inl index 40a2a26dbc5..00318abbed3 100644 --- a/Common/include/option_structure.inl +++ b/Common/include/option_structure.inl @@ -1619,9 +1619,9 @@ class COptionTurboPerformance : public COptionBase { } ~COptionTurboPerformance() override{ - delete[] *markers; - delete[] *marker_turboIn; - delete[] *marker_turboOut; + delete[] markers; + delete[] marker_turboIn; + delete[] marker_turboOut; }; string SetValue(const vector& option_value) override { COptionBase::SetValue(option_value); From bfcc97cbbbb4ec6458e5158ef4448d097a917acd Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Thu, 5 Sep 2024 17:31:33 +0200 Subject: [PATCH 43/61] release --- Common/include/option_structure.inl | 6 +----- Common/src/CConfig.cpp | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Common/include/option_structure.inl b/Common/include/option_structure.inl index 00318abbed3..01ed6de9bf9 100644 --- a/Common/include/option_structure.inl +++ b/Common/include/option_structure.inl @@ -1618,11 +1618,7 @@ class COptionTurboPerformance : public COptionBase { this->name = option_field_name; } - ~COptionTurboPerformance() override{ - delete[] markers; - delete[] marker_turboIn; - delete[] marker_turboOut; - }; + ~COptionTurboPerformance() override{}; string SetValue(const vector& option_value) override { COptionBase::SetValue(option_value); const int mod_num = 2; diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 4e89974f902..a71cc0a0ded 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -8295,9 +8295,9 @@ CConfig::~CConfig() { delete [] RelaxFactorFourier; delete [] nSpan_iZones; - delete [] Marker_Turbomachinery; delete [] Marker_TurboBoundIn; delete [] Marker_TurboBoundOut; + delete [] Marker_Turbomachinery; delete [] Marker_Riemann; delete [] Marker_Giles; From b8a682f58f7b7105412d70d208eaecb3d815feae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Bl=C3=BChdorn?= Date: Fri, 6 Sep 2024 00:15:40 +0200 Subject: [PATCH 44/61] AD tool updates. --- externals/codi | 2 +- externals/medi | 2 +- externals/opdi | 2 +- meson_scripts/init.py | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/externals/codi b/externals/codi index c6b039e5c9e..762ba7698e3 160000 --- a/externals/codi +++ b/externals/codi @@ -1 +1 @@ -Subproject commit c6b039e5c9edb7675f90ffc725f9dd8e66571264 +Subproject commit 762ba7698e3ceaa1b17aa299421ddd418f00b823 diff --git a/externals/medi b/externals/medi index ab3a7688f6d..7d550831e0e 160000 --- a/externals/medi +++ b/externals/medi @@ -1 +1 @@ -Subproject commit ab3a7688f6d518f8d940eb61a341d89f51922ba4 +Subproject commit 7d550831e0e233a85b9d9af9c181d7ecb2929946 diff --git a/externals/opdi b/externals/opdi index 8c897988172..a6b9655c240 160000 --- a/externals/opdi +++ b/externals/opdi @@ -1 +1 @@ -Subproject commit 8c89798817253abb017d857a0ae7f0520187645c +Subproject commit a6b9655c240af2a35454a61727e5bbbbaa3a425f diff --git a/meson_scripts/init.py b/meson_scripts/init.py index bc58f9a9564..2fde106706a 100755 --- a/meson_scripts/init.py +++ b/meson_scripts/init.py @@ -55,11 +55,11 @@ def init_submodules( # This information of the modules is used if projects was not cloned using git # The sha tag must be maintained manually to point to the correct commit - sha_version_codi = "c6b039e5c9edb7675f90ffc725f9dd8e66571264" + sha_version_codi = "762ba7698e3ceaa1b17aa299421ddd418f00b823" github_repo_codi = "https://github.com/scicompkl/CoDiPack" - sha_version_medi = "ab3a7688f6d518f8d940eb61a341d89f51922ba4" + sha_version_medi = "7d550831e0e233a85b9d9af9c181d7ecb2929946" github_repo_medi = "https://github.com/SciCompKL/MeDiPack" - sha_version_opdi = "8c89798817253abb017d857a0ae7f0520187645c" + sha_version_opdi = "a6b9655c240af2a35454a61727e5bbbbaa3a425f" github_repo_opdi = "https://github.com/SciCompKL/OpDiLib" sha_version_meson = "41c650a040d50e0912d268af7a903a9ce1456dfa" github_repo_meson = "https://github.com/mesonbuild/meson" From b2cfab0d9640e8e076b3997cf0be197d7c83e6f7 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 11 Sep 2024 17:35:17 +0200 Subject: [PATCH 45/61] Added test case, additional turbo outputs and fixed formatting --- SU2_CFD/src/interfaces/CInterface.cpp | 3 +- SU2_CFD/src/output/CFlowCompOutput.cpp | 4 + SU2_CFD/src/output/CFlowOutput.cpp | 4 + TestCases/hybrid_regression.py | 9 ++ TestCases/parallel_regression.py | 9 ++ TestCases/serial_regression.py | 9 ++ .../multi_interface/multi_interface.cfg | 151 ++++++++++++++++++ .../turbomachinery/multi_interface/zone_1.cfg | 6 + .../turbomachinery/multi_interface/zone_2.cfg | 6 + .../turbomachinery/multi_interface/zone_3.cfg | 6 + 10 files changed, 206 insertions(+), 1 deletion(-) create mode 100644 TestCases/turbomachinery/multi_interface/multi_interface.cfg create mode 100644 TestCases/turbomachinery/multi_interface/zone_1.cfg create mode 100644 TestCases/turbomachinery/multi_interface/zone_2.cfg create mode 100644 TestCases/turbomachinery/multi_interface/zone_3.cfg diff --git a/SU2_CFD/src/interfaces/CInterface.cpp b/SU2_CFD/src/interfaces/CInterface.cpp index 3ae5d0787b4..04a680cf7b2 100644 --- a/SU2_CFD/src/interfaces/CInterface.cpp +++ b/SU2_CFD/src/interfaces/CInterface.cpp @@ -300,7 +300,7 @@ void CInterface::PreprocessAverage(CGeometry *donor_geometry, CGeometry *target_ } if(test2 < dist2){ dist2 = test2; - tSpan =jSpan; + tSpan = jSpan; } } @@ -317,6 +317,7 @@ void CInterface::PreprocessAverage(CGeometry *donor_geometry, CGeometry *target_ SpanLevelDonor[iSpan] = kSpan; SpanValueCoeffTarget[iSpan] = (SpanValuesTarget[iSpan] - SpanValuesDonor[kSpan]) /(SpanValuesDonor[kSpan + 1] - SpanValuesDonor[kSpan]); + cout << SpanValueCoeffTarget[iSpan] << endl; break; default: SU2_MPI::Error("MixingPlane interface option not implemented yet", CURRENT_FUNCTION); diff --git a/SU2_CFD/src/output/CFlowCompOutput.cpp b/SU2_CFD/src/output/CFlowCompOutput.cpp index 8108765de02..fe7c9fbf397 100644 --- a/SU2_CFD/src/output/CFlowCompOutput.cpp +++ b/SU2_CFD/src/output/CFlowCompOutput.cpp @@ -592,6 +592,10 @@ void CFlowCompOutput::LoadTurboHistoryData(std::shared_ptrGetOutletState().GetTotalPressure()); SetHistoryOutputValue("PressureIn_" + tag.str(), BladePerf->GetInletState().GetPressure()); SetHistoryOutputValue("PressureOut_" + tag.str(), BladePerf->GetOutletState().GetPressure()); + SetHistoryOutputValue("TotalTemperatureIn_" + tag.str(), BladePerf->GetInletState().GetTotalTemperature()); + SetHistoryOutputValue("TotalTemperatureOut_" + tag.str(), BladePerf->GetOutletState().GetTotalTemperature()); + SetHistoryOutputValue("TemperatureIn_" + tag.str(), BladePerf->GetInletState().GetTemperature()); + SetHistoryOutputValue("TemperatureOut_" + tag.str(), BladePerf->GetOutletState().GetTemperature()); SetHistoryOutputValue("DensityIn_" + tag.str(), BladePerf->GetInletState().GetDensity()); SetHistoryOutputValue("DensityOut_" + tag.str(), BladePerf->GetOutletState().GetDensity()); SetHistoryOutputValue("NormalVelocityIn_" + tag.str(), BladePerf->GetInletState().GetVelocity()[0]); diff --git a/SU2_CFD/src/output/CFlowOutput.cpp b/SU2_CFD/src/output/CFlowOutput.cpp index 7c7d5632445..895419f264d 100644 --- a/SU2_CFD/src/output/CFlowOutput.cpp +++ b/SU2_CFD/src/output/CFlowOutput.cpp @@ -4066,6 +4066,10 @@ void CFlowOutput::AddTurboOutput(unsigned short nZone){ AddHistoryOutput("TotalPressureOut_" + tag, "TotPressureOut_" + tag, ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Flow angle in " + tag, HistoryFieldType::DEFAULT); AddHistoryOutput("PressureIn_" + tag, "PressureIn_" + tag, ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Pressure ratio " + tag, HistoryFieldType::DEFAULT); AddHistoryOutput("PressureOut_" + tag, "PressureOut_" + tag, ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Flow angle in " + tag, HistoryFieldType::DEFAULT); + AddHistoryOutput("TotalTemperatureIn_" + tag, "TotTemperatureIn_" + tag, ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Temperature ratio " + tag, HistoryFieldType::DEFAULT); + AddHistoryOutput("TotalTemperatureOut_" + tag, "TotTemperatureOut_" + tag, ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Flow angle in " + tag, HistoryFieldType::DEFAULT); + AddHistoryOutput("TemperatureIn_" + tag, "TemperatureIn_" + tag, ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Temperature ratio " + tag, HistoryFieldType::DEFAULT); + AddHistoryOutput("TemperatureOut_" + tag, "TemperatureOut_" + tag, ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Flow angle in " + tag, HistoryFieldType::DEFAULT); AddHistoryOutput("DensityIn_" + tag, "DensityIn_" + tag, ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Flow angle out " + tag, HistoryFieldType::DEFAULT); AddHistoryOutput("DensityOut_" + tag, "DensityOut_" + tag, ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Absolute flow angle in " + tag, HistoryFieldType::DEFAULT); AddHistoryOutput("NormalVelocityIn_" + tag, "NormalVelocityIn_" + tag, ScreenOutputFormat::SCIENTIFIC, "TURBO_PERF", "Absolute flow angle out " + tag, HistoryFieldType::DEFAULT); diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index c893649c1dd..67cbc339a46 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -582,6 +582,15 @@ def main(): transonic_stator_restart.test_vals_aarch64 = [-5.007735, -3.099310, -2.751696, 1.091966, -3.542819, 2.163237, -471630, 94.866, -0.035738] test_list.append(transonic_stator_restart) + # Multiple turbomachinery interface restart + multi_interface = TestCase('multi_interface') + multi_interface.cfg_dir = "turbomachinery/multi_interface" + multi_interface.cfg_file = "mutl_interface_rst.cfg" + multi_interface.test_iter = 5 + multi_interface.test_vals = [-8.642669, -8.899958, -9.349881] + multi_interface.test_vals_aarch64 = [-8.642669, -8.899958, -9.349881] + test_list.append(multi_interface) + ###################################### ### Sliding Mesh ### ###################################### diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 0137b08806c..c73fbd31804 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1112,6 +1112,15 @@ def main(): transonic_stator_restart.test_vals_aarch64 = [-5.011834, -3.091110, -2.757795, 1.087934, -3.544707, 2.166101, -471630, 94.868, -0.035888] test_list.append(transonic_stator_restart) + # Multiple turbomachinery interface restart + multi_interface = TestCase('multi_interface') + multi_interface.cfg_dir = "turbomachinery/multi_interface" + multi_interface.cfg_file = "mutl_interface_rst.cfg" + multi_interface.test_iter = 5 + multi_interface.test_vals = [-8.642669, -8.899958, -9.349881] + multi_interface.test_vals_aarch64 = [-8.642669, -8.899958, -9.349881] + test_list.append(multi_interface) + ###################################### ### Sliding Mesh ### ###################################### diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 080b41053b7..870b0a2154b 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -889,6 +889,15 @@ def main(): transonic_stator_restart.test_vals_aarch64 = [-5.008547, -3.102420, -2.752033, 1.091152, -3.543849, 2.169844, -471630, 94.866, -0.035806] test_list.append(transonic_stator_restart) + # Multiple turbomachinery interface restart + multi_interface = TestCase('multi_interface') + multi_interface.cfg_dir = "turbomachinery/multi_interface" + multi_interface.cfg_file = "mutl_interface_rst.cfg" + multi_interface.test_iter = 5 + multi_interface.test_vals = [-8.642669, -8.899958, -9.349881] + multi_interface.test_vals_aarch64 = [-8.642669, -8.899958, -9.349881] + test_list.append(multi_interface) + ###################################### ### Sliding Mesh ### diff --git a/TestCases/turbomachinery/multi_interface/multi_interface.cfg b/TestCases/turbomachinery/multi_interface/multi_interface.cfg new file mode 100644 index 00000000000..d2f56da2fc4 --- /dev/null +++ b/TestCases/turbomachinery/multi_interface/multi_interface.cfg @@ -0,0 +1,151 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % +% SU2 configuration file % +% Case description: Quarter Concentirc Cylinder Channel w/ % +% Different Interface Methods % +% Author: J. Kelly % +% Institution: University of Liverpool % +% Date: Sep 5th, 2024 % +% File Version 8.0.1 "Harrier" % +% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +MULTIZONE= YES +CONFIG_LIST=(zone_1.cfg,zone_2.cfg,zone_3.cfg) +NZONES=3 +% +% ------------- DIRECT, ADJOINT, AND LINEARIZED PROBLEM DEFINITION ------------% +% +SOLVER= RANS +KIND_TURB_MODEL= SA +MATH_PROBLEM= DIRECT +RESTART_SOL= YES +% +% -------------------- COMPRESSIBLE FREE-STREAM DEFINITION --------------------% +% +MACH_NUMBER= 0.35 +AOA= 0.0 +FREESTREAM_PRESSURE= 100.0E+03 +FREESTREAM_TEMPERATURE= 300.0 +FREESTREAM_DENSITY= 1.205 +FREESTREAM_OPTION= TEMPERATURE_FS +FREESTREAM_TURBULENCEINTENSITY = 0.05 +FREESTREAM_TURB2LAMVISCRATIO = 100.0 +INIT_OPTION= TD_CONDITIONS +% +% ---------------------- REFERENCE VALUE DEFINITION ---------------------------% +% +REF_ORIGIN_MOMENT_X = 0.00 +REF_ORIGIN_MOMENT_Y = 0.00 +REF_ORIGIN_MOMENT_Z = 0.00 +REF_LENGTH= 1.0 +REF_AREA= 1.0 +REF_DIMENSIONALIZATION= DIMENSIONAL +% +% ------------------------------ EQUATION OF STATE ----------------------------% +% +FLUID_MODEL= STANDARD_AIR +% +% --------------------------- VISCOSITY MODEL ---------------------------------% +% +VISCOSITY_MODEL= SUTHERLAND +MU_REF= 1.716E-5 +MU_T_REF= 273.15 +SUTHERLAND_CONSTANT= 110.4 +% +% --------------------------- THERMAL CONDUCTIVITY MODEL ----------------------% +% +CONDUCTIVITY_MODEL= CONSTANT_PRANDTL +% +% -------------------- BOUNDARY CONDITION DEFINITION --------------------------% +% +MARKER_HEATFLUX= (HUB1, 0.0, SHROUD1, 0.0, HUB2, 0.0, SHROUD2, 0.0, HUB3, 0.0, SHROUD3, 0.0) +MARKER_PERIODIC= (PER1, PER2, 0.0, 0.0, 0.0, 0.0, 0.0, 90.0, 0.0, 0.0, 0.0, PER4, PER3, 0.0, 0.0, 0.0, 0.0, 0.0, 90.0, 0.0, 0.0, 0.0, PER6, PER5, 0.0, 0.0, 0.0, 0.0, 0.0, 90.0, 0.0, 0.0, 0.0) +% +%-------- INFLOW/OUTFLOW BOUNDARY CONDITION SPECIFIC FOR TURBOMACHINERY --------% +% +MARKER_TURBOMACHINERY= (INFLOW, OUTMIX_0, INMIX_1, OUTMIX_1, INMIX_2, OUTFLOW) +MARKER_ZONE_INTERFACE= (OUTMIX_0, INMIX_1, OUTMIX_1, INMIX_2) +MARKER_FLUID_INTERFACE= (OUTMIX_0, INMIX_1) +MARKER_MIXINGPLANE_INTERFACE= (OUTMIX_1, INMIX_2) +MARKER_GILES= (INFLOW, TOTAL_CONDITIONS_PT, 104E+03, 300, 1.0, 0.0, 0.0, 1.0, 0.0, OUTMIX_1, MIXING_OUT, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, INMIX_2, MIXING_IN, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, OUTFLOW, STATIC_PRESSURE_1D, 90.0E+03, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0) +GILES_EXTRA_RELAXFACTOR= (0.05, 0.05) +SPATIAL_FOURIER= NO +% +%---------------------------- TURBOMACHINERY SIMULATION -----------------------------% +% +TURBOMACHINERY_KIND= AXIAL, AXIAL, AXIAL +TURBO_PERF_KIND= (TURBINE, TURBINE, TURBINE) +MIXINGPLANE_INTERFACE_KIND= LINEAR_INTERPOLATION +TURBULENT_MIXINGPLANE= YES +RAMP_OUTLET_PRESSURE= NO +AVERAGE_PROCESS_KIND= MIXEDOUT +PERFORMANCE_AVERAGE_PROCESS_KIND= MIXEDOUT +MIXEDOUT_COEFF= (1.0, 1.0E-05, 100) +AVERAGE_MACH_LIMIT= 0.05 +% +% ------------- COMMON PARAMETERS DEFINING THE NUMERICAL METHOD ---------------% +% +NUM_METHOD_GRAD= WEIGHTED_LEAST_SQUARES +CFL_NUMBER= 2.0 +CFL_ADAPT= YES +CFL_ADAPT_PARAM= ( 0.99, 1.01, 1.0, 20, 1E-4) +% +% ------------------------ LINEAR SOLVER DEFINITION ---------------------------% +% +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= LU_SGS +LINEAR_SOLVER_ERROR= 1E-4 +LINEAR_SOLVER_ITER= 5 +% +% ----------------------- SLOPE LIMITER DEFINITION ----------------------------% +% +VENKAT_LIMITER_COEFF= 0.01 +LIMITER_ITER= 999999 +% +% -------------------- FLOW NUMERICAL METHOD DEFINITION -----------------------% +% +CONV_NUM_METHOD_FLOW= ROE +MUSCL_FLOW= NO +SLOPE_LIMITER_FLOW= VENKATAKRISHNAN_WANG +TIME_DISCRE_FLOW= EULER_IMPLICIT +% +% -------------------- TURBULENT NUMERICAL METHOD DEFINITION ------------------% +% +CONV_NUM_METHOD_TURB= SCALAR_UPWIND +MUSCL_TURB= NO +SLOPE_LIMITER_TURB= VENKATAKRISHNAN +TIME_DISCRE_TURB= EULER_IMPLICIT +CFL_REDUCTION_TURB= 1.0 +% +% --------------------------- CONVERGENCE PARAMETERS --------------------------% +% +OUTER_ITER= 10 +CONV_FIELD= RMS_DENSITY +CONV_RESIDUAL_MINVAL= -10 +CONV_STARTITER= 0 +CONV_CAUCHY_ELEMS= 999 +CONV_CAUCHY_EPS= 1E-6 +SCREEN_OUTPUT= (OUTER_ITER, RMS_DENSITY[0], RMS_DENSITY[1], RMS_DENSITY[2]) +OUTPUT_FILES= RESTART +% +% ------------------------- INPUT/OUTPUT INFORMATION --------------------------% +% +MESH_FILENAME= three_zone_quarter_cyl.su2 +MESH_FORMAT= SU2 +MESH_OUT_FILENAME= mesh_out.su2 +SOLUTION_FILENAME= restart_flow.dat +SOLUTION_ADJ_FILENAME= solution_adj.dat +TABULAR_FORMAT= TECPLOT +CONV_FILENAME= history +RESTART_FILENAME= restart_flow.dat +RESTART_ADJ_FILENAME= restart_adj.dat +VOLUME_FILENAME= flow +VOLUME_ADJ_FILENAME= adjoint +GRAD_OBJFUNC_FILENAME= of_grad.dat +SURFACE_FILENAME= surface_flow +SURFACE_ADJ_FILENAME= surface_adjoint +OUTPUT_WRT_FREQ= 100 +HISTORY_WRT_FREQ_OUTER= 1 +WRT_ZONE_CONV= NO +WRT_ZONE_HIST= YES diff --git a/TestCases/turbomachinery/multi_interface/zone_1.cfg b/TestCases/turbomachinery/multi_interface/zone_1.cfg new file mode 100644 index 00000000000..3d7a019754a --- /dev/null +++ b/TestCases/turbomachinery/multi_interface/zone_1.cfg @@ -0,0 +1,6 @@ +% ----------------------- DYNAMIC MESH DEFINITION -----------------------------% +% +% +% Type of dynamic mesh (NONE, ROTATING_FRAME) +GRID_MOVEMENT= NONE +% diff --git a/TestCases/turbomachinery/multi_interface/zone_2.cfg b/TestCases/turbomachinery/multi_interface/zone_2.cfg new file mode 100644 index 00000000000..3d7a019754a --- /dev/null +++ b/TestCases/turbomachinery/multi_interface/zone_2.cfg @@ -0,0 +1,6 @@ +% ----------------------- DYNAMIC MESH DEFINITION -----------------------------% +% +% +% Type of dynamic mesh (NONE, ROTATING_FRAME) +GRID_MOVEMENT= NONE +% diff --git a/TestCases/turbomachinery/multi_interface/zone_3.cfg b/TestCases/turbomachinery/multi_interface/zone_3.cfg new file mode 100644 index 00000000000..3d7a019754a --- /dev/null +++ b/TestCases/turbomachinery/multi_interface/zone_3.cfg @@ -0,0 +1,6 @@ +% ----------------------- DYNAMIC MESH DEFINITION -----------------------------% +% +% +% Type of dynamic mesh (NONE, ROTATING_FRAME) +GRID_MOVEMENT= NONE +% From 1951aaad100177a2eb8a12565713761131620003 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 11 Sep 2024 17:41:14 +0200 Subject: [PATCH 46/61] Removing some debugging code --- SU2_CFD/src/interfaces/CInterface.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/SU2_CFD/src/interfaces/CInterface.cpp b/SU2_CFD/src/interfaces/CInterface.cpp index 04a680cf7b2..b9617c4c16e 100644 --- a/SU2_CFD/src/interfaces/CInterface.cpp +++ b/SU2_CFD/src/interfaces/CInterface.cpp @@ -317,7 +317,6 @@ void CInterface::PreprocessAverage(CGeometry *donor_geometry, CGeometry *target_ SpanLevelDonor[iSpan] = kSpan; SpanValueCoeffTarget[iSpan] = (SpanValuesTarget[iSpan] - SpanValuesDonor[kSpan]) /(SpanValuesDonor[kSpan + 1] - SpanValuesDonor[kSpan]); - cout << SpanValueCoeffTarget[iSpan] << endl; break; default: SU2_MPI::Error("MixingPlane interface option not implemented yet", CURRENT_FUNCTION); From 384686a28f8e51b3f1c013c5b69d10a1ff16114a Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 11 Sep 2024 18:18:43 +0200 Subject: [PATCH 47/61] typo --- TestCases/hybrid_regression.py | 2 +- TestCases/parallel_regression.py | 2 +- TestCases/serial_regression.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index 67cbc339a46..1882a0c260a 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -585,7 +585,7 @@ def main(): # Multiple turbomachinery interface restart multi_interface = TestCase('multi_interface') multi_interface.cfg_dir = "turbomachinery/multi_interface" - multi_interface.cfg_file = "mutl_interface_rst.cfg" + multi_interface.cfg_file = "multi_interface_rst.cfg" multi_interface.test_iter = 5 multi_interface.test_vals = [-8.642669, -8.899958, -9.349881] multi_interface.test_vals_aarch64 = [-8.642669, -8.899958, -9.349881] diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index c73fbd31804..c66cf38752c 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1115,7 +1115,7 @@ def main(): # Multiple turbomachinery interface restart multi_interface = TestCase('multi_interface') multi_interface.cfg_dir = "turbomachinery/multi_interface" - multi_interface.cfg_file = "mutl_interface_rst.cfg" + multi_interface.cfg_file = "multi_interface_rst.cfg" multi_interface.test_iter = 5 multi_interface.test_vals = [-8.642669, -8.899958, -9.349881] multi_interface.test_vals_aarch64 = [-8.642669, -8.899958, -9.349881] diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 870b0a2154b..c576fbf1419 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -892,7 +892,7 @@ def main(): # Multiple turbomachinery interface restart multi_interface = TestCase('multi_interface') multi_interface.cfg_dir = "turbomachinery/multi_interface" - multi_interface.cfg_file = "mutl_interface_rst.cfg" + multi_interface.cfg_file = "multi_interface_rst.cfg" multi_interface.test_iter = 5 multi_interface.test_vals = [-8.642669, -8.899958, -9.349881] multi_interface.test_vals_aarch64 = [-8.642669, -8.899958, -9.349881] From 21770104e1666adcb2e522d7badeb3bef1f0fe4c Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Wed, 11 Sep 2024 18:54:50 +0200 Subject: [PATCH 48/61] rename --- .../{multi_interface.cfg => multi_interface_rst.cfg} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename TestCases/turbomachinery/multi_interface/{multi_interface.cfg => multi_interface_rst.cfg} (100%) diff --git a/TestCases/turbomachinery/multi_interface/multi_interface.cfg b/TestCases/turbomachinery/multi_interface/multi_interface_rst.cfg similarity index 100% rename from TestCases/turbomachinery/multi_interface/multi_interface.cfg rename to TestCases/turbomachinery/multi_interface/multi_interface_rst.cfg From f6c3535a9e7a7ffe31bd9fae724cbc6e6103e890 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Thu, 12 Sep 2024 16:28:50 +0200 Subject: [PATCH 49/61] Update reg test values --- TestCases/hybrid_regression.py | 2 +- TestCases/parallel_regression.py | 4 ++-- TestCases/serial_regression.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index 1882a0c260a..f15f182ffea 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -561,7 +561,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-6.614627, -3.001324, -14.336143, -8.776079, -11.382919, -5.852328, 73273.000000, 73273.000000, 0.019884, 82.491000] + Jones_tc_restart.test_vals = [-10.466650, -2.871708, -19.174914, -13.475478, -11.582397, -6.306168, 73273, 73273, 0.019884, 82.491] test_list.append(Jones_tc_restart) # 2D axial stage diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index c66cf38752c..4e1a08ba19d 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1083,7 +1083,7 @@ def main(): Aachen_3D_restart.cfg_file = "aachen_3D_MP_restart.cfg" Aachen_3D_restart.test_iter = 5 Aachen_3D_restart.enabled_with_asan = False - Aachen_3D_restart.test_vals = [-9.853215, -8.891480, -9.610418, -8.028579, -7.792957, -4.384186] + Aachen_3D_restart.test_vals = [-9.829186, -8.875103, -9.609509, -8.075211, -7.759491, -4.360714] test_list.append(Aachen_3D_restart) # Jones APU Turbocharger restart @@ -1091,7 +1091,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-6.614623, -3.001323, -14.336147, -8.776081, -11.382919, -5.852327, 73273, 73273, 0.019884, 82.491] + Jones_tc_restart.test_vals = [-10.466650, -2.871708, -19.174914, -13.475478, -11.582397, -6.306168, 73273, 73273, 0.019884, 82.491] test_list.append(Jones_tc_restart) # 2D axial stage diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index c576fbf1419..facec67a89f 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -860,7 +860,7 @@ def main(): Aachen_3D_restart.cfg_dir = "turbomachinery/Aachen_turbine" Aachen_3D_restart.cfg_file = "aachen_3D_MP_restart.cfg" Aachen_3D_restart.test_iter = 5 - Aachen_3D_restart.test_vals = [-9.853207, -8.891479, -9.610411, -8.028566, -7.792947, -4.384177] + Aachen_3D_restart.test_vals = [-9.829185, -8.875103, -9.609505, -8.075194, -7.759490, -4.360713] test_list.append(Aachen_3D_restart) # Jones APU Turbocharger restart @@ -868,7 +868,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-6.614623, -3.001323, -14.336147, -8.776081, -11.382919, -5.852327, 73273.000000, 73273.000000, 0.019884, 82.491000] + Jones_tc_restart.test_vals = [-10.466650, -2.871708, -19.174914, -13.475478, -11.582397, -6.306168, 73273, 73273, 0.019884, 82.491] test_list.append(Jones_tc_restart) # 2D axial stage From 6b57e55a584637c51a9ad668a53ff7506adbc0c8 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Fri, 13 Sep 2024 16:35:17 +0200 Subject: [PATCH 50/61] Update Github workflows --- .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 2502204b64c..5b0ff1a7a9c 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -209,7 +209,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} + args: -b ${{github.ref}} -t develop -c featire_resolve_merge_turbo_interfaces -s ${{matrix.testscript}} - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536 with: From 2483e103ed8a69b9ba2f492059cbab949d17de0c Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Fri, 13 Sep 2024 16:35:41 +0200 Subject: [PATCH 51/61] Update Github workflows --- .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 5b0ff1a7a9c..742c9bd527c 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -209,7 +209,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c featire_resolve_merge_turbo_interfaces -s ${{matrix.testscript}} + args: -b ${{github.ref}} -t develop -c feature_resolve_merge_turbo_interfaces -s ${{matrix.testscript}} - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536 with: From 1b4b9d6d1f0e2b8515df4826ce58335df2247ef4 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Fri, 13 Sep 2024 17:15:10 +0200 Subject: [PATCH 52/61] Update reg test values to match gh calcs --- TestCases/hybrid_regression.py | 6 +++--- TestCases/parallel_regression.py | 4 ++-- TestCases/serial_regression.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index f15f182ffea..1a854f3c9eb 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -561,7 +561,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-10.466650, -2.871708, -19.174914, -13.475478, -11.582397, -6.306168, 73273, 73273, 0.019884, 82.491] + Jones_tc_restart.test_vals = [-10.467045, -2.871699, -19.172763, -13.469399, -11.582395, -6.306163, 73273.000000, 73273.000000, 0.019884, 82.491000] test_list.append(Jones_tc_restart) # 2D axial stage @@ -587,8 +587,8 @@ def main(): multi_interface.cfg_dir = "turbomachinery/multi_interface" multi_interface.cfg_file = "multi_interface_rst.cfg" multi_interface.test_iter = 5 - multi_interface.test_vals = [-8.642669, -8.899958, -9.349881] - multi_interface.test_vals_aarch64 = [-8.642669, -8.899958, -9.349881] + multi_interface.test_vals = [-8.632374, -8.895124, -9.350417] + multi_interface.test_vals_aarch64 = [-8.632374, -8.895124, -9.350417] test_list.append(multi_interface) ###################################### diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index 4e1a08ba19d..dc55ad31503 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1117,8 +1117,8 @@ def main(): multi_interface.cfg_dir = "turbomachinery/multi_interface" multi_interface.cfg_file = "multi_interface_rst.cfg" multi_interface.test_iter = 5 - multi_interface.test_vals = [-8.642669, -8.899958, -9.349881] - multi_interface.test_vals_aarch64 = [-8.642669, -8.899958, -9.349881] + multi_interface.test_vals = [-8.632374, -8.895124, -9.350417] + multi_interface.test_vals_aarch64 = [-8.632374, -8.895124, -9.350417] test_list.append(multi_interface) ###################################### diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index facec67a89f..7f77d69b72e 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -868,7 +868,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-10.466650, -2.871708, -19.174914, -13.475478, -11.582397, -6.306168, 73273, 73273, 0.019884, 82.491] + Jones_tc_restart.test_vals = [-10.466956, -2.871703, -19.232556, -13.525730, -11.582397, -6.306167, 73273.000000, 73273.000000, 0.019884, 82.491000] test_list.append(Jones_tc_restart) # 2D axial stage @@ -894,8 +894,8 @@ def main(): multi_interface.cfg_dir = "turbomachinery/multi_interface" multi_interface.cfg_file = "multi_interface_rst.cfg" multi_interface.test_iter = 5 - multi_interface.test_vals = [-8.642669, -8.899958, -9.349881] - multi_interface.test_vals_aarch64 = [-8.642669, -8.899958, -9.349881] + multi_interface.test_vals = [-8.632374, -8.895124, -9.350417] + multi_interface.test_vals_aarch64 = [-8.632374, -8.895124, -9.350417] test_list.append(multi_interface) From ee45af5fd8c9ebf38d994a4084f64501a3040df0 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Sat, 14 Sep 2024 12:39:24 +0200 Subject: [PATCH 53/61] Asan, Tsan workflows --- .github/workflows/regression.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 742c9bd527c..fd9465bba2d 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -255,7 +255,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tsan" + args: -b ${{github.ref}} -t develop -c feature_resolve_merge_turbo_interfaces -s ${{matrix.testscript}} -a "--tsan" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536 with: @@ -300,7 +300,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--asan" + args: -b ${{github.ref}} -t develop -c feature_resolve_merge_turbo_interfaces -s ${{matrix.testscript}} -a "--asan" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536 with: From 7e3647ed019863e46754e97aa9ad8a025bc8d9ee Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 17 Sep 2024 14:07:41 +0200 Subject: [PATCH 54/61] Changes for comments --- Common/include/option_structure.hpp | 2 +- SU2_CFD/include/interfaces/CInterface.hpp | 11 +---------- SU2_CFD/src/solvers/CEulerSolver.cpp | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index 7d36d111bda..923f12cab37 100644 --- a/Common/include/option_structure.hpp +++ b/Common/include/option_structure.hpp @@ -1867,7 +1867,7 @@ static const MapType TurboPerfKind_Map = { }; /*! - * \brief Types onf Turbomachinery interfaces + * \brief Types of Turbomachinery interfaces. */ enum class TURBO_INTERFACE_KIND{ MIXING_PLANE = ENUM_TRANSFER::MIXING_PLANE, diff --git a/SU2_CFD/include/interfaces/CInterface.hpp b/SU2_CFD/include/interfaces/CInterface.hpp index 9c10f8c4dfe..a3ffc31c0fb 100644 --- a/SU2_CFD/include/interfaces/CInterface.hpp +++ b/SU2_CFD/include/interfaces/CInterface.hpp @@ -159,15 +159,6 @@ class CInterface { const CConfig *target_config, unsigned long Marker_Target, unsigned long Vertex_Target, unsigned long Point_Target) = 0; - // /*! - // * \brief A virtual member. - // * \param[in] target_solution - Solution from the target mesh. - // * \param[in] target_solution - Solution from the target mesh. - // * \param[in] donor_zone - Index of the donorZone. - // */ - // inline virtual void SetAverageValues(CSolver *donor_solution, CSolver *target_solution, - // unsigned short donorZone) { } - /*! * \brief A virtual member. * \param[in] donor_geometry - Geometry of the target mesh. @@ -216,7 +207,7 @@ class CInterface { void AllgatherAverage(CSolver *donor_solution, CSolver *target_solution, CGeometry *donor_geometry, CGeometry *target_geometry, const CConfig *donor_config, const CConfig *target_config, unsigned short iMarkerInt); - + /*! * \brief Interpolate data and scatter it into different processors, for matching meshes. * \param[in] donor_solution - Solution from the donor mesh. diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index 3f3cd6e384b..f2a9a43b7e8 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -8975,7 +8975,7 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC TotalMassPressure += Area*(Density*TurboVelocity[0] )*Pressure; TotalMassDensity += Area*(Density*TurboVelocity[0] )*Density; - + for (auto iDim = 0u; iDim < nDim; iDim++) { TotalVelocity[iDim] += Velocity[iDim]; TotalAreaVelocity[iDim] += Area*Velocity[iDim]; From 1560c6b70d072075d1ba52e4aa7762bc13c3175b Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Mon, 23 Sep 2024 17:23:43 +0200 Subject: [PATCH 55/61] Fix heap buffer overflow error --- Common/include/CConfig.hpp | 22 ++++++++++++++++++++++ Common/src/CConfig.cpp | 20 ++++++++++++++++++++ Common/src/geometry/CPhysicalGeometry.cpp | 3 +++ SU2_CFD/src/solvers/CEulerSolver.cpp | 2 +- 4 files changed, 46 insertions(+), 1 deletion(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 51d5907bd8c..4c4c50fe0ac 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -749,6 +749,7 @@ class CConfig { *Marker_All_Turbomachinery, /*!< \brief Global index for Turbomachinery markers using the grid information. */ *Marker_All_TurbomachineryFlag, /*!< \brief Global index for Turbomachinery markers flag using the grid information. */ *Marker_All_MixingPlaneInterface, /*!< \brief Global index for MixingPlane interface markers using the grid information. */ + *Marker_All_Giles, /*!< \brief Global index for Giles markers using the grid information. */ *Marker_All_DV, /*!< \brief Global index for design variable markers using the grid information. */ *Marker_All_Moving, /*!< \brief Global index for moving surfaces using the grid information. */ *Marker_All_Deform_Mesh, /*!< \brief Global index for deformable markers at the boundary. */ @@ -766,6 +767,7 @@ class CConfig { *Marker_CfgFile_Turbomachinery, /*!< \brief Global index for Turbomachinery using the config information. */ *Marker_CfgFile_TurbomachineryFlag, /*!< \brief Global index for Turbomachinery flag using the config information. */ *Marker_CfgFile_MixingPlaneInterface, /*!< \brief Global index for MixingPlane interface using the config information. */ + *Marker_CfgFile_Giles, /*!< \brief Global index for Giles markers flag using the config information. */ *Marker_CfgFile_Moving, /*!< \brief Global index for moving surfaces using the config information. */ *Marker_CfgFile_Deform_Mesh, /*!< \brief Global index for deformable markers at the boundary. */ *Marker_CfgFile_Deform_Mesh_Sym_Plane, /*!< \brief Global index for markers with symmetric deformations. */ @@ -3516,6 +3518,13 @@ class CConfig { */ void SetMarker_All_MixingPlaneInterface(unsigned short val_marker, unsigned short val_mixpla_interface) { Marker_All_MixingPlaneInterface[val_marker] = val_mixpla_interface; } + /*! + * \brief Set if a marker val_marker is part of the Giles boundary (read from the config file). + * \param[in] val_marker - Index of the marker in which we are interested. + * \param[in] val_giles - 0 if not part of the Giles boundary or greater than 1 if it is part. + */ + void SetMarker_All_Giles(unsigned short val_marker, unsigned short val_giles) { Marker_All_Giles[val_marker] = val_giles; } + /*! * \brief Set if a marker val_marker is going to be affected by design variables val_moving * (read from the config file). @@ -3662,6 +3671,13 @@ class CConfig { */ unsigned short GetMarker_All_TurbomachineryFlag(unsigned short val_marker) const { return Marker_All_TurbomachineryFlag[val_marker]; } +/*! + * \brief Get the Giles boundary information for a marker val_marker. + * \param[in] val_marker value of the marker on the grid. + * \return 0 if is not part of the MixingPlane Interface and greater than 1 if it is part. + */ + unsigned short GetMarker_All_Giles(unsigned short val_marker) const { return Marker_All_Giles[val_marker]; } + /*! * \brief Get the number of FSI interface markers val_marker. * \param[in] void. @@ -6412,6 +6428,12 @@ class CConfig { */ unsigned short GetMarker_CfgFile_MixingPlaneInterface(const string& val_marker) const; + /*! + * \brief Get the Giles boundary information from the config definition for the marker val_marker. + * \return Plotting information of the boundary in the config information for the marker val_marker. + */ + unsigned short GetMarker_CfgFile_Giles(const string& val_marker) const; + /*! * \brief Get the DV information from the config definition for the marker val_marker. * \return DV information of the boundary in the config information for the marker val_marker. diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index a71cc0a0ded..0081879521a 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -5664,6 +5664,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { Marker_All_Turbomachinery = new unsigned short[nMarker_All] (); // Store whether the boundary is in needed for Turbomachinery computations. Marker_All_TurbomachineryFlag = new unsigned short[nMarker_All] (); // Store whether the boundary has a flag for Turbomachinery computations. Marker_All_MixingPlaneInterface = new unsigned short[nMarker_All] (); // Store whether the boundary has a in the MixingPlane interface. + Marker_All_Giles = new unsigned short[nMarker_All] (); // Store whether the boundary has is a Giles boundary. Marker_All_SobolevBC = new unsigned short[nMarker_All] (); // Store wether the boundary should apply to the gradient smoothing. for (iMarker_All = 0; iMarker_All < nMarker_All; iMarker_All++) { @@ -5689,6 +5690,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { Marker_CfgFile_Turbomachinery = new unsigned short[nMarker_CfgFile] (); Marker_CfgFile_TurbomachineryFlag = new unsigned short[nMarker_CfgFile] (); Marker_CfgFile_MixingPlaneInterface = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_Giles = new unsigned short[nMarker_CfgFile] (); Marker_CfgFile_PyCustom = new unsigned short[nMarker_CfgFile] (); Marker_CfgFile_SobolevBC = new unsigned short[nMarker_CfgFile] (); @@ -6035,6 +6037,17 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { } } + /*--- Idenftification fo Giles Markers ---*/ + // This is seperate from MP and Turbomachinery Markers as all mixing plane markers are Giles, + // but not all Giles markers are mixing plane + for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { + Marker_CfgFile_Giles[iMarker_CfgFile] = NO; + for (iMarker_Giles = 0; iMarker_Giles < nMarker_Giles; iMarker_Giles++) { + if (Marker_CfgFile_TagBound[iMarker_CfgFile] == Marker_Giles[iMarker_Giles]) + Marker_CfgFile_Giles[iMarker_CfgFile] = YES; + } + } + /*--- Identification of MixingPlane interface markers ---*/ for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) { @@ -7970,6 +7983,13 @@ unsigned short CConfig::GetMarker_CfgFile_MixingPlaneInterface(const string& val return Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile]; } +unsigned short CConfig::GetMarker_CfgFile_Giles(const string& val_marker) const { + unsigned short iMarker_CfgFile; + for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) + if (Marker_CfgFile_TagBound[iMarker_CfgFile] == val_marker) break; + return Marker_CfgFile_Giles[iMarker_CfgFile]; +} + unsigned short CConfig::GetMarker_CfgFile_DV(const string& val_marker) const { unsigned short iMarker_CfgFile; for (iMarker_CfgFile = 0; iMarker_CfgFile < nMarker_CfgFile; iMarker_CfgFile++) diff --git a/Common/src/geometry/CPhysicalGeometry.cpp b/Common/src/geometry/CPhysicalGeometry.cpp index a069424c666..b9b0a0f36cb 100644 --- a/Common/src/geometry/CPhysicalGeometry.cpp +++ b/Common/src/geometry/CPhysicalGeometry.cpp @@ -3370,6 +3370,7 @@ void CPhysicalGeometry::SetBoundaries(CConfig* config) { config->SetMarker_All_PerBound(iMarker, config->GetMarker_CfgFile_PerBound(Marker_Tag)); config->SetMarker_All_Turbomachinery(iMarker, config->GetMarker_CfgFile_Turbomachinery(Marker_Tag)); config->SetMarker_All_TurbomachineryFlag(iMarker, config->GetMarker_CfgFile_TurbomachineryFlag(Marker_Tag)); + config->SetMarker_All_Giles(iMarker, config->GetMarker_CfgFile_Giles(Marker_Tag)); config->SetMarker_All_MixingPlaneInterface(iMarker, config->GetMarker_CfgFile_MixingPlaneInterface(Marker_Tag)); config->SetMarker_All_SobolevBC(iMarker, config->GetMarker_CfgFile_SobolevBC(Marker_Tag)); @@ -3394,6 +3395,7 @@ void CPhysicalGeometry::SetBoundaries(CConfig* config) { config->SetMarker_All_PerBound(iMarker, NO); config->SetMarker_All_Turbomachinery(iMarker, NO); config->SetMarker_All_TurbomachineryFlag(iMarker, NO); + config->SetMarker_All_Giles(iMarker, NO); config->SetMarker_All_MixingPlaneInterface(iMarker, NO); config->SetMarker_All_SobolevBC(iMarker, NO); @@ -3764,6 +3766,7 @@ void CPhysicalGeometry::LoadUnpartitionedSurfaceElements(CConfig* config, CMeshR config->SetMarker_All_SendRecv(iMarker, NONE); config->SetMarker_All_Turbomachinery(iMarker, config->GetMarker_CfgFile_Turbomachinery(Marker_Tag)); config->SetMarker_All_TurbomachineryFlag(iMarker, config->GetMarker_CfgFile_TurbomachineryFlag(Marker_Tag)); + config->SetMarker_All_Giles(iMarker, config->GetMarker_CfgFile_Giles(Marker_Tag)); config->SetMarker_All_MixingPlaneInterface(iMarker, config->GetMarker_CfgFile_MixingPlaneInterface(Marker_Tag)); config->SetMarker_All_SobolevBC(iMarker, config->GetMarker_CfgFile_SobolevBC(Marker_Tag)); } diff --git a/SU2_CFD/src/solvers/CEulerSolver.cpp b/SU2_CFD/src/solvers/CEulerSolver.cpp index f2a9a43b7e8..286a84e21c7 100644 --- a/SU2_CFD/src/solvers/CEulerSolver.cpp +++ b/SU2_CFD/src/solvers/CEulerSolver.cpp @@ -9269,7 +9269,7 @@ void CEulerSolver::TurboAverageProcess(CSolver **solver, CGeometry *geometry, CC if (config->GetMarker_All_Turbomachinery(iMarker) == iMarkerTP){ if (config->GetMarker_All_TurbomachineryFlag(iMarker) == marker_flag){ auto Marker_Tag = config->GetMarker_All_TagBound(iMarker); - if(config->GetBoolGiles() || config->GetBoolRiemann()){ + if(config->GetMarker_All_Giles(iMarker) || config->GetBoolRiemann()){ // May have to implement something similar for Riemann? if(config->GetBoolRiemann()){ if(config->GetKind_Data_Riemann(Marker_Tag) == RADIAL_EQUILIBRIUM){ RadialEquilibriumPressure[iMarker][nSpanWiseSections/2] = config->GetRiemann_Var1(Marker_Tag)/config->GetPressure_Ref(); From a0d961b4fd6f23822418bf7312d9bd070a8e9d48 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Mon, 23 Sep 2024 17:25:43 +0200 Subject: [PATCH 56/61] Clearing resources --- Common/src/CConfig.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 0081879521a..d2002f53d5c 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -8177,6 +8177,9 @@ CConfig::~CConfig() { delete[] Marker_CfgFile_TurbomachineryFlag; delete[] Marker_All_TurbomachineryFlag; + delete[] Marker_CfgFile_Giles; + delete[] Marker_All_Giles; + delete[] Marker_CfgFile_MixingPlaneInterface; delete[] Marker_All_MixingPlaneInterface; From c85ad361f8241cae4be62800ece89149fcc0b7ed Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Mon, 23 Sep 2024 17:26:51 +0200 Subject: [PATCH 57/61] formatting --- Common/src/CConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index d2002f53d5c..c4eae90905f 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -5690,7 +5690,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { Marker_CfgFile_Turbomachinery = new unsigned short[nMarker_CfgFile] (); Marker_CfgFile_TurbomachineryFlag = new unsigned short[nMarker_CfgFile] (); Marker_CfgFile_MixingPlaneInterface = new unsigned short[nMarker_CfgFile] (); - Marker_CfgFile_Giles = new unsigned short[nMarker_CfgFile] (); + Marker_CfgFile_Giles = new unsigned short[nMarker_CfgFile] (); Marker_CfgFile_PyCustom = new unsigned short[nMarker_CfgFile] (); Marker_CfgFile_SobolevBC = new unsigned short[nMarker_CfgFile] (); From 7e2f13a9a590d75aefed60cd33636be7c62b2e13 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Mon, 23 Sep 2024 17:49:44 +0200 Subject: [PATCH 58/61] Update cfg file option for consistency --- .../turbomachinery/multi_interface/multi_interface_rst.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TestCases/turbomachinery/multi_interface/multi_interface_rst.cfg b/TestCases/turbomachinery/multi_interface/multi_interface_rst.cfg index d2f56da2fc4..a52301e7153 100644 --- a/TestCases/turbomachinery/multi_interface/multi_interface_rst.cfg +++ b/TestCases/turbomachinery/multi_interface/multi_interface_rst.cfg @@ -134,7 +134,7 @@ OUTPUT_FILES= RESTART MESH_FILENAME= three_zone_quarter_cyl.su2 MESH_FORMAT= SU2 MESH_OUT_FILENAME= mesh_out.su2 -SOLUTION_FILENAME= restart_flow.dat +SOLUTION_FILENAME= solution_flow.dat SOLUTION_ADJ_FILENAME= solution_adj.dat TABULAR_FORMAT= TECPLOT CONV_FILENAME= history From 1ea89f011c6af61c5f2d52c44f4bc4ad88ef6df4 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Mon, 23 Sep 2024 19:31:05 +0200 Subject: [PATCH 59/61] Update APU reg test --- TestCases/hybrid_regression.py | 2 +- TestCases/parallel_regression.py | 2 +- TestCases/serial_regression.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index 1a854f3c9eb..af200ef7603 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -561,7 +561,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-10.467045, -2.871699, -19.172763, -13.469399, -11.582395, -6.306163, 73273.000000, 73273.000000, 0.019884, 82.491000] + Jones_tc_restart.test_vals = [-10.467026, -2.871699, -19.214627, -13.508254, -11.582396, -6.306163, 73273, 73273, 0.019884, 82.491] test_list.append(Jones_tc_restart) # 2D axial stage diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index dc55ad31503..4047b6b39ba 100644 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -1091,7 +1091,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-10.466650, -2.871708, -19.174914, -13.475478, -11.582397, -6.306168, 73273, 73273, 0.019884, 82.491] + Jones_tc_restart.test_vals = [-10.467612, -2.871708, -19.345651, -13.625871, -11.582397, -6.306168, 73273, 73273, 0.019884, 82.491] test_list.append(Jones_tc_restart) # 2D axial stage diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index 7f77d69b72e..08b45e3b3ff 100644 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -868,7 +868,7 @@ def main(): Jones_tc_restart.cfg_dir = "turbomachinery/APU_turbocharger" Jones_tc_restart.cfg_file = "Jones_restart.cfg" Jones_tc_restart.test_iter = 5 - Jones_tc_restart.test_vals = [-10.466956, -2.871703, -19.232556, -13.525730, -11.582397, -6.306167, 73273.000000, 73273.000000, 0.019884, 82.491000] + Jones_tc_restart.test_vals = [-10.466644, -2.871703, -19.193464, -13.487820, -11.582397, -6.306167, 73273, 73273, 0.019884, 82.491] test_list.append(Jones_tc_restart) # 2D axial stage From 0e6bb4a04cdb144ca22d27c2bef9ffab0e38fbb5 Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 24 Sep 2024 12:55:23 +0200 Subject: [PATCH 60/61] Update regression workflow --- .github/workflows/regression.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index fd9465bba2d..2502204b64c 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -209,7 +209,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c feature_resolve_merge_turbo_interfaces -s ${{matrix.testscript}} + args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2:240320-1536 with: @@ -255,7 +255,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c feature_resolve_merge_turbo_interfaces -s ${{matrix.testscript}} -a "--tsan" + args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tsan" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2-tsan:240320-1536 with: @@ -300,7 +300,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536 with: # -t -c - args: -b ${{github.ref}} -t develop -c feature_resolve_merge_turbo_interfaces -s ${{matrix.testscript}} -a "--asan" + args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--asan" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2-asan:240320-1536 with: From f34b5bff58e92152833017cc07db939b13758d6c Mon Sep 17 00:00:00 2001 From: Josh Kelly Date: Tue, 24 Sep 2024 15:58:52 +0200 Subject: [PATCH 61/61] Changes for comments --- Common/include/CConfig.hpp | 5 ----- Common/src/CConfig.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp index 4c4c50fe0ac..ff713cc20d6 100644 --- a/Common/include/CConfig.hpp +++ b/Common/include/CConfig.hpp @@ -5360,11 +5360,6 @@ class CConfig { */ TURBO_INTERFACE_KIND GetKind_TurboInterface(unsigned short interfaceIndex) const { return Kind_TurboInterface[interfaceIndex]; } - /*! - * \brief Sets marker kind for an interface marker in turbomachinery problem - */ - void SetKind_TurboInterface(unsigned short interfaceIndex, TURBO_INTERFACE_KIND TurboInterfaceKind) {Kind_TurboInterface[interfaceIndex] = TurboInterfaceKind ;} - /*! * \brief get outlet bounds name for Turbomachinery performance calculation. * \return name of the bound. diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index c4eae90905f..276c66ebf60 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -6072,19 +6072,19 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) { if (Marker_MixingPlaneInterface != nullptr){ // Necessary in cases where no mixing plane interfaces are defined if (Marker_CfgFile_MixingPlaneInterface[iMarker_CfgFile] != 0) { //Is a mixing plane /*--- Find which list position this marker is in turbomachinery markers ---*/ - const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); + const auto* target = std::find(Marker_Turbomachinery, &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); const auto target_index = target - Marker_Turbomachinery; /*--- Assert that we find the marker within the turbomachienry markers ---*/ assert(target != &Marker_Turbomachinery[nMarker_Turbomachinery*2-1]); /*--- Assign the correct interface ---*/ - SetKind_TurboInterface(target_index - 1, TURBO_INTERFACE_KIND::MIXING_PLANE); // Need to subtract 1 from index as to not consider the inlet an interface + Kind_TurboInterface[target_index-1] = TURBO_INTERFACE_KIND::MIXING_PLANE; // Need to subtract 1 from index as to not consider the inlet an interface } } if (Marker_Fluid_InterfaceBound != nullptr){ // No fluid interfaces are defined in the config file (nullptr if no interfaces defined) if (Marker_CfgFile_KindBC[iMarker_CfgFile] == BC_TYPE::FLUID_INTERFACE) { // iMarker_CfgFile is a fluid interface - const auto* target = std::find(&Marker_Turbomachinery[0], &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); + const auto* target = std::find(Marker_Turbomachinery, &Marker_Turbomachinery[nMarker_Turbomachinery*2-1], Marker_CfgFile_TagBound[iMarker_CfgFile]); const auto target_index = target - Marker_Turbomachinery; - SetKind_TurboInterface(target_index-1, TURBO_INTERFACE_KIND::FROZEN_ROTOR); + Kind_TurboInterface[target_index-1] = TURBO_INTERFACE_KIND::FROZEN_ROTOR; } } }