![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Structure-of-Arrays storage for all nodes. More...
#include <NodeData.hpp>
Public Member Functions | |
| int | count () const noexcept |
| Number of nodes. | |
| void | resize (int n) |
Resize all arrays to hold exactly n nodes. | |
| void | resize_loads (int n_pollutants) |
| Resize pollutant load arrays after pollutant count is known. | |
| void | save_state () noexcept |
| Snapshot current state into old-step arrays before solving. | |
| void | reset_state () noexcept |
| Zero all state variables (for a cold start). | |
Public Attributes | |
| std::vector< NodeType > | type |
| Node type for each node. | |
| std::vector< double > | invert_elev |
| Invert elevation (project length units). | |
| std::vector< double > | full_depth |
| Full depth of the node (project length units). | |
| std::vector< double > | init_depth |
| Initial water depth (project length units). | |
| std::vector< double > | sur_depth |
| Maximum depth allowed at the node (ponding or surcharge limit). | |
| std::vector< double > | ponded_area |
| Ponding area at the surface (sq project length units). | |
| std::vector< OutfallType > | outfall_type |
| Outfall boundary condition type. | |
| std::vector< double > | outfall_param |
| Fixed outfall stage or tidal curve / time series index. | |
| std::vector< bool > | outfall_has_flap_gate |
| True if the outfall has a gated flap. | |
| std::vector< int > | storage_curve |
| Storage curve index into TableData (CURVE_STORAGE). | |
| std::vector< std::string > | storage_curve_name |
| Curve name for deferred resolution (populated during parsing). | |
| std::vector< double > | storage_a |
| Functional storage area parameter A (area = A * depth^B + C). | |
| std::vector< double > | storage_b |
| Functional storage area parameter B. | |
| std::vector< double > | storage_c |
| Functional storage area parameter C (baseline area). | |
| std::vector< double > | storage_seep_rate |
| Seepage rate from storage node (project units/day). | |
| std::vector< double > | exfil_suction |
| Green-Ampt suction head for exfiltration (in or mm, converted to ft). | |
| std::vector< double > | exfil_ksat |
| Green-Ampt saturated hydraulic conductivity for exfiltration (in/hr or mm/hr, converted to ft/sec). | |
| std::vector< double > | exfil_imd |
| Green-Ampt initial moisture deficit for exfiltration (0-1). | |
| std::vector< DividerType > | divider_type |
| Divider method (DividerType enum value). | |
| std::vector< double > | divider_cutoff |
| Cutoff flow for CUTOFF dividers. | |
| std::vector< double > | divider_cd |
| Weir discharge coefficient for WEIR dividers. | |
| std::vector< double > | divider_max_depth |
| Weir max depth for WEIR dividers. | |
| std::vector< int > | divider_curve |
| Diversion curve index for TABULAR dividers (-1 = none). | |
| std::vector< int > | divider_link |
| Diversion link index (-1 = not set). | |
| std::vector< std::string > | divider_link_name |
| Diversion link name (for deferred resolution). | |
| std::vector< std::string > | divider_curve_name |
| Diversion curve name (for deferred resolution, TABULAR only). | |
| std::vector< double > | depth |
| Current water depth above invert (project length units). | |
| std::vector< double > | head |
| Current water surface head (project length units = invert + depth). | |
| std::vector< double > | volume |
| Current water volume (project volume units). | |
| std::vector< double > | lat_flow |
| Current lateral inflow (project flow units). | |
| std::vector< double > | user_lat_flow |
| User-forced lateral inflow set via the API (project flow units). | |
| std::vector< double > | inflow |
| Current total inflow to the node (project flow units). | |
| std::vector< double > | outflow |
| Current total outflow from the node (project flow units). | |
| std::vector< double > | overflow |
| Current overflow / ponded flow (project flow units). | |
| std::vector< double > | losses |
| Node losses (evaporation + seepage) (project flow units). | |
| std::vector< double > | crown_elev |
| Crown elevation — top of highest connecting conduit (project length units). | |
| std::vector< int > | degree |
| Node degree — number of connecting links (+ve downstream, -ve upstream terminal). | |
| std::vector< double > | old_net_inflow |
| Net inflow from previous timestep (inflow - outflow) for averaging. | |
| std::vector< double > | full_volume |
| Full volume at node (project volume units). | |
| std::vector< double > | old_depth |
| Depth at the previous timestep. | |
| std::vector< double > | old_volume |
| Volume at the previous timestep. | |
| std::vector< double > | old_lat_flow |
| Lateral flow at the previous timestep. | |
| std::vector< double > | stat_vol_flooded |
| Total volume of water lost as overflow (project volume units). | |
| std::vector< double > | stat_time_flooded |
| Total duration the node was flooded (seconds). | |
| std::vector< double > | stat_max_depth |
| Maximum reported depth (project length units). | |
| std::vector< double > | stat_max_overflow |
| Maximum reported overflow rate (project flow units). | |
| std::vector< double > | stat_outfall_avg_flow |
| Outfall cumulative average flow (flow units × reporting periods). | |
| std::vector< double > | stat_max_lat_inflow |
| std::vector< double > | stat_max_total_inflow |
| std::vector< double > | stat_lat_inflow_vol |
| std::vector< double > | stat_total_inflow_vol |
| Cumulative total inflow volume at each node (ft3). | |
| std::vector< double > | stat_outfall_max_flow |
| Outfall maximum flow (project flow units). | |
| std::vector< long > | stat_outfall_periods |
| Outfall number of non-zero flow periods. | |
| std::vector< double > | stat_total_load |
| Cumulative pollutant loads at each node. | |
| int | stat_n_pollutants = 0 |
Structure-of-Arrays storage for all nodes.
All parallel arrays are indexed by node index [0, count). Use SimulationContext::node_names to translate name → index.
Fields are divided into:
|
inlinenoexcept |
Number of nodes.
|
inlinenoexcept |
Zero all state variables (for a cold start).
|
inline |
Resize all arrays to hold exactly n nodes.
Called once during input parsing after the total node count is known. All numeric arrays are zero-initialized; type arrays use JUNCTION as the default.
|
inline |
Resize pollutant load arrays after pollutant count is known.
|
inlinenoexcept |
Snapshot current state into old-step arrays before solving.
| std::vector<double> openswmm::NodeData::crown_elev |
Crown elevation — top of highest connecting conduit (project length units).
| std::vector<int> openswmm::NodeData::degree |
| std::vector<double> openswmm::NodeData::depth |
Current water depth above invert (project length units).
| std::vector<double> openswmm::NodeData::divider_cd |
Weir discharge coefficient for WEIR dividers.
| std::vector<int> openswmm::NodeData::divider_curve |
Diversion curve index for TABULAR dividers (-1 = none).
| std::vector<std::string> openswmm::NodeData::divider_curve_name |
Diversion curve name (for deferred resolution, TABULAR only).
| std::vector<double> openswmm::NodeData::divider_cutoff |
Cutoff flow for CUTOFF dividers.
| std::vector<int> openswmm::NodeData::divider_link |
Diversion link index (-1 = not set).
| std::vector<std::string> openswmm::NodeData::divider_link_name |
Diversion link name (for deferred resolution).
| std::vector<double> openswmm::NodeData::divider_max_depth |
Weir max depth for WEIR dividers.
| std::vector<DividerType> openswmm::NodeData::divider_type |
Divider method (DividerType enum value).
| std::vector<double> openswmm::NodeData::exfil_imd |
Green-Ampt initial moisture deficit for exfiltration (0-1).
| std::vector<double> openswmm::NodeData::exfil_ksat |
Green-Ampt saturated hydraulic conductivity for exfiltration (in/hr or mm/hr, converted to ft/sec).
| std::vector<double> openswmm::NodeData::exfil_suction |
Green-Ampt suction head for exfiltration (in or mm, converted to ft).
| std::vector<double> openswmm::NodeData::full_depth |
Full depth of the node (project length units).
| std::vector<double> openswmm::NodeData::full_volume |
Full volume at node (project volume units).
| std::vector<double> openswmm::NodeData::head |
Current water surface head (project length units = invert + depth).
| std::vector<double> openswmm::NodeData::inflow |
| std::vector<double> openswmm::NodeData::init_depth |
Initial water depth (project length units).
| std::vector<double> openswmm::NodeData::invert_elev |
Invert elevation (project length units).
| std::vector<double> openswmm::NodeData::lat_flow |
Current lateral inflow (project flow units).
| std::vector<double> openswmm::NodeData::losses |
| std::vector<double> openswmm::NodeData::old_depth |
Depth at the previous timestep.
| std::vector<double> openswmm::NodeData::old_lat_flow |
Lateral flow at the previous timestep.
| std::vector<double> openswmm::NodeData::old_net_inflow |
Net inflow from previous timestep (inflow - outflow) for averaging.
| std::vector<double> openswmm::NodeData::old_volume |
Volume at the previous timestep.
| std::vector<bool> openswmm::NodeData::outfall_has_flap_gate |
True if the outfall has a gated flap.
| std::vector<double> openswmm::NodeData::outfall_param |
Fixed outfall stage or tidal curve / time series index.
If outfall_type == FIXED, stores the fixed water surface elevation. If TIDAL or TIMESERIES, stores the index into TableData.
| std::vector<OutfallType> openswmm::NodeData::outfall_type |
Outfall boundary condition type.
| std::vector<double> openswmm::NodeData::outflow |
| std::vector<double> openswmm::NodeData::overflow |
| std::vector<double> openswmm::NodeData::ponded_area |
Ponding area at the surface (sq project length units).
| std::vector<double> openswmm::NodeData::stat_lat_inflow_vol |
Cumulative lateral inflow volume at each node (ft3).
| std::vector<double> openswmm::NodeData::stat_max_depth |
Maximum reported depth (project length units).
| std::vector<double> openswmm::NodeData::stat_max_lat_inflow |
Maximum lateral inflow at each node (project flow units).
| std::vector<double> openswmm::NodeData::stat_max_overflow |
Maximum reported overflow rate (project flow units).
| std::vector<double> openswmm::NodeData::stat_max_total_inflow |
Maximum total inflow at each node (project flow units).
| int openswmm::NodeData::stat_n_pollutants = 0 |
| std::vector<double> openswmm::NodeData::stat_outfall_avg_flow |
Outfall cumulative average flow (flow units × reporting periods).
| std::vector<double> openswmm::NodeData::stat_outfall_max_flow |
Outfall maximum flow (project flow units).
| std::vector<long> openswmm::NodeData::stat_outfall_periods |
Outfall number of non-zero flow periods.
| std::vector<double> openswmm::NodeData::stat_time_flooded |
Total duration the node was flooded (seconds).
| std::vector<double> openswmm::NodeData::stat_total_inflow_vol |
Cumulative total inflow volume at each node (ft3).
| std::vector<double> openswmm::NodeData::stat_total_load |
Cumulative pollutant loads at each node.
Flat 2D: [node * n_pollutants + p]. Only meaningful for outfall nodes. Resized by resize_loads() after pollutant count is known.
| std::vector<double> openswmm::NodeData::stat_vol_flooded |
Total volume of water lost as overflow (project volume units).
| std::vector<double> openswmm::NodeData::storage_a |
Functional storage area parameter A (area = A * depth^B + C).
| std::vector<double> openswmm::NodeData::storage_b |
Functional storage area parameter B.
| std::vector<double> openswmm::NodeData::storage_c |
Functional storage area parameter C (baseline area).
| std::vector<int> openswmm::NodeData::storage_curve |
Storage curve index into TableData (CURVE_STORAGE).
-1 if storage uses functional relationship (a,b,c parameters).
| std::vector<std::string> openswmm::NodeData::storage_curve_name |
Curve name for deferred resolution (populated during parsing).
| std::vector<double> openswmm::NodeData::storage_seep_rate |
Seepage rate from storage node (project units/day).
| std::vector<double> openswmm::NodeData::sur_depth |
Maximum depth allowed at the node (ponding or surcharge limit).
| std::vector<NodeType> openswmm::NodeData::type |
Node type for each node.
| std::vector<double> openswmm::NodeData::user_lat_flow |
User-forced lateral inflow set via the API (project flow units).
Unlike lat_flow, this is not cleared between routing steps. The value persists until the user explicitly changes it and is added to lat_flow at each routing step.
| std::vector<double> openswmm::NodeData::volume |
Current water volume (project volume units).