Skip to content

Commit f32e453

Browse files
authored
Merge branch 'develop' into fix_legacy_deformation
2 parents d9db4a0 + 42bb167 commit f32e453

9 files changed

Lines changed: 337 additions & 16 deletions

File tree

AUTHORS.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Copyright holders might be the individual person or their respective employer. I
4343
```
4444
Akshay.K.R
4545
Alejandro
46+
Alessandro Gastaldi
4647
Aman uz zaman Baig
4748
Amit Sachdeva
4849
Ana Lourenco
@@ -53,19 +54,23 @@ Antonio Rubino
5354
Arne Bachmann
5455
Beckett Y. Zhou
5556
Benjamin S. Kirk
56-
Brandon Tracey
57+
Brendan Tracey
58+
Brian Munguía
5759
Carsten Othmer
60+
Catarina Garbacz
61+
Charanya Venkatesan-Crome
5862
Clark Pederson
5963
Daumantas Kavolis
6064
Dave Taflin
6165
Eduardo Molina
6266
Ethan Alan Hereth
63-
FlorianDm
67+
Florian Dittmann
6468
Francisco D. Palacios
6569
Gaurav Bansal
6670
Giulio Gori
6771
Guillaume Bâty
6872
Harichand M V
73+
HL Kline
6974
IndianaStokes
7075
J. Sinsay
7176
JSmith36
@@ -75,13 +80,19 @@ Jayant Mukhopadhaya
7580
Jeffrey van Oostrom
7681
Jessie Lauzon
7782
João Loureiro
83+
Johannes Blühdorn
84+
JonathanSmith1936
7885
Kedar Naik
7986
LaSerpe
87+
Lennaert Tol
8088
Matteo Pini
89+
Max Aehle
8190
Max Le
8291
Max Sagebaum
8392
Michele Gaffuri
8493
Mickael Philit
94+
Mladen Banovic
95+
Nicola Fonzi
8596
Ole Burghardt
8697
Patrick Mischke
8798
Paul Urbanczyk
@@ -91,6 +102,7 @@ Pete Bachant
91102
RaulFeijo55
92103
Ruben Sanchez
93104
Ryan Barrett
105+
SaettaE
94106
Salvatore Vitale
95107
Samet Cakmakcioglu
96108
Scott Imlay
@@ -104,25 +116,26 @@ Trent Lukaczyk
104116
VivaanKhatri
105117
Wally Maier
106118
aaronyicongfu
119+
aeroamit
107120
anilvar
121+
band-a-prend
122+
bigfootedrockmidget
108123
bmunguia
109124
chamsolli
110125
costat
111-
cr109
112-
cvencro
113126
daniel-linton
114127
demanosalvas
115128
dmudiger
116129
erangit
117130
flo
118-
hlkline
131+
fmpmorgado
132+
garcgutierrez
133+
jtneedels
119134
juliendm
120135
jvanoostrom
121-
koodlyakshay
122136
mcolonno
123137
minkwankim
124138
padronas
125-
sametcaka
126139
sravya91
127140
srcopela
128141
tobadavid

SU2_CFD/include/numerics/turbulent/turb_sources.hpp

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,10 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
305305
alfa_2,
306306
beta_1,
307307
beta_2,
308-
sigma_omega_1,
309-
sigma_omega_2,
308+
sigma_k_1,
309+
sigma_k_2,
310+
sigma_w_1,
311+
sigma_w_2,
310312
beta_star,
311313
a1;
312314

@@ -320,12 +322,49 @@ class CSourcePieceWise_TurbSST final : public CNumerics {
320322

321323
bool incompressible;
322324
bool sustaining_terms;
325+
bool axisymmetric;
323326

324327
/*!
325328
* \brief A virtual member. Get strain magnitude based on perturbed reynolds stress matrix
326329
* \param[in] turb_ke: turbulent kinetic energy of the node
327330
*/
328331
void SetPerturbedStrainMag(su2double turb_ke);
332+
333+
/*!
334+
* \brief Add contribution due to axisymmetric formulation to 2D residual
335+
*/
336+
inline void ResidualAxisymmetric(su2double alfa_blended, su2double zeta){
337+
338+
if (Coord_i[1] < EPS) return;
339+
340+
su2double yinv, rhov, k, w;
341+
su2double sigma_k_i, sigma_w_i;
342+
su2double pk_axi, pw_axi, cdk_axi, cdw_axi;
343+
344+
AD::SetPreaccIn(Coord_i[1]);
345+
346+
yinv = 1.0/Coord_i[1];
347+
rhov = Density_i*V_i[2];
348+
k = TurbVar_i[0];
349+
w = TurbVar_i[1];
350+
351+
/*--- Compute blended constants ---*/
352+
sigma_k_i = F1_i*sigma_k_1+(1.0-F1_i)*sigma_k_2;
353+
sigma_w_i = F1_i*sigma_w_1+(1.0-F1_i)*sigma_w_2;
354+
355+
/*--- Production ---*/
356+
pk_axi = max(0.0,2.0/3.0*rhov*k*(2.0/zeta*(yinv*V_i[2]-PrimVar_Grad_i[2][1]-PrimVar_Grad_i[1][0])-1.0));
357+
pw_axi = alfa_blended*zeta/k*pk_axi;
358+
359+
/*--- Convection-Diffusion ---*/
360+
cdk_axi = rhov*k-(Laminar_Viscosity_i+sigma_k_i*Eddy_Viscosity_i)*TurbVar_Grad_i[0][1];
361+
cdw_axi = rhov*w-(Laminar_Viscosity_i+sigma_w_i*Eddy_Viscosity_i)*TurbVar_Grad_i[1][1];
362+
363+
/*--- Add terms to the residuals ---*/
364+
Residual[0] += yinv*Volume*(pk_axi-cdk_axi);
365+
Residual[1] += yinv*Volume*(pw_axi-cdw_axi);
366+
367+
}
329368

330369
public:
331370
/*!

SU2_CFD/src/numerics/turbulent/turb_sources.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -760,16 +760,19 @@ CSourcePieceWise_TurbSST::CSourcePieceWise_TurbSST(unsigned short val_nDim,
760760

761761
incompressible = (config->GetKind_Regime() == INCOMPRESSIBLE);
762762
sustaining_terms = (config->GetKind_Turb_Model() == SST_SUST);
763+
axisymmetric = config->GetAxisymmetric();
763764

764765
/*--- Closure constants ---*/
765-
beta_star = constants[6];
766-
sigma_omega_1 = constants[2];
767-
sigma_omega_2 = constants[3];
766+
sigma_k_1 = constants[0];
767+
sigma_k_2 = constants[1];
768+
sigma_w_1 = constants[2];
769+
sigma_w_2 = constants[3];
768770
beta_1 = constants[4];
769771
beta_2 = constants[5];
772+
beta_star = constants[6];
773+
a1 = constants[7];
770774
alfa_1 = constants[8];
771775
alfa_2 = constants[9];
772-
a1 = constants[7];
773776

774777
/*--- Set the ambient values of k and omega to the free stream values. ---*/
775778
kAmb = val_kine_Inf;
@@ -845,7 +848,6 @@ CNumerics::ResidualType<> CSourcePieceWise_TurbSST::ComputeResidual(const CConfi
845848
pk = Eddy_Viscosity_i*StrainMag_i*StrainMag_i - 2.0/3.0*Density_i*TurbVar_i[0]*diverg;
846849
}
847850

848-
849851
pk = min(pk,20.0*beta_star*Density_i*TurbVar_i[1]*TurbVar_i[0]);
850852
pk = max(pk,0.0);
851853

@@ -889,6 +891,10 @@ CNumerics::ResidualType<> CSourcePieceWise_TurbSST::ComputeResidual(const CConfi
889891
/*--- Cross diffusion ---*/
890892

891893
Residual[1] += (1.0 - F1_i)*CDkw_i*Volume;
894+
895+
/*--- Contribution due to 2D axisymmetric formulation ---*/
896+
897+
if (axisymmetric) ResidualAxisymmetric(alfa_blended,zeta);
892898

893899
/*--- Implicit part ---*/
894900

SU2_CFD/src/solvers/CMeshSolver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ void CMeshSolver::SetWallDistance(CGeometry *geometry, CConfig *config) {
298298

299299
unsigned long nVertex_SolidWall = 0;
300300
for(auto iMarker=0u; iMarker<config->GetnMarker_All(); ++iMarker) {
301-
if(config->GetSolid_Wall(iMarker)) {
301+
if(config->GetSolid_Wall(iMarker) && !config->GetMarker_All_Deform_Mesh_Sym_Plane(iMarker)) {
302302
nVertex_SolidWall += geometry->GetnVertex(iMarker);
303303
}
304304
}
@@ -315,7 +315,7 @@ void CMeshSolver::SetWallDistance(CGeometry *geometry, CConfig *config) {
315315

316316
for (unsigned long iMarker=0, ii=0, jj=0; iMarker<config->GetnMarker_All(); ++iMarker) {
317317

318-
if (!config->GetSolid_Wall(iMarker)) continue;
318+
if (!config->GetSolid_Wall(iMarker) || config->GetMarker_All_Deform_Mesh_Sym_Plane(iMarker)) continue;
319319

320320
for (auto iVertex=0u; iVertex<geometry->GetnVertex(iMarker); ++iVertex) {
321321
auto iPoint = geometry->vertex[iMarker][iVertex]->GetNode();

SU2_CFD/src/solvers/CTurbSSTSolver.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ void CTurbSSTSolver::Postprocessing(CGeometry *geometry, CSolver **solver_contai
322322

323323
void CTurbSSTSolver::Source_Residual(CGeometry *geometry, CSolver **solver_container,
324324
CNumerics **numerics_container, CConfig *config, unsigned short iMesh) {
325+
326+
bool axisymmetric = config->GetAxisymmetric();
325327

326328
CVariable* flowNodes = solver_container[FLOW_SOL]->GetNodes();
327329

@@ -372,6 +374,11 @@ void CTurbSSTSolver::Source_Residual(CGeometry *geometry, CSolver **solver_conta
372374

373375
numerics->SetCrossDiff(nodes->GetCrossDiff(iPoint),0.0);
374376

377+
if (axisymmetric){
378+
/*--- Set y coordinate ---*/
379+
numerics->SetCoord(geometry->nodes->GetCoord(iPoint), geometry->nodes->GetCoord(iPoint));
380+
}
381+
375382
/*--- Compute the source term ---*/
376383

377384
auto residual = numerics->ComputeResidual(config);

0 commit comments

Comments
 (0)