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

Non-conduit link flow: pumps, orifices, weirs, outlets. More...

#include "../data/LinkData.hpp"
#include "../data/NodeData.hpp"
#include "../data/TableData.hpp"
#include <vector>
Include dependency graph for HydStructures.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openswmm::hydstruct::PumpGroup
 
struct  openswmm::hydstruct::OrificeGroup
 
struct  openswmm::hydstruct::WeirGroup
 
struct  openswmm::hydstruct::OutletGroup
 
class  openswmm::hydstruct::StructureSolver
 

Namespaces

namespace  openswmm
 
namespace  openswmm::hydstruct
 

Variables

constexpr double openswmm::hydstruct::GRAVITY = 32.2
 
constexpr double openswmm::hydstruct::FUDGE = 0.0001
 

Detailed Description

Non-conduit link flow: pumps, orifices, weirs, outlets.

Each structure type is computed in batch over all links of that type (similar to XSectGroups shape grouping). The flow equations are pure arithmetic — vectorisable inner loops.

Batch architecture:

  1. Group links by type at init (like XSectGroups)
  2. For each type group: gather head/depth → batch flow calc → scatter

Pump types: Type 1: volume-based curve Type 2: depth-based curve Type 3: head-based with speed setting Type 4: depth-based with dQ/dH Ideal: demand-driven

Orifice: Q = Cd*A*sqrt(2gH), weir transition at partial fill Weir: Q = Cd*L*H^1.5 (transverse), variants for side/V-notch/trap Outlet: Q = coeff*H^expon or rating curve lookup

Note
Legacy reference: src/legacy/engine/link.c (pump/orifice/weir/outlet sections)
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License