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

Static per-cell weights mapping raingage rainfall onto the 2D mesh. More...

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

Go to the source code of this file.

Classes

class  openswmm::twoD::RainfallInterpolator
 Builds and applies static rainfall-interpolation weights for the mesh. More...
 

Namespaces

namespace  openswmm
 
namespace  openswmm::twoD
 

Detailed Description

Static per-cell weights mapping raingage rainfall onto the 2D mesh.

Precomputes, once, the weights that distribute the located raingages' rainfall onto every 2D cell centroid, then applies them each step as a sparse weighted sum. Gage POSITIONS are constant for a run, so only the per-step gage VALUES vary — making this a one-time build() + cheap per-step apply().

Scheme: natural-neighbour (Laplace) weights inside the convex hull of the located gages; inverse-distance weighting (power 2) for cells outside the hull. Laplace weights reproduce a linear rainfall field exactly inside the hull, with no polygon-area integration (the weight for neighbour g is the length of the shared Voronoi facet divided by the distance to g). The Delaunay triangulation of the gage sites is built with a small self-contained Bowyer–Watson routine — gage counts are tiny (typically < 30), so there is no external geometry dependency.

See also
SurfaceRouter2D::initialize / updateRainfall, SolverOptions2D::RainfallMode
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License