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);
93void computeConveyance(
double roughness,
double slope,
double s_full,
double& beta,
94 double& rough_factor,
double& q_full);
114double getDepthFromFlow(
const XSectParams& xs,
double beta,
double q,
double q_max = -1.0);
126double getCapacity(
const XSectParams& xs,
double depth);
141double getHydPower(
double flow,
double head_upstream,
double head_downstream);
156 const std::vector<transect::TransectData>* transects =
nullptr);
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:192
XSectParams buildXSectParams(const LinkData &links, std::size_t uj, const std::vector< transect::TransectData > *transects)
Build XSectParams from LinkData SoA arrays.
Definition Link.cpp:206
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:276
double getDepthFromFlow(const XSectParams &xs, double beta, double q, double q_max)
Compute normal-flow depth from flow rate (inverse Manning).
Definition Link.cpp:159
double getVelocity(const XSectParams &xs, double flow, double depth, int barrels)
Compute flow velocity from flow and depth.
Definition Link.cpp:101
double filledCircularOffsetBump(const LinkData &links, std::size_t j, bool resolved)
Read the resolved sediment-depth adjustment for a filled circular conduit.
Definition Link.hpp:184
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:142
int translateShape(XsectShape s)
Map model-storage section type to its distinct kernel numbering.
Definition Link.cpp:38
double getFroude(const XSectParams &xs, double v, double y)
Compute Froude number from velocity and depth.
Definition Link.cpp:117
double getCapacity(const XSectParams &xs, double depth)
Compute the wetted-area fraction relative to full cross-section area.
Definition Link.cpp:179
Definition ExchangeLaw.hpp:60
@ CONDUIT
Definition LinkData.hpp:58
XsectShape
Conduit cross-section shape code.
Definition LinkData.hpp:64
@ FILLED_CIRCULAR
Definition LinkData.hpp:66
double * y
Definition odesolve.c:37
Structure-of-Arrays storage for all links.
Definition LinkData.hpp:119
std::vector< XsectShape > xsect_shape
Cross-section shape.
Definition LinkData.hpp:169
std::vector< LinkType > type
Link type.
Definition LinkData.hpp:126
std::vector< double > xsect_y_bot
Bottom depth for FILLED_CIRCULAR, RECT_TRIANG, RECT_ROUND shapes.
Definition LinkData.hpp:232
Native cross-section geometry and borrowed optional normalized transect tables.
Definition XSectBatch.hpp:119
Definition Transect.hpp:50