diff options
Diffstat (limited to 'Fluid_Mechanics_/Chapter2.ipynb')
-rw-r--r-- | Fluid_Mechanics_/Chapter2.ipynb | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/Fluid_Mechanics_/Chapter2.ipynb b/Fluid_Mechanics_/Chapter2.ipynb index 24cd4f37..ffb67770 100644 --- a/Fluid_Mechanics_/Chapter2.ipynb +++ b/Fluid_Mechanics_/Chapter2.ipynb @@ -28,11 +28,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Force applied on the piston\n", "\n", "from math import *\n", "\n", - "# Given \n", "\n", "d = 10 # diameter of hydraulic press in meters\n", "\n", @@ -44,7 +42,6 @@ "\n", "Ar = math.pi*d**2/4 # Area of rram in m**2\n", "\n", - "# Solution \n", "\n", "p = W/Ar # pressure to be supplied by the oil in N/cm**2\n", "\n", @@ -78,15 +75,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Pressure in kN/m**2\n", "\n", - "# Given\n", "\n", "h = 1 # ocean depth below the surface in km\n", "\n", "gma = 10070 # Specific weight of sea water\n", "\n", - "# Solution\n", "\n", "P =gma*h # Pressure in kN/m**2\n", "\n", @@ -117,9 +111,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Pressure at the bottom of the tank\n", "\n", - "# Given\n", "\n", "p1 = 150*10**3 # Pressure at point 1 in kN/m**2\n", "\n", @@ -131,7 +123,6 @@ "\n", "h1 = 2.0 # height of oil 3 in tank\n", "\n", - "# Solution \n", "\n", "p2 = (p1 + Sg*h*g)\n", "\n", @@ -164,9 +155,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Height of the mountain\n", "\n", - "# Given\n", "from math import *\n", "\n", "from __future__ import division\n", @@ -185,7 +174,6 @@ "\n", "r = p/Po\n", "\n", - "# Solution\n", "\n", "y = -(R*T/(g*0.19))*(1 - (r)**((n-1)/n))\n", "\n", @@ -216,9 +204,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Pressure in the pipe\n", "\n", - "# Given\n", "\n", "h1 = 500 # height in mm\n", "\n", @@ -230,7 +216,6 @@ "\n", "w = 9810 # specific weight of water\n", "\n", - "# Solution\n", "\n", "ha = ((h2*S2)-(h1*S1))/1000\n", "\n", @@ -264,9 +249,7 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Force required to open the gate\n", "\n", - "# Given\n", "\n", "from __future__ import division\n", "\n", @@ -284,21 +267,16 @@ "\n", "y1= 5+0.5\n", "\n", - "# Solution\n", "\n", "F = w*round(A,3)*(y1) # the answer will come out to be different as they have used the value of Area as 0.78 \n", "\n", - "# depth of the COP\n", "\n", "h1 = y1 + (Ig*math.sin(theta)*math.sin(theta)/(A*y1))\n", "\n", - "# moment about hinge A\n", "\n", "F1 = (F*(h1 - 5))/d\n", "\n", "print \"Magnitude of the force required to open the gate = \",round(F1,0),\"N\" \n", - "#The area calculated in the book is 0.785 and that calculated from code is 0.78. \n", - "#This difference of 0.005 is causing the answer to change from the original\n" ], "language": "python", "metadata": {}, @@ -325,11 +303,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "# total force ; position of the center of pressure \n", "\n", "from math import *\n", "\n", - "# Given\n", "\n", "l =2 # length of the plate in m\n", "\n", @@ -341,7 +317,6 @@ "\n", "w = 9810 # specific weight of water\n", "\n", - "# Solution\n", "\n", "A = 1*2\n", "\n", @@ -383,11 +358,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Hydrostatic force and point of location \n", "\n", "from math import *\n", "\n", - "# Given\n", "\n", "d = 6 # diameter of the gate in ft\n", "\n", @@ -401,7 +374,6 @@ "\n", "F1 = p1*A\n", "\n", - "# Solution\n", "\n", "Tf = F+F1\n", "\n", @@ -415,7 +387,6 @@ "\n", "print \"point of location on the center plate = \",round(H,2),\"ft\"\n", "\n", - "# method 2\n", "\n", "Hf = p1/62.4 # equivalent fluid height\n", "\n", @@ -456,11 +427,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Horizontal and Vertical components\n", "\n", "import math\n", "\n", - "# Given\n", "\n", "R = 4 # radius of the gate in ft\n", "\n", @@ -474,7 +443,6 @@ "\n", "xv2 = 1.7 # distance in ft\n", "\n", - "# Solution \n", "\n", "Fh = R*y1*gma\n", "\n", @@ -523,13 +491,11 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Vertical and Horizontal components\n", "\n", "from math import *\n", "\n", "from __future__ import division\n", "\n", - "# Given\n", "\n", "p = 50 # pressure in psia\n", "\n", @@ -549,7 +515,6 @@ "\n", "xv2 = 1.7 # center of pressure2 for x direction force\n", "\n", - "# Solution\n", "\n", "Fh = gma*A*y1 # hiorizontal force\n", "\n", @@ -600,13 +565,11 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Depth to which water would rise\n", "\n", "from math import *\n", "\n", "from __future__ import division\n", "\n", - "# Given\n", "\n", "l = 3 # length in m\n", "\n", @@ -628,7 +591,6 @@ "\n", "gma = 9810 # specific density \n", "\n", - "# Solution\n", "\n", "Fb = Tw # since barge is floating\n", "\n", @@ -664,7 +626,6 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Level at which cylinder will float\n", "\n", "from math import *\n", "\n", @@ -672,11 +633,9 @@ "\n", "import numpy as np\n", "\n", - "# Given\n", "\n", "W = 0.4 * 9.81 # weight of the solid cylinder in N\n", "\n", - "# Solution\n", "\n", "A = np.array([(1,-0.96),(1,1)])\n", "\n", @@ -723,11 +682,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Weight of the pan and the magnitude of righting moment\n", "\n", "from math import *\n", "\n", - "# Given\n", "\n", "l =100 # length of the pan in cm\n", "\n", @@ -739,7 +696,6 @@ "\n", "gma = 9810 # sepcific weight\n", "\n", - "# Solution\n", "\n", "Fb = gma*(d*w*l/(2*l**3)) # weight on the pan\n", "\n", @@ -753,7 +709,6 @@ "\n", "x = ((X2-X1)*cos(theta*pi/180))\n", "\n", - "# momentum equation \n", "\n", "M = W*x\n", "\n", @@ -786,15 +741,12 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Metacentric height and rightning moment \n", "\n", "from math import *\n", "\n", "from __future__ import division\n", "\n", - "# Continued from example 2.15\n", "\n", - "# Given\n", "\n", "Io = 15*4**3/12 # moment of inertia in m**4\n", "\n", @@ -803,7 +755,6 @@ "Gb = ((3/2)-(2.71/2)) \n", "\n", "W = 1739.2 # weight of the barge from the previous example in kN\n", - "# Solution\n", "\n", "Mg = (Io/V)-Gb # metacentric height in m\n", "\n", @@ -840,13 +791,11 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Maximum pressure in the tank\n", "\n", "from math import *\n", "\n", "from __future__ import division\n", "\n", - "# Given\n", "\n", "l=6 # length of the tank\n", "\n", @@ -864,7 +813,6 @@ "\n", "po=0 # pressure at the origin\n", "\n", - "# Solution\n", "\n", "A = np.array([(1,-1),(1,1)])\n", "\n", @@ -876,7 +824,6 @@ "\n", "Y2 = x[1]\n", "\n", - "# AMximum pressure at the bottom of the tank\n", "\n", "P = po - W*(2.61*X/9.81) - W*(1+(1.5/9.81))*(-Y2)\n", "\n", @@ -907,13 +854,11 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Height of the paraboloid revolution; maxm=imum pressure and location ; pressure at the point 0.2 from the center\n", "\n", "from math import *\n", "\n", "from __future__ import division\n", "\n", - "# Given\n", "\n", "d = 1 # diamter of the jar in ft\n", "\n", @@ -925,7 +870,6 @@ "\n", "g = 32.2 # acceleration due to gravity in ft/s**2\n", "\n", - "# Solution\n", "\n", "w = 2*pi*N/60\n", "\n", |