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

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

#include <NodeData.hpp>

Collaboration diagram for openswmm::NodeData:

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< NodeTypetype
 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< OutfallTypeoutfall_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< DividerTypedivider_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
 

Detailed Description

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:

  • Static properties (set during input parsing, not changed during sim)
  • State variables (updated each timestep by the hydraulic solver)
  • Cumulative statistics (totals updated each timestep)

Member Function Documentation

◆ count()

int openswmm::NodeData::count ( ) const
inlinenoexcept

Number of nodes.

Here is the caller graph for this function:

◆ reset_state()

void openswmm::NodeData::reset_state ( )
inlinenoexcept

Zero all state variables (for a cold start).

Here is the caller graph for this function:

◆ resize()

void openswmm::NodeData::resize ( int  n)
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.

Here is the caller graph for this function:

◆ resize_loads()

void openswmm::NodeData::resize_loads ( int  n_pollutants)
inline

Resize pollutant load arrays after pollutant count is known.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ save_state()

void openswmm::NodeData::save_state ( )
inlinenoexcept

Snapshot current state into old-step arrays before solving.

Here is the caller graph for this function:

Member Data Documentation

◆ crown_elev

std::vector<double> openswmm::NodeData::crown_elev

Crown elevation — top of highest connecting conduit (project length units).

See also
Legacy: Node[i].crownElev

◆ degree

std::vector<int> openswmm::NodeData::degree

Node degree — number of connecting links (+ve downstream, -ve upstream terminal).

See also
Legacy: Node[i].degree

◆ depth

std::vector<double> openswmm::NodeData::depth

Current water depth above invert (project length units).

See also
Legacy: Node[i].newDepth

◆ divider_cd

std::vector<double> openswmm::NodeData::divider_cd

Weir discharge coefficient for WEIR dividers.

◆ divider_curve

std::vector<int> openswmm::NodeData::divider_curve

Diversion curve index for TABULAR dividers (-1 = none).

◆ divider_curve_name

std::vector<std::string> openswmm::NodeData::divider_curve_name

Diversion curve name (for deferred resolution, TABULAR only).

◆ divider_cutoff

std::vector<double> openswmm::NodeData::divider_cutoff

Cutoff flow for CUTOFF dividers.

◆ divider_link

std::vector<int> openswmm::NodeData::divider_link

Diversion link index (-1 = not set).

◆ divider_link_name

std::vector<std::string> openswmm::NodeData::divider_link_name

Diversion link name (for deferred resolution).

◆ divider_max_depth

std::vector<double> openswmm::NodeData::divider_max_depth

Weir max depth for WEIR dividers.

◆ divider_type

std::vector<DividerType> openswmm::NodeData::divider_type

Divider method (DividerType enum value).

◆ exfil_imd

std::vector<double> openswmm::NodeData::exfil_imd

Green-Ampt initial moisture deficit for exfiltration (0-1).

◆ exfil_ksat

std::vector<double> openswmm::NodeData::exfil_ksat

Green-Ampt saturated hydraulic conductivity for exfiltration (in/hr or mm/hr, converted to ft/sec).

◆ exfil_suction

std::vector<double> openswmm::NodeData::exfil_suction

Green-Ampt suction head for exfiltration (in or mm, converted to ft).

◆ full_depth

std::vector<double> openswmm::NodeData::full_depth

Full depth of the node (project length units).

See also
Legacy: Node[i].fullDepth

◆ full_volume

std::vector<double> openswmm::NodeData::full_volume

Full volume at node (project volume units).

See also
Legacy: Node[i].fullVolume

◆ head

std::vector<double> openswmm::NodeData::head

Current water surface head (project length units = invert + depth).

See also
Legacy: Node[i].newHead

◆ inflow

std::vector<double> openswmm::NodeData::inflow

Current total inflow to the node (project flow units).

See also
Legacy: Node[i].inflow

◆ init_depth

std::vector<double> openswmm::NodeData::init_depth

Initial water depth (project length units).

See also
Legacy: Node[i].initDepth

◆ invert_elev

std::vector<double> openswmm::NodeData::invert_elev

Invert elevation (project length units).

See also
Legacy: Node[i].invertElev

◆ lat_flow

std::vector<double> openswmm::NodeData::lat_flow

Current lateral inflow (project flow units).

See also
Legacy: Node[i].newLatFlow

◆ losses

std::vector<double> openswmm::NodeData::losses

Node losses (evaporation + seepage) (project flow units).

See also
Legacy: Node[i].losses

◆ old_depth

std::vector<double> openswmm::NodeData::old_depth

Depth at the previous timestep.

◆ old_lat_flow

std::vector<double> openswmm::NodeData::old_lat_flow

Lateral flow at the previous timestep.

◆ old_net_inflow

