Skip to content

Commit e260cc4

Browse files
author
rois1995
committed
- Removed unused functions
- Rearrenged and renamed outputs
1 parent 177276a commit e260cc4

File tree

5 files changed

+22
-52
lines changed

5 files changed

+22
-52
lines changed

SU2_CFD/include/variables/CTurbVariable.hpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ class CTurbVariable : public CScalarVariable {
4444
static constexpr size_t MAXNVAR = 2;
4545
VectorType turb_index; /*!< \brief Value of the turbulence index for transition simulations. */
4646
VectorType intermittency; /*!< \brief Value of the intermittency for the transition model. */
47-
VectorType SRSGridSize; /*!< \brief alue of the desired grid size for Scale Resolving Simulations. */
4847
VectorType Vortex_Tilting;
4948

5049
/*!
@@ -102,20 +101,6 @@ class CTurbVariable : public CScalarVariable {
102101
* \param[in] val_intermittency - New value of the intermittency.
103102
*/
104103
inline void SetIntermittency(unsigned long iPoint, su2double val_intermittency) final { intermittency(iPoint) = val_intermittency; }
105-
106-
/*!
107-
* \brief Get the desired grid size for Scale Resolving Simulations.
108-
* \param[in] iPoint - Point index.
109-
* \return the value of the desired grid size for Scale Resolving Simulations.
110-
*/
111-
inline su2double GetSRSGridSize(unsigned long iPoint) const final { return SRSGridSize(iPoint); }
112-
113-
/*!
114-
* \brief Set the value of the desired grid size for Scale Resolving Simulations.
115-
* \param[in] iPoint - Point index.
116-
* \param[in] val_muT - Value of the desired grid size for Scale Resolving Simulations.
117-
*/
118-
inline void SetSRSGridSize(unsigned long iPoint, su2double val_gridSize) final { SRSGridSize(iPoint) = val_gridSize; }
119104

120105
/*!
121106
* \brief Get the DES length scale

SU2_CFD/include/variables/CVariable.hpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,18 +1721,6 @@ class CVariable {
17211721
*/
17221722
inline virtual void SetmuT(unsigned long iPoint, su2double val_muT) {}
17231723

1724-
/*!
1725-
* \brief Get the value of the desired grid size for Scale Resolving Simulations.
1726-
* \return the value of the desired grid size for Scale Resolving Simulations.
1727-
*/
1728-
inline virtual su2double GetSRSGridSize(unsigned long iPoint) const { return 0.0; }
1729-
1730-
/*!
1731-
* \brief Set the value of the desired grid size for Scale Resolving Simulations.
1732-
* \param[in] val_gridSize
1733-
*/
1734-
inline virtual void SetSRSGridSize(unsigned long iPoint, su2double val_gridSize) {}
1735-
17361724
/*!
17371725
* \brief Set the value of the turbulence index.
17381726
* \param[in] val_turb_index - turbulence index

SU2_CFD/src/output/CFlowOutput.cpp

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,6 +1484,8 @@ void CFlowOutput::SetVolumeOutputFieldsScalarMisc(const CConfig* config) {
14841484
AddVolumeOutput("DES_LENGTHSCALE", "DES_LengthScale", "DDES", "DES length scale value");
14851485
AddVolumeOutput("WALL_DISTANCE", "Wall_Distance", "DDES", "Wall distance value");
14861486
AddVolumeOutput("LESIQ", "LESIQ", "DDES", "LESIQ index for SRS simulations");
1487+
if (config->GetKind_Turb_Model() == TURB_MODEL::SST)
1488+
AddVolumeOutput("SRS_GRID_SIZE", "Srs_grid_size", "DDES", "desired grid size for Scale Resolving Simulations");
14871489
}
14881490

14891491
if (config->GetViscous()) {
@@ -1498,27 +1500,24 @@ void CFlowOutput::SetVolumeOutputFieldsScalarMisc(const CConfig* config) {
14981500
if (config->GetKind_HybridRANSLES() == NO_HYBRIDRANSLES) {
14991501
AddVolumeOutput("WALL_DISTANCE", "Wall_Distance", "DEBUG", "Wall distance value");
15001502
}
1501-
AddVolumeOutput("GRAD_VEL_XX", "Grad_Vel_xx", "DEBUG", "Strain magnitude value");
1502-
AddVolumeOutput("GRAD_VEL_XY", "Grad_Vel_xy", "DEBUG", "Strain magnitude value");
1503-
AddVolumeOutput("GRAD_VEL_YX", "Grad_Vel_yx", "DEBUG", "Strain magnitude value");
1504-
AddVolumeOutput("GRAD_VEL_YY", "Grad_Vel_yy", "DEBUG", "Strain magnitude value");
1503+
AddVolumeOutput("GRAD_VEL_XX", "Grad_Vel_xx", "VELOCITY_GRADIENT", "X-Gradient of U");
1504+
AddVolumeOutput("GRAD_VEL_XY", "Grad_Vel_xy", "VELOCITY_GRADIENT", "Y-Gradient of U");
1505+
AddVolumeOutput("GRAD_VEL_YX", "Grad_Vel_yx", "VELOCITY_GRADIENT", "X-Gradient of U");
1506+
AddVolumeOutput("GRAD_VEL_YY", "Grad_Vel_yy", "VELOCITY_GRADIENT", "Y-Gradient of V");
15051507
if (nDim == 3) {
1506-
AddVolumeOutput("GRAD_VEL_XZ", "Grad_Vel_xz", "DEBUG", "Strain magnitude value");
1507-
AddVolumeOutput("GRAD_VEL_YZ", "Grad_Vel_yz", "DEBUG", "Strain magnitude value");
1508-
AddVolumeOutput("GRAD_VEL_ZX", "Grad_Vel_zx", "DEBUG", "Strain magnitude value");
1509-
AddVolumeOutput("GRAD_VEL_ZY", "Grad_Vel_zy", "DEBUG", "Strain magnitude value");
1510-
AddVolumeOutput("GRAD_VEL_ZZ", "Grad_Vel_zz", "DEBUG", "Strain magnitude value");
1508+
AddVolumeOutput("GRAD_VEL_XZ", "Grad_Vel_xz", "VELOCITY_GRADIENT", "Z-Gradient of U");
1509+
AddVolumeOutput("GRAD_VEL_YZ", "Grad_Vel_yz", "VELOCITY_GRADIENT", "Z-Gradient of V");
1510+
AddVolumeOutput("GRAD_VEL_ZX", "Grad_Vel_zx", "VELOCITY_GRADIENT", "X-Gradient of W");
1511+
AddVolumeOutput("GRAD_VEL_ZY", "Grad_Vel_zy", "VELOCITY_GRADIENT", "Y-Gradient of W");
1512+
AddVolumeOutput("GRAD_VEL_ZZ", "Grad_Vel_zz", "VELOCITY_GRADIENT", "Z-Gradient of W");
15111513
}
15121514

15131515
if (config->GetKind_Turb_Model() == TURB_MODEL::SST){
1514-
AddVolumeOutput("CDkw", "CDkw", "DEBUG", "Cross-Diffusion term");
1515-
AddVolumeOutput("F1", "F1", "DEBUG", "F1 blending function");
1516-
AddVolumeOutput("F2", "F2", "DEBUG", "F2 blending function");
1516+
AddVolumeOutput("CDkw", "CDkw", "SST_QUANTITIES", "Cross-Diffusion term");
1517+
AddVolumeOutput("F1", "F1", "SST_QUANTITIES", "F1 blending function");
1518+
AddVolumeOutput("F2", "F2", "SST_QUANTITIES", "F2 blending function");
15171519
}
15181520

1519-
if (config->GetKind_Turb_Model() != TURB_MODEL::NONE)
1520-
AddVolumeOutput("SRS_GRID_SIZE", "Srs_grid_size", "DDES", "desired grid size for Scale Resolving Simulations");
1521-
15221521
}
15231522

15241523
// Timestep info
@@ -1554,6 +1553,7 @@ void CFlowOutput::LoadVolumeDataScalar(const CConfig* config, const CSolver* con
15541553
}
15551554
SetVolumeOutputValue("Q_CRITERION", iPoint, GetQCriterion(VelGrad));
15561555
SetVolumeOutputValue("WALL_DISTANCE", iPoint, Node_Geo->GetWall_Distance(iPoint));
1556+
15571557
SetVolumeOutputValue("GRAD_VEL_XX", iPoint, VelGrad(0,0));
15581558
SetVolumeOutputValue("GRAD_VEL_XY", iPoint, VelGrad(0,1));
15591559
SetVolumeOutputValue("GRAD_VEL_YX", iPoint, VelGrad(1,0));
@@ -1572,9 +1572,6 @@ void CFlowOutput::LoadVolumeDataScalar(const CConfig* config, const CSolver* con
15721572
SetVolumeOutputValue("F2", iPoint, Node_Turb->GetF2blending(iPoint));
15731573
}
15741574

1575-
if (config->GetKind_Turb_Model() != TURB_MODEL::NONE)
1576-
SetVolumeOutputValue("SRS_GRID_SIZE", iPoint, Node_Turb->GetSRSGridSize(iPoint));
1577-
15781575
}
15791576

15801577
const bool limiter = (config->GetKind_SlopeLimit_Turb() != LIMITER::NONE);
@@ -1634,6 +1631,13 @@ void CFlowOutput::LoadVolumeDataScalar(const CConfig* config, const CSolver* con
16341631
const su2double mu = Node_Flow->GetLaminarViscosity(iPoint);
16351632
const su2double LESIQ = 1.0/(1.0+0.05*pow((mut+mu)/mu, 0.53));
16361633
SetVolumeOutputValue("LESIQ", iPoint, LESIQ);
1634+
if (config->GetKind_Turb_Model() == TURB_MODEL::SST) {
1635+
const su2double betaStar = 0.09; // constants[6]
1636+
const su2double RANSLength = sqrt(Node_Flow->GetSolution(iPoint, 0)) / max(1e-20, (betaStar * Node_Flow->GetSolution(iPoint, 1)));
1637+
const su2double RatioL = 0.1; // TODO:: it should be less or equal than 0.2 - 0.1. Should be taken as input from config?
1638+
const su2double SRSGridSize = RANSLength * RatioL;
1639+
SetVolumeOutputValue("SRS_GRID_SIZE", iPoint, SRSGridSize);
1640+
}
16371641
}
16381642

16391643
switch (config->GetKind_Species_Model()) {

SU2_CFD/src/solvers/CTurbSSTSolver.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,6 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai
282282

283283
nodes->SetmuT(iPoint, muT);
284284

285-
// Now compute desired cell size for Scale Resolving Simulations
286-
const su2double RANSLength = sqrt(nodes->GetSolution(iPoint, 0)) / max(1e-20, (constants[6] * nodes->GetSolution(iPoint, 1)));
287-
const su2double RatioL = 0.1; // it should be less or equal than 0.2 - 0.1. Should be taken as input from config?
288-
const su2double SRSGridSize = RANSLength * RatioL;
289-
nodes->SetSRSGridSize(iPoint, SRSGridSize);
290-
291285
}
292286
END_SU2_OMP_FOR
293287

SU2_CFD/src/variables/CTurbVariable.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ CTurbVariable::CTurbVariable(unsigned long npoint, unsigned long ndim, unsigned
3737
intermittency.resize(nPoint) = su2double(1.0);
3838

3939
DES_LengthScale.resize(nPoint) = su2double(0.0);
40-
SRSGridSize.resize(nPoint) = su2double(0.0);
4140

4241
Vortex_Tilting.resize(nPoint);
4342

0 commit comments

Comments
 (0)