diff --git a/Common/include/option_structure.hpp b/Common/include/option_structure.hpp index 70592980ecc..a2d29a48287 100644 --- a/Common/include/option_structure.hpp +++ b/Common/include/option_structure.hpp @@ -1331,11 +1331,13 @@ inline LM_ParsedOptions ParseLMOptions(const LM_OPTIONS *LM_Options, unsigned sh */ enum class AFT_OPTIONS { NONE, /*!< \brief No option / default. */ + AFT2017b, /*!< \brief using AFT2017b model. */ AFT2019b /*!< \brief using AFT2019b model. */ }; static const MapType AFT_Options_Map = { MakePair("NONE", AFT_OPTIONS::NONE) + MakePair("AFT2017b", AFT_OPTIONS::AFT2017b) MakePair("AFT2019b", AFT_OPTIONS::AFT2019b) }; @@ -1344,6 +1346,7 @@ static const MapType AFT_Options_Map = { */ enum class AFT_CORRELATION { NONE, /*!< \brief No option / default. */ + AFT2017b, /*!< \brief Kind of transition correlation model (AFT2017b). */ AFT2019b /*!< \brief Kind of transition correlation model (AFT2019b). */ }; @@ -1371,6 +1374,12 @@ inline AFT_ParsedOptions ParseAFTOptions(const AFT_OPTIONS *AFT_Options, unsigne }; int NFoundCorrelations = 0; + if (IsPresent(AFT_OPTIONS::AFT2017b)) { + AFTParsedOptions.Correlation = AFT_CORRELATION::AFT2017b; + AFTParsedOptions.version = AFT_OPTIONS::AFT2017b; + NFoundCorrelations++; + } + if (IsPresent(AFT_OPTIONS::AFT2019b)) { AFTParsedOptions.Correlation = AFT_CORRELATION::AFT2019b; AFTParsedOptions.version = AFT_OPTIONS::AFT2019b; diff --git a/Common/src/CConfig.cpp b/Common/src/CConfig.cpp index 37c00b0ab35..4aa7e3bc0c0 100644 --- a/Common/src/CConfig.cpp +++ b/Common/src/CConfig.cpp @@ -6338,6 +6338,13 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { if (Kind_Trans_Model == TURB_TRANS_MODEL::AFT) { switch (aftParsedOptions.Correlation) { + case AFT_CORRELATION::AFT2017b: + switch (Kind_Turb_Model) { + case TURB_MODEL::NONE: SU2_MPI::Error("No turbulence model has been selected but AFT transition model is active.", CURRENT_FUNCTION); break; + case TURB_MODEL::SST: SU2_MPI::Error("k-w SST turbulence model has been selected but AFT transition model is active.", CURRENT_FUNCTION); break; + } + cout << "-2017b" << endl; break; + if(!saParsedOptions.ft2) SU2_MPI::Error("ft2 option of SA model has been not selected.", CURRENT_FUNCTION); case AFT_CORRELATION::AFT2019b: switch (Kind_Turb_Model) { case TURB_MODEL::NONE: SU2_MPI::Error("No turbulence model has been selected but AFT transition model is active.", CURRENT_FUNCTION); break; diff --git a/SU2_CFD/include/numerics/turbulent/transition/trans_correlations.hpp b/SU2_CFD/include/numerics/turbulent/transition/trans_correlations.hpp index af0a434c90d..5934af3ece9 100644 --- a/SU2_CFD/include/numerics/turbulent/transition/trans_correlations.hpp +++ b/SU2_CFD/include/numerics/turbulent/transition/trans_correlations.hpp @@ -221,8 +221,15 @@ class TransAFTCorrelations { su2double H12 = 0.0; switch (options.Correlation) { + case AFT_CORRELATION::AFT2017b: { + H12 = 0.376960 + sqrt( (HL + 2.453432) / 0.653181 ); + H12 = min(max(H12, 2.2), 20.0); + break; + } + case AFT_CORRELATION::AFT2019b: { H12 = 0.26 * HL + 2.4; + H12 = min(max(H12, 2.2), 20.0); break; } @@ -231,7 +238,6 @@ class TransAFTCorrelations { CURRENT_FUNCTION); break; } - H12 = min(max(H12, 2.2), 20.0); return H12; } @@ -244,6 +250,11 @@ class TransAFTCorrelations { su2double dNdRet = 0.0; switch (options.Correlation) { + case AFT_CORRELATION::AFT2017b: { + dNdRet = 0.028*(H12 - 1.0) - 0.0345 * exp(-pow(3.87/(H12 -1.0) - 2.52, 2.0)); + break; + } + case AFT_CORRELATION::AFT2019b: { dNdRet = 0.028*(H12 - 1.0) - 0.0345 * exp(-pow(3.87/(H12 -1.0) - 2.52, 2.0)); break; @@ -266,6 +277,12 @@ class TransAFTCorrelations { su2double Ret0 = 0.0; switch (options.Correlation) { + case AFT_CORRELATION::AFT2017b: { + Ret0 = 0.7 * tanh( 14.0 / (H12 - 1.0) - 9.24) + 2.492 / pow(H12 - 1.0, 0.43) + 0.62; + Ret0 = pow(10, Ret0); + break; + } + case AFT_CORRELATION::AFT2019b: { Ret0 = 0.7 * tanh( 14.0 / (H12 - 1.0) - 9.24) + 2.492 / pow(H12 - 1.0, 0.43) + 0.62; Ret0 = pow(10, Ret0); @@ -289,6 +306,11 @@ class TransAFTCorrelations { su2double D_H12 = 0.0; switch (options.Correlation) { + case AFT_CORRELATION::AFT2017b: { + D_H12 = H12 / ( 0.5482 * H12 - 0.5185); + break; + } + case AFT_CORRELATION::AFT2019b: { D_H12 = 2.4 * H12 / (H12 - 1.0); break; @@ -311,6 +333,11 @@ class TransAFTCorrelations { su2double l_H12 = 0.0; switch (options.Correlation) { + case AFT_CORRELATION::AFT2017b: { + l_H12 = (6.54 * H12 - 14.07) / pow(H12, 2.0); + break; + } + case AFT_CORRELATION::AFT2019b: { l_H12 = (6.54 * H12 - 14.07) / pow(H12, 2.0); break; @@ -333,11 +360,16 @@ class TransAFTCorrelations { su2double m_H12 = 0.0; switch (options.Correlation) { - case AFT_CORRELATION::AFT2019b: { + case AFT_CORRELATION::AFT2017b: { m_H12 = (0.058 * pow(H12 - 4, 2.0) / (H12 - 1.0) - 0.068) / l_Correlation; break; } + case AFT_CORRELATION::AFT2019b: { + m_H12 = (0.058 * pow(H12 - 4.0, 2.0) / (H12 - 1.0) - 0.068) / l_Correlation; + break; + } + case AFT_CORRELATION::NONE: SU2_MPI::Error("Transition correlation is set to DEFAULT but no default value has ben set in the code.", CURRENT_FUNCTION); @@ -355,6 +387,11 @@ class TransAFTCorrelations { su2double kv = 0.0; switch (options.Correlation) { + case AFT_CORRELATION::AFT2017b: { + kv = 0.246175 * pow(H12, 2.0) - 0.141831 * H12 + 0.008886; + break; + } + case AFT_CORRELATION::AFT2019b: { kv = 1.0 / (0.4036 * pow(H12, 2.0) - 2.5394 * H12 + 4.3273); break; diff --git a/SU2_CFD/include/numerics/turbulent/transition/trans_sources.hpp b/SU2_CFD/include/numerics/turbulent/transition/trans_sources.hpp index a6c845314b6..9dfdf570727 100644 --- a/SU2_CFD/include/numerics/turbulent/transition/trans_sources.hpp +++ b/SU2_CFD/include/numerics/turbulent/transition/trans_sources.hpp @@ -422,7 +422,7 @@ class CSourcePieceWise_TransAFT final : public CNumerics { su2double tt = 0; } - const su2double HL = dist_i * dist_i * Density_i / Laminar_Viscosity_i * HLGradTerm; + su2double HL = min( max(dist_i * dist_i * Density_i / Laminar_Viscosity_i * HLGradTerm, -0.25), 200.0); /*--- Cal H12, dNdRet, Ret0, D_H12, l_H12, m_H12, kv ---*/ const su2double H12 = TransCorrelations.H12_Correlations(HL); const su2double dNdRet = TransCorrelations.dNdRet_Correlations(H12); diff --git a/SU2_CFD/src/solvers/CTransAFTSolver.cpp b/SU2_CFD/src/solvers/CTransAFTSolver.cpp index a9494fae717..b4ac57bec82 100644 --- a/SU2_CFD/src/solvers/CTransAFTSolver.cpp +++ b/SU2_CFD/src/solvers/CTransAFTSolver.cpp @@ -221,7 +221,7 @@ void CTransAFTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_conta } /*--- Cal H12, Hk, dNdRet, Ret0 ---*/ - const su2double HL = dist_i * dist_i * Density_i / Laminar_Viscosity_i * HLGradTerm; + su2double HL = min( max(dist_i * dist_i * Density_i / Laminar_Viscosity_i * HLGradTerm, -0.25), 200.0); const su2double H12 = TransCorrelations.H12_Correlations(HL); const su2double dNdRet = TransCorrelations.dNdRet_Correlations(H12); const su2double Ret0 = TransCorrelations.Ret0_Correlations(H12);