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

Phase H5b — temperature through the LID layer stack. More...

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

Go to the source code of this file.

Namespaces

namespace  openswmm
 
namespace  openswmm::lid
 
namespace  openswmm::transport
 

Functions

void openswmm::transport::initLidLayerTemperature (SimulationContext &ctx, const lid::LIDSolver &solver)
 
void openswmm::transport::setLidInflowTemperature (SimulationContext &ctx, int type_index, int unit, int subcatch, double rain_rate, double q_imperv, double q_perv, double q_runon, double lid_area)
 
void openswmm::transport::routeLidLayerTemperature (SimulationContext &ctx, const lid::LIDSolver &solver, double dt)
 
double openswmm::transport::lidLayerHeatCapacity (const SimulationContext &ctx, const lid::LIDGroupSoA &g, std::size_t unit, int layer) noexcept
 Heat capacity of one layer, J/m²/K over the layer's footprint.
 

Detailed Description

Phase H5b — temperature through the LID layer stack.

A4 built LidLayerSpeciesState with a species stride for exactly this. Temperature is row 1; nothing about the layer indexing changes. What differs from WaterAgeLid is the same three things HeatWatershed differs from WaterAgeWatershed by — no aging term, no zero floor, and a dry layer takes the D-H5c policy rather than A4's = 0 — plus one that is new here: the column exchanges heat with itself.

The thermal step is COLUMN-COUPLED, and that is the call to challenge
Conduction couples adjacent layers, so it is a second operator on the same state. Lesson 80 says an operator applied sequentially after a relaxation does not compose — that is the defect D-H5e just fixed between SurfaceExchange and RadiativeExchange, and applying conduction as its own pass would reproduce it inside one phase.

So the whole column is stepped at once: atmospheric flux on the exposed layer, conduction on every adjacent pair, solved implicitly as one tridiagonal system.

Two alternatives were measured and rejected:

  • Per-layer relaxation with frozen neighbours is stable, but the energy leaving a layer is not the energy its neighbour receives, so the column leaks. On a thin surface film relaxing fully toward its equilibrium with the soil in one step, the leak is the whole exchange.
  • Explicit conduction conserves energy exactly but is stiff where it matters. A 1e-4 m surface film against a 0.3 m soil layer gives k·dt = 1.91 at a 60 s step — the same regime that produced H5a's NaN. Not "probably fine": computed, with the module's own capacity and conductivity expressions. The same column with the soil layer alone gives k·dt = 5.3e-4, which is why conduction looks harmless until a film appears.
Adjacency comes from the DONOR MAP, not a second table
WaterAgeLid's donorsFor already encodes which layer feeds which, per LID type, and for a vertical stack that IS the physical adjacency. Writing a second stacking table would be a third copy of the same topology, which is the shape of lesson 81.
See also
plans/transport/HEAT_TRANSPORT_PLAN.md §6 H5b, §6.1 D-H5b/D-H5c
src/engine/transport/components/WaterAgeModule/WaterAgeLid.hpp
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n Apache-2.0