![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Structure-of-Arrays storage for all subcatchments. More...
#include <SubcatchData.hpp>
Public Member Functions | |
| void | resize_total_load (int n_sc, int n_poll) |
| void | resize_coverage (int n_sc, int n_lu) |
| Resize the coverage matrix. | |
| int | count () const noexcept |
| void | resize (int n) |
| void | save_state () noexcept |
| void | reset_state () noexcept |
Public Attributes | |
| std::vector< int > | outlet_node |
| Index of the drain-to node or subcatchment. | |
| std::vector< int > | outlet_subcatch |
| Index of the subcatch that receives overflow (-1 if none). | |
| std::vector< std::string > | outlet_name |
| Outlet name string for deferred resolution. | |
| std::vector< int > | gage |
| Rain gage index for this subcatchment. | |
| std::vector< double > | area |
| Subcatchment area (project area units). | |
| std::vector< double > | width |
| Width of overland flow path (project length units). | |
| std::vector< double > | slope |
| Average slope of catchment (fraction). | |
| std::vector< double > | curb_length |
| Total curb length (project length units). | |
| std::vector< double > | frac_imperv |
| Fraction of area that is impervious (0–1). | |
| std::vector< double > | frac_imperv_no_store |
| Fraction of impervious area with no depression storage (0–1). | |
| std::vector< double > | n_imperv |
| Manning's n for impervious area. | |
| std::vector< double > | n_perv |
| Manning's n for pervious area. | |
| std::vector< double > | ds_imperv |
| Depression storage depth for impervious area (project length units). | |
| std::vector< double > | ds_perv |
| Depression storage depth for pervious area (project length units). | |
| std::vector< int > | subarea_routing |
| Inter-subarea routing mode. | |
| std::vector< double > | pct_routed |
| Fraction of runoff routed between subareas (0–1). | |
| std::vector< int > | infil_model |
| Infiltration model: 0=HORTON, 1=MOD_HORTON, 2=GREEN_AMPT, 3=MOD_GREEN_AMPT, 4=CURVE_NUMBER. | |
| std::vector< double > | infil_p1 |
| Infiltration param 1: f0 (Horton), suction (GA), CN (CN). | |
| std::vector< double > | infil_p2 |
| Infiltration param 2: fmin (Horton), conductivity (GA), 0 (CN). | |
| std::vector< double > | infil_p3 |
| Infiltration param 3: decay (Horton), initial deficit (GA), 0 (CN). | |
| std::vector< double > | infil_p4 |
| Infiltration param 4: dry time (Horton), 0 (GA/CN). | |
| std::vector< double > | infil_p5 |
| Infiltration param 5: max infil (Horton), 0 (GA/CN). | |
| std::vector< double > | runoff |
| Current total runoff flow rate (project flow units). | |
| std::vector< double > | rainfall |
| Current total rainfall depth rate (project length/time units). | |
| std::vector< double > | evap_loss |
| Current evaporation loss rate (project length/time units). | |
| std::vector< double > | infil_loss |
| Current infiltration loss rate (project length/time units). | |
| std::vector< double > | ponded_depth |
| Current total ponded depth over subcatchment (project length units). | |
| std::vector< double > | gw_flow |
| Groundwater outflow rate (project flow units). | |
| std::vector< double > | old_runoff |
| Runoff at the previous timestep. | |
| std::vector< double > | stat_precip_vol |
| Total precipitation volume (project volume units). | |
| std::vector< double > | stat_evap_vol |
| Cumulative evaporation volume (ft3) | |
| std::vector< double > | stat_infil_vol |
| Cumulative infiltration volume (ft3) | |
| std::vector< double > | stat_imperv_vol |
| Cumulative impervious runoff volume (ft3) | |
| std::vector< double > | stat_perv_vol |
| Cumulative pervious runoff volume (ft3) | |
| std::vector< double > | stat_runoff_vol |
| Total runoff volume (project volume units). | |
| std::vector< double > | stat_max_runoff |
| Maximum reported runoff rate (project flow units). | |
| std::vector< int > | gw_aquifer |
| Aquifer index for this subcatchment (-1 = none). | |
| std::vector< int > | gw_node |
| Receiving node index for groundwater flow (-1 = none). | |
| std::vector< double > | gw_surf_elev |
| Surface elevation for groundwater calculations. | |
| std::vector< double > | gw_a1 |
| Groundwater flow coefficient A1. | |
| std::vector< double > | gw_b1 |
| Groundwater flow exponent B1. | |
| std::vector< double > | gw_a2 |
| Groundwater flow coefficient A2. | |
| std::vector< double > | gw_b2 |
| Groundwater flow exponent B2. | |
| std::vector< double > | gw_a3 |
| Groundwater flow coefficient A3. | |
| std::vector< double > | gw_tw |
| Threshold groundwater table elevation. | |
| std::vector< double > | gw_hstar |
| Water table elevation at which lateral GW flow ceases. | |
| std::vector< int > | snowpack |
| Snowpack index for this subcatchment (-1 = none). | |
| std::vector< double > | total_load |
| Total washoff load per (subcatchment x pollutant) (mass units). | |
| int | total_load_n_pollutants = 0 |
| Number of pollutants in total_load matrix. | |
| std::vector< double > | coverage |
| Coverage fraction per (subcatchment x landuse). | |
| int | coverage_n_landuses = 0 |
| Number of landuses stored in the coverage matrix. | |
Structure-of-Arrays storage for all subcatchments.
Pollutant-related arrays are stored separately in PollutantData, indexed as [subcatch_idx * n_pollutants + pollutant_idx].
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
Resize the coverage matrix.
| n_sc | Number of subcatchments. |
| n_lu | Number of landuses. |
|
inline |
|
inlinenoexcept |
| std::vector<double> openswmm::SubcatchData::area |
| std::vector<double> openswmm::SubcatchData::coverage |
Coverage fraction per (subcatchment x landuse).
Indexed as [sc_idx * n_landuses + lu_idx]. Values are 0–1.
| int openswmm::SubcatchData::coverage_n_landuses = 0 |
Number of landuses stored in the coverage matrix.
| std::vector<double> openswmm::SubcatchData::curb_length |
Total curb length (project length units).
| std::vector<double> openswmm::SubcatchData::ds_imperv |
| std::vector<double> openswmm::SubcatchData::ds_perv |
| std::vector<double> openswmm::SubcatchData::evap_loss |
Current evaporation loss rate (project length/time units).
| std::vector<double> openswmm::SubcatchData::frac_imperv |
Fraction of area that is impervious (0–1).
| std::vector<double> openswmm::SubcatchData::frac_imperv_no_store |
Fraction of impervious area with no depression storage (0–1).
| std::vector<int> openswmm::SubcatchData::gage |
| std::vector<double> openswmm::SubcatchData::gw_a1 |
Groundwater flow coefficient A1.
| std::vector<double> openswmm::SubcatchData::gw_a2 |
Groundwater flow coefficient A2.
| std::vector<double> openswmm::SubcatchData::gw_a3 |
Groundwater flow coefficient A3.
| std::vector<int> openswmm::SubcatchData::gw_aquifer |
Aquifer index for this subcatchment (-1 = none).
| std::vector<double> openswmm::SubcatchData::gw_b1 |
Groundwater flow exponent B1.
| std::vector<double> openswmm::SubcatchData::gw_b2 |
Groundwater flow exponent B2.
| std::vector<double> openswmm::SubcatchData::gw_flow |
Groundwater outflow rate (project flow units).
| std::vector<double> openswmm::SubcatchData::gw_hstar |
Water table elevation at which lateral GW flow ceases.
| std::vector<int> openswmm::SubcatchData::gw_node |
Receiving node index for groundwater flow (-1 = none).
| std::vector<double> openswmm::SubcatchData::gw_surf_elev |
Surface elevation for groundwater calculations.
| std::vector<double> openswmm::SubcatchData::gw_tw |
Threshold groundwater table elevation.
| std::vector<double> openswmm::SubcatchData::infil_loss |
Current infiltration loss rate (project length/time units).
| std::vector<int> openswmm::SubcatchData::infil_model |
Infiltration model: 0=HORTON, 1=MOD_HORTON, 2=GREEN_AMPT, 3=MOD_GREEN_AMPT, 4=CURVE_NUMBER.
| std::vector<double> openswmm::SubcatchData::infil_p1 |
Infiltration param 1: f0 (Horton), suction (GA), CN (CN).
| std::vector<double> openswmm::SubcatchData::infil_p2 |
Infiltration param 2: fmin (Horton), conductivity (GA), 0 (CN).
| std::vector<double> openswmm::SubcatchData::infil_p3 |
Infiltration param 3: decay (Horton), initial deficit (GA), 0 (CN).
| std::vector<double> openswmm::SubcatchData::infil_p4 |
Infiltration param 4: dry time (Horton), 0 (GA/CN).
| std::vector<double> openswmm::SubcatchData::infil_p5 |
Infiltration param 5: max infil (Horton), 0 (GA/CN).
| std::vector<double> openswmm::SubcatchData::n_imperv |
| std::vector<double> openswmm::SubcatchData::n_perv |
| std::vector<double> openswmm::SubcatchData::old_runoff |
Runoff at the previous timestep.
| std::vector<std::string> openswmm::SubcatchData::outlet_name |
Outlet name string for deferred resolution.
Stored during parsing so PostParseResolver can re-resolve outlet_node / outlet_subcatch when sections appear out of order.
| std::vector<int> openswmm::SubcatchData::outlet_node |
| std::vector<int> openswmm::SubcatchData::outlet_subcatch |
Index of the subcatch that receives overflow (-1 if none).
| std::vector<double> openswmm::SubcatchData::pct_routed |
Fraction of runoff routed between subareas (0–1).
The remainder (1 - pct_routed) goes to the outlet. fOutlet = 1 - pct_routed for the routed subarea.
| std::vector<double> openswmm::SubcatchData::ponded_depth |
Current total ponded depth over subcatchment (project length units).
| std::vector<double> openswmm::SubcatchData::rainfall |
| std::vector<double> openswmm::SubcatchData::runoff |
Current total runoff flow rate (project flow units).
| std::vector<double> openswmm::SubcatchData::slope |
| std::vector<int> openswmm::SubcatchData::snowpack |
Snowpack index for this subcatchment (-1 = none).
| std::vector<double> openswmm::SubcatchData::stat_evap_vol |
Cumulative evaporation volume (ft3)
| std::vector<double> openswmm::SubcatchData::stat_imperv_vol |
Cumulative impervious runoff volume (ft3)
| std::vector<double> openswmm::SubcatchData::stat_infil_vol |
Cumulative infiltration volume (ft3)
| std::vector<double> openswmm::SubcatchData::stat_max_runoff |
Maximum reported runoff rate (project flow units).
| std::vector<double> openswmm::SubcatchData::stat_perv_vol |
Cumulative pervious runoff volume (ft3)
| std::vector<double> openswmm::SubcatchData::stat_precip_vol |
Total precipitation volume (project volume units).
| std::vector<double> openswmm::SubcatchData::stat_runoff_vol |
Total runoff volume (project volume units).
| std::vector<int> openswmm::SubcatchData::subarea_routing |
Inter-subarea routing mode.
0 = TO_OUTLET (all runoff goes to outlet), 1 = TO_IMPERV (pervious → impervious), 2 = TO_PERV (impervious → pervious).
| std::vector<double> openswmm::SubcatchData::total_load |
Total washoff load per (subcatchment x pollutant) (mass units).
| int openswmm::SubcatchData::total_load_n_pollutants = 0 |
Number of pollutants in total_load matrix.
| std::vector<double> openswmm::SubcatchData::width |