diff options
Diffstat (limited to 'Fluid_Mechanics_and_Hydraulic_Machines/ch1.ipynb')
-rwxr-xr-x | Fluid_Mechanics_and_Hydraulic_Machines/ch1.ipynb | 1199 |
1 files changed, 1199 insertions, 0 deletions
diff --git a/Fluid_Mechanics_and_Hydraulic_Machines/ch1.ipynb b/Fluid_Mechanics_and_Hydraulic_Machines/ch1.ipynb new file mode 100755 index 00000000..fb931903 --- /dev/null +++ b/Fluid_Mechanics_and_Hydraulic_Machines/ch1.ipynb @@ -0,0 +1,1199 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d25e06b98904a679939aa950e605d9ba5c3f70e4cec7b065f7a8a4ce885f3659" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1 : Fluid pressure and Its Measurement" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 Page No : 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "p = 343350. \t\t\t#pressure at any point in pa\n", + "w = 9810. \t\t\t #gravitational consmath.tant\n", + "s1 = 1.\n", + "s2 = 13.6\n", + "\n", + "# Calculations \n", + "h1 = (p/w)\n", + "h2 = h1*s1/s2\n", + "\n", + "# Results \n", + "print \"pressure in term of height of water(m)\",h1\n", + "print \"pressure in term of height of mercury(m)\",round(h2,7)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pressure in term of height of water(m) 35.0\n", + "pressure in term of height of mercury(m) 2.5735294\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No : 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "h1 = 0.75 \t\t\t#atm pressure in term of mercury\n", + "w = 9810.\n", + "w1 = 13.6*w \t\t\t#specific weight of mercury\n", + "w2 = 15000.\n", + "h2 = 3. \t\t\n", + "\n", + "# Calculations \n", + "Patm = w1*h1\n", + "p = w2*h2 \t\t\t# gauge pressure\n", + "Pabs = Patm+p\n", + "\n", + "# Results \n", + "print \"gauge pressure(N/m2)\",p\n", + "print \"absolute pressure(N/m2)\",Pabs\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "gauge pressure(N/m2) 45000.0\n", + "absolute pressure(N/m2) 145062.0\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No : 10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "h1 = 2.5\n", + "h2 = 1.5\n", + "s1 = 1\n", + "s2 = 0.8\n", + "w = 9810\n", + "\n", + "# Calculations \n", + "p2 = s2*w*h2 \t\t\t#Pressure intensity at interface\n", + "p1 = s1*w*h1\n", + "p = p1+p2\n", + "\n", + "# Results \n", + "print \"pressure intensity at interface(N/m2)\",p2\n", + "print \"pressure intensity at bottom(N/m2)\",p\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pressure intensity at interface(N/m2) 11772.0\n", + "pressure intensity at bottom(N/m2) 36297.0\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No : 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "p = 71613. \t\t\t#gauge pressure\n", + "w = 9810\n", + "\n", + "# Calculations \n", + "phead = p/w\n", + "patm = 10.33\n", + "pabs = patm+phead\n", + "\n", + "# Results \n", + "print \"absolute pressure in term of water height in meters\",pabs\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "absolute pressure in term of water height in meters 17.63\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No : 11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "h1 = 0.05\n", + "h2 = 0.1\n", + "s1 = 0.8\n", + "s2 = 13.6\n", + "w = 9810\n", + "\n", + "# Calculations \n", + "p = s2*h2*w \t\t\t#pressure at balance line \n", + "p1 = s1*h1*w \n", + "pf = p-p1\n", + "\n", + "# Results \n", + "print \"pressure in pipe(N/m2)\",pf\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pressure in pipe(N/m2) 12949.2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6 Page No : 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "h1 = 0.2\n", + "h2 = 0.5\n", + "s1 = 0.9\n", + "s2 = 13.6\n", + "\n", + "# Calculations \n", + "h = -(h1*s1+h2*s2)\n", + "w = 9810\n", + "p = h*w\n", + "\n", + "# Results \n", + "print \"vacuum pressure (N/m2)\",p\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "vacuum pressure (N/m2) -68473.8\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7 Page No : 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "s1 = 0.8\n", + "s2 = 13.6\n", + "dh = 0.4\n", + "\n", + "# Calculations \n", + "h = dh*13.6-dh*0.8\n", + "w = 9810\n", + "pd = w*h\n", + "\n", + "# Results \n", + "print \"pressure difference in height of water()\",h\n", + "print \"presuure difference in N/m2\",pd\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pressure difference in height of water() 5.12\n", + "presuure difference in N/m2 50227.2\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.8 Page No : 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "s1 = 0.8\n", + "s2 = 0.7\n", + "h1 = 1.5\n", + "h2 = 0.3\n", + "h3 = 0.7\n", + "s3 = 13.6\n", + "\n", + "# Calculations \n", + "hd = h2*s2+h3*s3-h1*s1\n", + "w = 9810\n", + "pd = hd*w\n", + "\n", + "# Results \n", + "print \"diffrence in pressure in term of height of water(m)\",hd\n", + "print \"difference in pressure (N/m2)\",pd\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "diffrence in pressure in term of height of water(m) 8.53\n", + "difference in pressure (N/m2) 83679.3\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 Page No : 15" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "s1 = 1.6\n", + "s2 = 0.8\n", + "s3 = 13.6\n", + "p1 = 98100.\n", + "p2 = 176580.\n", + "w = 9810.\n", + "\n", + "# Calculations \n", + "h1 = p1/w\n", + "h2 = p2/w\n", + "h = (h2-h1+1.6*s2-4.1*s1)/(s3-s2)\n", + "\n", + "# Results \n", + "print \"difference in mercury level(cm)\",h*100\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "difference in mercury level(cm) 21.25\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 Page No : 16" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "s1 = 1.2\n", + "s2 = 1\n", + "s3 = 0.7\n", + "\n", + "# Calculations \n", + "h = (s1-s2)*0.3/(s2-s3)\n", + "\n", + "# Results \n", + "print \"difference in height(cm)\",h*100\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "difference in height(cm) 20.0\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 Page No : 17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "s1 = 0.8\n", + "s2 = 13.6\n", + "z = 0.02\n", + "w = 9810\n", + "h2 = 0.2\n", + "h1 = 0.1\n", + "\n", + "# Calculations \n", + "h = h2*s2-h1*s1+(z*h2*(s2-s1))\n", + "p = h*w\n", + "\n", + "# Results \n", + "print \"pressure of the oil in N/m2\",p\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pressure of the oil in N/m2 26400.672\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12 Page No : 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "l = 4\n", + "b = 2\n", + "h = 3\n", + "w = 9810\n", + "s = 0.8\n", + "\n", + "# Calculations \n", + "p1 = w*l*b*h*s\n", + "p2 = w*s*l*h*1.5\n", + "p3 = w*s*b*h*1.5\n", + "\n", + "# Results \n", + "print \"total pressure on horizontal base\",p1\n", + "print \"total pressure on larger vertical base\",p2\n", + "print \"total pressure on smaller vertical walls\",p3\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total pressure on horizontal base 188352.0\n", + "total pressure on larger vertical base 141264.0\n", + "total pressure on smaller vertical walls 70632.0\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13 Page No : 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "p = 490500.\n", + "w = 9810.\n", + "\n", + "# Calculations \n", + "h = p/w\n", + "D = 0.15\n", + "A = math.pi*D*D*0.25\n", + "pt = w*A*h\n", + "h1 = (D*D)/(16*h)\n", + "\n", + "# Results \n", + "print \"total hydrostatic pressure in N\",round(pt,2)\n", + "print \"position of centre of pressure below the centre of pipe : %f\"%h1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total hydrostatic pressure in N 8667.85\n", + "position of centre of pressure below the centre of pipe : 0.000028\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14 Page No : 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "w = 9810.\n", + "h = 4.\n", + "d = 2.\n", + "\n", + "# Calculations \n", + "a = d*d*0.25*math.pi\n", + "p = w*a*h\n", + "h1 = d*d/64\n", + "T = p*(h1) \n", + "\n", + "# Results \n", + "print \"torque required to keep the disc in vertical position in N.m %.4f\"%T\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "torque required to keep the disc in vertical position in N.m 7704.7560\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15 Page No : 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "w = 9810.\n", + "h = 2.\n", + "l = 2.\n", + "b = 1.\n", + "\n", + "# Calculations \n", + "a = l*b\n", + "p = w*a*h\n", + "h1 = h+(b*l*l*l/(12*b*l*l))\n", + "\n", + "# Results \n", + "print \"total pressure\",p\n", + "print \"location of its centre of pressure\",round(h1,4)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total pressure 39240.0\n", + "location of its centre of pressure 2.1667\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16 Page No : 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "h1 = 8\n", + "w = 9810\n", + "wd = 6\n", + "\n", + "# Calculations \n", + "p1 = 0.5*w*h1*h1*wd\n", + "h2 = 4\n", + "p2 = 0.5*h2*w*h2*wd\n", + "h11 = 0.66666*h1\n", + "h22 = 0.6666*h2\n", + "p = p1-p2\n", + "hf = (p1*(h1-h11)-p2*(h2-h22))/p\n", + "\n", + "# Results \n", + "print \"resultant force\",p\n", + "print \"position of its line of action\",round(hf,5)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resultant force 1412640.0\n", + "position of its line of action 3.11109\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.17 Page No : 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "z = 9810\n", + "w = 10\n", + "h = 2\n", + "\n", + "# Calculations \n", + "p = 0.5*h*h*w*z\n", + "h1 = h*0.6666\n", + "\n", + "# Results \n", + "print \"total hydrostatic thrust\",p\n", + "print \"its point of application\",h1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total hydrostatic thrust 196200.0\n", + "its point of application 1.3332\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.18 Page No : 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "a1 = 1.4*2.2*1.4\n", + "x1 = 1.6+0.7\n", + "x11 = (1.4*1.4/(12*2.3))+x1\n", + "x2 = 0.7\n", + "x22 = (1.4*1.4/(12*0.7))+x2\n", + "z = 9810\n", + "\n", + "# Calculations \n", + "p1 = z*a1*x1\n", + "p2 = z*a1*x2/1.4\n", + "p = p1-p2\n", + "h = (p1*(3-x11)+p2*(1.4-x22))/p\n", + "f = (p1*(3-x11)-p2*(1.4-x22))/1.4\n", + "\n", + "# Results \n", + "print \"resultant force\",p\n", + "print \"force acting horizontally on the top of the gate\",f\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resultant force 76141.296\n", + "force acting horizontally on the top of the gate 36660.624\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.19 Page No : 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "s = 1.5\n", + "s1 = 0.9\n", + "w = 9810\n", + "h1 = 0.9\n", + "h2 = 0.6\n", + "\n", + "# Calculations \n", + "p1 = 0.5*w*s*s1*h1*h1 \t\t\t#total pressure due to oil\n", + "p2 = w*h1*h2*s*s1 \t\t\t# total pressure due to oil above water\n", + "p3 = w*h2*h2*0.5*s \t\t\t#total pressure due to water\n", + "p = p1+p2+p3\n", + "h = ((p1*0.6666*h1)+(p2*(h1+0.5*h2))+(p3*(0.6666*h2+h1)))/p\n", + "\n", + "# Results \n", + "print \"resultant pressure on the wall in N/m2\",p\n", + "print \"position of centre of pressure from free surface\",round(h,5)\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resultant pressure on the wall in N/m2 15163.8075\n", + "position of centre of pressure from free surface 1.00521\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.20 Page No : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Variables\n", + "d = 2.4\n", + "h = 1.6\n", + "s = 1.2\n", + "\n", + "# Calculations \n", + "a = d*s\n", + "w = 9810\n", + "p = w*a*h*s\n", + "h1 = ((2*s*s*s*d)/(12*a*h))+h\n", + "\n", + "# Results \n", + "print \"total pressure in N\",p\n", + "print \"its point of application\",h1\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total pressure in N 54245.376\n", + "its point of application 1.75\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.21 Page No : 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "x = 30.\n", + "d = 1.2\n", + "h = 1.5\n", + "w = 9810.\n", + "\n", + "# Calculations \n", + "z = math.sin(x*math.pi/180)\n", + "h1 = (z*d*0.5)+h\n", + "a = 0.25*math.pi*d*d\n", + "p = a*w*h1\n", + "h11 = (d*d*z*z)/(16*h1)+h1\n", + "\n", + "# Results \n", + "print \"total pressure\",round(p,3)\n", + "print \"position of centre of pressure\",round(h11,4)\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total pressure 19970.728\n", + "position of centre of pressure 1.8125\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.22 Page No : 27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "d = 2\n", + "z = 0.5\n", + "\n", + "# Calculations \n", + "h = z+0.5*d\n", + "w = 9810\n", + "a = math.pi*d*d*0.25\n", + "p = a*w*h\n", + "h11 = (1/(16*1.5))+1.5\n", + "\n", + "# Results \n", + "print \"total pressure on the plate %.3f N\"%p\n", + "print \"position of centre of pressure\",round(h11,5)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total pressure on the plate 46228.536 N\n", + "position of centre of pressure 1.54167\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.23 Page No : 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "x = 30.\n", + "z = math.sin(x*math.pi/180)\n", + "h = 6-(z*0.5)\n", + "l = 1.\n", + "b = 4.\n", + "a = l*b\n", + "w = 9810.\n", + "\n", + "# Calculations \n", + "p = w*a*h\n", + "h11 = (z*z)/(12*h)+h\n", + "f = p*0.5072\n", + "\n", + "# Results \n", + "print \"force normal to the gate at point B\",round(f,2),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "force normal to the gate at point B 114439.54 N\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.24 Page No : 29" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "x = 30.\n", + "z = math.sin(math.pi*x/180)\n", + "d = 1.4\n", + "h = 3.\n", + "b = 1.5\n", + "\n", + "# Calculations \n", + "h1 = z+d\n", + "a = 0.5*h*b\n", + "w = 9810\n", + "p = w*a*h1\n", + "h11 = ((z*z*h*h*h*b)/(36*a*h1))+h1\n", + "\n", + "# Results \n", + "print \"total pressure on the plate\",round(p,2),\"N\"\n", + "print \"position of centre of pressure\",round(h11,4),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "total pressure on the plate 41937.75 N\n", + "position of centre of pressure 1.9658 m\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.25 Page No : 30" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "d = 1.8\n", + "h = 2.4\n", + "w = 9810\n", + "s = 0.8\n", + "\n", + "# Calculations \n", + "p1 = w*d*d*h*0.25*math.pi\n", + "h1 = ((d*d)/(16*h))+h\n", + "p = w*(s*1.5+2.4)\n", + "p2 = p*math.pi*d*d*0.25\n", + "p = p2-p1\n", + "ab = w*(s*1.5+1.5)\n", + "de = w*(s*1.5+3.3)\n", + "ce = de-ab\n", + "x = ((0.5*ce*d*0.3)/(0.5*(ab+de)*d))\n", + "h2 = x+h\n", + "h12 = h1-h2\n", + "\n", + "# Results \n", + "print \"change in total pressure\",round(p,3)\n", + "print \"position of centre of pressure\",h2\n", + "print \"change in position of centre of pressure\",round(h12,6),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "change in total pressure 29956.091\n", + "position of centre of pressure 2.475\n", + "change in position of centre of pressure 0.009375 m\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.26 Page No : 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "\n", + "# Variables\n", + "l = 5.\n", + "r = 3.\n", + "a = l*r\n", + "h = r*0.5\n", + "w = 9810.\n", + "\n", + "# Calculations \n", + "ph = w*a*h\n", + "pv = w*0.25*math.pi*r*r*l\n", + "p = math.sqrt((ph*ph)+(pv*pv))\n", + "z = ph/pv\n", + "theta = math.degrees(math.atan(z))\n", + "\n", + "# Results \n", + "print \"resultant pressure on the gate\",round(p,2),\"N\"\n", + "print \"angle of resultant force with vertical\",round(theta,7)\n", + "\n", + "# note : rounding off error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "resultant pressure on the gate 411011.12 N\n", + "angle of resultant force with vertical 32.4816366\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.27 Page No : 32" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "# Variables\n", + "s = 5.\n", + "z = math.sin(math.radians(45.))\n", + "a = 2*s*z\n", + "h = s*z\n", + "w = 9810.\n", + "\n", + "# Calculations \n", + "ph = w*a*h\n", + "pv = w*((0.25*s*s*math.pi)-(0.5*a*h))\n", + "\n", + "# Results \n", + "print \"horizontal pressure\",ph,\"N\"\n", + "print \"vertical pressure\",round(pv,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "horizontal pressure 245250.0 N\n", + "vertical pressure 69993.9 N\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |