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

Phase R4b (transport half) — MSX species advect under LEGACY. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  openswmm
 
namespace  openswmm::transport
 

Functions

void openswmm::transport::routeLegacyMsx (SimulationContext &ctx, double dt)
 

Detailed Description

Phase R4b (transport half) — MSX species advect under LEGACY.

R4 gave MSX species per-element STATE and per-element REACTION under the LEGACY dispatch, but nothing moved that state between elements: a species injected via [REACTION_QUALITY] upstream reacted in place and never arrived downstream, and a warning said so at open. This is the mirror that retires that warning.

Provenance
Line for line, routeLegacyHeat (HeatLegacy.cpp) — the CSTR mirror family A1b established: snapshot old state, accumulate q · c_old into each downstream node, mix as (c_old·v_old + mass_in)/(v_old + v_in) with the two-sided clamp, then the updateLinkQuality link branches with the DW q_in correction. Differences from the heat mirror, each deliberate:
  • No external-load pathway. Species take no [INFLOWS]; their only sources are initial state and reactions (L3's own note). The node_temp_vol_in term has no analogue here.
  • No aging and no decay. Reaction kinetics belong to the shared integrator (reactLegacyNodes/Links), which runs in its own stage; re-applying anything here would double-count, which is the trap the L3 record names for LARD's stage 4/4b split.
  • No evaporation factor, matching the age and heat mirrors rather than the pollutant path. Recorded divergence: during evaporation an MSX concentration will not up-concentrate. The pollutant path's own evap factor was found CREATING mass at draining nodes (KD1), so the omission is the safer side.
Ordering
Runs beside the age and heat mirrors at the END of QualitySolver::execute — after reactLegacyNodes/Links, so a RATE species reacts against this step's pre-transport state and is then advected (Lie split, the roadmap's lesson-13 convention). With no reaction system configured this function returns before touching anything, so pollutant-only models are bit-identical by construction.
See also
plans/transport/MULTISPECIES_REACTIONS_MSX_PLAN.md (R4b)
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n Apache-2.0