![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Runtime forcing API — inject fluxes with mass-balance tracking. More...
#include "openswmm_callbacks.h"Go to the source code of this file.
Macros | |
| #define | SWMM_ENGINE_API __attribute__((visibility("default"))) |
Typedefs | |
| typedef enum SWMM_ForcingMode | SWMM_ForcingMode |
| How the forcing value is applied relative to the computed value. | |
| typedef enum SWMM_ForcingPersist | SWMM_ForcingPersist |
| Whether the forcing persists across timesteps. | |
| typedef enum SWMM_ForcingType | SWMM_ForcingType |
| Forcing channel identifier (for targeted clear). | |
Enumerations | |
| enum | SWMM_ForcingMode { SWMM_FORCING_NONE = 0 , SWMM_FORCING_OVERRIDE = 1 , SWMM_FORCING_ADD = 2 } |
| How the forcing value is applied relative to the computed value. More... | |
| enum | SWMM_ForcingPersist { SWMM_FORCING_RESET = 0 , SWMM_FORCING_PERSIST = 1 } |
| Whether the forcing persists across timesteps. More... | |
| enum | SWMM_ForcingType { SWMM_FORCE_NODE_LAT_INFLOW = 0 , SWMM_FORCE_NODE_HEAD_BOUNDARY = 1 , SWMM_FORCE_NODE_QUALITY = 2 , SWMM_FORCE_LINK_FLOW = 3 , SWMM_FORCE_LINK_SETTING = 4 , SWMM_FORCE_SUBCATCH_RAINFALL = 5 , SWMM_FORCE_SUBCATCH_EVAP = 6 , SWMM_FORCE_GAGE_RAINFALL = 7 } |
| Forcing channel identifier (for targeted clear). More... | |
Functions | |
| SWMM_ENGINE_API int | swmm_forcing_node_lat_inflow (SWMM_Engine engine, int idx, double value, int mode, int persist) |
| Force a lateral inflow at a node. | |
| SWMM_ENGINE_API int | swmm_forcing_node_head_boundary (SWMM_Engine engine, int idx, double value, int mode, int persist) |
| Force a head boundary at an outfall node. | |
| SWMM_ENGINE_API int | swmm_forcing_node_quality (SWMM_Engine engine, int node_idx, int pollutant_idx, double mass_rate, int mode, int persist) |
| Force a quality mass flux at a node. | |
| SWMM_ENGINE_API int | swmm_forcing_link_flow (SWMM_Engine engine, int idx, double value, int mode, int persist) |
| Force a flow in a link. | |
| SWMM_ENGINE_API int | swmm_forcing_link_setting (SWMM_Engine engine, int idx, double value, int mode, int persist) |
| Force a control setting on a link (pump, orifice, weir, outlet). | |
| SWMM_ENGINE_API int | swmm_forcing_subcatch_rainfall (SWMM_Engine engine, int idx, double value, int mode, int persist) |
| Force rainfall on a subcatchment (bypasses gage lookup). | |
| SWMM_ENGINE_API int | swmm_forcing_subcatch_evap (SWMM_Engine engine, int idx, double value, int mode, int persist) |
| Force an evaporation rate on a subcatchment. | |
| SWMM_ENGINE_API int | swmm_forcing_gage_rainfall (SWMM_Engine engine, int idx, double value, int mode, int persist) |
| Force rainfall on a rain gage (affects all linked subcatchments). | |
| SWMM_ENGINE_API int | swmm_forcing_clear (SWMM_Engine engine, int type, int idx) |
| Clear forcing on a specific element and channel. | |
| SWMM_ENGINE_API int | swmm_forcing_clear_all (SWMM_Engine engine) |
| Clear ALL forcings on ALL elements. | |
Runtime forcing API — inject fluxes with mass-balance tracking.
Provides per-element runtime forcing of lateral inflows, head boundaries, rainfall, evaporation, link settings, and quality mass fluxes. Each forcing specifies:
Forced volumes are tracked in the mass balance and reported separately via SWMM_ROUTING_FORCING.
All forcing functions require SWMM_STATE_RUNNING.
| #define SWMM_ENGINE_API __attribute__((visibility("default"))) |
| typedef enum SWMM_ForcingMode SWMM_ForcingMode |
How the forcing value is applied relative to the computed value.
| typedef enum SWMM_ForcingPersist SWMM_ForcingPersist |
Whether the forcing persists across timesteps.
| typedef enum SWMM_ForcingType SWMM_ForcingType |
Forcing channel identifier (for targeted clear).
| enum SWMM_ForcingMode |
| enum SWMM_ForcingPersist |
| enum SWMM_ForcingType |