diff options
Diffstat (limited to 'Elementary_Heat_Power_by_H_L_Solberg/9-Pumps.ipynb')
-rw-r--r-- | Elementary_Heat_Power_by_H_L_Solberg/9-Pumps.ipynb | 353 |
1 files changed, 353 insertions, 0 deletions
diff --git a/Elementary_Heat_Power_by_H_L_Solberg/9-Pumps.ipynb b/Elementary_Heat_Power_by_H_L_Solberg/9-Pumps.ipynb new file mode 100644 index 0000000..b61182a --- /dev/null +++ b/Elementary_Heat_Power_by_H_L_Solberg/9-Pumps.ipynb @@ -0,0 +1,353 @@ +{ +"cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9: Pumps" + ] + }, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.10: Example_10.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//Initialization of variables\n", +"sr=2\n", +"//calculations\n", +"hr=sr^2\n", +"capr=sr\n", +"hpr=sr^3\n", +"//results\n", +"printf('head is %d times the original',hr)\n", +"printf('\n capacity is %d times the original',capr)\n", +"printf('\n power is %d times the original',hpr)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.1: Example_1.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//Initialization of variables\n", +"h=200 //ft\n", +"gam=64 //lb per cu ft\n", +"//calculations\n", +"P=h*gam/144\n", +"//results\n", +"printf('Pressure = %.1f psi',P)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.2: Example_2.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//Initialization of variables\n", +"P=20 //psi\n", +"gam=62.4 //lb per cu ft\n", +"//calculations\n", +"h=P*144/gam\n", +"//results\n", +"printf('height = %.1f ft',h)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.3: Example_3.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//Initialization of variables\n", +"h=3/12 //ft\n", +"gam=63.4 //lb per cu ft\n", +"gam2=0.075 //lb per cu ft\n", +"//calculations\n", +"P=h*gam\n", +"h2=P/gam2\n", +"//results\n", +"printf('Air height required = %d ft of air',h2)\n", +"disp('The answer is a bit different due to roundoff error in textbook.')" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.4: Example_4.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//Initialization of variables\n", +"dif=4 //in\n", +"gam=62.4 //lb per cu ft\n", +"density=13.6 //g/cc\n", +"//calculations\n", +"pv=dif*1/12 *density*gam/144 - dif/12 *gam/144\n", +"hv=pv*144/gam\n", +"//results\n", +"printf('velocity pressure = %.2f psi',pv)\n", +"printf('\n velocity head = %.1f ft of water ',hv)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.5: Example_5.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//Initialization of variables\n", +"dif=4 //in\n", +"gam=62.4 //lb per cu ft\n", +"gam2=0.08 //lb per cu ft\n", +"//calculations\n", +"pv=dif*1/12 *gam/144\n", +"hv=pv*144/gam2\n", +"//results\n", +"printf('velocity pressure = %.3f psi',pv)\n", +"printf('\n velocity head = %.1f ft of air ',hv)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.6: Example_6.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//Initialization of variables\n", +"hw=3/12 //ft\n", +"gam1=62.4 //lb/ft^3\n", +"gam2=0.07 //lb/ft^3\n", +"g=32.2 //ft/s^2\n", +"//calculations\n", +"p=hw*gam1\n", +"hg=p/gam2\n", +"V=sqrt(2*g*hg)\n", +"//results\n", +"printf('velocity of gas = %.1f fps',V)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.7: Example_7.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//Initialization of variables\n", +"h=4 //in\n", +"den=13.6 //g/cc\n", +"Ar=1/9\n", +"A1=12 //sq in\n", +"gam=62.4 //lb/ft^3\n", +"g=32.2 //ft/s^2\n", +"//calculations\n", +"dh=(h*den-h)/12\n", +"Vr=1/Ar\n", +"V22=2*g*dh/(1-Ar^2)\n", +"V2=sqrt(V22)\n", +"A2=A1*Ar\n", +"v2=1/gam\n", +"ms=A2*V2/(v2*144)\n", +"//results\n", +"printf('Flow rate of water = %.1f lb/sec',ms)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.8: Example_8.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//Initialization of variables\n", +"mdot=8000 //lb/min\n", +"A1=1 //sq ft\n", +"A2=3/4 //sq ft\n", +"P2=50 //psi\n", +"P1=10 //psi\n", +"gam=62.4 //lb/ft^3\n", +"y2=-2 //ft\n", +"y1=-4 //ft\n", +"g=32.2 //ft/s^2\n", +"eff=0.7\n", +"//calculations\n", +"v=1/gam\n", +"cap=mdot/8.33\n", +"V1=mdot*v/A1 /60\n", +"V2=mdot*v/A2 /60\n", +"ht= (y2-y1) + (V2^2 -V1^2)/(2*g) + (P2-P1)*144/gam\n", +"Hhp=mdot*ht/33000\n", +"Php=Hhp/eff\n", +"//results\n", +"printf('Capacity = %d gpm',cap)\n", +"printf('\n Total dynamic head = %.1f ft',ht)\n", +"printf('\n Hydraulic hp = %.1f hp',Hhp)\n", +"printf('\n pump hp = %.1f hp',Php)" + ] + } +, +{ + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9.9: Example_9.sce" + ] + }, + { +"cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], +"source": [ +"clc\n", +"clear\n", +"//Initialization of variables\n", +"z=12 //ft\n", +"gam1=62.4 //lb/ft^3\n", +"sg=0.8\n", +"P2=100 //psia\n", +"P1=-10 //psia\n", +"mm=10000 //lb/min\n", +"//calculations\n", +"gam2=sg*gam1\n", +"p2g=P2*144/(gam2) +z\n", +"p1g=P1*144*0.491/(gam2)\n", +"ht=p2g-p1g\n", +"Hhp=mm*ht/33000\n", +"//results\n", +"printf('Total dynamic head = %.1f ft of oil',ht)\n", +"printf('\n Hydraulic hp = %.1f hp',Hhp)" + ] + } +], +"metadata": { + "kernelspec": { + "display_name": "Scilab", + "language": "scilab", + "name": "scilab" + }, + "language_info": { + "file_extension": ".sce", + "help_links": [ + { + "text": "MetaKernel Magics", + "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" + } + ], + "mimetype": "text/x-octave", + "name": "scilab", + "version": "0.7.1" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} |