@@ -121,7 +121,8 @@ class CSourceBase_TurbSA : public CNumerics {
121121
122122 Omega::get (Vorticity_i, nDim, PrimVar_Grad_i + idx.Velocity (), var);
123123
124- // / TODO: Make this one of the template parameters?
124+ /* --- Dacles-Mariani et. al. rotation correction ("-R"), this is applied by
125+ * default for rotating frame, but should be controled in the config. ---*/
125126 if (rotating_frame) {
126127 var.Omega += 2.0 * min (0.0 , StrainMag_i - var.Omega );
127128 }
@@ -172,19 +173,20 @@ class CSourceBase_TurbSA : public CNumerics {
172173
173174 var.norm2_Grad = GeometryToolbox::SquaredNorm (nDim, ScalarVar_Grad_i[0 ]);
174175
175- // / TODO: Make this one of the template parameters?
176176 if (transition) {
177- /* --- BC model constants (2020 revision). ---*/
177+ /* --- BC transition model (2020 revision). This should only be used with SA-noft2.
178+ * TODO: Consider making this part of the "SourceTerms" template. ---*/
178179 const su2double chi_1 = 0.002 ;
179180 const su2double chi_2 = 50.0 ;
180181
181- /* --- turbulence intensity is u'/U so we multiply by 100 to get percentage ---*/
182+ /* --- Turbulence intensity is u'/U so we multiply by 100 to get percentage. ---*/
182183 const su2double tu = 100.0 * config->GetTurbulenceIntensity_FreeStream ();
183184 const su2double nu_t = ScalarVar_i[0 ] * var.fv1 ;
184185
185186 const su2double re_v = density * var.dist_i_2 / laminar_viscosity * var.Omega ;
186187 const su2double re_theta = re_v / 2.193 ;
187- const su2double re_theta_t = 803.73 * pow (tu + 0.6067 , -1.027 ); // MENTER correlation
188+ /* --- Menter correlation. ---*/
189+ const su2double re_theta_t = 803.73 * pow (tu + 0.6067 , -1.027 );
188190
189191 const su2double term1 = sqrt (max (re_theta - re_theta_t , 0.0 ) / (chi_1 * re_theta_t ));
190192 const su2double term2 = sqrt (max ((nu_t * chi_2) / nu, 0.0 ));
@@ -503,6 +505,7 @@ class CCompressibilityCorrection final : public ParentClass {
503505 * ============================================================================*/
504506
505507// / TODO: Factory method to create combinations of the different variations based on the config.
508+ // / See PR #1413, the combinations exposed should follow https://turbmodels.larc.nasa.gov/spalart.html
506509
507510/* !
508511 * \class CSourcePieceWise_TurbSA
@@ -556,19 +559,20 @@ template <class FlowIndices>
556559class CSourcePieceWise_TurbSST final : public CNumerics {
557560 private:
558561 const FlowIndices idx; /* !< \brief Object to manage the access to the flow primitives. */
562+ const bool sustaining_terms = false ;
563+ const bool axisymmetric = false ;
559564
560- su2double F1_i, F2_i, CDkw_i;
565+ /* --- Closure constants ---*/
566+ 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;
561567
562- su2double alfa_1, alfa_2, beta_1, beta_2, sigma_k_1, sigma_k_2, sigma_w_1, sigma_w_2, beta_star, a1;
563- su2double kAmb , omegaAmb;
568+ /* --- Ambient values for SST-SUST. --- */
569+ const su2double kAmb , omegaAmb;
564570
571+ su2double F1_i, F2_i, CDkw_i;
565572 su2double Residual[2 ];
566573 su2double* Jacobian_i[2 ];
567574 su2double Jacobian_Buffer[4 ]; // / Static storage for the Jacobian (which needs to be pointer for return type).
568575
569- const bool sustaining_terms = false ;
570- const bool axisymmetric = false ;
571-
572576 /* !
573577 * \brief Get strain magnitude based on perturbed reynolds stress matrix.
574578 * \param[in] turb_ke: turbulent kinetic energy of the node.
@@ -633,23 +637,19 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
633637 : CNumerics(val_nDim, 2 , config),
634638 idx (val_nDim, config->GetnSpecies ()),
635639 sustaining_terms(config->GetKind_Turb_Model () == TURB_MODEL::SST_SUST),
636- axisymmetric(config->GetAxisymmetric ()) {
637- /* --- Closure constants ---*/
638- sigma_k_1 = constants[0 ];
639- sigma_k_2 = constants[1 ];
640- sigma_w_1 = constants[2 ];
641- sigma_w_2 = constants[3 ];
642- beta_1 = constants[4 ];
643- beta_2 = constants[5 ];
644- beta_star = constants[6 ];
645- a1 = constants[7 ];
646- alfa_1 = constants[8 ];
647- alfa_2 = constants[9 ];
648-
649- /* --- Set the ambient values of k and omega to the free stream values. ---*/
650- kAmb = val_kine_Inf;
651- omegaAmb = val_omega_Inf;
652-
640+ axisymmetric(config->GetAxisymmetric ()),
641+ sigma_k_1(constants[0 ]),
642+ sigma_k_2(constants[1 ]),
643+ sigma_w_1(constants[2 ]),
644+ sigma_w_2(constants[3 ]),
645+ beta_1(constants[4 ]),
646+ beta_2(constants[5 ]),
647+ beta_star(constants[6 ]),
648+ a1(constants[7 ]),
649+ alfa_1(constants[8 ]),
650+ alfa_2(constants[9 ]),
651+ kAmb(val_kine_Inf),
652+ omegaAmb(val_omega_Inf) {
653653 /* --- "Allocate" the Jacobian using the static buffer. ---*/
654654 Jacobian_i[0 ] = Jacobian_Buffer;
655655 Jacobian_i[1 ] = Jacobian_Buffer + 2 ;
0 commit comments