3333
3434CNEMOEulerSolver::CNEMOEulerSolver (CGeometry *geometry, CConfig *config,
3535 unsigned short iMesh, const bool navier_stokes) :
36- CFVMFlowSolverBase<CNEMOEulerVariable, COMPRESSIBLE>() {
36+ CFVMFlowSolverBase<CNEMOEulerVariable, COMPRESSIBLE>() {
3737
3838 /* --- Based on the navier_stokes boolean, determine if this constructor is
3939 * being called by itself, or by its derived class CNEMONSSolver. ---*/
@@ -131,7 +131,7 @@ CNEMOEulerSolver::CNEMOEulerSolver(CGeometry *geometry, CConfig *config,
131131
132132 /* --- Allocate base class members. ---*/
133133
134- Allocate (*config);
134+ Allocate (*config);
135135
136136 /* --- Allocate Jacobians for implicit time-stepping ---*/
137137 if (config->GetKind_TimeIntScheme_Flow () == EULER_IMPLICIT) {
@@ -154,7 +154,7 @@ CNEMOEulerSolver::CNEMOEulerSolver(CGeometry *geometry, CConfig *config,
154154 Density_Inf = config->GetDensity_FreeStreamND ();
155155 Pressure_Inf = config->GetPressure_FreeStreamND ();
156156 Velocity_Inf = config->GetVelocity_FreeStreamND ();
157- Temperature_Inf = config->GetTemperature_FreeStreamND ();
157+ Temperature_Inf = config->GetTemperature_FreeStreamND ();
158158 Temperature_ve_Inf = config->GetTemperature_ve_FreeStreamND ();
159159
160160 /* --- Initialize the secondary values for direct derivative approxiations ---*/
@@ -204,16 +204,16 @@ CNEMOEulerSolver::CNEMOEulerSolver(CGeometry *geometry, CConfig *config,
204204 node_infty = new CNEMONSVariable (Pressure_Inf, MassFrac_Inf, Mvec_Inf,
205205 Temperature_Inf, Temperature_ve_Inf,
206206 1 , nDim, nVar, nPrimVar, nPrimVarGrad,
207- config, FluidModel);
208- } else {
207+ config, FluidModel);
208+ } else {
209209 nodes = new CNEMOEulerVariable (Pressure_Inf, MassFrac_Inf, Mvec_Inf,
210210 Temperature_Inf, Temperature_ve_Inf,
211211 nPoint, nDim, nVar, nPrimVar, nPrimVarGrad,
212212 config, FluidModel);
213213 node_infty = new CNEMOEulerVariable (Pressure_Inf, MassFrac_Inf, Mvec_Inf,
214214 Temperature_Inf, Temperature_ve_Inf,
215215 1 , nDim, nVar, nPrimVar, nPrimVarGrad,
216- config, FluidModel);
216+ config, FluidModel);
217217 }
218218 SetBaseClassPointerToNodes ();
219219
@@ -236,7 +236,7 @@ CNEMOEulerSolver::CNEMOEulerSolver(CGeometry *geometry, CConfig *config,
236236 sqvel = 0.0 ;
237237 for (iDim = 0 ; iDim < nDim; iDim++){
238238 sqvel += Mvec_Inf[iDim]*Soundspeed_Inf * Mvec_Inf[iDim]*Soundspeed_Inf;
239- }
239+ }
240240 Energies_Inf = FluidModel->GetMixtureEnergies ();
241241
242242 /* --- Initialize Solution & Solution_Old vectors ---*/
@@ -252,7 +252,7 @@ CNEMOEulerSolver::CNEMOEulerSolver(CGeometry *geometry, CConfig *config,
252252 nodes->SetSolution_Old (iPoint,Solution);
253253
254254 if (nonPhys)
255- counter_local++;
255+ counter_local++;
256256 }
257257
258258 /* --- Warning message about non-physical points ---*/
@@ -270,7 +270,7 @@ CNEMOEulerSolver::CNEMOEulerSolver(CGeometry *geometry, CConfig *config,
270270
271271 /* --- Add the solver name (max 8 characters) ---*/
272272 SolverName = " NEMO.FLOW" ;
273-
273+
274274 /* --- Finally, check that the static arrays will be large enough (keep this
275275 * check at the bottom to make sure we consider the "final" values). ---*/
276276 if ((nDim > MAXNDIM) || (nPrimVar > MAXNVAR))
@@ -468,7 +468,7 @@ void CNEMOEulerSolver::SetTime_Step(CGeometry *geometry, CSolver **solution_cont
468468
469469 if (viscous)
470470 nodes->SetMax_Lambda_Visc (iPoint,0.0 );
471- }
471+ }
472472
473473 /* --- Loop interior edges ---*/
474474 for (iEdge = 0 ; iEdge < geometry->GetnEdge (); iEdge++) {
@@ -569,15 +569,15 @@ void CNEMOEulerSolver::SetTime_Step(CGeometry *geometry, CSolver **solution_cont
569569 Mean_Density = nodes->GetDensity (iPoint);
570570 cv = (nodes->GetRhoCv_tr (iPoint) +
571571 nodes->GetRhoCv_ve (iPoint) ) / Mean_Density;
572-
572+
573573 Lambda_1 = (4.0 /3.0 )*(Mean_LaminarVisc);
574574 Lambda_2 = (Mean_ThermalCond+Mean_ThermalCond_ve)/cv;
575575 Lambda = (Lambda_1 + Lambda_2)*Area*Area/Mean_Density;
576-
576+
577577 if (geometry->nodes ->GetDomain (iPoint))
578578 nodes->AddMax_Lambda_Visc (iPoint,Lambda);
579579 }
580- }
580+ }
581581 }
582582
583583 /* --- Each element uses their own speed, steady state simulation ---*/
@@ -814,7 +814,7 @@ void CNEMOEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solution_c
814814 su2double lim_i, lim_j, lim_ij = 0.0 ;
815815
816816 unsigned long InnerIter = config->GetInnerIter ();
817-
817+
818818 CNumerics* numerics = numerics_container[CONV_TERM];
819819
820820 /* --- Set booleans based on config settings ---*/
@@ -840,40 +840,40 @@ void CNEMOEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solution_c
840840 Eve_j = new su2double[nSpecies];
841841 Cvve_i = new su2double[nSpecies];
842842 Cvve_j = new su2double[nSpecies];
843-
844-
843+
844+
845845 /* --- Loop over edges and calculate convective fluxes ---*/
846846 for (iEdge = 0 ; iEdge < geometry->GetnEdge (); iEdge++) {
847847
848-
848+
849849 /* --- Retrieve node numbers and pass edge normal to CNumerics ---*/
850850 iPoint = geometry->edges ->GetNode (iEdge, 0 );
851851 jPoint = geometry->edges ->GetNode (iEdge, 1 );
852852 numerics->SetNormal (geometry->edges ->GetNormal (iEdge));
853-
853+
854854 /* --- Get conserved & primitive variables from CVariable ---*/
855855 U_i = nodes->GetSolution (iPoint); U_j = nodes->GetSolution (jPoint);
856856 V_i = nodes->GetPrimitive (iPoint); V_j = nodes->GetPrimitive (jPoint);
857857
858858 /* --- High order reconstruction using MUSCL strategy ---*/
859859 if (muscl) {
860-
861-
860+
861+
862862 /* --- Assign i-j and j-i to projection vectors ---*/
863863 for (iDim = 0 ; iDim < nDim; iDim++) {
864864 Vector_i[iDim] = 0.5 *(geometry->nodes ->GetCoord (jPoint, iDim) -
865865 geometry->nodes ->GetCoord (iPoint, iDim) );
866866 Vector_j[iDim] = 0.5 *(geometry->nodes ->GetCoord (iPoint, iDim) -
867867 geometry->nodes ->GetCoord (jPoint, iDim) );
868868 }
869-
870-
869+
870+
871871 /* ---+++ Conserved variable reconstruction & limiting +++---*/
872-
872+
873873 /* --- Retrieve gradient information & limiter ---*/
874874 GradU_i = nodes->GetGradient_Reconstruction (iPoint);
875875 GradU_j = nodes->GetGradient_Reconstruction (jPoint);
876-
876+
877877 if (limiter) {
878878 Limiter_i = nodes->GetLimiter (iPoint);
879879 Limiter_j = nodes->GetLimiter (jPoint);
@@ -885,7 +885,7 @@ void CNEMOEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solution_c
885885 }
886886 lim_ij = min (lim_i, lim_j);
887887 }
888-
888+
889889 /* --- Reconstruct conserved variables at the edge interface ---*/
890890 for (iVar = 0 ; iVar < nVar; iVar++) {
891891 ProjGradU_i = 0.0 ; ProjGradU_j = 0.0 ;
@@ -901,13 +901,13 @@ void CNEMOEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solution_c
901901 Conserved_i[iVar] = U_i[iVar] + ProjGradU_i;
902902 Conserved_j[iVar] = U_j[iVar] + ProjGradU_j;
903903 }
904- }
905-
904+ }
905+
906906 chk_err_i = nodes->Cons2PrimVar (Conserved_i, Primitive_i,
907907 dPdU_i, dTdU_i, dTvedU_i, Eve_i, Cvve_i);
908908 chk_err_j = nodes->Cons2PrimVar (Conserved_j, Primitive_j,
909909 dPdU_j, dTdU_j, dTvedU_j, Eve_j, Cvve_j);
910-
910+
911911 /* --- Check for physical solutions in the reconstructed values ---*/
912912 // Note: If non-physical, revert to first order
913913 if ( chk_err_i || chk_err_j) {
@@ -951,8 +951,8 @@ void CNEMOEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solution_c
951951 // for (jVar = 0; jVar < nVar; jVar++)
952952 // if ((Jacobian_i[iVar][jVar] != Jacobian_i[iVar][jVar]) ||
953953 // (Jacobian_j[iVar][jVar] != Jacobian_j[iVar][jVar]) )
954- // err = true;
955-
954+ // err = true;
955+
956956 /* --- Update the residual and Jacobian ---*/
957957 if (!err) {
958958 LinSysRes.AddBlock (iPoint, residual);
@@ -965,7 +965,7 @@ void CNEMOEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solution_c
965965 // }
966966 }
967967 }
968-
968+
969969 delete [] Conserved_i;
970970 delete [] Conserved_j;
971971 delete [] Primitive_i;
@@ -984,7 +984,7 @@ void CNEMOEulerSolver::Upwind_Residual(CGeometry *geometry, CSolver **solution_c
984984}
985985
986986void CNEMOEulerSolver::Source_Residual (CGeometry *geometry, CSolver **solution_container, CNumerics **numerics_container, CConfig *config, unsigned short iMesh) {
987-
987+
988988 unsigned short iVar, jVar;
989989 unsigned long iPoint;
990990 unsigned long eAxi_local, eChm_local, eVib_local;
@@ -1005,7 +1005,7 @@ void CNEMOEulerSolver::Source_Residual(CGeometry *geometry, CSolver **solution_c
10051005
10061006 /* --- Initialize the source residual to zero ---*/
10071007 for (iVar = 0 ; iVar < nVar; iVar++) Residual[iVar] = 0.0 ;
1008-
1008+
10091009 /* --- loop over interior points ---*/
10101010 for (iPoint = 0 ; iPoint < nPointDomain; iPoint++) {
10111011
@@ -1047,7 +1047,7 @@ void CNEMOEulerSolver::Source_Residual(CGeometry *geometry, CSolver **solution_c
10471047 else
10481048 eAxi_local++;
10491049 }
1050-
1050+
10511051 if (!frozen){
10521052 /* --- Compute the non-equilibrium chemistry ---*/
10531053 auto residual = numerics->ComputeChemistry (config);
@@ -1067,7 +1067,7 @@ void CNEMOEulerSolver::Source_Residual(CGeometry *geometry, CSolver **solution_c
10671067 Jacobian.SubtractBlock (iPoint, iPoint, Jacobian_i);
10681068 } else
10691069 eChm_local++;
1070- }
1070+ }
10711071
10721072 /* --- Compute vibrational energy relaxation ---*/
10731073 // / NOTE: Jacobians don't account for relaxation time derivatives
@@ -1119,22 +1119,22 @@ void CNEMOEulerSolver::ExplicitEuler_Iteration(CGeometry *geometry, CSolver **so
11191119 SetRes_RMS (iVar, 0.0 );
11201120 SetRes_Max (iVar, 0.0 , 0 );
11211121 }
1122-
1122+
11231123 /* --- Update the solution ---*/
11241124 for (iPoint = 0 ; iPoint < nPointDomain; iPoint++) {
11251125
1126-
1126+
11271127 Vol = (geometry->nodes ->GetVolume (iPoint) +
11281128 geometry->nodes ->GetPeriodicVolume (iPoint));
11291129
1130- Delta = nodes->GetDelta_Time (iPoint) / Vol;
1130+ Delta = nodes->GetDelta_Time (iPoint) / Vol;
11311131
11321132 local_Res_TruncError = nodes->GetResTruncError (iPoint);
11331133 local_Residual = LinSysRes.GetBlock (iPoint);
11341134
11351135 if (!adjoint) {
11361136 for (iVar = 0 ; iVar < nVar; iVar++) {
1137-
1137+
11381138 Res = local_Residual[iVar] + local_Res_TruncError[iVar];
11391139 nodes->AddSolution (iPoint, iVar, -Res*Delta);
11401140 AddRes_RMS (iVar, Res*Res);
@@ -1273,7 +1273,7 @@ void CNEMOEulerSolver::ImplicitEuler_Iteration(CGeometry *geometry, CSolver **so
12731273
12741274void CNEMOEulerSolver::SetNondimensionalization (CConfig *config, unsigned short iMesh) {
12751275
1276- su2double
1276+ su2double
12771277 Temperature_FreeStream = 0.0 , Temperature_ve_FreeStream = 0.0 , Mach2Vel_FreeStream = 0.0 ,
12781278 ModVel_FreeStream = 0.0 , Energy_FreeStream = 0.0 , ModVel_FreeStreamND = 0.0 ,
12791279 Velocity_Reynolds = 0.0 , Omega_FreeStream = 0.0 , Omega_FreeStreamND = 0.0 ,
@@ -1282,7 +1282,7 @@ void CNEMOEulerSolver::SetNondimensionalization(CConfig *config, unsigned short
12821282 Pressure_Ref = 0.0 , Velocity_Ref = 0.0 , Temperature_Ref = 0.0 ,
12831283 Temperature_ve_Ref = 0.0 , Time_Ref = 0.0 , Omega_Ref = 0.0 ,
12841284 Force_Ref = 0.0 , Gas_Constant_Ref = 0.0 , Viscosity_Ref = 0.0 ,
1285- Conductivity_Ref = 0.0 , Energy_Ref = 0.0 , Pressure_FreeStreamND = 0.0 ,
1285+ Conductivity_Ref = 0.0 , Energy_Ref = 0.0 , Pressure_FreeStreamND = 0.0 ,
12861286 Energy_FreeStreamND = 0.0 , Temperature_FreeStreamND = 0.0 , Temperature_ve_FreeStreamND = 0.0 ,
12871287 Gas_ConstantND = 0.0 , Viscosity_FreeStreamND = 0.0 , sqvel = 0.0 ,
12881288 Tke_FreeStreamND = 0.0 , Total_UnstTimeND = 0.0 , Delta_UnstTimeND = 0.0 ,
@@ -1307,7 +1307,7 @@ void CNEMOEulerSolver::SetNondimensionalization(CConfig *config, unsigned short
13071307 bool turbulent = false ;
13081308 bool tkeNeeded = ((turbulent) && (config->GetKind_Turb_Model () == SST));
13091309 bool reynolds_init = (config->GetKind_InitOption () == REYNOLDS);
1310-
1310+
13111311 /* --- Instatiate the fluid model ---*/
13121312 switch (config->GetKind_FluidModel ()) {
13131313 case MUTATIONPP:
@@ -1545,14 +1545,14 @@ void CNEMOEulerSolver::SetNondimensionalization(CConfig *config, unsigned short
15451545 case MUTATIONPP:
15461546 cout << " Fluid Model: MUTATIONPP " << endl;
15471547 break ;
1548- }
1548+ }
15491549
15501550 cout << " Mixture: " << config->GetGasModel () << endl;
15511551 cout << " Specific gas constant: " << config->GetGas_Constant ();
15521552 if (config->GetSystemMeasurements () == SI) cout << " N.m/kg.K." << endl;
15531553 else if (config->GetSystemMeasurements () == US) cout << " lbf.ft/slug.R." << endl;
15541554 cout << " Specific gas constant (non-dim): " << config->GetGas_ConstantND ()<< endl;
1555-
1555+
15561556 if (viscous) {
15571557 switch (config->GetKind_TransCoeffModel ()) {
15581558
@@ -1570,7 +1570,7 @@ void CNEMOEulerSolver::SetNondimensionalization(CConfig *config, unsigned short
15701570 if (config->GetSystemMeasurements () == SI) cout << " N.s/m^2." << endl;
15711571 else if (config->GetSystemMeasurements () == US) cout << " lbf.s/ft^2." << endl;
15721572 cout << " Laminar Viscosity freestream (non-dim): " << config->GetMu_ConstantND ()<< endl;
1573- break ;
1573+ break ;
15741574 }
15751575 }
15761576
@@ -2013,7 +2013,7 @@ void CNEMOEulerSolver::BC_Inlet(CGeometry *geometry, CSolver **solution_containe
20132013 su2double T_Total, P_Total, Velocity[3 ], Velocity2, H_Total, Temperature, Riemann,
20142014 Pressure, Density, Energy, Mach2, SoundSpeed2, SoundSpeed_Total2, Vel_Mag,
20152015 alpha, aa, bb, cc, dd, Area, UnitaryNormal[3 ] = {0.0 };
2016- const su2double *Flow_Dir;
2016+ const su2double *Flow_Dir;
20172017
20182018 bool grid_movement = config->GetGrid_Movement ();
20192019 su2double Two_Gamma_M1 = 2.0 /Gamma_Minus_One;
@@ -2296,7 +2296,7 @@ void CNEMOEulerSolver::BC_Outlet(CGeometry *geometry, CSolver **solution_contain
22962296 unsigned short A_INDEX = nodes->GetAIndex ();
22972297 unsigned short RHOCVTR_INDEX = nodes->GetRhoCvtrIndex ();
22982298 unsigned short RHOCVVE_INDEX = nodes->GetRhoCvveIndex ();
2299-
2299+
23002300 /* --- Loop over all the vertices on this boundary marker ---*/
23012301 for (iVertex = 0 ; iVertex < geometry->nVertex [val_marker]; iVertex++) {
23022302 iPoint = geometry->vertex [val_marker][iVertex]->GetNode ();
@@ -2332,10 +2332,10 @@ void CNEMOEulerSolver::BC_Outlet(CGeometry *geometry, CSolver **solution_contain
23322332 /* --- Retrieve the specified back pressure for this outlet. ---*/
23332333 if (gravity) P_Exit = config->GetOutlet_Pressure (Marker_Tag) - geometry->nodes ->GetCoord (iPoint, nDim-1 )*STANDARD_GRAVITY;
23342334 else P_Exit = config->GetOutlet_Pressure (Marker_Tag);
2335-
2335+
23362336 /* --- Non-dim. the inputs if necessary. ---*/
23372337 P_Exit = P_Exit/config->GetPressure_Ref ();
2338-
2338+
23392339 /* --- Check whether the flow is supersonic at the exit. The type
23402340 of boundary update depends on this. ---*/
23412341 Density = V_domain[RHO_INDEX];
@@ -2350,12 +2350,12 @@ void CNEMOEulerSolver::BC_Outlet(CGeometry *geometry, CSolver **solution_contain
23502350 Pressure = V_domain[PRESS_INDEX];
23512351 SoundSpeed = V_domain[A_INDEX];
23522352 Mach_Exit = sqrt (Velocity2)/SoundSpeed;
2353-
2353+
23542354 /* --- Compute Species Concentrations ---*/
23552355 // Using partial pressures, maybe not
23562356 for (iSpecies =0 ; iSpecies<nSpecies;iSpecies++){
23572357 Ys[iSpecies] = V_domain[iSpecies]/Density;
2358- }
2358+ }
23592359
23602360 /* --- Recompute boundary state depending Mach number ---*/
23612361 if (Mach_Exit >= 1.0 ) {
@@ -2539,7 +2539,7 @@ SU2_MPI::Error("BC_SUPERSONIC_INLET: Not operational in NEMO.", CURRENT_FUNCTION
25392539
25402540/* ----------------------------------------------------------------------------- */
25412541/* ----------------------------------------------------------------------------- */
2542- /* The block of code commented below needs to be updated to use Fluidmodel class */
2542+ /* The block of code commented below needs to be updated to use Fluidmodel class */
25432543/* ----------------------------------------------------------------------------- */
25442544/* ----------------------------------------------------------------------------- */
25452545
@@ -2634,9 +2634,9 @@ SU2_MPI::Error("BC_SUPERSONIC_INLET: Not operational in NEMO.", CURRENT_FUNCTION
26342634
26352635/* ----------------------------------------------------------------------------- */
26362636/* ----------------------------------------------------------------------------- */
2637- /* The block of code that needs to be updated to use Fluidmodel class end here */
2638- /* ----------------------------------------------------------------------------- */
2637+ /* The block of code that needs to be updated to use Fluidmodel class end here */
26392638/* ----------------------------------------------------------------------------- */
2639+ /* ----------------------------------------------------------------------------- */
26402640
26412641// //This requires Newtown Raphson.....So this is not currently operational (See Deathstar)
26422642// //V_inlet[nSpecies+7+nDim] = rhoCvve;
@@ -3002,7 +3002,7 @@ void CNEMOEulerSolver::LoadRestart(CGeometry **geometry, CSolver ***solver, CCon
30023002 }
30033003 solver[MESH_0][FLOW_SOL]->InitiateComms (geometry[MESH_0], config, SOLUTION);
30043004 solver[MESH_0][FLOW_SOL]->CompleteComms (geometry[MESH_0], config, SOLUTION);
3005- solver[iMesh][FLOW_SOL]->Preprocessing (geometry[iMesh], solver[iMesh], config, iMesh, NO_RK_ITER, RUNTIME_FLOW_SYS, false );
3005+ solver[iMesh][FLOW_SOL]->Preprocessing (geometry[iMesh], solver[iMesh], config, iMesh, NO_RK_ITER, RUNTIME_FLOW_SYS, false );
30063006 }
30073007
30083008 /* --- Update the geometry for flows on dynamic meshes ---*/
0 commit comments