diff options
author | hardythe1 | 2015-06-03 15:27:17 +0530 |
---|---|---|
committer | hardythe1 | 2015-06-03 15:27:17 +0530 |
commit | df60071cf1d1c18822d34f943ab8f412a8946b69 (patch) | |
tree | ab059cf19bad4a1233a464ccf5d72cf8b3fb323c /Fluid_Mechanics-Fundamentals_&_Applications/Chapter03.ipynb | |
parent | fba055ce5aa0955e22bac2413c33493b10ae6532 (diff) | |
download | Python-Textbook-Companions-df60071cf1d1c18822d34f943ab8f412a8946b69.tar.gz Python-Textbook-Companions-df60071cf1d1c18822d34f943ab8f412a8946b69.tar.bz2 Python-Textbook-Companions-df60071cf1d1c18822d34f943ab8f412a8946b69.zip |
add books
Diffstat (limited to 'Fluid_Mechanics-Fundamentals_&_Applications/Chapter03.ipynb')
-rwxr-xr-x | Fluid_Mechanics-Fundamentals_&_Applications/Chapter03.ipynb | 611 |
1 files changed, 611 insertions, 0 deletions
diff --git a/Fluid_Mechanics-Fundamentals_&_Applications/Chapter03.ipynb b/Fluid_Mechanics-Fundamentals_&_Applications/Chapter03.ipynb new file mode 100755 index 00000000..452bb164 --- /dev/null +++ b/Fluid_Mechanics-Fundamentals_&_Applications/Chapter03.ipynb @@ -0,0 +1,611 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:25701a9cfe4b4cc9d1ac8cc6f44b8c627a0c35030270fb7b840fda02e1793c63" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 03:Pressure and Fluid Statics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-1, Page No:75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable Decleration\n", + "Pvac=40 #Vaccum Gauge Reading in kPa\n", + "Patm=100 #Atmospheric Pressure in kPa\n", + "\n", + "\n", + "#Calculations\n", + "Pabs=Patm-Pvac #Absolute Pressure reading in kPa\n", + "\n", + "\n", + "#Result\n", + "print\"The absolute Pressure is\",Pabs,\"kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute Pressure is 60 kPa\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-2, Page No:80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable Decleration\n", + "h=0.74 #Barmoetric Pressure in m\n", + "g=9.805 #Acceleration due to gravity in m/s^2\n", + "rho=13570 #Density of mercury in kg/m^3\n", + "c=1000 #Conversion factor in N/m^2\n", + "\n", + "\n", + "#Calculations\n", + "Patm=(rho*g*h)/c #Atmospheric Pressure in kPa\n", + "\n", + "\n", + "#Result\n", + "print\"The Atmospheric Pressure is\",round(Patm,1),\"kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Atmospheric Pressure is 98.5 kPa\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-3, Page No:80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable Decleration\n", + "h_arm_bottle=1.2 #Height of bottle above armlevel in m\n", + "rho=1020 #Density of IV fluid in kg/m^3\n", + "g=9.81 #Acceleration due to gravity in m/s^2\n", + "P_gauge=20 #Gauge pressure in part b calculations in kPa\n", + "c=1000 #Conversion factor in kg.m/s^2\n", + "\n", + "\n", + "#Calculations\n", + "\n", + "#Part(a)\n", + "Pgaugearm=rho*g*h_arm_bottle/c #Gauge Pressure in kPa\n", + "\n", + "#Part(b)\n", + "h_arm_bottle=(P_gauge*c)/(rho*g) # Height of the surface of the IV Fluid in m\n", + "\n", + "#Result\n", + "print\"The gaguge pressure at 1.2m is\",round(Pgaugearm),\"kPa\"\n", + "print\"The height of the surface of the IV Fluid at 20kPa is\",round(h_arm_bottle),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The gaguge pressure at 1.2m is 12.0 kPa\n", + "The height of the surface of the IV Fluid at 20kPa is 2.0 m\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-4, Page No:81" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable Decleration\n", + "H=4 #Thickness of gradient zone in m\n", + "rho_o=1040 #Density at the water surface in kg/m^3\n", + "s=4 #Depth in m\n", + "g=9.81 #Acceleration due to gravity in m/s^2\n", + "h1=0.8 #Surface zone thickness in m\n", + "c=1000 #Conversion Factor in kg.m/s^2\n", + "pi=3.14\n", + "\n", + "\n", + "#Calculations\n", + "P1=(rho_o*g*h1)/c # Gauge Pressure at bottom of surface zone in kPa\n", + "\n", + "\n", + "#After carrying out the integral\n", + "\n", + "\n", + "#The next three steps are for mere mathametical simplicity\n", + "theta=(pi*s)/(4*H) #Angle Conversion into degrees\n", + "x=round(tan(theta)) #Tangent calculation\n", + "y=arcsinh(x) #Sine Inverse Hyperbolic calculation\n", + "P2=P1+((y*rho_o*g*4*H)/(pi*c)) #Gauge Pressure at the bottom in kPa \n", + "\n", + "\n", + "\n", + "#Result\n", + "print\"The gauge pressure at the bottom is\",round(P2),\"kPa\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The gauge pressure at the bottom is 54.0 kPa\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-5, Page No:83" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable Decleration\n", + "SG=0.85 #Specific Gravity of the Fluid \n", + "h=0.55 #Manometer column height in m\n", + "rho_H2O=1000 #Density of water in kg/m^3\n", + "Patm=96 #Local Atmospheric Pressure in kPa\n", + "g=9.81 #Acceleration due to gravity in m/s^2\n", + "c=1000 #Conversion Factor in N/m^2\n", + "\n", + "\n", + "#Calculations\n", + "rho=rho_H2O*SG #Density of the fluid in kg/m^3\n", + "P=Patm+((rho*g*h)/c) #Absolute Pressure in the tank in kPa\n", + "\n", + "\n", + "\n", + "#Result\n", + "print\"The absolute pressure in the tank is\",round(P,1),\"kPa\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The absolute pressure in the tank is 100.6 kPa\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-6, Page No:84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable Decleration\n", + "H=1400 #Altitude of tank in m\n", + "Patm=85.6 #Atmospheric Pressure at H altitude in kPa\n", + "h1=0.1 #m\n", + "h2=0.2 #m\n", + "h3=0.35 #m\n", + "rho_water=1000 #Density of water in kg/m^3\n", + "rho_oil=850 #Density of oil in kg/m^3\n", + "rho_mercury=13600 #Density of mercury in kg/m^3\n", + "g=9.81 #Acceleration due to gravity in m/s^2\n", + "c=1000 #Conversion Factor in N/m^2\n", + "\n", + "\n", + "\n", + "#Calculations\n", + "\n", + "#For Simplicity we do the following\n", + "X=g*(rho_mercury*h3-rho_water*h1-rho_oil*h2)\n", + "P1=Patm+((X/c)) #Pressure at point 1 in kPa\n", + "\n", + "#Result\n", + "print\"The pressure at point1 is\",round(P1),\"kPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The pressure at point1 is 130.0 kPa\n" + ] + } + ], + "prompt_number": 53 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-8,Page No:92\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable Decleration\n", + "s=8 #Distance of top of the edge of the door in m\n", + "b=1.2 #Height of the door in m\n", + "w=1 #width of the door\n", + "rho=1000 #Density of water in kg/m^3\n", + "g=9.81 #Acceleration due to gravity in m/s^2\n", + "c=1000 #Conversion Factor in kg.m/s^2\n", + "\n", + "#Calculations\n", + "Pavg=(rho*g*(s+(b/2)))/c #Average Pressure in kN/m^2\n", + "\n", + "#Hydrostatic Force\n", + "Fr=Pavg*(b*w) #Hydrostatic Force in kN\n", + "yp=s+(b/2)+(b**2/(12*(s+(b/2)))) #Center of pressure in m\n", + "\n", + "#Result\n", + "print\"The Average Pressure is\",round(Pavg,1),\"kN/m^2\"\n", + "print\"The resultant Hydrostatic Force is\",round(Fr,1),\"kN\"\n", + "print\"The center of pressure is at\",round(yp,2),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Average Pressure is 84.4 kN/m^2\n", + "The resultant Hydrostatic Force is 101.2 kN\n", + "The center of pressure is at 8.61 m\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-9,Page No:95\n" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable Decleration\n", + "R=0.8 #Radius in m\n", + "s=4.2 #m\n", + "g=9.81 #Acceleration due to gravity in m/s^2\n", + "rho=1000 #Density of water in kg/m^3\n", + "b=1 #m\n", + "h_bottom=5 #Depth in m\n", + "c=1000 #Conversion Factor in kg m/s^2\n", + "\n", + "#Calculations\n", + "\n", + "#Part(a)\n", + "\n", + "#Horizontal Force \n", + "Fh=(rho*g*(s+(R/2))*(R*b))/c #Horizontal Force in kN\n", + "\n", + "#Verticla Force\n", + "Fy=(rho*g*h_bottom*R*b)/c #Vertical Force in kN\n", + "\n", + "#Weight of fluid block\n", + "W=(rho*g*(R**2-((pi*R**2)/4))*b)/c #Weight of fluid block in kN\n", + "Fv=Fy-W #Net upward Force in kN\n", + "Fr=(Fh**2+Fv**2)**0.5 #Resultant Force in kN\n", + "thet=arctan(Fv/Fh) #Theta in radians\n", + "theta=(180/pi)*thet #Thetain degrees\n", + "\n", + "#Part(b)\n", + "\n", + "#Weight of the cylinder per m length\n", + "Wcyl=Fr*sin(thet) #Weight of the cylinder in kN\n", + "\n", + "#Result\n", + "print\"The magnitude of hydrostatic force is\",round(Fr,1),\"kN\"\n", + "print\"The direction of the hydrostatic force is\",round(theta,1),\"degrees\"\n", + "print\"The weight of the cylinder per m length is\",round(Wcyl,1),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The magnitude of hydrostatic force is 52.3 kN\n", + "The direction of the hydrostatic force is 46.4 degrees\n", + "The weight of the cylinder per m length is 37.9 kN\n" + ] + } + ], + "prompt_number": 68 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-10,Page No:98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable Decleration\n", + "rho_w=1000 #Density of water in kg/m^3\n", + "h_sub=0.1 #m\n", + "R=0.005 #Radius in m\n", + "\n", + "#Calculations\n", + "\n", + "#Part(a) is theoretical hence not coded here\n", + "\n", + "#Part(b)\n", + "V=pi*R**2*h_sub #Volume in m^3\n", + "m=rho_w*V # Mass in kg\n", + "\n", + "#Result\n", + "print\"The mass is\",m,\"kg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The mass is 0.00785 kg\n" + ] + } + ], + "prompt_number": 70 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-11,Page No:99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable Decleration\n", + "rho_f=1025 #Density of sea-water in kg/m^3\n", + "rho_concrete=2300 #Density of concrete in kg/m^3\n", + "g=9.81 #Acceleration due to gravity in m/s^2\n", + "l=0.4 #length of block in m\n", + "b=0.4 #breadth of block in m\n", + "h=3 #height of block in m\n", + "c=1000 #Conversion factor in kg.m/s^2\n", + "\n", + "#Calculations\n", + "\n", + "#Part(a)\n", + "V=l*b*h #Volume in m^3\n", + "Ft_air=(rho_concrete*g*V)/c #Tension in the rope in kN\n", + "W=Ft_air #kN\n", + "\n", + "#Part(b)\n", + "Fb=(rho_f*g*V)/c #Force of Buoyancy in kN\n", + "\n", + "Ft_Water=W-Fb #Tension in the rope under water in kN\n", + "\n", + "#Result\n", + "print\"The tension in the string under water is\",round(Ft_Water),\"kN\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The tension in the string under water is 6.0 kN\n" + ] + } + ], + "prompt_number": 72 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-12, Page No:106" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable decleration\n", + "vo=0 #Initial Velocity in km/h\n", + "vf=90 #Final Velocity in km/h\n", + "t=10 #Acceleration time in s\n", + "h=0.8 #Height of the tank in m\n", + "b1=2 #Breadth of the tank in m\n", + "b2=0.6 #Width of the tank in m\n", + "g=9.81 #Acceleration due to gravity in m/s^2\n", + "c=3.6 #Conversion factor in km/h\n", + "az=0 #Acceleration in the z direction in m/s^2\n", + "d=100 #Conversion from m to cm\n", + "\n", + "#Calculations\n", + "ax=((vf-vo)/t)/c #Acceleration in x direction in m/s^2\n", + "thet=arctan(ax/(g+az)) #Theta in radians\n", + "\n", + "#CASE 1\n", + "delta_zs1=d*(b1/2)*tan(thet) #cm\n", + "\n", + "#CASE 2\n", + "delta_zs2=d*(b2/2)*tan(thet) #cm\n", + "\n", + "#Result\n", + "print\"Assuming the tipping is not a problem,The tank should be definitely be placed in such a\"\n", + "print\"way that the short side is parallel to the direction of motion\"\n", + "print\"As\",round(delta_zs2,1),\"cm <\",round(delta_zs1,1),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Assuming the tipping is not a problem,The tank should be definitely be placed in such a\n", + "way that the short side is parallel to the direction of motion\n", + "As 7.6 cm < 25.5 cm\n" + ] + } + ], + "prompt_number": 78 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.3-13,Page No:109" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "g=9.81 #Acceleration due to gravity in m/s^2\n", + "H=0.6 #Height of vertical cylinder container in m\n", + "ho=0.5 #Height of partially filled container in m\n", + "rho=850 #Density of liquid in kg/m^3\n", + "R=0.1 #Radius in m\n", + "c=60 #Conversion factor in s\n", + "\n", + "#Calculations\n", + "w=((4*g*(H-ho))/R**2)**0.5 #Max rotational Speer in rad/s\n", + "n_dot=(w/(2*pi))*c #RPM\n", + "\n", + "#Result\n", + "print\"The Rotational speed at which the liquid just starts to spill is\",round(n_dot),\"RPM\"\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Rotational speed at which the liquid just starts to spill is 189.0 RPM\n" + ] + } + ], + "prompt_number": 81 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |