by Jeffrey Kantor (jeff at nd.edu). The latest version of this notebook is available at https://github.com/jckantor/CBE20255.

This Jupyter notebook demonstrates unit conversions for some typical calculations of energy consumption.

In [5]:

```
Q_btu = 50e6 # BTU
price = 0.08 # $ per kwh
btu_per_joule = 9.486e-4 # conversion factor
kwh_per_joule = 2.778e-7 # conversion factor
cost = price*kwh_per_joule*Q_btu/btu_per_joule
print("Winter heating cost = $", round(cost,2), "USD")
```

Natural gas is transported by pipeline from producing areas of the country to the midwest where it stored prior to distribution. For heating purposes, the energy content of natural gas is 1000 BTU per cubic foot at 1 atm and 15 $^\circ C$.

If the natural gas is stored at 1000 psia and 15 $^\circ C$, how large a storage tank is required to store natural gas for the winter? Report your answer in cubic meters.

The volume of natural gas required is determined by the heating requirement.

In [6]:

```
V_ft3 = Q_btu/1000 # ft^3
```

Next compute the amount of natural gas required in lb moles

In [9]:

```
R = 10.73 # ft^3 psia/(lbmol R)
T_degC = 15 # deg C
# convert temperature to absolute
T_degR = 9.0*T_degC/5.0 + 491.67 # deg R
# compute lb moles
n_lbmol = 14.696*V_ft3/(R*T_degR)
print(round(T_degR,1), "degrees Rankine")
print(round(n_lbmol,1), "lb-mols")
```

Now calculate the volume in cubic meters at the storage conditions.

In [14]:

```
V_ft3 = n_lbmol*R*T_degR/1000.0
m3_per_ft3 = 0.028317
V_m3 = V_ft3*m3_per_ft3
print("Storage volume of natural gas at 1000 psia and 15 deg C =", round(V_m3,1), "cubic meters")
```

In [18]:

```
btu_per_joule = 9.486e-4
Q_joule = Q_btu/btu_per_joule
print("Heat requirement =", round(Q_joule/1e6,1), "Megajoules")
m_kg = Q_joule/46.3e6
print("Mass of propane required = {0:.2f} kg".format(m_kg))
V_m3 = m_kg/0.493/1000.0
print("Volume of propane required = {0:.2f} cubic meters".format(V_m3))
```

In [ ]:

```
```