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

Phase E4/R6 — reaction binding for the Eulerian ARD engine. 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

bool openswmm::transport::ardReactionsActive (const SimulationContext &ctx)
 
bool openswmm::transport::ardHasWallSpecies (const SimulationContext &ctx)
 
void openswmm::transport::reactArdStage (SimulationContext &ctx, double dt, double *cell_phi, const double *cell_a, const double *cell_dx, int n_cells, double *node_mass, const double *node_vol, int n_nodes, int n_pollut, int ns_total, double min_store_vol, int temp_row=-1)
 The E4 reaction stage over one routing step.
 

Detailed Description

Phase E4/R6 — reaction binding for the Eulerian ARD engine.

One reaction stage per ROUTING step on the ARD mesh state, Lie-split after the advection–dispersion subcycle (first-order splitting, the documented decision of roadmap lesson 13: the integrator substeps adaptively inside the stage, routing steps are short relative to typical kinetics, and the projection error dominates — revisit if the LEGACY-vs-ARD convergence gate says otherwise):

  1. Pollutant kdecay as the exact exponential on every cell (concentration) and node store (mass) — the closed form of the implicit first-order RATE the plan's E4 row names. This runs whether or not a reactions component is configured, retiring the E1 "kdecay not yet applied" warning.
  2. MSX species integrate per cell (pipe scope) and per node store (tank scope, HRT populated) via ReactionIntegrator, with the element's pollutant concentrations readable (PUSH_POLLUT). FORMULA sees post-decay pollutants — the R4 ordering, kept identical so the two bindings agree at the CSTR limit.

MSX species are TRANSPORTED on the mesh under this engine (R6): the ARD state carries n_pollutants + n_msx species rows, so the R4b element-local limitation does not apply here. WALL species have no transport semantics yet — a model with WALL species under EULERIAN_ARD falls back to LEGACY with a warning.

Failure containment matches R4: a failed integration leaves the element's block unchanged and warns once per run with the element kind/index and the integrator's remedy text.

See also
plans/transport/EULERIAN_ARD_TRANSPORT_PLAN.md §6 E4
plans/transport/MULTISPECIES_REACTIONS_MSX_PLAN.md §5 R6
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n Apache-2.0