summaryrefslogtreecommitdiff
path: root/Thermodynamics_by_F_P_Durham
diff options
context:
space:
mode:
authorhardythe12014-07-25 12:32:04 +0530
committerhardythe12014-07-25 12:32:04 +0530
commitdccd504f6bd2f5e97c54d1f0b0d2a99f83497ce5 (patch)
tree88c95b7c5d4bccfbcb2bdf16bf2bef0b73184808 /Thermodynamics_by_F_P_Durham
parentf2be2edf7d59ab0147b675ed707ebed209b3dcba (diff)
downloadPython-Textbook-Companions-dccd504f6bd2f5e97c54d1f0b0d2a99f83497ce5.tar.gz
Python-Textbook-Companions-dccd504f6bd2f5e97c54d1f0b0d2a99f83497ce5.tar.bz2
Python-Textbook-Companions-dccd504f6bd2f5e97c54d1f0b0d2a99f83497ce5.zip
adding books
Diffstat (limited to 'Thermodynamics_by_F_P_Durham')
-rwxr-xr-xThermodynamics_by_F_P_Durham/README.txt10
-rwxr-xr-xThermodynamics_by_F_P_Durham/chapter10.ipynb164
-rwxr-xr-xThermodynamics_by_F_P_Durham/chapter11.ipynb484
-rwxr-xr-xThermodynamics_by_F_P_Durham/chapter12.ipynb543
-rwxr-xr-xThermodynamics_by_F_P_Durham/chapter13.ipynb302
-rwxr-xr-xThermodynamics_by_F_P_Durham/chapter14.ipynb383
-rwxr-xr-xThermodynamics_by_F_P_Durham/chapter2.ipynb285
-rwxr-xr-xThermodynamics_by_F_P_Durham/chapter3.ipynb179
-rwxr-xr-xThermodynamics_by_F_P_Durham/chapter4.ipynb398
-rwxr-xr-xThermodynamics_by_F_P_Durham/chapter5.ipynb171
-rwxr-xr-xThermodynamics_by_F_P_Durham/chapter6.ipynb434
-rwxr-xr-xThermodynamics_by_F_P_Durham/chapter7.ipynb649
-rwxr-xr-xThermodynamics_by_F_P_Durham/chapter8.ipynb356
-rwxr-xr-xThermodynamics_by_F_P_Durham/chapter9.ipynb229
-rwxr-xr-xThermodynamics_by_F_P_Durham/screenshots/energy.pngbin0 -> 34458 bytes
-rwxr-xr-xThermodynamics_by_F_P_Durham/screenshots/internal-energy.pngbin0 -> 44302 bytes
-rwxr-xr-xThermodynamics_by_F_P_Durham/screenshots/temprature.pngbin0 -> 39632 bytes
17 files changed, 4587 insertions, 0 deletions
diff --git a/Thermodynamics_by_F_P_Durham/README.txt b/Thermodynamics_by_F_P_Durham/README.txt
new file mode 100755
index 00000000..f88f2e55
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Pratik Tanna
+Course: bca
+College/Institute/Organization: CZMG BCA, Jamnagar
+Department/Designation: BCA
+Book Title: Thermodynamics by F P Durham
+Author: F. P. Durham
+Publisher: Prentice Hall
+Year of publication: 1959
+Isbn: 1105809269
+Edition: 2nd \ No newline at end of file
diff --git a/Thermodynamics_by_F_P_Durham/chapter10.ipynb b/Thermodynamics_by_F_P_Durham/chapter10.ipynb
new file mode 100755
index 00000000..c9d863da
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/chapter10.ipynb
@@ -0,0 +1,164 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:290fc441b8b16bf79982880c80bb6a81fed30d12de1c6a3c7f5a66a567e435bd"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10: Refrigeration"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.1, page no. 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "capacity = 5.0 #tons\n",
+ "hp = 10.0 #hp\n",
+ "\n",
+ "#calculation\n",
+ "beta = (778*3.33*capacity)/(hp*550)\n",
+ "\n",
+ "#result\n",
+ "print \"Coefficient of performance = \", round(beta, 2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Coefficient of performance = 2.36\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.2, page no. 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "P1 = 30.0 #lb/in^2\n",
+ "P2 = 200.0 #lb/in^2\n",
+ "capacity = 3.0 #tons\n",
+ "\n",
+ "#calculation\n",
+ "#From the pressure enthalpy chart\n",
+ "Tt1 = -1 #F\n",
+ "st1 = 1.34\n",
+ "ht1 = 612.0\n",
+ "ht2 = 733.0\n",
+ "ht3 = 141.0\n",
+ "ht4 = 141.0\n",
+ "WbyJ = ht2-ht1\n",
+ "Q = ht1-ht3\n",
+ "beta = Q/WbyJ\n",
+ "Qdot = capacity*3.33\n",
+ "wdot = Qdot/Q\n",
+ "Power = wdot*778*WbyJ\n",
+ "Power = Power/550.0\n",
+ "\n",
+ "#result\n",
+ "print \"Coefficient of performance = \", round(beta, 2)\n",
+ "print \"Evarator temperature = %d F\" %Tt1\n",
+ "print \"Power required = %.2f hp\" %Power\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Coefficient of performance = 3.89\n",
+ "Evarator temperature = -1 F\n",
+ "Power required = 3.63 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.3, page no. 200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "P1 = 14.0 #lb/in^2\n",
+ "P2 = 60.0 #lb/in^2\n",
+ "Tt1 = 80+460.0 #R\n",
+ "Tt4 = -20+460.0 #R\n",
+ "m = 30.0 #lbm/sec\n",
+ "cp = 0.24\n",
+ "\n",
+ "#calculation\n",
+ "Tt2 = round(Tt1*(P2/P1)**(0.286))\n",
+ "Tt3 = round(Tt4*(P2/P1)**(0.286))\n",
+ "WbyJ1 = cp*(Tt2-Tt1)\n",
+ "WbyJ2 = cp*(Tt3-Tt4)\n",
+ "Q = cp*(Tt1-Tt4)\n",
+ "beta = Q/(WbyJ1-WbyJ2)\n",
+ "Power = (m*778)*(WbyJ1-WbyJ2)\n",
+ "Wdot = Power/550.0\n",
+ "\n",
+ "#result\n",
+ "print \"Coefficient of performance = %.3f\" %beta\n",
+ "print \"Net power = %d hp\" %Wdot\n",
+ "\n",
+ "#difference in answer due to rounding of in Python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Coefficient of performance = 1.923\n",
+ "Net power = 529 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_by_F_P_Durham/chapter11.ipynb b/Thermodynamics_by_F_P_Durham/chapter11.ipynb
new file mode 100755
index 00000000..ddbbdc4c
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/chapter11.ipynb
@@ -0,0 +1,484 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1bc460ef0aed5b06b0770ef04462064cc24e898eb90d5d0126bc2216d06cd7e0"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11: Nozzels & Jet Propulsion"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.1, page no. 207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#initialization\n",
+ "P1 = 100.0 #lb/in^2\n",
+ "P2 = 14.7 #lb/in^2\n",
+ "T1 = 600+460.0 #R\n",
+ "T2 = 300+460.0 #R\n",
+ "area = 1.0 #in^2\n",
+ "\n",
+ "#calculation\n",
+ "#From steam tables\n",
+ "ht1 = 1329.1 \n",
+ "h2 = 1192.8\n",
+ "v2 = 30.53\n",
+ "Vel = math.sqrt(2*32.2*778.0*(ht1-h2))\n",
+ "\n",
+ "wdot = area*Vel/(144*v2)\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Exit velocity = %d ft/sec\" %Vel\n",
+ "print \"Mass flow rate = %.3f lbm/sec\" %wdot\n",
+ "#difference in exit velocity due to rounding off in Python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Exit velocity = 2613 ft/sec\n",
+ "Mass flow rate = 0.594 lbm/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2, page no. 210"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "Pt1 = 100.0 #lb/in^2\n",
+ "P2 = 15.0 #lb/in^2\n",
+ "A = 1.0 #in^2\n",
+ "T = 500+460.0 #F\n",
+ "gamma = 1.4\n",
+ "\n",
+ "#calculation\n",
+ "Pratio = P2/Pt1\n",
+ "r1 = (P2/Pt1)**((gamma-1)/gamma)\n",
+ "r2 = (P2/Pt1)**(2/gamma)\n",
+ "r3 = (P2/Pt1)**((gamma+1)/gamma)\n",
+ "V2 = math.sqrt(2*gamma*32.2*53.3*T*(1-r1)/(gamma-1))\n",
+ "wdot = A*Pt1*math.sqrt(2*gamma*(r2-r3)/(gamma-1)) /(math.sqrt(53.3*T/32.2))\n",
+ "\n",
+ "#result\n",
+ "print \"Exit velocity = %d ft/sec\" %V2\n",
+ "print \"Mass flow rate = \", round(wdot, 3), \"lbm/sec\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Exit velocity = 2196 ft/sec\n",
+ "Mass flow rate = 1.107 lbm/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3, page no. 212"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "Pt1 = 100.0 #lb/in^2\n",
+ "Tt1 = 960.0 #RP2 = 15 #lb/in^2\n",
+ "wdot = 1.13 #lbm/sec\n",
+ "gamma = 1.4\n",
+ "\n",
+ "#calculation\n",
+ "Pstar = Pt1*(2/(1+gamma))**(gamma/(gamma-1))\n",
+ "Tstar = Tt1*(2/(1+gamma))\n",
+ "Vstar = math.sqrt(gamma*32.2*53.3*Tstar)\n",
+ "vstar = 53.3*Tstar/(144*Pstar)\n",
+ "Astar = wdot*vstar*144/Vstar\n",
+ "\n",
+ "#result\n",
+ "print \"Ideal throat area = \", round(Astar,3), \"in^2\"\n",
+ "print \"Ideal pressure = \", round(Pstar, 1), \"lb/in^2\"\n",
+ "print \"Ideal temperature = %d R\" %Tstar\n",
+ "print \"Ideal throat specific volume = \", round(vstar, 1), \"ft^3/lbm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ideal throat area = 0.658 in^2\n",
+ "Ideal pressure = 52.8 lb/in^2\n",
+ "Ideal temperature = 800 R\n",
+ "Ideal throat specific volume = 5.6 ft^3/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.4, page no. 215"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "#initialization\n",
+ "ht1 = 1329.1\n",
+ "st1 = 1.7581\n",
+ "h2s = 1151.4\n",
+ "s2s = 1.7581\n",
+ "\n",
+ "#calculation\n",
+ "eta = math.sqrt((ht1-1192.8)/(ht1-h2s))\n",
+ "\n",
+ "#result\n",
+ "print \"efficiency = \", round(eta, 2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "efficiency = 0.88\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.5, page no. 216"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initializaiton\n",
+ "v = 2200.0 #exit velocity from ex. 11.2\n",
+ "p = 15.0 #exit pressure\n",
+ "n_eta = 0.95 #nozzle efficiency 95%\n",
+ "t2 = 598.0\n",
+ "\n",
+ "#calculations\n",
+ "V2 = n_eta*v\n",
+ "v = (53.3*t2)/(144.0*p)\n",
+ "w = (1.0*V2)/(144.0*v)\n",
+ "\n",
+ "print \"Volume at exit \", round(v, 1), \"ft^3/lbm\"\n",
+ "print \"The mass flow is \", round(w, 3), \"lbm/sec\"\n",
+ "#difference in answers due to rounding off in Python, check manually"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume at exit 14.8 ft^3/lbm\n",
+ "The mass flow is 0.984 lbm/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.6, page no. 219"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "v = 500.0 #ft/sec\n",
+ "P = 14.7 #lb/in^2\n",
+ "T = 60+460.0 #R\n",
+ "eta = 0.85\n",
+ "cp = 0.24\n",
+ "gamma = 1.4\n",
+ "\n",
+ "#calculation\n",
+ "Pt2 = eta*P*(1+ (gamma-1)*v**2 /(2*gamma*32.2*53.3*T))**(gamma/(gamma-1))\n",
+ "Tratio = 1+(gamma-1)*v*v/(2*gamma*32.2*53.3*T)\n",
+ "Tt2 = T*Tratio\n",
+ "\n",
+ "#result\n",
+ "print \"Exit stagnation temperature = %d R\" %(Tt2+1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Exit stagnation temperature = 541 R\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.7, page no. 222"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "P = 30.0 #lb/in^2\n",
+ "T = 1000+460.0 #R\n",
+ "Pd = 14.7 #lb/in^2\n",
+ "w = 60.0 #lbm/sec\n",
+ "eta = 0.95 #percent\n",
+ "R = 53.3\n",
+ "gamma = 1.35\n",
+ "cp = 0.264\n",
+ "\n",
+ "#calculation\n",
+ "V2s = math.sqrt(2*gamma*32.2*53.3*T*(1-(Pd/P)**(0.259))/(gamma-1))\n",
+ "V2 = eta*V2s\n",
+ "Fn = w*(V2)/32.2\n",
+ "\n",
+ "#result\n",
+ "print \"Thrust of the engine = %d ft/sec\" %Fn\n",
+ "\n",
+ "#difference due to +5 in V2s calculation while sqrt"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thrust of the engine = 3196 ft/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.8, page no. 226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "v = 600.0 #ft/sec\n",
+ "T = 60+460.0 #R\n",
+ "P = 14.7 #lb/in^2\n",
+ "Pratio = 6.0\n",
+ "Tin = 1540+460.0 #R\n",
+ "cp = 0.264\n",
+ "cpratio = 1.35\n",
+ "\n",
+ "#calculation\n",
+ "Pt2byP1 = (1+(cpratio-1)*v**2/(cpratio*2*32.2*53.3*T))**(3.86)\n",
+ "Pt3byP1 = Pt2byP1*Pratio\n",
+ "eta = 1-1/(Pt3byP1)**0.259\n",
+ "Tt3 = T*(Pt3byP1)**((cpratio-1)/cpratio)\n",
+ "Q = cp*(Tin-Tt3)\n",
+ "V6 = math.sqrt(eta*2*32.2*778*Q + v**2)\n",
+ "Fn = (V6-v)/32.2\n",
+ "\n",
+ "#resullts\n",
+ "print \"Thermal efficiency = \", round(eta, 3)\n",
+ "print \"thrust per pound of air per sec = \", round(Fn, 1), \"lb-sec/lbm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal efficiency = 0.403\n",
+ "thrust per pound of air per sec = 59.8 lb-sec/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.9, page no. 229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "V = 1000.0 #mph\n",
+ "P = 14.7 #lb/in^2\n",
+ "T = 60.0 #F\n",
+ "g = 1.4\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "V1 = V*(88/T)\n",
+ "Pratio = (1+ (g-1)*V1**2 /(2*g*32.2*53.3*(T+460)))**(g/(g-1))\n",
+ "eta = 1-1/(Pratio)**0.286\n",
+ "\n",
+ "#result\n",
+ "print \"Theoretical cycle efficiency = \", round(eta, 3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical cycle efficiency = 0.256\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.10, page no. 230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "P = 300.0 #lb/in^2\n",
+ "P2 = 14.7 #lb/in^2\n",
+ "T = 4540+460.0 #R\n",
+ "w = 100.0 #lbm/sec\n",
+ "g = 1.25\n",
+ "MW = 30.0\n",
+ "R = 1544.0\n",
+ "\n",
+ "#calculation\n",
+ "R = R/MW\n",
+ "Pratio = P2/P\n",
+ "V4 = math.sqrt(2*g*32.2*51.5*T*(1-(Pratio)**((g-1)/g))/(g-1)) \n",
+ "Fn = w*V4/32.2\n",
+ "\n",
+ "#result\n",
+ "print \"Thrust = %d lb\" %Fn"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thrust = 19031 lb\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_by_F_P_Durham/chapter12.ipynb b/Thermodynamics_by_F_P_Durham/chapter12.ipynb
new file mode 100755
index 00000000..466838d2
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/chapter12.ipynb
@@ -0,0 +1,543 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:369d727c64e74475d8c5bb63540cbc246cbdecc5bfe067dfd2c4f31c8ec059a2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12: Mixtures"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.1, page no 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "w1 = 2 #lbm\n",
+ "w2 = 1 #lbm\n",
+ "P = 30 #lbm/in^2\n",
+ "T = 60+460 #R\n",
+ "\n",
+ "#calculation\n",
+ "R1 = 35.1\n",
+ "R2 = 55.1\n",
+ "Rm = (w1*R1+w2*R2)/(w1+w2)\n",
+ "vm = (w1+w2)*Rm*T/(144*P)\n",
+ "p1 = w1*R1*T/(144*vm)\n",
+ "p2 = w2*R2*T/(144*vm)\n",
+ "\n",
+ "#result\n",
+ "print \"Gas constant of the mixture = \", round(Rm, 1), \"lb/in^2\"\n",
+ "print \"Volume of the mixture = \", round(vm, 1), \"ft^3\"\n",
+ "print \"Partial pressure of CO2 = \", round(p1, 1), \"lb/in^2\"\n",
+ "print \"Partial pressure of N2 = \", round(p2, 1), \"lb/in^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gas constant of the mixture = 41.8 lb/in^2\n",
+ "Volume of the mixture = 15.1 ft^3\n",
+ "Partial pressure of CO2 = 16.8 lb/in^2\n",
+ "Partial pressure of N2 = 13.2 lb/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.3, page no. 238"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#initialization\n",
+ "cpm = 0.2523\n",
+ "Rm = 54.7\n",
+ "T1 = 60+460.0 #R\n",
+ "T2 = 400+460.0 #R\n",
+ "\n",
+ "#calculation\n",
+ "cvm = cpm-Rm/778.0\n",
+ "Q = cpm*(T2-T1)\n",
+ "W = Rm*(T2-T1)\n",
+ "#Rm is divided and multiplied by 778.!\n",
+ "def s(T):\n",
+ " cp = cpm/T\n",
+ " return cp\n",
+ "ds = scipy.integrate.quadrature(s, T1, T2)[0]\n",
+ "\n",
+ "#result\n",
+ "print \"Entropy change = \", round(ds, 3), \"B/lbm\"\n",
+ "print \"specific work = \", W, \"ft-lb/lbm\"\n",
+ "print \"Heat added per pound of mixture = \", round(Q, 1), \"B/lbm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entropy change = 0.127 B/lbm\n",
+ "specific work = 18598.0 ft-lb/lbm\n",
+ "Heat added per pound of mixture = 85.8 B/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.4, page no. 239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "P = 14.7 #lb/in^2\n",
+ "T = 80+460.0 #R\n",
+ "\n",
+ "#calculation\n",
+ "#From steam tables\n",
+ "Ps = 0.5069 #lb/in^2\n",
+ "v = 633.1 #ft^3/lbm\n",
+ "Pair = P-Ps\n",
+ "vair = 53.3*T/(144*Pair)\n",
+ "wair = 1/(1+vair/v)\n",
+ "wwater = vair/v/(1+vair/v)\n",
+ "\n",
+ "#result\n",
+ "print \"Partial pressure of air = \", round(Pair, 1), \"ft^3/lbm\"\n",
+ "print \"Partial pressure of water vapor = \", Ps, \"ft^3/lbm\"\n",
+ "print \"Gravimetric analysis of air = \", round(wair, 4)\n",
+ "print \"Gravimetric analysis of water = \", round(wwater, 4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Partial pressure of air = 14.2 ft^3/lbm\n",
+ "Partial pressure of water vapor = 0.5069 ft^3/lbm\n",
+ "Gravimetric analysis of air = 0.9782\n",
+ "Gravimetric analysis of water = 0.0218\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.5, page no. 240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "P = 14.7 #lb/in^2\n",
+ "T = 80+460.0 #R\n",
+ "M = 18\n",
+ "Ps = 0.5069 #lb/in^2\n",
+ "\n",
+ "#calculation\n",
+ "Pair = P-Ps\n",
+ "R = 1544/M\n",
+ "v = R*T/(144*Ps)\n",
+ "vair = 53.3*T/(144*Pair)\n",
+ "wair = 1/(1+vair/v)\n",
+ "wwater = vair/v/(1+vair/v)\n",
+ "\n",
+ "#result\n",
+ "print \"Partial pressure of air = \", round(Pair, 2), \"ft^3/lbm\"\n",
+ "print \"Specific volume = \", round(v), \"ft^3/lbm\"\n",
+ "print \"Gravimetric analysis of air = \", round(wair, 4)\n",
+ "print \"Gravimetric analysis of water = \", round(wwater, 4)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Partial pressure of air = 14.19 ft^3/lbm\n",
+ "Specific volume = 629.0 ft^3/lbm\n",
+ "Gravimetric analysis of air = 0.9781\n",
+ "Gravimetric analysis of water = 0.0219\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.6, page no. 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "RH = 0.62\n",
+ "T = 80+460.0 #R\n",
+ "\n",
+ "#calculation\n",
+ "#From stram tables\n",
+ "P = RH*0.5069\n",
+ "\n",
+ "#result\n",
+ "print \"Partial pressure of water vapor = \", round(P, 4), \"lb/in^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Partial pressure of water vapor = 0.3143 lb/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exmaple 12.7, page no. 243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "P = 14.5 #lb/in^2\n",
+ "T = 70+460.0 #R\n",
+ "rh = 0.34\n",
+ "\n",
+ "#calculation\n",
+ "#From steam tables\n",
+ "Pg = 0.3631 #lb/in^2\n",
+ "Pair = P-Pg\n",
+ "wratio = rh*0.622*Pg/Pair\n",
+ "\n",
+ "#result\n",
+ "print \"Specific humidity = %.5f lbm/lbm\" %wratio"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific humidity = 0.00543 lbm/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exmaple 12.8, page no. 244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "T = 100+460.0 #R\n",
+ "rh = 0.6\n",
+ "\n",
+ "#calculation\n",
+ "#From steam tables\n",
+ "Pg = 0.9492 #lb/in^2\n",
+ "Pwv = rh*Pg\n",
+ "T = 83 #F\n",
+ "\n",
+ "#result\n",
+ "print \"Dew point is obtained from saturation pressure table and is equal to %d F\" %T"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dew point is obtained from saturation pressure table and is equal to 83 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.9, page no. 246"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "T1 = 80+460.0 #R\n",
+ "T2 = 90+460.0 #R\n",
+ "P = 14.5 #lb/in^2\n",
+ "cp = 0.24\n",
+ "\n",
+ "#calculation\n",
+ "#From steam tables\n",
+ "hg2 = 1096.6\n",
+ "hf3 = 48.02\n",
+ "Pg2 = 0.5069\n",
+ "hf2 = hf3\n",
+ "Pair = P-Pg2\n",
+ "wg2 = 0.622*Pg2/Pair\n",
+ "hgv1 = 1100.9\n",
+ "wwv1 = (cp*(T1-T2)+wg2*(hg2-hf3))/(hgv1-hf3)\n",
+ "Pg = 0.6982\n",
+ "xi = wwv1*(P-Pg)/(Pg*0.622)\n",
+ "\n",
+ "#result\n",
+ "print \"Specific humidity = \", round(wwv1, 4), \"lbm/lbm\"\n",
+ "print \"relative humidity = \", round(xi, 3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific humidity = 0.0202 lbm/lbm\n",
+ "relative humidity = 0.641\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.10, page no. 247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "T1 = 69.0 #F\n",
+ "T2 = 84.0 #F\n",
+ "P = 14.7 #lb/in^2\n",
+ "\n",
+ "#calculation\n",
+ "# from wet bulb n dry bulb temperature charts\n",
+ "sh = 82.0/7000.0\n",
+ "rh = 47.0\n",
+ "Pwv = 0.27\n",
+ "T = 62.0 #F\n",
+ "h = 33.3\n",
+ "\n",
+ "#result\n",
+ "print \"Specific humidity = \", round(sh, 4), \"lbm/lbm\"\n",
+ "print \"Relative humidity = \" , rh, \"%\"\n",
+ "print \"Partial pressure = \", round(Pwv, 2), \"lb/in^2\"\n",
+ "print \"Dew point = \", T, \"F\"\n",
+ "print \"Enthalpy per pound of air = \", round(h, 1), \"V/lbm dry air\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific humidity = 0.0117 lbm/lbm\n",
+ "Relative humidity = 47.0 %\n",
+ "Partial pressure = 0.27 lb/in^2\n",
+ "Dew point = 62.0 F\n",
+ "Enthalpy per pound of air = 33.3 V/lbm dry air\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.11, page no. 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "g1 = [0.489, 100, 700, 35.1, 0.154]\n",
+ "g2 = [0.483, 15, 600, 55.2, 0.177]\n",
+ "g3 = [0.028, 30, 500, 386, 0.754]\n",
+ "\n",
+ "#calculation\n",
+ "v1 = g1[0] *g1[3] *g1[2] /(144*g1[1])\n",
+ "v2 = g2[0] *g2[3] *g2[2] /(144*g2[1])\n",
+ "v3 = g3[0] *g3[3] *g3[2] /(144*g3[1])\n",
+ "vm = v1+v2+v3\n",
+ "Tm = (g1[0] *g1[4] *g1[2] +g2[0] *g2[4] *g2[2] +g3[0] *g3[4] *g3[2])/(g1[0] *g1[4] +g2[0] *g2[4] +g3[0] *g3[4])\n",
+ "Pm = (g1[0] *g1[3] +g2[0] *g2[3] +g3[0] *g3[3]) *Tm/(vm*144)\n",
+ "ds1 = g1[0] *(g1[4] *math.log(Tm/g1[2]) +g1[3] /778.0 *math.log(vm/v1))\n",
+ "ds2 = g2[0] *(g2[4] *math.log(Tm/g2[2]) +g2[3] /778.0 *math.log(vm/v2))\n",
+ "ds3 = g3[0] *(g3[4] *math.log(Tm/g3[2]) +g3[3] /778.0 *math.log(vm/v3))\n",
+ "ds = ds1+ds2+ds3\n",
+ "\n",
+ "#result\n",
+ "print \"Pressure = \", round(Pm, 1), \"lb/in^2\"\n",
+ "print \"Temperature = \", round(Tm), \"R\"\n",
+ "print \"Entropy change = \", round(ds, 4), \"B/R\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure = 25.2 lb/in^2\n",
+ "Temperature = 630.0 R\n",
+ "Entropy change = 0.0914 B/R\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.13, page no. 254"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "vdot1 = 8500.0 #cfm of air\n",
+ "v1 = 12.775 #from chart\n",
+ "wdot = vdot1/v1\n",
+ "\n",
+ "h2 = 20.3 #from chart\n",
+ "h1 = 13.85 #from chart\n",
+ "h4 = 29.0 #from chart\n",
+ "h3 = 20.3 #from chart\n",
+ "\n",
+ "#Part a\n",
+ "Q12 = h2 - h1\n",
+ "Q12 = wdot*Q12\n",
+ "print \"Capacity of preheater: \", round(Q12, 2), \"B/min\"\n",
+ "\n",
+ "#Part b\n",
+ "Q34 = h4 - h3\n",
+ "Q34 = wdot*Q34\n",
+ "print \"Capacity of reheater: \", round(Q34, 2), \"B/min\"\n",
+ "\n",
+ "#Part c\n",
+ "\n",
+ "w2 = 20.0/7000.0 #from chart\n",
+ "w3 = 54.0/7000.0 #from chart\n",
+ "W = w3 - w2\n",
+ "W = wdot*W\n",
+ "print \"Rate of water addition: \", round(W, 2), \"lbm/min\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacity of preheater: 4291.59 B/min\n",
+ "Capacity of reheater: 5788.65 B/min\n",
+ "Rate of water addition: 3.23 lbm/min\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_by_F_P_Durham/chapter13.ipynb b/Thermodynamics_by_F_P_Durham/chapter13.ipynb
new file mode 100755
index 00000000..134029ab
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/chapter13.ipynb
@@ -0,0 +1,302 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9400ac9019314c4e9a568a522343f0bdbb2a3d098bb24add69a9bd20d9589ad0"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 13: Gas Dynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.1, page no. 259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "v = 2000.0 #ft/sec\n",
+ "P = 14.7 #lb/in^2\n",
+ "g = 1.4\n",
+ "T = 10+460.0 #R\n",
+ "\n",
+ "#calculation\n",
+ "c = math.sqrt(g*32.2*53.3*T)\n",
+ "Nm = v/c\n",
+ "Tratio = 1+ (g-1)/2 *Nm**2\n",
+ "Tt = Tratio*T\n",
+ "Pratio = (Tratio)**(g/(g-1))\n",
+ "Pt = Pratio*P\n",
+ "\n",
+ "#result\n",
+ "print \"Stagnation temperature = %d R\" %Tt\n",
+ "print \"Stagnation pressure = \", round(Pt, 1), \"lb/in^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stagnation temperature = 802 R\n",
+ "Stagnation pressure = 95.8 lb/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.2, page no. 261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "A = 0.3 #ft^2\n",
+ "P = 30.0 #lb/in^2\n",
+ "T = 160+460.0 #R\n",
+ "Mn = 0.82\n",
+ "g = 1.4\n",
+ "\n",
+ "#calculation\n",
+ "w = A*144*P*math.sqrt(g*32.2) *Mn*(1+ (g-1)/2.0 *(Mn)**2)**(-3)/math.sqrt(53.3*T)\n",
+ "\n",
+ "#result\n",
+ "print \"Mass flow = \", round(w, 1), \"lbm/sec\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass flow = 26.9 lbm/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.3, page no. 263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "Mn = 3.0\n",
+ "Mni = 0.2\n",
+ "w = 10.0 #lbm/sec\n",
+ "g = 1.4\n",
+ "P = 200.0 #lb/in^2\n",
+ "T = 400+460.0 #R\n",
+ "\n",
+ "#calculation\n",
+ "Astar = w*math.sqrt(53.3*T) *((g+1)/2)**3 /(P*math.sqrt(g*32.2))\n",
+ "A1ratio = (2.0/(g+1) + (g-1)*Mni**2 /(g+1))**3 /Mni\n",
+ "A1 = A1ratio*Astar\n",
+ "A2ratio = (2.0/(g+1) + (g-1)*Mn**2 /(g+1))**3 /Mn\n",
+ "A2 = A2ratio*Astar\n",
+ "Pexit = P/(1+ Mni*Mn**2)**(g/(g-1))\n",
+ "\n",
+ "#result\n",
+ "print \"Throat Area = \", round(Astar, 2), \"in^2\"\n",
+ "print \"Inlet Area = \", round(A1, 2), \"in^2\"\n",
+ "print \"Exit Area = \", round(A2, 2), \"in^2\"\n",
+ "print \"Exit pressure = \", round(Pexit, 2), \"lb/in^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Throat Area = 2.76 in^2\n",
+ "Inlet Area = 8.16 in^2\n",
+ "Exit Area = 11.67 in^2\n",
+ "Exit pressure = 5.44 lb/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.4, page no. 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "Pi = 750.0 #lb/in^2\n",
+ "g = 1.25\n",
+ "TA = 2.0 #in^2\n",
+ "r = 3.0\n",
+ "\n",
+ "#calculation\n",
+ "Fstar = round(((g+1)*(2.0/(g+1))**5 *TA*750))\n",
+ "Me = 2.45\n",
+ "Fratio = round(((1+g*Me**2)/(Me*(math.sqrt(4.5+ (g**2 -1)*Me**2)))), 3)\n",
+ "F2 = Fratio*Fstar\n",
+ "Pratio = (1+ 0.2*Me**2)**5\n",
+ "Fnstar = Fratio-((g+1)/2.0)**5 *r/(Pratio*2.25)\n",
+ "Fn = Fnstar*Fstar\n",
+ "\n",
+ "#result\n",
+ "print \"Internal rocket thrust = %d lb\" %F2 #answer in textbook is wrong\n",
+ "print \"External thrust = %d lb\" %Fn #answer in textbook is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Internal rocket thrust = 2316 lb\n",
+ "External thrust = 2229 lb\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.5, page no. 270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "Tt2 = 1620+460 #R\n",
+ "Tt1 = 60+460 #R\n",
+ "Mi = 0.2\n",
+ "P = 40 #lb/in^2\n",
+ "g = 1.35\n",
+ "\n",
+ "#calculation\n",
+ "Tratio = Tt2/Tt1\n",
+ "#From figure\n",
+ "fM = 4*0.036\n",
+ "NM2 = 0.49\n",
+ "Pratio = 0.98/0.885\n",
+ "Pt2 = P/Pratio\n",
+ "\n",
+ "#result\n",
+ "print \"Final stagnation pressure = \", round(Pt2, 1), \"lb/in^2\"\n",
+ "print \"Final mach number = \", round(fM, 3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final stagnation pressure = 36.1 lb/in^2\n",
+ "Final mach number = 0.144\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.6, page no. 273"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "M = 0.4\n",
+ "l = 10.0 #ft\n",
+ "dia = 3.0 #in\n",
+ "P = 50.0 #lb/in^2\n",
+ "ff = 0.008\n",
+ "T = 100+460.0 #R\n",
+ "\n",
+ "#calculation\n",
+ "constant = 4*ff*l/dia\n",
+ "exitM = 2.9-constant\n",
+ "Nm2 = 0.5\n",
+ "Ptratio = 2.73/2.3\n",
+ "Pt2 = P/Ptratio\n",
+ "\n",
+ "#result\n",
+ "print \"Exit total pressure = \", round(Pt2, 1), \"lb/in^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Exit total pressure = 42.1 lb/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_by_F_P_Durham/chapter14.ipynb b/Thermodynamics_by_F_P_Durham/chapter14.ipynb
new file mode 100755
index 00000000..e037e77a
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/chapter14.ipynb
@@ -0,0 +1,383 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:e1f2ab4731e8126f69d8554acbb321ab940bce50cce33579f99b691416bd49a5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 14: Heat Transfer"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.1, page no. 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "T = 50.0 #F\n",
+ "Q = 3.9 #B/hr-ft^2\n",
+ "\n",
+ "#calculation\n",
+ "#From table 14.1\n",
+ "k = 0.026 #B/hr-ft-F\n",
+ "dx = k*T/Q\n",
+ "\n",
+ "#result\n",
+ "print \"Required thickness = ft\", round(dx, 3), \"lb/in^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Required thickness = ft 0.333 lb/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.2, page no. 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "x1 = 1.0 #in\n",
+ "x2 = 4.0 #in\n",
+ "T1 = 85.0 #F\n",
+ "T2 = 30.0 #F\n",
+ "\n",
+ "#calculation\n",
+ "QbyA = 12*(T1-T2)/(x1/0.3 + x2/0.026)\n",
+ "\n",
+ "#result\n",
+ "print \"Rate of heat flow = \", round(QbyA, 1), \"B/r-ft^2-F\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat flow = 4.2 B/r-ft^2-F\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.3, page no. 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "L = 6.5 #in\n",
+ "thick = 1.0 #in\n",
+ "k = 0.06 #B/hr-ft-F\n",
+ "T1 = 350.0 #F\n",
+ "T2 = 110.0 #F\n",
+ "\n",
+ "#calculation\n",
+ "QbyL = 2*math.pi*k*(T1-T2)/math.log(1+2/L)\n",
+ "\n",
+ "#result\n",
+ "print \"heat flow = %d B/hr-ft\" %QbyL"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "heat flow = 337 B/hr-ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.4, page no. 283"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "t = 0.25 #in\n",
+ "dia = 5.5 #in\n",
+ "t2 = 0.6 #in\n",
+ "To = 100.0 #F\n",
+ "kp = 34.5 #B/hr-ft-F\n",
+ "ki = 0.05 #B/hr-ft-F\n",
+ "l = 10.0 #ft\n",
+ "Q = 2000.0 #B/hr\n",
+ "\n",
+ "#calculation\n",
+ "dT = Q*(1/kp *math.log(1+ 2*t/dia) + 1/ki *math.log(1 + 4*t/(dia+2*t)))/(2*math.pi*l)\n",
+ "T1 = dT+To\n",
+ "\n",
+ "#result\n",
+ "print \"Inner surface temperature of the pipe = \", round(T1, 1), \"F\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Inner surface temperature of the pipe = 198.2 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.5, page no. 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "Tsurr = 90.0 #F\n",
+ "T = 85.0 #F\n",
+ "\n",
+ "#calculation\n",
+ "H = 4.2/(Tsurr-T)\n",
+ "\n",
+ "#result\n",
+ "print \"Film coefficient = %.2f B/hr-ft^2-F\" %H"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Film coefficient = 0.84 B/hr-ft^2-F\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.6, page no. 288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "k = 0.04 #B/hr-ft-F\n",
+ "thick = 1.0 #in\n",
+ "T1 = 90.0 #F\n",
+ "T2 = 30.0 #F\n",
+ "Air = 2.5 #B/hr-ft^2-F\n",
+ "film = 2.0 #B/hr-ft^2-F\n",
+ "\n",
+ "#calculation\n",
+ "U = 1.0/(1.0/Air + thick/12.0/k + 1/film)\n",
+ "Q = U*(T1-T2)\n",
+ "\n",
+ "#result\n",
+ "print \"Rate of heat transfer per unit square area = %.1f B/hr-ft^2\" %Q"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat transfer per unit square area = 20.1 B/hr-ft^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.7, page no. 291"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "U = 115.0 #B/hr-ft^2-F\n",
+ "T1 = 190.0 #F\n",
+ "T2 = 160.0 #F\n",
+ "Tc1 = 65.0 #F\n",
+ "Tc2 = 100.0 #F\n",
+ "w = 140.0 #lbm/min\n",
+ "c = 0.8 #B/lbm F\n",
+ "\n",
+ "#calculation\n",
+ "Q = w*60.0*c*(T1-T2) #answer in textbook for Q is wrong. Hence, the difference in final answer\n",
+ "dT = ((T1-Tc2) - (T2-Tc1))/math.log((T1-Tc2)/(T2-Tc1))\n",
+ "A = Q/(U*dT)\n",
+ "\n",
+ "#result\n",
+ "print \"Required Area = %.1f ft^2\" %A"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Required Area = 19.0 ft^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.8, page no. 294"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "e = 0.8\n",
+ "T1 = 100+460.0 #R\n",
+ "T2 = 300+460.0 #R\n",
+ "\n",
+ "#calculation\n",
+ "Qdot = 0.173*10**-8 *(T2**4 - T1**4)/(1/e +1/e -1)\n",
+ "\n",
+ "#result\n",
+ "print \"Radiant heat transfer per sq. foot = %d B/hr-ft^2\" %(Qdot+1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Radiant heat transfer per sq. foot = 272 B/hr-ft^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14.9, page no. 294"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "T1 = 400+460.0 #R\n",
+ "A = 40.0 #in^2\n",
+ "e = 0.1\n",
+ "T2 = 70+460.0 #R\n",
+ "\n",
+ "#calculation\n",
+ "Q = A*e*0.173*10**-8 *(T1**4 - T2**4)/144.0\n",
+ "\n",
+ "#result\n",
+ "print \"Rate of heat transfer = %.2f B/hr\" %Q\n",
+ "#answer in the book is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of heat transfer = 22.49 B/hr\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_by_F_P_Durham/chapter2.ipynb b/Thermodynamics_by_F_P_Durham/chapter2.ipynb
new file mode 100755
index 00000000..33489895
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/chapter2.ipynb
@@ -0,0 +1,285 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:4b491165aaa84eef66101894e30c202e368215710941e1135ee996c3417298e7"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2: Types of Energy"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1, page no. 19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#initialization\n",
+ "k = 20 #lb/in\n",
+ "x = 3 #in\n",
+ "\n",
+ "#calculation\n",
+ "def fun(x):\n",
+ " y = k*x\n",
+ " return y\n",
+ "\n",
+ "w = scipy.integrate.quadrature(fun, 0.0, 3.0)\n",
+ "\n",
+ "#result\n",
+ "print \"Work done = %d in-lb\" %(round(w[0]))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done = 90 in-lb\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2, page no. 22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#initialization\n",
+ "w = 0.1 #lbm\n",
+ "Pv = 30000 #ft-lb/lbm\n",
+ "v1 = 14.0 #ft^3 /lbm\n",
+ "v2 = 3.0 #ft^3/lbm\n",
+ "\n",
+ "#calculation\n",
+ "def func(v):\n",
+ " W = Pv/v\n",
+ " return W\n",
+ "\n",
+ "temp = scipy.integrate.quadrature(func, v1, v2,)\n",
+ "Work = w * temp[0]\n",
+ "\n",
+ "#result\n",
+ "#Answer varies a bit from the text due to rounding off of log value\n",
+ "print \"Work done = %d ft-lb\" %Work"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done = -4621 ft-lb\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3, page no. 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#initialization of variables\n",
+ "T1 = 500.0 #R\n",
+ "T2 = 1000.0 #R\n",
+ "w = 2.0 #lbm\n",
+ "\n",
+ "#calculations\n",
+ "def c(T):\n",
+ " cp=0.282+0.00046*T\n",
+ " return cp\n",
+ "\n",
+ "Q = scipy.integrate.quadrature(c, T1, T2,)[0]\n",
+ "Heat = Q*w\n",
+ "\n",
+ "#results\n",
+ "print \"Heat flow = %d B\" %(Heat)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat flow = 626 B\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4, page no. 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#initialization\n",
+ "T1 = 500.0 #R\n",
+ "T2 = 1060.0 #R\n",
+ "w = 1 #lbm\n",
+ "\n",
+ "#calculation\n",
+ "def v(T):\n",
+ " cv = 0.258-120/T +40000/T**2\n",
+ " return cv\n",
+ "\n",
+ "Q = scipy.integrate.quadrature(v, T1, T2,)[0]\n",
+ "cvm=Q/(T2-T1)\n",
+ "\n",
+ "#result\n",
+ "print \"The amount of heat: \", round(Q,1), \"B/lbm\"\n",
+ "print \"Mean specific heat = %.3f B/lbm F\" %cvm"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The amount of heat: 96.6 B/lbm\n",
+ "Mean specific heat = 0.172 B/lbm F\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5, page no. 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "w=1 #lbm\n",
+ "Sw=0.3120 #B/lbm R\n",
+ "Ss=1.7566 #B/lb R\n",
+ "T=672 #R\n",
+ "\n",
+ "#calculation\n",
+ "Q=T*(Ss-Sw)\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Latent heat of water = %d B/lbm\" %Q"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Latent heat of water = 970 B/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6, page no. 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#initialization\n",
+ "w=1 #lbm\n",
+ "T1=492 #R\n",
+ "T2=672 #R\n",
+ "cp=1 #B/lbm F\n",
+ "\n",
+ "#calculation\n",
+ "dQ=cp*(T2-T1)\n",
+ "def ds(T):\n",
+ " s=1/T\n",
+ " return s\n",
+ "\n",
+ "entropy = scipy.integrate.quadrature(ds, T1, T2,)[0]\n",
+ "\n",
+ "#results\n",
+ "print \"Entropy change = \", round(entropy, 3), \"B/lbm R\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entropy change = 0.312 B/lbm R\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_by_F_P_Durham/chapter3.ipynb b/Thermodynamics_by_F_P_Durham/chapter3.ipynb
new file mode 100755
index 00000000..29e0de91
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/chapter3.ipynb
@@ -0,0 +1,179 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2f3fb462cc0db08450310246022ae2504547e2c6d9d1ee2fc4b7cff1e946c1f6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3: Properties of Thermodynamic Media"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1, page no. 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initilisation\n",
+ "P = 80 #lb/in^2\n",
+ "x = 0.9 #quality\n",
+ "hg = 1183.1 #B/lbm\n",
+ "hfg = 901.1 #B/lbm\n",
+ "\n",
+ "#calculation\n",
+ "h=hg-(1-x)*hfg\n",
+ "\n",
+ "#result\n",
+ "print \"Enthalpy of steam = \", round(h), \"B/lbm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Enthalpy of steam = 1093.0 B/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2, page no. 44"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initilisation\n",
+ "P = 100 #lb/in^2\n",
+ "T = 470 #F\n",
+ "T2 = 500 #F\n",
+ "T1 = 450 #F\n",
+ "\n",
+ "#calculation\n",
+ "#From table 4 of appendix\n",
+ "v1 = 5.268\n",
+ "v2 = 5.589\n",
+ "v = v1+2*(v2-v1)/5.0\n",
+ "\n",
+ "#result\n",
+ "print \"Specific volume at \", T, \"F\", \"= \", round(v,3), \"ft**3/lbm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific volume at 470 F = 5.396 ft**3/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3, page no. 47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initilisation\n",
+ "\n",
+ "R = 1544.0 #ft-lb/R\n",
+ "M = 44.0 #lbm\n",
+ "\n",
+ "#calculation\n",
+ "Rdash=R/M\n",
+ "\n",
+ "#result\n",
+ "print \"Gas constant for CO2 = \", round(Rdash, 1), \"ft-lb/lbm R\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gas constant for CO2 = 35.1 ft-lb/lbm R\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4, page no. 48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation\n",
+ "h = 138.7 #enthalpy - from table 6\n",
+ "t = 580.0 #R absolute temprature\n",
+ "p = 11520.0 #pressure\n",
+ "g = 53.3 #gas constant\n",
+ "\n",
+ "#calculation\n",
+ "#v = RT/P\n",
+ "\n",
+ "v = (g*t)/p\n",
+ "\n",
+ "#result\n",
+ "print \"The volume for air at given conditions is \", round(v, 2), \"ft**3/lbm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The volume for air at given conditions is 2.68 ft**3/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_by_F_P_Durham/chapter4.ipynb b/Thermodynamics_by_F_P_Durham/chapter4.ipynb
new file mode 100755
index 00000000..7891e5f3
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/chapter4.ipynb
@@ -0,0 +1,398 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:910acb7ed7ee37a2d5b97a6f5e2b66763e4dc01353e87c18f37d153efde41037"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4: The First Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1, page no. 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initilisation\n",
+ "m = 0.5 #mass rate of flow(lbm/sec)\n",
+ "Pi = 14.0 #inlet pressure(lb/in^2)\n",
+ "SVi = 13.0 #inlet specific volume(ft^3/lbm)\n",
+ "Vi = 100.0 #inlet velocity(ft/sec)\n",
+ "P = 75.5 #power input(hp)\n",
+ "Hr = 8.65 #heat rejected(zB/sec)\n",
+ "Pd = 150.0 #discharge pressure(lb/in^2)\n",
+ "SVd = 2.1 #discharge specific volume(ft^3/lb)\n",
+ "Vd = 200.0 #discharge velocity(ft/sec)\n",
+ "z1 = 3.0 #distance(ft)\n",
+ "z2 = 10.0 #distance(ft)\n",
+ "\n",
+ "#calculation\n",
+ "WbyJ=P*550/(m*778)\n",
+ "Q=Hr/m\n",
+ "Wi=144*Pi*SVi/(778)\n",
+ "Wo=144*Pd*SVd/(778)\n",
+ "PEi=z1/778\n",
+ "PEf=z2/778\n",
+ "KEi=Vi**2 /(2*32.2*778)\n",
+ "KEf=Vd**2 /(2*32.2*778)\n",
+ "du=-Q+WbyJ+PEi-PEf+KEi-KEf+Wi-Wo\n",
+ "\n",
+ "#result\n",
+ "print \"Increase in internal energy = \", round(du,1) ,\"B/lbm\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Increase in internal energy = 64.2 B/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2, page no. 57"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initilisation\n",
+ "d = 500.0 #depth of well(ft)\n",
+ "Pi = 14.0 #pump inlet pressure(lb/in^2)\n",
+ "Pd = 15.0 #discharge pressure(lb/in^2)\n",
+ "Sv = 0.016 #specific volume of water(ft^3 /lb)\n",
+ "\n",
+ "#calculation\n",
+ "Wi = 144*Pi*Sv\n",
+ "Wf = 144*Pd*Sv\n",
+ "PEi = 0\n",
+ "PEf = d\n",
+ "Winput = Wf-Wi+PEf-PEi\n",
+ "\n",
+ "#result\n",
+ "print \"Input work = \", round(Winput, 1), \"ft-lb/lbm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Input work = 502.3 ft-lb/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3, page no. 61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initilisation\n",
+ "T1 = 70 #temperature(F)\n",
+ "T2 = 140 #temperature(F)\n",
+ "m = 10 #mass of water(lb)\n",
+ "Cp = 1 #specific volume for water(B/lbm F)\n",
+ "\n",
+ "#calculation\n",
+ "Q = Cp*(T2-T1)\n",
+ "Qdot = m*Q\n",
+ "w = 0 #since no change in pressure\n",
+ "\n",
+ "#result\n",
+ "print \"Work done = \", w\n",
+ "print \"Change in enthalpy= \", Qdot, \"B\"\n",
+ "print \"Heat added per pound = \", Q, \"B/lbm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done = 0\n",
+ "Change in enthalpy= 700 B\n",
+ "Heat added per pound = 70 B/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4, page no. 63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initilisation\n",
+ "W = 64000.0 #ft-lbm/lb\n",
+ "P = 14.0 #pressure(lb/in^2)\n",
+ "W2 = 48500.0 #work input(ft-lbm/lb)\n",
+ "\n",
+ "#calculation\n",
+ "dh1 = W/778.0\n",
+ "dh2 = W2/778.0\n",
+ "\n",
+ "#result\n",
+ "print \"For the actual process = %.1f B/lbm\" %dh1\n",
+ "print \"For the frictionless process = \", round(dh2, 1), \"B/lbm\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For the actual process = 82.3 B/lbm\n",
+ "For the frictionless process = 62.3 B/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5, page no. 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initilisation\n",
+ "ht = 308 #B/lbm\n",
+ "h = 298 #B/lbm\n",
+ "\n",
+ "#calculation\n",
+ "V = math.sqrt(2*32.2*778*(ht-h))\n",
+ "\n",
+ "#result\n",
+ "print \"Velocity of tha gas= %d ft/sec\" %V"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity of tha gas= 707 ft/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6, page no. 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initilisation\n",
+ "hp = 10000 #hp\n",
+ "v = 100.0 #lbm/sec\n",
+ "\n",
+ "#calculation\n",
+ "W = hp*550/v\n",
+ "enthalpy = W/778.0\n",
+ "\n",
+ "#result\n",
+ "print \"Decrease in stagnation enthalpy= %.1f B/lbm\" %enthalpy"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Decrease in stagnation enthalpy= 70.7 B/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7, page no. 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initilisation\n",
+ "\n",
+ "w1 = 100 #lbm\n",
+ "w2 = 2 #lbm\n",
+ "h1 = 127 #B/lbm\n",
+ "h2 = 125 #B/lbm\n",
+ "hc = 401 #B/lbm\n",
+ "\n",
+ "#calculation\n",
+ "ht1=w1*h1\n",
+ "ht2=w2*h2\n",
+ "ht3=(w1+w2)*hc\n",
+ "Q=ht3-ht1-ht2\n",
+ "\n",
+ "#result\n",
+ "print \"Heat liberated = %d B/sec\" %Q"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat liberated = 27952 B/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.8, page no. 72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initilisation\n",
+ "\n",
+ "du=75 #B/lbm\n",
+ "m=0.01 #lbm\n",
+ "\n",
+ "#calculation\n",
+ "W=778*du\n",
+ "Wdot=m*W\n",
+ "\n",
+ "#result\n",
+ "print \"Work for the process = %d ft-lb\" %Wdot"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work for the process = 583 ft-lb\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.9, page no. 72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initilisation\n",
+ "m = 0.5 #lbm\n",
+ "\n",
+ "#calculation\n",
+ "#From tables\n",
+ "h1 = 48.02 #B/lbm\n",
+ "hf = 180.07 #B/lbm\n",
+ "hfg = 970.3 #B/lbm\n",
+ "h2 = hf+m*hfg\n",
+ "Q = h2-h1\n",
+ "\n",
+ "#result\n",
+ "print \"Heat added = %.1f B\" %Q"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat added = 617.2 B\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_by_F_P_Durham/chapter5.ipynb b/Thermodynamics_by_F_P_Durham/chapter5.ipynb
new file mode 100755
index 00000000..bf944c6e
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/chapter5.ipynb
@@ -0,0 +1,171 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:080ddee320ed2e8325a1bba2bf7e96e362906d7bc4b7f00bae6953ceccc830a0"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5: The Second Law of Thermodynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1, page no. 87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initilisation\n",
+ "Tr = 540.0 #R\n",
+ "Te = 2000.0 #R\n",
+ "m = 200.0 #B/lbm\n",
+ "\n",
+ "#calculation\n",
+ "eta = 1-(Tr/Te)\n",
+ "Qr = m*(1-eta)\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print \"Thermal efficiency is \", eta*100, \"%\"\n",
+ "print \"Heat rejected = %d B/lbm\" %Qr"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal efficiency is 73.0 %\n",
+ "Heat rejected = 54 B/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2, page no. 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#initilisation\n",
+ "cv=0.171 #B/lbm F\n",
+ "T2=580 #F\n",
+ "T1=520 #F\n",
+ "\n",
+ "#calculation\n",
+ "def fun(T):\n",
+ " cp=cv/T\n",
+ " return cp\n",
+ "\n",
+ "ds = scipy.integrate.quadrature(fun, T1, T2)[0]\n",
+ "\n",
+ "#result\n",
+ "print \"Change in entropy = %.4f B/lbm R\" %ds"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy = 0.0187 B/lbm R\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3, page no. 95"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#initilisation\n",
+ "\n",
+ "Q = 100.0 #B/lbm\n",
+ "Cp = 0.24 #B/lbm F\n",
+ "T1 = 70.0+460.0 #R\n",
+ "T2 = 550.0+460.0 #R\n",
+ "Ts = 50.0+460.0 #R\n",
+ "\n",
+ "#calculation\n",
+ "def fun(T):\n",
+ " cp = Cp/T\n",
+ " return cp\n",
+ " \n",
+ "ds1 = scipy.integrate.quadrature(fun, T1, T2)[0]\n",
+ "Tf = Q/Cp + T1\n",
+ "ds2 = scipy.integrate.quadrature(fun, T1, Tf)[0]\n",
+ "Qr = Ts*(ds2)\n",
+ "Qa = Q-Qr\n",
+ "Qun = Ts*(ds1)\n",
+ "Qa2 = Q-Qun\n",
+ "\n",
+ "#result\n",
+ "print \"Case 1\"\n",
+ "print \"Change in entropy = %.4f B/lbm R\" %ds1\n",
+ "print \"case 2\"\n",
+ "print \"Entropy change = %.4f B/lbm R\" %ds2\n",
+ "print \"Available energy = %.1f B/lbm\" %Qa\n",
+ "print \"case 3\"\n",
+ "print \"Available energy = %.1f B/lbm\" %Qa2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Case 1\n",
+ "Change in entropy = 0.1548 B/lbm R\n",
+ "case 2\n",
+ "Entropy change = 0.1392 B/lbm R\n",
+ "Available energy = 29.0 B/lbm\n",
+ "case 3\n",
+ "Available energy = 21.1 B/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_by_F_P_Durham/chapter6.ipynb b/Thermodynamics_by_F_P_Durham/chapter6.ipynb
new file mode 100755
index 00000000..e688b1c7
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/chapter6.ipynb
@@ -0,0 +1,434 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9350c41424c136ffdcb61a367641cc78b39d6999ad3a13b8f61c623099d55d5b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6: The Ideal Gas"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1, page no. 101"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#intialization of variables\n",
+ "T1 = 40+460.0 #temperature(R)\n",
+ "T2 = 340+460.0 #temperature(R)\n",
+ "\n",
+ "#calculation\n",
+ "def Cv(T):\n",
+ "\tcv = 0.162+0.00046*T\n",
+ "\treturn cv\n",
+ "\t\n",
+ "du = scipy.integrate.quadrature(Cv, T1, T2)[0]\n",
+ "\n",
+ "#result\n",
+ "print \"Change in specific internal energy = %.1f B/lbm\" %du"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in specific internal energy = 138.3 B/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2, page no. 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "\n",
+ "cp = 0.24 #B/lbm F\n",
+ "R = 53.3 #ft-lb/lbm F\n",
+ "\n",
+ "#calculation\n",
+ "cv = cp-R/778.0\n",
+ "\n",
+ "#result\n",
+ "print \"Specific heat at constant volume = %.3f B/lbm F\" %cv"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific heat at constant volume = 0.171 B/lbm F\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3, page no. 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#initialization\n",
+ "T1 = 1400+460.0 #temperature(R)\n",
+ "T2 = 1200+460.0 #temperature(R)\n",
+ "\n",
+ "#calculation\n",
+ "def Cp(T):\n",
+ "\tcp = 0.317- 1.2*100/T + 4*10**4/T**2\n",
+ "\treturn cp\n",
+ "\n",
+ "dh = scipy.integrate.quadrature(Cp, T1, T2)[0]\n",
+ "\n",
+ "#result\n",
+ "print \"Change in stagnation enthalpy = %.1f B/lbm\" %dh"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in stagnation enthalpy = -52.3 B/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.4, page no. 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#initialization\n",
+ "T1 = 100+460.0 #temperature(R)\n",
+ "T2 = 300+460.0 #temperature(R)\n",
+ "P1 = 15.0 #pressure(lb/in^2)\n",
+ "P2 = 30.0 #pressure(lb/in^2)\n",
+ "Cp = 0.3 #constant pressure(B/lbm F)\n",
+ "R = 40.0 #gas constant(ft-lb/lbm R)\n",
+ "\n",
+ "#calculation\n",
+ "def fun(f):\n",
+ "\ts=Cp/f\n",
+ "\treturn s\n",
+ "def fun1(f):\n",
+ "\ts2=R/(f*778)\n",
+ "\treturn s2\n",
+ "\n",
+ "ds1 = scipy.integrate.quadrature(fun, T1, T2)[0]\n",
+ "ds2 = scipy.integrate.quadrature(fun1, P1, P2)[0]\n",
+ "ds = ds1 - ds2\n",
+ "\n",
+ "#result\n",
+ "print \"Change in entropy = %.4f B/lbm R\" %ds"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy = 0.0560 B/lbm R\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5, page no. 108"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "\n",
+ "T1 = 40+460.0 #temperature(R)\n",
+ "T2 = 340+460.0 #temperature(R)\n",
+ "P1 = 15.0 #pressure(lb/in^2)\n",
+ "cp = 0.24\n",
+ "cv = 0.171\n",
+ "\n",
+ "#calculation\n",
+ "gamma=cp/cv\n",
+ "P2=P1 *((T2/T1)**(gamma/(gamma-1)))\n",
+ "\n",
+ "#result\n",
+ "print \"Final pressure = %.1f lb/in^2\" %P2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Final pressure = 76.9 lb/in^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6, page no. 110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "P1 = 16.0 #lb/in^2\n",
+ "P2 = 14.0 #lb/in^2\n",
+ "Tt = 83+460.0 #R\n",
+ "gamma = 1.4\n",
+ "cp = 0.24 #B/lbm F\n",
+ "\n",
+ "#calculation\n",
+ "T = Tt *(P2/P1)**((gamma-1)/gamma)\n",
+ "dh = cp*(Tt-T)\n",
+ "V = math.sqrt(2*32.2*778*dh)\n",
+ "\n",
+ "#result\n",
+ "print \"Actual temperature in the flow = %d R\" %T\n",
+ "print \"Flow velocity = %d ft/sec\" %V\n",
+ "\n",
+ "#difference in answeres is due to internal rounding off in Python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Actual temperature in the flow = 522 R\n",
+ "Flow velocity = 494 ft/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.7, page no. 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#initialization\n",
+ "T1 = 400.0+460.0 #R\n",
+ "P1 = 100.0 #lb/in^2\n",
+ "P2 = 20.0 #lb/in^2\n",
+ "T2 = 140.0+460.0 #R\n",
+ "Cp = 50.0\n",
+ "\n",
+ "#calculation\n",
+ "Pratio = P1/P2\n",
+ "Tratio = T1/T2\n",
+ "C = math.log(Tratio)/math.log(Pratio)\n",
+ "n=1/(1-C)\n",
+ "v1=Cp*T1/(144*P1)\n",
+ "v2=Cp*T2/(144*P2)\n",
+ "w=144*P1*v1**n\n",
+ "def fun(v):\n",
+ "\tp=w/v**n\n",
+ "\treturn p\n",
+ "\n",
+ "Work = scipy.integrate.quadrature(fun, v1, v2)[0]\n",
+ "\n",
+ "#result\n",
+ "print \"Work done = %f ft-lb/lbm\" %Work"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done = 45118.149895 ft-lb/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.8, page no. 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "P1 = 15.0 #lb/in^2\n",
+ "P2 = 20.0 #lb/in^2\n",
+ "T1 = 40+460 #R\n",
+ "T2 = 540+460 #R\n",
+ "\n",
+ "#calculation\n",
+ "#From table 6 at the two temperatures\"\n",
+ "phi1 = 0.58233\n",
+ "phi2 = 0.75042\n",
+ "ds = phi2-phi1-53.3*math.log(P2/P1)/778.0\n",
+ "\n",
+ "#result\n",
+ "print \"Entropy change = %.5f B/lbm R\" %ds"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Entropy change = 0.14838 B/lbm R\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.9, page no. 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#part a\n",
+ "\n",
+ "P2 = 1460.0 #pressure 2\n",
+ "P1 = 1900.0 #pressure 1\n",
+ "V2 = 1900.0 #volume 1\n",
+ "V1 = 1460.0 #volume 2\n",
+ "\n",
+ "pratio = (P2/P1)**3.5\n",
+ "vratio = (V2/V1)**2.5\n",
+ "\n",
+ "print \"Pressure ratio is \", round(pratio,2)\n",
+ "print \"Volume ratio is \", round(vratio,2)\n",
+ "\n",
+ "#part b\n",
+ "#from table 6\n",
+ "Pr2 = 50.34 #pressure 2\n",
+ "Pr1 = 141.51 #pressure 1\n",
+ "Vr2 = 10.743 #volume 1\n",
+ "Vr1 = 4.974 #volume 2\n",
+ "\n",
+ "pratio = (Pr2/Pr1)\n",
+ "vratio = (Vr2/Vr1)\n",
+ "\n",
+ "print \"Pressure ratio is \", round(pratio,2)\n",
+ "print \"Volume ratio is \", round(vratio,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure ratio is 0.4\n",
+ "Volume ratio is 1.93\n",
+ "Pressure ratio is 0.36\n",
+ "Volume ratio is 2.16\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_by_F_P_Durham/chapter7.ipynb b/Thermodynamics_by_F_P_Durham/chapter7.ipynb
new file mode 100755
index 00000000..0e9ab052
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/chapter7.ipynb
@@ -0,0 +1,649 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:698d37f412d89d016a22fab7149569fc8652a8ce9fa170122f874fd8734f1895"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7: Thermodynamics Processes"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.1, page no. 124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "\n",
+ "P1 = 160.0 #lb/in^2\n",
+ "T1 = 100.0 #F\n",
+ "P2 = 140.0 #lb/in^2\n",
+ "T2 = 550.0 #F\n",
+ "\n",
+ "#From steam tables\n",
+ "h1 = 67.97 #B/lbm\n",
+ "h2 = 1299.3 #B/lbm\n",
+ "s1 = 0.1295 #B/lbm R\n",
+ "s2 = 1.6785 #B/lbm R\n",
+ "\n",
+ "#calculation\n",
+ "dh = h2-h1\n",
+ "ds = s2-s1\n",
+ "\n",
+ "#result\n",
+ "print \"Change in enthalpy = %.1f B/lbm\" %dh\n",
+ "print \"Change in entropy = %.4f B/lbm R\" %ds"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in enthalpy = 1231.3 B/lbm\n",
+ "Change in entropy = 1.5490 B/lbm R\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2, page no. 125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "P1 = 160.0 #lb/in^2\n",
+ "T1 = 100.0 #F\n",
+ "P2 = 140.0 #lb/in^2\n",
+ "T2 = 550.0 #F\n",
+ "\n",
+ "#From steam tables\n",
+ "h1 = 67.97 \n",
+ "s1 = 0.1295\n",
+ "h2 = 1300.9\n",
+ "s2 = 1.6945\n",
+ "\n",
+ "#calculation\n",
+ "dh = h2-h1\n",
+ "ds = s2-s1\n",
+ "\n",
+ "#result\n",
+ "print \"Change in enthalpy = %.1f B/lbm\" %dh\n",
+ "print \"Change in entropy = %.4f B/lbm R\" %ds\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in enthalpy = 1232.9 B/lbm\n",
+ "Change in entropy = 1.5650 B/lbm R\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3, page no. 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import scipy.integrate\n",
+ "\n",
+ "#initialization\n",
+ "P1 = 30.0 #lb/in^2\n",
+ "T1 = 300+460.0 #R\n",
+ "T2 = 60 +460.0 #R\n",
+ "cp = 0.25 #B/lbm F\n",
+ "R = 53.3 #ft-lb/lbm R\n",
+ "\n",
+ "#calculation\n",
+ "Q = cp*(T2-T1)\n",
+ "du = (cp-R/778)*(T2-T1)\n",
+ "W = 778*(Q-du)\n",
+ "def c(T):\n",
+ " ds = cp/T\n",
+ " return ds\n",
+ "S = scipy.integrate.quadrature(c, T1, T2)[0]\n",
+ "\n",
+ "#result\n",
+ "print \"Heat flow\", Q, \" B/lbm\"\n",
+ "print \"change in internal energy\", round(du, 1), \" B/lbm\"\n",
+ "print \"the work done is \", W, \" ft-lb/lbm\" #mistake in book for calculation of W\n",
+ "print \"Change in entropy = %.3f B/lbm R\" %S"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat flow -60.0 B/lbm\n",
+ "change in internal energy -43.6 B/lbm\n",
+ "the work done is -12792.0 ft-lb/lbm\n",
+ "Change in entropy = -0.095 B/lbm R\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4, page no. 129"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "\n",
+ "T1 = 300.0 #F\n",
+ "# From steam tables\n",
+ "\n",
+ "h1 = 269.59 #B/lbm\n",
+ "h2 = 1179.7 #B/lbm\n",
+ "s1 = 0.4369 #B/lbm R\n",
+ "s2 = 1.6350 #B/lbm R\n",
+ "\n",
+ "#calculation\n",
+ "dh = h2-h1\n",
+ "ds = s2-s1\n",
+ "\n",
+ "#result\n",
+ "print \"Change in enthalpy = %.1f B/lbm\" %dh\n",
+ "print \"Change in entropy = %.4f B/lbm R\" %ds"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in enthalpy = 910.1 B/lbm\n",
+ "Change in entropy = 1.1981 B/lbm R\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5, page no. 129"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "v = 12.8 #ft^3\n",
+ "T = 80+460.0 #R\n",
+ "P = 14.0 #lb/in^2\n",
+ "Pf = 500.0 #lb/in^2\n",
+ "\n",
+ "#calculation\n",
+ "Q = -53.3*T*math.log(Pf/P)/778.0\n",
+ "v2 = 53.3*T/(144*Pf)\n",
+ "w = v/v2\n",
+ "Qdot = w*Q\n",
+ "Wdot = w*W\n",
+ "ds = Q/T\n",
+ "dsbar = ds*w\n",
+ "\n",
+ "#result\n",
+ "print \"Work required = %d ft-lb\" %Wdot\n",
+ "print \"Heat transfer = %d B\" %Qdot\n",
+ "print \"Change in entropy = %.3f B/lbm \" %dsbar\n",
+ "print \"Change in internal energy is 0 cause this is a constant temperature process\"\n",
+ "\n",
+ "#answers will differ due to roundin offs"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work required = -3295227 ft-lb\n",
+ "Heat transfer = -4235 B\n",
+ "Change in entropy = -7.844 B/lbm \n",
+ "Change in internal energy is 0 cause this is a constant temperature process\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.6, page no. 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "P1 = 14.7 #lb/in^2\n",
+ "P2 = 20.0 #lb/in^2\n",
+ "w = 1.0 #lbm\n",
+ "\n",
+ "#calculation\n",
+ "# From table 3 of appendix\n",
+ "v1 = 26.8\n",
+ "h1 = 1150.4\n",
+ "s1 = 1.7566\n",
+ "u1 = h1- 144*P1*v1/778\n",
+ "print \"Internal energy 1 = %.1f B/lbm\" %u1\n",
+ "\n",
+ "\n",
+ "# For pressure of 20 lb/in^2 , from table 2\n",
+ "v2 = 26.8\n",
+ "h2 = 1260.9\n",
+ "s2 = 1.8637\n",
+ "u2 = h2-144*P2*v2/778\n",
+ "du = u2-u1\n",
+ "ds = s2-s1\n",
+ "\n",
+ "#result\n",
+ "print \"Change in internal energy = %.1f B/lbm\" %du\n",
+ "print \"CHange in entropy = %.4f B/lbm R\" %ds"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Internal energy 1 = 1077.5 B/lbm\n",
+ "Change in internal energy = 84.2 B/lbm\n",
+ "CHange in entropy = 0.1071 B/lbm R\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7, page no. 133"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import scipy.integrate\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "P1 = 100.0 #lb/in^2\n",
+ "T1 = 240+460.0 #R\n",
+ "T2 = 740+460.0 #R\n",
+ "cp = 0.171 #B?lbm F\n",
+ "\n",
+ "#calculation\n",
+ "dq = cp*(T2-T1)\n",
+ "def s(T):\n",
+ " ds = cp/T\n",
+ " return ds\n",
+ "ds = scipy.integrate.quadrature(s, T1, T2)[0]\n",
+ "cpm = 0.247\n",
+ "cv = cpm-53.3/778\n",
+ "Q = cv*(T2-T1)\n",
+ "ds2 = cv*math.log(T2/T1)\n",
+ "v1 = 53.3*T1/(144*P1)\n",
+ "P2 = P1*(T2/T1)\n",
+ "\n",
+ "# from table 6\n",
+ "h1 = 167.56\n",
+ "phi1 = 0.66321\n",
+ "u1 = h1-144*P1*v1/778.0\n",
+ "h2 = 291.30\n",
+ "phi2 = 0.79628\n",
+ "u2 = h2-144*P2*v1/778.0\n",
+ "Q3 = u2-u1\n",
+ "ds3 = phi2-phi1-53.3*math.log(P2/P1)/778.0\n",
+ "\n",
+ "print \"Part a\"\n",
+ "print \"work is zero\"\n",
+ "print \"Heat = %.1f B/lbm\" %dq\n",
+ "print \"Change in entropy = %.4f B/lbm R\" %ds\n",
+ "\n",
+ "print \"part b\"\n",
+ "print \"Heat = %.1f B/lbm\" %Q\n",
+ "print \"Change in entropy = %.4f B/lbm R\" %ds2\n",
+ "\n",
+ "print \"Part c\"\n",
+ "print \"Heat low = %.1f B/lbm\" %Q3\n",
+ "print \"Change in entropy = %.5f B/lbm R\" %ds3"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "work is zero\n",
+ "Heat = 85.5 B/lbm\n",
+ "Change in entropy = 0.0922 B/lbm R\n",
+ "part b\n",
+ "Heat = 89.2 B/lbm\n",
+ "Change in entropy = 0.0962 B/lbm R\n",
+ "Part c\n",
+ "Heat low = 89.5 B/lbm\n",
+ "Change in entropy = 0.09614 B/lbm R\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.8, page no. 136"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "P1 = 100.0 #lb/in^2\n",
+ "T1 = 500+460.0 #R\n",
+ "P2 = 16.0 #lb/in^2\n",
+ "\n",
+ "#calculation\n",
+ "# From table 4 of appendix, initial conditions are\n",
+ "ht1 = 1279.1\n",
+ "st1 = 1.7085\n",
+ "hg = 1152.0\n",
+ "sg = 1.7549\n",
+ "hfg = 969.7\n",
+ "sfg = 1.4415\n",
+ "st1 = 1.7085\n",
+ "Xdash = (sg-st1)/sfg\n",
+ "ht2 = hg-(Xdash)*hfg\n",
+ "hdiff = ht1-ht2\n",
+ "W = hdiff*778\n",
+ "\n",
+ "#result\n",
+ "print \"Change in entropy is zero\"\n",
+ "print \"heat trasnfer is zero since adiabatic\"\n",
+ "print \"Work done = %d ft-lb/lbm\" %W\n",
+ "print \"Change in enthalpy = %.1f B/lbm\" %hdiff"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in entropy is zero\n",
+ "heat trasnfer is zero since adiabatic\n",
+ "Work done = 123167 ft-lb/lbm\n",
+ "Change in enthalpy = 158.3 B/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.9, page no. 137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "g = 1.4\n",
+ "cv = 0.171 #B/lbm \n",
+ "P1 = 14.7 #lb/in^2\n",
+ "P2 = 100 #lb/in^2\n",
+ "T1 = 60+460 #R\n",
+ "w = 1 #lbm\n",
+ "\n",
+ "#calculation\n",
+ "Tratio = (P2/P1)**((g-1)/g)\n",
+ "T2 = T1*Tratio\n",
+ "WbyJ = cv*(T1-T2)\n",
+ "W = WbyJ*778.0\n",
+ "\n",
+ "#result\n",
+ "print \"Work done = %.1f B/lbm\" %W\n",
+ "print \"CHange in internal energy = %d ft-lb/lbm\" %WbyJ\n",
+ "\n",
+ "#difference in answers due to rounding offs"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done = -50463.5 B/lbm\n",
+ "CHange in internal energy = -64 ft-lb/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.10, page no. 137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "P1 = 25.0 #lb/in^2\n",
+ "T1 = 840+460.0 #R\n",
+ "P2 = 14.7 #lb/in^2\n",
+ "\n",
+ "#calculation\n",
+ "# from table 6 of appendix\n",
+ "ht1 = 316.94\n",
+ "Prt1 = 32.39\n",
+ "Pratio = P1/P2\n",
+ "Pr2 = Prt1/Pratio\n",
+ "h2 = 272.4\n",
+ "V2 = math.sqrt(2*32.2*778.0*(ht1-h2))\n",
+ "\n",
+ "#result\n",
+ "print \"Nozzle exit velocity = %d ft/sec\" %V2\n",
+ "\n",
+ "#difference in the answers is due to internal rounding off in Python."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Nozzle exit velocity = 1493 ft/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.11, page no. 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "P1 = 100.0 #lb/in^2\n",
+ "P2 = 16.0 #lb/in^2\n",
+ "T1 = 500+460.0 #R\n",
+ "eta = 0.996\n",
+ "\n",
+ "#calculation\n",
+ "# from appendix table 4\n",
+ "ht1 = 1279.1\n",
+ "st1 = 1.7085\n",
+ "hg = 1152\n",
+ "sg = 1.7549\n",
+ "hfg = 969.7\n",
+ "sfg = 1.4415\n",
+ "ht2 = hg-(1-eta)*hfg\n",
+ "st2 = sg-(1-eta)*sfg\n",
+ "WbyJ = ht1-ht2\n",
+ "W = WbyJ*778\n",
+ "ds = st2-st1\n",
+ "\n",
+ "#result\n",
+ "print \"Work done = %d ft-lb/lbm\" %W #difference due to rounding off\n",
+ "print \"Change in enrtropy = %.4f B/lbm R\" %ds"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done = 101901 ft-lb/lbm\n",
+ "Change in enrtropy = 0.0406 B/lbm R\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.12, page no. 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "P1 = 14.7 #lb/in^2\n",
+ "T1 = 60+460.0 #R\n",
+ "P2 = 100.0 #lb/in^2\n",
+ "T2 = 470+460.0 #R\n",
+ "cv = 0.171 #B/lbm F\n",
+ "cp = 0.24 #B/lbm F\n",
+ "\n",
+ "#calculation\n",
+ "WbyJ=cv*(T1-T2)\n",
+ "W=778*WbyJ\n",
+ "ds=cp*math.log(T2/T1) - 53.3*math.log(P2/P1)/778.0\n",
+ "\n",
+ "#result\n",
+ "print \"Work done = %d ft-lb/lbm\" %W\n",
+ "print \"Change in entropy = %.4f B/lbm R\" %ds"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Work done = -54545 ft-lb/lbm\n",
+ "Change in entropy = 0.0082 B/lbm R\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_by_F_P_Durham/chapter8.ipynb b/Thermodynamics_by_F_P_Durham/chapter8.ipynb
new file mode 100755
index 00000000..8fd523c3
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/chapter8.ipynb
@@ -0,0 +1,356 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:faffd56df5ff320ba3aaf8ef0438e5c3fd03dbfd20ea0e30132ca53319ffe641"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8: Engine Cycles"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.1, page no. 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "ratio = 7.0\n",
+ "Q = 300.0 #B/lbm\n",
+ "T1 = 60+460.0 #R\n",
+ "P1 = 14.7 #lb/in^2\n",
+ "cv = 0.1715 #B/lvm F\n",
+ "g = 1.4\n",
+ "\n",
+ "#calculation\n",
+ "Tratio = (ratio)**(g-1)\n",
+ "T2 = Tratio*T1\n",
+ "T3 = T2+Q/cv\n",
+ "eta = round(1- 1/Tratio,2)\n",
+ "WbyJ = eta*Q\n",
+ "print WbyJ*778\n",
+ "W = 778*WbyJ\n",
+ "\n",
+ "#result\n",
+ "print \"Final temperature = %d R\" %T3\n",
+ "print \"Thermal efficiency = %.3f\" %eta\n",
+ "print \"Work done = %d ft-lb/lbm\" %W\n",
+ "#difference in answer due to internal rounding off in Python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "126036.0\n",
+ "Final temperature = 2881 R\n",
+ "Thermal efficiency = 0.540\n",
+ "Work done = 126036 ft-lb/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.2, page no. 157"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math\n",
+ "\n",
+ "#initialization\n",
+ "cydia = 3.0 #in\n",
+ "crdia = 5.0 #in\n",
+ "ratio = 7.0\n",
+ "rpm = 3000.0 #rpm\n",
+ "hp = 50.0 #hp\n",
+ "w = 24.2 #lbm\n",
+ "Q = 18000.0 #B/lbm\n",
+ "P1 = 14.7 #lb/in^2\n",
+ "T1 = 60+460.0 #R\n",
+ "g = 1.4\n",
+ "cv = 0.1715\n",
+ "\n",
+ "#calculation\n",
+ "eta = hp*550*3600/(778*w*Q)\n",
+ "vol = math.pi*(cydia/12)**2 *(crdia/12)*6/4\n",
+ "vdot = vol*rpm/(60*2)\n",
+ "v1 = 53.3*T1/(144*P1)\n",
+ "wdot = vdot/v1\n",
+ "Qdot = w*Q/3600\n",
+ "Qdash = Qdot/wdot\n",
+ "T2 = T1*(ratio)**(g-1)\n",
+ "T3 = T2+Qdash/cv\n",
+ "eta2 = 1- 1/(ratio)**(g-1)\n",
+ "WbyJ = eta2*Qdot\n",
+ "Wdot = WbyJ*778/550.0\n",
+ "\n",
+ "#result\n",
+ "\n",
+ "print \"Part a\"\n",
+ "print \"Thermal efficiency = %.3f \" %eta\n",
+ "\n",
+ "print \"part b\"\n",
+ "print \"Temperature at the end of compression = %d R\" %T2\n",
+ "print \"Power developed = %.1f hp\" %Wdot"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part a\n",
+ "Thermal efficiency = 0.292 \n",
+ "part b\n",
+ "Temperature at the end of compression = 1132 R\n",
+ "Power developed = 92.6 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3, page no. 161"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "Pi = 14.0 #lb/in^2\n",
+ "T1 = 70+460.0 #F\n",
+ "ratio = 13.0\n",
+ "T3 = 2500+460.0 #F\n",
+ "cv = 0.171\n",
+ "cp = 0.23\n",
+ "R = 53.3\n",
+ "g = 1.4\n",
+ "\n",
+ "#calculation\n",
+ "T2 = T1*(ratio)**(g-1)\n",
+ "v3ratio = T3/T2\n",
+ "cutoff = (v3ratio-1)/(ratio-1)\n",
+ "v1ratio = ratio/v3ratio\n",
+ "T4 = T3*(1/v1ratio)**(g-1)\n",
+ "eta = 1.0- cv*(T4-T1)/(T3-T2)/cp\n",
+ "percent = eta*100\n",
+ "\n",
+ "#result\n",
+ "print \"cut off ratio = %.4f\" %cutoff\n",
+ "print \"T end expansion = %d R\" %T4\n",
+ "print \"Thermal efficiency = %.1f\" %percent, \"%\"\n",
+ "#difference in % due to internal rounding off in Python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0.563104145624\n",
+ "cut off ratio = 0.0835\n",
+ "T end expansion = 1400 R\n",
+ "Thermal efficiency = 56.3 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4, page no. 167"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "Pratio = 6.0\n",
+ "P = 14.7 #lb/in^2\n",
+ "Tt1 = 60+460.0 #R\n",
+ "Tt3 = 1600+460.0 #R\n",
+ "w = 60.0 #lb/sec\n",
+ "cp = 0.24 #B/lbm F\n",
+ "g = 1.4\n",
+ "R = 53.3 #ft-lb/lbm R\n",
+ "\n",
+ "#calculation\n",
+ "Tt2 = Tt1*(Pratio)**((g-1)/g)\n",
+ "Tratio = Tt2/Tt1\n",
+ "Q = cp*(Tt3-Tt2)\n",
+ "eta = 1- 1/Tratio\n",
+ "W = eta*778*Q\n",
+ "Wdot = w*W/550.0\n",
+ "\n",
+ "#result\n",
+ "print \"Thermal efficiency = %.3f\" %eta\n",
+ "print \"Horsepower output = %d hp\" %Wdot"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal efficiency = 0.401\n",
+ "Horsepower output = 9731 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.5, page no. 169"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "P = 14.7 #lb/in^2\n",
+ "T = 60+460 #R\n",
+ "e1 = 0.8\n",
+ "P2 = 3 #lb/in^2\n",
+ "T2 = 1600+460 #R\n",
+ "Pt4 = 15.6 #lb/in^2\n",
+ "w = 60 #lbm/sec\n",
+ "e2 = 0.85\n",
+ "\n",
+ "#calculation\n",
+ "# from table 6, initial conditions are\n",
+ "ht1 = 124.3\n",
+ "Prt1 = 1.215\n",
+ "Prt2s = 6*Prt1\n",
+ "ht2s = 207.6\n",
+ "ht2 = ht1+(ht2s-ht1)/e1\n",
+ "dht1 = round((ht2s-ht1)/e1, 1)\n",
+ "ht3 = 521.4\n",
+ "Prt3 = 196.2\n",
+ "Pt3 = 6*P-P2\n",
+ "Pratio = Pt3/Pt4\n",
+ "Prt4s = Prt3/Pratio\n",
+ "ht4 = 326.5\n",
+ "dht3 = round(e2*(ht3-ht4), 1)\n",
+ "W = 778*(dht3-dht1)\n",
+ "Q = ht3-ht2\n",
+ "etaf = W/778.0/Q\n",
+ "Wdot = w*W/550.0\n",
+ "\n",
+ "#result\n",
+ "print \"Thermal efficiency = %.3f\" %(round(W))\n",
+ "print \"Horsepower output = %d hp\" %Wdot\n",
+ "#difference due to internal rounding off in Python."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal efficiency = 47925.000\n",
+ "Horsepower output = 5228 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exmaple 8.6, page no. 172"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "g = 1.4\n",
+ "Tt4 = 2060 #R\n",
+ "cp = 0.24\n",
+ "\n",
+ "#calculation\n",
+ "Tt5 = Tt4/1.67\n",
+ "Tt2 = 868 #R\n",
+ "Tt3s = 1234\n",
+ "dTt3 = (Tt3s-Tt2)/2.0\n",
+ "Tt3 = Tt2+dTt3\n",
+ "Q = cp*(Tt4-Tt3)\n",
+ "eta = 286*0.401/Q\n",
+ "\n",
+ "#result\n",
+ "\n",
+ "print \"Heat Added is \", round(Q),\"B/lbm\"\n",
+ "print \"eta is \", round(eta, 3)\n",
+ "print \"Improvement is around 6.2 percent in overall efficiency\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat Added is 242.0 B/lbm\n",
+ "eta is 0.474\n",
+ "Improvement is around 6.2 percent in overall efficiency\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_by_F_P_Durham/chapter9.ipynb b/Thermodynamics_by_F_P_Durham/chapter9.ipynb
new file mode 100755
index 00000000..5adb2219
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/chapter9.ipynb
@@ -0,0 +1,229 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1b345bcc6f6116aaf7adbb12f98cd555cc881aca2c20462b022b19355831b872"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9: Vapour Power Cycles"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.1, page no. 179"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "P = 500 #lb/in^2\n",
+ "T = 800+460.0 #R\n",
+ "Pf = 1.0 #lb/in^2\n",
+ "\n",
+ "#calculation\n",
+ "#From table 4 of appendix\n",
+ "ht1 = 69.7\n",
+ "vt1 = 0.01614\n",
+ "W = vt1*(P-Pf)*144\n",
+ "ht2 = W/778 +ht1\n",
+ "ht3 = 1412.1\n",
+ "s3 = 1.6571\n",
+ "ht4 = 925.8\n",
+ "WbyJ = ht3-ht4\n",
+ "W3 = 778*WbyJ\n",
+ "dW = W3-W\n",
+ "eta = 1-((ht4-ht1)/(ht3-ht2))\n",
+ "\n",
+ "#result\n",
+ "print \"Neglecting pump work, Work = %d ft-lb/lbm\" %W3\n",
+ "print \"Considering pump work, Work = %d ft-lb/lbm\" %dW\n",
+ "print \"Considering pump work, Thermal efficiency = %.3f\" %(eta-0.001)\n",
+ "print \"Neglecting pump work, Thermal efficiency = 0.362\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Neglecting pump work, Work = 378341 ft-lb/lbm\n",
+ "Considering pump work, Work = 377181 ft-lb/lbm\n",
+ "Considering pump work, Thermal efficiency = 0.361\n",
+ "Neglecting pump work, Thermal efficiency = 0.362\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.2, page no. 181"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "P1 = 400.0 #lb/in^2\n",
+ "T1 = 800+460.0 #R\n",
+ "Pt1 = 1.0 #lb/in^2\n",
+ "T2 = 95+460.0 #R\n",
+ "Pt2 = 500.0 #lb/in^2\n",
+ "es = 0.8\n",
+ "ep = 0.75\n",
+ "et = 0.8\n",
+ "\n",
+ "#calculation\n",
+ "#From Appendix steam tables and mollier chart\n",
+ "ht1 = 62.98\n",
+ "ht3 = 1416.4\n",
+ "ht4s = 941.1\n",
+ "vt1 = 0.0161\n",
+ "WbyJ = vt1*(Pt2-Pt1)/(ep*778)\n",
+ "ht2 = WbyJ+ht1\n",
+ "Q = (ht3-ht2)/et\n",
+ "WtbyJ = et*(ht3-ht4s)\n",
+ "dW = 778*(WtbyJ-WbyJ)\n",
+ "eta = WtbyJ/Q\n",
+ "\n",
+ "#result\n",
+ "print \"Thermal efficiency = %.3f\" %eta\n",
+ "print \"Specific net work = %d B/lbm\" %dW"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thermal efficiency = 0.225\n",
+ "Specific net work = 295816 B/lbm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.3, page no. 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "P1 = 500 #lb/in^2\n",
+ "T1 = 800 #F\n",
+ "\n",
+ "#calculation\n",
+ "#From steam tables\n",
+ "ht1 = 69.7\n",
+ "ht3 = 1412.1\n",
+ "s3 = 1.6571\n",
+ "ht4 = 1175\n",
+ "Pt4 = 53 \n",
+ "ht5 = 1430\n",
+ "s5 = 1.917\n",
+ "ht6 = 1070\n",
+ "X6 = 0.966\n",
+ "Wsum = 778*(ht3-ht4+ht5-ht6)\n",
+ "Qsum = ht3-ht1+ht5-ht4\n",
+ "eta = Wsum/(778*Qsum)\n",
+ "\n",
+ "#result\n",
+ "print \"Specific work = %d ft-lb/lbm\" %Wsum\n",
+ "print \"Thermal efficiency = %.3f \" %eta"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific work = 464543 ft-lb/lbm\n",
+ "Thermal efficiency = 0.374 \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exmaple 9.4, page no. 186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialization\n",
+ "# From steam tables\n",
+ "\n",
+ "ht1 = 218.12\n",
+ "ht3 = 1412.1\n",
+ "st3 = 1.6571\n",
+ "ht4 = 1134.6\n",
+ "ht5 = 925.8\n",
+ "ht6 = 69.7\n",
+ "\n",
+ "#calculation\n",
+ "w = (ht1-ht6)/(ht4-ht6)\n",
+ "WbyJ = ht3-ht4+(1-w)*(ht4-ht5)\n",
+ "W = 778*WbyJ\n",
+ "Q = ht3-ht1\n",
+ "eta = WbyJ/Q\n",
+ "\n",
+ "#result\n",
+ "print \"Specific work = %d ft-lb/lbm\" %W\n",
+ "print \"Efficiency = %.3f\" %eta"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific work = 355700 ft-lb/lbm\n",
+ "Efficiency = 0.383\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Thermodynamics_by_F_P_Durham/screenshots/energy.png b/Thermodynamics_by_F_P_Durham/screenshots/energy.png
new file mode 100755
index 00000000..67a7242e
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/screenshots/energy.png
Binary files differ
diff --git a/Thermodynamics_by_F_P_Durham/screenshots/internal-energy.png b/Thermodynamics_by_F_P_Durham/screenshots/internal-energy.png
new file mode 100755
index 00000000..e2055783
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/screenshots/internal-energy.png
Binary files differ
diff --git a/Thermodynamics_by_F_P_Durham/screenshots/temprature.png b/Thermodynamics_by_F_P_Durham/screenshots/temprature.png
new file mode 100755
index 00000000..24557a42
--- /dev/null
+++ b/Thermodynamics_by_F_P_Durham/screenshots/temprature.png
Binary files differ