OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm_nodes.h
Go to the documentation of this file.
1
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
392SWMM_ENGINE_API int swmm_node_set_storage_seep_rate(SWMM_Engine engine, int idx, double rate);
393
401SWMM_ENGINE_API int swmm_node_get_storage_seep_rate(SWMM_Engine engine, int idx, double* rate);
402
416SWMM_ENGINE_API int swmm_node_set_exfil_params(SWMM_Engine engine, int idx, double suction, double ksat, double imd);
417
427SWMM_ENGINE_API int swmm_node_get_exfil_params(SWMM_Engine engine, int idx, double* suction, double* ksat, double* imd);
428
429/* =========================================================================
430 * Outfall Node API
431 * ========================================================================= */
432
443SWMM_ENGINE_API int swmm_node_set_outfall_type(SWMM_Engine engine, int idx, int type);
444
452SWMM_ENGINE_API int swmm_node_get_outfall_type(SWMM_Engine engine, int idx, int* type);
453
461SWMM_ENGINE_API int swmm_node_set_outfall_stage(SWMM_Engine engine, int idx, double stage);
462
470SWMM_ENGINE_API int swmm_node_set_outfall_tidal(SWMM_Engine engine, int idx, int curve_idx);
471
479SWMM_ENGINE_API int swmm_node_set_outfall_timeseries(SWMM_Engine engine, int idx, int ts_idx);
480
488SWMM_ENGINE_API int swmm_node_get_outfall_param(SWMM_Engine engine, int idx, double* param);
489
504SWMM_ENGINE_API int swmm_node_get_outfall_tidal(SWMM_Engine engine, int idx, int* curve_idx);
505
518SWMM_ENGINE_API int swmm_node_get_outfall_timeseries(SWMM_Engine engine, int idx, int* ts_idx);
519
530SWMM_ENGINE_API int swmm_node_set_outfall_flap_gate(SWMM_Engine engine, int idx, int has_gate);
531
539SWMM_ENGINE_API int swmm_node_get_outfall_flap_gate(SWMM_Engine engine, int idx, int* has_gate);
540
541/* =========================================================================
542 * Divider Node API
543 * ========================================================================= */
544
559
567SWMM_ENGINE_API int swmm_node_set_divider_type(SWMM_Engine engine, int idx, int type);
568
576SWMM_ENGINE_API int swmm_node_get_divider_type(SWMM_Engine engine, int idx, int* type);
577
578/* =========================================================================
579 * Additional Geometry / State Getters
580 * ========================================================================= */
581
589SWMM_ENGINE_API int swmm_node_get_surcharge_depth(SWMM_Engine engine, int idx, double* depth);
590
598SWMM_ENGINE_API int swmm_node_get_ponded_area(SWMM_Engine engine, int idx, double* area);
599
607SWMM_ENGINE_API int swmm_node_get_initial_depth(SWMM_Engine engine, int idx, double* depth);
608
616SWMM_ENGINE_API int swmm_node_get_crown_elev(SWMM_Engine engine, int idx, double* elev);
617
625SWMM_ENGINE_API int swmm_node_get_full_volume(SWMM_Engine engine, int idx, double* vol);
626
634SWMM_ENGINE_API int swmm_node_get_losses(SWMM_Engine engine, int idx, double* losses);
635
643SWMM_ENGINE_API int swmm_node_get_outflow(SWMM_Engine engine, int idx, double* outflow);
644
652SWMM_ENGINE_API int swmm_node_get_degree(SWMM_Engine engine, int idx, int* degree);
653
654/* =========================================================================
655 * Node Statistics
656 * ========================================================================= */
657
665SWMM_ENGINE_API int swmm_node_get_stat_max_depth(SWMM_Engine engine, int idx, double* val);
666
674SWMM_ENGINE_API int swmm_node_get_stat_max_overflow(SWMM_Engine engine, int idx, double* val);
675
683SWMM_ENGINE_API int swmm_node_get_stat_vol_flooded(SWMM_Engine engine, int idx, double* val);
684
692SWMM_ENGINE_API int swmm_node_get_stat_time_flooded(SWMM_Engine engine, int idx, double* val);
693
694/* =========================================================================
695 * Bulk access
696 * ========================================================================= */
697
705SWMM_ENGINE_API int swmm_node_get_depths_bulk(SWMM_Engine engine, double* buf, int count);
706
714SWMM_ENGINE_API int swmm_node_get_heads_bulk(SWMM_Engine engine, double* buf, int count);
715
723SWMM_ENGINE_API int swmm_node_get_inflows_bulk(SWMM_Engine engine, double* buf, int count);
724
732SWMM_ENGINE_API int swmm_node_get_overflows_bulk(SWMM_Engine engine, double* buf, int count);
733
741SWMM_ENGINE_API int swmm_node_set_depths_bulk(SWMM_Engine engine, const double* buf, int count);
742
750SWMM_ENGINE_API int swmm_node_set_lat_inflows_bulk(SWMM_Engine engine, const double* buf, int count);
751
760SWMM_ENGINE_API int swmm_node_get_quality_bulk(SWMM_Engine engine, int pollutant_idx,
761 double* buf, int count);
762
779SWMM_ENGINE_API int swmm_node_get_volumes_bulk(SWMM_Engine engine, double* buf, int count);
780
792SWMM_ENGINE_API int swmm_node_get_outflows_bulk(SWMM_Engine engine, double* buf, int count);
793
805SWMM_ENGINE_API int swmm_node_get_losses_bulk(SWMM_Engine engine, double* buf, int count);
806
819SWMM_ENGINE_API int swmm_node_get_lateral_inflows_bulk(SWMM_Engine engine, double* buf, int count);
820
861 char* buf,
862 int stride,
863 int count);
864
865/* =========================================================================
866 * Outfall-to-subcatchment routing
867 * ========================================================================= */
868
870SWMM_ENGINE_API int swmm_node_set_outfall_route_to(SWMM_Engine engine, int idx, int subcatch_idx);
871
873SWMM_ENGINE_API int swmm_node_get_outfall_route_to(SWMM_Engine engine, int idx, int* subcatch_idx);
874
875/* =========================================================================
876 * Depth from volume (inverse of getVolume)
877 * ========================================================================= */
878
881 double volume, double* depth);
882
886SWMM_ENGINE_API int swmm_node_rename(SWMM_Engine engine, int idx, const char* newId);
887
888/* =========================================================================
889 * Tag — free-form string label from the INP `[TAGS]` section
890 * ========================================================================= */
891
896 char* buf, int buflen);
897
902 const char* tag);
903
904#ifdef __cplusplus
905} /* extern "C" */
906#endif
907
908#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:815
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:767
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:374
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:311
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:328
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:171
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:480
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:537
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:248
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:207
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:795
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:424
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:581
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:747
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:131
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:406
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:149
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:564
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:715
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:549
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:489
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:824
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:723
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:833
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:497
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:739
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:224
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:87
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:759
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:460
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:509
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:187
SWMM_DividerType
Flow divider method.
Definition openswmm_nodes.h:553
@ SWMM_DIVIDER_CUTOFF
Definition openswmm_nodes.h:554
@ SWMM_DIVIDER_TABULAR
Definition openswmm_nodes.h:556
@ SWMM_DIVIDER_WEIR
Definition openswmm_nodes.h:557
@ SWMM_DIVIDER_OVERFLOW
Definition openswmm_nodes.h:555
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:529
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:41
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:364
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:397
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:679
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:199
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:707
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:603
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:36
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:140
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:691
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:775
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:731
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:261
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:240
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:232
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:699
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:337
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:275
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:573
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:179
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:355
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:433
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:158
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:614
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:592
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:803
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:634
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:216
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:294
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:655
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:848
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:646
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:622
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:667
SWMM_ENGINE_API int swmm_node_count(SWMM_Engine engine)
Get the total number of nodes in the model.
Definition openswmm_nodes_impl.cpp:31
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:56
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:122
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:783
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:520
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:346
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:415