OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
InfraData.hpp
Go to the documentation of this file.
1
14#ifndef OPENSWMM_ENGINE_INFRA_DATA_HPP
15#define OPENSWMM_ENGINE_INFRA_DATA_HPP
16
17#include <vector>
18#include <string>
19
20namespace openswmm {
21
22// ============================================================================
23// Transect definitions (from [TRANSECTS] section)
24// ============================================================================
25
27 int count() const { return static_cast<int>(names.size()); }
28
29 std::vector<std::string> names;
30 std::vector<double> n_left;
31 std::vector<double> n_right;
32 std::vector<double> n_channel;
33 std::vector<double> x_left_bank;
34 std::vector<double> x_right_bank;
35 std::vector<double> x_factor;
36 std::vector<double> y_factor;
38 std::vector<std::vector<double>> stations;
39 std::vector<std::vector<double>> elevations;
40};
41
42// ============================================================================
43// Street definitions (from [STREETS] section)
44// ============================================================================
45
47 int count() const { return static_cast<int>(names.size()); }
48
49 std::vector<std::string> names;
50 std::vector<double> t_crown;
51 std::vector<double> h_curb;
52 std::vector<double> sx;
53 std::vector<double> n_road;
54 std::vector<double> gutter_depres;
55 std::vector<double> gutter_width;
56 std::vector<int> sides;
57 std::vector<double> back_width;
58 std::vector<double> back_slope;
59 std::vector<double> back_n;
60};
61
62// ============================================================================
63// Inlet definitions (from [INLETS] section)
64// ============================================================================
65
66struct InletStore {
67 int count() const { return static_cast<int>(names.size()); }
68
69 std::vector<std::string> names;
70 std::vector<std::string> inlet_type;
71 std::vector<double> length;
72 std::vector<double> width;
73 std::vector<std::string> grate_type;
74 std::vector<double> open_area;
75 std::vector<double> splash_veloc;
76};
77
78// ============================================================================
79// Inlet usage (from [INLET_USAGE] section)
80// ============================================================================
81
83 int count() const { return static_cast<int>(link_index.size()); }
84
85 std::vector<int> link_index;
86 std::vector<int> design_index;
87 std::vector<int> node_index;
88 std::vector<int> num_inlets;
89 std::vector<int> placement;
90 std::vector<double> clog_factor;
91 std::vector<double> flow_limit;
92 std::vector<double> local_depress;
93 std::vector<double> local_width;
94 std::vector<int> street_index;
95};
96
97// ============================================================================
98// Control rule text (from [CONTROLS] section)
99// ============================================================================
100
102 int count() const { return static_cast<int>(rule_text.size()); }
103
106 std::vector<std::string> rule_text;
107};
108
109} // namespace openswmm
110
111#endif // OPENSWMM_ENGINE_INFRA_DATA_HPP
Definition Controls.cpp:24
Definition InfraData.hpp:101
int count() const
Definition InfraData.hpp:102
std::vector< std::string > rule_text
Definition InfraData.hpp:106
Definition InfraData.hpp:66
std::vector< double > open_area
Definition InfraData.hpp:74
std::vector< double > width
or height for curb
Definition InfraData.hpp:72
std::vector< std::string > grate_type
P-50, P-50x100, CURVED_VANE, etc.
Definition InfraData.hpp:73
int count() const
Definition InfraData.hpp:67
std::vector< double > splash_veloc
Definition InfraData.hpp:75
std::vector< std::string > inlet_type
GRATE/CURB/SLOTTED/DROP_GRATE/DROP_CURB/CUSTOM.
Definition InfraData.hpp:70
std::vector< double > length
Definition InfraData.hpp:71
std::vector< std::string > names
Definition InfraData.hpp:69
Definition InfraData.hpp:82
std::vector< int > num_inlets
Number of inlets per side.
Definition InfraData.hpp:88
std::vector< int > street_index
Index into StreetStore (-1 if none)
Definition InfraData.hpp:94
std::vector< int > design_index
Index into InletStore.
Definition InfraData.hpp:86
std::vector< double > flow_limit
Max capture flow (cfs), 0=unlimited.
Definition InfraData.hpp:91
std::vector< int > node_index
Receiving node index.
Definition InfraData.hpp:87
std::vector< double > local_width
Local depression width (ft)
Definition InfraData.hpp:93
std::vector< double > local_depress
Local gutter depression (ft)
Definition InfraData.hpp:92
std::vector< int > placement
0=auto, 1=on_grade, 2=on_sag
Definition InfraData.hpp:89
std::vector< double > clog_factor
1.0 - pctClogged/100
Definition InfraData.hpp:90
int count() const
Definition InfraData.hpp:83
std::vector< int > link_index
Conduit link index.
Definition InfraData.hpp:85
Definition InfraData.hpp:46
std::vector< double > gutter_depres
Definition InfraData.hpp:54
std::vector< double > h_curb
Definition InfraData.hpp:51
std::vector< double > back_slope
Definition InfraData.hpp:58
std::vector< double > sx
Cross slope (%)
Definition InfraData.hpp:52
std::vector< double > back_n
Definition InfraData.hpp:59
std::vector< double > back_width
Definition InfraData.hpp:57
std::vector< double > gutter_width
Definition InfraData.hpp:55
int count() const
Definition InfraData.hpp:47
std::vector< double > t_crown
Definition InfraData.hpp:50
std::vector< int > sides
Definition InfraData.hpp:56
std::vector< std::string > names
Definition InfraData.hpp:49
std::vector< double > n_road
Definition InfraData.hpp:53
Definition InfraData.hpp:26
std::vector< double > x_left_bank
Definition InfraData.hpp:33
std::vector< double > y_factor
Definition InfraData.hpp:36
std::vector< double > x_right_bank
Definition InfraData.hpp:34
std::vector< double > n_left
Definition InfraData.hpp:30
std::vector< std::vector< double > > stations
Station-elevation pairs per transect.
Definition InfraData.hpp:38
std::vector< double > x_factor
Definition InfraData.hpp:35
std::vector< double > n_channel
Definition InfraData.hpp:32
std::vector< std::vector< double > > elevations
Definition InfraData.hpp:39
int count() const
Definition InfraData.hpp:27
std::vector< std::string > names
Definition InfraData.hpp:29
std::vector< double > n_right
Definition InfraData.hpp:31