Skip to content

Commit f193796

Browse files
author
rois1995
committed
- Added SST-EDDES formulation for unstructured grids
1 parent 7e57afe commit f193796

File tree

2 files changed

+67
-2
lines changed

2 files changed

+67
-2
lines changed

Common/include/option_structure.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,8 @@ enum ENUM_HYBRIDRANSLES {
14801480
SST_DDES = 6, /*!< \brief Kind of Hybrid RANS/LES (SST - Delayed DES (DDES): DDES). */
14811481
SST_IDDES = 7, /*!< \brief Kind of Hybrid RANS/LES (SST - Delayed DES (DDES): Improved DDES). */
14821482
SST_SIDDES = 8, /*!< \brief Kind of Hybrid RANS/LES (SST - Delayed DES (DDES): Simplified Improved DDES). */
1483-
SST_EDDES = 9 /*!< \brief Kind of Hybrid RANS/LES (SST - Delayed DES (DDES): Enhanced (SLA) DDES). */
1483+
SST_EDDES = 9, /*!< \brief Kind of Hybrid RANS/LES (SST - Delayed DES (DDES): Enhanced (SLA) DDES). */
1484+
SST_EDDES_UNSTR = 10 /*!< \brief Kind of Hybrid RANS/LES (SST - Delayed DES (DDES): Enhanced (SLA) DDES). */
14841485
};
14851486
static const MapType<std::string, ENUM_HYBRIDRANSLES> HybridRANSLES_Map = {
14861487
MakePair("NONE", NO_HYBRIDRANSLES)
@@ -1493,6 +1494,7 @@ static const MapType<std::string, ENUM_HYBRIDRANSLES> HybridRANSLES_Map = {
14931494
MakePair("SST_IDDES", SST_IDDES)
14941495
MakePair("SST_SIDDES", SST_SIDDES)
14951496
MakePair("SST_EDDES", SST_EDDES)
1497+
MakePair("SST_EDDES_UNSTR", SST_EDDES_UNSTR)
14961498
};
14971499

14981500
/*!

SU2_CFD/src/solvers/CTurbSSTSolver.cpp

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ void CTurbSSTSolver::Preprocessing(CGeometry *geometry, CSolver **solver_contain
208208

209209
/*--- Set the vortex tilting coefficient at every node if required ---*/
210210

211-
if (kind_hybridRANSLES == SST_EDDES){
211+
if (kind_hybridRANSLES == SST_EDDES || kind_hybridRANSLES == SST_EDDES_UNSTR){
212212
auto* flowNodes = su2staticcast_p<CFlowVariable*>(solver_container[FLOW_SOL]->GetNodes());
213213

214214
SU2_OMP_FOR_STAT(omp_chunk_size)
@@ -1076,6 +1076,9 @@ void CTurbSSTSolver::SetDES_LengthScale(CSolver **solver, CGeometry *geometry, C
10761076
SU2_OMP_FOR_STAT(omp_chunk_size)
10771077
for (unsigned long iPoint = 0; iPoint < nPoint; iPoint++){
10781078

1079+
const auto coord_i = geometry->nodes->GetCoord(iPoint);
1080+
const auto nNeigh = geometry->nodes->GetnPoint(iPoint);
1081+
10791082
const su2double StrainMag = max(flowNodes->GetStrainMag(iPoint), 1e-12);
10801083
const auto Vorticity = flowNodes->GetVorticity(iPoint);
10811084
const su2double VortMag = max(GeometryToolbox::Norm(3, Vorticity), 1e-12);
@@ -1176,6 +1179,66 @@ void CTurbSSTSolver::SetDES_LengthScale(CSolver **solver, CGeometry *geometry, C
11761179

11771180
su2double vortexTiltingMeasure = nodes->GetVortex_Tilting(iPoint);
11781181

1182+
const su2double omega = GeometryToolbox::Norm(3, Vorticity);
1183+
1184+
su2double ratioOmega[MAXNDIM] = {};
1185+
1186+
for (auto iDim = 0u; iDim < MAXNDIM; iDim++){
1187+
ratioOmega[iDim] = Vorticity[iDim]/omega;
1188+
}
1189+
1190+
const su2double deltaDDES = geometry->nodes->GetMaxLength(iPoint);
1191+
1192+
su2double ln_max = 0.0;
1193+
for (const auto jPoint : geometry->nodes->GetPoints(iPoint)) {
1194+
const auto coord_j = geometry->nodes->GetCoord(jPoint);
1195+
su2double delta[MAXNDIM] = {};
1196+
for (auto iDim = 0u; iDim < nDim; iDim++){
1197+
delta[iDim] = fabs(coord_j[iDim] - coord_i[iDim]);
1198+
}
1199+
su2double ln[3];
1200+
ln[0] = delta[1]*ratioOmega[2] - delta[2]*ratioOmega[1];
1201+
ln[1] = delta[2]*ratioOmega[0] - delta[0]*ratioOmega[2];
1202+
ln[2] = delta[0]*ratioOmega[1] - delta[1]*ratioOmega[0];
1203+
const su2double aux_ln = sqrt(ln[0]*ln[0] + ln[1]*ln[1] + ln[2]*ln[2]);
1204+
ln_max = max(ln_max, aux_ln);
1205+
vortexTiltingMeasure += nodes->GetVortex_Tilting(jPoint);
1206+
}
1207+
vortexTiltingMeasure /= (nNeigh + 1);
1208+
1209+
1210+
1211+
const su2double f_kh = max(f_min,
1212+
min(f_max,
1213+
f_min + ((f_max - f_min)/(a2 - a1)) * (vortexTiltingMeasure - a1)));
1214+
1215+
const su2double r_d = (eddyVisc + lamVisc) / max((KolmConst2*wallDist2 * sqrt(0.5 * (StrainMag*StrainMag + VortMag*VortMag))), 1e-10);
1216+
const su2double C_d1 = 20.0;
1217+
const su2double C_d2 = 3.0;
1218+
1219+
const su2double f_d = 1 - tanh(pow(C_d1 * r_d, C_d2));
1220+
1221+
su2double delta = (ln_max/sqrt(3.0)) * f_kh;
1222+
if (f_d < 0.99){
1223+
delta = h_max;
1224+
}
1225+
1226+
const su2double l_LES = C_DES * delta;
1227+
DES_lengthScale = l_RANS - f_d * max(0.0, l_RANS - l_LES);
1228+
}
1229+
case SST_EDDES_UNSTR: {
1230+
1231+
// Improved DDES version with the Shear-Layer-Adapted augmentation
1232+
// found in Detached Eddy Simulation: Recent Development and Application to Compressor Tip Leakage Flow, Xiao He, Fanzhou Zhao, Mehdi Vahdati
1233+
// originally from Application of SST-Based SLA-DDES Formulation to Turbomachinery Flows, Guoping Xia, Zifei Yin and Gorazd Medic
1234+
// I could be naming it either as SST_EDDES to follow the same notation as for the SA model or as SST_SLA_DDES to follow the paper notation
1235+
1236+
const su2double f_max = 1.0, f_min = 0.1, a1 = 0.15, a2 = 0.3;
1237+
1238+
const auto nNeigh = geometry->nodes->GetnPoint(iPoint);
1239+
1240+
su2double vortexTiltingMeasure = nodes->GetVortex_Tilting(iPoint);
1241+
11791242
su2double deltaOmega = -1.0;
11801243
su2double vorticityDir[MAXNDIM] = {};
11811244

0 commit comments

Comments
 (0)