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

Per-cell infiltration for the 2D overland-flow mesh (track I). More...

#include <cstdint>
#include <string>
#include <vector>
#include "../../hydrology/Infiltration.hpp"
Include dependency graph for Infil2D.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::twoD::Infil2DRow
 One infiltration specification: method + positional parameters + destination. More...
 
struct  openswmm::twoD::Infil2DDefault
 
struct  openswmm::twoD::Infil2DOverride
 One [2D_INFILTRATION] per-cell override row. More...
 
struct  openswmm::twoD::Infil2DOptions
 [2D_INFILTRATION_OPTIONS]. More...
 
class  openswmm::twoD::Infil2D
 Owns per-cell infiltration parameters, kernel state and held rates. More...
 

Namespaces

namespace  openswmm
 
namespace  openswmm::twoD
 

Enumerations

enum class  openswmm::twoD::Infil2DDest : int {
  openswmm::twoD::LOST = 0 ,
  openswmm::twoD::SUBCATCH_AQUIFER = 1 ,
  openswmm::twoD::AQUIFER_2D = 2
}
 
enum class  openswmm::twoD::Infil2DProvenance : std::uint8_t {
  openswmm::twoD::NONE = 0 ,
  openswmm::twoD::STAR = 1 ,
  openswmm::twoD::TAG = 2 ,
  openswmm::twoD::OVERRIDE = 3
}
 

Functions

bool openswmm::twoD::parseInfil2DMethod (const std::string &token, InfilModel &method, bool &has_method)
 
const char * openswmm::twoD::infil2DMethodToken (const Infil2DRow &row)
 Inverse of parseInfil2DMethod — the canonical file token.
 
bool openswmm::twoD::parseInfil2DDest (const std::string &token, Infil2DDest &dest)
 Parse a destination token.
 
const char * openswmm::twoD::infil2DDestToken (Infil2DDest dest)
 Inverse of parseInfil2DDest.
 
int openswmm::twoD::infil2DParamCount (InfilModel method)
 

Variables

constexpr int openswmm::twoD::kInfil2DMaxParams = 5
 

Detailed Description

Per-cell infiltration for the 2D overland-flow mesh (track I).

Implements plans/TWO_ZONE_GROUNDWATER_EXPLICIT_LTS_PLAN_2026-08-15.md §5.5 (steps I1–I8, decisions D-I1…D-I6). This is the GROUNDWATER OFF infiltration path: a per-cell loss model so surface-only runs do not overestimate pervious runoff.

Design invariants — do not violate these without amending §5.5:

  • D-I1. Infiltration is a held rate, recomputed on the INFIL_STEP cadence and published into SurfaceStateData::infil_rate (m/s). It is NOT evaluated inside the marcher's fireCells. The marcher only consumes the held rate through infilSink().
  • D-I2. Sink order within a substep: rainfall source → evaporation (unchanged evapSink semantics) → infiltration against the remaining depth.
  • D-I3. Parameters resolve ‘per-cell override > tag row > ’*' row > none, once, at configure time. The solver never consults tags. Provenance is retained so the writer re-emits a compact file.
  • **D-I4.**LOST` is the only destination accepted in this release; the others parse and are rejected with a clear message.
  • D-I6. Six methods: HORTON, MOD_HORTON, GREEN_AMPT, MOD_GREEN_AMPT, CURVE_NUM, CONSTANT.

Units. Row parameters are in project units (the same numbers a user types into [INFILTRATION]) — user decision 2026-08-20. The infil::*_init functions consume those directly via ucf::UCF(...). The infil::*_getInfil kernels work in ft and ft/s; the 2D solver is SI. All conversion happens in Infil2D::updateRates() at the call boundary, so the hydrology kernels keep bit-parity with legacy infil.c.

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