OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches

Global unit conversion factors — matching legacy SWMM Ucf[]/Qcf[]. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  openswmm
 
namespace  openswmm::ucf
 

Enumerations

enum  openswmm::ucf::Quantity {
  openswmm::ucf::RAINFALL = 0 ,
  openswmm::ucf::RAINDEPTH = 1 ,
  openswmm::ucf::EVAPRATE = 2 ,
  openswmm::ucf::LENGTH = 3 ,
  openswmm::ucf::LANDAREA = 4 ,
  openswmm::ucf::VOLUME = 5 ,
  openswmm::ucf::WINDSPEED = 6 ,
  openswmm::ucf::TEMPERATURE = 7 ,
  openswmm::ucf::MASS = 8 ,
  openswmm::ucf::GWFLOW = 9 ,
  openswmm::ucf::FLOW = 10
}
 

Functions

double openswmm::ucf::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.
 

Detailed Description

Global unit conversion factors — matching legacy SWMM Ucf[]/Qcf[].

Provides static UCF() function and quantity enums identical to legacy SWMM's UCF(u) macro / function. All internal computations use ft, ft², ft³, sec as base units. UCF converts from project display units (in/hr, acres, CFS, etc.) to internal units.

Usage:

double rain_ftsec = rainfall_inhr / ucf::UCF(ucf::RAINFALL, opts);
double depth_ft = depth_in / ucf::UCF(ucf::RAINDEPTH, opts);
double flow_cfs = flow_display / ucf::UCF(ucf::FLOW, opts);
Note
Legacy reference: src/legacy/engine/swmm5.c Ucf[], Qcf[], UCF()
Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
License\n MIT License