OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
Link.hpp
Go to the documentation of this file.
1
17#ifndef OPENSWMM_LINK_HPP
18#define OPENSWMM_LINK_HPP
19
20#include "../data/LinkData.hpp"
21#include "XSectBatch.hpp"
22#include "Node.hpp"
23
24namespace openswmm {
25
26namespace link {
27
28// ============================================================================
29// Per-element functions
30// ============================================================================
31
44double getVelocity(const XSectParams& xs, double flow, double depth, int barrels = 1);
45
57double getFroude(const XSectParams& xs, double v, double y);
58
74void computeConveyance(double roughness, double slope, double s_full,
75 double& beta, double& rough_factor, double& q_full);
76
88double getDepthFromFlow(const XSectParams& xs, double beta, double q);
89
94double getCapacity(const XSectParams& xs, double depth);
95
109double getHydPower(double flow, double head_upstream, double head_downstream);
110
118XSectParams buildXSectParams(const LinkData& links, std::size_t uj);
119
120// ============================================================================
121// Batch functions (for routing hot loop)
122// ============================================================================
123
131void computeVelocities(const LinkData& links, double* velocity);
132
140void computeFroude(const LinkData& links, const double* velocity, double* froude);
141
151void computeAllConveyance(LinkData& links);
152
160int translateShape(XsectShape link_shape);
161
162} // namespace link
163
164} // namespace openswmm
165
166#endif // OPENSWMM_LINK_HPP
Node hydraulics — volume/depth/head conversions, surface area, overflow.
Cross-section geometry — unified batch + per-element API.
Definition NodeCoupling.cpp:15
XsectShape
Conduit cross-section shape code.
Definition LinkData.hpp:54
double * y
Definition odesolve.c:28