@@ -186,15 +186,21 @@ void CTurbSASolver::Preprocessing(CGeometry *geometry, CSolver **solver_containe
186186
187187 /* --- Set the vortex tilting coefficient at every node if required ---*/
188188
189- if (kind_hybridRANSLES == SA_EDDES || kind_hybridRANSLES == SA_EDDES_MOD ){
189+ if (kind_hybridRANSLES == SA_EDDES || kind_hybridRANSLES == SA_EDDES_UNSTR ){
190190 auto * flowNodes = su2staticcast_p<CFlowVariable*>(solver_container[FLOW_SOL]->GetNodes ());
191191
192192 SU2_OMP_FOR_STAT (omp_chunk_size)
193193 for (unsigned long iPoint = 0 ; iPoint < nPoint; iPoint++){
194+ su2double Grad_Vel[3 ][3 ] = {{0.0 }}, StrainMat[3 ][3 ] = {{0.0 }};
194195 auto Vorticity = flowNodes->GetVorticity (iPoint);
195- auto PrimGrad_Flow = flowNodes->GetGradient_Primitive (iPoint);
196+ for (unsigned short iDim = 0 ; iDim < nDim; iDim++) {
197+ for (unsigned short jDim = 0 ; jDim < nDim; jDim++) {
198+ Grad_Vel[iDim][jDim] = nodes->GetGradient_Primitive (iPoint, prim_idx.Velocity () + iDim, jDim);
199+ }
200+ }
196201 auto Laminar_Viscosity = flowNodes->GetLaminarViscosity (iPoint);
197- nodes->SetVortex_Tilting (iPoint, PrimGrad_Flow, Vorticity, Laminar_Viscosity);
202+ CNumerics::ComputeMeanRateOfStrainMatrix (3 , StrainMat, Grad_Vel);
203+ nodes->SetVortex_Tilting (iPoint, StrainMat, Vorticity, Laminar_Viscosity);
198204 }
199205 END_SU2_OMP_FOR
200206 }
@@ -1456,8 +1462,8 @@ void CTurbSASolver::SetDES_LengthScale(CSolver **solver, CGeometry *geometry, CC
14561462 pow (ratioOmega[1 ], 2 )*delta[0 ]*delta[2 ] +
14571463 pow (ratioOmega[2 ], 2 )*delta[0 ]*delta[1 ]);
14581464
1459- const su2double r_d = (kinematicViscosityTurb+kinematicViscosity)/(uijuij*k2*pow (wallDistance, 2.0 ));
1460- const su2double f_d = 1.0 -tanh (pow (8.0 *r_d,3.0 ));
1465+ const su2double r_d = (kinematicViscosityTurb+kinematicViscosity)/(uijuij*k2*pow (wallDistance, 2 ));
1466+ const su2double f_d = 1.0 -tanh (pow (8.0 *r_d,3 ));
14611467
14621468 if (f_d < 0.99 ){
14631469 maxDelta = deltaDDES;
@@ -1507,8 +1513,8 @@ void CTurbSASolver::SetDES_LengthScale(CSolver **solver, CGeometry *geometry, CC
15071513 min (f_max,
15081514 f_min + ((f_max - f_min)/(a2 - a1)) * (vortexTiltingMeasure - a1)));
15091515
1510- const su2double r_d = (kinematicViscosityTurb+kinematicViscosity)/(uijuij*k2*pow (wallDistance, 2.0 ));
1511- const su2double f_d = 1.0 -tanh (pow (8.0 *r_d,3.0 ));
1516+ const su2double r_d = (kinematicViscosityTurb+kinematicViscosity)/(uijuij*k2*pow (wallDistance, 2 ));
1517+ const su2double f_d = 1.0 -tanh (pow (8.0 *r_d,3 ));
15121518
15131519 su2double maxDelta = (ln_max/sqrt (3.0 )) * f_kh;
15141520 if (f_d < 0.999 ){
@@ -1520,7 +1526,7 @@ void CTurbSASolver::SetDES_LengthScale(CSolver **solver, CGeometry *geometry, CC
15201526
15211527 break ;
15221528 }
1523- case SA_EDDES_MOD : {
1529+ case SA_EDDES_UNSTR : {
15241530 /* --- An Enhanced Version of DES with Rapid Transition from RANS to LES in Separated Flows.
15251531 Shur et al.
15261532 Flow Turbulence Combust - 2015
@@ -1531,13 +1537,13 @@ void CTurbSASolver::SetDES_LengthScale(CSolver **solver, CGeometry *geometry, CC
15311537 const su2double omega = GeometryToolbox::Norm (3 , vorticity);
15321538
15331539 su2double ratioOmega[MAXNDIM] = {};
1534-
1535- for (auto iDim = 0 ; iDim < 3 ; iDim++){
1540+ for (auto iDim = 0 ; iDim < MAXNDIM; iDim++){
15361541 ratioOmega[iDim] = vorticity[iDim]/omega;
15371542 }
15381543
15391544 const su2double deltaDDES = geometry->nodes ->GetMaxLength (iPoint);
1540-
1545+
1546+ // Introduced correction for unstructured grids
15411547 su2double ln_max = -1 ;
15421548 for (const auto jPoint : geometry->nodes ->GetPoints (iPoint)){
15431549 const auto coord_j = geometry->nodes ->GetCoord (jPoint);
@@ -1546,13 +1552,13 @@ void CTurbSASolver::SetDES_LengthScale(CSolver **solver, CGeometry *geometry, CC
15461552 const auto coord_k = geometry->nodes ->GetCoord (kPoint );
15471553
15481554 su2double delta[MAXNDIM] = {};
1549- // This should only be performed on 3D cases anyway
1550- for ( auto iDim = 0u ; iDim < 3 ; iDim++){
1551- delta[iDim] = (coord_j[iDim] - coord_k[iDim])/2.0 ; // Should I divide by 2 as I am interested in the dual volume?
1555+ for ( auto iDim = 0u ; iDim < MAXNDIM; iDim++){
1556+ // TODO: Should I divide by 2 as I am interested in the dual volume (the edge is split at midpoint)?
1557+ delta[iDim] = (coord_j[iDim] - coord_k[iDim])/2.0 ;
15521558 }
1553- su2double l_n_minus_m[3 ];
1559+ su2double l_n_minus_m[MAXNDIM ];
15541560 GeometryToolbox::CrossProduct (delta, ratioOmega, l_n_minus_m);
1555- ln_max = max (ln_max, GeometryToolbox::Norm (nDim , l_n_minus_m));
1561+ ln_max = max (ln_max, GeometryToolbox::Norm (3 , l_n_minus_m));
15561562 }
15571563 vortexTiltingMeasure += nodes->GetVortex_Tilting (jPoint);
15581564 }
0 commit comments