48#ifndef OPENSWMM_HYD_STRUCTURES_HPP
49#define OPENSWMM_HYD_STRUCTURES_HPP
287 std::vector<int> nc_indices_;
288 std::vector<int> nc_group_k_;
302 void computePumpFlows(
SimulationContext& ctx,
double dt,
const double* node_new_surf_area);
321 void computePumpFlowK(
SimulationContext& ctx,
double dt,
const double* node_new_surf_area,
338 void computeOrificeFlowK(
SimulationContext& ctx,
double* node_new_surf_area,
int k);
353 void computeWeirFlowK(
SimulationContext& ctx,
double* node_new_surf_area,
int k);
380 void scatterOrificeSurfArea(
SimulationContext& ctx,
double* node_new_surf_area, std::size_t uk,
381 std::size_t uj, std::size_t un1, std::size_t un2);
394 void computeOrificeFlows(
SimulationContext& ctx,
double* node_new_surf_area =
nullptr);
407 void computeWeirFlows(
SimulationContext& ctx,
double* node_new_surf_area =
nullptr);
Structure-of-Arrays (SoA) storage for all link types.
Structure-of-Arrays (SoA) storage for all node types.
Time series and rating curve data with bidirectional cursor.
Definition HydStructures.hpp:201
void computeNonConduitFlowOne(SimulationContext &ctx, double dt, double *node_new_surf_area, int link_idx)
Evaluate one sequential nonconduit or DUMMY link using current node accumulators.
Definition HydStructures.cpp:1439
void computeAllFlows(SimulationContext &ctx, double dt, double *node_new_surf_area=nullptr)
Evaluate grouped pumps, orifices, weirs and outlets in type order.
Definition HydStructures.cpp:1419
const std::vector< int > & nonConduitIndices() const noexcept
Get pre-built list of all non-conduit link indices.
Definition HydStructures.hpp:246
void scatterHeldSurfArea(SimulationContext &ctx, double *node_new_surf_area, int link_idx)
Scatter a bypassed orifice's retained area using current flow classification.
Definition HydStructures.cpp:1499
void updatePumpTargetSettings(SimulationContext &ctx)
Apply pump startup/shutoff hysteresis once before step iterations.
Definition HydStructures.cpp:323
void init(SimulationContext &ctx)
Build per-type structure groups and global sequential-dispatch maps.
Definition HydStructures.cpp:143
friend class openswmm::SWMMEngine
Definition HydStructures.hpp:282
Definition HydStructures.cpp:48
constexpr double FUDGE
Definition HydStructures.hpp:68
bool flapGateBlocks(const SimulationContext &ctx, int j, int n1, int n2, double q)
Test reverse flow against the link gate and its donor outfall gate.
Definition HydStructures.cpp:78
constexpr double GRAVITY
Definition HydStructures.hpp:67
Definition ExchangeLaw.hpp:60
Central, reentrant simulation context.
Definition SimulationContext.hpp:390
Definition HydStructures.hpp:114
std::vector< double > surf_area
Definition HydStructures.hpp:126
std::vector< int > shape
BOTTOM or SIDE.
Definition HydStructures.hpp:117
std::vector< double > length_eff
Definition HydStructures.hpp:130
int count
Definition HydStructures.hpp:115
void resize(int n)
Resize OrificeGroup columns while preserving existing row prefixes.
Definition HydStructures.cpp:110
std::vector< int > link_idx
Definition HydStructures.hpp:116
Definition HydStructures.hpp:179
void resize(int n)
Resize OutletGroup columns while preserving existing row prefixes.
Definition HydStructures.cpp:134
std::vector< int > link_idx
Definition HydStructures.hpp:181
int count
Definition HydStructures.hpp:180
std::vector< int > curve_idx
Rating curve (-1 = power law)
Definition HydStructures.hpp:182
std::vector< double > q_expon
Power law exponent.
Definition HydStructures.hpp:184
std::vector< double > q_coeff
Power law coefficient.
Definition HydStructures.hpp:183
Definition HydStructures.hpp:94
int count
Definition HydStructures.hpp:95
std::vector< int > curve_type
Pump type (1-5, 6=ideal)
Definition HydStructures.hpp:98
std::vector< int > curve_idx
Pump curve table index.
Definition HydStructures.hpp:97
std::vector< int > link_idx
Global link index.
Definition HydStructures.hpp:96
std::vector< double > speed
Current speed setting [0-1].
Definition HydStructures.hpp:99
std::vector< double > y_on
Startup depth.
Definition HydStructures.hpp:100
void resize(int n)
Resize PumpGroup columns while preserving existing row prefixes.
Definition HydStructures.cpp:100
std::vector< double > y_off
Shutoff depth.
Definition HydStructures.hpp:101
Definition HydStructures.hpp:143
std::vector< int > cd_curve
Optional Cd(head) curve index (legacy Weir.cdCurve), -1 none.
Definition HydStructures.hpp:151
std::vector< double > slope
V-notch slope or trap slope.
Definition HydStructures.hpp:150
std::vector< double > end_con
End contraction factor.
Definition HydStructures.hpp:149
std::vector< double > length_eff
Definition HydStructures.hpp:162
std::vector< uint8_t > can_surcharge
Definition HydStructures.hpp:166
std::vector< double > surf_area
Definition HydStructures.hpp:158
void resize(int n)
Resize WeirGroup columns while preserving existing row prefixes.
Definition HydStructures.cpp:118
std::vector< double > road_width
ROADWAY weir road width (ft, legacy Weir.roadWidth)
Definition HydStructures.hpp:152
std::vector< int > road_surface
ROADWAY weir surface: 0 none, 1 PAVED, 2 GRAVEL.
Definition HydStructures.hpp:153
std::vector< double > c_disch2
End section coefficient (trapezoidal)
Definition HydStructures.hpp:148
std::vector< int > link_idx
Definition HydStructures.hpp:145
std::vector< int > weir_type
TRANSVERSE/SIDE/VNOTCH/TRAPEZOIDAL/ROADWAY (0..4)
Definition HydStructures.hpp:146
std::vector< double > c_disch1
Main discharge coefficient.
Definition HydStructures.hpp:147
int count
Definition HydStructures.hpp:144