17#ifndef OPENSWMM_LINK_HPP
18#define OPENSWMM_LINK_HPP
20#include "../data/LinkData.hpp"
44double getVelocity(
const XSectParams& xs,
double flow,
double depth,
int barrels = 1);
57double getFroude(
const XSectParams& xs,
double v,
double y);
75 double& beta,
double& rough_factor,
double& q_full);
94double getCapacity(
const XSectParams& xs,
double depth);
109double getHydPower(
double flow,
double head_upstream,
double head_downstream);
140void computeFroude(
const LinkData& links,
const double* velocity,
double* froude);
Node hydraulics — volume/depth/head conversions, surface area, overflow.
Cross-section geometry — unified batch + per-element API.
void computeFroude(const LinkData &links, const double *velocity, double *froude)
Compute Froude numbers for all conduit links.
Definition Link.cpp:200
double getHydPower(double flow, double head_upstream, double head_downstream)
Compute hydraulic power dissipated in a link.
Definition Link.cpp:134
void computeAllConveyance(LinkData &links)
Compute Manning conveyance for all conduit links.
Definition Link.cpp:229
XSectParams buildXSectParams(const LinkData &links, std::size_t uj)
Build XSectParams from LinkData SoA arrays.
Definition Link.cpp:148
void computeVelocities(const LinkData &links, double *velocity)
Compute velocity for all links in batch.
Definition Link.cpp:168
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