summaryrefslogtreecommitdiff
path: root/Thermodynamics_by_F_P_Durham/chapter4.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Thermodynamics_by_F_P_Durham/chapter4.ipynb')
-rwxr-xr-xThermodynamics_by_F_P_Durham/chapter4.ipynb398
1 files changed, 398 insertions, 0 deletions
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