Skip to content

Commit 32677e3

Browse files
committed
improve readability, remove unused code
1 parent 757b6e9 commit 32677e3

2 files changed

Lines changed: 31 additions & 10 deletions

File tree

SU2_CFD/src/fluid/CSU2TCLib.cpp

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,7 @@ vector<su2double>& CSU2TCLib::ComputeSpeciesEve(su2double val_T, bool vibe_only)
751751

752752
/*--- Electron species energy ---*/
753753
if ( ionization && (iSpecies == iElectron)) {
754+
754755
/*--- Calculate formation energy ---*/
755756
Ef = Enthalpy_Formation[iSpecies] - Ru/MolarMass[iSpecies] * Ref_Temperature[iSpecies];
756757

@@ -760,11 +761,13 @@ vector<su2double>& CSU2TCLib::ComputeSpeciesEve(su2double val_T, bool vibe_only)
760761
}
761762
/*--- Heavy particle energy ---*/
762763
else {
764+
763765
/*--- Calculate vibrational energy (harmonic-oscillator model) ---*/
764766
if (CharVibTemp[iSpecies] != 0.0)
765767
Ev = Ru/MolarMass[iSpecies] * CharVibTemp[iSpecies] / (exp(CharVibTemp[iSpecies]/val_T)-1.0);
766768
else
767769
Ev = 0.0;
770+
768771
/*--- Calculate electronic energy ---*/
769772
num = 0.0;
770773
denom = ElDegeneracy[iSpecies][0] * exp(-CharElTemp[iSpecies][0]/val_T);
@@ -793,6 +796,7 @@ vector<su2double>& CSU2TCLib::ComputeNetProductionRates(){
793796
// source term.
794797
su2double T_min = 800.0;
795798
su2double epsilon = 80;
799+
796800
/*--- Define preferential dissociation coefficient ---*/
797801
//alpha = 0.3;
798802

@@ -929,7 +933,6 @@ su2double CSU2TCLib::ComputeEveSourceTerm(){
929933
su2double omegaVT = 0.0;
930934
su2double omegaCV = 0.0;
931935

932-
933936
/*--- Calculate mole fractions ---*/
934937
su2double N = 0.0;
935938
su2double conc = 0.0;
@@ -1050,12 +1053,14 @@ void CSU2TCLib::DiffusionCoeffWBE(){
10501053
}
10511054
for (iSpecies = 0; iSpecies < nSpecies; iSpecies++)
10521055
MolarFracWBE[iSpecies] = MolarFracWBE[iSpecies]/conc;
1056+
10531057
/*--- Calculate mixture molar mass (kg/mol) ---*/
10541058
// Note: Species molar masses stored as kg/kmol, need 1E-3 conversion
10551059
su2double M = 0.0;
10561060
for (iSpecies = 0; iSpecies < nSpecies; iSpecies++)
10571061
M += MolarMass[iSpecies]*MolarFracWBE[iSpecies];
10581062
M = M*1E-3;
1063+
10591064
/*---+++ +++---*/
10601065
/*--- Diffusion coefficients ---*/
10611066
/*---+++ +++---*/
@@ -1066,6 +1071,7 @@ void CSU2TCLib::DiffusionCoeffWBE(){
10661071
Mi = MolarMass[iSpecies]*1E-3;
10671072
for (jSpecies = iSpecies; jSpecies < nSpecies; jSpecies++) {
10681073
Mj = MolarMass[jSpecies]*1E-3;
1074+
10691075
/*--- Calculate the Omega^(0,0)_ij collision cross section ---*/
10701076
Omega_ij = 1E-20/PI_NUMBER * Omega00(iSpecies,jSpecies,3)
10711077
* pow(T, Omega00(iSpecies,jSpecies,0)*log(T)*log(T)
@@ -1075,6 +1081,7 @@ void CSU2TCLib::DiffusionCoeffWBE(){
10751081
Dij(jSpecies,iSpecies) = 7.1613E-25*M*sqrt(T*(1/Mi+1/Mj))/(Density*Omega_ij);
10761082
}
10771083
}
1084+
10781085
/*--- Calculate species-mixture diffusion coefficient --*/
10791086
for (iSpecies = 0; iSpecies < nSpecies; iSpecies++) {
10801087
DiffusionCoeff[iSpecies] = 0.0;
@@ -1139,6 +1146,7 @@ void CSU2TCLib::ThermalConductivitiesWBE(){
11391146
ks[iSpecies] = mus[iSpecies]*(15.0/4.0 + RotationModes[iSpecies]/2.0)*Ru/MolarMass[iSpecies];
11401147
kves[iSpecies] = mus[iSpecies]*Cvves[iSpecies];
11411148
}
1149+
11421150
/*--- Calculate mixture tr & ve conductivities ---*/
11431151
ThermalCond_tr = 0.0;
11441152
ThermalCond_ve = 0.0;
@@ -1163,10 +1171,13 @@ void CSU2TCLib::DiffusionCoeffGY(){
11631171
for (iSpecies = 0; iSpecies < nSpecies; iSpecies++) {
11641172
gam_t += rhos[iSpecies] / (Density*MolarMass[iSpecies]);
11651173
}
1174+
11661175
/*--- Mixture thermal conductivity via Gupta-Yos approximation ---*/
11671176
for (iSpecies = 0; iSpecies < nHeavy; iSpecies++) {
1177+
11681178
/*--- Initialize the species diffusion coefficient ---*/
11691179
DiffusionCoeff[iSpecies] = 0.0;
1180+
11701181
/*--- Calculate molar concentration ---*/
11711182
Mi = MolarMass[iSpecies];
11721183
gam_i = rhos[iSpecies] / (Density*Mi);
@@ -1175,6 +1186,7 @@ void CSU2TCLib::DiffusionCoeffGY(){
11751186
if (jSpecies != iSpecies) {
11761187
Mj = MolarMass[jSpecies];
11771188
gam_j = rhos[iSpecies] / (Density*Mj);
1189+
11781190
/*--- Calculate the Omega^(0,0)_ij collision cross section ---*/
11791191
Omega_ij = 1E-20 * Omega00(iSpecies,jSpecies,3)
11801192
* pow(T, Omega00(iSpecies,jSpecies,0)*log(T)*log(T)
@@ -1245,21 +1257,25 @@ void CSU2TCLib::ViscosityGY(){
12451257
su2double pi = PI_NUMBER;
12461258
su2double Na = AVOGAD_CONSTANT;
12471259
Mu = 0.0;
1260+
12481261
/*--- Mixture viscosity via Gupta-Yos approximation ---*/
12491262
for (iSpecies = 0; iSpecies < nHeavy; iSpecies++) {
12501263
denom = 0.0;
1264+
12511265
/*--- Calculate molar concentration ---*/
12521266
Mi = MolarMass[iSpecies];
12531267
gam_i = rhos[iSpecies] / (Density*Mi);
12541268
for (jSpecies = 0; jSpecies < nHeavy; jSpecies++) {
12551269
Mj = MolarMass[jSpecies];
12561270
gam_j = rhos[jSpecies] / (Density*Mj);
1271+
12571272
/*--- Calculate "delta" quantities ---*/
12581273
Omega_ij = 1E-20 * Omega11(iSpecies,jSpecies,3)
12591274
* pow(T, Omega11(iSpecies,jSpecies,0)*log(T)*log(T)
12601275
+ Omega11(iSpecies,jSpecies,1)*log(T)
12611276
+ Omega11(iSpecies,jSpecies,2));
12621277
d2_ij = 16.0/5.0 * sqrt((2.0*Mi*Mj) / (pi*Ru*T*(Mi+Mj))) * Omega_ij;
1278+
12631279
/*--- Add to denominator of viscosity ---*/
12641280
denom += gam_j*d2_ij;
12651281
}
@@ -1275,24 +1291,28 @@ void CSU2TCLib::ViscosityGY(){
12751291
d2_ij = 16.0/5.0 * sqrt((2.0*Mi*Mj) / (pi*Ru*Tve*(Mi+Mj))) * Omega_ij;
12761292
denom += gam_j*d2_ij;
12771293
}
1294+
12781295
/*--- Calculate species laminar viscosity ---*/
12791296
Mu += (Mi/Na * gam_i) / denom;
12801297
}
12811298
if (ionization) {
12821299
iSpecies = nSpecies-1;
12831300
denom = 0.0;
1301+
12841302
/*--- Calculate molar concentration ---*/
12851303
Mi = MolarMass[iSpecies];
12861304
gam_i = rhos[iSpecies] / (Density*Mi);
12871305
for (jSpecies = 0; jSpecies < nSpecies; jSpecies++) {
12881306
Mj = MolarMass[jSpecies];
12891307
gam_j = rhos[jSpecies] / (Density*Mj);
1308+
12901309
/*--- Calculate "delta" quantities ---*/
12911310
Omega_ij = 1E-20 * Omega11(iSpecies,jSpecies,3)
12921311
* pow(Tve, Omega11(iSpecies,jSpecies,0)*log(Tve)*log(Tve)
12931312
+ Omega11(iSpecies,jSpecies,1)*log(Tve)
12941313
+ Omega11(iSpecies,jSpecies,2));
12951314
d2_ij = 16.0/5.0 * sqrt((2.0*Mi*Mj) / (pi*Ru*Tve*(Mi+Mj))) * Omega_ij;
1315+
12961316
/*--- Add to denominator of viscosity ---*/
12971317
denom += gam_j*d2_ij;
12981318
}
@@ -1324,10 +1344,12 @@ void CSU2TCLib::ThermalConductivitiesGY(){
13241344
for (iSpecies = 0; iSpecies < nSpecies; iSpecies++) {
13251345
R += Ru * rhos[iSpecies]/Density;
13261346
}
1347+
13271348
/*--- Mixture thermal conductivity via Gupta-Yos approximation ---*/
13281349
ThermalCond_tr = 0.0;
13291350
ThermalCond_ve = 0.0;
13301351
for (iSpecies = 0; iSpecies < nSpecies; iSpecies++) {
1352+
13311353
/*--- Calculate molar concentration ---*/
13321354
Mi = MolarMass[iSpecies];
13331355
mi = Mi/Na;
@@ -1339,28 +1361,35 @@ void CSU2TCLib::ThermalConductivitiesGY(){
13391361
mj = Mj/Na;
13401362
gam_j = rhos[iSpecies] / (Density*Mj);
13411363
a_ij = 1.0 + (1.0 - mi/mj)*(0.45 - 2.54*mi/mj) / ((1.0 + mi/mj)*(1.0 + mi/mj));
1364+
13421365
/*--- Calculate the Omega^(0,0)_ij collision cross section ---*/
13431366
Omega_ij = 1E-20 * Omega00(iSpecies,jSpecies,3)
13441367
* pow(T, Omega00(iSpecies,jSpecies,0)*log(T)*log(T)
13451368
+ Omega00(iSpecies,jSpecies,1)*log(T)
13461369
+ Omega00(iSpecies,jSpecies,2));
1370+
13471371
/*--- Calculate "delta1_ij" ---*/
13481372
d1_ij = 8.0/3.0 * sqrt((2.0*Mi*Mj) / (pi*Ru*T*(Mi+Mj))) * Omega_ij;
1373+
13491374
/*--- Calculate the Omega^(1,1)_ij collision cross section ---*/
13501375
Omega_ij = 1E-20 * Omega11(iSpecies,jSpecies,3)
13511376
* pow(T, Omega11(iSpecies,jSpecies,0)*log(T)*log(T)
13521377
+ Omega11(iSpecies,jSpecies,1)*log(T)
13531378
+ Omega11(iSpecies,jSpecies,2));
1379+
13541380
/*--- Calculate "delta2_ij" ---*/
13551381
d2_ij = 16.0/5.0 * sqrt((2.0*Mi*Mj) / (pi*Ru*T*(Mi+Mj))) * Omega_ij;
13561382
denom_t += a_ij*gam_j*d2_ij;
13571383
denom_r += gam_j*d1_ij;
13581384
}
1385+
13591386
/*--- Translational contribution to thermal conductivity ---*/
13601387
ThermalCond_tr += (15.0/4.0)*kb*gam_i/denom_t;
1388+
13611389
/*--- Translational contribution to thermal conductivity ---*/
13621390
if (RotationModes[iSpecies] != 0.0)
13631391
ThermalCond_tr += kb*gam_i/denom_r;
1392+
13641393
/*--- Vibrational-electronic contribution to thermal conductivity ---*/
13651394
ThermalCond_ve += kb*Cvve/R*gam_i / denom_r;
13661395
}

SU2_CFD/src/solvers/CNEMOEulerSolver.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2436,12 +2436,4 @@ void CNEMOEulerSolver::BC_Supersonic_Outlet(CGeometry *geometry, CSolver **solve
24362436
/*--- Free locally allocated memory ---*/
24372437
delete [] Normal;
24382438

2439-
}
2440-
2441-
//void CNEMOEulerSolver::BC_Sym_Plane(CGeometry *geometry, CSolver **solver_container,
2442-
// CNumerics *conv_numerics, CNumerics *visc_numerics, CConfig *config, unsigned short val_marker) {
2443-
//
2444-
// /*--- Call the Euler wall routine ---*/
2445-
// BC_Euler_Wall(geometry, solver_container, conv_numerics, visc_numerics, config, val_marker);
2446-
//
2447-
//}
2439+
}

0 commit comments

Comments
 (0)