Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Amit Sachdeva
Ana Lourenco
Andrew Burkett
Andrew Wendorff
Angelo Passariello
Aniket C. Aranake
Antonio Rubino
Arne Bachmann
Expand Down
15 changes: 6 additions & 9 deletions SU2_CFD/include/numerics/CNumerics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,8 @@ class CNumerics {
su2double
lesMode_i = 0.0, /*!< \brief LES sensor at point i for hybrid RANS-LES methods. */
lesMode_j = 0.0; /*!< \brief LES sensor at point j for hybrid RANS-LES methods. */
unsigned short
sbsInBox_i = 0, /*!< \brief Sensor to assess if point i lies inside the box where the Stochastic Backscatter Model is active. */
sbsInBox_j = 0; /*!< \brief Sensor to assess if point j lies inside the box where the Stochastic Backscatter Model is active. */
int8_t
sbsInBox_i = 0; /*!< \brief Sensor to assess if point i lies inside the box where the Stochastic Backscatter Model is active. */
SST_ParsedOptions sstParsedOptions; /*!< \brief additional options for the SST turbulence model */
unsigned short Eig_Val_Comp; /*!< \brief Component towards which perturbation is perfromed */
su2double uq_delta_b; /*!< \brief Magnitude of perturbation */
Expand Down Expand Up @@ -651,7 +650,7 @@ class CNumerics {
}
}
}

