33#ifndef OPENSWMM_LINK_HPP
34#define OPENSWMM_LINK_HPP
63double getVelocity(
const XSectParams& xs,
double flow,
double depth,
int barrels = 1);
76double getFroude(
const XSectParams& xs,
double v,
double y);
94 double& beta,
double& rough_factor,
double& q_full);
113double getCapacity(
const XSectParams& xs,
double depth);
128double getHydPower(
double flow,
double head_upstream,
double head_downstream);
143 const LinkData& links, std::size_t uj,
144 const std::vector<transect::TransectData>* transects =
nullptr);
190 double y_full,
int transect_idx);
Structure-of-Arrays (SoA) storage for all link types.
Node hydraulics — volume/depth/head conversions, surface area, overflow.
Irregular transect cross-section geometry (HEC-2 style).
Cross-section geometry — unified batch + per-element API.
double getHydPower(double flow, double head_upstream, double head_downstream)
Compute hydraulic power dissipated in a link.
Definition Link.cpp:150
XSectParams buildXSectParams(const LinkData &links, std::size_t uj, const std::vector< transect::TransectData > *transects)
Build XSectParams from LinkData SoA arrays.
Definition Link.cpp:164
void applyTabulatedXSectParams(XSectParams &xs, const transect::TransectData &td, double y_full, int transect_idx)
Derive the full-flow properties of a tabulated cross-section.
Definition Link.cpp:227
double getDepthFromFlow(const XSectParams &xs, double beta, double q)
Compute normal-flow depth from flow rate (inverse Manning).
Definition Link.cpp:127
double getVelocity(const XSectParams &xs, double flow, double depth, int barrels)
Compute flow velocity from flow and depth.
Definition Link.cpp:74
void computeConveyance(double roughness, double slope, double s_full, double &beta, double &rough_factor, double &q_full)
Compute Manning conveyance coefficients for a conduit.
Definition Link.cpp:110
int translateShape(XsectShape s)
Translate LinkData::XsectShape to batch XSectShape int code.
Definition Link.cpp:38
double getFroude(const XSectParams &xs, double v, double y)
Compute Froude number from velocity and depth.
Definition Link.cpp:88
double getCapacity(const XSectParams &xs, double depth)
Compute the capacity fraction (depth / full depth for conduits, setting for other links).
Definition Link.cpp:139
Definition NodeCoupling.cpp:16
XsectShape
Conduit cross-section shape code.
Definition LinkData.hpp:70
double * y
Definition odesolve.c:28