Owned resolved inflow definitions and pattern lookup cache. Serialize init/refresh/compute with model edits and table readers. Per-call outputs are rates, not integrated amounts; routing assembles the decomposed water arrays into lateral flow later. No rollback or per-call error status.
More...
#include <Inflow.hpp>
Owned resolved inflow definitions and pattern lookup cache. Serialize init/refresh/compute with model edits and table readers. Per-call outputs are rates, not integrated amounts; routing assembles the decomposed water arrays into lateral flow later. No rollback or per-call error status.
◆ computeAll()
| void openswmm::inflow::InflowSolver::computeAll |
( |
SimulationContext & | ctx, |
|
|
double | current_date, |
|
|
double | dt ) |
Add resolved external/DWF water and quality rates to routing input channels.
- Parameters
-
| [in,out] | ctx | Compatible initialized model matching cached definitions, with aligned node water/pollutant/species/age arrays, valid units and sorted source tables. Caller clears ext_inflow, dwf_inflow, ext_qual_mass and dwf_qual_mass for this routing step before calling; this method scatter-adds into them, not lat_flow. Selected table cursors advance. Reactions mass-rate storage is resized/reset at the external-species seam then receives external, DWF and nonbooster source loads; reaction source indices/pattern arrays and positive timestep must be qualified. |
| current_date | Finite supported absolute SWMM/OLE day, not elapsed seconds. Calendar pattern lookup requires nonnegative valid month/day/hour indices. |
| dt | Unused compatibility step seconds; values are instantaneous rates and this method does not integrate them or advance simulation clocks. FLOW rows establish cfs first (absolute values below FLOW_TOL become zero), then CONCEN multiplies that external water and MASS supplies a direct load. DWF uses monthly*daily*(hourly or weekend), positive water for quality and subtracts the pollutant default displaced by a node concentration. Wall species are skipped; nonbooster reaction sources use positive external plus DWF water or declared mass/28.317. Ages overwrite the per-node age in seconds without adding water. No finite/range validation, transaction rollback or success diagnostic; allocations and lookup exceptions propagate and can follow partial accumulator mutation. |
◆ init()
Rebuild external/DWF row caches, bindings and unit conversions from the model.
- Parameters
-
| [in,out] | ctx | Compatible initialized aligned inflow/pattern/node/pollutant/ reaction data with valid flow units [0,5]. Replaces private caches, appends unique warnings for unsupported/unresolved external constituents and resets per-node external inflow ages to NaN when water-age tracking is enabled. Does not compute current hydraulic inflow or clear context water/quality accumulators. Pattern names resolve case insensitively; up to four DWF patterns are reordered by type, last repeated type wins. Pollutant lookup precedes case-insensitive FLOW prefix matching. Exact reserved age rows carry hours converted to seconds; reserved temperature rows are warned/inert. Reactions species bind separately; wall species are ignored during evaluation. External MASS factors divide by 28.317; flow converts display units to cfs. Last repeated node/constituent row supersedes earlier rows across concentration/mass variants; unresolved inert rows do not suppress a flow. Missing series/pattern bindings silently use zero/one. Call after definition/name/count changes. No general physical/index validation, atomic rollback or exception translation is supplied. |
◆ refreshPatterns()
| void openswmm::inflow::InflowSolver::refreshPatterns |
( |
const SimulationContext & | ctx | ) |
|
Copy current pattern types/factors into private fixed-width runtime rows.
- Parameters
-
| ctx | Compatible initialized pattern names/types/factor arrays; borrowed only. Resizes cache to count, initializes each twenty-four-slot row to one, then copies at most twenty-four supplied factors. Does not validate values, re-resolve inflow bindings or sort DWF rows. Stable name/index identity is required for a refresh; use init() after count/name/order/binding changes. Allocations can throw and leave partial cache updates. Subsequent computeAll sees copied factors; earlier model edits alone do not change this cache. |
◆ openswmm::SWMMEngine
| friend class openswmm::SWMMEngine |
|
friend |
The documentation for this class was generated from the following files:
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/hydrology/Inflow.hpp
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/hydrology/Inflow.cpp