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

Reaction kinetics integration — phase R3 body. More...

#include "ReactionIntegrator.hpp"
#include <algorithm>
#include <cmath>
#include "ReactionExpression.hpp"
Include dependency graph for ReactionIntegrator.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::transport
 

Detailed Description

Reaction kinetics integration — phase R3 body.

Solver notes:

  • EUL: single explicit Euler step over dt (MSX EUL semantics).
  • RK5: Cash–Karp embedded 4(5) with adaptive substepping controlled by the per-species atol/rtol weighted RMS norm.
  • ROS2: 2-stage L-stable Rosenbrock (γ = 1 − 1/√2) with FD Jacobian, adaptive by step-doubling comparison.
  • BDF2: fixed-order BDF2 with Newton (+ dense LU), backward- Euler startup step, adaptive by halving on Newton failure — the D-R7-amendment stiff workhorse. Substep floor guards against pathological kinetics; hitting it is a HARD failure (report.error), never a silent inaccuracy.
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n Apache-2.0