summaryrefslogtreecommitdiff
path: root/Fluid_Mechanics_by_John_F._Douglas/Chapter_3.ipynb
diff options
context:
space:
mode:
authorkinitrupti2017-05-12 18:53:46 +0530
committerkinitrupti2017-05-12 18:53:46 +0530
commit6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d (patch)
tree22789c9dbe468dae6697dcd12d8e97de4bcf94a2 /Fluid_Mechanics_by_John_F._Douglas/Chapter_3.ipynb
parentd36fc3b8f88cc3108ffff6151e376b619b9abb01 (diff)
downloadPython-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.gz
Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.bz2
Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.zip
Removed duplicates
Diffstat (limited to 'Fluid_Mechanics_by_John_F._Douglas/Chapter_3.ipynb')
-rwxr-xr-xFluid_Mechanics_by_John_F._Douglas/Chapter_3.ipynb372
1 files changed, 372 insertions, 0 deletions
diff --git a/Fluid_Mechanics_by_John_F._Douglas/Chapter_3.ipynb b/Fluid_Mechanics_by_John_F._Douglas/Chapter_3.ipynb
new file mode 100755
index 00000000..68980a40
--- /dev/null
+++ b/Fluid_Mechanics_by_John_F._Douglas/Chapter_3.ipynb
@@ -0,0 +1,372 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:540962ba0b5999b583f0620c9dca124d46f25fe569649c6c842d96cfa42351a3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3: Static Forces on Surfaces. Buoyancy"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1, Page 65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ " #Initializing the variables\n",
+ "a = 2.7; #Upper edge\n",
+ "b = 1.2 ; #Lower edge\n",
+ "width = 1.5; #Width of trapezoidal plate\n",
+ "h = 1.1; #Height of water column above surface\n",
+ "rho = 1000;\n",
+ "g = 9.81 #Acceleration due to gravity\n",
+ "phi = 90 #Angle between wall and surface\n",
+ "\n",
+ " #Calculations\n",
+ "A = 0.5*(a+b)*width; #Area of Trapezoidal Plate\n",
+ "y = (2*(0.5*width*0.75)*0.5 + (1.2*width)*0.75)/A;\n",
+ "z = y+h; #Depth of center of pressure\n",
+ "R = rho*g*A*z #Resultant force\n",
+ "\n",
+ "I0 = 1.2*1.5**3/12 +1.2*1.5*1.85**2 + 1.5*1.5**3/36 + 1.5*0.75*1.6**2 #Second moment of area\n",
+ "D = (math.sin(math.degrees(phi)))**2*I0/(A*z); #depth of center of pressure\n",
+ "M = R*(1.8533-1.1); #Moment about hinge\n",
+ "print \"Moment about the hinge line (kN/m):\",round(M/1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Moment about the hinge line (kN/m): 38.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2, Page 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ " #Initializing the variables\n",
+ "w = 1.8; #Width of plate\n",
+ "h1 = 5; #Height of plate and water in upstream\n",
+ "h2 = 1.5; #Height of water in downstream\n",
+ "rho = 1000;\n",
+ "g = 9.81 ; #Acceleration due to gravity\n",
+ "\n",
+ " #Calculations\n",
+ "def waterForce(area,meanHeight):\n",
+ " F = rho * g * area * meanHeight;\n",
+ " return F\n",
+ "\n",
+ "P = waterForce(w*h1,h1/2)-waterForce(w*h2,h2/2);# Resultant force on gate \n",
+ "x = (waterForce(w*h1,h1/2)*(h1/3) - waterForce(w*h2,h2/2)*(h2/3))/P;# point of action of p from bottom\n",
+ "R = P/(2*math.sin(math.radians(20))); # Total Reaction force\n",
+ "Rt = 1.18*R/4.8; #Reaction on Top\n",
+ "Rb = R - Rt ; #Reaction at bottom\n",
+ "\n",
+ "print \"Reaction at top (kN):\",round(Rt/1000,1)\n",
+ "print \"Reaction at bottom (kN):\",round(Rb/1000,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reaction at top (kN): 72.2\n",
+ "Reaction at bottom (kN): 221.45\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3, Page 70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "\n",
+ " #Initializing the variables\n",
+ "D = 1.8; #Depth of tank\n",
+ "h = 1.2; #Depth of water\n",
+ "l = 3; #Length of wall of tank\n",
+ "p = 35000; #Air pressure\n",
+ "rho = 10**3; #Density of water\n",
+ "g = 9.81; #Acceleration due to gravity\n",
+ "\n",
+ "\n",
+ " #Calculations\n",
+ "Ra = p*D*l; #Force due to air\n",
+ "Rw = .5*(rho*g*h)*h*l; #Force due to water\n",
+ "R = Ra + Rw; # Resultant force\n",
+ "x = (Ra*0.9+Rw*0.4)/R; # Height of center of pressure from base\n",
+ "print \"Resultant force on the wall (kN) :\",round(R/1000,2)\n",
+ "print \"Height of the centre of pressure above the base (m) :\",round(x,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resultant force on the wall (kN) : 210.19\n",
+ "Height of the centre of pressure above the base (m) : 0.85\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4, Page 72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ " \n",
+ "\n",
+ " #Initializing the variables\n",
+ "R = 6; # Radius of arc\n",
+ "h = 2*R*math.sin(math.radians(30)); #Depth of water\n",
+ "rho = 10**3; #Density of water\n",
+ "g = 9.81; #Acceleration due to gravity\n",
+ "\n",
+ " #Calculations\n",
+ "Rh = (rho*g*h**2)/2; # Resultant horizontal force per unit length\n",
+ "Rv = rho*g*((60/360)*math.pi*R**2 -R*math.sin(math.radians(30))*R*math.cos(math.radians(30)));# Resultant vertical force per unit length\n",
+ "R = (Rh**2+Rv**2)**0.5; # Resultant force on gate\n",
+ "theta = 180/math.pi*math.atan(Rv/Rh); #Angle between resultant force and horizontal\n",
+ "\n",
+ "print \"Magnitute of resultant force (kN/m) :\",round(R/1000,2)\n",
+ "print \"Direction of resultant force to the horizontal(Degrees):\",round(theta,2)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnitute of resultant force (kN/m) : 179.45\n",
+ "Direction of resultant force to the horizontal(Degrees): 10.27\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5, Page 75"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ " #Initializing the variables\n",
+ "B = 6; # Width of pontoon\n",
+ "L = 12; #Length of pontoon\n",
+ "D = 1.5; #Draught of pontoon\n",
+ "Dmax = 2; #Maximum permissible draught\n",
+ "rhoW = 1000; #Density of fresh water\n",
+ "rhoS = 1025; #Density of sea water\n",
+ "g = 9.81; #Acceleration due to gravity\n",
+ "\n",
+ " #Calculations\n",
+ "def Weight(D):\n",
+ " W = rhoW*g*B*L*D;\n",
+ " return W\n",
+ "\n",
+ "W = Weight(D); # Weight of pontoon in fresh water = weight of water displaced\n",
+ "Ds = W/(rhoS*g*B*L); #Draught in sea water\n",
+ "L = Weight(Dmax) - Weight(D); # maximum load that can be supported\n",
+ "\n",
+ "print \"Weight of pontoon (kN) :\",round(W/1000,1)\n",
+ "print \"Draught in sea (m) :\",round(Ds,2)\n",
+ "print \"Load (kN) :\",round(L/1000,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Weight of pontoon (kN) : 1059.5\n",
+ "Draught in sea (m) : 1.46\n",
+ "Load (kN) : 353.16\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6, Page 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ "\n",
+ "\n",
+ " #Initializing the variables\n",
+ "D = 1.8; # Diameter of buoy\n",
+ "H = 1.2; #Height of buoy\n",
+ "W = 10*10**3; #Weight of buoy\n",
+ "L = 2*10**3; #Load\n",
+ "G = 0.45; # Center of gravity\n",
+ "rho = 1025; #Density of sea water\n",
+ "g = 9.81; #Acceleration due to gravity\n",
+ "\n",
+ " #Calculations\n",
+ "Z = 4*(W+L)/(rho*g*math.pi*D**2); # Depth of Immersion\n",
+ "BG = (math.pi*D**4/64)/(math.pi*D**2*Z/4);\n",
+ "Z = 0.5*Z +BG; # Position of combined center of gravity\n",
+ "Z1 = ((W+L)*Z-0.45*W)/L; #Maximum height of load above bottom\n",
+ "\n",
+ "print \"Maximum height of center of gravity above bottom (m) :\",round(Z1,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum height of center of gravity above bottom (m) : 1.748\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.7, Page 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "import math\n",
+ "\n",
+ " #Initializing the variables\n",
+ "l = 20; # Length of barage\n",
+ "b = 6; #Width of barage\n",
+ "r = 3; #Radius of circular top of barage\n",
+ "W = 200*10**3; #Weight of empty barage\n",
+ "d1 = 0.8; # Depth of water in 1st half\n",
+ "d2 = 1; # Depth of water in 2nd half\n",
+ "rho = 1000; #Density of water\n",
+ "R = 0.8; #Relative density of liquid\n",
+ "g = 9.81; #Acceleration due to gravity\n",
+ "ZG = 0.45; # Center of gravity of barage\n",
+ "\n",
+ " #Calculations\n",
+ "I00 = l*b**3/12 +math.pi*b**4/128;\n",
+ "ICC = l*(.5*b)**3/12;\n",
+ "L = d1*rho*g*l*b/2*(d1+d2); # Weight of liquid load\n",
+ "W = L + W; #Total weight\n",
+ "A = l*b +math.pi*r**2/2; # Area of plane of waterline\n",
+ "V = W/(rho*g); # Volume of vessel submerged\n",
+ "D = V/A ; #Depth submerged\n",
+ "ZB = .5*D; #Height of center of buoyancy\n",
+ "NM = ZB-ZG +(1/V)*(I00-R*2*ICC); # Effective metacentric height\n",
+ "P = R*rho*g*l*b/2*(d2-d1); #overturning moment \n",
+ "theta = math.atan(P*1.5/(W*NM))*180/math.pi; #Angle of roll\n",
+ "# converting into degrees and minutes\n",
+ "thetaD=round(theta-1)\n",
+ "thetaM=(theta-thetaD)*60/100\n",
+ "print \"Angle of roll is\",thetaD,\"degrees\",round(thetaM,2),\"minutes\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Angle of roll is 2.0 degrees 0.37 minutes\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file