Skip to content
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

Change lower limit of SST variables #2323

Merged
merged 17 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
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
14 changes: 14 additions & 0 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,8 @@ class CConfig {
ReThetaT_FreeStream, /*!< \brief Freestream Transition Momentum Thickness Reynolds Number (for LM transition model) of the fluid. */
NuFactor_FreeStream, /*!< \brief Ratio of turbulent to laminar viscosity. */
NuFactor_Engine, /*!< \brief Ratio of turbulent to laminar viscosity at the engine. */
KFactor_LowerLimit, /*!< \Non dimensional coefficient for lower limit of K in SST model. */
OmegaFactor_LowerLimit, /*!< \Non dimensional coefficient for lower limit of omega in SST model. */
SecondaryFlow_ActDisk, /*!< \brief Ratio of turbulent to laminar viscosity at the actuator disk. */
Initial_BCThrust, /*!< \brief Ratio of turbulent to laminar viscosity at the actuator disk. */
Pressure_FreeStream, /*!< \brief Total pressure of the fluid. */
Expand Down Expand Up @@ -2008,6 +2010,18 @@ class CConfig {
*/
su2double GetNuFactor_FreeStream(void) const { return NuFactor_FreeStream; }

/*!
* \brief Get the k constant factor define a lower limit by multiplication with values in SST turbulencemodel.
emaberman marked this conversation as resolved.
Show resolved Hide resolved
* \return Non-dimensionalized freestream intensity.
*/
su2double GetKFactor_LowerLimit(void) const { return KFactor_LowerLimit; }

/*!
* \brief Get the w constant factor define a lower limit by multiplication with values in SST turbulencemodel.
emaberman marked this conversation as resolved.
Show resolved Hide resolved
* \return Non-dimensionalized freestream intensity.
*/
su2double GetOmegaFactor_LowerLimit(void) const { return OmegaFactor_LowerLimit; }

/*!
* \brief Get the value of the non-dimensionalized engine turbulence intensity.
* \return Non-dimensionalized engine intensity.
Expand Down
4 changes: 4 additions & 0 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,10 @@ void CConfig::SetConfig_Options() {
/* DESCRIPTION: */
addDoubleOption("FREESTREAM_NU_FACTOR", NuFactor_FreeStream, 3.0);
/* DESCRIPTION: */
addDoubleOption("LOWER_LIMIT_K_FACTOR", KFactor_LowerLimit, 1.0e-20);
/* DESCRIPTION: */
addDoubleOption("LOWER_LIMIT_OMEGA_FACTOR", OmegaFactor_LowerLimit, 1e-06);
/* DESCRIPTION: */
addDoubleOption("ENGINE_NU_FACTOR", NuFactor_Engine, 3.0);
/* DESCRIPTION: */
addDoubleOption("ACTDISK_SECONDARY_FLOW", SecondaryFlow_ActDisk, 0.0);
Expand Down
20 changes: 13 additions & 7 deletions SU2_CFD/src/solvers/CTurbSSTSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh
constants[5] = 0.0828; //beta_2
constants[6] = 0.09; //betaStar
constants[7] = 0.31; //a1

emaberman marked this conversation as resolved.
Show resolved Hide resolved
if (sstParsedOptions.version == SST_OPTIONS::V1994){
constants[8] = constants[4]/constants[6] - constants[2]*0.41*0.41/sqrt(constants[6]); //alfa_1
constants[9] = constants[5]/constants[6] - constants[3]*0.41*0.41/sqrt(constants[6]); //alfa_2
Expand All @@ -108,12 +108,6 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh
constants[9] = 0.44; //gamma_2
constants[10] = 10.0; // production limiter constant
}
/*--- Initialize lower and upper limits---*/
lowerlimit[0] = 1.0e-10;
upperlimit[0] = 1.0e10;

lowerlimit[1] = 1.0e-4;
upperlimit[1] = 1.0e15;

/*--- Far-field flow state quantities and initialization. ---*/
su2double rhoInf, *VelInf, muLamInf, Intensity, viscRatio, muT_Inf;
Expand All @@ -129,6 +123,18 @@ CTurbSSTSolver::CTurbSSTSolver(CGeometry *geometry, CConfig *config, unsigned sh
su2double kine_Inf = 3.0/2.0*(VelMag2*Intensity*Intensity);
su2double omega_Inf = rhoInf*kine_Inf/(muLamInf*viscRatio);

/*--- Constants to use for lower limit of turbulence variable. ---*/
su2double Ck = config->GetKFactor_LowerLimit();
su2double Cw = config->GetOmegaFactor_LowerLimit();

/*--- Initialize lower and upper limits---*/
emaberman marked this conversation as resolved.
Show resolved Hide resolved
lowerlimit[0] = Ck * kine_Inf;
upperlimit[0] = 1.0e10;

lowerlimit[1] = Cw * omega_Inf;
upperlimit[1] = 1.0e15;


emaberman marked this conversation as resolved.
Show resolved Hide resolved
Solution_Inf[0] = kine_Inf;
Solution_Inf[1] = omega_Inf;

Expand Down
4 changes: 4 additions & 0 deletions config_template.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,10 @@ TIME_DISCRE_TURB= EULER_IMPLICIT
% Reduction factor of the CFL coefficient in the turbulence problem
CFL_REDUCTION_TURB= 1.0

% Control lower limit constants of the SST model (C*phi_infinity)
LOWER_LIMIT_K_FACTOR= 1e-20
LOWER_LIMIT_OMEGA_FACTOR= 1e-6

% --------------------- HEAT NUMERICAL METHOD DEFINITION ----------------------%
%
% Value of the thermal diffusivity
Expand Down