{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "*This notebook contains course material from [CBE20255](https://jckantor.github.io/CBE20255)\n", "by Jeffrey Kantor (jeff at nd.edu); the content is available [on Github](https://github.com/jckantor/CBE20255.git).\n", "The text is released under the [CC-BY-NC-ND-4.0 license](https://creativecommons.org/licenses/by-nc-nd/4.0/legalcode),\n", "and code is released under the [MIT license](https://opensource.org/licenses/MIT).*" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "< [Units and Engineering Calculations](http://nbviewer.jupyter.org/github/jckantor/CBE20255/blob/master/notebooks/01.01-Units-and-Engineering-Calculations.ipynb) | [Contents](toc.ipynb) | [Stoichiometry](http://nbviewer.jupyter.org/github/jckantor/CBE20255/blob/master/notebooks/02.00-Stoichiometry.ipynb) >

\"Open" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "Y_S8BCKT_0lz" }, "source": [ "# Units and Conversions for Home Heating" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Summary\n", "\n", "This notebook demonstrates unit conversions for several typical calculations of energy consumption." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Examples" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "D_5bUFlP_0l2" }, "source": [ "### Heating with Electricity\n", "\n", "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?\n", "\n", "**Solution**" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 34 }, "colab_type": "code", "id": "euEyuNCc_0l3", "outputId": "6af7e18b-0fee-4a04-f22b-28528b20c3d0" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Winter heating cost = 1171.41 USD\n" ] } ], "source": [ "Q_btu = 50e6 # BTU\n", "\n", "price = 0.08 # USD per kwh\n", "btu_per_joule = 9.486e-4 # conversion factor\n", "kwh_per_joule = 2.778e-7 # conversion factor\n", "\n", "cost = price*kwh_per_joule*Q_btu/btu_per_joule\n", "\n", "print(\"Winter heating cost =\", round(cost,2), \"USD\")" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "je4Q_WXW_0l9" }, "source": [ "### Heating with Natural Gas\n", "\n", "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. \n", "\n", "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.\n", "\n", "**Solution**\n", "\n", "The volume of natural gas required is determined by the heating requirement." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": {}, "colab_type": "code", "id": "L8XeMMxS_0l-" }, "outputs": [], "source": [ "V_ft3 = Q_btu/1000 # ft^3" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "gusc5RL4_0mA" }, "source": [ "Next compute the amount of natural gas required in lb moles" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 51 }, "colab_type": "code", "id": "87oVnRV8_0mB", "outputId": "4fe38a69-46b0-4f27-b51e-d6897d3b5173" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "518.7 degrees Rankine\n", "132.0 lb-mols\n" ] } ], "source": [ "R = 10.73 # ft^3 psia/(lbmol R)\n", "T_degC = 15 # deg C\n", "\n", "# convert temperature to absolute\n", "T_degR = 9.0*T_degC/5.0 + 491.67 # deg R\n", "\n", "# compute lb moles\n", "n_lbmol = 14.696*V_ft3/(R*T_degR)\n", "\n", "print(round(T_degR, 1), \"degrees Rankine\")\n", "print(round(n_lbmol, 1), \"lb-mols\")" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "LVJ8lE50_0mF" }, "source": [ "Now calculate the volume in cubic meters at the storage conditions." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 34 }, "colab_type": "code", "id": "Duiktred_0mF", "outputId": "640f090b-391a-4daf-81ce-5431d6529085" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Storage volume of natural gas at 1000 psia and 15 deg C = 20.8 cubic meters\n" ] } ], "source": [ "V_ft3 = n_lbmol*R*T_degR/1000.0\n", "\n", "m3_per_ft3 = 0.028317\n", "\n", "V_m3 = V_ft3*m3_per_ft3\n", "\n", "print(\"Storage volume of natural gas at 1000 psia and 15 deg C =\", round(V_m3,1), \"cubic meters\")" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "ZfV5DpaY_0mI" }, "source": [ "### Sizing a Propane Storage Tank\n", "\n", "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?\n", "\n", "**Solution**" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 68 }, "colab_type": "code", "id": "d_Z2bvMb_0mJ", "outputId": "fa3d9191-28fc-4cfa-acef-53f0a8702c90" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Heat requirement = 52709.3 Megajoules\n", "Mass of propane required = 1138.43 kg\n", "Volume of propane required = 2.31 cubic meters\n" ] } ], "source": [ "btu_per_joule = 9.486e-4\n", "\n", "Q_joule = Q_btu/btu_per_joule\n", "print(\"Heat requirement =\", round(Q_joule/1e6,1), \"Megajoules\")\n", "\n", "m_kg = Q_joule/46.3e6\n", "print(\"Mass of propane required = {0:.2f} kg\".format(m_kg))\n", "\n", "V_m3 = m_kg/0.493/1000.0\n", "print(\"Volume of propane required = {0:.2f} cubic meters\".format(V_m3))\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": {}, "colab_type": "code", "id": "vtE1JTP1_0mM" }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "< [Units and Engineering Calculations](http://nbviewer.jupyter.org/github/jckantor/CBE20255/blob/master/notebooks/01.01-Units-and-Engineering-Calculations.ipynb) | [Contents](toc.ipynb) | [Stoichiometry](http://nbviewer.jupyter.org/github/jckantor/CBE20255/blob/master/notebooks/02.00-Stoichiometry.ipynb) >

\"Open" ] } ], "metadata": { "colab": { "collapsed_sections": [], "name": "Units_and_Conversions_for_Home_Heating.ipynb", "provenance": [], "version": "0.3.2" }, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.3" } }, "nbformat": 4, "nbformat_minor": 2 }