19#ifndef OPENSWMM_INLET_HPP
20#define OPENSWMM_INLET_HPP
26struct SimulationContext;
27struct InletUsageStore;
75 std::vector<double>
sx;
132 static double grateCapture(
double flow,
double velocity,
double length,
133 double sx,
int grate_type,
double open_ratio);
136 static double curbCapture(
double flow,
double curb_length,
137 double sx,
double sl,
double n,
138 double gutter_depress,
double gutter_width,
142 static double splashOverVelocity(
double length,
int grate_type);
145 static double computeFlowSpread(
double flow,
double qfactor,
146 double sx,
double sw,
double a_gutter,
147 double w_gutter,
double t_crown);
150 static double computeEo(
double sr,
double ts,
double w);
153 double computeOnGradeCapture(
int idx,
double flow,
double depth)
const;
156 double getInletArea(
int ii)
const noexcept;
159 void computeBackflowRatios();
void adjustQualInflows(SimulationContext &ctx, double dt)
Adjust quality inflows at bypass and capture nodes for inlet transfers.
Definition Inlet.cpp:774
void gatherStats(InletUsageStore &usages) const
Gap #68: Copy accumulated stats from internal SoA into InletUsageStore. Called by SWMMEngine::report(...
Definition Inlet.cpp:829
void computeAll(SimulationContext &ctx, double dt)
Batch compute inlet capture for all inlets.
Definition Inlet.cpp:374
void init(SimulationContext &ctx)
Definition Inlet.cpp:263
GrateType
Definition Inlet.hpp:41
InletType
Definition Inlet.hpp:31
Definition NodeCoupling.cpp:15
Definition InfraData.hpp:90
Central, reentrant simulation context.
Definition SimulationContext.hpp:274
std::vector< double > flow_capture
Captured flow rate (cfs)
Definition Inlet.hpp:82
std::vector< int > grate_type
Definition Inlet.hpp:58
std::vector< double > slotted_width
Slotted drain width (ft)
Definition Inlet.hpp:65
std::vector< double > local_width
Local depression width (ft)
Definition Inlet.hpp:71
std::vector< double > local_depress
Local gutter depression (ft)
Definition Inlet.hpp:70
std::vector< int > inlet_type
Definition Inlet.hpp:57
std::vector< double > gutter_width
Street gutter width (ft)
Definition Inlet.hpp:77
std::vector< double > grate_length
Grate inlet length (ft)
Definition Inlet.hpp:59
std::vector< double > stat_peak_flow
Peak captured flow rate (cfs)
Definition Inlet.hpp:92
std::vector< double > opening_ratio
Grate opening ratio.
Definition Inlet.hpp:67
int count
Definition Inlet.hpp:53
std::vector< int > num_inlets
Number of inlets per side.
Definition Inlet.hpp:68
std::vector< double > t_crown
Distance curb to crown (ft)
Definition Inlet.hpp:79
std::vector< int > bypass_node
Bypass node (downstream of street conduit)
Definition Inlet.hpp:56
std::vector< double > curb_height
Curb opening height (ft)
Definition Inlet.hpp:62
std::vector< double > grate_width
Grate inlet width (ft)
Definition Inlet.hpp:60
std::vector< double > backflow_ratio
Pre-computed fraction of node overflow → backflow.
Definition Inlet.hpp:85
std::vector< double > sx
Street cross slope (fraction)
Definition Inlet.hpp:75
std::vector< int > link_idx
Street conduit link index.
Definition Inlet.hpp:54
std::vector< double > stat_capture_vol
Total captured volume (ft³)
Definition Inlet.hpp:89
std::vector< double > slotted_length
Slotted drain length (ft)
Definition Inlet.hpp:64
std::vector< int > n_sides
1 or 2 sided street
Definition Inlet.hpp:72
std::vector< double > curb_length
Curb opening length (ft)
Definition Inlet.hpp:61
std::vector< double > flow_limit
Max capture flow per inlet (cfs)
Definition Inlet.hpp:69
std::vector< double > stat_bypass_vol
Total bypassed volume (ft³)
Definition Inlet.hpp:90
std::vector< double > backflow
Current backflow rate (cfs), updated each step.
Definition Inlet.hpp:86
std::vector< int > node_idx
Receiving node index.
Definition Inlet.hpp:55
std::vector< double > stat_backflow_vol
Total backflow volume (ft³)
Definition Inlet.hpp:91
std::vector< double > road_roughness
Street Manning's n.
Definition Inlet.hpp:78
void resize(int n)
Definition Inlet.cpp:24
std::vector< double > gutter_depression
Street gutter depression (ft)
Definition Inlet.hpp:76
std::vector< double > clog_factor
Clogging reduction (0-1)
Definition Inlet.hpp:66
std::vector< int > curb_throat
Throat angle type (0=horiz, 1=inclined, 2=vert)
Definition Inlet.hpp:63