OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
MsxSurfaceQuality.cpp File Reference

BW-MSX — see MsxSurfaceQuality.hpp. Every formula below is the pollutant step's (SWMMEngine::stepSurfaceQuality / A7 sweeping / initialize 11b), transcribed with p → m and the pollutant arrays replaced by ReactionData::surface. Keep them in lock-step: the BW-MSX gate asserts an MSX species with a pollutant's parameters produces the pollutant's loads bit-for-bit. More...

Include dependency graph for MsxSurfaceQuality.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::msxsurf
 

Functions

double openswmm::msxsurf::speciesUnitFactor (const std::string &units, const SimulationOptions &opts)
 Map a species unit prefix to its concentration-mass to user-mass factor.
 
bool openswmm::msxsurf::active (const SimulationContext &ctx) noexcept
 Read whether the resolved surface species store is active.
 
void openswmm::msxsurf::resolveLidRemovals (SimulationContext &ctx, std::vector< std::string > &warnings)
 Bind by-name LID removals to pollutant or native species identities.
 
void openswmm::msxsurf::activateForRain (SimulationContext &ctx) noexcept
 Enable native surface storage needed by rainfall or scoped reaction/LID laws.
 
std::vector< std::string > openswmm::msxsurf::resolve (SimulationContext &ctx)
 Resolve named surface rows then activate rainfall/reaction-only species storage.
 
void openswmm::msxsurf::refreshDerived (SimulationContext &ctx) noexcept
 Recalculate analytic buildup saturation times after a parameter edit.
 
void openswmm::msxsurf::initState (SimulationContext &ctx)
 Reset native surface state and seed initial dry buildup from loadings or dry days.
 
void openswmm::msxsurf::step (SimulationContext &ctx, double dt_runoff, double old_runoff_time)
 Advance native dry/wet species reactions and shared surface buildup/washoff once.
 
void openswmm::msxsurf::bookPostLid (SimulationContext &ctx, double dt_runoff, const std::vector< double > &lid_infil_vol)
 Book native species deposition/infiltration and runoff after conventional LID routing.
 
void openswmm::msxsurf::addLidDrain (SimulationContext &ctx, int control, int sc, int node, double drain_cfs, bool to_perv, bool runoff_load, double dt_runoff, const double *source) noexcept
 Queue one conventional LID underdrain species export and optional runoff/BMP mass bookings.
 
void openswmm::msxsurf::addLidDrainRunon (SimulationContext &ctx, int control, int sc, int receiver, double drain_cfs, bool to_perv, bool runoff_load, double dt_runoff, const double *source) noexcept
 Queue one conventional LID underdrain species export and optional runoff/BMP mass bookings.
 
void openswmm::msxsurf::consumeLidDrainRunon (SimulationContext &ctx, int receiver) noexcept
 Move queued LID underdrain species run-on into one receiver and clear that queue.
 
void openswmm::msxsurf::rollLidDrain (SimulationContext &ctx) noexcept
 Retain current node underdrain species rates as previous step then clear current rates.
 
double openswmm::msxsurf::remainingBuildup (const SimulationContext &ctx, int m) noexcept
 Sum retained surface and conventional-LID species inventory for final user-mass reporting.
 
void openswmm::msxsurf::clearRunon (SimulationContext &ctx) noexcept
 Clear every native surface species run-on mass-rate entry before assembly.
 
void openswmm::msxsurf::addRunon (SimulationContext &ctx, int donor, int receiver, double q) noexcept
 Add donor previous-runoff species concentration to one receiver's run-on mass rate.
 
void openswmm::msxsurf::deliver (SimulationContext &ctx, double dt_routing)
 Deliver this routing step's washoff into msx_ext_mass_in (+= interpolated old/new runoff mass rate per outlet node, the addWetWeatherLoads trapezoid on old/new runoff). Call after the external-inflow assembly has (re)zeroed the array for the step.
 

Detailed Description

BW-MSX — see MsxSurfaceQuality.hpp. Every formula below is the pollutant step's (SWMMEngine::stepSurfaceQuality / A7 sweeping / initialize 11b), transcribed with p → m and the pollutant arrays replaced by ReactionData::surface. Keep them in lock-step: the BW-MSX gate asserts an MSX species with a pollutant's parameters produces the pollutant's loads bit-for-bit.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License
Apache-2.0