/*!
* \brief Compute a random contribution to the Reynolds stress tensor (Stochastic Backscatter Model).
* \details See: Kok, Johan C. "A stochastic backscatter model for grey-area mitigation in detached
Expand All @@ -664,12 +663,12 @@ class CNumerics {
* \param[out] stochReynStress - Stochastic tensor (to be added to the Reynolds stress tensor).
*/
template<class Vec, class Mat>
inline void ComputeStochReynStress(su2double density, su2double tke, const Vec& rndVec,
inline void ComputeStochReynStress(su2double density, su2double tke, const Vec& rndVec,
su2double Cmag, Mat& stochReynStress) {

/* --- Calculate stochastic tensor --- */

su2double stochLim = 3.0;
su2double stochLim = 3.0;

stochReynStress[0][0] = 0.0;
stochReynStress[1][1] = 0.0;
Expand Down Expand Up @@ -918,11 +917,9 @@ class CNumerics {
/*!
* \brief Set the sensor to locate the box where the Stochastic Backscatter Model is active.
* \param[in] val_sbsInBox_i - 1 if point i lies inside the box where the model is active.
* \param[in] val_sbsInBox_j - 1 if point j lies inside the box where the model is active.
*/
inline void SetSbsInBoxSensor(unsigned short val_sbsInBox_i, unsigned short val_sbsInBox_j) {
inline void SetSbsInBoxSensor(int8_t val_sbsInBox_i) {
sbsInBox_i = val_sbsInBox_i;
sbsInBox_j = val_sbsInBox_j;
}

/*!
Expand Down
4 changes: 3 additions & 1 deletion SU2_CFD/include/numerics_simd/CNumericsSIMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ CNumericsSIMD* createCenteredNumerics(const CConfig& config, int iMesh, const CV
obj = new CLaxScheme<ViscousDecorator>(config, iMesh, turbVars);
break;
case CENTERED::JST:
case CENTERED::LD2: // Just to silence compiler warnings (LD2 implemented in the incompressible solver only).
obj = new CJSTScheme<ViscousDecorator>(config, iMesh, turbVars);
break;
case CENTERED::JST_KE:
Expand All @@ -83,6 +82,9 @@ CNumericsSIMD* createCenteredNumerics(const CConfig& config, int iMesh, const CV
case CENTERED::JST_MAT:
obj = new CJSTmatScheme<ViscousDecorator>(config, iMesh, turbVars);
break;
case CENTERED::LD2:
/*--- LD2 implemented only in the incompressible solver. ---*/
break;
}
return obj;
}
Expand Down
1 change: 0 additions & 1 deletion SU2_CFD/include/variables/CVariable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <cmath>
#include <iostream>
#include <cstdlib>
#include <random>

#include "../../../Common/include/CConfig.hpp"
#include "../../../Common/include/containers/container_decorators.hpp"
Expand Down
6 changes: 3 additions & 3 deletions SU2_CFD/src/numerics/flow/flow_diffusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ CNumerics::ResidualType<> CAvgGrad_Flow::ComputeResidual(const CConfig* config)
/*--- Get projected flux tensor (viscous residual) ---*/

SetStressTensor(Mean_PrimVar, Mean_GradPrimVar, Mean_turb_ke,
Mean_Laminar_Viscosity, Mean_Eddy_Viscosity,config);
Mean_Laminar_Viscosity, Mean_Eddy_Viscosity, config);
if (config->GetSAParsedOptions().qcr2000) AddQCR(nDim, &Mean_GradPrimVar[1], tau);
if (Mean_TauWall > 0) AddTauWall(UnitNormal, Mean_TauWall);

Expand Down Expand Up @@ -655,7 +655,7 @@ CNumerics::ResidualType<> CAvgGradInc_Flow::ComputeResidual(const CConfig* confi
/*--- Get projected flux tensor (viscous residual) ---*/

SetStressTensor(Mean_PrimVar, Mean_GradPrimVar, Mean_turb_ke,
Mean_Laminar_Viscosity, Mean_Eddy_Viscosity,config);
Mean_Laminar_Viscosity, Mean_Eddy_Viscosity, config);
if (config->GetSAParsedOptions().qcr2000) AddQCR(nDim, &Mean_GradPrimVar[1], tau);
if (Mean_TauWall > 0) AddTauWall(UnitNormal, Mean_TauWall);

Expand Down Expand Up @@ -985,7 +985,7 @@ CNumerics::ResidualType<> CGeneralAvgGrad_Flow::ComputeResidual(const CConfig* c
/*--- Get projected flux tensor (viscous residual) ---*/

SetStressTensor(Mean_PrimVar, Mean_GradPrimVar, Mean_turb_ke,
Mean_Laminar_Viscosity, Mean_Eddy_Viscosity,config);
Mean_Laminar_Viscosity, Mean_Eddy_Viscosity, config);
if (config->GetSAParsedOptions().qcr2000) AddQCR(nDim, &Mean_GradPrimVar[1], tau);
if (Mean_TauWall > 0) AddTauWall(UnitNormal, Mean_TauWall);

Expand Down
36 changes: 18 additions & 18 deletions SU2_CFD/src/output/CFlowOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4136,19 +4136,19 @@ void CFlowOutput::SetTimeAveragedFields(const CConfig *config) {
}

if (config->GetKind_Turb_Model() != TURB_MODEL::NONE) {
AddVolumeOutput("MODELED_REYNOLDS_STRESS_11", "ModeledReynoldsStress_11", "TIME_AVERAGE", "Modeled Reynolds stress xx-component");
AddVolumeOutput("MODELED_REYNOLDS_STRESS_22", "ModeledReynoldsStress_22", "TIME_AVERAGE", "Modeled Reynolds stress yy-component");
AddVolumeOutput("MODELED_REYNOLDS_STRESS_12", "ModeledReynoldsStress_12", "TIME_AVERAGE", "Modeled Reynolds stress xy-component");
AddVolumeOutput("MODELED_REYNOLDS_STRESS_XX", "ModeledReynoldsStress_XX", "TIME_AVERAGE", "Modeled Reynolds stress xx-component");
AddVolumeOutput("MODELED_REYNOLDS_STRESS_YY", "ModeledReynoldsStress_YY", "TIME_AVERAGE", "Modeled Reynolds stress yy-component");
AddVolumeOutput("MODELED_REYNOLDS_STRESS_XY", "ModeledReynoldsStress_XY", "TIME_AVERAGE", "Modeled Reynolds stress xy-component");
if (nDim == 3){
AddVolumeOutput("MODELED_REYNOLDS_STRESS_33", "ModeledReynoldsStress_33", "TIME_AVERAGE", "Modeled Reynolds stress zz-component");
AddVolumeOutput("MODELED_REYNOLDS_STRESS_13", "ModeledReynoldsStress_13", "TIME_AVERAGE", "Modeled Reynolds stress xz-component");
AddVolumeOutput("MODELED_REYNOLDS_STRESS_23", "ModeledReynoldsStress_23", "TIME_AVERAGE", "Modeled Reynolds stress yz-component");
AddVolumeOutput("MODELED_REYNOLDS_STRESS_ZZ", "ModeledReynoldsStress_ZZ", "TIME_AVERAGE", "Modeled Reynolds stress zz-component");
AddVolumeOutput("MODELED_REYNOLDS_STRESS_XZ", "ModeledReynoldsStress_XZ", "TIME_AVERAGE", "Modeled Reynolds stress xz-component");
AddVolumeOutput("MODELED_REYNOLDS_STRESS_YZ", "ModeledReynoldsStress_YZ", "TIME_AVERAGE", "Modeled Reynolds stress yz-component");
}

if (config->GetSBSParam().StochasticBackscatter) {
AddVolumeOutput("STOCHASTIC_REYNOLDS_STRESS_12", "StochasticReynoldsStress_12", "TIME_AVERAGE", "Stochastic Reynolds stress xy-component");
AddVolumeOutput("STOCHASTIC_REYNOLDS_STRESS_13", "StochasticReynoldsStress_13", "TIME_AVERAGE", "Stochastic Reynolds stress xz-component");
AddVolumeOutput("STOCHASTIC_REYNOLDS_STRESS_23", "StochasticReynoldsStress_23", "TIME_AVERAGE", "Stochastic Reynolds stress yz-component");
AddVolumeOutput("STOCHASTIC_REYNOLDS_STRESS_XY", "StochasticReynoldsStress_XY", "TIME_AVERAGE", "Stochastic Reynolds stress xy-component");
AddVolumeOutput("STOCHASTIC_REYNOLDS_STRESS_XZ", "StochasticReynoldsStress_XZ", "TIME_AVERAGE", "Stochastic Reynolds stress xz-component");
AddVolumeOutput("STOCHASTIC_REYNOLDS_STRESS_YZ", "StochasticReynoldsStress_YZ", "TIME_AVERAGE", "Stochastic Reynolds stress yz-component");
}
}
}
Expand Down Expand Up @@ -4201,16 +4201,16 @@ void CFlowOutput::LoadTimeAveragedData(unsigned long iPoint, const CVariable *No
const su2double tau_xx = nu_t * (2*vel_grad(0,0) - (2.0/3.0)*vel_div);
const su2double tau_yy = nu_t * (2*vel_grad(1,1) - (2.0/3.0)*vel_div);
const su2double tau_xy = nu_t * (vel_grad(0,1) + vel_grad(1,0));
SetAvgVolumeOutputValue("MODELED_REYNOLDS_STRESS_11", iPoint, -tau_xx);
SetAvgVolumeOutputValue("MODELED_REYNOLDS_STRESS_22", iPoint, -tau_yy);
SetAvgVolumeOutputValue("MODELED_REYNOLDS_STRESS_12", iPoint, -tau_xy);
SetAvgVolumeOutputValue("MODELED_REYNOLDS_STRESS_XX", iPoint, -tau_xx);
SetAvgVolumeOutputValue("MODELED_REYNOLDS_STRESS_YY", iPoint, -tau_yy);
SetAvgVolumeOutputValue("MODELED_REYNOLDS_STRESS_XY", iPoint, -tau_xy);
if (nDim == 3){
const su2double tau_zz = nu_t * (2*vel_grad(2,2) - (2.0/3.0)*vel_div);
const su2double tau_xz = nu_t * (vel_grad(0,2) + vel_grad(2,0));
const su2double tau_yz = nu_t * (vel_grad(1,2) + vel_grad(2,1));
SetAvgVolumeOutputValue("MODELED_REYNOLDS_STRESS_33", iPoint, -tau_zz);
SetAvgVolumeOutputValue("MODELED_REYNOLDS_STRESS_13", iPoint, -tau_xz);
SetAvgVolumeOutputValue("MODELED_REYNOLDS_STRESS_23", iPoint, -tau_yz);
SetAvgVolumeOutputValue("MODELED_REYNOLDS_STRESS_ZZ", iPoint, -tau_zz);
SetAvgVolumeOutputValue("MODELED_REYNOLDS_STRESS_XZ", iPoint, -tau_xz);
SetAvgVolumeOutputValue("MODELED_REYNOLDS_STRESS_YZ", iPoint, -tau_yz);
}

if (config->GetSBSParam().StochasticBackscatter) {
Expand All @@ -4226,9 +4226,9 @@ void CFlowOutput::LoadTimeAveragedData(unsigned long iPoint, const CVariable *No
const su2double R_xy = - mag * tke_estim * csi_z;
const su2double R_xz = + mag * tke_estim * csi_y;
const su2double R_yz = - mag * tke_estim * csi_x;
SetAvgVolumeOutputValue("STOCHASTIC_REYNOLDS_STRESS_12", iPoint, -R_xy);
SetAvgVolumeOutputValue("STOCHASTIC_REYNOLDS_STRESS_13", iPoint, -R_xz);
SetAvgVolumeOutputValue("STOCHASTIC_REYNOLDS_STRESS_23", iPoint, -R_yz);
SetAvgVolumeOutputValue("STOCHASTIC_REYNOLDS_STRESS_XY", iPoint, -R_xy);
SetAvgVolumeOutputValue("STOCHASTIC_REYNOLDS_STRESS_XY", iPoint, -R_xz);
SetAvgVolumeOutputValue("STOCHASTIC_REYNOLDS_STRESS_YZ", iPoint, -R_yz);
}
}
}
Expand Down
Loading
Loading