Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
d1cf7ea
Fix the internal energy of the under-relaxation factor
rois1995 Sep 29, 2026
ffc5baf
Clear the whole Jacobian in the non-physical guard of the general-gas…
rois1995 Sep 29, 2026
a59d827
Compute HLLC on moving grids in the frame of the face, fix its Jacobians
rois1995 Sep 29, 2026
583c32a
Add the incompressible grid-motion Jacobian once, with the variable-d…
rois1995 Sep 29, 2026
ca7aee0
Reduce the minimum pressure with MPI_MIN
rois1995 Sep 29, 2026
b29368d
Reject combinations of source terms that share one numerics object
rois1995 Sep 29, 2026
df8f978
Read the Riemann boundary kind in BC_TurboRiemann
rois1995 Sep 29, 2026
f3bcaac
Check the number of variables in the Green-Gauss gradient
rois1995 Sep 29, 2026
99d861a
Clamp MGLEVEL to 10
rois1995 Sep 29, 2026
536c8d8
Use 0.5 instead of the integer division 1/2 in the axisymmetric sourc…
rois1995 Sep 29, 2026
a277f59
Use wave strengths that match the 3D P matrix in L2Roe, LMRoe and the…
rois1995 Sep 29, 2026
c333a18
Check the MUSCL face states before evaluating the fluid model
rois1995 Sep 29, 2026
c0dc0ce
Include the SST k of the total energy in the convective numerics
Sep 30, 2026
3eb9dc8
Use the k of the boundary node in the boundary states of the compress…
Sep 30, 2026
8536636
Include the SST k in the pressure of the axisymmetric source, remove …
Sep 30, 2026
580800a
Apply the SST compressibility corrections together with the productio…
Sep 30, 2026
a002e77
Check the SST free-stream values and markers, fix the omega of the tu…
Sep 30, 2026
37dcfed
Add a regression test of the Riemann DENSITY_VELOCITY inlet with SST
Sep 30, 2026
482d18a
Enable the standard SST versions, add the TMRBC, WALL_OMEGA_LIMIT and…
Sep 30, 2026
fa241d7
Use the exact production for the standard SST versions, fix the CDkw …
Sep 30, 2026
274cecb
Include 2/3 rho k in the stress tensor for the standard SST versions
Sep 30, 2026
dc104a2
Add the far-field values of the NASA TMR, the SST-sust ambient values…
Sep 30, 2026
d807925
Regression test of the standard SST-2003 with the NASA TMR far-field …
Sep 30, 2026
b2e8375
Update the reference values of the regression tests from CI
Sep 30, 2026
d875b76
Update the reference files of the gradient regression tests from CI
Sep 30, 2026
459113d
Merge develop into fix_underrelaxation_factor
rois1995 Oct 9, 2026
e323f4c
Merge fix_underrelaxation_factor into fix_hllc_moving_grids
rois1995 Oct 9, 2026
e7def4d
Merge fix_hllc_moving_grids into fix_roe_3d_wave_strengths
rois1995 Oct 9, 2026
c21bec6
Merge fix_roe_3d_wave_strengths into fix_meanflow_small
rois1995 Oct 9, 2026
41c699f
Merge fix_meanflow_small into fix_sst_k_consistency
rois1995 Oct 9, 2026
a03b7d0
Merge fix_sst_k_consistency into feature_sst_tmr_alignment
rois1995 Oct 9, 2026
b365479
Merge branch 'develop' into fix_underrelaxation_factor
joshkellyjak Oct 12, 2026
2d0857d
Apply under-relaxation review style suggestions
rois1995 Oct 12, 2026
d2701a8
Merge remote-tracking branch 'origin/fix_underrelaxation_factor' into…
rois1995 Oct 12, 2026
73af49d
Merge commit 'd2701a8b25c35af5bbdfbae5b5e4622d5d9d69b5' into HEAD
rois1995 Oct 12, 2026
5ca9969
Merge commit '73af49df8ee4b34fb79716acdac61e2d5cab1d8d' into HEAD
rois1995 Oct 12, 2026
4960dd0
Fix HLLC supersonic Jacobians for reconstructed face enthalpy
rois1995 Oct 12, 2026
c4209c3
Merge HLLC face-enthalpy Jacobian fix from PR 2943
rois1995 Oct 12, 2026
371fcae
Merge propagated HLLC face-enthalpy Jacobian fix from PR 2944
rois1995 Oct 12, 2026
e0d3ee8
Correct compressible moving-wall projection and multigrid coupling
rois1995 Oct 12, 2026
211d177
Separate the HLLC Jacobian option and keep verification access private
rois1995 Oct 12, 2026
07760e6
Use deduced types for Roe entropy wave strengths
rois1995 Oct 12, 2026
a950f3d
Reject unsupported multigrid levels and align centered density handling
rois1995 Oct 12, 2026
6c571f3
Separate the HLLC Jacobian option and keep verification access private
rois1995 Oct 12, 2026
27fc175
Separate the HLLC Jacobian option and keep verification access private
rois1995 Oct 12, 2026
815aa5c
Use deduced types for Roe entropy wave strengths
rois1995 Oct 12, 2026
6c0b211
Merge approved HLLC review changes from PR 2943
rois1995 Oct 13, 2026
773bca5
Merge approved HLLC and Roe review changes from PR 2944
rois1995 Oct 13, 2026
3062a04
Materialize AD densities in compressible under-relaxation
rois1995 Oct 13, 2026
8b28ba8
Merge under-relaxation AD density lifetime fix from PR 2942
rois1995 Oct 13, 2026
e337669
Merge under-relaxation AD density lifetime fix through PR 2943
rois1995 Oct 13, 2026
d158729
Merge under-relaxation AD density lifetime fix through PR 2944
rois1995 Oct 13, 2026
bc5350d
Merge develop into fix_hllc_moving_grids
rois1995 Oct 20, 2026
ab5c080
Update the HLLC wedge references from CI run 39388009966
rois1995 Oct 20, 2026
5bd7f12
Merge fix_roe_3d_wave_strengths into fix_meanflow_small
rois1995 Oct 21, 2026
2ca3570
Merge fix_hllc_moving_grids into fix_roe_3d_wave_strengths
rois1995 Oct 21, 2026
48fcd03
Merge fix_meanflow_small into fix_sst_k_consistency
rois1995 Oct 21, 2026
bfd1e39
Merge fix_sst_k_consistency into feature_sst_tmr_alignment
rois1995 Oct 21, 2026
5747cf7
Merge the parent branch into this one
rois1995 Oct 22, 2026
8152f7c
Update the reference values from the CI
rois1995 Oct 22, 2026
90e739b
Merge the parent branch into this one
rois1995 Oct 22, 2026
7ecc920
Merge the parent branch into this one
rois1995 Oct 22, 2026
05187b6
Update the reference values from the CI
rois1995 Oct 22, 2026
bcdd766
Update the reference values from the CI
rois1995 Oct 22, 2026
7b8ade4
Update the reference values from the CI
rois1995 Oct 22, 2026
d1eca26
Merge commit '2dc7b708dcc81fdc86b8e814e8efff0399a8799c' into HEAD
rois1995 Oct 27, 2026
3aac48f
Merge commit 'd1eca2685f2e3b410aa405bf2760bbe5c790beb5' into HEAD
rois1995 Oct 27, 2026
ea47b21
Merge commit '3aac48f230e847d3b499917556e6a819bd858e47' into HEAD
rois1995 Oct 27, 2026
5a7c5b0
Merge commit 'ea47b2173916cf804a7fb03921f2d13bf7c8444f' into HEAD
rois1995 Oct 27, 2026
0de15d5
Merge commit '5a7c5b02138248883460f70b040788947b607f30' into HEAD
rois1995 Oct 27, 2026
d18cc7a
Merge commit 'e61e2e9674d15b07d8fa1f959588d5e55ad36551' into HEAD
rois1995 Oct 29, 2026
d0a872b
Merge commit 'd18cc7a7e9168b97330de31a315256924103d1ad' into HEAD
rois1995 Oct 29, 2026
2b08824
Merge remote-tracking branch 'origin/fix_roe_3d_wave_strengths' into …
rois1995 Oct 29, 2026
649d7a9
Restore regression files after develop merge
rois1995 Oct 29, 2026
aeeae94
Merge remote-tracking branch 'origin/fix_meanflow_small' into HEAD
rois1995 Oct 29, 2026
3541799
Merge remote-tracking branch 'origin/fix_sst_k_consistency' into HEAD
rois1995 Oct 29, 2026
b6ce12d
Merge commit '7048fd35f56d4bf52e586429d6746a36a10255f8' into HEAD
rois1995 Oct 30, 2026
b7e6695
Merge commit 'b6ce12d2b1504794c62253257331bfb0ce4a6068' into HEAD
rois1995 Oct 30, 2026
7d9c44a
Merge commit 'b7e6695e586847b4d5874ac30100e6714312db02' into HEAD
rois1995 Oct 30, 2026
bf316f8
Merge commit '7d9c44aebea3ea3a6ff95291e5ffa97f399e52dc' into HEAD
rois1995 Oct 30, 2026
d0ad33c
Merge commit 'bf316f862bee6d44c031800629d795a4a77bad6d' into HEAD
rois1995 Oct 30, 2026
1fd11d2
Merge commit 'f4b67d23deaac22948cc8d2a2c0da3138ae804f6' into HEAD
rois1995 Oct 31, 2026
95ad876
Merge commit '1fd11d2c8c5659da9a45a643d41869d6c1a71e68' into HEAD
rois1995 Oct 31, 2026
de29b58
Merge commit '95ad8767ffbead81e5521a1c792e5f152409fc23' into HEAD
rois1995 Oct 31, 2026
84a4a6d
Merge commit 'de29b5852ac35eb2cb14a52d0ee20575315865c4' into HEAD
rois1995 Oct 31, 2026
0d083b7
Merge remote-tracking branch 'origin/fix_sst_k_consistency' into HEAD
rois1995 Oct 31, 2026
1aa4951
Clarify HLLC Jacobian naming and tests
rois1995 Oct 31, 2026
e94eaff
Fix HLLC test formatting
rois1995 Nov 6, 2026
51b2494
Fix remaining SST k inconsistencies in flow numerics
rois1995 Nov 7, 2026
ee92156
Forward solver container through implicit Euler completion
rois1995 Nov 7, 2026
81801ff
Merge branch 'develop' into fix_hllc_moving_grids
Nov 16, 2026
cc0bf82
Merge branch 'stk-fix_hllc_moving_grids' into fix_roe_3d_wave_strengths
Nov 16, 2026
aa29b76
Merge branch 'stk-fix_roe_3d_wave_strengths' into fix_meanflow_small
Nov 16, 2026
42cfc6b
Merge branch 'fix_meanflow_small' into fix_sst_k_consistency
Nov 16, 2026
36a6866
Merge branch 'fix_sst_k_consistency' into feature_sst_tmr_alignment
Nov 16, 2026
1127f91
Fix the AD build of the preconditioner k term and format the SST ener…
Nov 16, 2026
7500a72
Merge branch 'fix_sst_k_consistency' into feature_sst_tmr_alignment
Nov 16, 2026
9c2b5b0
Update the axisymmetric RANS reference values from the CI
Nov 16, 2026
40a8435
Merge branch 'fix_meanflow_small' into fix_sst_k_consistency
Nov 16, 2026
71a682d
Merge branch 'fix_sst_k_consistency' into feature_sst_tmr_alignment
Nov 16, 2026
a8ec173
Merge branch 'develop' into fix_roe_3d_wave_strengths
Nov 16, 2026
bf33ddf
Merge branch 'develop' into fix_roe_3d_wave_strengths
rois1995 Nov 17, 2026
ce76e9e
Merge branch 'fix_roe_3d_wave_strengths' into fix_meanflow_small
rois1995 Nov 17, 2026
21fd9f6
Merge branch 'fix_meanflow_small' into fix_sst_k_consistency
rois1995 Nov 17, 2026
8d4ee3f
Merge branch 'fix_sst_k_consistency' into feature_sst_tmr_alignment
rois1995 Nov 17, 2026
a015db4
Merge branch 'develop' into fix_roe_3d_wave_strengths
rois1995 Nov 17, 2026
faed994
Merge branch 'fix_roe_3d_wave_strengths' into fix_meanflow_small
rois1995 Nov 17, 2026
17429c7
Merge branch 'fix_meanflow_small' into fix_sst_k_consistency
rois1995 Nov 17, 2026
f481a28
Merge branch 'fix_sst_k_consistency' into feature_sst_tmr_alignment
rois1995 Nov 17, 2026
27ac2a9
Update moving-frame reference files for the compressible slip-wall pr…
rois1995 Nov 17, 2026
3a9d8e2
Merge branch 'fix_meanflow_small' into fix_sst_k_consistency
rois1995 Nov 17, 2026
e4fb2ad
Merge branch 'fix_sst_k_consistency' into feature_sst_tmr_alignment
rois1995 Nov 17, 2026
a0a0f39
Use the CI value for one sensitive force entry in updated_moving_fram…
rois1995 Nov 18, 2026
0be2f5a
Merge branch 'fix_meanflow_small' into fix_sst_k_consistency
rois1995 Nov 18, 2026
f083f7a
Merge branch 'fix_sst_k_consistency' into feature_sst_tmr_alignment
rois1995 Nov 18, 2026
38392f0
Merge branch 'develop' into fix_meanflow_small
rois1995 Nov 18, 2026
b7335e2
Use the CI value for the second force component of the same entry
rois1995 Nov 18, 2026
7da704a
Use the CI value for one more sensitive force entry
rois1995 Nov 18, 2026
a5428e9
Use the CI value for one more sensitive force entry
rois1995 Nov 18, 2026
f723b7d
Use the CI value for one more sensitive force entry
rois1995 Nov 18, 2026
5854602
Use the CI value for one more sensitive force entry
rois1995 Nov 18, 2026
4192b51
TEMPORARY: print the CI forces file of the moving-frame wrapper test
rois1995 Nov 18, 2026
cbb06e2
Use the CI forces file for the moving-frame wrapper test and remove t…
rois1995 Nov 18, 2026
8c5c398
Merge branch 'develop' into fix_meanflow_small
rois1995 Nov 19, 2026
be0cfd5
Merge branch 'fix_meanflow_small' into fix_sst_k_consistency
rois1995 Nov 30, 2026
ad6d64a
Merge branch 'develop' into fix_sst_k_consistency
rois1995 Nov 30, 2026
78a3e0b
Keep the SST k out of the EOS energy in the TurboRiemann outlet test
rois1995 Nov 30, 2026
d938b2d
Update the reference values from the CI
rois1995 Nov 30, 2026
75b1a0f
Merge branch 'fix_sst_k_consistency' into feature_sst_tmr_alignment
rois1995 Nov 30, 2026
0fd1865
Update hybrid reference values and AD reference files from the CI
rois1995 Nov 30, 2026
3bf48cd
CI: use the TestCases branch fix_sst_k_consistency (revert before merge)
rois1995 Nov 30, 2026
a649b9e
Use unsigned long for the loop index in GetRhoTke (CodeQL)
rois1995 Dec 1, 2026
c19a3b9
Merge branch 'fix_sst_k_consistency' into feature_sst_tmr_alignment, …
rois1995 Dec 1, 2026
47e5a0c
Vectorized MSW: weighted k in P and k correction, as in the non-SIMD …
rois1995 Dec 2, 2026
ca27ed5
Flow solver: one node-k helper, no SST code in engine/actuator-disk B…
rois1995 Dec 2, 2026
713c018
Numerics: one SIMD k helper, explicit turbulence variables, reject SS…
rois1995 Dec 2, 2026
b5cc3a7
Tests for the vectorized k paths (P matrices, Jacobian, JST_MAT, MSW)…
rois1995 Dec 2, 2026
c30cbb5
Add k only with SST, so non-SST rounding stays the same under fast-ma…
rois1995 Dec 2, 2026
1066ea7
Update reference values (SST mixed-out average, new SST JST_MAT test,…
rois1995 Dec 2, 2026
15cca4c
Merge develop 8b549a41d6 into fix_sst_k_consistency
rois1995 Dec 2, 2026
231b9e4
Merge #2946 (15cca4c4bc) into #2948
rois1995 Dec 2, 2026
a5e76b5
Review: SST wall function writes the neighbour solution, free-stream …
rois1995 Dec 3, 2026
5434a35
Update sudo_bend reference values (SST wall function writes the neigh…
rois1995 Dec 3, 2026
ed5c20b
Merge #2946 (5434a35ee4) into #2948
rois1995 Dec 3, 2026
fae50da
Update reference values from CI (rounding changes from the stress-ten…
rois1995 Dec 3, 2026
91487f9
Drop the unused constructor pack of the viscous flux base (CodeQL), k…
rois1995 Dec 3, 2026
beba8ac
Merge branch 'develop' into feature_sst_tmr_alignment
rois1995 Dec 4, 2026
8a5b15c
Apply self-review fixes
rois1995 Dec 4, 2026
0dd16e9
Set REYNOLDS_NUMBER in the SST unit test and update reference values
rois1995 Dec 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,10 @@ class CConfig {
nHistoryOutput, nVolumeOutput; /*!< \brief Number of variables printed to the history file. */
bool Multizone_Residual; /*!< \brief Determines if memory should be allocated for the multizone residual. */
SST_ParsedOptions sstParsedOptions; /*!< \brief Additional parameters for the SST turbulence model. */
su2double sstDomainLength; /*!< \brief Domain length of SST_OPTIONS= TMR_FREESTREAM (dimensional). */
su2double sstSustTkeAmb; /*!< \brief Ambient k of the SST sustaining terms (dimensional). */
su2double sstSustOmegaAmb; /*!< \brief Ambient omega of the SST sustaining terms (dimensional). */
bool sstSustAmbient = false; /*!< \brief True if SST_SUST_TKE_AMB and SST_SUST_OMEGA_AMB are set. */
SA_ParsedOptions saParsedOptions; /*!< \brief Additional parameters for the SA turbulence model. */
LM_ParsedOptions lmParsedOptions; /*!< \brief Additional parameters for the LM transition model. */
su2double uq_delta_b; /*!< \brief Parameter used to perturb eigenvalues of Reynolds Stress Matrix */
Expand Down Expand Up @@ -10432,6 +10436,37 @@ class CConfig {
*/
SST_ParsedOptions GetSSTParsedOptions() const { return sstParsedOptions; }

/*!
* \brief Check if the free-stream k and omega of the SST model come from SST_OPTIONS= TMR_FREESTREAM or from
* SST_SUST_TKE_AMB and SST_SUST_OMEGA_AMB, instead of the turbulence intensity and the viscosity ratio.
* \return True if they come from these options.
*/
bool GetSSTFreeStreamFromOptions() const { return sstParsedOptions.tmrFreeStream || sstSustAmbient; }

/*!
* \brief Free-stream k and omega of the SST model when GetSSTFreeStreamFromOptions() is true.
* \note TMR_FREESTREAM: omega = 10 U / SST_DOMAIN_LENGTH and k = omega mu viscRatio / rho. Otherwise the ambient
* values SST_SUST_TKE_AMB and SST_SUST_OMEGA_AMB.
* \param[in] velMag - Velocity magnitude.
* \param[in] density - Density.
* \param[in] lamVisc - Laminar viscosity.
* \param[in] viscRatio - Ratio of eddy to laminar viscosity.
* \param[in] nonDim - True if the inputs and the outputs are non-dimensional (the reference values must be set).
* \return k and omega.
*/
std::array<su2double, 2> GetSSTFreeStreamTurbVars(su2double velMag, su2double density, su2double lamVisc,
su2double viscRatio, bool nonDim) const;

/*!
* \brief If GetSSTFreeStreamFromOptions() is true, overwrite the free-stream k and omega (dimensional and
* non-dimensional) with GetSSTFreeStreamTurbVars, using FREESTREAM_TURB2LAMVISCRATIO.
* \note Call after the reference values are set.
* \param[in] velMag, density, lamVisc - Free-stream velocity magnitude, density and laminar viscosity.
* \param[in] velMagND, densityND, lamViscND - The same, non-dimensional.
*/
void SetSSTFreeStreamFromOptions(su2double velMag, su2double density, su2double lamVisc, su2double velMagND,
su2double densityND, su2double lamViscND);

/*!
* \brief Get parsed SA option data structure.
* \return SA option data structure.
Expand Down
13 changes: 9 additions & 4 deletions Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1129,21 +1129,22 @@ enum class SST_OPTIONS {
COMP_Wilcox, /*!< \brief Menter k-w SST model with Compressibility correction of Wilcox. */
COMP_Sarkar, /*!< \brief Menter k-w SST model with Compressibility correction of Sarkar. */
DLL, /*!< \brief Menter k-w SST model with dimensionless lower limit clipping of turbulence variables. */
TMR_FREESTREAM, /*!< \brief Free-stream omega = 10 U / SST_DOMAIN_LENGTH (NASA TMR). */
};
static const MapType<std::string, SST_OPTIONS> SST_Options_Map = {
MakePair("NONE", SST_OPTIONS::NONE)
MakePair("V1994m", SST_OPTIONS::V1994m)
MakePair("V2003m", SST_OPTIONS::V2003m)
/// TODO: For now we do not support "unmodified" versions of SST.
//MakePair("V1994", SST_OPTIONS::V1994)
//MakePair("V2003", SST_OPTIONS::V2003)
MakePair("V1994", SST_OPTIONS::V1994)
MakePair("V2003", SST_OPTIONS::V2003)
MakePair("SUSTAINING", SST_OPTIONS::SUST)
MakePair("VORTICITY", SST_OPTIONS::V)
MakePair("KATO-LAUNDER", SST_OPTIONS::KL)
MakePair("UQ", SST_OPTIONS::UQ)
MakePair("COMPRESSIBILITY-WILCOX", SST_OPTIONS::COMP_Wilcox)
MakePair("COMPRESSIBILITY-SARKAR", SST_OPTIONS::COMP_Sarkar)
MakePair("DIMENSIONLESS_LIMIT", SST_OPTIONS::DLL)
MakePair("TMR_FREESTREAM", SST_OPTIONS::TMR_FREESTREAM)
};

/*!
Expand All @@ -1158,6 +1159,8 @@ struct SST_ParsedOptions {
bool compWilcox = false; /*!< \brief Bool for compressibility correction of Wilcox. */
bool compSarkar = false; /*!< \brief Bool for compressibility correction of Sarkar. */
bool dll = false; /*!< \brief Bool dimensionless lower limit. */
bool tmrFreeStream = false; /*!< \brief Bool for the free-stream k and omega of the NASA TMR. */
bool tkeInStress = false; /*!< \brief Bool for -2/3 rho k in the stress (standard, non-UQ). */
};

/*!
Expand Down Expand Up @@ -1196,6 +1199,7 @@ 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);
const bool sst_tmrFreeStream = IsPresent(SST_OPTIONS::TMR_FREESTREAM);

if (sst_1994 && sst_2003) {
SU2_MPI::Error("Two versions (1994 and 2003) selected for SST_OPTIONS. Please choose only one.", CURRENT_FUNCTION);
Expand Down Expand Up @@ -1228,7 +1232,8 @@ inline SST_ParsedOptions ParseSSTOptions(const SST_OPTIONS *SST_Options, unsigne
SSTParsedOptions.compWilcox = sst_compWilcox;
SSTParsedOptions.compSarkar = sst_compSarkar;
SSTParsedOptions.dll = sst_dll;

SSTParsedOptions.tmrFreeStream = sst_tmrFreeStream;
SSTParsedOptions.tkeInStress = !sst_m && !sst_uq;
return SSTParsedOptions;
}

Expand Down
55 changes: 55 additions & 0 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,13 @@ void CConfig::SetConfig_Options() {
/*!\brief SST_OPTIONS \n DESCRIPTION: Specify SA turbulence model options/corrections. \n Options: see \link SA_Options_Map \endlink \n DEFAULT: NONE \ingroup Config*/
addEnumListOption("SA_OPTIONS", nSA_Options, SA_Options, SA_Options_Map);

/*!\brief SST_DOMAIN_LENGTH \n DESCRIPTION: Domain length L of SST_OPTIONS= TMR_FREESTREAM, free-stream omega = 10 U / L (m). \ingroup Config*/
addDoubleOption("SST_DOMAIN_LENGTH", sstDomainLength, 1.0);
/*!\brief SST_SUST_TKE_AMB \n DESCRIPTION: Ambient and free-stream k of SST_OPTIONS= SUSTAINING (m^2/s^2). \ingroup Config*/
addDoubleOption("SST_SUST_TKE_AMB", sstSustTkeAmb, 0.0);
/*!\brief SST_SUST_OMEGA_AMB \n DESCRIPTION: Ambient and free-stream omega of SST_OPTIONS= SUSTAINING (1/s). \ingroup Config*/
addDoubleOption("SST_SUST_OMEGA_AMB", sstSustOmegaAmb, 0.0);

/*!\brief KIND_INCOMP_SYSTEM \n DESCRIPTION: Incomp type \n OPTIONS: see \link Incomp_Map \endlink DEFAULT: NONE \ingroup Config*/
addEnumOption("KIND_INCOMP_SYSTEM", Kind_Incomp_System, Incomp_Map, INCOMP_SYSTEM::DENSITY_BASED);
/*!\brief KIND_PB_ITER \n DESCRIPTION: Kind_PBIter \n OPTIONS: see \link PBIter_Map \endlink \ingroup Config*/
Expand Down Expand Up @@ -3908,6 +3915,25 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
/*--- Postprocess SST_OPTIONS into structure. ---*/
if (Kind_Turb_Model == TURB_MODEL::SST) {
sstParsedOptions = ParseSSTOptions(SST_Options, nSST_Options, rank);

/*--- Options that set the free-stream k and omega instead of the turbulence intensity and viscosity ratio. ---*/
if (sstSustTkeAmb < 0.0 || sstSustOmegaAmb < 0.0) {
SU2_MPI::Error("SST_SUST_TKE_AMB and SST_SUST_OMEGA_AMB must be positive (0 means not set).", CURRENT_FUNCTION);
}
if ((sstSustTkeAmb > 0.0) != (sstSustOmegaAmb > 0.0)) {
SU2_MPI::Error("Set both SST_SUST_TKE_AMB and SST_SUST_OMEGA_AMB, or neither.", CURRENT_FUNCTION);
}
sstSustAmbient = (sstSustTkeAmb > 0.0) && (sstSustOmegaAmb > 0.0);
if (sstSustAmbient && !sstParsedOptions.sust) {
SU2_MPI::Error("SST_SUST_TKE_AMB and SST_SUST_OMEGA_AMB need SST_OPTIONS= SUSTAINING.", CURRENT_FUNCTION);
}
if (sstParsedOptions.tmrFreeStream && !(sstDomainLength > 0.0)) {
SU2_MPI::Error("SST_DOMAIN_LENGTH must be positive with SST_OPTIONS= TMR_FREESTREAM.", CURRENT_FUNCTION);
}
if (sstParsedOptions.tmrFreeStream && sstSustAmbient) {
SU2_MPI::Error("SST_OPTIONS= TMR_FREESTREAM and SST_SUST_TKE_AMB, SST_SUST_OMEGA_AMB both set the free-stream\n"
"k and omega. Use only one of them.", CURRENT_FUNCTION);
}
} else if (Kind_Turb_Model == TURB_MODEL::SA) {
saParsedOptions = ParseSAOptions(SA_Options, nSA_Options, rank);
}
Expand Down Expand Up @@ -10074,6 +10100,35 @@ const su2double* CConfig::GetInlet_TurbVal(const string& val_marker) const {
return &NuFactor_FreeStream;
}

std::array<su2double, 2> CConfig::GetSSTFreeStreamTurbVars(su2double velMag, su2double density, su2double lamVisc,
su2double viscRatio, bool nonDim) const {
su2double tke = sstSustTkeAmb, omega = sstSustOmegaAmb;

if (sstParsedOptions.tmrFreeStream) {
su2double length = sstDomainLength;
if (nonDim) length /= Length_Ref;
omega = 10 * velMag / length;
tke = omega * (lamVisc * viscRatio) / density;
} else if (nonDim) {
tke /= Velocity_Ref * Velocity_Ref;
omega /= Omega_Ref;
}
return {tke, omega};
}

void CConfig::SetSSTFreeStreamFromOptions(su2double velMag, su2double density, su2double lamVisc,
su2double velMagND, su2double densityND, su2double lamViscND) {
if (!GetSSTFreeStreamFromOptions()) return;

const su2double viscRatio = GetTurb2LamViscRatio_FreeStream();
const auto turbVars = GetSSTFreeStreamTurbVars(velMag, density, lamVisc, viscRatio, false);
const auto turbVarsND = GetSSTFreeStreamTurbVars(velMagND, densityND, lamViscND, viscRatio, true);
Tke_FreeStream = turbVars[0];
Omega_FreeStream = turbVars[1];
Tke_FreeStreamND = turbVarsND[0];
Omega_FreeStreamND = turbVarsND[1];
}

su2double CConfig::GetOutlet_Pressure(const string& val_marker) const {
unsigned short iMarker_Outlet;
for (iMarker_Outlet = 0; iMarker_Outlet < nMarker_Outlet; iMarker_Outlet++)
Expand Down
7 changes: 7 additions & 0 deletions SU2_CFD/include/numerics/flow/flow_diffusion.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ class CAvgGrad_Base : public CNumerics {
void AddTauWall(const su2double *UnitNormal,
su2double TauWall);

/*!
* \brief Add the -2/3 rho k part of the Boussinesq stress to the stress tensor.
* \param[in] density - Density.
* \param[in] turb_ke - Turbulent kinetic energy.
*/
void AddTkeStress(su2double density, su2double turb_ke);

/**
* \brief Calculate the Jacobian of the viscous + turbulent stress tensor
*
Expand Down
17 changes: 17 additions & 0 deletions SU2_CFD/include/numerics/turbulent/turb_sources.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,17 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
/*--- Production limiter. ---*/
const su2double prod_limit = prod_lim_const * beta_star * Density_i * ScalarVar_i[1] * ScalarVar_i[0];

/*--- The standard versions use the exact production mu_t (S^2 - 2/3 div(u)^2) - 2/3 rho k div(u), with the
div(u)^2 term only for the default strain base (not for V, KL or UQ). ---*/
const bool fullStrainBase = sstParsedOptions.production != SST_OPTIONS::V &&
sstParsedOptions.production != SST_OPTIONS::KL &&
sstParsedOptions.production != SST_OPTIONS::UQ;
su2double P = Eddy_Viscosity_i * pow(P_Base, 2);
if (!sstParsedOptions.modified) {
if (fullStrainBase) P -= Eddy_Viscosity_i * diverg * diverg * 2.0/3.0;
P -= Density_i * ScalarVar_i[0] * diverg * 2.0/3.0;
}

su2double pk = max(0.0, min(P, prod_limit));

const su2double eddy_visc_var = sstParsedOptions.version == SST_OPTIONS::V1994 ? VorticityMag : StrainMag_i;
Expand All @@ -971,6 +981,11 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
su2double pw;
if (sstParsedOptions.version == SST_OPTIONS::V1994) {
pw = alfa_blended * Density_i * pow(P_Base, 2);
/*--- Standard version: gamma/nu_t P, with rho k / mu_t = zeta. ---*/
if (!sstParsedOptions.modified) {
const su2double divTerm = fullStrainBase ? diverg : 0.0;
pw -= alfa_blended * Density_i * (divTerm + zeta) * diverg * 2.0/3.0;
}
} else {
pw = (alfa_blended * Density_i / Eddy_Viscosity_i) * pk;
}
Expand Down Expand Up @@ -1036,6 +1051,8 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
Jacobian_i[0][0] *= dk_factor;
Jacobian_i[0][1] *= dk_factor;
}
/*--- Derivative of -2/3 rho k div(u), times the LM factor of pk, only where it adds to the diagonal. ---*/
if (!sstParsedOptions.modified) Jacobian_i[0][0] -= eff_intermittency * max(diverg, 0.0) * Volume*2.0/3.0;
Jacobian_i[1][0] = 0.0;
Jacobian_i[1][1] = -2.0 * beta_blended * ScalarVar_i[1] * Volume * (1.0 - beta_star/beta_blended * zetaFMt);

Expand Down
12 changes: 10 additions & 2 deletions SU2_CFD/include/numerics_simd/flow/diffusion/viscous_fluxes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ class CCompressibleViscousFluxBase : public CNumericsSIMD {
const bool useSA_QCR;
const bool wallFun;
const bool uq;
const bool tkeInStress; /*!< \brief -2/3 rho k in the Boussinesq stress (standard SST versions without UQ). */
const bool tkeInEnergy;
const bool uq_permute;
const size_t uq_eigval_comp;
Expand All @@ -91,16 +92,16 @@ class CCompressibleViscousFluxBase : public CNumericsSIMD {
/*!
* \brief Constructor, initialize constants and booleans.
*/
template<class... Ts>
CCompressibleViscousFluxBase(const CConfig& config, int iMesh,
const CVariable* turbVars_, Ts&...) :
const CVariable* turbVars_) :
gamma(config.GetGamma()),
gasConst(config.GetGas_ConstantND()),
prandtlTurb(config.GetPrandtl_Turb()),
correct(iMesh == MESH_0),
useSA_QCR(config.GetSAParsedOptions().qcr2000),
wallFun(config.GetWall_Functions()),
uq(config.GetSSTParsedOptions().uq),
tkeInStress(config.GetSSTParsedOptions().tkeInStress),
tkeInEnergy(config.GetKind_Turb_Model() == TURB_MODEL::SST),
uq_permute(config.GetUQ_Permute()),
uq_eigval_comp(config.GetEig_Val_Comp()),
Expand Down Expand Up @@ -162,6 +163,13 @@ class CCompressibleViscousFluxBase : public CNumericsSIMD {
}

if(wallFun) addTauWall(iPoint, jPoint, solution.GetTau_Wall(), unitNormal, tau);
if(tkeInStress) {
/*--- -2/3 rho k part of the Boussinesq stress, after the wall-function scaling. ---*/
const Double turb_ke = 0.5*(gatherVariables(iPoint, turbVars->GetSolution()) +
gatherVariables(jPoint, turbVars->GetSolution()));
const Double kTerm = 2.0/3.0 * avgV.density() * turb_ke;
for (size_t iDim = 0; iDim < nDim; ++iDim) tau(iDim,iDim) -= kTerm;
}

Double cond = derived->thermalConductivity(avgV);
VectorDbl<nDim> heatFlux;
Expand Down
5 changes: 5 additions & 0 deletions SU2_CFD/include/solvers/CFVMFlowSolverBase.inl
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,11 @@ void CFVMFlowSolverBase<V, R>::SetCompressibleNonDimValues(CConfig *config, su2d
const su2double Omega_FreeStreamND =
Density_FreeStreamND*Tke_FreeStreamND/max(Viscosity_FreeStreamND*config->GetTurb2LamViscRatio_FreeStream(), EPS);
config->SetOmega_FreeStreamND(Omega_FreeStreamND);

/*--- Free-stream k and omega from SST_OPTIONS= TMR_FREESTREAM or SST_SUST_*_AMB, if set. ---*/

config->SetSSTFreeStreamFromOptions(ModVel_FreeStream, Density_FreeStream, Viscosity_FreeStream,
ModVel_FreeStreamND, Density_FreeStreamND, Viscosity_FreeStreamND);
}

template <class V, ENUM_REGIME R>
Expand Down
13 changes: 12 additions & 1 deletion SU2_CFD/src/numerics/flow/flow_diffusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,15 @@ void CAvgGrad_Base::SetStressTensor(const su2double *val_primvar,

if (sstParsedOptions.uq) {
// laminar part
// the 2/3 rho k term is already in the perturbed Reynolds stress
ComputeStressTensor(nDim, tau, val_gradprimvar+1, val_laminar_viscosity);
// add turbulent part which was perturbed
for (unsigned short iDim = 0 ; iDim < nDim; iDim++)
for (unsigned short jDim = 0 ; jDim < nDim; jDim++)
tau[iDim][jDim] += (-Density) * MeanPerturbedRSM[iDim][jDim];
} else {
const su2double total_viscosity = val_laminar_viscosity + val_eddy_viscosity;
// turb_ke is not considered in the stress tensor, see #797
// turb_ke is added by AddTkeStress when tkeInStress is set, see #797
ComputeStressTensor(nDim, tau, val_gradprimvar+1, total_viscosity, Density, su2double(0.0));
}

Expand Down Expand Up @@ -198,6 +199,13 @@ void CAvgGrad_Base::AddTauWall(const su2double *UnitNormal,
tau[iDim][jDim] *= Scale;
}

void CAvgGrad_Base::AddTkeStress(const su2double density, const su2double turb_ke) {

const su2double kTerm = 2.0/3.0 * density * turb_ke;
for (auto iDim = 0u; iDim < nDim; iDim++)
tau[iDim][iDim] -= kTerm;
}

void CAvgGrad_Base::SetTauJacobian(const su2double *val_Mean_PrimVar,
const su2double val_laminar_viscosity,
const su2double val_eddy_viscosity,
Expand Down Expand Up @@ -484,6 +492,7 @@ CNumerics::ResidualType<> CAvgGrad_Flow::ComputeResidual(const CConfig* config)
AddQCR(nDim, &Mean_GradPrimVar[1], tau, turb_fraction);
}
if (Mean_TauWall > 0) AddTauWall(UnitNormal, Mean_TauWall);
if (sstParsedOptions.tkeInStress) AddTkeStress(Mean_PrimVar[nDim+2], Mean_turb_ke);

SetHeatFluxVector(Mean_GradPrimVar, Mean_Eddy_Viscosity, Mean_Thermal_Conductivity, Mean_Cp);

Expand Down Expand Up @@ -668,6 +677,7 @@ CNumerics::ResidualType<> CAvgGradInc_Flow::ComputeResidual(const CConfig* confi
AddQCR(nDim, &Mean_GradPrimVar[1], tau, turb_fraction);
}
if (Mean_TauWall > 0) AddTauWall(UnitNormal, Mean_TauWall);
if (sstParsedOptions.tkeInStress) AddTkeStress(Mean_PrimVar[nDim+2], Mean_turb_ke);

GetViscousIncProjFlux(Mean_GradPrimVar, Normal, Mean_Thermal_Conductivity);

Expand Down Expand Up @@ -1002,6 +1012,7 @@ CNumerics::ResidualType<> CGeneralAvgGrad_Flow::ComputeResidual(const CConfig* c
AddQCR(nDim, &Mean_GradPrimVar[1], tau, turb_fraction);
}
if (Mean_TauWall > 0) AddTauWall(UnitNormal, Mean_TauWall);
if (sstParsedOptions.tkeInStress) AddTkeStress(Mean_PrimVar[nDim+2], Mean_turb_ke);

SetHeatFluxVector(Mean_GradPrimVar, Mean_Eddy_Viscosity, Mean_Thermal_Conductivity, Mean_Cp);

Expand Down
3 changes: 3 additions & 0 deletions SU2_CFD/src/numerics/flow/flow_sources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ void CSourceAxisymmetric_Flow::ResidualDiffusion(){
-v*yinv))
+total_conductivity_i*PrimVar_Grad_i[0][1])
-TWO3*(AuxVar_Grad_i[1][1]+AuxVar_Grad_i[2][0]));

/*--- Work of the -2/3 rho k part of the radial normal stress. ---*/
if (sstParsedOptions.tkeInStress) residual[3] += Volume*yinv*v*TWO3*U_i[0]*turb_ke_i;
}


Expand Down
9 changes: 8 additions & 1 deletion SU2_CFD/src/solvers/CAdjNSSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,9 @@ void CAdjNSSolver::Viscous_Sensitivity(CGeometry *geometry, CSolver **solver_con
dp_drv, dp_drw, dp_drE, dH_dr, dH_dru, dH_drv, dH_drw, dH_drE, H, D[3][3], Dd[3], Mach_Inf, eps, scale = 1.0,
RefVel2, RefDensity, Mach2Vel, *Velocity_Inf, factor;

const bool tkeInStress = config->GetSSTParsedOptions().tkeInStress;
const auto* Node_Turb = tkeInStress ? solver_container[TURB_SOL]->GetNodes() : nullptr;

auto *USens = new su2double[nVar];
auto *UnitNormal = new su2double[nDim];
auto *normal_grad_vel = new su2double[nDim];
Expand Down Expand Up @@ -764,9 +767,13 @@ void CAdjNSSolver::Viscous_Sensitivity(CGeometry *geometry, CSolver **solver_con
Enthalpy = solver_container[FLOW_SOL]->GetNodes()->GetEnthalpy(iPoint);

/*--- Turbulent kinetic energy ---*/
// turb_ke is not considered in the stress tensor, see #797
// turb_ke is added below when tkeInStress is set, see #797
val_turb_ke = 0.0;
CNumerics::ComputeStressTensor(nDim, tau, PrimVar_Grad+1, Laminar_Viscosity, Density, val_turb_ke);
if (tkeInStress) {
for (iDim = 0; iDim < nDim; iDim++)
tau[iDim][iDim] -= 2.0/3.0 * Density * Node_Turb->GetSolution(iPoint, 0);
}

/*--- Form normal_grad_gridvel = \partial_n (u_omega) ---*/

Expand Down
Loading