wntr.metrics.economic module

The wntr.metrics.economic module contains economic metrics.

Contents

annual_network_cost(wn[, tank_cost, …]) Compute annual network cost [SOKZ12].
annual_ghg_emissions(wn[, pipe_ghg]) Compute annual greenhouse gas emissions [SOKZ12].
pump_energy(flowrate, head, wn) Compute the pump energy 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.network.WaterNetworkModel
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:
pipe_ghg : pandas Series, optional

Annual GHG emissions indexed by pipe diameter (default values below, from [SOKZ12]).

Diameter (mm) Annualised EE (kg-CO2-e/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_energy(flowrate, head, wn)[source]

Compute the pump energy over time.

The computation uses pump flow rate, pump head, pump efficiency, and the electricity price. Pump efficiency curves may be specified through the “efficiency” attribute on the pump object. Alternatively, a global efficiency may be set on the wn.energy object:

wn.energy.global_efficiency = 75 # This means 75% or 0.75

The price can also be set on the pump or the energy object:

wn.energy.global_price = 3.61e-8 # $/J; equal to $0.13/kW-h

or

pump = wn.get_link(‘pump1’) pump.energy_price = 3.61e-8 # $/J
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 tuple of pandas DataFrames: the first DataFrame contains pump energy in Watts,
the second contains pump cost is $/s (index = times, columns = pump names).
wntr.metrics.economic.pump_cost(flowrate, head, wn)[source]

Compute the pump cost over time.

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 pump enery prices and patterns.

Returns:
Pump cost (float)