This notebook contains course material from CBE20255 by Jeffrey Kantor (jeff at; the content is available on Github. The text is released under the CC-BY-NC-ND-4.0 license, and code is released under the MIT license.

Units and Conversions for Home Heating


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


Heating with Electricity

A typical energy efficient home in the midwest requires 50 million BTUs to heat the home for the winter. If the price of electricity is $0.08 USD per kilowatt hour, what would be the cost to heat a typical home with electricity?


In [1]:
Q_btu = 50e6               # BTU

price = 0.08               # USD 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")
Winter heating cost = 1171.41 USD

Heating with Natural Gas

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 [ ]:
V_ft3 = Q_btu/1000    # ft^3

Next compute the amount of natural gas required in lb moles

In [ ]:
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")
518.7 degrees Rankine
132.0 lb-mols

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

In [ ]:
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")
Storage volume of natural gas at 1000 psia and 15 deg C = 20.8 cubic meters

Sizing a Propane Storage Tank

Liquid propane has a heating value of 46.3 MJ/kg, and a specific gravity of 0.493 at ambient temperatures. How large a storage tank will be required, in cubic meters?


In [ ]:
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))
Heat requirement = 52709.3 Megajoules
Mass of propane required = 1138.43 kg
Volume of propane required = 2.31 cubic meters
In [ ]: