17#ifndef OPENSWMM_LINK_HPP
18#define OPENSWMM_LINK_HPP
47double getVelocity(
const XSectParams& xs,
double flow,
double depth,
int barrels = 1);
60double getFroude(
const XSectParams& xs,
double v,
double y);
78 double& beta,
double& rough_factor,
double& q_full);
97double getCapacity(
const XSectParams& xs,
double depth);
112double getHydPower(
double flow,
double head_upstream,
double head_downstream);
127 const LinkData& links, std::size_t uj,
128 const std::vector<transect::TransectData>* transects =
nullptr);
174 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:134
XSectParams buildXSectParams(const LinkData &links, std::size_t uj, const std::vector< transect::TransectData > *transects)
Build XSectParams from LinkData SoA arrays.
Definition Link.cpp:148
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:210
double getDepthFromFlow(const XSectParams &xs, double beta, double q)
Compute normal-flow depth from flow rate (inverse Manning).
Definition Link.cpp:111
double getVelocity(const XSectParams &xs, double flow, double depth, int barrels)
Compute flow velocity from flow and depth.
Definition Link.cpp:58
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:94
int translateShape(XsectShape s)
Translate LinkData::XsectShape to batch XSectShape int code.
Definition Link.cpp:22
double getFroude(const XSectParams &xs, double v, double y)
Compute Froude number from velocity and depth.
Definition Link.cpp:72
double getCapacity(const XSectParams &xs, double depth)
Compute the capacity fraction (depth / full depth for conduits, setting for other links).
Definition Link.cpp:123
Definition NodeCoupling.cpp:15
XsectShape
Conduit cross-section shape code.
Definition LinkData.hpp:54
double * y
Definition odesolve.c:28