Units

All data in WNTR is stored in SI (International System) units:

  • Length = \(m\)
  • Diameter = \(m\)
  • Water pressure = \(m\) (this assumes a fluid density of 1000 \(kg/m^3\))
  • Elevation = \(m\)
  • Mass = \(kg\)
  • Time = \(s\)
  • Concentration = \(kg/m^3\)
  • Demand = \(m^3/s\)
  • Velocity = \(m/s\)
  • Acceleration = \(g\) (1 \(g\) = 9.81 \(m/s^2\))
  • Energy = \(J\)
  • Power = \(W\)
  • Pressure = \(Pa\)
  • Mass injection = \(kg/s\)
  • Volume = \(m^3\)

WNTR is compatible with all EPANET unit conventions. When using an EPANET INP file to generate a water network model, WNTR converts model parameters using the units defined in the Units and Quality options of the EPANET INP file. These options define the mass and flow units for the model. Some units also depend on the equation used for pipe roughness headloss and on the reaction order specified. Table 4, Table 5, and Table 6 provide information on EPANET unit conventions (modified from [Ross00]).

Table 4 EPANET Hydraulic Unit Conventions
Hydraulic parameter US customary units SI-based units
Flow

flow can be defined as:

  • CFS: ft 3 /s
  • GPM: gal/min
  • MGD: million gal/day
  • IMGD: million imperial gal/day
  • AFD: acre-feet/day

flow can be defined as:

  • LPS: L/s
  • LPM: L/min
  • MLD: ML/day
  • CMH: m 3 /hr
  • CMD: m 3 /day
Demand flow flow
Diameter: pipes in mm
Diameter: tanks ft m
Elevation ft m
Hydraulic head ft m
Length ft m
Emitter coefficient flow / sqrt(psi) flow / sqrt(m)
Friction factor unitless unitless
Minor loss coeff. unitless unitless
Pressure psi m or kPa
Roughness coeff: D-W 10 3 ft mm
Roughness coeff: H-W, C-M unitless unitless
Velocity ft/s m/s
Volume ft 3 m 3
Table 5 EPANET Water Quality Unit Conventions
Water quality parameter US customary units SI-based units
Concentration mass /L where mass can be defined as mg or ug mass /L where mass can be defined as mg or ug
Bulk reaction coefficient: order-1 1/day 1/day
Wall reaction coefficient: order-0 mass /ft 2 /day mass /m 2 /day
Wall reaction coefficient: order-1 ft/day m/day
Reaction rate mass /L/day mass /L/day
Source mass injection rate mass /min mass /min
Water age hours hours
Table 6 EPANET Energy Unit Conventions
Energy parameter US customary units SI-based units
Energy kW-hours kW-hours
Efficiency (pumps) percent percent
Power hp (horse-power) kW

When running analysis in WNTR, all input values (i.e., time, pressure threshold, node demand) should be specified in SI units. All simulation results are also stored in SI units and can be converted to other units if desired. The SymPy package can be used to convert between units. The example converting_units.py demonstrates its use:

from sympy.physics import units

# Convert 12 inches to meters
D = 12*float(units.inch/units.meter)

# Covert 0.2 mg/L to kg/m3
C = 0.2*float((units.mg/units.l)/(units.kg/units.m**3))

# Convert 30 psi to m (assuming density = 1000 kg/m3 and gravity = 9.81 m/s2)
if not units.find_unit('waterpressure'):
    units.waterpressure = 9810*units.Pa
P = 30*float(units.psi/units.waterpressure)

# Convert 200 gallons/day to m3/day 
if not units.find_unit('gallon'):
    units.gallon = 4*units.quart
R = 200*float(units.gallon/units.m**3)