OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
openswmm::ucf Namespace Reference

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.
 

Enumeration Type Documentation

◆ Quantity

Enumerator
RAINFALL 

Divide in/hr (US) or mm/hr (SI) by this → ft/sec.

RAINDEPTH 

Divide in (US) or mm (SI) by this → ft.

EVAPRATE 

Divide in/day (US) or mm/day (SI) by this → ft/sec.

LENGTH 

Divide ft (US) or m (SI) by this → ft.

LANDAREA 

Divide ac (US) or ha (SI) by this → ft²

VOLUME 

Divide ft³ (US) or m³ (SI) by this → ft³

WINDSPEED 

Divide mph (US) or km/hr (SI) by this → mph.

TEMPERATURE 

Divide °F (US) or °C (SI) by this → °F.

MASS 

Divide lb (US) or kg (SI) by this → mg.

GWFLOW 

Divide cfs/ac (US) or cms/ha (SI) by this → ft/sec.

FLOW 

Divide display flow units by this → cfs.

Function Documentation

◆ getUnitSystem()

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).

Parameters
flow_unitsFlowUnits enum value.
Returns
0 for US, 1 for SI.
Here is the caller graph for this function:

◆ UCF()

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)

Parameters
quantityQuantity code (RAINFALL, LENGTH, FLOW, etc.)
optsSimulation options (for unit system and flow units).
Returns
Conversion factor.
Here is the call graph for this function:
Here is the caller graph for this function: