![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Enumerations | |
| enum | Quantity { RAINFALL = 0 , RAINDEPTH = 1 , EVAPRATE = 2 , LENGTH = 3 , LANDAREA = 4 , VOLUME = 5 , WINDSPEED = 6 , TEMPERATURE = 7 , MASS = 8 , GWFLOW = 9 , FLOW = 10 } |
Functions | |
| int | getUnitSystem (int flow_units) |
| Determine unit system (0=US, 1=SI) from flow units. | |
| double | UCF (int quantity, const SimulationOptions &opts) |
| Get unit conversion factor for a quantity. | |
| int openswmm::ucf::getUnitSystem | ( | int | flow_units | ) |
Determine unit system (0=US, 1=SI) from flow units.
CFS/GPM/MGD → US (0). CMS/LPS/MLD → SI (1).
| flow_units | FlowUnits enum value. |
| double openswmm::ucf::UCF | ( | int | quantity, |
| const SimulationOptions & | opts | ||
| ) |
Get unit conversion factor for a quantity.
For non-flow quantities, returns Ucf[quantity][unit_system]. For FLOW, returns Qcf[flow_units].
To convert FROM project/display units TO internal units: internal = display / UCF(quantity, opts)
To convert FROM internal units TO project/display units: display = internal * UCF(quantity, opts)
| quantity | Quantity code (RAINFALL, LENGTH, FLOW, etc.) |
| opts | Simulation options (for unit system and flow units). |