{ "metadata": { "name": "", "signature": "sha256:ef26cf09debc2accb827957d575ac9576db35c1e13d184b4161dad1098add2f0" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 2 : Fluid statics" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.1 page no : 40\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# variables\n", "g=32.2; #ft/s^2\n", "rho_water=62.3; #lbm/ft^3\n", "\n", "# calculation\n", "#specific weoight=(density)*(acceleration due to gravity)\n", "specific_wt=rho_water*g; #lbm.ft/ft^3.s^2\n", "\n", "#1 lbf=32.2 lbm.ft/s^2\n", "specific_wt=specific_wt/32.2; #lbf/ft^3\n", "\n", "# result\n", "print \"Specific weight of water is\" ,specific_wt , \"lbf/ft^3\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Specific weight of water is 62.3 lbf/ft^3\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.2 page no : 40\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# variables\n", "d=304.9; #m\n", "rho_water=1024.; #Kg/m^3\n", "g=9.81; #m/s^2\n", "p_atm=101.3; #KPa\n", "\n", "# calculation\n", "#gauge pressure=(desity)*(acc. due to gravity)*(depth)\n", "p_depth=p_atm+rho_water*g*d/1000.0; #KPa\n", "\n", "# result\n", "print \"pressure at the depth is\" , (p_depth) , \"KPa\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "pressure at the depth is 3164.154656 KPa\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.3 page no : 41\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "rho_oil=55.; #lbm/ft^3\n", "g=32.2; #ft/s^2\n", "d=60.; #ft (depth of oil cylinder)\n", "\n", "# calculation and result\n", "gauge_pressure=rho_oil*g*d/32.2; #lbf/ft^2\n", "print \"Gauge pressure is\",\n", "print gauge_pressure,\n", "print \"lbf/ft^2\"\n", "\n", "#1 ft=12 in\n", "gauge_pressure=gauge_pressure/144.0; #lbf/in^2\n", "print \"Gauge pressure is\",\n", "print gauge_pressure,\n", "print \"lbf/in^2\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Gauge pressure is 3300.0 lbf/ft^2\n", "Gauge pressure is 22.9166666667 lbf/in^2\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.4 page no : 42\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# varirbles\n", "#calc of density of air at a certain height\n", "p_atm=14.7; #psia\n", "T=289.; #K\n", "\n", "#P2=P1*exp^(-(acc. due to gravity)*(mass of air)*(height)/(universal gas const.)/(temp.))\n", "g=9.81; #m/s^2\n", "R=8314; #N.m^2/Kmol/K\n", "\n", "#for height of 1000 ft=304.8m\n", "h=304.8; #m\n", "p_1000=14.7*math.exp(-g*29*h/R/289);\n", "print \"pressure at 1000ft is\",\n", "print p_1000,\n", "print \"psia\"\n", "\n", "#for height of 10000 ft=3048m\n", "h=3048.; #m\n", "p_10000=p_atm*math.exp(-g*29.*h/R/289.);\n", "print \"pressure at 10000ft is\",\n", "print p_10000,\n", "print \"psia\"\n", "\n", "#for height of 100000 ft=30480m\n", "h=30480.; #m\n", "p_100000=14.7*math.exp(-g*29.*h/R/289.);\n", "print \"pressure at 100000ft is\",\n", "print p_100000,\n", "print \"psia\"," ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "pressure at 1000ft is 14.1789512072 psia\n", "pressure at 10000ft is 10.2467246829 psia\n", "pressure at 100000ft is 0.398102276652 psia\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.5 page no : 42\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# variables\n", "p_atm=14.7; #psia\n", "g=9.81; #m/s^2\n", "\n", "#P2=P1*[1-(acc. due to gravity)*(mass of air)*(height)/(univ. gas const.)/(temp.)]\n", "T=289.; #K\n", "R=8314. #N.m^2/Kmol/K\n", "\n", "\n", "# calculation and result\n", "#for height of 1000ft=304.8m\n", "h=304.8 #m\n", "p_1000=p_atm*(1-g*29*h/R/T)\n", "print \"pressure at 1000ft is\",\n", "print p_1000,\n", "print \"psia\"\n", "\n", "#for height of 10000ft=3048m\n", "h=3048. #m\n", "p_10000=p_atm*(1-g*29*h/R/T)\n", "print \"pressure at 10000ft is\",\n", "print p_10000,\n", "print \"psia\"\n", "\n", "#for height of 100000ft=30480m\n", "h=30480. #m\n", "p_100000=p_atm*(1-g*29*h/R/T)\n", "print \"pressure at 100000ft is\",\n", "print p_100000,\n", "print \"psia\"\n", "\n", "#NOTE that the pressure comes out to be negative at 100000ft justifying that density of air changes with altitude" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "pressure at 1000ft is 14.1694926079 psia\n", "pressure at 10000ft is 9.39492607874 psia\n", "pressure at 100000ft is -38.3507392126 psia\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.6 page no : 45\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# variables\n", "#calc atm pressure on a storage tank roof\n", "p_atm=14.7; #psia\n", "\n", "#diameter of roof is 120ft\n", "d_roof=120.; #ft\n", "\n", "# calculation\n", "#force=(pressure)*(area)\n", "f_roof=p_atm*(math.pi)*d_roof**2/4.*144; #lbf ;144 because 1ft=12inch\n", "\n", "# result\n", "print \"Force exerted by atmosphere on the roof is\",\n", "print f_roof,\n", "print \"lbf\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Force exerted by atmosphere on the roof is 23940443.9848 lbf\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.7 page no : 45\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# variables\n", "#calc atm pressure on a storage tank roof\n", "p_atm=14.7; #psia\n", "\n", "#diameter of roof is 120ft\n", "d_roof=120.; #ft\n", "#force=(atm. pressure + gauge pressure)*(area)\n", "#gauge pressure=(desity)*(acc. due to gravity)*(depth)\n", "rho_water=62.3 #lbm/ft^3\n", "g=32.2; #ft/s^2\n", "\n", "# calculation\n", "#depth of water on roof=8 inch=o.667 ft\n", "h=0.667; #ft\n", "gauge_pressure=rho_water*g*h/32.2*(math.pi)*d_roof**2/4.; #lbf\n", "\n", "# result\n", "print gauge_pressure" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "469965.799032\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.8 page no : 46\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "#lock gate has water on one side and air on the other at atm. pressure\n", "w=20.; #m (width of the lock gate)\n", "h=10.; #m (height of the lock gate)\n", "p_atm=1.; #atm\n", "rho_water=1000.; #Kg/m^3\n", "g=9.81 #m/s^2\n", "\n", "# calculation\n", "#for a small strip of dx height at the depth of x on the lock gate\n", "#net pressure on strip = (p_atm+(rho_water)*g*x) - p_atm\n", "#thus, net pressure on strip = (rho_water)*g*x\n", "#force on strip = (rho_water*g*x)*w.dx = (rho_water)*g*w*(x.dx)\n", "#force on lock gate = integration of force on strip fromm h=0 to h=10\n", "#integration(x.dx) = x^2/2\n", "#for h=0 to h=10; integration (x.dx) = h^2/2\n", "force_lockgate=(rho_water)*g*w*h**2/2;\n", "\n", "# result\n", "print \"The net force on the lock gate is\",force_lockgate/10**6,\"MN\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The net force on the lock gate is 9.81 MN\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "example 2.9 page no : 49\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "sigma_tensile=20000. #lbf/in^2 (tensile stress is normally 1/4 rupture stress)\n", "\n", "#max pressure is observed at the bottom of the storage\n", "p_max=22.9; #lbf/in^2\n", "\n", "#diameter of storaeg tank = 120ft =1440in\n", "d=1440.; #in\n", "\n", "# calculation\n", "t=(p_max)*d/sigma_tensile/2; #in\n", "\n", "# result\n", "print \"Thichness of the storage tank is\",\n", "print t,\n", "print \"in\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Thichness of the storage tank is 0.8244 in\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.10 page no : 50\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "p_working=250.0; #lbf/in^2\n", "\n", "#diameter of the cylinder = 10ft = 120in\n", "d=120.0; #in\n", "sigma_tensile=20000.; #lbf/in^2\n", "\n", "# calculation\n", "t=p_working*d/sigma_tensile/2; #in\n", "\n", "# result\n", "print \"Thichness of the storage tank is\",\n", "print t,\n", "print \"in\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Thichness of the storage tank is 0.75 in\n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.11 page no : 53\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# variables\n", "p_atm=1.; #atm\n", "T=293.; #K\n", "d=3.; #m (diameter of the balloon)\n", "\n", "# calculation\n", "#buoyant force=(density of air)*g*(volume of balloon)\n", "#weight of balloon = (density of helium)*g*(volume of balloon)\n", "#density for gases = PM/RT\n", "#payload of balloon = buoyant force - weight\n", "V_balloon=(math.pi)*d**3/6.; #m^3\n", "R=8.2*10**(-2); #m^3.atm/mol/K\n", "M_air=29.; #Kg/Kmol\n", "M_he=4.; #Kg/Kmol\n", "g=9.81; #m/s^2\n", "payload=(V_balloon)*g*p_atm*(M_air-M_he)/R/T; #N\n", "\n", "# result\n", "print \"Payload of the balloon is\",\n", "print payload,\n", "print \"N\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Payload of the balloon is 144.307841185 N\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.12 page no : 54\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "#calc fraction of block in water\n", "SG_wood=0.96; #Specific gravity\n", "SG_gasoline=0.72;\n", "\n", "# calculation\n", "#Let r be the ratio - V_water/V_wood\n", "r=(SG_wood-SG_gasoline)/(1-SG_gasoline);\n", "\n", "# result\n", "print \"Fraction of wood in water\",\n", "print r" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Fraction of wood in water 0.857142857143\n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.13 page no : 54\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# variables\n", "#height of water above pt.C = 2.5ft\n", "rho_water=62.3; #lbm/ft^3;\n", "h1=2.5; #ft\n", "rho_gas=0.1; #lbm/ft^3\n", "h2=0.5; #ft (height of gas)\n", "g=32.2; #ft/s^2\n", "\n", "# calculation\n", "gauge_pressure=((rho_water)*g*h1+(rho_gas)*g*h2)/144/32.2 #lbf/in^2\n", "\n", "# result\n", "print \"Gauge pressure is\",\n", "print gauge_pressure,\n", "print \"lbf/in^2\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Gauge pressure is 1.08194444444 lbf/in^2\n" ] } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.14 page no : 56\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "rho_water=62.3; #lbm/ft^3\n", "SG_oil=1.1;\n", "rho_oil=SG_oil*(rho_water);\n", "g=32.2; #ft/s^2\n", "h1_1=1.; #ft\n", "h1_2=2.; #ft\n", "h2_1=2.; #ft\n", "h2_2=1.; #ft\n", "\n", "# calculation\n", "p_diff=((rho_water)*g*(h1_1-h1_2)+(rho_oil)*g*(h2_1-h2_2))/32.2/144.0; #lbf/in^2\n", "\n", "# result\n", "print \"The pressure difference is\",\n", "print p_diff,\n", "print \"lbf/in^2\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The pressure difference is 0.0432638888889 lbf/in^2\n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.15 page no : 57\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "k=10000.; #N/m (spring constant)\n", "x=0.025; #m (displacement in spring)\n", "A=0.01; #m^2 (area of piston)\n", "\n", "# calculation\n", "gauge_pressure=k*x/A/1000.; #KPa\n", "\n", "# result\n", "print \"The gauge pressure is\",\n", "print gauge_pressure,\n", "print \"KPa\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The gauge pressure is 25.0 KPa\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.16 page no : 60\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "# variables\n", "g=32.2; #ft/s^2\n", "h=20.; #ft (height of fireplace)\n", "rho_air=0.075; #lbm/ft^3\n", "T_air=293.0; #K (surrounding temperature)\n", "T_fluegas=422.0; #K\n", "\n", "# calculation\n", "p_diff=g*h*(rho_air)*(1-(T_air/T_fluegas))/32.2/144; #lbf/in^2\n", "\n", "# result\n", "print \"The pressure difference is\",\n", "print p_diff,\n", "print \"lbf/in^2\"," ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The pressure difference is 0.00318424170616 lbf/in^2\n" ] } ], "prompt_number": 16 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.17 page no : 64\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# variables\n", "rho_water=1000. #Kg/m^3\n", "g=9.81; #m/s^2\n", "h=5.; #m (depth of water)\n", "\n", "# calculation and result\n", "#for elevator not accelerated\n", "p_gauge=(rho_water)*g*h/1000.0; #KPa\n", "print \"THe gauge pressure is\",\n", "print p_gauge,\n", "print \"KPa\"\n", "\n", "#for elevator accelerated at 5m/s^2 in upward direction\n", "a=5.; #m/s^2\n", "p_gauge=(rho_water)*(g+a)*h/1000.0; #KPa\n", "print \"THe gauge pressure is\",\n", "print p_gauge,\n", "print \"KPa\"\n", "\n", "#for elevator accelerated at 5m/s^2 in downward direction\n", "a=5.; #m/s^2\n", "p_gauge=(rho_water)*(g-a)*h/1000.0; #KPa\n", "print \"THe gauge pressure is\",\n", "print p_gauge,\n", "print \"KPa\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "THe gauge pressure is 49.05 KPa\n", "THe gauge pressure is 74.05 KPa\n", "THe gauge pressure is 24.05 KPa\n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "example 2.18 page no : 65\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# variables\n", "#angle free surface makes with the horizontal in an accelerated body\n", "a=1.; #ft/s^2\n", "g=32.2; #ft/s^2\n", "\n", "# calculation\n", "theta=math.atan(a/g); #radians\n", "theta=theta*180./math.pi; #degrees\n", "\n", "# result\n", "print \"The angle made by free surface with the horizontal is\",\n", "print theta,\n", "print \"degrees\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The angle made by free surface with the horizontal is 1.77880031567 degrees\n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.19 page no : 66\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "# variables\n", "f=78/60.0; #rps\n", "r=0.15; #m\n", "g=9.81; #m/s^2\n", "\n", "# calculation\n", "#omega=2*(%pi)*f\n", "z=((2*(math.pi)*f)**2)*r**2/2/g; #m\n", "\n", "# result\n", "print \"The liquid in the cylinder rises to a height of\",\n", "print z,\n", "print \"m\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The liquid in the cylinder rises to a height of 0.0765120708158 m\n" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " example 2.20 page no : 67\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "\n", "# variables\n", "#Let difference between heights at bottom and top be d\n", "d=20.; #in\n", "r_a=14.; #in\n", "f=1000/60.; #rps\n", "g=32.2; #ft/s^2\n", "\n", "# calculation\n", "r_b=((r_a)**2-2*(d)*g*12/(2*(math.pi)*f)**2)**0.5; #in\n", "\n", "# result\n", "print \"The thickness of water strip at bottom of industrial centrifuge\",\n", "print r_b,\n", "print \"in\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The thickness of water strip at bottom of industrial centrifuge 13.9495728181 in\n" ] } ], "prompt_number": 20 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }