@@ -495,6 +495,30 @@ void CConfig::addInletSpeciesOption(const string& name, unsigned short & nMarker
495495 option_map.insert (pair<string, COptionBase *>(name, val));
496496}
497497
498+ void CConfig::addWallSpeciesOption (const string& name, unsigned short & nMarker_Wall_Species,
499+ string * & Marker_Wall_Species, su2double** & wall_species_val,
500+ unsigned short & nSpecies_per_Wall) {
501+ assert (option_map.find (name) == option_map.end ());
502+ all_options.insert (pair<string, bool >(name, true ));
503+
504+ COptionBase* val = new COptionStringValuesList<su2double*>(name, nMarker_Wall_Species, Marker_Wall_Species,
505+ wall_species_val, nSpecies_per_Wall);
506+ option_map.insert (pair<string, COptionBase *>(name, val));
507+ }
508+
509+ void CConfig::addWallSpeciesType (const string& name, unsigned short & nMarker_Wall_Species,
510+ // string * & Marker_Wall_Species, WALL_SPECIES_TYPE** & wall_species_type,
511+ string * & Marker_Wall_Species, unsigned short ** & wall_species_type,
512+ unsigned short & nSpecies_per_Wall) {
513+ assert (option_map.find (name) == option_map.end ());
514+ all_options.insert (pair<string, bool >(name, true ));
515+
516+ // COptionBase* val = new COptionStringValuesList<WALL_SPECIES_TYPE*>(name, nMarker_Wall_Species, Marker_Wall_Species,
517+ COptionBase* val = new COptionStringValuesList<unsigned short *>(name, nMarker_Wall_Species, Marker_Wall_Species,
518+ wall_species_type, nSpecies_per_Wall);
519+ option_map.insert (pair<string, COptionBase *>(name, val));
520+ }
521+
498522void CConfig::addInletTurbOption (const string& name, unsigned short & nMarker_Inlet_Turb, string*& Marker_Inlet_Turb,
499523 su2double**& Turb_Properties_val, unsigned short & nTurb_Properties) {
500524 assert (option_map.find (name) == option_map.end ());
@@ -891,6 +915,7 @@ void CConfig::SetPointersNull() {
891915 Inlet_FlowDir = nullptr ; Inlet_Temperature = nullptr ; Inlet_Pressure = nullptr ;
892916 Inlet_Velocity = nullptr ;
893917 Outlet_Pressure = nullptr ; Inlet_SpeciesVal = nullptr ; Inlet_TurbVal = nullptr ;
918+ Wall_SpeciesVal = nullptr ;
894919
895920 /* --- Engine Boundary Condition settings ---*/
896921
@@ -982,6 +1007,8 @@ void CConfig::SetPointersNull() {
9821007 Kind_Inc_Inlet = nullptr ;
9831008 Kind_Inc_Outlet = nullptr ;
9841009
1010+ Wall_SpeciesType = nullptr ;
1011+
9851012 Kind_ObjFunc = nullptr ;
9861013
9871014 Weight_ObjFunc = nullptr ;
@@ -1571,6 +1598,8 @@ void CConfig::SetConfig_Options() {
15711598 addEnumOption (" INLET_TYPE" , Kind_Inlet, Inlet_Map, INLET_TYPE::TOTAL_CONDITIONS);
15721599 /* !\brief INC_INLET_TYPE \n DESCRIPTION: List of inlet types for incompressible flows. List length must match number of inlet markers. Options: VELOCITY_INLET, PRESSURE_INLET, INPUT_FILE. \ingroup Config*/
15731600 addEnumListOption (" INC_INLET_TYPE" , nInc_Inlet, Kind_Inc_Inlet, Inlet_Map);
1601+
1602+
15741603 addBoolOption (" SPECIFIED_INLET_PROFILE" , Inlet_From_File, false );
15751604 /* !\brief INLET_FILENAME \n DESCRIPTION: Input file for a specified inlet profile (w/ extension) \n DEFAULT: inlet.dat \ingroup Config*/
15761605 addStringOption (" INLET_FILENAME" , Inlet_Filename, string (" inlet.dat" ));
@@ -1590,6 +1619,10 @@ void CConfig::SetConfig_Options() {
15901619 /* !\brief MARKER_INLET_SPECIES \n DESCRIPTION: Inlet Species boundary marker(s) with the following format
15911620 Inlet Species: (inlet_marker, Species1, Species2, ..., SpeciesN-1, inlet_marker2, Species1, Species2, ...) */
15921621 addInletSpeciesOption (" MARKER_INLET_SPECIES" ,nMarker_Inlet_Species, Marker_Inlet_Species, Inlet_SpeciesVal, nSpecies_per_Inlet);
1622+ addWallSpeciesOption (" MARKER_WALL_SPECIES" ,nMarker_Wall_Species , Marker_Wall_Species , Wall_SpeciesVal , nSpecies_per_Wall);
1623+ addWallSpeciesType (" WALL_SPECIES_TYPE" ,nMarker_Wall_Species , Marker_Wall_Species , Wall_SpeciesType , nSpecies_per_Wall);
1624+
1625+
15931626 /* !\brief MARKER_INLET_TURBULENT \n DESCRIPTION: Inlet Turbulence boundary marker(s) with the following format
15941627 Inlet Turbulent: (inlet_marker, TurbulentIntensity1, ViscosityRatio1, inlet_marker2, TurbulentIntensity2,
15951628 ViscosityRatio2, ...) */
@@ -5578,10 +5611,12 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
55785611 CURRENT_FUNCTION);
55795612
55805613 // Helper function that checks scalar variable bounds,
5581- auto checkScalarBounds = [&](su2double scalar, const string& name, su2double lowerBound, su2double upperBound) {
5582- if (scalar < lowerBound || scalar > upperBound)
5583- SU2_MPI::Error (string (" Variable: " ) + name + string (" , is out of bounds." ), CURRENT_FUNCTION);
5584- };
5614+
5615+ cout << " Note: we do not check boudns for scalars anymore." << endl;
5616+ // auto checkScalarBounds = [&](su2double scalar, const string& name, su2double lowerBound, su2double upperBound) {
5617+ // if (scalar < lowerBound || scalar > upperBound)
5618+ // SU2_MPI::Error(string("Variable: ") + name + string(", is out of bounds."), CURRENT_FUNCTION);
5619+ // };
55855620
55865621 /* --- Some options have to provide as many entries as there are additional species equations. ---*/
55875622 /* --- Fill a vector with the entires and then check if each element is equal to the first one. ---*/
@@ -5603,23 +5638,24 @@ void CConfig::SetPostprocessing(SU2_COMPONENT val_software, unsigned short val_i
56035638
56045639 /* --- Check whether some variables (or their sums) are in physical bounds. [0,1] for species related quantities. ---*/
56055640 /* --- Note, only for species transport, not for flamelet model ---*/
5606- if (Kind_Species_Model == SPECIES_MODEL::SPECIES_TRANSPORT) {
5607- su2double Species_Init_Sum = 0.0 ;
5608- for (unsigned short iSpecies = 0 ; iSpecies < nSpecies; iSpecies++) {
5609- checkScalarBounds (Species_Init[iSpecies], " SPECIES_INIT individual" , 0.0 , 1.0 );
5610- Species_Init_Sum += Species_Init[iSpecies];
5611- }
5612- checkScalarBounds (Species_Init_Sum, " SPECIES_INIT sum" , 0.0 , 1.0 );
5613-
5614- for (iMarker = 0 ; iMarker < nMarker_Inlet_Species; iMarker++) {
5615- su2double Inlet_SpeciesVal_Sum = 0.0 ;
5616- for (unsigned short iSpecies = 0 ; iSpecies < nSpecies; iSpecies++) {
5617- checkScalarBounds (Inlet_SpeciesVal[iMarker][iSpecies], " MARKER_INLET_SPECIES individual" , 0.0 , 1.0 );
5618- Inlet_SpeciesVal_Sum += Inlet_SpeciesVal[iMarker][iSpecies];
5619- }
5620- checkScalarBounds (Inlet_SpeciesVal_Sum, " MARKER_INLET_SPECIES sum" , 0.0 , 1.0 );
5621- }
5622- }
5641+ cout << " warning: no bounds checked for species" << endl;
5642+ // if (Kind_Species_Model == SPECIES_MODEL::SPECIES_TRANSPORT) {
5643+ // su2double Species_Init_Sum = 0.0;
5644+ // for (unsigned short iSpecies = 0; iSpecies < nSpecies; iSpecies++) {
5645+ // checkScalarBounds(Species_Init[iSpecies], "SPECIES_INIT individual", 0.0, 1.0);
5646+ // Species_Init_Sum += Species_Init[iSpecies];
5647+ // }
5648+ // checkScalarBounds(Species_Init_Sum, "SPECIES_INIT sum", 0.0, 1.0);
5649+
5650+ // for (iMarker = 0; iMarker < nMarker_Inlet_Species; iMarker++) {
5651+ // su2double Inlet_SpeciesVal_Sum = 0.0;
5652+ // for (unsigned short iSpecies = 0; iSpecies < nSpecies; iSpecies++) {
5653+ // checkScalarBounds(Inlet_SpeciesVal[iMarker][iSpecies], "MARKER_INLET_SPECIES individual", 0.0, 1.0);
5654+ // Inlet_SpeciesVal_Sum += Inlet_SpeciesVal[iMarker][iSpecies];
5655+ // }
5656+ // checkScalarBounds(Inlet_SpeciesVal_Sum, "MARKER_INLET_SPECIES sum", 0.0, 1.0);
5657+ // }
5658+ // }
56235659
56245660 } // species transport checks
56255661
@@ -5644,7 +5680,7 @@ void CConfig::SetMarkers(SU2_COMPONENT val_software) {
56445680 iMarker_FarField, iMarker_SymWall, iMarker_PerBound,
56455681 iMarker_NearFieldBound, iMarker_Fluid_InterfaceBound,
56465682 iMarker_Inlet, iMarker_Riemann, iMarker_Giles, iMarker_Outlet,
5647- iMarker_Smoluchowski_Maxwell,
5683+ iMarker_Smoluchowski_Maxwell, iMarker_Wall,
56485684 iMarker_Isothermal,iMarker_HeatFlux,iMarker_HeatTansfer,
56495685 iMarker_EngineInflow, iMarker_EngineExhaust, iMarker_Damper,
56505686 iMarker_Displacement, iMarker_Load, iMarker_Internal,
@@ -6206,7 +6242,7 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
62066242
62076243 unsigned short iMarker_Euler, iMarker_Custom, iMarker_FarField,
62086244 iMarker_SymWall, iMarker_PerBound, iMarker_NearFieldBound,
6209- iMarker_Fluid_InterfaceBound, iMarker_Inlet, iMarker_Riemann,
6245+ iMarker_Fluid_InterfaceBound, iMarker_Inlet, iMarker_Riemann, iMarker_Wall,
62106246 iMarker_Deform_Mesh, iMarker_Deform_Mesh_Sym_Plane, iMarker_Fluid_Load,
62116247 iMarker_Smoluchowski_Maxwell, iWall_Catalytic,
62126248 iMarker_Giles, iMarker_Outlet, iMarker_Isothermal, iMarker_HeatFlux, iMarker_HeatTransfer,
@@ -7537,7 +7573,14 @@ void CConfig::SetOutput(SU2_COMPONENT val_software, unsigned short val_izone) {
75377573 }
75387574 BoundaryTable.PrintFooter ();
75397575 }
7540-
7576+ if (nMarker_Wall_Species != 0 ) {
7577+ BoundaryTable << " Species Wall boundary" ;
7578+ for (iMarker_Wall = 0 ; iMarker_Wall < nMarker_Wall_Species; iMarker_Wall++) {
7579+ BoundaryTable << Marker_Wall_Species[iMarker_Wall];
7580+ if (iMarker_Wall < nMarker_Wall_Species-1 ) BoundaryTable << " " ;
7581+ }
7582+ BoundaryTable.PrintFooter ();
7583+ }
75417584 if (nMarker_Riemann != 0 ) {
75427585 BoundaryTable << " Riemann boundary" ;
75437586 for (iMarker_Riemann = 0 ; iMarker_Riemann < nMarker_Riemann; iMarker_Riemann++) {
@@ -9028,13 +9071,23 @@ su2double CConfig::GetExhaust_Pressure_Target(const string& val_marker) const {
90289071 return Exhaust_Pressure_Target[iMarker_EngineExhaust];
90299072}
90309073
9074+
90319075INLET_TYPE CConfig::GetKind_Inc_Inlet (const string& val_marker) const {
90329076 unsigned short iMarker_Inlet;
90339077 for (iMarker_Inlet = 0 ; iMarker_Inlet < nMarker_Inlet; iMarker_Inlet++)
90349078 if (Marker_Inlet[iMarker_Inlet] == val_marker) break ;
90359079 return Kind_Inc_Inlet[iMarker_Inlet];
90369080}
90379081
9082+
9083+ // WALL_SPECIES_TYPE* CConfig::GetKind_Wall_Species(const string& val_marker) const {
9084+ // unsigned short * CConfig::GetKind_Wall_Species(const string& val_marker) const {
9085+ // unsigned short iMarker_Wall_Species;
9086+ // for (iMarker_Wall_Species = 0; iMarker_Wall_Species < nMarker_Wall_Species; iMarker_Wall_Species++)
9087+ // if (Marker_Wall_Species[iMarker_Wall_Species] == val_marker) break;
9088+ // return Wall_SpeciesType[iMarker_Wall_Species];
9089+ // }
9090+
90389091INC_OUTLET_TYPE CConfig::GetKind_Inc_Outlet (const string& val_marker) const {
90399092 unsigned short iMarker_Outlet;
90409093 for (iMarker_Outlet = 0 ; iMarker_Outlet < nMarker_Outlet; iMarker_Outlet++)
@@ -9098,6 +9151,20 @@ const su2double* CConfig::GetInlet_SpeciesVal(const string& val_marker) const {
90989151 return Inlet_SpeciesVal[iMarker_Inlet_Species];
90999152}
91009153
9154+ const su2double* CConfig::GetWall_SpeciesVal (const string& val_marker) const {
9155+ unsigned short iMarker_Wall_Species;
9156+ for (iMarker_Wall_Species = 0 ; iMarker_Wall_Species < nMarker_Wall_Species; iMarker_Wall_Species++)
9157+ if (Marker_Wall_Species[iMarker_Wall_Species] == val_marker) break ;
9158+ return Wall_SpeciesVal[iMarker_Wall_Species];
9159+ }
9160+ // const WALL_SPECIES_TYPE* CConfig::GetWall_SpeciesType(const string& val_marker) const {
9161+ const unsigned short * CConfig::GetWall_SpeciesType (const string& val_marker) const {
9162+ unsigned short iMarker_Wall_Species;
9163+ for (iMarker_Wall_Species = 0 ; iMarker_Wall_Species < nMarker_Wall_Species; iMarker_Wall_Species++)
9164+ if (Marker_Wall_Species[iMarker_Wall_Species] == val_marker) break ;
9165+ return Wall_SpeciesType[iMarker_Wall_Species];
9166+ }
9167+
91019168const su2double* CConfig::GetInlet_TurbVal (const string& val_marker) const {
91029169 /* --- If Turbulent Inlet is not provided for the marker, return free stream values. ---*/
91039170 for (auto iMarker = 0u ; iMarker < nMarker_Inlet_Turb; iMarker++) {
0 commit comments