wntr.metrics.economic module¶
The wntr.metrics.economic module contains economic metrics.
Contents

Compute annual network cost [SOKZ12]. 

Compute annual greenhouse gas emissions [SOKZ12]. 

Compute pump power. 

Compute the pump energy over time. 

Compute the pump cost over time. 
 wntr.metrics.economic.annual_network_cost(wn, tank_cost=None, pipe_cost=None, prv_cost=None, pump_cost=None)[source]¶
Compute annual network cost [SOKZ12].
Use the closest value from the lookup tables to compute annual cost for each component in the network.
 Parameters
wn (wntr WaterNetworkModel) – Water network model. The water network model is needed to define tank volume, pipe and valve diameter, and pump power conditions.
tank_cost (pandas Series, optional) –
Annual tank cost indexed by volume (default values below, from [SOKZ12]).
Volume (m3)
Annual Cost ($/yr)
500
14020
1000
30640
2000
61210
3750
87460
5000
122420
10000
174930
pipe_cost (pandas Series, optional) –
Annual pipe cost per pipe length indexed by diameter (default values below, from [SOKZ12]).
Diameter (in)
Diameter (m)
Annual Cost ($/m/yr)
4
0.102
8.31
6
0.152
10.10
8
0.203
12.10
10
0.254
12.96
12
0.305
15.22
14
0.356
16.62
16
0.406
19.41
18
0.457
22.20
20
0.508
24.66
24
0.610
35.69
28
0.711
40.08
30
0.762
42.60
prv_cost (pandas Series, optional) –
Annual PRV valve cost indexed by diameter (default values below, from [SOKZ12]).
Diameter (in)
Diameter (m)
Annual Cost ($/m/yr)
4
0.102
323
6
0.152
529
8
0.203
779
10
0.254
1113
12
0.305
1892
14
0.356
2282
16
0.406
4063
18
0.457
4452
20
0.508
4564
24
0.610
5287
28
0.711
6122
30
0.762
6790
pump_cost (pd.Series, optional) –
Annual pump cost indexed by maximum power input to pump (default values below, from [SOKZ12]). Maximum Power for a HeadPump is computed from the pump curve as follows:
\[Pmp = g*rho/eff*exp(ln(A/(B*(C+1)))/C)*(A  B*(exp(ln(A/(B*(C+1)))/C))^C)\]where \(Pmp\) is the maximum power (W), \(g\) is acceleration due to gravity (9.81 m/s^2), \(rho\) is the density of water (1000 kg/m^3), \(eff\) is the global efficiency (0.75 default), \(A\), \(B\), and \(C\) are the pump curve coefficients.
Maximum power (W)
Annual Cost ($/yr)
11310
2850
22620
3225
24880
3307
31670
3563
38000
3820
45240
4133
49760
4339
54280
4554
59710
4823
 Returns
Annual network cost in dollars (float)
 wntr.metrics.economic.annual_ghg_emissions(wn, pipe_ghg=None)[source]¶
Compute annual greenhouse gas emissions [SOKZ12].
Use the closest value in the lookup table to compute annual GHG emissions for each pipe in the network.
 Parameters
wn (wntr WaterNetworkModel) – Water network model. The water network model is needed to define pipe diameter.
pipe_ghg (pandas Series, optional) –
Annual GHG emissions indexed by pipe diameter (default values below, from [SOKZ12]).
Diameter (mm)
Annualized EE (kgCO2e/m/yr)
102
5.90
152
9.71
203
13.94
254
18.43
305
23.16
356
28.09
406
33.09
457
38.35
508
43.76
610
54.99
711
66.57
762
72.58
 Returns
Annual greenhouse gas emissions (float)
 wntr.metrics.economic.pump_power(flowrate, head, wn)[source]¶
Compute pump power.
The computation uses pump flow rate, node head (used to compute headloss at each pump), and pump efficiency. Pump efficiency is defined in
wn.options.energy.global_efficiency
. Pump efficiency curves are currently not supported.wn.options.energy.global_efficiency = 75 # This means 75% or 0.75
 Parameters
flowrate (pandas DataFrame) – A pandas DataFrame containing pump flowrates (index = times, columns = pump names).
head (pandas DataFrame) – A pandas DataFrame containing node head (index = times, columns = node names).
wn (wntr WaterNetworkModel) – Water network model. The water network model is needed to define energy efficiency.
 Returns
A DataFrame that contains pump power in W (index = times, columns = pump names).
 wntr.metrics.economic.pump_energy(flowrate, head, wn)[source]¶
Compute the pump energy over time.
The computation uses pump flow rate, node head (used to compute headloss at each pump), and pump efficiency. Pump efficiency is defined in
wn.options.energy.global_efficiency
. Pump efficiency curves are currently not supported.wn.options.energy.global_efficiency = 75 # This means 75% or 0.75
 Parameters
flowrate (pandas DataFrame) – A pandas DataFrame containing pump flowrates (index = times, columns = pump names).
head (pandas DataFrame) – A pandas DataFrame containing node head (index = times, columns = node names).
wn (wntr WaterNetworkModel) – Water network model. The water network model is needed to define energy efficiency.
 Returns
A DataFrame that contains pump energy in J (index = times, columns = pump names).
 wntr.metrics.economic.pump_cost(energy, wn)[source]¶
Compute the pump cost over time.
Energy cost is defined in
wn.options.energy.global_price
. Pump energy price and price patterns are currently not supported.wn.options.energy.global_price = 3.61e8 # $/J; equal to $0.13/kWh
 Parameters
energy (pandas DataFrame) – A pandas DataFrame containing pump energy (J), computed from
wntr.metrics.pump_energy
(index = times, columns = pump names).wn (wntr WaterNetworkModel) – Water network model. The water network model is needed to define pump enery prices and patterns.
 Returns
A DataFrame that contains pump cost in $ (index = times, columns = pump names).