OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm::SubcatchData Struct Reference

Structure-of-Arrays storage for all subcatchments. More...

#include <SubcatchData.hpp>

Collaboration diagram for openswmm::SubcatchData:

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.
 

Detailed Description

Structure-of-Arrays storage for all subcatchments.

Pollutant-related arrays are stored separately in PollutantData, indexed as [subcatch_idx * n_pollutants + pollutant_idx].

Member Function Documentation

◆ count()

int openswmm::SubcatchData::count ( ) const
inlinenoexcept
Here is the caller graph for this function:

◆ reset_state()

void openswmm::SubcatchData::reset_state ( )
inlinenoexcept
Here is the caller graph for this function:

◆ resize()

void openswmm::SubcatchData::resize ( int  n)
inline
Here is the caller graph for this function:

◆ resize_coverage()

void openswmm::SubcatchData::resize_coverage ( int  n_sc,
int  n_lu 
)
inline

Resize the coverage matrix.

Parameters
n_scNumber of subcatchments.
n_luNumber of landuses.

◆ resize_total_load()

void openswmm::SubcatchData::resize_total_load ( int  n_sc,
int  n_poll 
)
inline

◆ save_state()

void openswmm::SubcatchData::save_state ( )
inlinenoexcept
Here is the caller graph for this function:

Member Data Documentation

◆ area

std::vector<double> openswmm::SubcatchData::area

Subcatchment area (project area units).

See also
Legacy: Subcatch[i].area

◆ coverage

std::vector<double> openswmm::SubcatchData::coverage

Coverage fraction per (subcatchment x landuse).

Indexed as [sc_idx * n_landuses + lu_idx]. Values are 0–1.

◆ coverage_n_landuses

int openswmm::SubcatchData::coverage_n_landuses = 0

Number of landuses stored in the coverage matrix.

◆ curb_length

std::vector<double> openswmm::SubcatchData::curb_length

Total curb length (project length units).

See also
Legacy: Subcatch[i].curbLength

◆ ds_imperv

std::vector<double> openswmm::SubcatchData::ds_imperv

Depression storage depth for impervious area (project length units).

See also
Legacy: Subcatch[i].subArea[IMPERV0].dStore

◆ ds_perv

std::vector<double> openswmm::SubcatchData::ds_perv

Depression storage depth for pervious area (project length units).

See also
Legacy: Subcatch[i].subArea[PERV].dStore

◆ evap_loss

std::vector<double> openswmm::SubcatchData::evap_loss

Current evaporation loss rate (project length/time units).

See also
Legacy: Subcatch[i].evapLoss

◆ frac_imperv

std::vector<double> openswmm::SubcatchData::frac_imperv

Fraction of area that is impervious (0–1).

See also
Legacy: Subcatch[i].fracImperv

◆ frac_imperv_no_store

std::vector<double> openswmm::SubcatchData::frac_imperv_no_store

Fraction of impervious area with no depression storage (0–1).

See also
Legacy: Subcatch[i].fracImperv2 (EPA calls it fracStoreImperv)

◆ gage

std::vector<int> openswmm::SubcatchData::gage

Rain gage index for this subcatchment.

See also
Legacy: Subcatch[i].gage

◆ gw_a1

std::vector<double> openswmm::SubcatchData::gw_a1

Groundwater flow coefficient A1.

◆ gw_a2

std::vector<double> openswmm::SubcatchData::gw_a2

Groundwater flow coefficient A2.

◆ gw_a3

std::vector<double> openswmm::SubcatchData::gw_a3

Groundwater flow coefficient A3.

◆ gw_aquifer

std::vector<int> openswmm::SubcatchData::gw_aquifer

Aquifer index for this subcatchment (-1 = none).

◆ gw_b1

std::vector<double> openswmm::SubcatchData::gw_b1

Groundwater flow exponent B1.

◆ gw_b2

std::vector<double> openswmm::SubcatchData::gw_b2

Groundwater flow exponent B2.

◆ gw_flow

std::vector<double> openswmm::SubcatchData::gw_flow

Groundwater outflow rate (project flow units).

See also
Legacy: Subcatch[i].groundwater->newFlow

◆ gw_hstar

std::vector<double> openswmm::SubcatchData::gw_hstar

Water table elevation at which lateral GW flow ceases.

◆ gw_node

std::vector<int> openswmm::SubcatchData::gw_node

Receiving node index for groundwater flow (-1 = none).

◆ gw_surf_elev

std::vector<double> openswmm::SubcatchData::gw_surf_elev

Surface elevation for groundwater calculations.

◆ gw_tw

std::vector<double> openswmm::SubcatchData::gw_tw

Threshold groundwater table elevation.

◆ infil_loss

std::vector<double> openswmm::SubcatchData::infil_loss

Current infiltration loss rate (project length/time units).

See also
Legacy: Subcatch[i].infilLoss

◆ infil_model

