Owns per-cell infiltration parameters, kernel state and held rates.
More...
#include <Infil2D.hpp>
Owns per-cell infiltration parameters, kernel state and held rates.
Lifecycle:
- Parsers fill
defaults(), overrides(), options().
SurfaceRouter2D::initialize() calls resolve() once the mesh (and therefore MeshData::tri_tag) is available.
SurfaceRouter2D calls updateRates() every INFIL_STEP.
- The marcher consumes
SurfaceStateData::infil_rate only.
Empty/unconfigured is the fast path: active() is false and no array is allocated, so a project with no [2D_INFILTRATION*] sections is bitwise identical to the pre-track-I engine (gate I7).
◆ active()
| bool openswmm::twoD::Infil2D::active |
( |
| ) |
const |
|
inlinenoexcept |
True when at least one cell resolved to a model.
◆ aquifer2DAvailable()
| bool openswmm::twoD::Infil2D::aquifer2DAvailable |
( |
| ) |
const |
|
inlinenoexcept |
◆ cumulative()
| const std::vector< double > & openswmm::twoD::Infil2D::cumulative |
( |
| ) |
const |
|
inlinenoexcept |
Cumulative infiltration CAPACITY per triangle (m): the integral of the published rate, without the solver's depth ramp. On a drying cell this exceeds the water actually removed, so it is NOT ledger-consistent with MassBalance2D::infil_out. SurfaceRouter2D::infilCumulative() is the ledger-consistent series and is what the sidecar's infil_cum and the C API's *_get_cum_bulk report; this one is retained as the kernel-side diagnostic.
◆ deactivate()
| void openswmm::twoD::Infil2D::deactivate |
( |
| ) |
|
|
inlinenoexcept |
E2: [2D_OPTIONS] INFILTRATION NO — keep the rows (they still save) but run without infiltration. Called after resolve().
◆ defaults() [1/2]
| const std::vector< Infil2DDefault > & openswmm::twoD::Infil2D::defaults |
( |
| ) |
const |
|
inlinenoexcept |
◆ defaults() [2/2]
◆ options() [1/2]
◆ options() [2/2]
◆ overrides() [1/2]
| const std::vector< Infil2DOverride > & openswmm::twoD::Infil2D::overrides |
( |
| ) |
const |
|
inlinenoexcept |
◆ overrides() [2/2]
◆ provenance()
| const std::vector< Infil2DProvenance > & openswmm::twoD::Infil2D::provenance |
( |
| ) |
const |
|
inlinenoexcept |
Provenance per triangle (D-I3, for the writer).
◆ reset()
| void openswmm::twoD::Infil2D::reset |
( |
| ) |
|
Clear everything back to the unconfigured fast path.
◆ resolve()
Resolve tag/override precedence into flat per-cell state.
D-I3 precedence: override > tag > '' > none. Initializes the hydrology kernel state for every cell that resolved to a model, converting project-unit parameters through `infil::_init`.
- Parameters
-
| mesh | Mesh (uses tri_tag and n_triangles()). |
| opts | Simulation options (unit system for the *_init conversions). |
| err | [out] Human-readable message when the return is false. |
- Returns
- False on a validation failure (unsupported destination, out-of-range triangle index, unknown method, bad parameters).
◆ resolvedRows()
| const std::vector< Infil2DRow > & openswmm::twoD::Infil2D::resolvedRows |
( |
| ) |
const |
|
inlinenoexcept |
Resolved method per triangle; has_method == false entries are NONE.
◆ setAquifer2DAvailable()
| void openswmm::twoD::Infil2D::setAquifer2DAvailable |
( |
bool | on | ) |
|
|
inlinenoexcept |
G1 — tell validation that a [2D_AQUIFER] resolved, so the AQUIFER_2D destination has somewhere to send its water.
Must be called before resolve(). Without it AQUIFER_2D is refused, which is the right answer when there is no aquifer: silently treating it as LOST would drain a model the user believed was recharging.
◆ stepSeconds()
| double openswmm::twoD::Infil2D::stepSeconds |
( |
| ) |
const |
|
inlinenoexcept |
Resolved cadence in seconds (options_.infil_step, or the project WET_STEP when that was <= 0). Set by resolve().
◆ updateRates()
Recompute and publish per-cell infiltration rates (D-I1).
Called on the INFIL_STEP cadence. Advances kernel state for EVERY model-carrying cell, including cells the marcher has deactivated — otherwise a dry cell presents full initial capacity when rain finally arrives (§5.5.2).
Writes state.infil_rate[i] in m/s, >= 0. Conversion: precip/depth SI→ft on the way in, rate ft/s→SI on the way out.
- Parameters
-
| mesh | Mesh (unused today; kept for symmetry and future area use). |
| state | Surface state — reads rainfall/depth, writes infil_rate. |
| dt | Elapsed seconds since the previous call (the INFIL_STEP). |
The documentation for this class was generated from the following files:
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/2d/infil/Infil2D.hpp
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/2d/infil/Infil2D.cpp