Per-cell resolved parameters and state (SoA).
More...
#include <SubsurfaceData.hpp>
|
| void | resize (int n, int m) |
| | < the kernel ran this simulation
|
| |
| double | storage () const noexcept |
| | Total water in both zones (m³) — the continuity check's storage term.
|
| |
| double | liveStorage () const noexcept |
| | G-O: everything the aquifer HOLDS now, including water parked in a side accumulator (in flight between cells, received from the surface and not yet absorbed, pushed out and not yet taken) — what SWMM_GW2D_LED_STORAGE reports. nacc is deliberately not subtracted: that water is still inside hg until a cell applies it.
|
| |
| double | ledgeredStorage () const noexcept |
| | G-O: the storage the LEDGER can account for — holdings less the two surface accumulators, which are always one firing out of phase with led_infil_in / led_dunne (see continuityResidual).
|
| |
| double | continuityResidual () const noexcept |
| | G-O: ledgeredStorage − led_init_storage − (in − out) with in = infil_in + lateral.
|
| |
Per-cell resolved parameters and state (SoA).
Sized to the mesh cell count at initialize. Under MODE PER_SUBCATCH the "mesh" is one degenerate cell per subcatchment and every lateral term is absent — the identical code path, which is what makes G1 and G2 the same kernel.
◆ continuityResidual()
| double openswmm::twoD::SubsurfaceState::continuityResidual |
( |
| ) |
const |
|
noexcept |
G-O: ledgeredStorage − led_init_storage − (in − out) with in = infil_in + lateral.
- link + source_in, out = deep + node + et + dunne + reject + source_out; recharge and capillary rise are internal to a cell and do not appear. Zero to machine precision for a conserving kernel (swmm_gw2d_get_continuity_error).
- Returns
- Signed water balance residual m3: ledgeredStorage minus initial storage and net external ledger delivery. Source wells and rejected top delivery are included; recharge and capillary rise are internal and omitted. Positive means more accounted storage than net input.
- Note
- No normalization, tolerance check, mutation or phase synchronization occurs here.
◆ ledgeredStorage()
| double openswmm::twoD::SubsurfaceState::ledgeredStorage |
( |
| ) |
const |
|
noexcept |
G-O: the storage the LEDGER can account for — holdings less the two surface accumulators, which are always one firing out of phase with led_infil_in / led_dunne (see continuityResidual).
- Returns
- storage() plus eacc_L/eacc_R, in m3. Surface-transfer and conduit receipts are excluded to match their ledger booking phase; this is not all current water holdings.
- Note
- Requires stable, correctly sized physical state; no arrays or ledgers are changed.
◆ liveStorage()
| double openswmm::twoD::SubsurfaceState::liveStorage |
( |
| ) |
const |
|
noexcept |
G-O: everything the aquifer HOLDS now, including water parked in a side accumulator (in flight between cells, received from the surface and not yet absorbed, pushed out and not yet taken) — what SWMM_GW2D_LED_STORAGE reports. nacc is deliberately not subtracted: that water is still inside hg until a cell applies it.
- Returns
- storage() plus eacc_L, eacc_R, xacc_from_surface, xacc_to_surface and lacc, in m3. Node reservations nacc are excluded because their water remains in hg until gathered. Uses the current receipt phase; requires stable, consistently sized state and performs no validation.
◆ resize()
| void openswmm::twoD::SubsurfaceState::resize |
( |
int | n, |
|
|
int | m ) |
< the kernel ran this simulation
Reset cell-sized arrays to default parameters, empty states and diagnostic sentinels.
- Parameters
-
| [in] | n | Requested cell count; negative values become zero. |
| [in] | m | Requested equal hydraulic layers; values below one become one. theta_sigma uses m_layers*n_cells entries in layer-major order. |
- Note
- Resets cell diagnostics, accumulators and led_boundary_in/out, but retains all other scalar ledgers, active, and solver-sized eacc_L/eacc_R/nacc. Callers must reset those separately when starting another simulation. Allocation exceptions can leave dimensions and earlier arrays already changed; no transaction or extent-overflow check is provided. Invalidates vector views.
◆ storage()
| double openswmm::twoD::SubsurfaceState::storage |
( |
| ) |
const |
|
noexcept |
Total water in both zones (m³) — the continuity check's storage term.
- Returns
- Water volume m3 in both physical zones. Saturated contribution is hg*theta_s*area; SIGMA integrates nonnegative unsaturated length against theta_sigma, other closures use hu.
- Note
- Arrays and layer-major extents must match n_cells/m_layers. No validation, clipping of stored water contents, accumulation receipts or synchronization is performed.
◆ active
| bool openswmm::twoD::SubsurfaceState::active = false |
◆ alpha
| std::vector<double> openswmm::twoD::SubsurfaceState::alpha |
◆ area
| std::vector<double> openswmm::twoD::SubsurfaceState::area |
cell planimetric area (m²)
◆ c_loss
| std::vector<double> openswmm::twoD::SubsurfaceState::c_loss |
◆ closure
| std::vector<int8_t> openswmm::twoD::SubsurfaceState::closure |
◆ dt_cell
| std::vector<double> openswmm::twoD::SubsurfaceState::dt_cell |
min(Δt_g, Δt_u) per cell (s)
◆ dunne_cumulative
| std::vector<double> openswmm::twoD::SubsurfaceState::dunne_cumulative |
◆ dunne_last
| std::vector<double> openswmm::twoD::SubsurfaceState::dunne_last |
saturation-excess to the surface (m³/s)
◆ eacc_L
| std::vector<double> openswmm::twoD::SubsurfaceState::eacc_L |
Lateral Darcy side accumulators, one pair per unique GW edge — the same ±ΔV strategy as the surface facc_L_/facc_R_, which is what makes cross-tier conservation a property inherited rather than re-proved (G-B).
◆ eacc_R
| std::vector<double> openswmm::twoD::SubsurfaceState::eacc_R |
◆ et_pending
| std::vector<double> openswmm::twoD::SubsurfaceState::et_pending |
◆ et_potential_cumulative
| std::vector<double> openswmm::twoD::SubsurfaceState::et_potential_cumulative |
◆ et_potential_last
| std::vector<double> openswmm::twoD::SubsurfaceState::et_potential_last |
◆ et_refresh
| std::vector<double> openswmm::twoD::SubsurfaceState::et_refresh |
◆ et_soil_cumulative
| std::vector<double> openswmm::twoD::SubsurfaceState::et_soil_cumulative |
◆ et_stress
| std::vector<double> openswmm::twoD::SubsurfaceState::et_stress |
◆ et_surface_cumulative
| std::vector<double> openswmm::twoD::SubsurfaceState::et_surface_cumulative |
◆ et_surface_last
| std::vector<double> openswmm::twoD::SubsurfaceState::et_surface_last |
◆ et_unused_cumulative
| std::vector<double> openswmm::twoD::SubsurfaceState::et_unused_cumulative |
◆ hg
| std::vector<double> openswmm::twoD::SubsurfaceState::hg |
◆ hu
| std::vector<double> openswmm::twoD::SubsurfaceState::hu |
closure A: bulk unsat storage (m of water)
◆ infil_capacity
| std::vector<double> openswmm::twoD::SubsurfaceState::infil_capacity |
◆ infil_interval
| std::vector<double> openswmm::twoD::SubsurfaceState::infil_interval |
◆ infil_refresh
| std::vector<double> openswmm::twoD::SubsurfaceState::infil_refresh |
◆ infil_remaining
| std::vector<double> openswmm::twoD::SubsurfaceState::infil_remaining |
◆ Ks
| std::vector<double> openswmm::twoD::SubsurfaceState::Ks |
◆ lacc
| std::vector<double> openswmm::twoD::SubsurfaceState::lacc |
G-X3: conduit-seepage accumulator per cell (m³, + into the aquifer), booked by the router at the ROUTING cadence from the conduits' seepage rates and gathered at the GW cell's firing — the xacc_from_surface pattern, one phase behind led_link for the same reason.
◆ lambda
| std::vector<double> openswmm::twoD::SubsurfaceState::lambda |
◆ led_boundary_in
| double openswmm::twoD::SubsurfaceState::led_boundary_in = 0 |
◆ led_boundary_out
| double openswmm::twoD::SubsurfaceState::led_boundary_out = 0 |
gross split of led_lateral; not counted twice
◆ led_caprise
| double openswmm::twoD::SubsurfaceState::led_caprise = 0.0 |
capillary rise (the negative recharge share)
◆ led_deep
| double openswmm::twoD::SubsurfaceState::led_deep = 0.0 |
◆ led_dunne
| double openswmm::twoD::SubsurfaceState::led_dunne = 0.0 |
saturation excess to the surface
◆ led_et
| double openswmm::twoD::SubsurfaceState::led_et = 0.0 |
◆ led_final_storage
| double openswmm::twoD::SubsurfaceState::led_final_storage = 0.0 |
◆ led_infil_in
| double openswmm::twoD::SubsurfaceState::led_infil_in = 0.0 |
q⁺ delivered from the surface
◆ led_init_storage
| double openswmm::twoD::SubsurfaceState::led_init_storage = 0.0 |
◆ led_lateral
| double openswmm::twoD::SubsurfaceState::led_lateral = 0.0 |
net lateral Darcy across the domain edge
◆ led_link
| double openswmm::twoD::SubsurfaceState::led_link = 0.0 |
G-X3: conduit seepage delivered in
◆ led_node
| double openswmm::twoD::SubsurfaceState::led_node = 0.0 |
node exchange, + out of the aquifer
◆ led_recharge
| double openswmm::twoD::SubsurfaceState::led_recharge = 0.0 |
unsat → sat (negative = capillary rise)
◆ led_reject
| double openswmm::twoD::SubsurfaceState::led_reject = 0.0 |
rejected top-interface delivery returned to surface
◆ led_source_in
| double openswmm::twoD::SubsurfaceState::led_source_in = 0.0 |
◆ led_source_out
| double openswmm::twoD::SubsurfaceState::led_source_out = 0.0 |
wells, m3; separate from node/link exchange
◆ led_subcatch_in
| double openswmm::twoD::SubsurfaceState::led_subcatch_in = 0.0 |
Diagnostic split of led_infil_in: the share booked from 1D subcatchments without a lumped aquifer, counted at delivery (not a second inflow — continuityResidual does not use it).
◆ m_layers
| int openswmm::twoD::SubsurfaceState::m_layers = 0 |
σ layers per closure-B column (fixed)
◆ n_cells
| int openswmm::twoD::SubsurfaceState::n_cells = 0 |
◆ nacc
| std::vector<double> openswmm::twoD::SubsurfaceState::nacc |
Node-exchange accumulator, per coupled node (m³), booked at tier-0 node-head sampling and gathered at the GW cell's firing.
◆ psi_b
| std::vector<double> openswmm::twoD::SubsurfaceState::psi_b |
◆ q0_last
| std::vector<double> openswmm::twoD::SubsurfaceState::q0_last |
recharge (m/s), + down, − capillary rise
◆ qdeep_last
| std::vector<double> openswmm::twoD::SubsurfaceState::qdeep_last |
◆ qet_last
| std::vector<double> openswmm::twoD::SubsurfaceState::qet_last |
subsurface ET (m/s, ≥ 0 out)
◆ qlat_last
| std::vector<double> openswmm::twoD::SubsurfaceState::qlat_last |
net lateral Darcy into the cell (m³/s)
◆ qlink_last
| std::vector<double> openswmm::twoD::SubsurfaceState::qlink_last |
G-X3: conduit seepage delivered in (m³/s)
◆ qnode_last
| std::vector<double> openswmm::twoD::SubsurfaceState::qnode_last |
node exchange (m³/s), + into the pipe
◆ qplus_last
| std::vector<double> openswmm::twoD::SubsurfaceState::qplus_last |
infiltration delivered in (m/s)
◆ reject_cumulative
| std::vector<double> openswmm::twoD::SubsurfaceState::reject_cumulative |
◆ reject_last
| std::vector<double> openswmm::twoD::SubsurfaceState::reject_last |
◆ soil_char
| std::vector<int8_t> openswmm::twoD::SubsurfaceState::soil_char |
◆ theta_r
| std::vector<double> openswmm::twoD::SubsurfaceState::theta_r |
◆ theta_s
| std::vector<double> openswmm::twoD::SubsurfaceState::theta_s |
◆ theta_sigma
| std::vector<double> openswmm::twoD::SubsurfaceState::theta_sigma |
Closure B: layer water content θ, [layer * n_cells + cell] — layer-major so a fixed-layer sweep walks contiguous cells and vectorizes ACROSS columns (the σ pivot's key win over the draft's per-cell MOC column).
◆ tier
| std::vector<uint8_t> openswmm::twoD::SubsurfaceState::tier |
◆ vg_L
| std::vector<double> openswmm::twoD::SubsurfaceState::vg_L |
◆ vg_n
| std::vector<double> openswmm::twoD::SubsurfaceState::vg_n |
◆ wetting_front
| std::vector<double> openswmm::twoD::SubsurfaceState::wetting_front |
◆ xacc_from_surface
| std::vector<double> openswmm::twoD::SubsurfaceState::xacc_from_surface |
Cross-domain accumulator: volume (m³) the SURFACE booked for this GW cell at the surface's finer cadence, gathered at the GW firing.
◆ xacc_to_surface
| std::vector<double> openswmm::twoD::SubsurfaceState::xacc_to_surface |
…and the reverse: volume the GW cell owes the surface twin (Dunne, exfiltration), gathered by the surface cell.
◆ z_bed
| std::vector<double> openswmm::twoD::SubsurfaceState::z_bed |
aquifer bottom elevation (m) = cell z − zs
◆ zs
| std::vector<double> openswmm::twoD::SubsurfaceState::zs |
The documentation for this struct was generated from the following files:
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/2d/subsurface/SubsurfaceData.hpp
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/2d/subsurface/SubsurfaceData.cpp