std::vector<int> openswmm::SubcatchData::infil_model

Infiltration model: 0=HORTON, 1=MOD_HORTON, 2=GREEN_AMPT, 3=MOD_GREEN_AMPT, 4=CURVE_NUMBER.

◆ infil_p1

std::vector<double> openswmm::SubcatchData::infil_p1

Infiltration param 1: f0 (Horton), suction (GA), CN (CN).

◆ infil_p2

std::vector<double> openswmm::SubcatchData::infil_p2

Infiltration param 2: fmin (Horton), conductivity (GA), 0 (CN).

◆ infil_p3

std::vector<double> openswmm::SubcatchData::infil_p3

Infiltration param 3: decay (Horton), initial deficit (GA), 0 (CN).

◆ infil_p4

std::vector<double> openswmm::SubcatchData::infil_p4

Infiltration param 4: dry time (Horton), 0 (GA/CN).

◆ infil_p5

std::vector<double> openswmm::SubcatchData::infil_p5

Infiltration param 5: max infil (Horton), 0 (GA/CN).

◆ n_imperv

std::vector<double> openswmm::SubcatchData::n_imperv

Manning's n for impervious area.

See also
Legacy: Subcatch[i].subArea[IMPERV0].N

◆ n_perv

std::vector<double> openswmm::SubcatchData::n_perv

Manning's n for pervious area.

See also
Legacy: Subcatch[i].subArea[PERV].N

◆ old_runoff

std::vector<double> openswmm::SubcatchData::old_runoff

Runoff at the previous timestep.

◆ outlet_name

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.

◆ outlet_node

std::vector<int> openswmm::SubcatchData::outlet_node

Index of the drain-to node or subcatchment.

>= 0 means drains to a node; negative value used internally to encode a subcatchment drain-to relationship.

See also
Legacy: Subcatch[i].outNode / Subcatch[i].outSubcatch

◆ outlet_subcatch

std::vector<int> openswmm::SubcatchData::outlet_subcatch

Index of the subcatch that receives overflow (-1 if none).

See also
Legacy: Subcatch[i].outSubcatch

◆ pct_routed

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.

See also
Legacy: Subcatch[i].subArea[k].fOutlet = 1 - pctRouted

◆ ponded_depth

std::vector<double> openswmm::SubcatchData::ponded_depth

Current total ponded depth over subcatchment (project length units).

See also
Legacy: Subcatch[i].newSnowDepth (repurposed for liquid depth)

◆ rainfall

std::vector<double> openswmm::SubcatchData::rainfall

Current total rainfall depth rate (project length/time units).

See also
Legacy: Subcatch[i].rainfall

◆ runoff

std::vector<double> openswmm::SubcatchData::runoff

Current total runoff flow rate (project flow units).

See also
Legacy: Subcatch[i].newRunoff

◆ slope

std::vector<double> openswmm::SubcatchData::slope

Average slope of catchment (fraction).

See also
Legacy: Subcatch[i].slope

◆ snowpack

std::vector<int> openswmm::SubcatchData::snowpack

Snowpack index for this subcatchment (-1 = none).

◆ stat_evap_vol

std::vector<double> openswmm::SubcatchData::stat_evap_vol

Cumulative evaporation volume (ft3)

◆ stat_imperv_vol

std::vector<double> openswmm::SubcatchData::stat_imperv_vol

Cumulative impervious runoff volume (ft3)

◆ stat_infil_vol

std::vector<double> openswmm::SubcatchData::stat_infil_vol

Cumulative infiltration volume (ft3)

◆ stat_max_runoff

std::vector<double> openswmm::SubcatchData::stat_max_runoff

Maximum reported runoff rate (project flow units).

See also
Legacy: SubcatchStats[i].maxFlow

◆ stat_perv_vol

std::vector<double> openswmm::SubcatchData::stat_perv_vol

Cumulative pervious runoff volume (ft3)

◆ stat_precip_vol

std::vector<double> openswmm::SubcatchData::stat_precip_vol

Total precipitation volume (project volume units).

See also
Legacy: SubcatchStats[i].precip

◆ stat_runoff_vol

std::vector<double> openswmm::SubcatchData::stat_runoff_vol

Total runoff volume (project volume units).

See also
Legacy: SubcatchStats[i].runoff

◆ subarea_routing

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).

See also
Legacy: Subcatch[i].subArea[k].routeTo

◆ total_load

std::vector<double> openswmm::SubcatchData::total_load

Total washoff load per (subcatchment x pollutant) (mass units).

See also
Legacy: Subcatch[i].totalLoad[p]

◆ total_load_n_pollutants

int openswmm::SubcatchData::total_load_n_pollutants = 0

Number of pollutants in total_load matrix.

◆ width

std::vector<double> openswmm::SubcatchData::width

Width of overland flow path (project length units).

See also
Legacy: Subcatch[i].width

The documentation for this struct was generated from the following file: