16#ifndef OPENSWMM_NODES_H
17#define OPENSWMM_NODES_H
287 int pollutant_idx,
double* conc);
646 double* buf,
int count);
void * SWMM_Engine
Opaque handle to an OpenSWMM Engine instance.
Definition openswmm_callbacks.h:35
OpenSWMM Engine — primary transparent C API (master header).
#define SWMM_ENGINE_API
Definition openswmm_engine.h:87
SWMM_ENGINE_API int swmm_node_get_stat_max_overflow(SWMM_Engine engine, int idx, double *val)
Get the maximum overflow rate recorded at a node.
Definition openswmm_nodes_impl.cpp:574
SWMM_ENGINE_API int swmm_node_set_lat_inflows_bulk(SWMM_Engine engine, const double *buf, int count)
Set lateral inflows for all nodes in a single call (runtime override).
Definition openswmm_nodes_impl.cpp:305
SWMM_ENGINE_API int swmm_node_get_quality(SWMM_Engine engine, int node_idx, int pollutant_idx, double *conc)
Get the pollutant concentration at a node.
Definition openswmm_nodes_impl.cpp:242
SWMM_ENGINE_API int swmm_node_get_depths_bulk(SWMM_Engine engine, double *buf, int count)
Get depths for all nodes in a single call.
Definition openswmm_nodes_impl.cpp:259
SWMM_ENGINE_API int swmm_node_get_type(SWMM_Engine engine, int idx, int *type)
Get the type of a node.
Definition openswmm_nodes_impl.cpp:121
SWMM_ENGINE_API int swmm_node_set_storage_curve(SWMM_Engine engine, int idx, int curve_idx)
Assign a storage curve (depth vs. area) to a storage node.
Definition openswmm_nodes_impl.cpp:335
SWMM_ENGINE_API int swmm_node_set_exfil_params(SWMM_Engine engine, int idx, double suction, double ksat, double imd)
Set Green–Ampt exfiltration parameters for a storage node.
Definition openswmm_nodes_impl.cpp:392
SWMM_ENGINE_API int swmm_node_get_inflow(SWMM_Engine engine, int idx, double *inflow)
Get the total inflow to a node (lateral + upstream links).
Definition openswmm_nodes_impl.cpp:198
SWMM_ENGINE_API int swmm_node_set_depth(SWMM_Engine engine, int idx, double depth)
Set the water depth at a node (runtime override).
Definition openswmm_nodes_impl.cpp:157
SWMM_ENGINE_API int swmm_node_set_outfall_stage(SWMM_Engine engine, int idx, double stage)
Set a fixed outfall stage (for FIXED type outfalls).
Definition openswmm_nodes_impl.cpp:436
SWMM_ENGINE_API int swmm_node_get_degree(SWMM_Engine engine, int idx, int *degree)
Get the degree (number of connected links) of a node.
Definition openswmm_nodes_impl.cpp:554
SWMM_ENGINE_API int swmm_node_set_max_depth(SWMM_Engine engine, int idx, double depth)
Set a node's maximum depth (distance from invert to crown).
Definition openswmm_nodes_impl.cpp:81
SWMM_ENGINE_API int swmm_node_set_pond_area(SWMM_Engine engine, int idx, double area)
Set the ponded surface area when depth exceeds the maximum.
Definition openswmm_nodes_impl.cpp:99
SWMM_ENGINE_API int swmm_node_set_outfall_type(SWMM_Engine engine, int idx, int type)
Set the outfall boundary condition type.
Definition openswmm_nodes_impl.cpp:419
SWMM_ENGINE_API int swmm_node_get_crown_elev(SWMM_Engine engine, int idx, double *elev)
Get the crown elevation (invert + max depth) at a node.
Definition openswmm_nodes_impl.cpp:522
SWMM_ENGINE_API int swmm_node_get_exfil_params(SWMM_Engine engine, int idx, double *suction, double *ksat, double *imd)
Get Green–Ampt exfiltration parameters for a storage node.
Definition openswmm_nodes_impl.cpp:404
SWMM_ENGINE_API int swmm_node_get_storage_curve(SWMM_Engine engine, int idx, int *curve_idx)
Get the storage curve index assigned to a storage node.
Definition openswmm_nodes_impl.cpp:344
SWMM_NodeType
Node type classification.
Definition openswmm_nodes.h:32
@ SWMM_NODE_JUNCTION
Definition openswmm_nodes.h:33
@ SWMM_NODE_OUTFALL
Definition openswmm_nodes.h:34
@ SWMM_NODE_DIVIDER
Definition openswmm_nodes.h:36
@ SWMM_NODE_STORAGE
Definition openswmm_nodes.h:35
SWMM_ENGINE_API int swmm_node_get_full_volume(SWMM_Engine engine, int idx, double *vol)
Get the full (maximum) stored volume at a node.
Definition openswmm_nodes_impl.cpp:530
SWMM_ENGINE_API int swmm_node_set_storage_functional(SWMM_Engine engine, int idx, double a, double b, double c)
Set functional storage parameters: Area = a * Depth^b + c.
Definition openswmm_nodes_impl.cpp:352
SWMM_ENGINE_API int swmm_node_get_outflow(SWMM_Engine engine, int idx, double *outflow)
Get the total outflow from a node through downstream links.
Definition openswmm_nodes_impl.cpp:546
SWMM_ENGINE_API int swmm_node_get_volume(SWMM_Engine engine, int idx, double *volume)
Get the current stored water volume at a node.
Definition openswmm_nodes_impl.cpp:174
SWMM_ENGINE_API int swmm_node_get_stat_max_depth(SWMM_Engine engine, int idx, double *val)
Get the maximum depth recorded at a node during the simulation.
Definition openswmm_nodes_impl.cpp:566
SWMM_ENGINE_API int swmm_node_get_quality_bulk(SWMM_Engine engine, int pollutant_idx, double *buf, int count)
Get pollutant concentrations at all nodes for one pollutant.
Definition openswmm_nodes_impl.cpp:315
SWMM_ENGINE_API int swmm_node_get_storage_functional(SWMM_Engine engine, int idx, double *a, double *b, double *c)
Get functional storage parameters.
Definition openswmm_nodes_impl.cpp:364
SWMM_ENGINE_API int swmm_node_get_max_depth(SWMM_Engine engine, int idx, double *depth)
Get a node's maximum depth.
Definition openswmm_nodes_impl.cpp:137
SWMM_ENGINE_API int swmm_node_get_storage_seep_rate(SWMM_Engine engine, int idx, double *rate)
Get the seepage rate for a storage node.
Definition openswmm_nodes_impl.cpp:384
SWMM_ENGINE_API const char * swmm_node_id(SWMM_Engine engine, int idx)
Get the string identifier of a node by index.
Definition openswmm_nodes_impl.cpp:32
SWMM_ENGINE_API int swmm_node_set_depths_bulk(SWMM_Engine engine, const double *buf, int count)
Set depths for all nodes in a single call (runtime override).
Definition openswmm_nodes_impl.cpp:295
SWMM_ENGINE_API int swmm_node_get_depth(SWMM_Engine engine, int idx, double *depth)
Get the current water depth at a node.
Definition openswmm_nodes_impl.cpp:149
SWMM_ENGINE_API int swmm_node_get_initial_depth(SWMM_Engine engine, int idx, double *depth)
Get the initial depth at a node.
Definition openswmm_nodes_impl.cpp:514
SWMM_ENGINE_API int swmm_node_set_outfall_timeseries(SWMM_Engine engine, int idx, int ts_idx)
Assign a time series to an outfall (for TIMESERIES type outfalls).
Definition openswmm_nodes_impl.cpp:458
SWMM_ENGINE_API int swmm_node_index(SWMM_Engine engine, const char *id)
Look up a node's zero-based index by its string identifier.
Definition openswmm_nodes_impl.cpp:27
SWMM_ENGINE_API int swmm_node_set_surcharge_depth(SWMM_Engine engine, int idx, double depth)
Set the allowed surcharge depth above the node's crown.
Definition openswmm_nodes_impl.cpp:90
SWMM_ENGINE_API int swmm_node_get_surcharge_depth(SWMM_Engine engine, int idx, double *depth)
Get the surcharge depth above the node's crown.
Definition openswmm_nodes_impl.cpp:498
SWMM_ENGINE_API int swmm_node_get_stat_vol_flooded(SWMM_Engine engine, int idx, double *val)
Get the total flood volume at a node over the simulation.
Definition openswmm_nodes_impl.cpp:582
SWMM_ENGINE_API int swmm_node_get_losses(SWMM_Engine engine, int idx, double *losses)
Get the cumulative water losses at a node (evaporation + exfiltration).
Definition openswmm_nodes_impl.cpp:538
SWMM_ENGINE_API int swmm_node_set_lateral_inflow(SWMM_Engine engine, int idx, double flow)
Override the lateral inflow at a node for the current timestep.
Definition openswmm_nodes_impl.cpp:211
SWMM_ENGINE_API int swmm_node_get_overflow(SWMM_Engine engine, int idx, double *overflow)
Get the current overflow (flooding) rate at a node.
Definition openswmm_nodes_impl.cpp:190
SWMM_ENGINE_API int swmm_node_get_lateral_inflow(SWMM_Engine engine, int idx, double *inflow)
Get the current lateral inflow at a node.
Definition openswmm_nodes_impl.cpp:182
SWMM_ENGINE_API int swmm_node_get_ponded_area(SWMM_Engine engine, int idx, double *area)
Get the ponded area at a node.
Definition openswmm_nodes_impl.cpp:506
SWMM_ENGINE_API int swmm_node_get_heads_bulk(SWMM_Engine engine, double *buf, int count)
Get hydraulic heads for all nodes in a single call.
Definition openswmm_nodes_impl.cpp:268
SWMM_ENGINE_API int swmm_node_get_outfall_type(SWMM_Engine engine, int idx, int *type)
Get the outfall boundary condition type.
Definition openswmm_nodes_impl.cpp:428
SWMM_ENGINE_API int swmm_node_get_invert_elev(SWMM_Engine engine, int idx, double *elev)
Get a node's invert elevation.
Definition openswmm_nodes_impl.cpp:129
SWMM_ENGINE_API int swmm_node_get_overflows_bulk(SWMM_Engine engine, double *buf, int count)
Get overflow rates for all nodes in a single call.
Definition openswmm_nodes_impl.cpp:286
SWMM_ENGINE_API int swmm_node_set_initial_depth(SWMM_Engine engine, int idx, double depth)
Set a node's initial water depth at simulation start.
Definition openswmm_nodes_impl.cpp:108
SWMM_ENGINE_API int swmm_node_get_outfall_param(SWMM_Engine engine, int idx, double *param)
Get the outfall stage parameter (fixed stage, or current computed stage).
Definition openswmm_nodes_impl.cpp:469
SWMM_ENGINE_API int swmm_node_set_outfall_tidal(SWMM_Engine engine, int idx, int curve_idx)
Assign a tidal curve to an outfall (for TIDAL type outfalls).
Definition openswmm_nodes_impl.cpp:447
SWMM_ENGINE_API int swmm_node_get_head(SWMM_Engine engine, int idx, double *head)
Get the current hydraulic head at a node (invert + depth).
Definition openswmm_nodes_impl.cpp:166
SWMM_ENGINE_API int swmm_node_set_head_boundary(SWMM_Engine engine, int idx, double head)
Set a fixed head boundary condition at a node.
Definition openswmm_nodes_impl.cpp:225
SWMM_ENGINE_API int swmm_node_get_outfall_flap_gate(SWMM_Engine engine, int idx, int *has_gate)
Get whether a flap gate exists at the outfall.
Definition openswmm_nodes_impl.cpp:486
SWMM_ENGINE_API int swmm_node_set_outfall_flap_gate(SWMM_Engine engine, int idx, int has_gate)
Set whether a flap gate exists at the outfall.
Definition openswmm_nodes_impl.cpp:477
SWMM_ENGINE_API int swmm_node_count(SWMM_Engine engine)
Get the total number of nodes in the model.
Definition openswmm_nodes_impl.cpp:22
SWMM_ENGINE_API int swmm_node_add(SWMM_Engine engine, const char *id, int type)
Add a new node to the model.
Definition openswmm_nodes_impl.cpp:43
SWMM_ENGINE_API int swmm_node_set_invert_elev(SWMM_Engine engine, int idx, double elev)
Set a node's invert elevation.
Definition openswmm_nodes_impl.cpp:72
SWMM_ENGINE_API int swmm_node_get_stat_time_flooded(SWMM_Engine engine, int idx, double *val)
Get the total time a node was flooded during the simulation.
Definition openswmm_nodes_impl.cpp:590
SWMM_ENGINE_API int swmm_node_set_storage_seep_rate(SWMM_Engine engine, int idx, double rate)
Set the seepage rate for a storage node.
Definition openswmm_nodes_impl.cpp:375
SWMM_ENGINE_API int swmm_node_get_inflows_bulk(SWMM_Engine engine, double *buf, int count)
Get total inflows for all nodes in a single call.
Definition openswmm_nodes_impl.cpp:277