-
Notifications
You must be signed in to change notification settings - Fork 904
Implementation of DDES and SAS formulations for SST #2150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 13 commits
388f85a
41cb27e
a6be2cf
d1f4db6
35958b8
09e977f
8c8e89d
71ac9c4
5b5fc30
ef50283
91c742e
6c86a19
48a9f3d
ae33b05
6443070
caf0d41
a584526
0f3a832
710e1dc
e4f28d4
068ac21
cbe79f7
d770fa1
4dda141
84d65bf
5337229
0806d21
0cab1ef
ad86192
dcbacc8
33c6664
a5702d8
ab6bedb
e5080a1
c2fd653
d377903
d037e59
d9f329e
0adcb7e
d50b123
34a0271
04dfcd3
a60fb13
95ccc73
de45d5f
d172607
e5a916c
c723a13
d051f0b
c840256
9b997d7
8f3efae
f716218
28490fd
ff56f36
707afa4
b249f2c
f10c465
37a866f
ac2078c
0c8d49a
86db90b
d4564da
177276a
e260cc4
7e57afe
f193796
c5e1dee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -990,6 +990,8 @@ enum class SST_OPTIONS { | |||||||||||||||
| V, /*!< \brief Menter k-w SST model with vorticity production terms. */ | ||||||||||||||||
| KL, /*!< \brief Menter k-w SST model with Kato-Launder production terms. */ | ||||||||||||||||
| UQ, /*!< \brief Menter k-w SST model with uncertainty quantification modifications. */ | ||||||||||||||||
| SAS_SIMPLE, /*!< \brief Menter k-w SST model with Scale Adaptive Simulations modifications. */ | ||||||||||||||||
| SAS_COMPLICATED, /*!< \brief Menter k-w SST model with Scale Adaptive Simulations modifications. */ | ||||||||||||||||
| }; | ||||||||||||||||
| static const MapType<std::string, SST_OPTIONS> SST_Options_Map = { | ||||||||||||||||
| MakePair("NONE", SST_OPTIONS::NONE) | ||||||||||||||||
|
|
@@ -1002,6 +1004,8 @@ static const MapType<std::string, SST_OPTIONS> SST_Options_Map = { | |||||||||||||||
| MakePair("VORTICITY", SST_OPTIONS::V) | ||||||||||||||||
| MakePair("KATO-LAUNDER", SST_OPTIONS::KL) | ||||||||||||||||
| MakePair("UQ", SST_OPTIONS::UQ) | ||||||||||||||||
| MakePair("SAS_SIMPLE", SST_OPTIONS::SAS_SIMPLE) | ||||||||||||||||
| MakePair("SAS_COMPLICATED", SST_OPTIONS::SAS_COMPLICATED) | ||||||||||||||||
| }; | ||||||||||||||||
|
|
||||||||||||||||
| /*! | ||||||||||||||||
|
|
@@ -1010,8 +1014,10 @@ static const MapType<std::string, SST_OPTIONS> SST_Options_Map = { | |||||||||||||||
| struct SST_ParsedOptions { | ||||||||||||||||
| SST_OPTIONS version = SST_OPTIONS::V1994; /*!< \brief Enum SST base model. */ | ||||||||||||||||
| SST_OPTIONS production = SST_OPTIONS::NONE; /*!< \brief Enum for production corrections/modifiers for SST model. */ | ||||||||||||||||
| SST_OPTIONS sasModel = SST_OPTIONS::SAS_SIMPLE; /*!< \brief Enum SST base model. */ | ||||||||||||||||
| bool sust = false; /*!< \brief Bool for SST model with sustaining terms. */ | ||||||||||||||||
| bool uq = false; /*!< \brief Bool for using uncertainty quantification. */ | ||||||||||||||||
| bool sas = false; /*!< \brief Bool for using Scale Adaptive Simulations. */ | ||||||||||||||||
|
||||||||||||||||
| SST_OPTIONS sasModel = SST_OPTIONS::SAS_SIMPLE; /*!< \brief Enum SST base model. */ | |
| bool sust = false; /*!< \brief Bool for SST model with sustaining terms. */ | |
| bool uq = false; /*!< \brief Bool for using uncertainty quantification. */ | |
| bool sas = false; /*!< \brief Bool for using Scale Adaptive Simulations. */ | |
| SST_OPTIONS sasModel = SST_OPTIONS::NONE; /*!< \brief Enum SST base model. */ | |
| bool sust = false; /*!< \brief Bool for SST model with sustaining terms. */ | |
| bool uq = false; /*!< \brief Bool for using uncertainty quantification. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll modify it.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update simple and complicated?
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6157,6 +6157,9 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) { | |
| 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) with Shear-layer Adapted SGS" << endl; break; | ||
| case SST_IDDES: cout << "Delayed Detached Eddy Simulation (DDES) with Shear-layer Adapted SGS" << endl; break; | ||
| case SST_SIDDES: cout << "Delayed Detached Eddy Simulation (DDES) with Shear-layer Adapted SGS" << endl; break; | ||
|
||
| } | ||
| break; | ||
| case MAIN_SOLVER::NEMO_EULER: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -190,6 +190,10 @@ class CNumerics { | |
|
|
||
| bool bounded_scalar = false; /*!< \brief Flag for bounded scalar problem */ | ||
|
|
||
| su2double lengthScale_i, lengthScale_j; | ||
| su2double FTrans; /*!< \brief SAS function */ | ||
| su2double VelLapl_X, VelLapl_Y, VelLapl_Z; | ||
|
||
|
|
||
| public: | ||
| /*! | ||
| * \brief Return type used in some "ComputeResidual" overloads to give a | ||
|
|
@@ -707,6 +711,26 @@ class CNumerics { | |
| */ | ||
| virtual void SetCrossDiff(su2double val_CDkw_i) {/* empty */}; | ||
|
|
||
| /*! | ||
| * \brief Get the value of the value of FTrans. | ||
| */ | ||
| inline virtual su2double GetFTrans() const { return 0.0; } | ||
|
|
||
| /*! | ||
| * \brief Get the value of the value of FTrans. | ||
| */ | ||
| inline void SetVelLapl(su2double val_VelLapl_X, su2double val_VelLapl_Y) { | ||
| VelLapl_X = val_VelLapl_X; | ||
| VelLapl_Y = val_VelLapl_Y; | ||
| } | ||
|
|
||
| /*! | ||
| * \brief Get the value of the value of FTrans. | ||
| */ | ||
| inline void SetVelLapl_Z(su2double val_VelLapl_Z) { | ||
| VelLapl_Z = val_VelLapl_Z; | ||
| } | ||
|
|
||
| /*! | ||
| * \brief Set the value of the effective intermittency for the LM model. | ||
| * \param[in] intermittency_eff_i - Value of the effective intermittency at point i. | ||
|
|
@@ -828,6 +852,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 value of the roughness from the nearest wall. | ||
| * \param[in] val_dist_i - Value of of the roughness of the nearest wall from point i | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -605,6 +605,7 @@ class CSourcePieceWise_TurbSST final : public CNumerics { | |||||
| /*--- Closure constants ---*/ | ||||||
| const su2double sigma_k_1, sigma_k_2, sigma_w_1, sigma_w_2, beta_1, beta_2, beta_star, a1, alfa_1, alfa_2; | ||||||
| const su2double prod_lim_const; | ||||||
| const su2double cTrans; | ||||||
|
|
||||||
| /*--- Ambient values for SST-SUST. ---*/ | ||||||
| const su2double kAmb, omegaAmb; | ||||||
|
|
@@ -689,6 +690,7 @@ class CSourcePieceWise_TurbSST final : public CNumerics { | |||||
| alfa_1(constants[8]), | ||||||
| alfa_2(constants[9]), | ||||||
| prod_lim_const(constants[10]), | ||||||
| cTrans(1.25), | ||||||
| kAmb(val_kine_Inf), | ||||||
| omegaAmb(val_omega_Inf) { | ||||||
| /*--- "Allocate" the Jacobian using the static buffer. ---*/ | ||||||
|
|
@@ -834,6 +836,9 @@ class CSourcePieceWise_TurbSST final : public CNumerics { | |||||
| /*--- Dissipation ---*/ | ||||||
|
|
||||||
| su2double dk = beta_star * Density_i * ScalarVar_i[1] * ScalarVar_i[0]; | ||||||
| if (config->GetKind_HybridRANSLES() != NO_HYBRIDRANSLES) | ||||||
| dk = Density_i * sqrt(ScalarVar_i[0]*ScalarVar_i[0]*ScalarVar_i[0]) / lengthScale_i; | ||||||
|
||||||
| dk = Density_i * sqrt(ScalarVar_i[0]*ScalarVar_i[0]*ScalarVar_i[0]) / lengthScale_i; | |
| dk = Density_i * sqrt(pow(ScalarVar_i[0], 3)) / lengthScale_i; |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the velocity laplacian only used for the source term? Or will you have changes to the convection or diffusion fluxes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is just for the source term
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the geometry toolbox for this type of operation, there are some examples in this file I think
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,9 +39,10 @@ | |
| class CTurbSAVariable final : public CTurbVariable { | ||
|
|
||
| private: | ||
| VectorType DES_LengthScale; | ||
| VectorType Vortex_Tilting; | ||
|
|
||
| VectorType k, Omega; /*!< \brief SST variables as computed through SA solution. */ | ||
|
|
||
| public: | ||
| /*! | ||
| * \brief Constructor of the class. | ||
|
|
@@ -60,19 +61,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 Set the vortex tilting measure for computation of the EDDES length scale | ||
| * \param[in] iPoint - Point index. | ||
|
|
@@ -87,4 +75,26 @@ class CTurbSAVariable final : public CTurbVariable { | |
| */ | ||
| inline su2double GetVortex_Tilting(unsigned long iPoint) const override { return Vortex_Tilting(iPoint); } | ||
|
|
||
| /*! | ||
| * \brief Get the value of the turbulence kinetic energy. | ||
| * \return the value of the turbulence kinetic energy. | ||
| */ | ||
| inline su2double GetSSTVariables_k(unsigned long iPoint) const { return k(iPoint); } | ||
|
|
||
| /*! | ||
| * \brief Get the value of the turbulence frequency Omega. | ||
| * \return the value of the turbulence frequency Omega. | ||
| */ | ||
| inline su2double GetSSTVariables_omega(unsigned long iPoint) const { return Omega(iPoint); } | ||
|
|
||
| /*! | ||
| * \brief Set the value of the SST variables computed with SA solution. | ||
| * \param[in] val_k | ||
| * \param[in] val_Omega | ||
| */ | ||
| void SetSSTVariables(unsigned long iPoint, su2double val_k, su2double val_Omega) { | ||
| k(iPoint) = val_k; | ||
|
||
| Omega(iPoint) = val_Omega; | ||
| } | ||
|
|
||
| }; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these the names in the literature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, these are just placeholders. There are no names in literature, that is why I named them according to the complexity of the model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something after the authors since the models come from different papers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, why not