OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm_inflows.h File Reference

OpenSWMM Engine — Inflows (External, DWF, RDII) C API. More...

#include "openswmm_engine.h"
Include dependency graph for openswmm_inflows.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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.
 

Detailed Description

OpenSWMM Engine — Inflows (External, DWF, RDII) C API.

External inflow addition, dry weather flow, RDII assignment, and count queries.

See also
openswmm_engine.h
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License

Function Documentation

◆ 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
engineEngine handle.
node_idxZero-based index of the receiving node.
constituentConstituent name ("FLOW" or a pollutant name).
avg_valueAverage DWF value.
pat1Monthly time pattern name (NULL for none).
pat2Daily time pattern name (NULL for none).
pat3Hourly time pattern name (NULL for none).
pat4Weekend time pattern name (NULL for none).
Returns
SWMM_OK on success, or an error code.

◆ swmm_dwf_count()

SWMM_ENGINE_API int swmm_dwf_count ( SWMM_Engine  engine)

Get the total number of dry weather flow entries defined.

Parameters
engineEngine handle.
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
engineEngine handle.
node_idxZero-based index of the receiving node.
constituentConstituent name ("FLOW" for flow, or a pollutant name).
ts_nameTime series name (NULL or "" for constant baseline only).
typeInflow type: "FLOW", "CONCEN", or "MASS".
m_factorMultiplier applied to the time series values.
s_factorScale factor (unit conversion).
baselineConstant baseline value added to the time series.
patternTime pattern name (NULL or "" for none).
Returns
SWMM_OK on success, or an error code.

◆ swmm_ext_inflow_count()

SWMM_ENGINE_API int swmm_ext_inflow_count ( SWMM_Engine  engine)

Get the total number of external inflows defined.

Parameters
engineEngine handle.
Returns
Number of external inflows, or -1 on error.

◆ swmm_rdii_add()

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.

Associates a node with a unit hydrograph group and its sewershed area to compute rainfall-dependent infiltration/inflow.

Parameters
engineEngine handle.
node_idxZero-based index of the receiving node.
uh_nameUnit hydrograph group name.
areaSewershed area in project area units.
Returns
SWMM_OK on success, or an error code.

◆ swmm_rdii_count()

SWMM_ENGINE_API int swmm_rdii_count ( SWMM_Engine  engine)

Get the total number of RDII entries defined.

Parameters
engineEngine handle.
Returns
Number of RDII entries, or -1 on error.