|
| 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_node_temperature (SWMM_Engine engine, int node_idx, double value, int mode, int persist) |
| | Force the water temperature at a node (U2, 2026-09-07).
|
| |
| SWMM_ENGINE_API int | swmm_forcing_node_age (SWMM_Engine engine, int node_idx, double value, int mode, int persist) |
| | Force the water age at a node (U2, 2026-09-07).
|
| |
| 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_link_quality (SWMM_Engine engine, int link_idx, int pollutant_idx, double value, int mode, int persist) |
| | Force pollutant quality on a link.
|
| |
| 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) |
| | Prescribe a potential evapotranspiration (PET) rate on a subcatchment.
|
| |
| SWMM_ENGINE_API int | swmm_forcing_subcatch_snowfall (SWMM_Engine engine, int idx, double value, int mode, int persist) |
| | Prescribe snowfall on a subcatchment.
|
| |
| SWMM_ENGINE_API int | swmm_climate_get_evap_rate (SWMM_Engine engine, double *value) |
| | Get the current climate-derived evaporation rate.
|
| |
| SWMM_ENGINE_API int | swmm_forcing_climate_temperature (SWMM_Engine engine, double value, int mode, int persist) |
| | Prescribe the air temperature used for snowmelt and temperature-derived evaporation.
|
| |
| SWMM_ENGINE_API int | swmm_climate_get_temperature (SWMM_Engine engine, double *value) |
| | Get the current air temperature (read-only).
|
| |
| SWMM_ENGINE_API int | swmm_forcing_climate_wind (SWMM_Engine engine, double value, int mode, int persist) |
| | Prescribe the wind speed used in rain-on-snow melt.
|
| |
| SWMM_ENGINE_API int | swmm_climate_get_wind_speed (SWMM_Engine engine, double *value) |
| | Get the current wind speed (read-only).
|
| |
| SWMM_ENGINE_API int | swmm_forcing_climate_evap (SWMM_Engine engine, double value, int mode, int persist) |
| | Prescribe the system-wide evaporation rate.
|
| |
| SWMM_ENGINE_API int | swmm_climate_set_dry_only (SWMM_Engine engine, int flag) |
| | Set the evaporation DRY_ONLY option at runtime.
|
| |
| SWMM_ENGINE_API int | swmm_climate_get_dry_only (SWMM_Engine engine, int *flag) |
| | Get the evaporation DRY_ONLY option.
|
| |
| 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_element_climate (SWMM_Engine engine, int kind, int index, int variable, double value, int mode, int persist) |
| | Clear forcing on a specific element and channel.
|
| |
| SWMM_ENGINE_API int | swmm_forcing_element_climate_get (SWMM_Engine engine, int kind, int index, int variable, double *value, int *mode) |
| | Read back a per-element climate forcing.
|
| |
| SWMM_ENGINE_API int | swmm_forcing_clear (SWMM_Engine engine, int type, int idx) |
| |
| 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:
- mode: NONE (disabled), OVERRIDE (replace computed value), ADD (add to computed value)
- persistence: RESET (auto-clear after each timestep), PERSIST (keep until explicitly cleared)
Forced volumes are tracked in the mass balance and reported separately via SWMM_ROUTING_FORCING.
All forcing functions require SWMM_STATE_RUNNING.
Lifecycle
}
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.
Definition openswmm_forcing_impl.cpp:52
@ SWMM_OK
Definition openswmm_engine.h:117
SWMM_ENGINE_API int swmm_engine_end(SWMM_Engine engine)
End the simulation → SWMM_STATE_ENDED.
Definition openswmm_engine_impl.cpp:87
SWMM_ENGINE_API int swmm_engine_start(SWMM_Engine engine, int save_results)
Start the simulation → SWMM_STATE_STARTED.
Definition openswmm_engine_impl.cpp:61
SWMM_ENGINE_API int swmm_engine_step(SWMM_Engine engine, double *elapsed_time)
Advance one explicit timestep. elapsed_time==0 when done.
Definition openswmm_engine_impl.cpp:66
@ SWMM_FORCING_ADD
Definition openswmm_forcing.h:93
@ SWMM_FORCING_PERSIST
Definition openswmm_forcing.h:99
- Note
- All value parameters are in the simulation's internal units (ft, sec, CFS) unless otherwise noted. Rainfall values are in user display units (in/hr for US, mm/hr for SI) — the engine converts internally.