diff options
author | hardythe1 | 2015-04-07 15:58:05 +0530 |
---|---|---|
committer | hardythe1 | 2015-04-07 15:58:05 +0530 |
commit | c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131 (patch) | |
tree | 725a7d43dc1687edf95bc36d39bebc3000f1de8f /Thermodynamics_for_Engineers/Chapter_8_3.ipynb | |
parent | 62aa228e2519ac7b7f1aef53001f2f2e988a6eb1 (diff) | |
download | Python-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.tar.gz Python-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.tar.bz2 Python-Textbook-Companions-c7fe425ef3c5e8804f2f5de3d8fffedf5e2f1131.zip |
added books
Diffstat (limited to 'Thermodynamics_for_Engineers/Chapter_8_3.ipynb')
-rwxr-xr-x | Thermodynamics_for_Engineers/Chapter_8_3.ipynb | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/Thermodynamics_for_Engineers/Chapter_8_3.ipynb b/Thermodynamics_for_Engineers/Chapter_8_3.ipynb new file mode 100755 index 00000000..8dd5540f --- /dev/null +++ b/Thermodynamics_for_Engineers/Chapter_8_3.ipynb @@ -0,0 +1,126 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:86e00f67d619987b1a4198153e70d431ddb0592847bf75b0bc55b544e7c1f8d2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8 - Availability of Energy"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1 - Pg 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the available energy loss\n",
+ "#Initialization of variables\n",
+ "q=1000. #Btu\n",
+ "th=1140. #F\n",
+ "tl=40. #F\n",
+ "ts=940. #F\n",
+ "#calculations\n",
+ "Q1=q*(th-tl)/(th+460)\n",
+ "Q2=q*(ts-tl)/(ts+460)\n",
+ "dif=Q1-Q2\n",
+ "#results\n",
+ "print '%s %d %s' %(\"Available energy loss =\",dif,\"Btu\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Available energy loss = 44 Btu\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2 - Pg 124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate the untransferred, transferred, available, unavailable energy for both gas and water\n",
+ "#Initialization of variables\n",
+ "import math\n",
+ "ma=200000. #lb\n",
+ "cpa=0.26\n",
+ "T2g=1200. #F\n",
+ "T1g=300. #F\n",
+ "T1w=200. #F\n",
+ "mw=250000. #lb\n",
+ "cpw=1.02\n",
+ "Tl=560. #R\n",
+ "cx=1.01\n",
+ "#calculations\n",
+ "T2w=T1w+ ma*cpa*(T2g-T1g)/(mw*cpw)\n",
+ "Qun=Tl*ma*cpa*math.log((T2g+460)/(T1g+460))\n",
+ "Qtr=ma*cpa*(T2g-T1g)\n",
+ "Qav=Qtr-Qun\n",
+ "Qun2=Tl*mw*cx*math.log((T2w+460)/(T1w+460))\n",
+ "Qav2=Qtr-Qun2\n",
+ "ht1=Qav-Qav2\n",
+ "#results\n",
+ "print '%s %d %s' %(\"For gas, Untransferred energy =\",Qun,\"Btu/hr\")\n",
+ "print '%s %d %s' %(\"\\n For gas, transferred energy =\",Qtr,\"Btu/hr\")\n",
+ "print '%s %d %s' %(\"\\n For gas, available energy =\",Qav,\"Btu/hr\")\n",
+ "print '%s %d %s' %(\"\\n For water, Untransferred energy =\",Qun2,\"Btu/hr\")\n",
+ "print '%s %d %s' %(\"\\n For water, available energy =\",Qav2,\" Btu/hr\")\n",
+ "print '%s %d %s' %(\"\\n Loss of available energy =\",ht1,\"Btu/hr\")\n",
+ "print '%s' %('The answers are a bit different due to rounding off error in textbook')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For gas, Untransferred energy = 22750129 Btu/hr\n",
+ "\n",
+ " For gas, transferred energy = 46800000 Btu/hr\n",
+ "\n",
+ " For gas, available energy = 24049870 Btu/hr\n",
+ "\n",
+ " For water, Untransferred energy = 34693187 Btu/hr\n",
+ "\n",
+ " For water, available energy = 12106812 Btu/hr\n",
+ "\n",
+ " Loss of available energy = 11943058 Btu/hr\n",
+ "The answers are a bit different due to rounding off error in textbook\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |