{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 2 : Fluid statics" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.1 page no : 40" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Specific weight of water is 62.3 lbf/ft^3\n" ] } ], "source": [ "# calculate specific weight of water\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\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.2 page no : 40" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "pressure at the depth is 3164.154656 KPa\n" ] } ], "source": [ "#calc pressure at depth of 304.9m\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\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.3 page no : 41" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Gauge pressure is 3300.0 lbf/ft^2\n", "Gauge pressure is 22.9166666667 lbf/in^2\n" ] } ], "source": [ "#gauge pressure=(density)*(acc. due to gravity)*(depth)\n", "\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\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.4 page no : 42" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "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" ] } ], "source": [ "# Calculate the pressures\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\"," ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.5 page no : 42" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "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" ] } ], "source": [ "#calc pressuer at different heights considering on density change in air\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" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.6 page no : 45" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Force exerted by atmosphere on the roof is 23940443.9848 lbf\n" ] } ], "source": [ "# calculate the atmosphere\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\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.7 page no : 45" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "469965.799032\n" ] } ], "source": [ "# calculate net pressure.\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" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.8 page no : 46" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The net force on the lock gate is 9.81 MN\n" ] } ], "source": [ "#calc the total force on a lock gate\n", "\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\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.9 page no : 49" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Thichness of the storage tank is 0.8244 in\n" ] } ], "source": [ "#calc thickness of an oil storage\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\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.10 page no : 50" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Thichness of the storage tank is 0.75 in\n" ] } ], "source": [ "#calc thickness of a storage tank\n", "\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\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.11 page no : 53" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Payload of the balloon is 144.307841185 N\n" ] } ], "source": [ "#calc payload of a helium balloon\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\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.12 page no : 54" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Fraction of wood in water 0.857142857143\n" ] } ], "source": [ "#wooden block floating in two phase mix of water and gasoline\n", "\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" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.13 page no : 54" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Gauge pressure is 1.08194444444 lbf/in^2\n" ] } ], "source": [ "#calc gauge pressure of cylinder in a manometer\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\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.14 page no : 56" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The pressure difference is 0.0432638888889 lbf/in^2\n" ] } ], "source": [ "#calc pressure diff between two tanks in a two liquid manometer\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\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.15 page no : 57" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The gauge pressure is 25.0 KPa\n" ] } ], "source": [ "#calc pressure of gauge through a spring piston system\n", "\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\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.16 page no : 60" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The pressure difference is 0.00318424170616 lbf/in^2\n" ] } ], "source": [ "#calc pressure diff at the mouth of the fire place\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\"," ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.17 page no : 64" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "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" ] } ], "source": [ "# calculate the gauge pressure at the bottom of the tank.\n", "\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\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.18 page no : 65" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The angle made by free surface with the horizontal is 1.77880031567 degrees\n" ] } ], "source": [ "# calculate angle\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\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.19 page no : 66" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The liquid in the cylinder rises to a height of 0.0765120708158 m\n" ] } ], "source": [ "#calc the height to which liq in a cylinder rises when rotated\n", "\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\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### example 2.20 page no : 67" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The thickness of water strip at bottom of industrial centrifuge 13.9495728181 in\n" ] } ], "source": [ "#calc thickness of liquid strip at the bottom of the industrial centrifuge\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\"" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 0 }