{ "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": {} } ] }