![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Classes | |
| struct | GageState |
Enumerations | |
| enum class | RainType : int { INTENSITY = 0 , VOLUME = 1 , CUMULATIVE = 2 } |
Functions | |
| double | convertRainfall (double raw_value, GageState &state) |
| Convert raw rainfall value based on rain type. | |
| void | separatePrecip (GageState &state, double intensity, double temperature, double snow_temp) |
| Separate rainfall from snowfall based on temperature. | |
| void | updatePastRain (GageState &state, double current_time) |
| Update past n-hour rainfall accumulation. | |
| double | getPastRain (const GageState &state, int hours) |
| Get past n-hour rainfall total. | |
| void | updateAllGages (SimulationContext &ctx, double current_time) |
| Process all gages for one timestep. | |
Variables | |
| constexpr double | ONE_SECOND = 1.1574074e-5 |
| One second in days. | |
| constexpr int | MAXPASTRAIN = 48 |
| Max past hours tracked. | |
|
strong |
| double openswmm::gage::convertRainfall | ( | double | raw_value, |
| GageState & | state | ||
| ) |
Convert raw rainfall value based on rain type.
| raw_value | Raw value from timeseries. |
| state | Gage state (for accumulators, factors). |
| double openswmm::gage::getPastRain | ( | const GageState & | state, |
| int | hours | ||
| ) |
Get past n-hour rainfall total.
| state | Gage state. |
| hours | Number of past hours (1 to MAXPASTRAIN). |
| void openswmm::gage::separatePrecip | ( | GageState & | state, |
| double | intensity, | ||
| double | temperature, | ||
| double | snow_temp | ||
| ) |
Separate rainfall from snowfall based on temperature.
| state | [in/out] Gage state. Sets rainfall/snowfall/total_precip. |
| intensity | Total precipitation intensity (project units/sec). |
| temperature | Current air temperature (project units). |
| snow_temp | Snow temperature threshold (project units). |
| void openswmm::gage::updateAllGages | ( | SimulationContext & | ctx, |
| double | current_time | ||
| ) |
Process all gages for one timestep.
| ctx | Simulation context (gages + timeseries accessed). |
| current_time | Current simulation time (seconds). |
| void openswmm::gage::updatePastRain | ( | GageState & | state, |
| double | current_time | ||
| ) |
Update past n-hour rainfall accumulation.
| state | [in/out] Gage state. |
| current_time | Current simulation time (seconds from start). |
|
constexpr |
Max past hours tracked.
|
constexpr |
One second in days.