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

#include <Inlet.hpp>

Collaboration diagram for openswmm::inlet::InletSolver:

Public Member Functions

void init (SimulationContext &ctx)
 Resolve inlet deployments into native geometry, topology, placement and backflow weights.
 
void computeAll (SimulationContext &ctx, double dt)
 Evaluate capture/backflow and add inlet exchanges to node lateral flows.
 
void adjustQualInflows (SimulationContext &ctx, double dt)
 Add pollutant inflow volume and mass-rate contributions for net inlet exchange.
 
void adjustFloodingTotals (SimulationContext &ctx, double dt) const
 Credit current capture-node overflow returned to inlet corridors out of flooding ledgers.
 
void gatherStats (SimulationContext &ctx) const
 Publish retained inlet statistics to model usage and reporting stores.
 
const InletSoA & soa () const noexcept
 Borrow read-only resolved inlet/runtime/statistic columns.
 
bool hasInlets () const noexcept
 Check whether any runtime usage rows are allocated.
 

Member Function Documentation

◆ adjustFloodingTotals()

void openswmm::inlet::InletSolver::adjustFloodingTotals ( SimulationContext & ctx,
double dt ) const

Credit current capture-node overflow returned to inlet corridors out of flooding ledgers.

Call after system outflow removal. Visits each marked capture node once and subtracts its entire positive current overflow, independent of legacy per-inlet backflow ratios. Step flooding rate and cumulative flooding may become slightly negative; no clamp. Does not modify hydraulic overflow or inlet capture columns.

Parameters
[in,out]ctxBorrowed aligned current overflow/concentration and mass-balance arrays; updates global water/pollutant flood totals.
[in]dtRouting seconds; water volume q*dt ft3 and pollutant ledger q*concentration*dt.
Here is the call graph for this function:

◆ adjustQualInflows()

void openswmm::inlet::InletSolver::adjustQualInflows ( SimulationContext & ctx,
double dt )

Add pollutant inflow volume and mass-rate contributions for net inlet exchange.

Call after hydraulic routing before quality routing. Positive net capture uses bypass old concentration at capture receiver; negative net uses capture old concentration at bypass receiver. Skips absent/invalid endpoints and no-inlet/no-pollutant cases. Does not subtract sender mass itself, convert concentration units or multiply mass-rate by dt here.

Parameters
[in,out]ctxBorrowed live quality arrays with valid node-sized qual_vol_in and pollutant-strided old concentrations/mass-rate accumulators.
[in]dtRouting interval seconds; qNet*dt adds ft3 while qNet*old concentration adds mass-rate in existing quality conventions.
Here is the call graph for this function:

◆ computeAll()

void openswmm::inlet::InletSolver::computeAll ( SimulationContext & ctx,
double dt )

Evaluate capture/backflow and add inlet exchanges to node lateral flows.

Runs before hydraulic routing after external lateral assembly. Processes reverse authored order with carried-over street sides, computes approach/design capacity and previous capture-node overflow backflow, then applies selected non-DW/node-host water limits. Subtracts net capture at bypass and adds capture at receiving node, accumulating ft3/flow statistics. Performance counters require current_date>report_start. Scratch can resize if node count grew; no full topology rebind, generic rollback or finite validation.

Parameters
[in,out]ctxBorrowed live hydraulic state and aligned init mappings; modifies nodes.lat_flow and reads previous link flows/overflow.
[in]dtPositive finite routing interval seconds for donor-volume caps and cumulative volumes.
Here is the call graph for this function:

◆ gatherStats()

void openswmm::inlet::InletSolver::gatherStats ( SimulationContext & ctx) const

Publish retained inlet statistics to model usage and reporting stores.

Copies ft3 captured/bypass/backflow totals, peak cfs and legacy period/efficiency sums; does not normalize average sums or reset runtime statistics. Allocation can leave partial publication; call before report generation.

Parameters
[in,out]ctxBorrowed model whose inlet_usages stat vectors and inlet_diag are resized/overwritten for min(runtime count,usage count).
Here is the call graph for this function:

◆ hasInlets()

bool openswmm::inlet::InletSolver::hasInlets ( ) const
inlinenoexcept

Check whether any runtime usage rows are allocated.

Returns
True when soa.count>0; does not establish valid topology or active capture.

◆ init()

void openswmm::inlet::InletSolver::init ( SimulationContext & ctx)

Resolve inlet deployments into native geometry, topology, placement and backflow weights.

Resets SoA/statistics, converts lengths/flow limits once to ft/cfs and slopes percent to fractions, finds node-host approach links or conduit downstream bypass, resolves AUTOMATIC sag placement and seeds carried-over side count. Backflow weights deliberately use the legacy global inlet bucket. No-op after resetting count when no usages; no complete geometry/reference validation. Allocation can leave partial solver state; rerun after authoring edits, serialize all solver use.

Parameters
[in]ctxBorrowed resolved model with coherent inlet usage/design/street/link/node/curve registries; authoring lengths/flows stay in project units.
Here is the call graph for this function:

◆ soa()

const InletSoA & openswmm::inlet::InletSolver::soa ( ) const
inlinenoexcept

Borrow read-only resolved inlet/runtime/statistic columns.

Returns
Owned SoA reference; element views invalidate on init/resize/destruction.

The documentation for this class was generated from the following files: