C API implementation — external inflows, DWF, RDII.
More...
|
| SWMM_ENGINE_API int | swmm_ext_inflow_add (SWMM_Engine engine, int node_idx, const char *constituent, const char *ts_name, const char *type, double m_factor, double s_factor, double baseline, const char *pattern) |
| | Add an external inflow to a node.
|
| |
| SWMM_ENGINE_API int | swmm_dwf_add (SWMM_Engine engine, int node_idx, const char *constituent, double avg_value, const char *pat1, const char *pat2, const char *pat3, const char *pat4) |
| | Add a dry weather flow component to a node.
|
| |
| SWMM_ENGINE_API int | swmm_rdii_add (SWMM_Engine engine, int node_idx, const char *uh_name, double area) |
| | Add RDII inflow to a node using a unit hydrograph.
|
| |
| SWMM_ENGINE_API int | swmm_ext_inflow_count (SWMM_Engine engine) |
| | Get the total number of external inflows defined.
|
| |
| SWMM_ENGINE_API int | swmm_dwf_count (SWMM_Engine engine) |
| | Get the total number of dry weather flow entries defined.
|
| |
| SWMM_ENGINE_API int | swmm_rdii_count (SWMM_Engine engine) |
| | Get the total number of RDII entries defined.
|
| |
C API implementation — external inflows, DWF, RDII.
- See also
- include/openswmm/engine/openswmm_inflows.h
- Author
- Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
- Copyright
- Copyright (c) 2026 HydroCouple. All rights reserved.
- License\n MIT License
◆ swmm_dwf_add()
| SWMM_ENGINE_API int swmm_dwf_add |
( |
SWMM_Engine |
engine, |
|
|
int |
node_idx, |
|
|
const char * |
constituent, |
|
|
double |
avg_value, |
|
|
const char * |
pat1, |
|
|
const char * |
pat2, |
|
|
const char * |
pat3, |
|
|
const char * |
pat4 |
|
) |
| |
Add a dry weather flow component to a node.
Dry weather flow represents the base sanitary flow entering the system at a node, modulated by up to four time patterns.
- Parameters
-
| engine | Engine handle. |
| node_idx | Zero-based index of the receiving node. |
| constituent | Constituent name ("FLOW" or a pollutant name). |
| avg_value | Average DWF value. |
| pat1 | Monthly time pattern name (NULL for none). |
| pat2 | Daily time pattern name (NULL for none). |
| pat3 | Hourly time pattern name (NULL for none). |
| pat4 | Weekend time pattern name (NULL for none). |
- Returns
- SWMM_OK on success, or an error code.
◆ swmm_dwf_count()
Get the total number of dry weather flow entries defined.
- Parameters
-
- Returns
- Number of DWF entries, or -1 on error.
◆ swmm_ext_inflow_add()
| SWMM_ENGINE_API int swmm_ext_inflow_add |
( |
SWMM_Engine |
engine, |
|
|
int |
node_idx, |
|
|
const char * |
constituent, |
|
|
const char * |
ts_name, |
|
|
const char * |
type, |
|
|
double |
m_factor, |
|
|
double |
s_factor, |
|
|
double |
baseline, |
|
|
const char * |
pattern |
|
) |
| |
Add an external inflow to a node.
External inflows define time-varying flows or pollutant loads applied at a node, optionally driven by a time series, with scaling, baseline, and pattern modifiers.
- Parameters
-
| engine | Engine handle. |
| node_idx | Zero-based index of the receiving node. |
| constituent | Constituent name ("FLOW" for flow, or a pollutant name). |
| ts_name | Time series name (NULL or "" for constant baseline only). |
| type | Inflow type: "FLOW", "CONCEN", or "MASS". |
| m_factor | Multiplier applied to the time series values. |
| s_factor | Scale factor (unit conversion). |
| baseline | Constant baseline value added to the time series. |
| pattern | Time pattern name (NULL or "" for none). |
- Returns
- SWMM_OK on success, or an error code.
◆ swmm_ext_inflow_count()
Get the total number of external inflows defined.
- Parameters
-
- Returns
- Number of external inflows, or -1 on error.
◆ swmm_rdii_add()
Add RDII inflow to a node using a unit hydrograph.
Associates a node with a unit hydrograph group and its sewershed area to compute rainfall-dependent infiltration/inflow.
- Parameters
-
| engine | Engine handle. |
| node_idx | Zero-based index of the receiving node. |
| uh_name | Unit hydrograph group name. |
| area | Sewershed area in project area units. |
- Returns
- SWMM_OK on success, or an error code.
◆ swmm_rdii_count()
Get the total number of RDII entries defined.
- Parameters
-
- Returns
- Number of RDII entries, or -1 on error.