OpenSWMM Engine  6.0.0-alpha.3
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.3)
Loading...
Searching...
No Matches
openswmm_nodes.h
Go to the documentation of this file.
1
15
16#ifndef OPENSWMM_NODES_H
17#define OPENSWMM_NODES_H
18
19#include "openswmm_engine.h"
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
38
39/* =========================================================================
40 * Identity
41 * ========================================================================= */
42
49
56SWMM_ENGINE_API int swmm_node_index(SWMM_Engine engine, const char* id);
57
64SWMM_ENGINE_API const char* swmm_node_id(SWMM_Engine engine, int idx);
65
66/* =========================================================================
67 * Creation (BUILDING or OPENED — "editable" states)
68 * ========================================================================= */
69
89SWMM_ENGINE_API int swmm_node_add(SWMM_Engine engine, const char* id, int type);
90
112SWMM_ENGINE_API int swmm_node_pop_last(SWMM_Engine engine, const char* id);
113
114/* =========================================================================
115 * Geometry setters (BUILDING or OPENED)
116 * ========================================================================= */
117
125SWMM_ENGINE_API int swmm_node_set_invert_elev(SWMM_Engine engine, int idx, double elev);
126
134SWMM_ENGINE_API int swmm_node_set_max_depth(SWMM_Engine engine, int idx, double depth);
135
143SWMM_ENGINE_API int swmm_node_set_surcharge_depth(SWMM_Engine engine, int idx, double depth);
144
156SWMM_ENGINE_API int swmm_node_set_pond_area(SWMM_Engine engine, int idx, double area);
157
165SWMM_ENGINE_API int swmm_node_set_initial_depth(SWMM_Engine engine, int idx, double depth);
166
167/* =========================================================================
168 * Geometry getters
169 * ========================================================================= */
170
178SWMM_ENGINE_API int swmm_node_get_type(SWMM_Engine engine, int idx, int* type);
179
187SWMM_ENGINE_API int swmm_node_get_invert_elev(SWMM_Engine engine, int idx, double* elev);
188
196SWMM_ENGINE_API int swmm_node_get_max_depth(SWMM_Engine engine, int idx, double* depth);
197
198/* =========================================================================
199 * Hydraulic state getters/setters
200 * ========================================================================= */
201
209SWMM_ENGINE_API int swmm_node_get_depth(SWMM_Engine engine, int idx, double* depth);
210
218SWMM_ENGINE_API int swmm_node_set_depth(SWMM_Engine engine, int idx, double depth);
219
227SWMM_ENGINE_API int swmm_node_get_head(SWMM_Engine engine, int idx, double* head);
228
236SWMM_ENGINE_API int swmm_node_get_volume(SWMM_Engine engine, int idx, double* volume);
237
250SWMM_ENGINE_API int swmm_node_get_lateral_inflow(SWMM_Engine engine, int idx, double* inflow);
251
263SWMM_ENGINE_API int swmm_node_get_overflow(SWMM_Engine engine, int idx, double* overflow);
264
272SWMM_ENGINE_API int swmm_node_get_inflow(SWMM_Engine engine, int idx, double* inflow);
273
274/* =========================================================================
275 * Runtime forcing (RUNNING state only)
276 * ========================================================================= */
277
290SWMM_ENGINE_API int swmm_node_set_lateral_inflow(SWMM_Engine engine, int idx, double flow);
291
307 int pollutant_idx, double mass_rate);
308
320SWMM_ENGINE_API int swmm_node_set_head_boundary(SWMM_Engine engine, int idx, double head);
321
322/* =========================================================================
323 * Water quality
324 * ========================================================================= */
325
334SWMM_ENGINE_API int swmm_node_get_quality(SWMM_Engine engine, int node_idx,
335 int pollutant_idx, double* conc);
336
337/* =========================================================================
338 * Storage Node API
339 * ========================================================================= */
340
348SWMM_ENGINE_API int swmm_node_set_storage_curve(SWMM_Engine engine, int idx, int curve_idx);
349
357SWMM_ENGINE_API int swmm_node_get_storage_curve(SWMM_Engine engine, int idx, int* curve_idx);
358
372SWMM_ENGINE_API int swmm_node_set_storage_functional(SWMM_Engine engine, int idx, double a, double b, double c);
373
383SWMM_ENGINE_API int swmm_node_get_storage_functional(SWMM_Engine engine, int idx, double* a, double* b, double* c);
384
401
416SWMM_ENGINE_API int swmm_node_set_storage_shape(SWMM_Engine engine, int idx, int shape);
417
425SWMM_ENGINE_API int swmm_node_get_storage_shape(SWMM_Engine engine, int idx, int* shape);
426
447 double p1, double p2, double p3);
448
459 double* p1, double* p2, double* p3);
460
468SWMM_ENGINE_API int swmm_node_set_storage_seep_rate(SWMM_Engine engine, int idx, double rate);
469
477SWMM_ENGINE_API int swmm_node_get_storage_seep_rate(SWMM_Engine engine, int idx, double* rate);
478
492SWMM_ENGINE_API int swmm_node_set_exfil_params(SWMM_Engine engine, int idx, double suction, double ksat, double imd);
493
503SWMM_ENGINE_API int swmm_node_get_exfil_params(SWMM_Engine engine, int idx, double* suction, double* ksat, double* imd);
504
505/* =========================================================================
506 * Outfall Node API
507 * ========================================================================= */
508
519SWMM_ENGINE_API int swmm_node_set_outfall_type(SWMM_Engine engine, int idx, int type);
520
528SWMM_ENGINE_API int swmm_node_get_outfall_type(SWMM_Engine engine, int idx, int* type);
529
537SWMM_ENGINE_API int swmm_node_set_outfall_stage(SWMM_Engine engine, int idx, double stage);
538
546SWMM_ENGINE_API int swmm_node_set_outfall_tidal(SWMM_Engine engine, int idx, int curve_idx);
547
555SWMM_ENGINE_API int swmm_node_set_outfall_timeseries(SWMM_Engine engine, int idx, int ts_idx);
556
564SWMM_ENGINE_API int swmm_node_get_outfall_param(SWMM_Engine engine, int idx, double* param);
565
580SWMM_ENGINE_API int swmm_node_get_outfall_tidal(SWMM_Engine engine, int idx, int* curve_idx);
581
594SWMM_ENGINE_API int swmm_node_get_outfall_timeseries(SWMM_Engine engine, int idx, int* ts_idx);
595
606SWMM_ENGINE_API int swmm_node_set_outfall_flap_gate(SWMM_Engine engine, int idx, int has_gate);
607
615SWMM_ENGINE_API int swmm_node_get_outfall_flap_gate(SWMM_Engine engine, int idx, int* has_gate);
616
617/* =========================================================================
618 * Divider Node API
619 * ========================================================================= */
620
635
643SWMM_ENGINE_API int swmm_node_set_divider_type(SWMM_Engine engine, int idx, int type);
644
652SWMM_ENGINE_API int swmm_node_get_divider_type(SWMM_Engine engine, int idx, int* type);
653
654/* =========================================================================
655 * Additional Geometry / State Getters
656 * ========================================================================= */
657
665SWMM_ENGINE_API int swmm_node_get_surcharge_depth(SWMM_Engine engine, int idx, double* depth);
666
674SWMM_ENGINE_API int swmm_node_get_ponded_area(SWMM_Engine engine, int idx, double* area);
675
683SWMM_ENGINE_API int swmm_node_get_initial_depth(SWMM_Engine engine, int idx, double* depth);
684
692SWMM_ENGINE_API int swmm_node_get_crown_elev(SWMM_Engine engine, int idx, double* elev);
693
701SWMM_ENGINE_API int swmm_node_get_full_volume(SWMM_Engine engine, int idx, double* vol);
702
710SWMM_ENGINE_API int swmm_node_get_losses(SWMM_Engine engine, int idx, double* losses);
711
719SWMM_ENGINE_API int swmm_node_get_outflow(SWMM_Engine engine, int idx, double* outflow);
720
728SWMM_ENGINE_API int swmm_node_get_degree(SWMM_Engine engine, int idx, int* degree);
729
730/* =========================================================================
731 * Node Statistics
732 * ========================================================================= */
733
741SWMM_ENGINE_API int swmm_node_get_stat_max_depth(SWMM_Engine engine, int idx, double* val);
742
750SWMM_ENGINE_API int swmm_node_get_stat_max_overflow(SWMM_Engine engine, int idx, double* val);
751
759SWMM_ENGINE_API int swmm_node_get_stat_vol_flooded(SWMM_Engine engine, int idx, double* val);
760
768SWMM_ENGINE_API int swmm_node_get_stat_time_flooded(SWMM_Engine engine, int idx, double* val);
769
770/* =========================================================================
771 * Bulk access
772 * ========================================================================= */
773
781SWMM_ENGINE_API int swmm_node_get_depths_bulk(SWMM_Engine engine, double* buf, int count);
782
790SWMM_ENGINE_API int swmm_node_get_heads_bulk(SWMM_Engine engine, double* buf, int count);
791
799SWMM_ENGINE_API int swmm_node_get_inflows_bulk(SWMM_Engine engine, double* buf, int count);
800
808SWMM_ENGINE_API int swmm_node_get_overflows_bulk(SWMM_Engine engine, double* buf, int count);
809
817SWMM_ENGINE_API int swmm_node_set_depths_bulk(SWMM_Engine engine, const double* buf, int count);
818
826SWMM_ENGINE_API int swmm_node_set_lat_inflows_bulk(SWMM_Engine engine, const double* buf, int count);
827
836SWMM_ENGINE_API int swmm_node_get_quality_bulk(SWMM_Engine engine, int pollutant_idx,
837 double* buf, int count);
838
855SWMM_ENGINE_API int swmm_node_get_volumes_bulk(SWMM_Engine engine, double* buf, int count);
856
868SWMM_ENGINE_API int swmm_node_get_outflows_bulk(SWMM_Engine engine, double* buf, int count);
869
881SWMM_ENGINE_API int swmm_node_get_losses_bulk(SWMM_Engine engine, double* buf, int count);
882
895SWMM_ENGINE_API int swmm_node_get_lateral_inflows_bulk(SWMM_Engine engine, double* buf, int count);
896
937 char* buf,
938 int stride,
939 int count);
940
941/* =========================================================================
942 * Outfall-to-subcatchment routing
943 * ========================================================================= */
944
946SWMM_ENGINE_API int swmm_node_set_outfall_route_to(SWMM_Engine engine, int idx, int subcatch_idx);
947
949SWMM_ENGINE_API int swmm_node_get_outfall_route_to(SWMM_Engine engine, int idx, int* subcatch_idx);
950
951/* =========================================================================
952 * Depth from volume (inverse of getVolume)
953 * ========================================================================= */
954
957 double volume, double* depth);
958
962SWMM_ENGINE_API int swmm_node_rename(SWMM_Engine engine, int idx, const char* newId);
963
964/* =========================================================================
965 * Tag — free-form string label from the INP `[TAGS]` section
966 * ========================================================================= */
967
972 char* buf, int buflen);
973
978 const char* tag);
979
980#ifdef __cplusplus
981} /* extern "C" */
982#endif
983
984#endif /* OPENSWMM_NODES_H */
#define SWMM_ENGINE_API
Definition openswmm_2d.h:37
void * SWMM_Engine
Opaque handle to an OpenSWMM Engine instance.
Definition openswmm_callbacks.h:35
OpenSWMM Engine — primary transparent C API (master header).
SWMM_ENGINE_API int swmm_node_get_depth_from_volume(SWMM_Engine engine, int idx, double volume, double *depth)
Compute depth from volume for a node (inverse of volume-depth curve).
Definition openswmm_nodes_impl.cpp:1008
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:957
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:391
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:323
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:340
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:179
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:502
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:675
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:256
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:215
SWMM_ENGINE_API int swmm_node_set_outfall_route_to(SWMM_Engine engine, int idx, int subcatch_idx)
Set outfall route-to subcatchment index (-1 = none).
Definition openswmm_nodes_impl.cpp:985
SWMM_ENGINE_API int swmm_node_get_lateral_inflows_bulk(SWMM_Engine engine, double *buf, int count)
Get current lateral inflows for all nodes in a single call.
Definition openswmm_nodes_impl.cpp:445
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:734
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:937
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:137
SWMM_ENGINE_API int swmm_node_get_outflows_bulk(SWMM_Engine engine, double *buf, int count)
Get current outflows for all nodes in a single call.
Definition openswmm_nodes_impl.cpp:425
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:155
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:712
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:905
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:690
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:520
SWMM_ENGINE_API int swmm_node_rename(SWMM_Engine engine, int idx, const char *newId)
Rename the node at idx to newId. Returns SWMM_ERR_BADPARAM if newId is null, empty,...
Definition openswmm_nodes_impl.cpp:1028
SWMM_ENGINE_API int swmm_node_get_storage_shape(SWMM_Engine engine, int idx, int *shape)
Get a storage node's surface-area relation.
Definition openswmm_nodes_impl.cpp:599
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:913
SWMM_ENGINE_API int swmm_node_get_tag(SWMM_Engine engine, int idx, char *buf, int buflen)
Read the tag string into buf (NUL-terminated, truncated to buflen-1 chars if necessary)....
Definition openswmm_nodes_impl.cpp:1037
SWMM_ENGINE_API int swmm_node_set_storage_geometry(SWMM_Engine engine, int idx, double p1, double p2, double p3)
Set the raw dimensions of a geometric storage shape.
Definition openswmm_nodes_impl.cpp:612
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:531
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:929
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:232
SWMM_ENGINE_API int swmm_node_pop_last(SWMM_Engine engine, const char *id)
Remove the most recently added node (undo-of-add).
Definition openswmm_nodes_impl.cpp:92
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:949
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:482
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:551
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:195
SWMM_DividerType
Flow divider method.
Definition openswmm_nodes.h:629
@ SWMM_DIVIDER_CUTOFF
Definition openswmm_nodes.h:630
@ SWMM_DIVIDER_TABULAR
Definition openswmm_nodes.h:632
@ SWMM_DIVIDER_WEIR
Definition openswmm_nodes.h:633
@ SWMM_DIVIDER_OVERFLOW
Definition openswmm_nodes.h:631
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:665
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:46
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:380
SWMM_ENGINE_API int swmm_node_get_volumes_bulk(SWMM_Engine engine, double *buf, int count)
Get current stored volumes for all nodes in a single call.
Definition openswmm_nodes_impl.cpp:415
SWMM_ENGINE_API int swmm_node_get_divider_type(SWMM_Engine engine, int idx, int *type)
Get the divider method for a flow-divider node.
Definition openswmm_nodes_impl.cpp:862
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:207
SWMM_ENGINE_API int swmm_node_set_storage_shape(SWMM_Engine engine, int idx, int shape)
Set a storage node's surface-area relation.
Definition openswmm_nodes_impl.cpp:569
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:897
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:763
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:41
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:146
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:877
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:965
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:921
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:269
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:248
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:240
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:885
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:350
SWMM_ENGINE_API int swmm_node_set_quality_mass_flux(SWMM_Engine engine, int node_idx, int pollutant_idx, double mass_rate)
Set a persistent quality mass flux at a node (mass/sec).
Definition openswmm_nodes_impl.cpp:283
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:723
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:187
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:370
SWMM_ENGINE_API int swmm_node_get_ids_bulk(SWMM_Engine engine, char *buf, int stride, int count)
Get node IDs for all nodes in a single call (stride-packed UTF-8).
Definition openswmm_nodes_impl.cpp:455
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:166
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:777
SWMM_ENGINE_API int swmm_node_get_storage_geometry(SWMM_Engine engine, int idx, double *p1, double *p2, double *p3)
Get the raw dimensions of a geometric storage shape.
Definition openswmm_nodes_impl.cpp:635
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:749
SWMM_ENGINE_API int swmm_node_get_outfall_route_to(SWMM_Engine engine, int idx, int *subcatch_idx)
Get outfall route-to subcatchment index (-1 = none).
Definition openswmm_nodes_impl.cpp:994
SWMM_ENGINE_API int swmm_node_get_outfall_timeseries(SWMM_Engine engine, int idx, int *ts_idx)
Get the time-series index assigned to a TIMESERIES outfall.
Definition openswmm_nodes_impl.cpp:811
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:224
SWMM_StorageShape
Storage-unit surface-area relation codes.
Definition openswmm_nodes.h:393
@ SWMM_STORAGE_CONICAL
Definition openswmm_nodes.h:397
@ SWMM_STORAGE_PARABOLOID
Definition openswmm_nodes.h:398
@ SWMM_STORAGE_FUNCTIONAL
Definition openswmm_nodes.h:395
@ SWMM_STORAGE_PYRAMIDAL
Definition openswmm_nodes.h:399
@ SWMM_STORAGE_TABULAR
Definition openswmm_nodes.h:394
@ SWMM_STORAGE_CYLINDRICAL
Definition openswmm_nodes.h:396
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:302
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:835
SWMM_ENGINE_API int swmm_node_set_tag(SWMM_Engine engine, int idx, const char *tag)
Set or clear the node's tag. Pass null or empty string to clear. Tag persists across swmm_node_rename...
Definition openswmm_nodes_impl.cpp:1052
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:825
SWMM_ENGINE_API int swmm_node_get_outfall_tidal(SWMM_Engine engine, int idx, int *curve_idx)
Get the tidal curve index assigned to a TIDAL outfall.
Definition openswmm_nodes_impl.cpp:797
SWMM_ENGINE_API int swmm_node_set_divider_type(SWMM_Engine engine, int idx, int type)
Set the divider method for a flow-divider node.
Definition openswmm_nodes_impl.cpp:849
SWMM_ENGINE_API int swmm_node_count(SWMM_Engine engine)
Get the total number of nodes in the model.
Definition openswmm_nodes_impl.cpp:36
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:61
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:128
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:973
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:655
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:360
SWMM_ENGINE_API int swmm_node_get_losses_bulk(SWMM_Engine engine, double *buf, int count)
Get accumulated node losses (exfil + evap) for all nodes in one call.
Definition openswmm_nodes_impl.cpp:435