diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index e1985a4911f2..265949f33176 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -233,7 +233,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2:260405-0054 with: # -t -c - args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} + args: -b ${{github.ref}} -t develop -c feature_SST_IDDES -s ${{matrix.testscript}} - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2:260405-0054 with: @@ -282,7 +282,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2:260405-0054 with: # -t -c - args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tapetests" + args: -b ${{github.ref}} -t develop -c feature_SST_IDDES -s ${{matrix.testscript}} -a "--tapetests" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2:260405-0054 with: @@ -330,7 +330,7 @@ jobs: PMIX_MCA_gds: hash with: # -t -c - args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--tsan" + args: -b ${{github.ref}} -t develop -c feature_SST_IDDES -s ${{matrix.testscript}} -a "--tsan" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2-tsan:260405-0054 with: @@ -375,7 +375,7 @@ jobs: uses: docker://ghcr.io/su2code/su2/test-su2-asan:260405-0054 with: # -t -c - args: -b ${{github.ref}} -t develop -c develop -s ${{matrix.testscript}} -a "--asan" + args: -b ${{github.ref}} -t develop -c feature_SST_IDDES -s ${{matrix.testscript}} -a "--asan" - name: Cleanup uses: docker://ghcr.io/su2code/su2/test-su2-asan:260405-0054 with: diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index 351e534671ae..0f561fe8376c 100644 --- a/Common/include/option_structure.hpp +++ b/Common/include/option_structure.hpp @@ -1180,7 +1180,6 @@ inline SST_ParsedOptions ParseSSTOptions(const SST_OPTIONS *SST_Options, unsigne 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); } else if (sst_2003) { @@ -1649,10 +1648,14 @@ static const MapType Window_Map = { */ enum ENUM_HYBRIDRANSLES { NO_HYBRIDRANSLES = 0, /*!< \brief No turbulence model. */ - SA_DES = 1, /*!< \brief Kind of Hybrid RANS/LES (SA - Detached Eddy Simulation (DES)). */ - SA_DDES = 2, /*!< \brief Kind of Hybrid RANS/LES (SA - Delayed DES (DDES) with Delta_max SGS ). */ - SA_ZDES = 3, /*!< \brief Kind of Hybrid RANS/LES (SA - Delayed DES (DDES) with Vorticity based SGS like Zonal DES). */ - SA_EDDES = 4 /*!< \brief Kind of Hybrid RANS/LES (SA - Delayed DES (DDES) with Shear Layer Adapted SGS: Enhanced DDES). */ + SA_DES = 1, /*!< \brief Kind of Hybrid RANS/LES (SA - Detached Eddy Simulation (DES)). */ + SA_DDES = 2, /*!< \brief Kind of Hybrid RANS/LES (SA - Delayed DES (DDES) with Delta_max SGS ). */ + SA_ZDES = 3, /*!< \brief Kind of Hybrid RANS/LES (SA - Delayed DES (DDES) with Vorticity based SGS like Zonal DES). */ + SA_EDDES = 4, /*!< \brief Kind of Hybrid RANS/LES (SA - Delayed DES (DDES) with Shear Layer Adapted SGS: Enhanced DDES). */ + SST_DDES = 5, /*!< \brief Kind of Hybrid RANS/LES (SST - Delayed DES (DDES): DDES). */ + SST_IDDES = 6, /*!< \brief Kind of Hybrid RANS/LES (SST - Delayed DES (DDES): Improved DDES). */ + SST_SIDDES = 7, /*!< \brief Kind of Hybrid RANS/LES (SST - Delayed DES (DDES): Simplified Improved DDES). */ + SST_EDDES = 8 /*!< \brief Kind of Hybrid RANS/LES (SST - Delayed DES (DDES): Enhanced (SLA) DDES). */ }; static const MapType HybridRANSLES_Map = { MakePair("NONE", NO_HYBRIDRANSLES) @@ -1660,6 +1663,10 @@ static const MapType HybridRANSLES_Map = { MakePair("SA_DDES", SA_DDES) MakePair("SA_ZDES", SA_ZDES) MakePair("SA_EDDES", SA_EDDES) + MakePair("SST_DDES", SST_DDES) + MakePair("SST_IDDES", SST_IDDES) + MakePair("SST_SIDDES", SST_SIDDES) + MakePair("SST_EDDES", SST_EDDES) }; /*! diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 1ab7ced2d354..340569dec214 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -4128,6 +4128,21 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i "TIME_STEPPING, DUAL_TIME_STEPPING-1ST_ORDER or DUAL_TIME_STEPPING-2ND_ORDER", CURRENT_FUNCTION); } + if (Kind_HybridRANSLES != NO_HYBRIDRANSLES && !Time_Domain) { + SU2_MPI::Error("Hybrid RANS/LES models (HYBRID_RANSLES) require an unsteady simulation, set TIME_DOMAIN= YES.", + CURRENT_FUNCTION); + } + + /*--- The SA_* hybrid models are built on the SA model and the SST_* ones on the SST model. ---*/ + const bool hybridSA = Kind_HybridRANSLES == SA_DES || Kind_HybridRANSLES == SA_DDES || + Kind_HybridRANSLES == SA_ZDES || Kind_HybridRANSLES == SA_EDDES; + const bool hybridSST = Kind_HybridRANSLES == SST_DDES || Kind_HybridRANSLES == SST_IDDES || + Kind_HybridRANSLES == SST_SIDDES || Kind_HybridRANSLES == SST_EDDES; + if ((hybridSA && Kind_Turb_Model != TURB_MODEL::SA) || (hybridSST && Kind_Turb_Model != TURB_MODEL::SST)) { + SU2_MPI::Error(string("The hybrid RANS/LES model (HYBRID_RANSLES) must match the turbulence model (KIND_TURB_MODEL): ") + + "SA_* options require SA, SST_* options require SST.", CURRENT_FUNCTION); + } + if (Time_Domain){ Delta_UnstTime = Time_Step; @@ -6738,10 +6753,14 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { cout << "Hybrid RANS/LES: "; switch (Kind_HybridRANSLES) { case NO_HYBRIDRANSLES: cout << "No Hybrid RANS/LES" << endl; break; - case SA_DES: cout << "Detached Eddy Simulation (DES97) " << endl; break; - case SA_DDES: cout << "Delayed Detached Eddy Simulation (DDES) with Standard SGS" << endl; break; - case SA_ZDES: cout << "Delayed Detached Eddy Simulation (DDES) with Vorticity-based SGS" << endl; break; - case SA_EDDES: cout << "Delayed Detached Eddy Simulation (DDES) with Shear-layer Adapted SGS" << endl; break; + case SA_DES: cout << "Detached Eddy Simulation (DES97) " << endl; break; + case SA_DDES: cout << "Delayed Detached Eddy Simulation (DDES) with Standard SGS" << endl; break; + case SA_ZDES: cout << "Delayed Detached Eddy Simulation (DDES) with Vorticity-based SGS" << endl; break; + case SA_EDDES: cout << "Delayed Detached Eddy Simulation (DDES) with Shear-layer Adapted SGS" << endl; break; + case SST_DDES: cout << "Delayed Detached Eddy Simulation (DDES)" << endl; break; + case SST_IDDES: cout << "Improved Delayed Detached Eddy Simulation (IDDES)" << endl; break; + case SST_SIDDES: cout << "Simplified Improved Delayed Detached Eddy Simulation (SIDDES)" << endl; break; + case SST_EDDES: cout << "Delayed Detached Eddy Simulation (DDES) with Shear-layer Adapted SGS" << endl; break; } if (Kind_HybridRANSLES != NO_HYBRIDRANSLES) { if (LES_FilterWidth > 0.0) cout << "User-specified LES filter width: " << LES_FilterWidth << endl; diff --git a/SU2_CFD/include/numerics/CNumerics.hpp b/SU2_CFD/include/numerics/CNumerics.hpp index ec511a3fa1db..f08de77e206c 100644 --- a/SU2_CFD/include/numerics/CNumerics.hpp +++ b/SU2_CFD/include/numerics/CNumerics.hpp @@ -140,6 +140,7 @@ class CNumerics { const su2double *TurbPsi_i, /*!< \brief Vector of adjoint turbulent variables at point i. */ *TurbPsi_j; /*!< \brief Vector of adjoint turbulent variables at point j. */ + su2double lengthScale_i, lengthScale_j; /*!< \brief length scale for SST */ CMatrixView ConsVar_Grad_i, /*!< \brief Gradient of conservative variables at point i. */ ConsVar_Grad_j, /*!< \brief Gradient of conservative variables at point j. */ @@ -950,6 +951,16 @@ class CNumerics { dist_j = val_dist_j; } + /*! + * \brief Set the value of the length scale for SST. + * \param[in] val_lengthScale_i - Value of of the length scale for SST from point i. + * \param[in] val_lengthScale_j - Value of of the length scale for SST from point j. + */ + void SetLengthScale(su2double val_lengthScale_i, su2double val_lengthScale_j) { + lengthScale_i = val_lengthScale_i; + lengthScale_j = val_lengthScale_j; + } + /*! * \brief Set the stochastic source term for the Langevin equations (Backscatter Model). * \param[in] val_stoch_source - Value of stochastic source term. diff --git a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp index 9f72b6e37cc4..443c69172e22 100644 --- a/SU2_CFD/include/numerics/turbulent/turb_sources.hpp +++ b/SU2_CFD/include/numerics/turbulent/turb_sources.hpp @@ -989,14 +989,17 @@ class CSourcePieceWise_TurbSST final : public CNumerics { } 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; + const su2double Dilatation_Sarkar = -0.15 * pk * Mt + 0.2 * beta_star * (1.0 +zetaFMt) * Density_i * ScalarVar_i[1] * ScalarVar_i[0] * pow(Mt, 2); 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); + if (config->GetKind_HybridRANSLES() != NO_HYBRIDRANSLES) + dk = Density_i * sqrt(pow(ScalarVar_i[0], 3)) / lengthScale_i; + + su2double dw = beta_blended * Density_i * pow(ScalarVar_i[1], 2) * (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) { diff --git a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp index 2729f014c129..7215f51ae78d 100644 --- a/SU2_CFD/include/solvers/CTurbSSTSolver.hpp +++ b/SU2_CFD/include/solvers/CTurbSSTSolver.hpp @@ -69,6 +69,17 @@ class CTurbSSTSolver final : public CTurbSolver { void BoundaryFlux(CGeometry* geometry, CSolver** solver_container, CConfig* config, const ScalarFluxOptions& opt, unsigned short val_marker); + + /*! + * \brief A virtual member. + * \param[in] solver - Solver container + * \param[in] geometry - Geometrical definition. + * \param[in] config - Definition of the particular problem. + */ + void SetDES_LengthScale(CSolver** solver, + CGeometry *geometry, + CConfig *config); + public: /*! * \brief Constructor. diff --git a/SU2_CFD/include/solvers/CTurbSolver.hpp b/SU2_CFD/include/solvers/CTurbSolver.hpp index 2b978f08b85b..e18948899eac 100644 --- a/SU2_CFD/include/solvers/CTurbSolver.hpp +++ b/SU2_CFD/include/solvers/CTurbSolver.hpp @@ -42,6 +42,20 @@ class CTurbSolver : public CScalarSolver { vector Inlet_TurbVars; /*!< \brief Turbulence variables at inlet profiles */ + /*! + * \brief Shear-layer-adapted subgrid length-scale of the EDDES models, Delta_SLA = Delta_omega * F_KH(). + * \note Shur et al., An Enhanced Version of DES with Rapid Transition from RANS to LES in Separated Flows, + * Flow Turbulence Combust 95, 2015, Eqs. (1)-(6). Delta_omega is computed on the vertices of the median-dual + * control volume of the point, so it applies to any type of grid. + * \param[in] geometry - Geometrical definition of the problem. + * \param[in] iPoint - Point index. + * \param[in] vorticity - Vorticity vector at the point. + * \param[in] shielded - True in the RANS region (f_d < 0.99), where F_KH is set to 1 (Eq. 6). + * \return Delta_SLA, or the maximum edge length where the vorticity vanishes. + */ + su2double ShearLayerAdaptedLengthScale(const CGeometry* geometry, unsigned long iPoint, const su2double* vorticity, + bool shielded) const; + public: /*! * \brief Destructor of the class. diff --git a/SU2_CFD/include/variables/CTurbSAVariable.hpp b/SU2_CFD/include/variables/CTurbSAVariable.hpp index de919c51cb23..c97fbc0e5810 100644 --- a/SU2_CFD/include/variables/CTurbSAVariable.hpp +++ b/SU2_CFD/include/variables/CTurbSAVariable.hpp @@ -39,12 +39,10 @@ class CTurbSAVariable final : public CTurbVariable { private: - VectorType DES_LengthScale; VectorType lesMode; su2vector sbsInBox; MatrixType stochSource; MatrixType stochSourceOld; - VectorType Vortex_Tilting; VectorType besselIntegral; public: @@ -65,19 +63,6 @@ class CTurbSAVariable final : public CTurbVariable { */ ~CTurbSAVariable() override = default; - /*! - * \brief Get the DES length scale - * \param[in] iPoint - Point index. - * \return Value of the DES length Scale. - */ - inline su2double GetDES_LengthScale(unsigned long iPoint) const override { return DES_LengthScale(iPoint); } - - /*! - * \brief Set the DES Length Scale. - * \param[in] iPoint - Point index. - */ - inline void SetDES_LengthScale(unsigned long iPoint, su2double val_des_lengthscale) override { DES_LengthScale(iPoint) = val_des_lengthscale; } - /*! * \brief Get the source terms for the stochastic equations. * \param[in] iPoint - Point index. @@ -135,20 +120,6 @@ class CTurbSAVariable final : public CTurbVariable { */ inline su2double GetLES_Mode(unsigned long iPoint) const override { return lesMode(iPoint); } - /*! - * \brief Set the vortex tilting measure for computation of the EDDES length scale - * \param[in] iPoint - Point index. - */ - void SetVortex_Tilting(unsigned long iPoint, CMatrixView, - const su2double* Vorticity, su2double LaminarViscosity) override; - - /*! - * \brief Get the vortex tilting measure for computation of the EDDES length scale - * \param[in] iPoint - Point index. - * \return Value of the DES length Scale - */ - inline su2double GetVortex_Tilting(unsigned long iPoint) const override { return Vortex_Tilting(iPoint); } - /*! * \brief Set the integral of the product of three Bessel functions appearing in Laplacian smoothing. * \param[in] iPoint - Point index. diff --git a/SU2_CFD/include/variables/CTurbVariable.hpp b/SU2_CFD/include/variables/CTurbVariable.hpp index dc6858002849..1efed4c658d5 100644 --- a/SU2_CFD/include/variables/CTurbVariable.hpp +++ b/SU2_CFD/include/variables/CTurbVariable.hpp @@ -37,12 +37,14 @@ */ class CTurbVariable : public CScalarVariable { protected: - VectorType muT; /*!< \brief Eddy viscosity. */ + VectorType muT; /*!< \brief Eddy viscosity. */ + VectorType DES_LengthScale; /*!< \brief DES Length scale. */ public: static constexpr size_t MAXNVAR = 4; - VectorType turb_index; - VectorType intermittency; /*!< \brief Value of the intermittency for the trans. model. */ + VectorType turb_index; /*!< \brief Value of the turbulence index for transition simulations. */ + VectorType intermittency; /*!< \brief Value of the intermittency for the transition model. */ + VectorType Vortex_Tilting; /*!< \brief Value of the vortex tilting measure for EDDES models. */ /*! * \brief Constructor of the class. @@ -100,6 +102,33 @@ class CTurbVariable : public CScalarVariable { */ inline void SetIntermittency(unsigned long iPoint, su2double val_intermittency) final { intermittency(iPoint) = val_intermittency; } + /*! + * \brief Get the DES length scale + * \param[in] iPoint - Point index. + * \return Value of the DES length Scale. + */ + inline su2double GetDES_LengthScale(unsigned long iPoint) const override { return DES_LengthScale(iPoint); } + + /*! + * \brief Set the DES Length Scale. + * \param[in] iPoint - Point index. + */ + inline void SetDES_LengthScale(unsigned long iPoint, su2double val_des_lengthscale) override { DES_LengthScale(iPoint) = val_des_lengthscale; } + + /*! + * \brief Set the vortex tilting measure for computation of the EDDES length scale + * \param[in] iPoint - Point index. + * \param[in] VelGrad - Velocity gradient, starting at the first velocity component. + */ + void SetVortex_Tilting(unsigned long iPoint, CMatrixView VelGrad, + const su2double* Vorticity, su2double LaminarViscosity) override; + + /*! + * \brief Get the vortex tilting measure for computation of the EDDES length scale + * \param[in] iPoint - Point index. + * \return Value of the DES length Scale + */ + inline su2double GetVortex_Tilting(unsigned long iPoint) const override { return Vortex_Tilting(iPoint); } /*! * \brief Set the Diffusion Coefficients of TKE and omega equations. * \param[in] iPoint - Point index. diff --git a/SU2_CFD/include/variables/CVariable.hpp b/SU2_CFD/include/variables/CVariable.hpp index 739a1af75fa5..2ffa2ce5fa70 100644 --- a/SU2_CFD/include/variables/CVariable.hpp +++ b/SU2_CFD/include/variables/CVariable.hpp @@ -2287,7 +2287,7 @@ class CVariable { inline virtual su2double GetTau_Wall(unsigned long iPoint) const { return 0.0; } - inline virtual void SetVortex_Tilting(unsigned long iPoint, CMatrixView PrimGrad_Flow, + inline virtual void SetVortex_Tilting(unsigned long iPoint, CMatrixView VelGrad, const su2double* Vorticity, su2double LaminarViscosity) {} inline virtual su2double GetVortex_Tilting(unsigned long iPoint) const { return 0.0; } diff --git a/SU2_CFD/src/output/CFlowOutput.cpp b/SU2_CFD/src/output/CFlowOutput.cpp index 2ac2693b9952..9a4e638deb8c 100644 --- a/SU2_CFD/src/output/CFlowOutput.cpp +++ b/SU2_CFD/src/output/CFlowOutput.cpp @@ -1605,6 +1605,9 @@ void CFlowOutput::SetVolumeOutputFieldsScalarMisc(const CConfig* config) { if (config->GetKind_HybridRANSLES() != NO_HYBRIDRANSLES) { AddVolumeOutput("DES_LENGTHSCALE", "DES_LengthScale", "DDES", "DES length scale value"); AddVolumeOutput("WALL_DISTANCE", "Wall_Distance", "DDES", "Wall distance value"); + AddVolumeOutput("LESIQ", "LESIQ", "DDES", "LESIQ index for SRS simulations"); + if (config->GetKind_Turb_Model() == TURB_MODEL::SST) + AddVolumeOutput("SRS_GRID_SIZE", "Srs_grid_size", "DDES", "desired grid size for Scale Resolving Simulations"); AddVolumeOutput("LES_SENSOR","LES_Sensor","DDES","LES sensor value"); if (config->GetSBSParam().StochasticBackscatter) { AddVolumeOutput("STOCHSOURCE_X", "StochSource_x", "BACKSCATTER", "x-component of the stochastic source vector"); @@ -1623,6 +1626,27 @@ void CFlowOutput::SetVolumeOutputFieldsScalarMisc(const CConfig* config) { AddVolumeOutput("VORTICITY", "Vorticity", "VORTEX_IDENTIFICATION", "Value of the vorticity"); } AddVolumeOutput("Q_CRITERION", "Q_Criterion", "VORTEX_IDENTIFICATION", "Value of the Q-Criterion"); + if (config->GetKind_HybridRANSLES() == NO_HYBRIDRANSLES) { + AddVolumeOutput("WALL_DISTANCE", "Wall_Distance", "DEBUG", "Wall distance value"); + } + AddVolumeOutput("GRAD_VEL_XX", "Grad_Vel_xx", "VELOCITY_GRADIENT", "X-Gradient of U"); + AddVolumeOutput("GRAD_VEL_XY", "Grad_Vel_xy", "VELOCITY_GRADIENT", "Y-Gradient of U"); + AddVolumeOutput("GRAD_VEL_YX", "Grad_Vel_yx", "VELOCITY_GRADIENT", "X-Gradient of U"); + AddVolumeOutput("GRAD_VEL_YY", "Grad_Vel_yy", "VELOCITY_GRADIENT", "Y-Gradient of V"); + if (nDim == 3) { + AddVolumeOutput("GRAD_VEL_XZ", "Grad_Vel_xz", "VELOCITY_GRADIENT", "Z-Gradient of U"); + AddVolumeOutput("GRAD_VEL_YZ", "Grad_Vel_yz", "VELOCITY_GRADIENT", "Z-Gradient of V"); + AddVolumeOutput("GRAD_VEL_ZX", "Grad_Vel_zx", "VELOCITY_GRADIENT", "X-Gradient of W"); + AddVolumeOutput("GRAD_VEL_ZY", "Grad_Vel_zy", "VELOCITY_GRADIENT", "Y-Gradient of W"); + AddVolumeOutput("GRAD_VEL_ZZ", "Grad_Vel_zz", "VELOCITY_GRADIENT", "Z-Gradient of W"); + } + + if (config->GetKind_Turb_Model() == TURB_MODEL::SST){ + AddVolumeOutput("CDkw", "CDkw", "SST_QUANTITIES", "Cross-Diffusion term"); + AddVolumeOutput("F1", "F1", "SST_QUANTITIES", "F1 blending function"); + AddVolumeOutput("F2", "F2", "SST_QUANTITIES", "F2 blending function"); + } + } // Timestep info @@ -1648,6 +1672,7 @@ void CFlowOutput::LoadVolumeDataScalar(const CConfig* config, const CSolver* con SetVolumeOutputValue("CFL", iPoint, Node_Flow->GetLocalCFL(iPoint)); if (config->GetViscous()) { + const auto VelGrad = Node_Flow->GetVelocityGradient(iPoint); if (nDim == 3){ SetVolumeOutputValue("VORTICITY_X", iPoint, Node_Flow->GetVorticity(iPoint)[0]); SetVolumeOutputValue("VORTICITY_Y", iPoint, Node_Flow->GetVorticity(iPoint)[1]); @@ -1655,7 +1680,27 @@ void CFlowOutput::LoadVolumeDataScalar(const CConfig* config, const CSolver* con } else { SetVolumeOutputValue("VORTICITY", iPoint, Node_Flow->GetVorticity(iPoint)[2]); } - SetVolumeOutputValue("Q_CRITERION", iPoint, GetQCriterion(Node_Flow->GetVelocityGradient(iPoint))); + SetVolumeOutputValue("Q_CRITERION", iPoint, GetQCriterion(VelGrad)); + SetVolumeOutputValue("WALL_DISTANCE", iPoint, Node_Geo->GetWall_Distance(iPoint)); + + SetVolumeOutputValue("GRAD_VEL_XX", iPoint, VelGrad(0,0)); + SetVolumeOutputValue("GRAD_VEL_XY", iPoint, VelGrad(0,1)); + SetVolumeOutputValue("GRAD_VEL_YX", iPoint, VelGrad(1,0)); + SetVolumeOutputValue("GRAD_VEL_YY", iPoint, VelGrad(1,1)); + if (nDim == 3) { + SetVolumeOutputValue("GRAD_VEL_XZ", iPoint, VelGrad(0,2)); + SetVolumeOutputValue("GRAD_VEL_YZ", iPoint, VelGrad(1,2)); + SetVolumeOutputValue("GRAD_VEL_ZX", iPoint, VelGrad(2,0)); + SetVolumeOutputValue("GRAD_VEL_ZY", iPoint, VelGrad(2,1)); + SetVolumeOutputValue("GRAD_VEL_ZZ", iPoint, VelGrad(2,2)); + } + + if (config->GetKind_Turb_Model() == TURB_MODEL::SST){ + SetVolumeOutputValue("CDkw", iPoint, Node_Turb->GetCrossDiff(iPoint)); + SetVolumeOutputValue("F1", iPoint, Node_Turb->GetF1blending(iPoint)); + SetVolumeOutputValue("F2", iPoint, Node_Turb->GetF2blending(iPoint)); + } + } const bool limiter = (config->GetKind_SlopeLimit_Turb() != LIMITER::NONE); @@ -1711,6 +1756,17 @@ void CFlowOutput::LoadVolumeDataScalar(const CConfig* config, const CSolver* con if (config->GetKind_HybridRANSLES() != NO_HYBRIDRANSLES) { SetVolumeOutputValue("DES_LENGTHSCALE", iPoint, Node_Flow->GetDES_LengthScale(iPoint)); SetVolumeOutputValue("WALL_DISTANCE", iPoint, Node_Geo->GetWall_Distance(iPoint)); + const su2double mut = Node_Flow->GetEddyViscosity(iPoint); + const su2double mu = Node_Flow->GetLaminarViscosity(iPoint); + const su2double LESIQ = 1.0/(1.0+0.05*pow((mut+mu)/mu, 0.53)); + SetVolumeOutputValue("LESIQ", iPoint, LESIQ); + if (config->GetKind_Turb_Model() == TURB_MODEL::SST) { + const su2double betaStar = 0.09; // constants[6] + const su2double RANSLength = sqrt(Node_Turb->GetSolution(iPoint, 0)) / max(1e-20, (betaStar * Node_Turb->GetSolution(iPoint, 1))); + const su2double RatioL = 0.1; // TODO:: it should be less or equal than 0.2 - 0.1. Should be taken as input from config? + const su2double SRSGridSize = RANSLength * RatioL; + SetVolumeOutputValue("SRS_GRID_SIZE", iPoint, SRSGridSize); + } SetVolumeOutputValue("LES_SENSOR", iPoint, Node_Flow->GetLES_Mode(iPoint)); if (config->GetSBSParam().StochasticBackscatter) { if (config->GetSBSParam().SBS_Ctau > 0.0) { diff --git a/SU2_CFD/src/solvers/CTurbSASolver.cpp b/SU2_CFD/src/solvers/CTurbSASolver.cpp index ff580cf56b05..109f847310ac 100644 --- a/SU2_CFD/src/solvers/CTurbSASolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSASolver.cpp @@ -224,9 +224,9 @@ void CTurbSASolver::Preprocessing(CGeometry *geometry, CSolver **solver_containe SU2_OMP_FOR_STAT(omp_chunk_size) for (unsigned long iPoint = 0; iPoint < nPoint; iPoint++){ auto Vorticity = flowNodes->GetVorticity(iPoint); - auto PrimGrad_Flow = flowNodes->GetGradient_Primitive(iPoint); + auto VelGrad = flowNodes->GetGradient_Primitive(iPoint) + prim_idx.Velocity(); auto Laminar_Viscosity = flowNodes->GetLaminarViscosity(iPoint); - nodes->SetVortex_Tilting(iPoint, PrimGrad_Flow, Vorticity, Laminar_Viscosity); + nodes->SetVortex_Tilting(iPoint, VelGrad, Vorticity, Laminar_Viscosity); } END_SU2_OMP_FOR } @@ -1026,7 +1026,7 @@ void CTurbSASolver::SetDES_LengthScale(CSolver **solver, CGeometry *geometry, CC const su2double fw_star = 0.424, cv1_3 = pow(7.1, 3), k2 = pow(0.41, 2); const su2double cb1 = 0.1355, ct3 = 1.2, ct4 = 0.5; - const su2double sigma = 2./3., cb2 = 0.622, f_max = 1.0, f_min = 0.1, a1 = 0.15, a2 = 0.3; + const su2double sigma = 2./3., cb2 = 0.622; auto* flowNodes = su2staticcast_p(solver[FLOW_SOL]->GetNodes()); @@ -1034,7 +1034,6 @@ void CTurbSASolver::SetDES_LengthScale(CSolver **solver, CGeometry *geometry, CC for (auto iPoint = 0ul; iPoint < nPointDomain; iPoint++){ const auto coord_i = geometry->nodes->GetCoord(iPoint); - const auto nNeigh = geometry->nodes->GetnPoint(iPoint); const auto wallDistance = geometry->nodes->GetWall_Distance(iPoint); const auto velocityGrad = flowNodes->GetVelocityGradient(iPoint); const auto vorticity = flowNodes->GetVorticity(iPoint); @@ -1104,8 +1103,8 @@ void CTurbSASolver::SetDES_LengthScale(CSolver **solver, CGeometry *geometry, CC maxDelta = LES_FilterWidth; } - const su2double r_d = (kinematicViscosityTurb+kinematicViscosity)/(uijuij*k2*pow(wallDistance, 2.0)); - const su2double f_d = 1.0-tanh(pow(8.0*r_d,3.0)); + const su2double r_d = (kinematicViscosityTurb+kinematicViscosity)/(uijuij*k2*pow(wallDistance, 2)); + const su2double f_d = 1.0-tanh(pow(8.0*r_d,3)); const su2double distDES = constDES * maxDelta; lengthScale = wallDistance-f_d*max(0.0,(wallDistance-distDES)); @@ -1146,8 +1145,8 @@ void CTurbSASolver::SetDES_LengthScale(CSolver **solver, CGeometry *geometry, CC pow(ratioOmega[1], 2)*delta[0]*delta[2] + pow(ratioOmega[2], 2)*delta[0]*delta[1]); - const su2double r_d = (kinematicViscosityTurb+kinematicViscosity)/(uijuij*k2*pow(wallDistance, 2.0)); - const su2double f_d = 1.0-tanh(pow(8.0*r_d,3.0)); + const su2double r_d = (kinematicViscosityTurb+kinematicViscosity)/(uijuij*k2*pow(wallDistance, 2)); + const su2double f_d = 1.0-tanh(pow(8.0*r_d,3)); if (f_d < 0.99){ maxDelta = deltaDDES; @@ -1173,46 +1172,10 @@ void CTurbSASolver::SetDES_LengthScale(CSolver **solver, CGeometry *geometry, CC Flow Turbulence Combust - 2015 ---*/ - su2double vortexTiltingMeasure = nodes->GetVortex_Tilting(iPoint); + const su2double r_d = (kinematicViscosityTurb+kinematicViscosity)/(uijuij*k2*pow(wallDistance, 2)); + const su2double f_d = 1.0-tanh(pow(8.0*r_d,3)); - const su2double omega = GeometryToolbox::Norm(3, vorticity); - - su2double ratioOmega[MAXNDIM] = {}; - - for (auto iDim = 0; iDim < 3; iDim++){ - ratioOmega[iDim] = vorticity[iDim]/omega; - } - - const su2double deltaDDES = geometry->nodes->GetMaxLength(iPoint); - - su2double ln_max = 0.0; - for (const auto jPoint : geometry->nodes->GetPoints(iPoint)) { - const auto coord_j = geometry->nodes->GetCoord(jPoint); - su2double delta[MAXNDIM] = {}; - for (auto iDim = 0u; iDim < nDim; iDim++){ - delta[iDim] = fabs(coord_j[iDim] - coord_i[iDim]); - } - su2double ln[3]; - ln[0] = delta[1]*ratioOmega[2] - delta[2]*ratioOmega[1]; - ln[1] = delta[2]*ratioOmega[0] - delta[0]*ratioOmega[2]; - ln[2] = delta[0]*ratioOmega[1] - delta[1]*ratioOmega[0]; - const su2double aux_ln = sqrt(ln[0]*ln[0] + ln[1]*ln[1] + ln[2]*ln[2]); - ln_max = max(ln_max, aux_ln); - vortexTiltingMeasure += nodes->GetVortex_Tilting(jPoint); - } - vortexTiltingMeasure /= (nNeigh + 1); - - const su2double f_kh = max(f_min, - min(f_max, - f_min + ((f_max - f_min)/(a2 - a1)) * (vortexTiltingMeasure - a1))); - - const su2double r_d = (kinematicViscosityTurb+kinematicViscosity)/(uijuij*k2*pow(wallDistance, 2.0)); - const su2double f_d = 1.0-tanh(pow(8.0*r_d,3.0)); - - su2double maxDelta = (ln_max/sqrt(3.0)) * f_kh; - if (f_d < 0.999){ - maxDelta = deltaDDES; - } + su2double maxDelta = ShearLayerAdaptedLengthScale(geometry, iPoint, vorticity, f_d < 0.99); if (LES_FilterWidth > 0.0){ maxDelta = LES_FilterWidth; diff --git a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp index d6f98ecdee6b..c3cf2dc1b22c 100644 --- a/SU2_CFD/src/solvers/CTurbSSTSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSSTSolver.cpp @@ -207,8 +207,34 @@ void CTurbSSTSolver::Preprocessing(CGeometry *geometry, CSolver **solver_contain SU2_ZONE_SCOPED SU2_OMP_SAFE_GLOBAL_ACCESS(config->SetGlobalParam(config->GetKind_Solver(), RunTime_EqSystem);) + const auto kind_hybridRANSLES = config->GetKind_HybridRANSLES(); + /*--- Upwind second order reconstruction and gradients ---*/ CommonPreprocessing(geometry, config, Output); + + if (kind_hybridRANSLES != NO_HYBRIDRANSLES) { + + /*--- Set the vortex tilting coefficient at every node if required ---*/ + + if (kind_hybridRANSLES == SST_EDDES){ + auto* flowNodes = su2staticcast_p(solver_container[FLOW_SOL]->GetNodes()); + + SU2_OMP_FOR_STAT(omp_chunk_size) + for (unsigned long iPoint = 0; iPoint < nPoint; iPoint++){ + auto Vorticity = flowNodes->GetVorticity(iPoint); + auto VelGrad = flowNodes->GetGradient_Primitive(iPoint) + prim_idx.Velocity(); + auto Laminar_Viscosity = flowNodes->GetLaminarViscosity(iPoint); + nodes->SetVortex_Tilting(iPoint, VelGrad, Vorticity, Laminar_Viscosity); + } + END_SU2_OMP_FOR + } + + /*--- Compute the DES length scale ---*/ + + SetDES_LengthScale(solver_container, geometry, config); + + } + } void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_container, @@ -384,12 +410,16 @@ void CTurbSSTSolver::Source_Residual(CGeometry *geometry, CSolver **solver_conta numerics->SetCoord(geometry->nodes->GetCoord(iPoint), geometry->nodes->GetCoord(iPoint)); } + if (config->GetKind_HybridRANSLES() != NO_HYBRIDRANSLES) { + numerics->SetLengthScale(nodes->GetDES_LengthScale(iPoint), 0.0); + } + /*--- Compute the source term ---*/ auto residual = numerics->ComputeResidual(config); /*--- Store the intermittency ---*/ - + if (config->GetKind_Trans_Model() != TURB_TRANS_MODEL::NONE) { nodes->SetIntermittency(iPoint, numerics->GetIntermittencyEff()); } @@ -875,6 +905,130 @@ void CTurbSSTSolver::SetUniformInlet(const CConfig* config, unsigned short iMark } + +void CTurbSSTSolver::SetDES_LengthScale(CSolver **solver, CGeometry *geometry, CConfig *config){ + + const auto kind_hybridRANSLES = config->GetKind_HybridRANSLES(); + + auto* flowNodes = su2staticcast_p(solver[FLOW_SOL]->GetNodes()); + + SU2_OMP_FOR_STAT(omp_chunk_size) + for (unsigned long iPoint = 0; iPoint < nPoint; iPoint++){ + + + const su2double StrainMag = max(flowNodes->GetStrainMag(iPoint), 1e-12); + const auto Vorticity = flowNodes->GetVorticity(iPoint); + const su2double VortMag = max(GeometryToolbox::Norm(3, Vorticity), 1e-12); + + const su2double KolmConst2 = 0.41*0.41; + const su2double wallDist2 = geometry->nodes->GetWall_Distance(iPoint)*geometry->nodes->GetWall_Distance(iPoint); + + const su2double eddyVisc = nodes->GetmuT(iPoint)/flowNodes->GetDensity(iPoint); + const su2double lamVisc = flowNodes->GetLaminarViscosity(iPoint)/flowNodes->GetDensity(iPoint); + + const su2double C_DES1 = 0.78; + const su2double C_DES2 = 0.61; + + const su2double h_max = geometry->nodes->GetMaxLength(iPoint); + const su2double C_DES = C_DES1 * nodes->GetF1blending(iPoint) + C_DES2 * (1-nodes->GetF1blending(iPoint)); + const su2double l_RANS = sqrt(nodes->GetSolution(iPoint, 0)) / (constants[6] * nodes->GetSolution(iPoint, 1)); + + su2double DES_lengthScale = 0.0; + + switch(kind_hybridRANSLES){ + /*--- Every model is taken from "Development of DDES and IDDES Formulations for the k-ω Shear Stress Transport Model" + Mikhail S. Gritskevich et al. (DOI:10.1007/s10494-011-9378-4) + ---*/ + case SST_DDES: { + + const su2double r_d = (eddyVisc + lamVisc) / max((KolmConst2*wallDist2 * sqrt(0.5 * (StrainMag*StrainMag + VortMag*VortMag))), 1e-10); + const su2double C_d1 = 20.0; + const su2double C_d2 = 3.0; + + const su2double f_d = 1 - tanh(pow(C_d1 * r_d, C_d2)); + + const su2double l_LES = C_DES * h_max; + + DES_lengthScale = l_RANS - f_d * max(0.0, l_RANS - l_LES); + + break; + } + case SST_IDDES: { + + // Constants + const su2double C_w = 0.15; + const su2double C_dt1 = 20.0; + const su2double C_dt2 = 3.0; + const su2double C_l = 5.0; + const su2double C_t = 1.87; + + const su2double alpha = 0.25 - sqrt(wallDist2) / h_max; + const su2double f_b = min(2.0 * exp(-9.0 * alpha*alpha), 1.0); + const su2double r_dt = eddyVisc / max((KolmConst2*wallDist2 * sqrt(0.5 * (StrainMag*StrainMag + VortMag*VortMag))), 1e-10); + const su2double f_dt = 1 - tanh(pow(C_dt1 * r_dt, C_dt2)); + const su2double ftilda_d = max(1.0 - f_dt, f_b); + + const su2double r_dl = lamVisc / max((KolmConst2*wallDist2 * sqrt(0.5 * (StrainMag*StrainMag + VortMag*VortMag))), 1e-10); + const su2double f_l = tanh(pow(C_l*C_l*r_dl, 10.0)); + const su2double f_t = tanh(pow(C_t*C_t*r_dt, 3.0)); + const su2double f_e2 = 1.0 - max(f_t, f_l); + const su2double f_e1 = alpha >= 0.0 ? 2.0 * exp(-11.09*alpha*alpha) : 2.0 * exp(-9.0*alpha*alpha); + const su2double f_e = f_e2 * max((f_e1 - 1.0), 0.0); + + + const su2double Delta = min(C_w * max(sqrt(wallDist2), h_max), h_max); + const su2double l_LES = C_DES * Delta; + + DES_lengthScale = ftilda_d *(1.0+f_e)*l_RANS + (1.0 - ftilda_d) * l_LES; + + break; + } + case SST_SIDDES: { + + // Constants + const su2double C_w = 0.15; + const su2double C_dt1 = 20.0; + const su2double C_dt2 = 3.0; + + const su2double alpha = 0.25 - sqrt(wallDist2) / h_max; + const su2double f_b = min(2.0 * exp(-9.0 * alpha*alpha), 1.0); + const su2double r_dt = eddyVisc / max((KolmConst2*wallDist2 * sqrt(0.5 * (StrainMag*StrainMag + VortMag*VortMag))), 1e-10); + const su2double f_dt = 1 - tanh(pow(C_dt1 * r_dt, C_dt2)); + const su2double ftilda_d = max(1.0 - f_dt, f_b); + + const su2double Delta = min(C_w * max(sqrt(wallDist2), h_max), h_max); + const su2double l_LES = C_DES * Delta; + + DES_lengthScale = ftilda_d*l_RANS + (1.0 - ftilda_d) * l_LES; + + break; + } + case SST_EDDES: { + /*--- DDES with the shear-layer-adapted subgrid length-scale of Shur et al. (An Enhanced Version of DES with + Rapid Transition from RANS to LES in Separated Flows, Flow Turbulence Combust 95, 2015), applied to the SST model + as in Guseva et al. (Flow Turbulence Combust 98, 2017) and Xiao et al. (Int. J. Heat Fluid Flow 85, 2020). ---*/ + + const su2double r_d = (eddyVisc + lamVisc) / max((KolmConst2*wallDist2 * sqrt(0.5 * (StrainMag*StrainMag + VortMag*VortMag))), 1e-10); + const su2double C_d1 = 20.0; + const su2double C_d2 = 3.0; + + const su2double f_d = 1 - tanh(pow(C_d1 * r_d, C_d2)); + + const su2double delta = ShearLayerAdaptedLengthScale(geometry, iPoint, Vorticity, f_d < 0.99); + + const su2double l_LES = C_DES * delta; + DES_lengthScale = l_RANS - f_d * max(0.0, l_RANS - l_LES); + + break; + } + } + + nodes->SetDES_LengthScale(iPoint, DES_lengthScale); + + } + END_SU2_OMP_FOR +} + void CTurbSSTSolver::ComputeUnderRelaxationFactor(CSolver** solver_container, const CConfig *config) { SU2_ZONE_SCOPED diff --git a/SU2_CFD/src/solvers/CTurbSolver.cpp b/SU2_CFD/src/solvers/CTurbSolver.cpp index f5069de42b7a..ab21c716b880 100644 --- a/SU2_CFD/src/solvers/CTurbSolver.cpp +++ b/SU2_CFD/src/solvers/CTurbSolver.cpp @@ -316,3 +316,80 @@ void CTurbSolver::ComputeUnderRelaxationFactorHelper(CSolver** solver_container, } END_SU2_OMP_FOR } + +su2double CTurbSolver::ShearLayerAdaptedLengthScale(const CGeometry* geometry, unsigned long iPoint, + const su2double* vorticity, bool shielded) const { + const su2double omega = GeometryToolbox::Norm(3, vorticity); + + /*--- Without vorticity its direction is undefined and Delta_omega vanishes, use the standard DES length-scale. ---*/ + if (omega < 1e-12) return geometry->nodes->GetMaxLength(iPoint); + + su2double direction[3]; + for (auto iDim = 0u; iDim < 3; iDim++) direction[iDim] = vorticity[iDim] / omega; + + /*--- Delta_omega = max_{n,m} |l_n - l_m| / sqrt(3), with l_n = n_omega x r_n and r_n the vertices of the control + volume (Eq. 1). The control volume of a point is its median-dual cell, whose vertices are the midpoints of the edges + of the point and the centroids of the faces and of the elements that contain it (and the point itself where the + cell is cut by a boundary). On hexahedral grids the extreme vertices are the 8 element centroids. ---*/ + static thread_local vector> projected; + projected.clear(); + + const auto coord_i = geometry->nodes->GetCoord(iPoint); + auto addVertex = [&](const su2double* vertex) { + su2double relative[3] = {0.0, 0.0, 0.0}; + for (auto iDim = 0u; iDim < nDim; iDim++) relative[iDim] = vertex[iDim] - coord_i[iDim]; + array cross; + GeometryToolbox::CrossProduct(direction, relative, cross.data()); + projected.push_back(cross); + }; + + addVertex(coord_i); + + for (const auto jPoint : geometry->nodes->GetPoints(iPoint)) { + const auto coord_j = geometry->nodes->GetCoord(jPoint); + su2double midpoint[3] = {0.0, 0.0, 0.0}; + for (auto iDim = 0u; iDim < nDim; iDim++) midpoint[iDim] = 0.5 * (coord_i[iDim] + coord_j[iDim]); + addVertex(midpoint); + } + + for (const auto iElem : geometry->nodes->GetElems(iPoint)) { + const auto* elem = geometry->elem[iElem]; + addVertex(elem->GetCG()); + + for (auto iFace = 0u; iFace < elem->GetnFaces(); iFace++) { + const auto nNodesFace = elem->GetnNodesFace(iFace); + bool containsPoint = false; + su2double centroid[3] = {0.0, 0.0, 0.0}; + for (auto iNode = 0u; iNode < nNodesFace; iNode++) { + const auto jPoint = elem->GetNode(elem->GetFaces(iFace, iNode)); + containsPoint = containsPoint || (jPoint == iPoint); + const auto coord_j = geometry->nodes->GetCoord(jPoint); + for (auto iDim = 0u; iDim < nDim; iDim++) centroid[iDim] += coord_j[iDim] / nNodesFace; + } + if (containsPoint) addVertex(centroid); + } + } + + su2double diameter2 = 0.0; + for (auto n = 0ul; n < projected.size(); n++) { + for (auto m = n + 1; m < projected.size(); m++) { + su2double dist2 = 0.0; + for (auto iDim = 0u; iDim < 3; iDim++) dist2 += pow(projected[n][iDim] - projected[m][iDim], 2); + diameter2 = max(diameter2, dist2); + } + } + const su2double deltaOmega = sqrt(diameter2 / 3.0); + + /*--- In the RANS region F_KH is set to 1 to shield the boundary layer (Eq. 6, epsilon = 0.01). ---*/ + if (shielded) return deltaOmega; + + /*--- F_KH of the vortex tilting measure averaged over the point and its neighbors (Eq. 4). ---*/ + su2double vortexTilting = nodes->GetVortex_Tilting(iPoint); + for (const auto jPoint : geometry->nodes->GetPoints(iPoint)) vortexTilting += nodes->GetVortex_Tilting(jPoint); + vortexTilting /= geometry->nodes->GetnPoint(iPoint) + 1; + + const su2double fMax = 1.0, fMin = 0.1, a1 = 0.15, a2 = 0.3; + const su2double fKH = max(fMin, min(fMax, fMin + (fMax - fMin) / (a2 - a1) * (vortexTilting - a1))); + + return deltaOmega * fKH; +} diff --git a/SU2_CFD/src/variables/CTurbSAVariable.cpp b/SU2_CFD/src/variables/CTurbSAVariable.cpp index beb97d960bef..d0a5c5327765 100644 --- a/SU2_CFD/src/variables/CTurbSAVariable.cpp +++ b/SU2_CFD/src/variables/CTurbSAVariable.cpp @@ -56,8 +56,6 @@ CTurbSAVariable::CTurbSAVariable(su2double val_nu_tilde, su2double val_muT, unsi Solution_time_n1 = Solution; } - DES_LengthScale.resize(nPoint) = su2double(0.0); - Vortex_Tilting.resize(nPoint); if (config->GetKind_HybridRANSLES() != NO_HYBRIDRANSLES) { lesMode.resize(nPoint) = su2double(0.0); @@ -70,50 +68,3 @@ CTurbSAVariable::CTurbSAVariable(su2double val_nu_tilde, su2double val_muT, unsi } } - -void CTurbSAVariable::SetVortex_Tilting(unsigned long iPoint, CMatrixView PrimGrad_Flow, - const su2double* Vorticity, su2double LaminarViscosity) { - - su2double Strain[3][3] = {{0,0,0}, {0,0,0}, {0,0,0}}, Omega, StrainDotVort[3], numVecVort[3]; - su2double numerator, trace0, trace1, denominator; - - AD::StartPreacc(); - AD::SetPreaccIn(PrimGrad_Flow, nDim+1, nDim); - AD::SetPreaccIn(Vorticity, 3); - /*--- Eddy viscosity ---*/ - AD::SetPreaccIn(muT(iPoint)); - /*--- Laminar viscosity --- */ - AD::SetPreaccIn(LaminarViscosity); - - Strain[0][0] = PrimGrad_Flow[1][0]; - Strain[1][0] = 0.5*(PrimGrad_Flow[2][0] + PrimGrad_Flow[1][1]); - Strain[0][1] = 0.5*(PrimGrad_Flow[1][1] + PrimGrad_Flow[2][0]); - Strain[1][1] = PrimGrad_Flow[2][1]; - if (nDim == 3){ - Strain[0][2] = 0.5*(PrimGrad_Flow[3][0] + PrimGrad_Flow[1][2]); - Strain[1][2] = 0.5*(PrimGrad_Flow[3][1] + PrimGrad_Flow[2][2]); - Strain[2][0] = 0.5*(PrimGrad_Flow[1][2] + PrimGrad_Flow[3][0]); - Strain[2][1] = 0.5*(PrimGrad_Flow[2][2] + PrimGrad_Flow[3][1]); - Strain[2][2] = PrimGrad_Flow[3][2]; - } - - Omega = sqrt(Vorticity[0]*Vorticity[0] + Vorticity[1]*Vorticity[1]+ Vorticity[2]*Vorticity[2]); - - StrainDotVort[0] = Strain[0][0]*Vorticity[0]+Strain[0][1]*Vorticity[1]+Strain[0][2]*Vorticity[2]; - StrainDotVort[1] = Strain[1][0]*Vorticity[0]+Strain[1][1]*Vorticity[1]+Strain[1][2]*Vorticity[2]; - StrainDotVort[2] = Strain[2][0]*Vorticity[0]+Strain[2][1]*Vorticity[1]+Strain[2][2]*Vorticity[2]; - - numVecVort[0] = StrainDotVort[1]*Vorticity[2] - StrainDotVort[2]*Vorticity[1]; - numVecVort[1] = StrainDotVort[2]*Vorticity[0] - StrainDotVort[0]*Vorticity[2]; - numVecVort[2] = StrainDotVort[0]*Vorticity[1] - StrainDotVort[1]*Vorticity[0]; - - numerator = sqrt(6.0) * sqrt(numVecVort[0]*numVecVort[0] + numVecVort[1]*numVecVort[1] + numVecVort[2]*numVecVort[2]); - trace0 = 3.0*(pow(Strain[0][0],2.0) + pow(Strain[1][1],2.0) + pow(Strain[2][2],2.0)); - trace1 = pow(Strain[0][0] + Strain[1][1] + Strain[2][2],2.0); - denominator = pow(Omega, 2.0) * sqrt(trace0-trace1); - - Vortex_Tilting(iPoint) = (numerator/denominator) * max(1.0,0.2*LaminarViscosity/muT(iPoint)); - - AD::SetPreaccOut(Vortex_Tilting(iPoint)); - AD::EndPreacc(); -} diff --git a/SU2_CFD/src/variables/CTurbVariable.cpp b/SU2_CFD/src/variables/CTurbVariable.cpp index 139223055a42..c2bfdb669286 100644 --- a/SU2_CFD/src/variables/CTurbVariable.cpp +++ b/SU2_CFD/src/variables/CTurbVariable.cpp @@ -27,6 +27,7 @@ #include "../../include/variables/CTurbVariable.hpp" +#include "../../include/numerics/CNumerics.hpp" CTurbVariable::CTurbVariable(unsigned long npoint, unsigned long ndim, unsigned long nvar, CConfig *config) @@ -35,8 +36,55 @@ CTurbVariable::CTurbVariable(unsigned long npoint, unsigned long ndim, unsigned turb_index.resize(nPoint) = su2double(1.0); intermittency.resize(nPoint) = su2double(1.0); + DES_LengthScale.resize(nPoint) = su2double(0.0); + + Vortex_Tilting.resize(nPoint); + } + +void CTurbVariable::SetVortex_Tilting(unsigned long iPoint, CMatrixView VelGrad, + const su2double* Vorticity, su2double LaminarViscosity) { + + su2double Strain[3][3] = {{0,0,0}, {0,0,0}, {0,0,0}}, Omega, StrainDotVort[3], numVecVort[3]; + su2double numerator, trace0, trace1, denominator; + + AD::StartPreacc(); + AD::SetPreaccIn(VelGrad, nDim, nDim); + AD::SetPreaccIn(Vorticity, 3); + /*--- Eddy viscosity ---*/ + AD::SetPreaccIn(muT(iPoint)); + /*--- Laminar viscosity --- */ + AD::SetPreaccIn(LaminarViscosity); + + CNumerics::ComputeMeanRateOfStrainMatrix(nDim, Strain, VelGrad); + + Omega = GeometryToolbox::Norm(3, Vorticity); + + StrainDotVort[0] = Strain[0][0]*Vorticity[0]+Strain[0][1]*Vorticity[1]+Strain[0][2]*Vorticity[2]; + StrainDotVort[1] = Strain[1][0]*Vorticity[0]+Strain[1][1]*Vorticity[1]+Strain[1][2]*Vorticity[2]; + StrainDotVort[2] = Strain[2][0]*Vorticity[0]+Strain[2][1]*Vorticity[1]+Strain[2][2]*Vorticity[2]; + + GeometryToolbox::CrossProduct(StrainDotVort, Vorticity, numVecVort); + numerator = sqrt(6.0) * GeometryToolbox::Norm(3, numVecVort); + /*--- 3 tr(S^2) - tr(S)^2, where tr(S^2) is the sum of the squares of all the components of S. ---*/ + trace0 = 0.0; + for (auto iDim = 0u; iDim < 3; iDim++) + for (auto jDim = 0u; jDim < 3; jDim++) trace0 += 3.0 * pow(Strain[iDim][jDim], 2); + trace1 = pow(Strain[0][0] + Strain[1][1] + Strain[2][2],2.0); + denominator = pow(Omega, 2.0) * sqrt(max(trace0-trace1, 0.0)); + + /*--- Without vorticity or strain anisotropy the measure is undefined, make it neutral (F_KH = 1). ---*/ + if (denominator < 1e-20) { + Vortex_Tilting(iPoint) = 1.0; + } else { + Vortex_Tilting(iPoint) = (numerator/denominator) * max(1.0,0.2*LaminarViscosity/max(muT(iPoint), 1e-20)); + } + + AD::SetPreaccOut(Vortex_Tilting(iPoint)); + AD::EndPreacc(); +} + void CTurbVariable::RegisterEddyViscosity(bool input) { RegisterContainer(input, muT); -} +} \ No newline at end of file diff --git a/TestCases/ddes/oneram6/ddes_oneram6_sa_eddes.cfg b/TestCases/ddes/oneram6/ddes_oneram6_sa_eddes.cfg new file mode 100644 index 000000000000..4724a4b34e3e --- /dev/null +++ b/TestCases/ddes/oneram6/ddes_oneram6_sa_eddes.cfg @@ -0,0 +1,70 @@ +% Hybrid RANS/LES model SA_EDDES, ONERA M6 wing on a hexahedral grid. +% The simulation restarts from a partially converged SA RANS solution (solution_flow_sa_00000.dat), +% so that the LES branch of the length scale is active in the turbulent regions. +% +% ------------------------------ PROBLEM DEFINITION ------------------------------% +SOLVER= RANS +KIND_TURB_MODEL= SA +HYBRID_RANSLES= SA_EDDES +MATH_PROBLEM= DIRECT +RESTART_SOL= YES +RESTART_ITER= 1 +% +% ------------------------------ TIME INTEGRATION --------------------------------% +TIME_DOMAIN= YES +TIME_MARCHING= DUAL_TIME_STEPPING-1ST_ORDER +TIME_STEP= 1e-4 +TIME_ITER= 6 +INNER_ITER= 2 +% +% ------------------------------ FREE-STREAM -------------------------------------% +MACH_NUMBER= 0.8395 +AOA= 3.06 +SIDESLIP_ANGLE= 0.0 +FREESTREAM_TEMPERATURE= 288.15 +REYNOLDS_NUMBER= 11.72E6 +REYNOLDS_LENGTH= 0.64607 +FLUID_MODEL= STANDARD_AIR +VISCOSITY_MODEL= SUTHERLAND +% +% ------------------------------ REFERENCE VALUES --------------------------------% +REF_ORIGIN_MOMENT_X= 0.25 +REF_ORIGIN_MOMENT_Y= 0.00 +REF_ORIGIN_MOMENT_Z= 0.00 +REF_LENGTH= 0.64607 +REF_AREA= 0 +% +% ------------------------------ BOUNDARY CONDITIONS -----------------------------% +MARKER_HEATFLUX= ( WING, 0.0 ) +MARKER_FAR= ( FARFIELD ) +MARKER_SYM= ( SYMMETRY ) +MARKER_PLOTTING= ( WING ) +MARKER_MONITORING= ( WING ) +% +% ------------------------------ NUMERICS ----------------------------------------% +NUM_METHOD_GRAD= GREEN_GAUSS +CFL_NUMBER= 4.0 +CFL_ADAPT= NO +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= LU_SGS +LINEAR_SOLVER_ERROR= 1E-4 +LINEAR_SOLVER_ITER= 5 +CONV_NUM_METHOD_FLOW= ROE +MUSCL_FLOW= YES +SLOPE_LIMITER_FLOW= VENKATAKRISHNAN +VENKAT_LIMITER_COEFF= 1.0 +TIME_DISCRE_FLOW= EULER_IMPLICIT +CONV_NUM_METHOD_TURB= SCALAR_UPWIND +MUSCL_TURB= NO +TIME_DISCRE_TURB= EULER_IMPLICIT +CONV_RESIDUAL_MINVAL= -10 +CONV_STARTITER= 10 +% +% ------------------------------ INPUT/OUTPUT ------------------------------------% +MESH_FILENAME= ../../rans/oneram6/mesh_ONERAM6_turb_hexa_43008.su2 +MESH_FORMAT= SU2 +SOLUTION_FILENAME= solution_flow_sa +OUTPUT_FILES= (RESTART) +OUTPUT_WRT_FREQ= 250 +SCREEN_OUTPUT= (TIME_ITER, INNER_ITER, RMS_DENSITY, RMS_NU_TILDE, LIFT, DRAG) +HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF) diff --git a/TestCases/ddes/oneram6/ddes_oneram6_sst_ddes.cfg b/TestCases/ddes/oneram6/ddes_oneram6_sst_ddes.cfg new file mode 100644 index 000000000000..a027cbae243d --- /dev/null +++ b/TestCases/ddes/oneram6/ddes_oneram6_sst_ddes.cfg @@ -0,0 +1,70 @@ +% Hybrid RANS/LES model SST_DDES, ONERA M6 wing on a hexahedral grid. +% The simulation restarts from a partially converged SST RANS solution (solution_flow_sst_00000.dat), +% so that the LES branch of the length scale is active in the turbulent regions. +% +% ------------------------------ PROBLEM DEFINITION ------------------------------% +SOLVER= RANS +KIND_TURB_MODEL= SST +HYBRID_RANSLES= SST_DDES +MATH_PROBLEM= DIRECT +RESTART_SOL= YES +RESTART_ITER= 1 +% +% ------------------------------ TIME INTEGRATION --------------------------------% +TIME_DOMAIN= YES +TIME_MARCHING= DUAL_TIME_STEPPING-1ST_ORDER +TIME_STEP= 1e-4 +TIME_ITER= 6 +INNER_ITER= 2 +% +% ------------------------------ FREE-STREAM -------------------------------------% +MACH_NUMBER= 0.8395 +AOA= 3.06 +SIDESLIP_ANGLE= 0.0 +FREESTREAM_TEMPERATURE= 288.15 +REYNOLDS_NUMBER= 11.72E6 +REYNOLDS_LENGTH= 0.64607 +FLUID_MODEL= STANDARD_AIR +VISCOSITY_MODEL= SUTHERLAND +% +% ------------------------------ REFERENCE VALUES --------------------------------% +REF_ORIGIN_MOMENT_X= 0.25 +REF_ORIGIN_MOMENT_Y= 0.00 +REF_ORIGIN_MOMENT_Z= 0.00 +REF_LENGTH= 0.64607 +REF_AREA= 0 +% +% ------------------------------ BOUNDARY CONDITIONS -----------------------------% +MARKER_HEATFLUX= ( WING, 0.0 ) +MARKER_FAR= ( FARFIELD ) +MARKER_SYM= ( SYMMETRY ) +MARKER_PLOTTING= ( WING ) +MARKER_MONITORING= ( WING ) +% +% ------------------------------ NUMERICS ----------------------------------------% +NUM_METHOD_GRAD= GREEN_GAUSS +CFL_NUMBER= 4.0 +CFL_ADAPT= NO +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= LU_SGS +LINEAR_SOLVER_ERROR= 1E-4 +LINEAR_SOLVER_ITER= 5 +CONV_NUM_METHOD_FLOW= ROE +MUSCL_FLOW= YES +SLOPE_LIMITER_FLOW= VENKATAKRISHNAN +VENKAT_LIMITER_COEFF= 1.0 +TIME_DISCRE_FLOW= EULER_IMPLICIT +CONV_NUM_METHOD_TURB= SCALAR_UPWIND +MUSCL_TURB= NO +TIME_DISCRE_TURB= EULER_IMPLICIT +CONV_RESIDUAL_MINVAL= -10 +CONV_STARTITER= 10 +% +% ------------------------------ INPUT/OUTPUT ------------------------------------% +MESH_FILENAME= ../../rans/oneram6/mesh_ONERAM6_turb_hexa_43008.su2 +MESH_FORMAT= SU2 +SOLUTION_FILENAME= solution_flow_sst +OUTPUT_FILES= (RESTART) +OUTPUT_WRT_FREQ= 250 +SCREEN_OUTPUT= (TIME_ITER, INNER_ITER, RMS_DENSITY, RMS_TKE, RMS_DISSIPATION, LIFT, DRAG) +HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF) diff --git a/TestCases/ddes/oneram6/ddes_oneram6_sst_eddes.cfg b/TestCases/ddes/oneram6/ddes_oneram6_sst_eddes.cfg new file mode 100644 index 000000000000..7de571ae72d2 --- /dev/null +++ b/TestCases/ddes/oneram6/ddes_oneram6_sst_eddes.cfg @@ -0,0 +1,70 @@ +% Hybrid RANS/LES model SST_EDDES, ONERA M6 wing on a hexahedral grid. +% The simulation restarts from a partially converged SST RANS solution (solution_flow_sst_00000.dat), +% so that the LES branch of the length scale is active in the turbulent regions. +% +% ------------------------------ PROBLEM DEFINITION ------------------------------% +SOLVER= RANS +KIND_TURB_MODEL= SST +HYBRID_RANSLES= SST_EDDES +MATH_PROBLEM= DIRECT +RESTART_SOL= YES +RESTART_ITER= 1 +% +% ------------------------------ TIME INTEGRATION --------------------------------% +TIME_DOMAIN= YES +TIME_MARCHING= DUAL_TIME_STEPPING-1ST_ORDER +TIME_STEP= 1e-4 +TIME_ITER= 6 +INNER_ITER= 2 +% +% ------------------------------ FREE-STREAM -------------------------------------% +MACH_NUMBER= 0.8395 +AOA= 3.06 +SIDESLIP_ANGLE= 0.0 +FREESTREAM_TEMPERATURE= 288.15 +REYNOLDS_NUMBER= 11.72E6 +REYNOLDS_LENGTH= 0.64607 +FLUID_MODEL= STANDARD_AIR +VISCOSITY_MODEL= SUTHERLAND +% +% ------------------------------ REFERENCE VALUES --------------------------------% +REF_ORIGIN_MOMENT_X= 0.25 +REF_ORIGIN_MOMENT_Y= 0.00 +REF_ORIGIN_MOMENT_Z= 0.00 +REF_LENGTH= 0.64607 +REF_AREA= 0 +% +% ------------------------------ BOUNDARY CONDITIONS -----------------------------% +MARKER_HEATFLUX= ( WING, 0.0 ) +MARKER_FAR= ( FARFIELD ) +MARKER_SYM= ( SYMMETRY ) +MARKER_PLOTTING= ( WING ) +MARKER_MONITORING= ( WING ) +% +% ------------------------------ NUMERICS ----------------------------------------% +NUM_METHOD_GRAD= GREEN_GAUSS +CFL_NUMBER= 4.0 +CFL_ADAPT= NO +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= LU_SGS +LINEAR_SOLVER_ERROR= 1E-4 +LINEAR_SOLVER_ITER= 5 +CONV_NUM_METHOD_FLOW= ROE +MUSCL_FLOW= YES +SLOPE_LIMITER_FLOW= VENKATAKRISHNAN +VENKAT_LIMITER_COEFF= 1.0 +TIME_DISCRE_FLOW= EULER_IMPLICIT +CONV_NUM_METHOD_TURB= SCALAR_UPWIND +MUSCL_TURB= NO +TIME_DISCRE_TURB= EULER_IMPLICIT +CONV_RESIDUAL_MINVAL= -10 +CONV_STARTITER= 10 +% +% ------------------------------ INPUT/OUTPUT ------------------------------------% +MESH_FILENAME= ../../rans/oneram6/mesh_ONERAM6_turb_hexa_43008.su2 +MESH_FORMAT= SU2 +SOLUTION_FILENAME= solution_flow_sst +OUTPUT_FILES= (RESTART) +OUTPUT_WRT_FREQ= 250 +SCREEN_OUTPUT= (TIME_ITER, INNER_ITER, RMS_DENSITY, RMS_TKE, RMS_DISSIPATION, LIFT, DRAG) +HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF) diff --git a/TestCases/ddes/oneram6/ddes_oneram6_sst_iddes.cfg b/TestCases/ddes/oneram6/ddes_oneram6_sst_iddes.cfg new file mode 100644 index 000000000000..b8a26e8a6e7d --- /dev/null +++ b/TestCases/ddes/oneram6/ddes_oneram6_sst_iddes.cfg @@ -0,0 +1,70 @@ +% Hybrid RANS/LES model SST_IDDES, ONERA M6 wing on a hexahedral grid. +% The simulation restarts from a partially converged SST RANS solution (solution_flow_sst_00000.dat), +% so that the LES branch of the length scale is active in the turbulent regions. +% +% ------------------------------ PROBLEM DEFINITION ------------------------------% +SOLVER= RANS +KIND_TURB_MODEL= SST +HYBRID_RANSLES= SST_IDDES +MATH_PROBLEM= DIRECT +RESTART_SOL= YES +RESTART_ITER= 1 +% +% ------------------------------ TIME INTEGRATION --------------------------------% +TIME_DOMAIN= YES +TIME_MARCHING= DUAL_TIME_STEPPING-1ST_ORDER +TIME_STEP= 1e-4 +TIME_ITER= 6 +INNER_ITER= 2 +% +% ------------------------------ FREE-STREAM -------------------------------------% +MACH_NUMBER= 0.8395 +AOA= 3.06 +SIDESLIP_ANGLE= 0.0 +FREESTREAM_TEMPERATURE= 288.15 +REYNOLDS_NUMBER= 11.72E6 +REYNOLDS_LENGTH= 0.64607 +FLUID_MODEL= STANDARD_AIR +VISCOSITY_MODEL= SUTHERLAND +% +% ------------------------------ REFERENCE VALUES --------------------------------% +REF_ORIGIN_MOMENT_X= 0.25 +REF_ORIGIN_MOMENT_Y= 0.00 +REF_ORIGIN_MOMENT_Z= 0.00 +REF_LENGTH= 0.64607 +REF_AREA= 0 +% +% ------------------------------ BOUNDARY CONDITIONS -----------------------------% +MARKER_HEATFLUX= ( WING, 0.0 ) +MARKER_FAR= ( FARFIELD ) +MARKER_SYM= ( SYMMETRY ) +MARKER_PLOTTING= ( WING ) +MARKER_MONITORING= ( WING ) +% +% ------------------------------ NUMERICS ----------------------------------------% +NUM_METHOD_GRAD= GREEN_GAUSS +CFL_NUMBER= 4.0 +CFL_ADAPT= NO +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= LU_SGS +LINEAR_SOLVER_ERROR= 1E-4 +LINEAR_SOLVER_ITER= 5 +CONV_NUM_METHOD_FLOW= ROE +MUSCL_FLOW= YES +SLOPE_LIMITER_FLOW= VENKATAKRISHNAN +VENKAT_LIMITER_COEFF= 1.0 +TIME_DISCRE_FLOW= EULER_IMPLICIT +CONV_NUM_METHOD_TURB= SCALAR_UPWIND +MUSCL_TURB= NO +TIME_DISCRE_TURB= EULER_IMPLICIT +CONV_RESIDUAL_MINVAL= -10 +CONV_STARTITER= 10 +% +% ------------------------------ INPUT/OUTPUT ------------------------------------% +MESH_FILENAME= ../../rans/oneram6/mesh_ONERAM6_turb_hexa_43008.su2 +MESH_FORMAT= SU2 +SOLUTION_FILENAME= solution_flow_sst +OUTPUT_FILES= (RESTART) +OUTPUT_WRT_FREQ= 250 +SCREEN_OUTPUT= (TIME_ITER, INNER_ITER, RMS_DENSITY, RMS_TKE, RMS_DISSIPATION, LIFT, DRAG) +HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF) diff --git a/TestCases/ddes/oneram6/ddes_oneram6_sst_siddes.cfg b/TestCases/ddes/oneram6/ddes_oneram6_sst_siddes.cfg new file mode 100644 index 000000000000..c7c7ad44a1b8 --- /dev/null +++ b/TestCases/ddes/oneram6/ddes_oneram6_sst_siddes.cfg @@ -0,0 +1,70 @@ +% Hybrid RANS/LES model SST_SIDDES, ONERA M6 wing on a hexahedral grid. +% The simulation restarts from a partially converged SST RANS solution (solution_flow_sst_00000.dat), +% so that the LES branch of the length scale is active in the turbulent regions. +% +% ------------------------------ PROBLEM DEFINITION ------------------------------% +SOLVER= RANS +KIND_TURB_MODEL= SST +HYBRID_RANSLES= SST_SIDDES +MATH_PROBLEM= DIRECT +RESTART_SOL= YES +RESTART_ITER= 1 +% +% ------------------------------ TIME INTEGRATION --------------------------------% +TIME_DOMAIN= YES +TIME_MARCHING= DUAL_TIME_STEPPING-1ST_ORDER +TIME_STEP= 1e-4 +TIME_ITER= 6 +INNER_ITER= 2 +% +% ------------------------------ FREE-STREAM -------------------------------------% +MACH_NUMBER= 0.8395 +AOA= 3.06 +SIDESLIP_ANGLE= 0.0 +FREESTREAM_TEMPERATURE= 288.15 +REYNOLDS_NUMBER= 11.72E6 +REYNOLDS_LENGTH= 0.64607 +FLUID_MODEL= STANDARD_AIR +VISCOSITY_MODEL= SUTHERLAND +% +% ------------------------------ REFERENCE VALUES --------------------------------% +REF_ORIGIN_MOMENT_X= 0.25 +REF_ORIGIN_MOMENT_Y= 0.00 +REF_ORIGIN_MOMENT_Z= 0.00 +REF_LENGTH= 0.64607 +REF_AREA= 0 +% +% ------------------------------ BOUNDARY CONDITIONS -----------------------------% +MARKER_HEATFLUX= ( WING, 0.0 ) +MARKER_FAR= ( FARFIELD ) +MARKER_SYM= ( SYMMETRY ) +MARKER_PLOTTING= ( WING ) +MARKER_MONITORING= ( WING ) +% +% ------------------------------ NUMERICS ----------------------------------------% +NUM_METHOD_GRAD= GREEN_GAUSS +CFL_NUMBER= 4.0 +CFL_ADAPT= NO +LINEAR_SOLVER= FGMRES +LINEAR_SOLVER_PREC= LU_SGS +LINEAR_SOLVER_ERROR= 1E-4 +LINEAR_SOLVER_ITER= 5 +CONV_NUM_METHOD_FLOW= ROE +MUSCL_FLOW= YES +SLOPE_LIMITER_FLOW= VENKATAKRISHNAN +VENKAT_LIMITER_COEFF= 1.0 +TIME_DISCRE_FLOW= EULER_IMPLICIT +CONV_NUM_METHOD_TURB= SCALAR_UPWIND +MUSCL_TURB= NO +TIME_DISCRE_TURB= EULER_IMPLICIT +CONV_RESIDUAL_MINVAL= -10 +CONV_STARTITER= 10 +% +% ------------------------------ INPUT/OUTPUT ------------------------------------% +MESH_FILENAME= ../../rans/oneram6/mesh_ONERAM6_turb_hexa_43008.su2 +MESH_FORMAT= SU2 +SOLUTION_FILENAME= solution_flow_sst +OUTPUT_FILES= (RESTART) +OUTPUT_WRT_FREQ= 250 +SCREEN_OUTPUT= (TIME_ITER, INNER_ITER, RMS_DENSITY, RMS_TKE, RMS_DISSIPATION, LIFT, DRAG) +HISTORY_OUTPUT= (ITER, RMS_RES, AERO_COEFF) diff --git a/TestCases/hybrid_regression.py b/TestCases/hybrid_regression.py index f63748ba9283..e1ce966ffb0f 100644 --- a/TestCases/hybrid_regression.py +++ b/TestCases/hybrid_regression.py @@ -132,7 +132,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 = [-8.730784, -3.268719, 0.318044, 1.770346, 0.000000] + cylinder_lowmach.test_vals = [-8.730784, -3.268719, 0.318044, 1.770346, 0.000000] cylinder_lowmach.test_vals_aarch64 = [-6.830996, -1.368850, -0.143956, 73.963354, 0] test_list.append(cylinder_lowmach) @@ -149,7 +149,7 @@ 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.004080, -7.638116, -0.000000, 2.089953] + poiseuille_profile.test_vals = [-12.004080, -7.638116, -0.000000, 2.089953] poiseuille_profile.test_vals_aarch64 = [-12.004276, -7.636719, -0.000000, 2.089953] test_list.append(poiseuille_profile) @@ -309,7 +309,7 @@ def main(): turb_naca0012_3c.cfg_dir = "rans_uq/naca0012" turb_naca0012_3c.cfg_file = "turb_NACA0012_uq_3c.cfg" turb_naca0012_3c.test_iter = 10 - turb_naca0012_3c.test_vals = [-5.583730, 1.228732, 0.381967, -0.046233] + turb_naca0012_3c.test_vals = [-5.583730, 1.228732, 0.381967, -0.046233] turb_naca0012_3c.test_vals_aarch64 = [-5.583737, 1.232005, 0.390258, -0.046305] test_list.append(turb_naca0012_3c) @@ -327,7 +327,7 @@ def main(): turb_naca0012_p1c2.cfg_dir = "rans_uq/naca0012" turb_naca0012_p1c2.cfg_file = "turb_NACA0012_uq_p1c2.cfg" turb_naca0012_p1c2.test_iter = 10 - turb_naca0012_p1c2.test_vals = [-5.553988, 1.234031, 0.424168, -0.033501] + turb_naca0012_p1c2.test_vals = [-5.553988, 1.234031, 0.424168, -0.033501] turb_naca0012_p1c2.test_vals_aarch64 = [-5.548245, 1.236384, 0.381821, -0.050337] test_list.append(turb_naca0012_p1c2) @@ -365,35 +365,35 @@ def main(): # NACA0012 Hydrofoil, pressure-based. Exercises the OpenMP path of the Poisson # solver's boundary flux corrections (inlet, far-field, pressure outlet). - inc_euler_naca0012_pb = TestCase('inc_euler_naca0012_pb') - inc_euler_naca0012_pb.cfg_dir = "incomp_euler/naca0012" - inc_euler_naca0012_pb.cfg_file = "incomp_pb_NACA0012.cfg" + inc_euler_naca0012_pb = TestCase('inc_euler_naca0012_pb') + inc_euler_naca0012_pb.cfg_dir = "incomp_euler/naca0012" + inc_euler_naca0012_pb.cfg_file = "incomp_pb_NACA0012.cfg" inc_euler_naca0012_pb.test_iter = 20 inc_euler_naca0012_pb.test_vals = [-4.454818, -4.784246, 0.427448, 0.012083] test_list.append(inc_euler_naca0012_pb) # Laminar cylinder, pressure-based. Viscous counterpart of the hydrofoil above, so the # threaded momentum and Rhie-Chow stages run with wall markers present. - inc_lam_cylinder_pb = TestCase('inc_lam_cylinder_pb') - inc_lam_cylinder_pb.cfg_dir = "incomp_navierstokes/cylinder" - inc_lam_cylinder_pb.cfg_file = "incomp_pb_cylinder.cfg" + inc_lam_cylinder_pb = TestCase('inc_lam_cylinder_pb') + inc_lam_cylinder_pb.cfg_dir = "incomp_navierstokes/cylinder" + inc_lam_cylinder_pb.cfg_file = "incomp_pb_cylinder.cfg" inc_lam_cylinder_pb.test_iter = 10 inc_lam_cylinder_pb.test_vals = [-3.486075, -3.777632, 0.012229, 6.178719] test_list.append(inc_lam_cylinder_pb) # Laminar sphere, pressure-based. The only 3D pressure-based case, and the one where the # alpha_p reduction sums over a different set of Jacobian diagonals per thread. - inc_lam_sphere_pb = TestCase('inc_lam_sphere_pb') - inc_lam_sphere_pb.cfg_dir = "incomp_navierstokes/sphere" - inc_lam_sphere_pb.cfg_file = "pb_sphere.cfg" + inc_lam_sphere_pb = TestCase('inc_lam_sphere_pb') + inc_lam_sphere_pb.cfg_dir = "incomp_navierstokes/sphere" + inc_lam_sphere_pb.cfg_file = "pb_sphere.cfg" inc_lam_sphere_pb.test_iter = 9 inc_lam_sphere_pb.test_vals = [-6.092084, -2.305039, -2.479072, -2.548968, 0.191798, 170.793204, -6.134920] test_list.append(inc_lam_sphere_pb) # Heated cylinder, pressure-based, coupled energy equation and variable density. - inc_poly_cylinder_pb = TestCase('inc_poly_cylinder_pb') - inc_poly_cylinder_pb.cfg_dir = "incomp_navierstokes/cylinder" - inc_poly_cylinder_pb.cfg_file = "pb_poly_cylinder.cfg" + inc_poly_cylinder_pb = TestCase('inc_poly_cylinder_pb') + inc_poly_cylinder_pb.cfg_dir = "incomp_navierstokes/cylinder" + inc_poly_cylinder_pb.cfg_file = "pb_poly_cylinder.cfg" inc_poly_cylinder_pb.test_iter = 20 inc_poly_cylinder_pb.test_vals = [-13.483266, 0.541350, 0.005972, 17.020220, -8927.600000] test_list.append(inc_poly_cylinder_pb) @@ -431,7 +431,7 @@ def main(): inc_poly_cylinder.cfg_dir = "incomp_navierstokes/cylinder" inc_poly_cylinder.cfg_file = "poly_cylinder.cfg" inc_poly_cylinder.test_iter = 20 - inc_poly_cylinder.test_vals = [-8.230355, -2.426276, 0.018487, 1.902089, -173.000000] + inc_poly_cylinder.test_vals = [-8.230355, -2.426276, 0.018487, 1.902089, -173.000000] inc_poly_cylinder.test_vals_aarch64 = [-8.260165, -2.445453, 0.027209, 1.915447, -171.620000] test_list.append(inc_poly_cylinder) @@ -488,7 +488,7 @@ def main(): spinning_cylinder.cfg_dir = "moving_wall/spinning_cylinder" spinning_cylinder.cfg_file = "spinning_cylinder.cfg" spinning_cylinder.test_iter = 25 - spinning_cylinder.test_vals = [-7.614070, -2.155206, 1.804022, 1.893004] + spinning_cylinder.test_vals = [-7.614070, -2.155206, 1.804022, 1.893004] spinning_cylinder.test_vals_aarch64 = [-8.008023, -2.611064, 1.497308, 1.487483] test_list.append(spinning_cylinder) @@ -549,10 +549,25 @@ 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.714713, -5.763299, -0.214960, 0.023758, 0.000000] + ddes_flatplate.test_vals = [-2.714713, -5.938404, -0.214960, 0.023758, 0.000000] ddes_flatplate.unsteady = True test_list.append(ddes_flatplate) + # Hybrid RANS/LES models on the ONERA M6 wing, restarting from a RANS solution + ddes_oneram6_vals = {"sst_ddes": [-3.562792, -0.782226, 1.862936, 0.262000, 0.023186], + "sst_iddes": [-3.548909, 3.066218, 2.094582, 0.262015, 0.023189], + "sst_siddes": [-3.548929, 3.066218, 2.094596, 0.262000, 0.023186], + "sst_eddes": [-3.562347, 0.218640, 1.862786, 0.262000, 0.023186], + "sa_eddes": [-3.510006, -3.683557, 0.266420, 0.023471]} + for model, vals in ddes_oneram6_vals.items(): + ddes_oneram6 = TestCase('ddes_oneram6_' + model) + ddes_oneram6.cfg_dir = "ddes/oneram6" + ddes_oneram6.cfg_file = "ddes_oneram6_" + model + ".cfg" + ddes_oneram6.test_iter = 5 + ddes_oneram6.test_vals = vals + ddes_oneram6.unsteady = True + test_list.append(ddes_oneram6) + # unsteady pitching NACA0015, SA unst_inc_turb_naca0015_sa = TestCase('unst_inc_turb_naca0015_sa') unst_inc_turb_naca0015_sa.cfg_dir = "unsteady/pitching_naca0015_rans_inc" @@ -589,7 +604,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 = [-12.338051, -6.157966, -0.000034, 0.000000] + edge_PPR.test_vals = [-12.338051, -6.157966, -0.000034, 0.000000] edge_PPR.test_vals_aarch64 = [ -7.139211, -0.980821, -0.000034, 0.000000] test_list.append(edge_PPR) @@ -618,7 +633,7 @@ def main(): transonic_stator_restart.cfg_dir = "turbomachinery/transonic_stator_2D" transonic_stator_restart.cfg_file = "transonic_stator_restart.cfg" transonic_stator_restart.test_iter = 20 - transonic_stator_restart.test_vals = [-4.367144, -2.487733, -2.079075, 1.728173, -1.464952, 3.225025, -471620.000000, 94.839000, -0.051124] + transonic_stator_restart.test_vals = [-4.367144, -2.487733, -2.079075, 1.728173, -1.464952, 3.225025, -471620.000000, 94.839000, -0.051124] transonic_stator_restart.test_vals_aarch64 = [-4.442510, -2.561369, -2.165778, 1.652750, -1.355494, 3.172712, -471620.000000, 94.843000, -0.043825] test_list.append(transonic_stator_restart) @@ -627,7 +642,7 @@ 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.632240, -8.894740, -9.348706] + multi_interface.test_vals = [-8.632240, -8.894740, -9.348706] multi_interface.test_vals_aarch64 = [-8.632229, -8.894737, -9.348730] test_list.append(multi_interface) @@ -648,11 +663,11 @@ def main(): # Channel_2D, native SU2 binary mesh format (.su2b) # channel_2D_WA.cfg loads channel_2D_su2bin.su2b directly, so SU2_DEF must # first convert channel_2D.su2 (3 zones) into that binary mesh. - channel_2D_su2bin_convert = TestCase('channel_2D_su2bin_convert') - channel_2D_su2bin_convert.cfg_dir = "sliding_interface/channel_2D" - channel_2D_su2bin_convert.cfg_file = "mesh_su2_to_su2bin.cfg" - channel_2D_su2bin_convert.command = TestCase.Command(exec = "SU2_DEF") - channel_2D_su2bin_convert.timeout = 600 + channel_2D_su2bin_convert = TestCase('channel_2D_su2bin_convert') + channel_2D_su2bin_convert.cfg_dir = "sliding_interface/channel_2D" + channel_2D_su2bin_convert.cfg_file = "mesh_su2_to_su2bin.cfg" + channel_2D_su2bin_convert.command = TestCase.Command(exec = "SU2_DEF") + channel_2D_su2bin_convert.timeout = 600 test_list.append(channel_2D_su2bin_convert) channel_2D = TestCase('channel_2D') @@ -720,7 +735,7 @@ def main(): slinc_steady.cfg_dir = "sliding_interface/incompressible_steady" slinc_steady.cfg_file = "config.cfg" slinc_steady.test_iter = 19 - slinc_steady.test_vals = [19.000000, -1.144102, -1.424986] + slinc_steady.test_vals = [19.000000, -1.144102, -1.424986] slinc_steady.test_vals_aarch64 = [19.000000, -1.154874, -1.378120] slinc_steady.multizone = True test_list.append(slinc_steady) @@ -769,9 +784,9 @@ def main(): test_list.append(dyn_fsi) # FSI+CHT, Static, 2D, new mesh solver, restart - fsi_cht_restart = TestCase('fsi_cht_restart') - fsi_cht_restart.cfg_dir = "fea_fsi/stat_fsi" - fsi_cht_restart.cfg_file = "config_restart.cfg" + fsi_cht_restart = TestCase('fsi_cht_restart') + fsi_cht_restart.cfg_dir = "fea_fsi/stat_fsi" + fsi_cht_restart.cfg_file = "config_restart.cfg" fsi_cht_restart.test_iter = 0 fsi_cht_restart.test_vals = [5.000000, 0.006352, -1.960362, -9.327033, -9.644570, -9.319618, 608.380000, -0.012974, 0.000000, 20.000000] fsi_cht_restart.multizone = True @@ -794,7 +809,7 @@ def main(): mms_fvm_inc_euler.cfg_dir = "mms/fvm_incomp_euler" mms_fvm_inc_euler.cfg_file = "inv_mms_jst.cfg" mms_fvm_inc_euler.test_iter = 20 - mms_fvm_inc_euler.test_vals = [-9.128034, -9.441406, 0.000000, 0.000000] + mms_fvm_inc_euler.test_vals = [-9.128034, -9.441406, 0.000000, 0.000000] mms_fvm_inc_euler.test_vals_aarch64 = [-9.128034, -9.441406, 0.000000, 0.000000] test_list.append(mms_fvm_inc_euler) diff --git a/TestCases/parallel_regression.py b/TestCases/parallel_regression.py index e79219efbeba..f3a3105b2302 100755 --- a/TestCases/parallel_regression.py +++ b/TestCases/parallel_regression.py @@ -246,10 +246,10 @@ def main(): # mesh format. The regression case below then loads that freshly generated # .su2b file, using a copy of inv_NACA0012_Roe.cfg with MESH_FILENAME and # MESH_FORMAT swapped to point at it. - naca0012_su2bin_convert = TestCase('naca0012_su2bin_convert') - naca0012_su2bin_convert.cfg_dir = "euler/naca0012" - naca0012_su2bin_convert.cfg_file = "mesh_su2_to_su2bin.cfg" - naca0012_su2bin_convert.command = TestCase.Command("mpirun -n 2", "SU2_DEF") + naca0012_su2bin_convert = TestCase('naca0012_su2bin_convert') + naca0012_su2bin_convert.cfg_dir = "euler/naca0012" + naca0012_su2bin_convert.cfg_file = "mesh_su2_to_su2bin.cfg" + naca0012_su2bin_convert.command = TestCase.Command("mpirun -n 2", "SU2_DEF") test_list.append(naca0012_su2bin_convert) naca0012_su2bin_cfg_path = "euler/naca0012/inv_NACA0012_Roe_su2bin.cfg" @@ -264,7 +264,7 @@ def main(): naca0012 = TestCase('naca0012') naca0012.cfg_dir = "euler/naca0012" - naca0012.cfg_file = "inv_NACA0012_Roe_su2bin.cfg" + naca0012.cfg_file = "inv_NACA0012_Roe_su2bin.cfg" naca0012.test_iter = 20 naca0012.test_vals = [-4.026356, -3.521920, 0.274929, 0.009852] test_list.append(naca0012) @@ -300,7 +300,7 @@ def main(): polar_naca0012.cfg_file = "inv_NACA0012.cfg" polar_naca0012.polar = True polar_naca0012.test_iter = 10 - polar_naca0012.test_vals = [-1.315764, 4.158361, 0.002646, 0.114559] + polar_naca0012.test_vals = [-1.315764, 4.158361, 0.002646, 0.114559] 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 @@ -341,9 +341,9 @@ def main(): test_list.append(ramp_msw) # MFR_coupling - MFR_coupling = TestCase('MFR_coupling') - MFR_coupling.cfg_dir = "euler/turbofan_MFR_coupling" - MFR_coupling.cfg_file = "MFR_coupling.cfg" + MFR_coupling = TestCase('MFR_coupling') + MFR_coupling.cfg_dir = "euler/turbofan_MFR_coupling" + MFR_coupling.cfg_file = "MFR_coupling.cfg" MFR_coupling.test_iter = 100 MFR_coupling.test_vals = [-211.240000, 150.030000, 20.151000] test_list.append(MFR_coupling) @@ -361,9 +361,9 @@ def main(): test_list.append(flatplate) # Supersonic laminar flat plate - flatplate_supersonic = TestCase('flatplate_supersonic') - flatplate_supersonic.cfg_dir = "navierstokes/flatplate" - flatplate_supersonic.cfg_file = "flatplate_supersonic.cfg" + flatplate_supersonic = TestCase('flatplate_supersonic') + flatplate_supersonic.cfg_dir = "navierstokes/flatplate" + flatplate_supersonic.cfg_file = "flatplate_supersonic.cfg" flatplate_supersonic.test_iter = 100 flatplate_supersonic.test_vals = [100.000000, -2.940836, -0.677210, -0.570631, 2.495392, 0.001469] test_list.append(flatplate_supersonic) @@ -418,7 +418,7 @@ def main(): poiseuille_profile.test_iter = 10 poiseuille_profile.test_vals = [-12.003186, -7.623957, -0.000000, 2.089953] poiseuille_profile.test_vals_aarch64 = [-12.007498, -7.226926, -0.000000, 2.089953] - poiseuille_profile.tol = [0.001, 0.001, 1e-5, 1e-5, 1e-5] + poiseuille_profile.tol = [0.001, 0.001, 1e-5, 1e-5, 1e-5] test_list.append(poiseuille_profile) ########################## @@ -482,17 +482,17 @@ def main(): test_list.append(turb_flatplate_CC_Sarkar) # FLAT PLATE, ROUGHNESS BC KNOPP SST - turb_flatplate_sst_roughBCKnopp = TestCase('turb_sst_flatplate_roughBCKnopp') - turb_flatplate_sst_roughBCKnopp.cfg_dir = "rans/flatplate/roughness/bc_knopp" - turb_flatplate_sst_roughBCKnopp.cfg_file = "turb_SST_flatplate_roughBCKnopp.cfg" + turb_flatplate_sst_roughBCKnopp = TestCase('turb_sst_flatplate_roughBCKnopp') + turb_flatplate_sst_roughBCKnopp.cfg_dir = "rans/flatplate/roughness/bc_knopp" + turb_flatplate_sst_roughBCKnopp.cfg_file = "turb_SST_flatplate_roughBCKnopp.cfg" turb_flatplate_sst_roughBCKnopp.test_iter = 10 turb_flatplate_sst_roughBCKnopp.test_vals = [-5.058634, -2.460850, -2.847064, 0.447200, -2.595042, 1.497149, -0.188079, 0.004571] test_list.append(turb_flatplate_sst_roughBCKnopp) # FLAT PLATE, ROUGHNESS BC AUPOIX SST - turb_flatplate_sst_roughBCAupoix = TestCase('turb_sst_flatplate_roughBCAupoix') - turb_flatplate_sst_roughBCAupoix.cfg_dir = "rans/flatplate/roughness/bc_aupoix" - turb_flatplate_sst_roughBCAupoix.cfg_file = "turb_SST_flatplate_roughBCAupoix.cfg" + turb_flatplate_sst_roughBCAupoix = TestCase('turb_sst_flatplate_roughBCAupoix') + turb_flatplate_sst_roughBCAupoix.cfg_dir = "rans/flatplate/roughness/bc_aupoix" + turb_flatplate_sst_roughBCAupoix.cfg_file = "turb_SST_flatplate_roughBCAupoix.cfg" turb_flatplate_sst_roughBCAupoix.test_iter = 10 turb_flatplate_sst_roughBCAupoix.test_vals = [-5.278728, -2.302982, -2.890419, 0.227585, -1.393786, 3.192601, -0.188729, 0.0071821] test_list.append(turb_flatplate_sst_roughBCAupoix) @@ -1163,19 +1163,34 @@ 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.714713, -5.763284, -0.214960, 0.023758, 0.000000] + ddes_flatplate.test_vals = [-2.714713, -5.938404, -0.214960, 0.023758, 0.000000] ddes_flatplate.unsteady = True test_list.append(ddes_flatplate) + # Hybrid RANS/LES models on the ONERA M6 wing, restarting from a RANS solution + ddes_oneram6_vals = {"sst_ddes": [-3.562793, -0.782226, 1.862938, 0.262000, 0.023186], + "sst_iddes": [-3.548910, 3.066218, 2.094583, 0.262015, 0.023189], + "sst_siddes": [-3.548930, 3.066218, 2.094596, 0.262000, 0.023186], + "sst_eddes": [-3.562348, 0.218641, 1.862787, 0.262000, 0.023186], + "sa_eddes": [-3.510007, -3.683557, 0.266420, 0.023471]} + for model, vals in ddes_oneram6_vals.items(): + ddes_oneram6 = TestCase('ddes_oneram6_' + model) + ddes_oneram6.cfg_dir = "ddes/oneram6" + ddes_oneram6.cfg_file = "ddes_oneram6_" + model + ".cfg" + ddes_oneram6.test_iter = 5 + ddes_oneram6.test_vals = vals + ddes_oneram6.unsteady = True + test_list.append(ddes_oneram6) + # Stochastic BackScatter (SBS) model - sbs_backward_step = TestCase('sbs_backward_step') - sbs_backward_step.cfg_dir = "backscatter/backward_step" - sbs_backward_step.cfg_file = "backwardStep.cfg" - sbs_backward_step.test_iter = 3 - sbs_backward_step.test_vals = [-6.352884, -3.465372, -5.507901, -3.906545, -9.506305, -6.365236, -6.331021, -6.331028] - sbs_backward_step.unsteady = True + sbs_backward_step = TestCase('sbs_backward_step') + sbs_backward_step.cfg_dir = "backscatter/backward_step" + sbs_backward_step.cfg_file = "backwardStep.cfg" + sbs_backward_step.test_iter = 3 + sbs_backward_step.test_vals = [-6.352884, -3.465372, -5.507901, -3.906545, -9.506305, -6.365236, -6.331021, -6.331028] + sbs_backward_step.unsteady = True sbs_backward_step.decompress = True - sbs_backward_step.grid_file = "backward_step.su2" + sbs_backward_step.grid_file = "backward_step.su2" test_list.append(sbs_backward_step) # unsteady pitching NACA0015, SA @@ -1285,8 +1300,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.632227, -8.894736, -9.348706] - multi_interface.test_vals_aarch64 = [-8.632227, -8.894736, -9.348706] + multi_interface.test_vals = [-8.632227, -8.894736, -9.348706] + multi_interface.test_vals_aarch64 = [-8.632227, -8.894736, -9.348706] test_list.append(multi_interface) ###################################### @@ -1306,10 +1321,10 @@ def main(): # Channel_2D, native SU2 binary mesh format (.su2b) # channel_2D_WA.cfg loads channel_2D_su2bin.su2b directly, so SU2_DEF must # first convert channel_2D.su2 (3 zones) into that binary mesh. - channel_2D_su2bin_convert = TestCase('channel_2D_su2bin_convert') - channel_2D_su2bin_convert.cfg_dir = "sliding_interface/channel_2D" - channel_2D_su2bin_convert.cfg_file = "mesh_su2_to_su2bin.cfg" - channel_2D_su2bin_convert.command = TestCase.Command("mpirun -n 2", "SU2_DEF") + channel_2D_su2bin_convert = TestCase('channel_2D_su2bin_convert') + channel_2D_su2bin_convert.cfg_dir = "sliding_interface/channel_2D" + channel_2D_su2bin_convert.cfg_file = "mesh_su2_to_su2bin.cfg" + channel_2D_su2bin_convert.command = TestCase.Command("mpirun -n 2", "SU2_DEF") test_list.append(channel_2D_su2bin_convert) channel_2D = TestCase('channel_2D') @@ -1797,17 +1812,17 @@ def main(): test_list.append(species2_primitiveVenturi_mixingmodel_heatcapacity_H2_ND) # 2 species (1 eq) primitive venturi mixing using mixing model solving enthalpy equation using preconditioning + JST convective scheme - species2_primitiveVenturi_JST = TestCase('species2_primitiveVenturi_JST.cfg') - species2_primitiveVenturi_JST.cfg_dir = "species_transport/venturi_primitive_3species" - species2_primitiveVenturi_JST.cfg_file = "species2_primitiveVenturi_JST.cfg" + species2_primitiveVenturi_JST = TestCase('species2_primitiveVenturi_JST.cfg') + species2_primitiveVenturi_JST.cfg_dir = "species_transport/venturi_primitive_3species" + species2_primitiveVenturi_JST.cfg_file = "species2_primitiveVenturi_JST.cfg" species2_primitiveVenturi_JST.test_iter = 50 species2_primitiveVenturi_JST.test_vals = [-6.035464, -7.071918, -7.201080, -1.142940, -8.348316, 10.000000, -3.223791, 10.000000, -4.435519, 0.049048, 0.014468, 0.020068, 0.014512, 25.000000] test_list.append(species2_primitiveVenturi_JST) # 2 species (1 eq) primitive venturi mixing using mixing model solving enthalpy equation using preconditioning + Lax-Friedrich convective scheme - species2_primitiveVenturi_Lax_Friedrich = TestCase('species2_primitiveVenturi_Lax_Friedrich.cfg') - species2_primitiveVenturi_Lax_Friedrich.cfg_dir = "species_transport/venturi_primitive_3species" - species2_primitiveVenturi_Lax_Friedrich.cfg_file = "species2_primitiveVenturi_Lax_Friedrich.cfg" + species2_primitiveVenturi_Lax_Friedrich = TestCase('species2_primitiveVenturi_Lax_Friedrich.cfg') + species2_primitiveVenturi_Lax_Friedrich.cfg_dir = "species_transport/venturi_primitive_3species" + species2_primitiveVenturi_Lax_Friedrich.cfg_file = "species2_primitiveVenturi_Lax_Friedrich.cfg" species2_primitiveVenturi_Lax_Friedrich.test_iter = 50 species2_primitiveVenturi_Lax_Friedrich.test_vals = [-6.092441, -6.981653, -6.982959, -1.195023, -8.245626, 10.000000, -3.472515, 8.000000, -5.356121, 0.048943, 0.014468, 0.020007, 0.014468, 12.500000] test_list.append(species2_primitiveVenturi_Lax_Friedrich) @@ -1825,7 +1840,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.537734, -4.375388, -4.475128, -5.597904, -0.870563, -5.633513, 5.000000, -1.461524, 5.000000, -4.142508, 5.000000, -1.727874, 0.000438, 0.000438, 0.000000, 0.000000] + species_primitiveVenturi_boundedscalar.test_vals = [-5.537734, -4.375388, -4.475128, -5.597904, -0.870563, -5.633513, 5.000000, -1.461524, 5.000000, -4.142508, 5.000000, -1.727874, 0.000438, 0.000438, 0.000000, 0.000000] test_list.append(species_primitiveVenturi_boundedscalar) # 2 species (1 eq) primitive venturi mixing using mixing model including inlet markers for turbulent intensity and viscosity ratios @@ -1846,9 +1861,9 @@ def main(): test_list.append(species3_primitiveVenturi_inletFile) # 3 species (2 eq) primitive venturi mixing with new flux and value boundary conditions - species3_primitiveVenturi_fluxvalue = TestCase('species3_primitiveVenturi_fluxvalue') - species3_primitiveVenturi_fluxvalue.cfg_dir = "species_transport/venturi_primitive_3species" - species3_primitiveVenturi_fluxvalue.cfg_file = "species3_primitiveVenturi_flux_value.cfg" + species3_primitiveVenturi_fluxvalue = TestCase('species3_primitiveVenturi_fluxvalue') + species3_primitiveVenturi_fluxvalue.cfg_dir = "species_transport/venturi_primitive_3species" + species3_primitiveVenturi_fluxvalue.cfg_file = "species3_primitiveVenturi_flux_value.cfg" species3_primitiveVenturi_fluxvalue.test_iter = 50 species3_primitiveVenturi_fluxvalue.test_vals = [-4.563242, -5.504658, -0.861266, -5.822957, -6.458367, 1.257912, 0.122219, 0.317705, 0.817988, 0.241494, 0.102507, 0.004981, 0.134006] test_list.append(species3_primitiveVenturi_fluxvalue) @@ -1863,9 +1878,9 @@ def main(): test_list.append(species_passive_val) # rectangle active 2-species transport - species_active_transport_temp_limits = TestCase('species_active_transport_temp_limits') - species_active_transport_temp_limits.cfg_dir = "species_transport/passive_transport_validation" - species_active_transport_temp_limits.cfg_file = "active_species_transport_temp_limits.cfg" + species_active_transport_temp_limits = TestCase('species_active_transport_temp_limits') + species_active_transport_temp_limits.cfg_dir = "species_transport/passive_transport_validation" + species_active_transport_temp_limits.cfg_file = "active_species_transport_temp_limits.cfg" species_active_transport_temp_limits.test_iter = 50 species_active_transport_temp_limits.test_vals = [-1.785041, -2.565628, 2.460433, -3.188111, 9.000000, -5.551493, 3.000000, -5.826106, 1.456438, 0.998134, 0.001475, 0.456829] species_active_transport_temp_limits.test_vals_aarch64 = [-1.785041, -2.565628, 2.460433, -3.188111, 9.000000, -5.551493, 3.000000, -5.826106, 1.456438, 0.998134, 0.001475, 0.456829] diff --git a/TestCases/serial_regression.py b/TestCases/serial_regression.py index e1a826cbf170..ae74a7b89719 100755 --- a/TestCases/serial_regression.py +++ b/TestCases/serial_regression.py @@ -107,9 +107,9 @@ def main(): test_list.append(naca0012) # NACA0012 - FMG test - naca0012_FMG = TestCase('naca0012_FMG') - naca0012_FMG.cfg_dir = "euler/naca0012" - naca0012_FMG.cfg_file = "inv_NACA0012.cfg" + naca0012_FMG = TestCase('naca0012_FMG') + naca0012_FMG.cfg_dir = "euler/naca0012" + naca0012_FMG.cfg_file = "inv_NACA0012.cfg" naca0012_FMG.test_iter = 20 naca0012_FMG.test_vals = [-4.160277, -3.553897, 0.296156, 0.016889] test_list.append(naca0012_FMG) @@ -145,7 +145,7 @@ def main(): polar_naca0012.cfg_file = "inv_NACA0012.cfg" polar_naca0012.polar = True polar_naca0012.test_iter = 10 - polar_naca0012.test_vals = [-1.311660, 4.165589, 0.000067, 0.113157] + polar_naca0012.test_vals = [-1.311660, 4.165589, 0.000067, 0.113157] 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 @@ -208,7 +208,7 @@ 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.003115, -7.626023, -0.000000, 2.089953] + poiseuille_profile.test_vals = [-12.003115, -7.626023, -0.000000, 2.089953] poiseuille_profile.test_vals_aarch64 = [-12.009012, -7.262299, -0.000000, 2.089953] #last 4 columns test_list.append(poiseuille_profile) @@ -264,9 +264,9 @@ def main(): test_list.append(turb_wallfunction_flatplate_sst) # FLAT PLATE, ROUGHNESS BC WILCOX2006 SST - turb_flatplate_sst_roughBCWilcox2006 = TestCase('turb_sst_flatplate_roughBCWilcox2006') - turb_flatplate_sst_roughBCWilcox2006.cfg_dir = "rans/flatplate/roughness/bc_wilcox2006" - turb_flatplate_sst_roughBCWilcox2006.cfg_file = "turb_SST_flatplate_roughBCWilcox2006.cfg" + turb_flatplate_sst_roughBCWilcox2006 = TestCase('turb_sst_flatplate_roughBCWilcox2006') + turb_flatplate_sst_roughBCWilcox2006.cfg_dir = "rans/flatplate/roughness/bc_wilcox2006" + turb_flatplate_sst_roughBCWilcox2006.cfg_file = "turb_SST_flatplate_roughBCWilcox2006.cfg" turb_flatplate_sst_roughBCWilcox2006.test_iter = 10 turb_flatplate_sst_roughBCWilcox2006.test_vals = [-5.117900, -2.534224, -2.904279, 0.381710, -3.100346, 1.180161, -0.188797, 0.004029] test_list.append(turb_flatplate_sst_roughBCWilcox2006) @@ -311,13 +311,13 @@ def main(): # E387 transitional SST+LM tutorial config, re-run here as a sanitizer-only probe. # Covers the density gradient not being available for MUSCL_TURB=YES with a flow scheme # that does not store that gradient. - tutorial_trans_e387_sst_asan = TestCase('tutorial_trans_e387_sst_asan') - tutorial_trans_e387_sst_asan.cfg_dir = "../Tutorials/compressible_flow/Transitional_Airfoil/Langtry_and_Menter/E387" - tutorial_trans_e387_sst_asan.cfg_file = "transitional_SST_LM_model_ConfigFile.cfg" - tutorial_trans_e387_sst_asan.test_iter = 2 - tutorial_trans_e387_sst_asan.test_vals = [-6.418119, -4.827573, -2.220229, 3.029787, 3.123846, 5.000000, -5.604338] - tutorial_trans_e387_sst_asan.timeout = 1600 - tutorial_trans_e387_sst_asan.no_restart = True + tutorial_trans_e387_sst_asan = TestCase('tutorial_trans_e387_sst_asan') + tutorial_trans_e387_sst_asan.cfg_dir = "../Tutorials/compressible_flow/Transitional_Airfoil/Langtry_and_Menter/E387" + tutorial_trans_e387_sst_asan.cfg_file = "transitional_SST_LM_model_ConfigFile.cfg" + tutorial_trans_e387_sst_asan.test_iter = 2 + tutorial_trans_e387_sst_asan.test_vals = [-6.418119, -4.827573, -2.220229, 3.029787, 3.123846, 5.000000, -5.604338] + tutorial_trans_e387_sst_asan.timeout = 1600 + tutorial_trans_e387_sst_asan.no_restart = True tutorial_trans_e387_sst_asan.enabled_with_regular = False test_list.append(tutorial_trans_e387_sst_asan) @@ -373,12 +373,12 @@ def main(): test_list.append(axi_rans_air_nozzle_restart) # Axisymmetric air nozzle species - axi_rans_air_nozzle_species = TestCase('axi_rans_air_nozzle_species') - axi_rans_air_nozzle_species.cfg_dir = "axisymmetric_rans/air_nozzle" - axi_rans_air_nozzle_species.cfg_file = "air_nozzle_species.cfg" + axi_rans_air_nozzle_species = TestCase('axi_rans_air_nozzle_species') + axi_rans_air_nozzle_species.cfg_dir = "axisymmetric_rans/air_nozzle" + axi_rans_air_nozzle_species.cfg_file = "air_nozzle_species.cfg" axi_rans_air_nozzle_species.test_iter = 10 axi_rans_air_nozzle_species.test_vals = [-1.676190, 3.896581, -2.912396, 5.762790, -3.565909, 0.000000] - axi_rans_air_nozzle_species.tol = 0.0001 + axi_rans_air_nozzle_species.tol = 0.0001 test_list.append(axi_rans_air_nozzle_species) ################################# @@ -865,10 +865,25 @@ 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.714713, -5.763293, -0.214960, 0.023758, 0.000000] + ddes_flatplate.test_vals = [-2.714713, -5.938404, -0.214960, 0.023758, 0.000000] ddes_flatplate.unsteady = True test_list.append(ddes_flatplate) + # Hybrid RANS/LES models on the ONERA M6 wing, restarting from a RANS solution + ddes_oneram6_vals = {"sst_ddes": [-3.562792, -0.782226, 1.862936, 0.262000, 0.023186], + "sst_iddes": [-3.548909, 3.066218, 2.094582, 0.262015, 0.023189], + "sst_siddes": [-3.548929, 3.066218, 2.094596, 0.262000, 0.023186], + "sst_eddes": [-3.562347, 0.218640, 1.862786, 0.262000, 0.023186], + "sa_eddes": [-3.510006, -3.683557, 0.266420, 0.023471]} + for model, vals in ddes_oneram6_vals.items(): + ddes_oneram6 = TestCase('ddes_oneram6_' + model) + ddes_oneram6.cfg_dir = "ddes/oneram6" + ddes_oneram6.cfg_file = "ddes_oneram6_" + model + ".cfg" + ddes_oneram6.test_iter = 5 + ddes_oneram6.test_vals = vals + ddes_oneram6.unsteady = True + test_list.append(ddes_oneram6) + # unsteady pitching NACA0015, SA unst_inc_turb_naca0015_sa = TestCase('unst_inc_turb_naca0015_sa') unst_inc_turb_naca0015_sa.cfg_dir = "unsteady/pitching_naca0015_rans_inc" @@ -878,28 +893,28 @@ def main(): unst_inc_turb_naca0015_sa.unsteady = True test_list.append(unst_inc_turb_naca0015_sa) # unsteady pitching NACA64A010, RANS, SA - unst_pitching_naca64a010_rans = TestCase('unst_pitching_naca64a010_rans') - unst_pitching_naca64a010_rans.cfg_dir = "unsteady/pitching_naca64a010_rans" - unst_pitching_naca64a010_rans.cfg_file = "turb_NACA64A010.cfg" + unst_pitching_naca64a010_rans = TestCase('unst_pitching_naca64a010_rans') + unst_pitching_naca64a010_rans.cfg_dir = "unsteady/pitching_naca64a010_rans" + unst_pitching_naca64a010_rans.cfg_file = "turb_NACA64A010.cfg" unst_pitching_naca64a010_rans.test_iter = 2 unst_pitching_naca64a010_rans.test_vals = [-1.299045, -3.951331, 0.011098, 0.008241] - unst_pitching_naca64a010_rans.unsteady = True + unst_pitching_naca64a010_rans.unsteady = True test_list.append(unst_pitching_naca64a010_rans) # unsteady pitching NACA64A010, Euler - unst_pitching_naca64a010_euler = TestCase('unst_pitching_naca64a010_euler') - unst_pitching_naca64a010_euler.cfg_dir = "unsteady/pitching_naca64a010_euler" - unst_pitching_naca64a010_euler.cfg_file = "pitching_NACA64A010.cfg" + unst_pitching_naca64a010_euler = TestCase('unst_pitching_naca64a010_euler') + unst_pitching_naca64a010_euler.cfg_dir = "unsteady/pitching_naca64a010_euler" + unst_pitching_naca64a010_euler.cfg_file = "pitching_NACA64A010.cfg" unst_pitching_naca64a010_euler.test_iter = 2 unst_pitching_naca64a010_euler.test_vals = [-1.186839, 4.280301, -0.039724, 0.000927] - unst_pitching_naca64a010_euler.unsteady = True + unst_pitching_naca64a010_euler.unsteady = True test_list.append(unst_pitching_naca64a010_euler) # unsteady plunging NACA0012, Laminar NS - unst_plunging_naca0012 = TestCase('unst_plunging_naca0012') - unst_plunging_naca0012.cfg_dir = "unsteady/plunging_naca0012" - unst_plunging_naca0012.cfg_file = "plunging_NACA0012.cfg" + unst_plunging_naca0012 = TestCase('unst_plunging_naca0012') + unst_plunging_naca0012.cfg_dir = "unsteady/plunging_naca0012" + unst_plunging_naca0012.cfg_file = "plunging_NACA0012.cfg" unst_plunging_naca0012.test_iter = 2 unst_plunging_naca0012.test_vals = [-4.083462, 1.366757, -3.455802, -0.097062] - unst_plunging_naca0012.unsteady = True + unst_plunging_naca0012.unsteady = True test_list.append(unst_plunging_naca0012) # unsteady pitching NACA0012, Euler, Deforming @@ -974,7 +989,7 @@ def main(): transonic_stator_restart.cfg_dir = "turbomachinery/transonic_stator_2D" transonic_stator_restart.cfg_file = "transonic_stator_restart.cfg" transonic_stator_restart.test_iter = 20 - transonic_stator_restart.test_vals = [-4.367784, -2.492912, -2.082414, 1.727491, -1.466974, 3.224730, -471620.000000, 94.839000, -0.052082] + transonic_stator_restart.test_vals = [-4.367784, -2.492912, -2.082414, 1.727491, -1.466974, 3.224730, -471620.000000, 94.839000, -0.052082] transonic_stator_restart.test_vals_aarch64 = [-4.367784, -2.492912, -2.082414, 1.727491, -1.466974, 3.224730, -471620.000000, 94.839000, -0.052082] test_list.append(transonic_stator_restart) @@ -983,8 +998,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.632227, -8.894736, -9.348706] - multi_interface.test_vals_aarch64 = [-8.632227, -8.894736, -9.348706] + multi_interface.test_vals = [-8.632227, -8.894736, -9.348706] + multi_interface.test_vals_aarch64 = [-8.632227, -8.894736, -9.348706] test_list.append(multi_interface) @@ -1014,10 +1029,10 @@ def main(): # Channel_2D, native SU2 binary mesh format (.su2b) # channel_2D_WA.cfg loads channel_2D_su2bin.su2b directly, so SU2_DEF must # first convert channel_2D.su2 (3 zones) into that binary mesh. - channel_2D_su2bin_convert = TestCase('channel_2D_su2bin_convert') - channel_2D_su2bin_convert.cfg_dir = "sliding_interface/channel_2D" - channel_2D_su2bin_convert.cfg_file = "mesh_su2_to_su2bin.cfg" - channel_2D_su2bin_convert.command = TestCase.Command(exec = "SU2_DEF") + channel_2D_su2bin_convert = TestCase('channel_2D_su2bin_convert') + channel_2D_su2bin_convert.cfg_dir = "sliding_interface/channel_2D" + channel_2D_su2bin_convert.cfg_file = "mesh_su2_to_su2bin.cfg" + channel_2D_su2bin_convert.command = TestCase.Command(exec = "SU2_DEF") test_list.append(channel_2D_su2bin_convert) # Channel_2D @@ -1152,9 +1167,9 @@ def main(): test_list.append(fsi2d) # FSI+CHT, Static, 2D, new mesh solver - fsi_cht = TestCase('fsi_cht') - fsi_cht.cfg_dir = "fea_fsi/stat_fsi" - fsi_cht.cfg_file = "config.cfg" + fsi_cht = TestCase('fsi_cht') + fsi_cht.cfg_dir = "fea_fsi/stat_fsi" + fsi_cht.cfg_file = "config.cfg" fsi_cht.test_iter = 20 fsi_cht.test_vals = [5.000000, -5.077002, -5.379450, -9.247804, -9.320014, -9.185034, 608.350000, -0.012973, 0.000000, 30.000000] fsi_cht.multizone = True @@ -1723,7 +1738,7 @@ def main(): pywrapper_unsteadyCHT.cfg_dir = "py_wrapper/flatPlate_unsteady_CHT" pywrapper_unsteadyCHT.cfg_file = "unsteady_CHT_FlatPlate_Conf.cfg" pywrapper_unsteadyCHT.test_iter = 5 - pywrapper_unsteadyCHT.test_vals = [-1.614168, 2.259817, -0.009951, 0.169563] + pywrapper_unsteadyCHT.test_vals = [-1.614168, 2.259817, -0.009951, 0.169563] pywrapper_unsteadyCHT.command = TestCase.Command(exec = "python", param = "launch_unsteady_CHT_FlatPlate.py -f") pywrapper_unsteadyCHT.timeout = 1600 pywrapper_unsteadyCHT.tol = 0.00001 @@ -1737,7 +1752,7 @@ def main(): pywrapper_rigidMotion.cfg_dir = "py_wrapper/flatPlate_rigidMotion" pywrapper_rigidMotion.cfg_file = "flatPlate_rigidMotion_Conf.cfg" pywrapper_rigidMotion.test_iter = 5 - pywrapper_rigidMotion.test_vals = [-1.607008, 2.260791, 0.350208, 0.089496] + pywrapper_rigidMotion.test_vals = [-1.607008, 2.260791, 0.350208, 0.089496] pywrapper_rigidMotion.command = TestCase.Command(exec = "python", param = "launch_flatPlate_rigidMotion.py -f") pywrapper_rigidMotion.timeout = 1600 pywrapper_rigidMotion.tol = 0.00001 diff --git a/UnitTests/SU2_CFD/numerics/CNumerics_tests.cpp b/UnitTests/SU2_CFD/numerics/CNumerics_tests.cpp index bea3da327e01..fadc74b50aff 100644 --- a/UnitTests/SU2_CFD/numerics/CNumerics_tests.cpp +++ b/UnitTests/SU2_CFD/numerics/CNumerics_tests.cpp @@ -31,6 +31,7 @@ #include #include #include "../../../SU2_CFD/include/numerics/CNumerics.hpp" +#include "../../../SU2_CFD/include/variables/CTurbSSTVariable.hpp" #include "../../../SU2_CFD/include/numerics/NEMO/NEMO_diffusion.hpp" TEST_CASE("NTS blending has a minimum of 0.05", "[Upwind/central blending]") { @@ -243,3 +244,30 @@ TEST_CASE("NEMO corrected viscous residual returns distinct i and j Jacobians", } } } + +TEST_CASE("Vortex tilting uses a velocity-only gradient view", "[EDDES]") { + std::stringstream options; + options << "SOLVER= RANS\nKIND_TURB_MODEL= SST\nREYNOLDS_NUMBER= 5\n"; + CConfig config(options, SU2_COMPONENT::SU2_CFD, false); + + for (unsigned short nDim : {2, 3}) { + const su2double constants[11] = {}; + CTurbSSTVariable turb(1.0, 1.0, 1.0, 1, nDim, 2, constants, &config); + + // Standard flow and five-species NEMO primitive layouts. + for (unsigned short velocityIndex : {1, 7}) { + su2activematrix gradient(velocityIndex + nDim, nDim); + gradient = su2double(100.0); + for (unsigned short i = 0; i < nDim; ++i) + for (unsigned short j = 0; j < nDim; ++j) gradient(i + velocityIndex, j) = i == j ? i + 1.0 : 0.0; + auto velocityGradient = CMatrixView(gradient) + velocityIndex; + const su2double vorticity[3] = {1.0, 1.0, 0.0}; + turb.SetVortex_Tilting(0, velocityGradient, vorticity, 1.0); + REQUIRE(turb.GetVortex_Tilting(0) == Approx(0.5)); + + const su2double zeroVorticity[3] = {0.0, 0.0, 0.0}; + turb.SetVortex_Tilting(0, velocityGradient, zeroVorticity, 1.0); + REQUIRE(turb.GetVortex_Tilting(0) == 1.0); + } + } +} diff --git a/config_template.cfg b/config_template.cfg index 5e611f22ed48..6e762876aed2 100644 --- a/config_template.cfg +++ b/config_template.cfg @@ -175,7 +175,7 @@ UNST_ADJOINT_ITER= 0 % % ------------------------------- DES Parameters ------------------------------% % -% Specify Hybrid RANS/LES model (SA_DES, SA_DDES, SA_ZDES, SA_EDDES) +% Specify Hybrid RANS/LES model (SA_DES, SA_DDES, SA_ZDES, SA_EDDES, SST_DDES, SST_IDDES, SST_SIDDES, SST_EDDES) HYBRID_RANSLES= SA_DDES % % DES Constant (0.65)