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

Plan H6b — the bed / hyporheic transient-storage zone. More...

#include <cstddef>
#include <vector>
Include dependency graph for BedZoneData.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::SedimentConfig
 [SEDIMENT_EXCHANGE] — the bed zone's material and geometry. More...
 
struct  openswmm::BedZoneState
 Runtime bed state, one entry per LINK. More...
 

Namespaces

namespace  openswmm
 

Detailed Description

Plan H6b — the bed / hyporheic transient-storage zone.

A second, immobile water-and-sediment body beneath each conduit. It exchanges with the channel by conduction and by hyporheic advection, and it conducts to a deep-ground boundary held at a fixed or time-varying temperature. It is the zone HydroCouple's HTSComponent models as a coupled component; here it is internal state, because SWMM has no component to couple to.

The reference, verbatim
HTSComponent/src/element.cpp:132-141:
mainChannelConductionHeat = alpha * W * L * (T_ch - T) * rho_s * c_s / depth;
groundConductionHeat = alpha * W * L * (T_gr - T) * rho_s * c_s / groundConductionDepth;
mainChannelAdvectionHeat = rho_w * c_p * Q_hts * (T_ch - T);
DTDt = (cond_mc + cond_gr + adv + ext + rad*L*W) / (rho_s * c_s * V);
and elementoutput.cpp:104,117 hands the channel back -adv and -cond_mc — exact reciprocity. Only the ground term is a true source or sink; everything else moves energy between two bodies that this engine owns, so their sum is conserved and a gate asserts it.
Three deliberate divergences from the reference, and why
  1. Contact area is the WETTED PERIMETER, not the top width. HTSComponent is an open-channel model where W is both. A SWMM conduit is usually a closed pipe, whose contact with the surrounding soil is P = A/R, and for a full circular pipe the top width is zero — the reference's spelling would switch the whole module off exactly when a surcharged pipe conducts most. This is the "clear conceptual issue" exception to parity.
  2. Hyporheic exchange is a VELOCITY (m/s), not a discharge. HTSComponent receives mainChannelAdvectionCoeff per element from a coupled subsurface model (elementinput.cpp:368). SWMM has no such supplier, and one absolute m³/s applied to every conduit in a network of mixed lengths is not a physical statement. Q_hts = v_hyp · A_bed scales with the element the way the conduction term already does.
  3. Sediment properties default to the STREAMBED pair (1670 kg/m³, 1807 J/kg/K), which is HTSComponent's own (htsmodel.cpp:50-51) — deliberately NOT ConductionConfig's 1970/2758, which came from GWComponent and describes a bioretention soil column. HeatData.hpp:128 already records that the two are different materials; this is the file that needs the other one.
See also
plans/transport/HEAT_TRANSPORT_PLAN.md §2.3, §6.5 D-H6b
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n Apache-2.0