summaryrefslogtreecommitdiff
path: root/Elementary_heat_Power_by_H_L_Solberg/Chapter9.ipynb
blob: aa870a601fadc13f081feb189fb829660658d0bf (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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
{
 "metadata": {
  "name": "EHP-9"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": "Pumps"
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 9.1,Page 472"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan, cos\nfrom numpy import *\nh=200.0 #ft\ngam=64.0 #lb per cu ft\n\n#calculations\nP=h*gam/144.0 #pressure\n\n#results\nprint \"Pressure in psi\",round(P,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "88.889 Pressure in psi\n"
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 9.2,Page 472"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nP=20.0 #psi\ngam=62.4 #lb per cu ft\n\n#calculations\nh=P*144/gam #height\n\n#results\nprint \"height in ft\",round(h,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "46.154 height in ft\n"
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 9.3,Page 472"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nh=3.0/12.0 #ft\ngam=62.4 #lb per cu ft\ngam2=0.075 #lb per cu ft\n\n#calculations\nP=h*gam #pressure\nh2=P/gam2 #height\n\n#results\nprint \"Air height required in ft of air\",round(h2,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Air height required in ft of air 208.0\n"
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 9.4,Page 477"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\ndif=4.0 #in\ngam=62.4 #lb per cu ft\ndensity=13.6 #g/cc\n\n#calculations\npv=dif*1/12 *density*gam/144 - dif/12 *gam/144 #pressure\nhv=pv*144/gam #height\n\n#results\nprint \"velocity pressure in psi\",round(pv,3)\nprint \" velocity head in ft of water \",round(hv,3)\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "velocity pressure in psi 1.82\n velocity head in ft of water  4.2\n"
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 9.5,Page 479"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\ndif=4.0 #in\ngam=62.4 #lb per cu ft\ngam2=0.08 #lb per cu ft\n\n#calculations\npv=dif*1/12 *gam/144 #pressure\nhv=pv*144/gam2 #height\n\n#results\nprint \"velocity pressure in psi\",round(pv,3)\nprint \" velocity head in ft of water \",round(hv,3)\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "velocity pressure in psi 0.144\n velocity head in ft of water  260.0\n"
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 9.6,Page 482"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan,sqrt\nfrom numpy import *\nhw=3.0/12 #ft\ngam1=62.4 #lb/ft^3\ngam2=0.07 #lb/ft^3\ng=32.2 #ft/s^2\n\n#calculations\np=hw*gam1 #pressure\nhg=p/gam2 #height\nV=sqrt(2*g*hg) #velocity\n\n#results\nprint \"velocity of gas in fps\",round(V,3)\n",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "velocity of gas in fps 119.8\n"
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 9.7,Page 485"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nh=4.0 #in\nden=13.6 #g/cc\nAr=1.0/9\nA1=12 #sq in\ngam=62.4 #lb/ft^3\ng=32.2 #ft/s^2\n\n#calculations\ndh=(h*den-h)/12.0\nVr=1/Ar\nV22=2*g*dh/(1-Ar**2)\nV2=sqrt(V22)\nA2=A1*Ar\nv2=1/gam\nms=A2*V2/(v2*144) #mass flow rate\n\n#results\nprint \"Flow rate of water in lb/sec\",round(ms,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Flow rate of water in lb/sec 9.561\n"
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 9.8,Page 488"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nmdot=8000.0 #lb/min\nA1=1.0 #sq ft\nA2=3.0/4 #sq ft\nP2=50.0 #psi\nP1=10.0 #psi\ngam=62.4 #lb/ft^3\ny2=-2.0 #ft\ny1=-4.0 #ft\ng=32.2 #ft/s^2\neff=0.7\n\n#calculations\nv=1/gam\ncap=mdot/8.33\nV1=mdot*v/A1 /60.0 #velocity\nV2=mdot*v/A2 /60.0 #velocity\nht= (y2-y1) + (V2**2 -V1**2)/(2*g) + (P2-P1)*144/gam #height\nHhp=mdot*ht/33000.0 #horsepower\nPhp=Hhp/eff #horsepower\n\n#results\nprint \"Capacity in gpm\",round(cap,3)\nprint \" Total dynamic head in ft\",round(ht,3)\nprint \" Hydraulic horsepower in hp\",round(Hhp,3)\nprint \" pump horsepower in hp\",round(Php,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Capacity in gpm 960.384\n Total dynamic head in ft 94.363\n Hydraulic hp in hp 22.876\n pump horsepower in hp 32.68\n"
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 9.9,Page 491"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nz=12.0 #ft\ngam1=62.4 #lb/ft^3\nsg=0.8\nP2=100.0 #psia\nP1=-10.0 #psia\nmm=10000.0 #lb/min\n\n#calculations\ngam2=sg*gam1\np2g=P2*144/(gam2) +z #pressure\np1g=P1*144*0.491/(gam2) #pressure\nht=p2g-p1g #height\nHhp=mm*ht/33000 #horsepower\n\n#results\nprint \"Total dynamic head in ft of oil\",round(ht,3)\nprint \" Hydraulic horsepower in hp\",round(Hhp,3)",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "Total dynamic head in ft of oil 314.625\n Hydraulic hp in hp 95.341\n"
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": "Example 9.10,Page 510"
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": "# Initialization of Variable\nfrom math import pi\nfrom math import atan\nfrom numpy import *\nsr=2\n\n#calculations\nhr=sr**2 #ratio\ncapr=sr #ratio\nhpr=sr**3 #ratio\n\n#results\nprint \"head is \",round(hr,3),\"times the original\"\nprint \" capacity is \",round(capr,3),\"times the original\"\nprint \" power is\",round(hpr,3),\"times the original\"",
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": "head is  4.0 times the original\n capacity is  2.0 times the original\n power is 8.0 times the original\n"
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}