std::vector<double> openswmm::NodeData::old_net_inflow

Net inflow from previous timestep (inflow - outflow) for averaging.

See also
Legacy: Node[i].oldNetInflow

◆ old_volume

std::vector<double> openswmm::NodeData::old_volume

Volume at the previous timestep.

◆ outfall_has_flap_gate

std::vector<bool> openswmm::NodeData::outfall_has_flap_gate

True if the outfall has a gated flap.

◆ outfall_param

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.

◆ outfall_type

std::vector<OutfallType> openswmm::NodeData::outfall_type

Outfall boundary condition type.

◆ outflow

std::vector<double> openswmm::NodeData::outflow

Current total outflow from the node (project flow units).

See also
Legacy: Node[i].outflow

◆ overflow

std::vector<double> openswmm::NodeData::overflow

Current overflow / ponded flow (project flow units).

See also
Legacy: Node[i].overflow

◆ ponded_area

std::vector<double> openswmm::NodeData::ponded_area

Ponding area at the surface (sq project length units).

See also
Legacy: Node[i].pondedArea

◆ stat_lat_inflow_vol

std::vector<double> openswmm::NodeData::stat_lat_inflow_vol

Cumulative lateral inflow volume at each node (ft3).

See also
Legacy: NodeStats[i].totLatFlow

◆ stat_max_depth

std::vector<double> openswmm::NodeData::stat_max_depth

Maximum reported depth (project length units).

See also
Legacy: NodeStats[i].maxDepth

◆ stat_max_lat_inflow

std::vector<double> openswmm::NodeData::stat_max_lat_inflow

Maximum lateral inflow at each node (project flow units).

See also
Legacy: NodeStats[i].maxLatFlow

◆ stat_max_overflow

std::vector<double> openswmm::NodeData::stat_max_overflow

Maximum reported overflow rate (project flow units).

See also
Legacy: NodeStats[i].maxOverflow

◆ stat_max_total_inflow

std::vector<double> openswmm::NodeData::stat_max_total_inflow

Maximum total inflow at each node (project flow units).

See also
Legacy: NodeStats[i].maxInflow

◆ stat_n_pollutants

int openswmm::NodeData::stat_n_pollutants = 0

◆ stat_outfall_avg_flow

std::vector<double> openswmm::NodeData::stat_outfall_avg_flow

Outfall cumulative average flow (flow units × reporting periods).

See also
Legacy: OutfallStats[k].avgFlow

◆ stat_outfall_max_flow

std::vector<double> openswmm::NodeData::stat_outfall_max_flow

Outfall maximum flow (project flow units).

See also
Legacy: OutfallStats[k].maxFlow

◆ stat_outfall_periods

std::vector<long> openswmm::NodeData::stat_outfall_periods

Outfall number of non-zero flow periods.

See also
Legacy: OutfallStats[k].totalPeriods

◆ stat_time_flooded

std::vector<double> openswmm::NodeData::stat_time_flooded

Total duration the node was flooded (seconds).

See also
Legacy: NodeStats[i].timeFlooded

◆ stat_total_inflow_vol

std::vector<double> openswmm::NodeData::stat_total_inflow_vol

Cumulative total inflow volume at each node (ft3).

◆ stat_total_load

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.

See also
Legacy: OutfallStats[k].totalLoad[p]

◆ stat_vol_flooded

std::vector<double> openswmm::NodeData::stat_vol_flooded

Total volume of water lost as overflow (project volume units).

See also
Legacy: NodeStats[i].volFlooded

◆ storage_a

std::vector<double> openswmm::NodeData::storage_a

Functional storage area parameter A (area = A * depth^B + C).

◆ storage_b

std::vector<double> openswmm::NodeData::storage_b

Functional storage area parameter B.

◆ storage_c

std::vector<double> openswmm::NodeData::storage_c

Functional storage area parameter C (baseline area).

◆ storage_curve

std::vector<int> openswmm::NodeData::storage_curve

Storage curve index into TableData (CURVE_STORAGE).

-1 if storage uses functional relationship (a,b,c parameters).

◆ storage_curve_name

std::vector<std::string> openswmm::NodeData::storage_curve_name

Curve name for deferred resolution (populated during parsing).

◆ storage_seep_rate

std::vector<double> openswmm::NodeData::storage_seep_rate

Seepage rate from storage node (project units/day).

◆ sur_depth

std::vector<double> openswmm::NodeData::sur_depth

Maximum depth allowed at the node (ponding or surcharge limit).

See also
Legacy: Node[i].surDepth

◆ type

std::vector<NodeType> openswmm::NodeData::type

Node type for each node.

◆ user_lat_flow

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.

◆ volume

std::vector<double> openswmm::NodeData::volume

Current water volume (project volume units).

See also
Legacy: Node[i].newVolume

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