summaryrefslogtreecommitdiff
path: root/Mechanical_Engineering_Thermodynamics/Chapter_19.ipynb
blob: 7bea3b1305f3bd5801f7715099b3d19f105e40a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 19 - Reciprocating Expanders and Compressors"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1 - Pg 370"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the Horsepower output and mean effective pressure\n",
      "#initialization of varaibles\n",
      "print '%s' %(\"From tables,\")\n",
      "h1=1185.3 #B/lb\n",
      "v1=4.896 #cu ft/lb\n",
      "v2=23.66 #cu ft/lb\n",
      "h2=1054.3 #B/lb\n",
      "Pd1=1 #cu ft\n",
      "Pd2=0.98 #cu ft\n",
      "N=300 #rpm\n",
      "#calculations\n",
      "Wx=h1-h2\n",
      "Pd=Pd1+Pd2\n",
      "Cl=0.05\n",
      "mf=Pd*(1-Cl*(v2/v1 - 1))/v2\n",
      "P=Wx*mf*N/(2545./60.)\n",
      "mep=P*33000./(N*Pd)\n",
      "#results\n",
      "print '%s %.3f %s' %(\"Horsepower output =\",P,\"hp\")\n",
      "print '%s %d %s' %(\"\\n Mean effective pressure =\",mep,\"psf\")\n",
      "#The answers in the book are a bit different due to round off error.\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "From tables,\n",
        "Horsepower output = 62.679 hp\n",
        "\n",
        " Mean effective pressure = 3482 psf\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2 - Pg 370"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Calculate the mass flow rate when the clearences are 3% and 6%\n",
      "#initialization of varaibles\n",
      "R=53.34\n",
      "T1=540. #R\n",
      "P1=15. #psia\n",
      "T2=720. #R\n",
      "P2=60. #psia\n",
      "PD=150. #cu ft/min\n",
      "p1=0.03\n",
      "p2=0.06\n",
      "#calculations\n",
      "v1=R*T1/(P1*144.)\n",
      "vratio=T1*P2/(P1*T2)\n",
      "Nmf=PD*(1-p1*(vratio-1))/v1\n",
      "Nmf2=PD*(1-p2*(vratio-1))/v1\n",
      "#results\n",
      "print '%s %.1f %s' %(\"For clearance of 3 percent, Mass per min =\",Nmf,\"lb/min\")\n",
      "print '%s %.1f %s' %(\"\\n For clearance of 6 percent, Mass per min =\",Nmf2,\"lb/min\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "For clearance of 3 percent, Mass per min = 10.6 lb/min\n",
        "\n",
        " For clearance of 6 percent, Mass per min = 9.9 lb/min\n"
       ]
      }
     ],
     "prompt_number": 2
    }
   ],
   "metadata": {}
  }
 ]
}