OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmm::outfall Namespace Reference

Functions

void buildOutfallLinkMap (SimulationContext &ctx)
 Precompute outfall → connecting-conduit index map.
 
void setAllOutfallDepths (SimulationContext &ctx, double dt_routing)
 Compute boundary depth at all outfall nodes.
 

Function Documentation

◆ buildOutfallLinkMap()

void openswmm::outfall::buildOutfallLinkMap ( SimulationContext & ctx)

Precompute outfall → connecting-conduit index map.

Walks the link table once at init and, for every outfall node, records the first conduit whose node2 (or node1) is that outfall, together with its offset at the outfall end. Results are stored in ctx.outfall_link_idx / outfall_link_offset so that setAllOutfallDepths can skip the O(N_links) inner scan per Picard iteration.

Parameters
ctxSimulation context (populates outfall_link_idx / offset).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAllOutfallDepths()

void openswmm::outfall::setAllOutfallDepths ( SimulationContext & ctx,
double dt_routing )

Compute boundary depth at all outfall nodes.

For each outfall:

  • FREE: critical depth from downstream conduit
  • NORMAL: normal depth from downstream conduit
  • FIXED: specified water surface elevation
  • TIDAL: elevation from the tidal curve at the END of the routing step, legacy node.c outfall_setOutletDepth: x = the curve's first x + the fractional ELAPSED day (NewRoutingTime / MSECperDAY) * 24 — the time of day counted from the simulation start, not the calendar hour
  • TIMESERIES: elevation from the time series at StartDateTime + NewRoutingTime / MSECperDAY (plain division, not getDateTime), interpolated

Legacy routing_execute advances NewRoutingTime before routeFlow, so the stage boundaries belong to the end of the step while the inflows and the control rules belong to its start (ctx.current_date, still the start here).

Parameters
ctxSimulation context (ctx.elapsed_ms = the step's start).
dt_routingThe routing step being taken (s).
Here is the call graph for this function:
Here is the caller graph for this function: