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

Subcatchment runoff — 3-subarea nonlinear reservoir model. More...

#include "Runoff.hpp"
#include "Gage.hpp"
#include "../core/SimulationContext.hpp"
#include "../core/UnitConversion.hpp"
#include "../math/OdeSolver.hpp"
#include "../math/SIMD.hpp"
#include <cmath>
#include <algorithm>
Include dependency graph for Runoff.cpp:

Namespaces

namespace  openswmm
 
namespace  openswmm::runoff
 

Detailed Description

Subcatchment runoff — 3-subarea nonlinear reservoir model.

Three subareas per subcatchment (matching legacy subcatch.c):

  • IMPERV0: Impervious with zero depression storage (PctZero fraction)
  • IMPERV1: Impervious with depression storage
  • PERV: Pervious with depression storage and infiltration

Depth integration uses RK45 Cash-Karp adaptive ODE solver via ode::integrate() from OdeSolver.hpp, matching the legacy subcatch.c updatePondedDepth() + odesolve_integrate() approach exactly.

The legacy fills depression storage first (reducing the integration interval), then solves dd/dt = inflow - alpha*(d-Ds)^(5/3) implicitly.

Note
Legacy reference: src/legacy/engine/subcatch.c, odesolve.c
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License