Skip to content

Commit 7e35912

Browse files
authored
Merge pull request #1749 from su2code/small_cleanup
Small cleanup to remove unused code
2 parents 1025b8b + 9ffd0dd commit 7e35912

10 files changed

Lines changed: 8 additions & 87 deletions

File tree

Common/include/basic_types/ad_structure.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ namespace AD{
538538
}
539539
}
540540
}
541-
541+
542542
FORCEINLINE void delete_handler(void *handler) {
543543
CheckpointHandler *checkpoint = static_cast<CheckpointHandler*>(handler);
544544
checkpoint->clear();

SU2_CFD/src/drivers/CMultizoneDriver.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,8 @@ CMultizoneDriver::CMultizoneDriver(char* confFile, unsigned short val_nZone, SU2
7373
for (iZone = 0; iZone < nZone; iZone++){
7474
switch (config_container[iZone]->GetKind_Solver()) {
7575
case MAIN_SOLVER::EULER: case MAIN_SOLVER::NAVIER_STOKES: case MAIN_SOLVER::RANS:
76-
case MAIN_SOLVER::INC_EULER: case MAIN_SOLVER::INC_NAVIER_STOKES: case MAIN_SOLVER::INC_RANS:
77-
fluid_zone = true;
78-
break;
7976
case MAIN_SOLVER::NEMO_EULER: case MAIN_SOLVER::NEMO_NAVIER_STOKES:
77+
case MAIN_SOLVER::INC_EULER: case MAIN_SOLVER::INC_NAVIER_STOKES: case MAIN_SOLVER::INC_RANS:
8078
fluid_zone = true;
8179
break;
8280
case MAIN_SOLVER::FEM_ELASTICITY:

SU2_CFD/src/numerics/CNumerics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ CNumerics::CNumerics(void) {
3636
Proj_Flux_Tensor = nullptr;
3737

3838
tau = nullptr;
39-
39+
4040
nemo = false;
4141

4242
}

SU2_CFD/src/numerics/NEMO/CNEMONumerics.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ void CNEMONumerics::GetViscousProjFlux(const su2double *val_primvar,
247247
}
248248

249249
/*--- Rename variables for convenience ---*/
250-
const auto& Ms = fluidmodel->GetSpeciesMolarMass();
251250
const auto& Ds = val_diffusioncoeff;
252251
const su2double mu = val_lam_viscosity+val_eddy_viscosity;
253252
su2double ktr = val_therm_conductivity;
@@ -257,25 +256,8 @@ void CNEMONumerics::GetViscousProjFlux(const su2double *val_primvar,
257256
const su2double Tve = val_primvar[TVE_INDEX];
258257
const auto& V = val_primvar;
259258
const auto& GV = val_gradprimvar;
260-
const su2double Ru = 1000.0*UNIVERSAL_GAS_CONSTANT;
261259
const auto& hs = fluidmodel->ComputeSpeciesEnthalpy(T, Tve, val_eve);
262260

263-
/*--- Scale thermal conductivity with turb visc ---*/
264-
// TODO: Need to determine proper way to incorporate eddy viscosity
265-
// This is only scaling Kve by same factor as ktr
266-
// NOTE: V[iSpecies] is == Ys.
267-
su2double Mass = 0.0;
268-
for (auto iSpecies = 0;iSpecies<nSpecies;iSpecies++)
269-
Mass += V[iSpecies]*Ms[iSpecies];
270-
271-
su2double Cptr = V[RHOCVTR_INDEX]/V[RHO_INDEX]+Ru/Mass;
272-
su2double tmp1 = Cptr*(val_eddy_viscosity/Prandtl_Turb);
273-
su2double scl = tmp1/ktr;
274-
ktr += Cptr*(val_eddy_viscosity/Prandtl_Turb);
275-
kve = kve*(1.0+scl);
276-
//Cpve = V[RHOCVVE_INDEX]+Ru/Mass;
277-
//kve += Cpve*(val_eddy_viscosity/Prandtl_Turb);
278-
279261
/*--- Pre-compute mixture quantities ---*/ //TODO
280262
su2double Vector[MAXNDIM] = {0.0};
281263
for (auto iDim = 0; iDim < nDim; iDim++) {

SU2_CFD/src/numerics/NEMO/NEMO_sources.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ CNumerics::ResidualType<> CSource_NEMO::ComputeAxisymmetric(const CConfig *confi
296296
su2double Mass = 0.0;
297297

298298
for (iSpecies=0; iSpecies<nSpecies; iSpecies++)
299-
Mass += V_i[iSpecies]*Ms[iSpecies];
299+
Mass += V_i[iSpecies]/rho*Ms[iSpecies];
300300

301301
su2double heat_capacity_cp_i = V_i[RHOCVTR_INDEX]/rho + Ru/Mass;
302302
su2double total_viscosity_i = Laminar_Viscosity_i + Eddy_Viscosity_i;

SU2_CFD/src/output/output_structure_legacy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2775,7 +2775,7 @@ void COutputLegacy::SpecialOutput_ForcesBreakdown(CSolver *****solver, CGeometry
27752775

27762776
Breakdown_file << "\n" <<"-------------------------------------------------------------------------" << "\n";
27772777
Breakdown_file <<"| ___ _ _ ___ |" << "\n";
2778-
Breakdown_file <<"| / __| | | |_ ) Release 7.3.0 \"Blackbird\" |" << "\n";
2778+
Breakdown_file <<"| / __| | | |_ ) Release 7.4.0 \"Blackbird\" |" << "\n";
27792779
Breakdown_file <<"| \\__ \\ |_| |/ / |" << "\n";
27802780
Breakdown_file <<"| |___/\\___//___| Suite (Computational Fluid Dynamics Code) |" << "\n";
27812781
Breakdown_file << "| |" << "\n";

SU2_CFD/src/solvers/CNEMONSSolver.cpp

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,6 @@ void CNEMONSSolver::BC_HeatFluxNonCatalytic_Wall(CGeometry *geometry,
262262
/*--- Get the locations of the primitive variables ---*/
263263
const unsigned short T_INDEX = nodes->GetTIndex();
264264
const unsigned short TVE_INDEX = nodes->GetTveIndex();
265-
const unsigned short RHO_INDEX = nodes->GetRhoIndex();
266-
const unsigned short RHOCVTR_INDEX = nodes->GetRhoCvtrIndex();
267265

268266
/*--- Loop over all of the vertices on this boundary marker ---*/
269267
SU2_OMP_FOR_DYN(OMP_MIN_SIZE)
@@ -285,7 +283,6 @@ void CNEMONSSolver::BC_HeatFluxNonCatalytic_Wall(CGeometry *geometry,
285283
// TODO: Look into this!
286284
// Note: Contributions from qtr and qve are used for proportional control
287285
// to drive the solution toward the specified heatflux more quickly.
288-
const auto V = nodes->GetPrimitive(iPoint);
289286
const auto GradV = nodes->GetGradient_Primitive(iPoint);
290287
su2double dTdn = 0.0;
291288
su2double dTvedn = 0.0;
@@ -296,24 +293,6 @@ void CNEMONSSolver::BC_HeatFluxNonCatalytic_Wall(CGeometry *geometry,
296293
su2double ktr = nodes->GetThermalConductivity(iPoint);
297294
su2double kve = nodes->GetThermalConductivity_ve(iPoint);
298295

299-
/*--- Scale thermal conductivity with turb ---*/
300-
// TODO: Need to determine proper way to incorporate eddy viscosity
301-
// This is only scaling Kve by same factor as ktr
302-
su2double Mass = 0.0;
303-
auto& Ms = FluidModel->GetSpeciesMolarMass();
304-
su2double tmp1, scl, Cptr;
305-
su2double Ru=1000.0*UNIVERSAL_GAS_CONSTANT;
306-
su2double eddy_viscosity = nodes->GetEddyViscosity(iPoint);
307-
for (unsigned short iSpecies=0; iSpecies<nSpecies; iSpecies++)
308-
Mass += V[iSpecies]/V[RHO_INDEX]*Ms[iSpecies];
309-
Cptr = V[RHOCVTR_INDEX]/V[RHO_INDEX]+Ru/Mass;
310-
tmp1 = Cptr*(eddy_viscosity/Prandtl_Turb);
311-
scl = tmp1/ktr;
312-
ktr += Cptr*(eddy_viscosity/Prandtl_Turb);
313-
kve = kve*(1.0+scl);
314-
//Cpve = V[RHOCVVE_INDEX]+Ru/Mass;
315-
//kve += Cpve*(val_eddy_viscosity/Prandtl_Turb);
316-
317296
/*--- Compute residual ---*/
318297
Res_Visc[nSpecies+nDim] += pcontrol*(ktr*dTdn+kve*dTvedn) +
319298
Wall_HeatFlux*Area;
@@ -585,18 +564,13 @@ void CNEMONSSolver::BC_IsothermalNonCatalytic_Wall(CGeometry *geometry,
585564
unsigned short val_marker) {
586565

587566
const bool implicit = (config->GetKind_TimeIntScheme() == EULER_IMPLICIT);
588-
const su2double Prandtl_Turb = config->GetPrandtl_Turb();
589567
const bool ionization = config->GetIonization();
590568
su2double UnitNormal[MAXNDIM] = {0.0};
591569

592570
if (ionization) {
593571
SU2_MPI::Error("NEED TO TAKE A CLOSER LOOK AT THE JACOBIAN W/ IONIZATION",CURRENT_FUNCTION);
594572
}
595573

596-
/*--- Extract required indices ---*/
597-
const unsigned short RHOCVTR_INDEX = nodes->GetRhoCvtrIndex();
598-
const unsigned short RHO_INDEX = nodes->GetRhoIndex();
599-
600574
/*--- Define 'proportional control' constant ---*/
601575
const su2double C = 5;
602576

@@ -658,24 +632,6 @@ void CNEMONSSolver::BC_IsothermalNonCatalytic_Wall(CGeometry *geometry,
658632
su2double ktr = nodes->GetThermalConductivity(iPoint);
659633
su2double kve = nodes->GetThermalConductivity_ve(iPoint);
660634

661-
/*--- Scale thermal conductivity with turb ---*/
662-
// This is only scaling Kve by same factor as ktr
663-
const auto V = nodes->GetPrimitive(iPoint);
664-
su2double Mass = 0.0;
665-
auto& Ms = FluidModel->GetSpeciesMolarMass();
666-
su2double tmp1, scl, Cptr;
667-
su2double Ru=1000.0*UNIVERSAL_GAS_CONSTANT;
668-
su2double eddy_viscosity=nodes->GetEddyViscosity(iPoint);
669-
for (unsigned short iSpecies=0; iSpecies<nSpecies; iSpecies++)
670-
Mass += V[iSpecies]/V[RHO_INDEX]*Ms[iSpecies];
671-
Cptr = V[RHOCVTR_INDEX]/V[RHO_INDEX]+Ru/Mass;
672-
tmp1 = Cptr*(eddy_viscosity/Prandtl_Turb);
673-
scl = tmp1/ktr;
674-
ktr += Cptr*(eddy_viscosity/Prandtl_Turb);
675-
kve = kve*(1.0+scl);
676-
//Cpve = V[RHOCVVE_INDEX]+Ru/Mass;
677-
//kve += Cpve*(val_eddy_viscosity/Prandtl_Turb);
678-
679635
/*--- Apply to the linear system ---*/
680636
Res_Visc[nSpecies+nDim] = ((ktr*(Ti-Tj) + kve*(Tvei-Tvej)) +
681637
(ktr*(Twall-Ti) + kve*(Twall-Tvei))*C)*Area/dist_ij;
@@ -989,24 +945,9 @@ void CNEMONSSolver::BC_Smoluchowski_Maxwell(CGeometry *geometry,
989945

990946
/*--- Retrieve Flow Data ---*/
991947
su2double Viscosity = nodes->GetLaminarViscosity(iPoint);
992-
su2double Eddy_Visc = nodes->GetEddyViscosity(iPoint);
993948
su2double Density = nodes->GetDensity(iPoint);
994949
su2double Gamma = nodes->GetGamma(iPoint);
995950

996-
/*--- Incorporate turbulence effects ---*/
997-
const auto& Ms = FluidModel->GetSpeciesMolarMass();
998-
su2double Ru = 1000.0*UNIVERSAL_GAS_CONSTANT;
999-
const auto Vi = nodes->GetPrimitive(iPoint);
1000-
1001-
su2double Mass = 0.0;
1002-
for (auto iSpecies=0u; iSpecies<nSpecies; iSpecies++)
1003-
Mass += Vi[iSpecies]*Ms[iSpecies];
1004-
su2double Cptr = rhoCvtr + Ru/Mass;
1005-
su2double tmp1 = Cptr*(Eddy_Visc/Prandtl_Turb);
1006-
su2double scl = tmp1/ktr;
1007-
ktr += Cptr*(Eddy_Visc/Prandtl_Turb);
1008-
kve = kve*(1.0+scl);
1009-
1010951
/*--- Retrieve Primitive Gradients ---*/
1011952
const auto Grad_PrimVar = nodes->GetGradient_Primitive(iPoint);
1012953

TestCases/species_transport/venturi_primitive_3species/species2_primitiveVenturi_mixingmodel_viscosity.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
% Author: Cristopher Morales Ubal %
88
% Institution: Eindhoven University of Technology %
99
% Date: 2022/06/27 %
10-
% File Version 7.3.1 "Blackbird" %
10+
% File Version 7.4.0 "Blackbird" %
1111
% %
1212
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1313

legacy/configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ AC_MSG_RESULT([
338338
339339
-------------------------------------------------------------------------
340340
| ___ _ _ ___ |
341-
| / __| | | |_ ) Release 7.3.0 'Blackbird' |
341+
| / __| | | |_ ) Release 7.4.0 'Blackbird' |
342342
| \\__ \\ |_| |/ / |
343343
| |___/\\___//___| Suite |
344344
| |

legacy/preconfigure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def header():
553553

554554
print('-------------------------------------------------------------------------\n'\
555555
'| ___ _ _ ___ | \n'\
556-
'| / __| | | |_ ) Release 7.3.0 \'Blackbird\' | \n'\
556+
'| / __| | | |_ ) Release 7.4.0 \'Blackbird\' | \n'\
557557
'| \__ \ |_| |/ / | \n'\
558558
'| |___/\___//___| Pre-configuration Script | \n'\
559559
'| | \n'\

0 commit comments

Comments
 (0)