From fffcc90da91b66ee607066d410b57f34024bd1de Mon Sep 17 00:00:00 2001 From: Jovina Dsouza Date: Mon, 7 Jul 2014 16:34:28 +0530 Subject: adding book --- Fluid_Mechanics/Chapter1.ipynb | 562 +++++++++++++ Fluid_Mechanics/Chapter10.ipynb | 426 ++++++++++ Fluid_Mechanics/Chapter11.ipynb | 312 +++++++ Fluid_Mechanics/Chapter12.ipynb | 342 ++++++++ Fluid_Mechanics/Chapter2.ipynb | 920 +++++++++++++++++++++ Fluid_Mechanics/Chapter3.ipynb | 503 +++++++++++ Fluid_Mechanics/Chapter4.ipynb | 529 ++++++++++++ Fluid_Mechanics/Chapter5.ipynb | 545 ++++++++++++ Fluid_Mechanics/Chapter6.ipynb | 128 +++ Fluid_Mechanics/Chapter7.ipynb | 367 ++++++++ Fluid_Mechanics/Chapter8.ipynb | 358 ++++++++ Fluid_Mechanics/Chapter9.ipynb | 799 ++++++++++++++++++ Fluid_Mechanics/README.txt | 10 + .../Screenshot_from_2014-04-24_10_11_42.png | Bin 0 -> 38369 bytes Fluid_Mechanics/screenshots/plot1.png | Bin 0 -> 27945 bytes Fluid_Mechanics/screenshots/plot2.png | Bin 0 -> 14805 bytes 16 files changed, 5801 insertions(+) create mode 100755 Fluid_Mechanics/Chapter1.ipynb create mode 100755 Fluid_Mechanics/Chapter10.ipynb create mode 100755 Fluid_Mechanics/Chapter11.ipynb create mode 100755 Fluid_Mechanics/Chapter12.ipynb create mode 100755 Fluid_Mechanics/Chapter2.ipynb create mode 100755 Fluid_Mechanics/Chapter3.ipynb create mode 100755 Fluid_Mechanics/Chapter4.ipynb create mode 100755 Fluid_Mechanics/Chapter5.ipynb create mode 100755 Fluid_Mechanics/Chapter6.ipynb create mode 100755 Fluid_Mechanics/Chapter7.ipynb create mode 100755 Fluid_Mechanics/Chapter8.ipynb create mode 100755 Fluid_Mechanics/Chapter9.ipynb create mode 100755 Fluid_Mechanics/README.txt create mode 100755 Fluid_Mechanics/screenshots/Screenshot_from_2014-04-24_10_11_42.png create mode 100755 Fluid_Mechanics/screenshots/plot1.png create mode 100755 Fluid_Mechanics/screenshots/plot2.png (limited to 'Fluid_Mechanics') diff --git a/Fluid_Mechanics/Chapter1.ipynb b/Fluid_Mechanics/Chapter1.ipynb new file mode 100755 index 00000000..2869f384 --- /dev/null +++ b/Fluid_Mechanics/Chapter1.ipynb @@ -0,0 +1,562 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:5a200234453d213b93dc5d138f72ecdaaca8b6177244c9440288df8fe014829f" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Chapter 1 : Fluid Properties" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.1 Page no 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "Mw = 29.0 # Molecular weight of air\n", + "\n", + "R = 8323/Mw # Universal gas constant\n", + "\n", + "T = 273 + 20 # temperature in K\n", + "\n", + "p = 50*144*47.88 # Pressure in N/m**2\n", + "\n", + "\n", + "rho = p/(R*T) # from the state law\n", + "\n", + "print \"Desnity of air at 20 deg C and 50 psia = \",round(rho,2),\"kg/m**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Desnity of air at 20 deg C and 50 psia = 4.1 kg/m**3" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.2 Page no 12" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "dP = 10**6 # Pressure drop in N/m**2\n", + "\n", + "V = 1 # Volume in m**3\n", + "\n", + "bta = 2.2*10**9 # Bulk modulus of elasticity in N/m**2\n", + "\n", + "\n", + "dV = -dP*V/bta # Change in volume in m**3\n", + "\n", + "v = -dV*100\n", + "\n", + "print \"Reduction in volume = \",round(v,3),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reduction in volume = 0.045 %\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.3 Page no 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "bta1 = 2.28*10**9 # Bulk modulus of elasticity at 20 deg C and 103.4 N/m**2\n", + "\n", + "bta2 = 2.94*10**9 # Bulk modulus of elasticity at 20 deg C and 1034 N/m**2\n", + "\n", + "p1 = 103.4 # Pressure in N/m**2\n", + "\n", + "p2 = 1034 # Pressure in N/m**2\n", + "\n", + "\n", + "bavg = (bta1+bta2)/2 # bulk modulus average in N/m**2\n", + "\n", + "dP = p2-p1 # pressure drop in N/m**2\n", + "\n", + "V = 10 # Volume in m**3\n", + "\n", + "dV = dP*V/bavg # Change in volume in m**3\n", + "\n", + "v = -dV\n", + "\n", + "print \"Volume reduction = \",round(v,8),\"m**3\"\n", + "\n", + "print \"Negative sign indicates the volume has reduced\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Volume reduction = -3.57e-06 m**3\n", + "Negative sign indicates the volume has reduced" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.4 Page no 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "patm = 14.6 # Atmospheric pressure in psia\n", + "\n", + "p1 = 100 # gauge pressure at point 1 in psia\n", + "\n", + "p2 = 102 # gauge pressure at point 2 in psia\n", + "\n", + "V = 1 # volume in m**3\n", + "\n", + "p = p1+patm # absolute pressure in psia\n", + "\n", + "b = p # for isothermal air\n", + "\n", + "p1 = p2+patm # absolute pressure in psia\n", + "\n", + "b1 = p1 # for isothermal air\n", + "\n", + "dP = p1 - p # change in pressure\n", + "\n", + "bavg = (b1+b)/2 # average bulk modulus of elasticity in N/m**2\n", + "\n", + "dV = dP*V/bavg\n", + "\n", + "v = -dV\n", + "\n", + "print \"An increase in pressure by 2 psia will result in a volume reduction of\",round(v,4),\"ft**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "An increase in pressure by 2 psia will result in a volume reduction of -0.0173 ft**3\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.5 Page no 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "k = 1.4 # gas constant\n", + "\n", + "R = 1716 # Universal gas constant in ft.lb/slug^oR\n", + "\n", + "T = 68+460 # temperature in *oR\n", + "\n", + "\n", + "c = sqrt(k*R*T)\n", + "\n", + "print \"Sonic velocity in air at 68 deg F = \",round(c,0),\"ft/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sonic velocity in air at 68 deg F = 1126.0 ft/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.6 Page no 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "d = 0.05 # diameter of cylinder 1 in m\n", + "\n", + "l = 0.2 # length of the cylinder in meters\n", + "\n", + "d1 = 0.052 # diameter of cylinder in m\n", + "\n", + "mu = 0.09 # Viscosity of oil in Ns/m**2\n", + "\n", + "U = 1 # velocity in m/s\n", + "\n", + "Y = (d1-d)/2 # clearance between the two cylinders in m\n", + "\n", + "A = pi*l*d # area in m**2\n", + "\n", + "\n", + "tau = mu*U/Y # Shear stress in N/m**2\n", + "\n", + "F = tau*A # Shear foce in N\n", + "\n", + "print \"Force required to move the piston by 1 m/s = \",round(F,2),\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force required to move the piston by 1 m/s = 2.83 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.7 Page no 20" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from sympy import *\n", + "\n", + "\n", + "mu = 1.005*10**-3 # Viscosity of water in Ns/m**2\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "Y = 0.01 # Distance between the walls\n", + "\n", + "Y1 = Y*100\n", + "\n", + "print \" (a) Distance between the walls = \",round(Y1,1),\"cm\"\n", + "\n", + "\n", + "\n", + "\n", + "y = Symbol('y')\n", + "\n", + "u = 10*(0.01*y-y**2)\n", + "\n", + "uprime = u.diff(y)\n", + "\n", + "y = 0\n", + "\n", + "U = uprime\n", + "\n", + "\n", + "U1 = 0.01 # from U\n", + "\n", + "tau = mu*10*U1 # shear stress in N/m**2\n", + "\n", + "print \" (b) Shear stress = \",round(tau,9),\"N/m**2\"\n", + "\n", + "\n", + "\n", + "tau1 = mu*10*(0.01-2*20*10**-6) # using the equation of U and y = 20*10**-6 calc shear stress in N/m**2\n", + "\n", + "print \" (c) Shear Stress at 20 um from the plate = \",round(tau1,9),\"N/m**2\"\n", + "\n", + "\n", + "\n", + "\n", + "y1 = 0.01/2 # shear stress location\n", + "\n", + "print \" (d) Location of maximum velocity = \",round(y1,3),\"m\"\n", + "\n", + "print \"Above calculation indicates that the zero shear stress and the maximum velocity occurs at the same location which is half way between the plate\",\"\\n\",\"This also is in conformity with the fact that , in a flowing fluid, the velocity is maximum where shear stress is zero\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (a) Distance between the walls = 1.0 cm\n", + " (b) Shear stress = 0.0001005 N/m**2\n", + " (c) Shear Stress at 20 um from the plate = 0.000100098 N/m**2\n", + " (d) Location of maximum velocity = 0.005 m\n", + "Above calculation indicates that the zero shear stress and the maximum velocity occurs at the same location which is half way between the plate \n", + "This also is in conformity with the fact that , in a flowing fluid, the velocity is maximum where shear stress is zero\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.8 Page 24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "d = 0.1 # diameter of shaft in m\n", + "\n", + "l = 0.2 # length of the shaft in m\n", + "\n", + "t = 0.00002 # thickness in m\n", + "\n", + "N = 30 # RPM of shaft\n", + "\n", + "U = pi*d*30/60 # velocity in m/s\n", + "\n", + "r1 = d/2\n", + "\n", + "r2 = r1 + t # radius of bearing in m\n", + "\n", + "mu = 0.44 # Viscosity of SAE-30 oil in Ns/m**2\n", + "\n", + "\n", + "\n", + "F = 2*pi*r1*l*mu*U/t\n", + "\n", + "T =F*r1\n", + "\n", + "print \" (a) For linear distribution of velocity , shaft torque = \",round(T,2),\"m.N\"\n", + "\n", + "\n", + "F1 = 2*pi*l*mu*U/log(r2/r1)\n", + "\n", + "\n", + "T1 =F1*r1\n", + "\n", + "print \" (b) For non-linear distribution of velocity , shaft torque = \",round(T1,2),\"m.N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (a) For linear distribution of velocity , shaft torque = 10.86 m.N\n", + " (b) For non-linear distribution of velocity , shaft torque = 10.86 m.N\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.9 Page 26" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import *\n", + "\n", + "mu = 0.44 # viscosity of the oil in Ns/m**2\n", + "\n", + "N = 300 # RPM of the shaft\n", + "\n", + "t = 0.00025 # thickness of the film oil in m\n", + "\n", + "r1 = 0.15 # radius in m\n", + "\n", + "r2 = 0.1 # radius in m\n", + "\n", + "T = pi**2*mu*N*(r1**4-r2**4)/(60*t)\n", + "\n", + "P = T*2*pi*N/60\n", + "\n", + "print \"Watts of energy lost in overcoming friction at 300 RPM = \",round(P,0),\"Watts\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Watts of energy lost in overcoming friction at 300 RPM = 1108.0 Watts\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.10 Page no 28" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "d = 0.01 # diameter in m\n", + "\n", + "sigma = 0.073 # surface tension in N/m\n", + "\n", + "\n", + "dP = 4*sigma/d # pressure excessive\n", + "\n", + "print \"Excessive pressure inside the droplet = \",round(dP,2),\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Excessive pressure inside the droplet = 29.2 N" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 1.11 Page no 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "sigma = 0.022 # surface tension in N/m\n", + "\n", + "gma = 9789 # specific weight\n", + "\n", + "S = 0.79 # specific gravity\n", + "\n", + "d = 0.002 # diameter in m\n", + "\n", + "\n", + "\n", + "h =4*sigma*1000/(gma*S*d) # capillary height in m\n", + "\n", + "print \"The alcohol will rise to a height of\",round(h,1),\"mm in the glass tube\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The alcohol will rise to a height of 5.7 mm in the glass tube" + ] + } + ], + "prompt_number": 50 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter10.ipynb b/Fluid_Mechanics/Chapter10.ipynb new file mode 100755 index 00000000..679a7dd2 --- /dev/null +++ b/Fluid_Mechanics/Chapter10.ipynb @@ -0,0 +1,426 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3b6a6304ae5564c5b042191e18c023d5d141ad8d64a979c29e54da09ebc8a32e" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Chapter 10 : Open Channel Flow\n", + " " + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.1 Page no 363" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "b = 3 # base of the channel\n", + "\n", + "z = 0.5 # slope of the channel\n", + "\n", + "y = 2 # depth of the channel\n", + "\n", + "\n", + "T = b + 2*z*y\n", + "\n", + "print \"Top width =\",round(T,0),\"m\"\n", + "\n", + "A = (b+z*y)*y\n", + "\n", + "print \"Area of flow =\",round(A,0),\"m**2\"\n", + "\n", + "P = b + 2*y*sqrt(1+z**2)\n", + "\n", + "print \"Wetted perimeter =\",round(P,3),\"m\"\n", + "\n", + "R = A/P\n", + "\n", + "print \"Hydraulic radius =\",round(R,2),\"m\"\n", + "\n", + "D = A/T\n", + "\n", + "print \"Hydraulic depth =\",round(D,2),\"m\"\n", + "\n", + "Z = A*sqrt(D)\n", + "\n", + "print \"Secton Factor =\",round(Z,2),\"m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Top width = 5.0 m\n", + "Area of flow = 8.0 m**2\n", + "Wetted perimeter = 7.472 m\n", + "Hydraulic radius = 1.07 m\n", + "Hydraulic depth = 1.6 m\n", + "Secton Factor = 10.12 m**2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.2 Page no 366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "z = 1.0 # slide slope\n", + "\n", + "b = 3.0 # base width\n", + "\n", + "y = 1.5 # depth\n", + "\n", + "S = 0.0009\n", + "\n", + "n = 0.012 # for concrete\n", + "\n", + "\n", + "A = (b+z*y)*y\n", + "\n", + "P = P = b + 2*y*sqrt(1+z**2)\n", + "\n", + "R = A/P\n", + "\n", + "\n", + "Q = A*(1/n)*(R**(2/3)*S**(1/2))\n", + "\n", + "print \"Discharge for the channel =\",round(Q,2),\"m**3/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge for the channel = 16.1 m**3/s\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.4 Page no 373" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "from math import *\n", + "\n", + "\n", + "z = 1\n", + "\n", + "Q = 10000/60 # discharge of water in ft**#/s\n", + "\n", + "\n", + "y = (Q/(1.828*2.25*sqrt(0.5)))**(2/5)\n", + "\n", + "print \"depth(y) =\",round(y,2),\"ft\"\n", + "\n", + "b = 0.828*y\n", + "\n", + "print \"base width(b) =\",round(b,2),\"ft\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "depth(y) = 5.05 ft\n", + "base width(b) = 4.18 ft\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.5 Page no 378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "y = 2.5 # depth\n", + "\n", + "V = 8 # velocity in m/s\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "\n", + "Yc = (20**2/g)**(1/3)\n", + "\n", + "print \"Critical depth =\",round(Yc,2),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Critical depth = 3.44 m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.6 Page no 380" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "Q = 15 # flow rate in m**3/s\n", + "\n", + "w = 4.0 # bottom width\n", + "\n", + "S = 0.0008 # bed slope\n", + "\n", + "n = 0.025 # manning constant\n", + "\n", + "z = 0.5 # slope\n", + "\n", + "\n", + "\n", + "y = 2.22 # we take the value of y as 2.2 m\n", + "\n", + "Q = ((4+0.5*y)*(y/(n))*(((4+0.5*y)*y)/(4+2.236*y))**(0.667)*(S)**(0.5))\n", + "\n", + "print \"a )Normal Depth =\",round(y,2),\"m\"\n", + "\n", + "A = (4+0.5*y)*y\n", + "\n", + "T = (w+2*z*y)\n", + "\n", + "D = A/T\n", + "\n", + "V = (Q/A)\n", + "\n", + "F =V/(sqrt(9.81*D)) \n", + "\n", + "print \"b )F = \",round(F,2),\" Since the Froude number is less than 1, the flow is subcritical\"\n", + "\n", + "\n", + "yc = 1.08\n", + "\n", + "Q1 = (4+z*yc)*yc*sqrt((9.81*(4+0.5*yc)*yc)/(4+2*z*yc)) \n", + "\n", + "print \"c )Critical depth is = \",round(yc,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a )Normal Depth = 2.22 m\n", + "b )F = 0.31 Since the Froude number is less than 1, the flow is subcritical\n", + "c )Critical depth is = 1.08 m\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "\n", + "Example 10.8 Page no 390" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "b = 60 # base width in ft\n", + "\n", + "y1 = 2.5 # base depth in ft\n", + "\n", + "Q = 2500 # discharge in ft**3/s\n", + "\n", + "g = 32.2\n", + "\n", + "\n", + "V1 = Q/(b*y1)\n", + "\n", + "F1 = V1/sqrt(g*y1)\n", + "\n", + "y2 = y1*0.5*(sqrt(1+8*F1**2)-1)\n", + "\n", + "V2 = Q/(b*y2)\n", + "\n", + "print \"Since F1 =\",round(F1,2),\" It is a weak jump\"\n", + "\n", + "L = y2*4.25\n", + "\n", + "print \"Length of the jump =\",round(L,0),\"ft\"\n", + "\n", + "E1 = y1+(V1**2/(2*g))\n", + "\n", + "E2 = y2+(V2**2/(2*g))\n", + "\n", + "El = E1-E2\n", + "\n", + "Te = El*62.4*Q/543\n", + "\n", + "print \"Total energy loss =\",round(Te,2),\"HP\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since F1 = 1.86 It is a weak jump\n", + "Length of the jump = 23.0 ft\n", + "Total energy loss = 133.7 HP\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 10.12 Page no 409" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "d = 6 # depth of the channel\n", + "\n", + "w= 12 # width of the channel\n", + "\n", + "h = 1.0 # height of the channel\n", + "\n", + "p = 9 # pressure drop in m\n", + "\n", + "g = 32.2\n", + "\n", + "\n", + "y2 = y1 - h - 0.75\n", + "\n", + "V1 = sqrt(2*g*0.75/((1.41)**2-1))\n", + "\n", + "Q = w*b*V1/10\n", + "\n", + "print \"Discharge =\",round(Q,0),\"cfs\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge = 503.0 cfs\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter11.ipynb b/Fluid_Mechanics/Chapter11.ipynb new file mode 100755 index 00000000..618f66c5 --- /dev/null +++ b/Fluid_Mechanics/Chapter11.ipynb @@ -0,0 +1,312 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:2f6bc3a0f00ca48f89200f1a14edc0c65849595040c83c5100245e53f0cc525b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Chapter : Compressible Flow" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.1 Page no 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "T1 = 273 + 15 # temperature in K\n", + "\n", + "T2 = 273 + 90 # temperature in K\n", + "\n", + "Cp = 0.24 # cp for air in kcal/kgK\n", + "\n", + "\n", + "dh = Cp*(T2-T1) # enthalpy per kg of air\n", + "\n", + "H = 10*dh # total enthallpy of 10 kg air\n", + "\n", + "print \"Total change in enthalpy for 10 kg air = \",round(H,0),\"kcal\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total change in enthalpy for 10 kg air = 180.0 kcal\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.2 Page no 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "T1 = 273 + 15 # temperature in K\n", + "\n", + "T2 = 273 + 90 # temperature in K\n", + "\n", + "P1 = 40 + 101.3 # pressure in abs\n", + "\n", + "P2 = 360 + 101.3 # presure in abs\n", + "\n", + "Cv = 0.171 # Specific volume Coefficient of air\n", + "\n", + "k = 1.4 # gas constant\n", + "\n", + "\n", + "dS = Cv*log((T2/T1)**k*(P2/P1)**(1-k))\n", + "\n", + "S = 10*dS\n", + "\n", + "print \"Total change in enthalpy of 10 Kg of air =\",round(S,3),\"kcal/K\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total change in enthalpy of 10 Kg of air = -0.255 kcal/K\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.3 Page no 421" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "P1 = 10 # pressure in psia\n", + "\n", + "P2 = 30 # pressure in psia\n", + "\n", + "T1 = 460+110 # temperature in R\n", + "\n", + "k =1.4 # gas constant\n", + "\n", + "T2 = T1*(P2/P1)**((k-1)/k)\n", + "\n", + "t2 = T2-460 # final temperature of air\n", + "\n", + "print \"Final temperature if air = \",round(t2,1),\"F\"\n", + "\n", + "Cv = 0.157 # coefficient of air \n", + "\n", + "W = Cv*(T2-T1) # work done per unit mass of oxygen\n", + "\n", + "Tw = 10*W # total work done on 10 slugs\n", + "\n", + "print \"Total work done on 10 slugs = \",round(Tw,0),\"Btu\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Final temperature if air = 320.2 F\n", + "Total work done on 10 slugs = 330.0 Btu\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.4 Page no 426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "\n", + "S =1 # specific gravity\n", + "\n", + "rho = S*1000 # density in kg/m**3\n", + "\n", + "bta = 2.2*10**9 # Bulk modulus of elasticity\n", + "\n", + "\n", + "S1 =0.79 # specific gravity\n", + "\n", + "rho2 = S1*1000 # density in kg/m**3\n", + "\n", + "bta2 = 1.21*10**9 # Bulk modulus of elasticity\n", + "\n", + "\n", + "k = 1.4 # gas constant for air\n", + "\n", + "R = 287 # universal gas constant\n", + "\n", + "T = 273+20 # temperature in K\n", + "\n", + "\n", + "C1 = sqrt(bta/rho)\n", + "\n", + "C2 = sqrt(bta2/rho2)\n", + "\n", + "print \"Speed of sound in water =\",round(C1,0),\"m/s\"\n", + "\n", + "print \"Speed of sound in ethly alcohol =\",round(C2,0),\"m/s\"\n", + "\n", + "C3 = sqrt(k*R*T)\n", + "\n", + "print \"Speed of sound in Air =\",round(C3,0),\"m/s\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed of sound in water = 1483.0 m/s\n", + "Speed of sound in ethly alcohol = 1238.0 m/s\n", + "Speed of sound in Air = 343.0 m/s\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 11.5 Page no 431" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "P1 = 1.5 # pressure in psia\n", + "\n", + "T1 = 40 + 460 # temperature in R\n", + "\n", + "k = 1.4 # gas constant\n", + "\n", + "R = 1716 # universal gas constant in ft.lb/slug R\n", + "\n", + "V1 = 1500 # velocity in ft/s\n", + "\n", + "\n", + "c1 = sqrt(k*R*T1)\n", + "\n", + "M1 = V1/c1\n", + "\n", + "M2 = sqrt((2+(k-1)*M1**2)/(2*k*M1**2-(k-1)))\n", + "print M2\n", + "\n", + "P2 = P1*((1+k*M1**2)/(1+k*M2**2))\n", + "\n", + "print \"Pressure at downstream = \",round(P2,2),\"psia\"\n", + "\n", + "T2 = T1*((1+0.5*(k-1)*M1**2)/(1+0.5*(k-1)*M2**2))\n", + "\n", + "t2 = T2-460\n", + "\n", + "print \"Temperature at downstream = \",round(t2,1),\"F\"\n", + "V2 = M2*sqrt(k*R*t2)\n", + "\n", + "print \"Velocity downstream = \",round(V2,2),\"ft/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.753305702898\n", + "Pressure at downstream = 3.03 psia\n", + "Temperature at downstream = 157.3 F\n", + "Velocity downstream = 463.02 ft/s\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter12.ipynb b/Fluid_Mechanics/Chapter12.ipynb new file mode 100755 index 00000000..29dbb6ff --- /dev/null +++ b/Fluid_Mechanics/Chapter12.ipynb @@ -0,0 +1,342 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b809e6889d9fdf33446744d4f1caf3aac2e77607182761aeef234f4a6cc34adc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Chapter : Turbomachines" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.1 Page no 443" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "Q = 0.25 # discharge from the pump in m**3/s\n", + "\n", + "gma= 0.8*9810 # specific weight in kg/m**3\n", + "\n", + "H=25 # elevation head in m\n", + "\n", + "T = 350 # Torque to drive the shaft in Nm\n", + "\n", + "N = 1800 # Speed in RPM\n", + "\n", + "w = 2*pi*N/60 # angular velocity\n", + "\n", + "\n", + "Eff = gma*Q*H*100/(T*w) # efficiency\n", + "\n", + "print \"Efficiency of th pump =\",round(Eff,0),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Efficiency of th pump = 74.0 %\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.2 Page no 447" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "d = 0.4 # diameter of the pump in m\n", + "\n", + "b = 0.03 # width in m\n", + "\n", + "theta = pi/3 # blade angle\n", + "\n", + "N = 1500 # speed in RPM\n", + "\n", + "Q = 0.4 # flow rate in m**3/s\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "\n", + "w = 2*pi*N/60 # anggular velocity in rad/s\n", + "\n", + "u2 = (d/2)*w # blade velocity in m/s\n", + "\n", + "V2r = Q/(2*pi*(d/2)*b) # relative velocity in m/s\n", + "\n", + "print \"(a)\"\n", + "\n", + "print \"Radial velocity at exit =\",round(V2r,1),\"m/s\"\n", + "\n", + "V2t = u2 - V2r*(cos(theta)/sin(theta))\n", + "\n", + "print \"Whirl velocity = \",round(V2t,1),\"m/s\"\n", + "\n", + "v2 = V2r/sin(theta)\n", + "\n", + "print \"Relative velocity = \",round(v2,2),\"m/s\"\n", + "\n", + "V2 = sqrt(V2t**2+V2r**2)\n", + "\n", + "print \"Actual velocity =\",round(V2,2),\"m/s\"\n", + "\n", + "print \"(b)\"\n", + "\n", + "H = u2*V2t/g\n", + "\n", + "print\"Head added for no inlet whirl =\",round(H,0),\"m\"\n", + "\n", + "print \"(c)\"\n", + "\n", + "P = g*Q*H\n", + "\n", + "print \"Power required =\",round(P,1),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (a)\n", + "Radial velocity at exit = 10.6 m/s\n", + "Whirl velocity = 25.3 m/s\n", + "Relative velocity = 12.25 m/s\n", + "Actual velocity = 27.43 m/s\n", + "(b)\n", + "Head added for no inlet whirl = 81.0 m\n", + "(c)\n", + "Power required = 317.8 kW\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.3 Page no 450" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "d = 0.36 # diameter of the impeller of pump\n", + "\n", + "N = 1500 # Speed of impeller in RPM\n", + "\n", + "\n", + "\n", + "Q1 = 82 # discharge in l/s\n", + "\n", + "H1 = 17.5 # Head in m\n", + "\n", + "Eta = 0.8 # efficiency \n", + "\n", + "Q2 = 100 # discharge in l/s\n", + "\n", + "H2 = 20 # head in m\n", + "\n", + "\n", + "D2 = 38.45\n", + "\n", + "print \"Impeller size =\",round(D2,2),\"cm\"\n", + "\n", + "N2 = 1500 \n", + "\n", + "print \"Speed of the pump =\",round(N2,0),\"RPM\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Impeller size = 38.45 cm\n", + "Speed of the pump = 1500.0 RPM\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.4 Page no 454 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "q = 500 # discharge in cgm\n", + "\n", + "Q = 500/449 # discharge in ft**3/s\n", + "\n", + "D = 0.667 # diameter in ft\n", + "\n", + "A = pi*D**2/4\n", + "\n", + "V = Q/A # velocity in ft/s\n", + "\n", + "g = 32.2 # acceleration due to gravity in ft/s**2\n", + "\n", + "N = 1800 # speed in RPM\n", + "\n", + "\n", + "\n", + "nu = 1.134*10**-5 # viscosity in ft**2/s\n", + "\n", + "e = 0.00085 # epssilon in ft\n", + "\n", + "r = 0.001275 \n", + "\n", + "R = V*D/nu # reynolds no\n", + "\n", + "f = 0.022 # from moody's diagram\n", + "\n", + "Hl = V**2*(12.1+(f*224.9))/64.4\n", + "\n", + "hs = 119.4 + Hl\n", + "\n", + "print \"Discharge, Q = \",round(Q,2),\"ft**3/s\"\n", + "print \"Dynamic head of the pump, H =\",round(hs,1),\"m\"\n", + "\n", + "Ns = N*sqrt(q)/(hs)**(3/4)\n", + "\n", + "print \"Specific speed of the pump, Ns =\",round(Ns,0),\"RPM\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge, Q = 1.11 ft**3/s\n", + "Dynamic head of the pump, H = 122.1 m\n", + "Specific speed of the pump, Ns = 1096.0 RPM\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.5 Page no 457" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "H = 60 # height in m\n", + "\n", + "Pb = 98*10**3 # barometric pressure in N/m**2\n", + "\n", + "Hl = 1 # head in m\n", + "\n", + "Pv = 1707 # vapour pressure \n", + "\n", + "sigma = 0.08\n", + "\n", + "w = 9810 # specific weight\n", + "\n", + "\n", + "Npsh_m = sigma*60 # minimum NPSH\n", + "\n", + "Hsm = (Pb/w)-(Pv/w)-Npsh_m-Hl\n", + "\n", + "print \"Minimum value of static suction lift = \",round(Hsm,2),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum value of static suction lift = 4.02 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter2.ipynb b/Fluid_Mechanics/Chapter2.ipynb new file mode 100755 index 00000000..ffb67770 --- /dev/null +++ b/Fluid_Mechanics/Chapter2.ipynb @@ -0,0 +1,920 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:db7a54602402420ebc03881b70578491b776f0322d83cb209fd1e5faed86cdad" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 2 : Fluid Statics" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 2.1 Page no 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "d = 10 # diameter of hydraulic press in meters\n", + "\n", + "d1 = 1 # diameter of piston in meters\n", + "\n", + "W = 1000 # weight in Newtons\n", + "\n", + "Ap = math.pi*d1**2/4 # Area of piston in m**2\n", + "\n", + "Ar = math.pi*d**2/4 # Area of rram in m**2\n", + "\n", + "\n", + "p = W/Ar # pressure to be supplied by the oil in N/cm**2\n", + "\n", + "F = p*Ap # Force applied on the piston\n", + "\n", + "print \"Using the pascal's law a weight of 1000N can be lifted by applying a force only of \",round(F,1),\"N\"\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Using the pascal's law a weight of 1000N can be lifted by applying a force only of 10.0 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.2 Page no 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "h = 1 # ocean depth below the surface in km\n", + "\n", + "gma = 10070 # Specific weight of sea water\n", + "\n", + "\n", + "P =gma*h # Pressure in kN/m**2\n", + "\n", + "print \"Pressure = \",round(P),\"kN/m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure = 10070.0 kN/m**2\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.3 Page no 53" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "p1 = 150*10**3 # Pressure at point 1 in kN/m**2\n", + "\n", + "Sg = 0.85 # Specific gravity of oil\n", + "\n", + "h = 0.8 # height of oil 2 i tank in meters \n", + "\n", + "g = 9810 # specific gravity \n", + "\n", + "h1 = 2.0 # height of oil 3 in tank\n", + "\n", + "\n", + "p2 = (p1 + Sg*h*g)\n", + "\n", + "p3 = (p2 + g*h1)/1000\n", + "\n", + "print \"Pressure at the bottom of the tank is\",round(p3,1),\"kN/m**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure at the bottom of the tank is 176.3 kN/m**3" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.4 Page no 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "Po = 570 # mercury barometer reading in mm\n", + "\n", + "T = 273 -5 # temperature in K\n", + "\n", + "p = 750 # mercury barometer reading in mm\n", + "\n", + "n = 1.2345 # for polytropic atmosphere\n", + "\n", + "R =287 # univerasl gas constant in J/Kg-K\n", + "\n", + "g = 9.81 \n", + "\n", + "r = p/Po\n", + "\n", + "\n", + "y = -(R*T/(g*0.19))*(1 - (r)**((n-1)/n))\n", + "\n", + "print \"Height of the mountain is\",round(y,0),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Height of the mountain is 2208.0 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.5 Page no 57" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "h1 = 500 # height in mm\n", + "\n", + "h2 = 950 # height in mm\n", + "\n", + "S1 = 1 # specific gravity fo water\n", + "\n", + "S2 = 1.5 # specific gravity of liquid 2\n", + "\n", + "w = 9810 # specific weight of water\n", + "\n", + "\n", + "ha = ((h2*S2)-(h1*S1))/1000\n", + "\n", + "Pa = w*ha/1000 # Pressure in kPa\n", + "\n", + "print \"Pressure in the pipe = \",round(Pa,3),\"kPa\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pressure in the pipe = 9.074 kPa\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.6 Page no 66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "from __future__ import division\n", + "\n", + "from math import *\n", + "\n", + "d = 1 # diameter of the gate in m\n", + "\n", + "w = 9810 # specific weight in N/m**3\n", + "\n", + "A = pi*d**2/4 # area of the gate\n", + "\n", + "Ig = pi*d**4/64 # mamm moment of inertia\n", + "\n", + "theta = pi/2\n", + "\n", + "y1= 5+0.5\n", + "\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", + "\n", + "h1 = y1 + (Ig*math.sin(theta)*math.sin(theta)/(A*y1))\n", + "\n", + "\n", + "F1 = (F*(h1 - 5))/d\n", + "\n", + "print \"Magnitude of the force required to open the gate = \",round(F1,0),\"N\" \n", + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Magnitude of the force required to open the gate = 21659.0 N\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.7 Page no 67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "l =2 # length of the plate in m\n", + "\n", + "b =1 # width of the plate\n", + "\n", + "theta = pi/3\n", + "\n", + "h = 0.75 # depth of the plate\n", + "\n", + "w = 9810 # specific weight of water\n", + "\n", + "\n", + "A = 1*2\n", + "\n", + "y1 = h + 1*sin(theta)\n", + "\n", + "F = w*A*y1/1000\n", + "\n", + "print \"(a) Total force = \",round(F,2),\"kN\"\n", + "\n", + "Ig = (b*l**3)/12\n", + "\n", + "h1 = y1 + (Ig*sin(theta)*sin(theta)/(2*y1))\n", + "\n", + "print \"(b) Position of center of pressure = \",round(h1,3),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Total force = 31.71 kN\n", + "(b) Position of center of pressure = 1.616 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.8 Page no 68" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "d = 6 # diameter of the gate in ft\n", + "\n", + "A =pi*d**2/4 # area of the gate\n", + "\n", + "p1 = 600 # pressure on top in psia\n", + "\n", + "y1 = 10 +2 + 3*sin(pi/6)\n", + "\n", + "F = 62.4*A*y1\n", + "\n", + "F1 = p1*A\n", + "\n", + "\n", + "Tf = F+F1\n", + "\n", + "print \"Total hydrostatic force =\",round(Tf,0),\"lbs\"\n", + "\n", + "Ig = pi*d**4/64\n", + "\n", + "h1 = y1 + ((Ig*sin(pi/6)*sin(pi/6))/(A*y1))\n", + "\n", + "H = ((F*h1)+(F1*y1))/Tf\n", + "\n", + "print \"point of location on the center plate = \",round(H,2),\"ft\"\n", + "\n", + "\n", + "Hf = p1/62.4 # equivalent fluid height\n", + "\n", + "y2 = Hf+y1\n", + "\n", + "Tf1 = 62.4*A*y2\n", + "\n", + "h2 = y2 + ((Ig*sin(pi/6)*sin(pi/6))/(A*y2))\n", + "\n", + "H1 = y2-Hf\n", + "\n", + "print \" OR point of location on the center plate from method 2 = \",round(H1,2),\"ft\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total hydrostatic force = 40783.0 lbs\n", + "point of location on the center plate = 13.52 ft\n", + " OR point of location on the center plate from method 2 = 13.5 ft\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.10 Page no 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "\n", + "\n", + "R = 4 # radius of the gate in ft\n", + "\n", + "w = 1 # width of the gate in ft\n", + "\n", + "gma =62.4 # specific weight of water\n", + "\n", + "y1 = 4 # distance of center of the gate\n", + "\n", + "xv1 = 2 # distance in ft\n", + "\n", + "xv2 = 1.7 # distance in ft\n", + "\n", + "\n", + "Fh = R*y1*gma\n", + "\n", + "Ig = w*R**3/12\n", + "\n", + "yh = y1 + (Ig/(R*y1))\n", + "\n", + "Fv1 = R*2*gma\n", + "\n", + "Fv2 = pi*R**2*gma/4\n", + "\n", + "Fv = Fv1 + Fv2\n", + "\n", + "Xv = (Fv1*xv1+Fv2*xv2)/(Fv)\n", + "\n", + "print \"Horizontal component acting on the plate = \",round(Fh,2),\"lbs\"\n", + "\n", + "print \"Vertical component acting on the plate = \",round(Fv,2),\"lbs\"\n", + "\n", + "print \"location of Xv =\",round(Xv,2),\"ft\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Horizontal component acting on the plate = 998.4 lbs\n", + "Vertical component acting on the plate = 1283.34 lbs\n", + "location of Xv = 1.82 ft\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.11 Page no 77" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "p = 50 # pressure in psia\n", + "\n", + "gma = 62.4 # specific weight in ft\n", + "\n", + "h1 = p*144/gma # equivalent height of water surface in ft\n", + "\n", + "R = 4 # radius of gate in ft\n", + "\n", + "w = 1 # width of the gate in ft\n", + "\n", + "A = R*w\n", + "\n", + "y1 = h1 + 2.5 + 2 # center of pressure\n", + "\n", + "xv1 = 2 # center of pressure1 for x direction force\n", + "\n", + "xv2 = 1.7 # center of pressure2 for x direction force\n", + "\n", + "\n", + "Fh = gma*A*y1 # hiorizontal force\n", + "\n", + "Ig = 5.33 # moment of inertia\n", + "\n", + "yh = y1 + (Ig/(A*y1)) # location of horizontal component\n", + "\n", + "y2 = h1+2.5\n", + "\n", + "Fv1 = gma*(R*y2) # vertical force component 1\n", + "\n", + "Fv2 = gma*(pi*R**2/4) # vrtical force component 2\n", + "\n", + "Fv = Fv1 + Fv2 # vertical force component\n", + "\n", + "Xv = (Fv1*xv1+Fv2*xv2)/(Fv)\n", + "\n", + "print \"(a) Horizontal component acting on the plate = \",round(Fh,0),\"lbs\" # The answer for horizontal force in the book is wrong\n", + "\n", + "print \"(b) Vertical component acting on the plate = \",round(Fv,2),\"lbs\"\n", + "\n", + "print \"location of vertical component Xv =\",round(Xv,2),\"ft from the left wall\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Horizontal component acting on the plate = 29923.0 lbs\n", + "(b) Vertical component acting on the plate = 30208.14 lbs\n", + "location of vertical component Xv = 1.99 ft from the left wall\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.13 Page no 84" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "l = 3 # length in m\n", + "\n", + "b = 4 # breadth in m\n", + "\n", + "h = 15 # height in m\n", + "\n", + "S = 0.9 # specific gravity of barge\n", + "\n", + "Sw = 1.09 # specific gravity of water\n", + "\n", + "Wd = 150*10**3 # addditional weight in kN\n", + "\n", + "V = l*b*h # volume in m**3\n", + "\n", + "Wb = gma*S*V # weight of barge\n", + "\n", + "Tw = Wb + Wd # total weight in kN\n", + "\n", + "gma = 9810 # specific density \n", + "\n", + "\n", + "Fb = Tw # since barge is floating\n", + "\n", + "V1 = Fb/((gma/1000)*Sw) # volume in m**3\n", + "\n", + "\n", + "d = (V1/(h*b))/1000\n", + "\n", + "print \"Depth to which water would rise = \",round(d,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Depth to which water would rise = 0.25 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.14 Page no 85 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "import numpy as np\n", + "\n", + "\n", + "W = 0.4 * 9.81 # weight of the solid cylinder in N\n", + "\n", + "\n", + "A = np.array([(1,-0.96),(1,1)])\n", + "\n", + "b = np.array([0,6.37])\n", + "\n", + "x = np.linalg.solve(A,b)\n", + "\n", + "X = x[0]\n", + "\n", + "Y = x[1]\n", + "\n", + "print \"X = \",round(X,2),\"cm\"\n", + "\n", + "print \"Y = \",round(Y,2),\"cm\"\n", + "\n", + "b = 8 -x[0]\n", + "\n", + "print \"The bottom of the solid cylinder will be \",round(b,2),\"cm above the bottom\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "X = 3.12 cm\n", + "Y = 3.25 cm\n", + "The bottom of the solid cylinder will be 4.88 cm above the bottom\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.15 Page no 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "l =100 # length of the pan in cm\n", + "\n", + "w = 20 # width of the pan in cm\n", + "\n", + "d = 4 # depth of the pan in cm\n", + "\n", + "L = 1.5 # load in N/m\n", + "\n", + "gma = 9810 # sepcific weight\n", + "\n", + "\n", + "Fb = gma*(d*w*l/(2*l**3)) # weight on the pan\n", + "\n", + "W = Fb-L # weight of the pan\n", + "\n", + "X1 = w/3\n", + "\n", + "X2 = w/2\n", + "\n", + "theta = math.atan(d/w)*180/pi\n", + "\n", + "x = ((X2-X1)*cos(theta*pi/180))\n", + "\n", + "\n", + "M = W*x\n", + "\n", + "print \"Weight of the pan =\",round(W,1),\"N\"\n", + "print \"Magnitude of right momentum = \",round(M,1),\"N.cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Weight of the pan = 37.7 N\n", + "Magnitude of right momentum = 123.4 N.cm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example no 2.16 Page no 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "\n", + "Io = 15*4**3/12 # moment of inertia in m**4\n", + "\n", + "V = 15*4*2.71 # Volume in m**3\n", + "\n", + "Gb = ((3/2)-(2.71/2)) \n", + "\n", + "W = 1739.2 # weight of the barge from the previous example in kN\n", + "\n", + "Mg = (Io/V)-Gb # metacentric height in m\n", + "\n", + "print \"(a) Metacentric height = \", round(Mg,3),\"m\"\n", + "\n", + "M = W*Mg*sin(pi*6/180)\n", + "\n", + "print \"(b) Righting moment =\",round(M,1),\"kN.m\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Metacentric height = 0.347 m\n", + "(b) Righting moment = 63.1 kN.m\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example no 2.17 Page no 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "l=6 # length of the tank\n", + "\n", + "w =2 # width of the tank\n", + "\n", + "d = 3 # depth of the tank\n", + "\n", + "a = 3 # acceleration in m/s**2\n", + "\n", + "theta = pi/6\n", + "\n", + "W = 9810 # specific weight\n", + "\n", + "X = 0\n", + "\n", + "po=0 # pressure at the origin\n", + "\n", + "\n", + "A = np.array([(1,-1),(1,1)])\n", + "\n", + "b = np.array([-1.38,3.0])\n", + "\n", + "x = np.linalg.solve(A,b)\n", + "\n", + "Y1 = x[0]\n", + "\n", + "Y2 = x[1]\n", + "\n", + "\n", + "P = po - W*(2.61*X/9.81) - W*(1+(1.5/9.81))*(-Y2)\n", + "\n", + "print\"Amximum pressure occurs at the bottom of the tank =\",round(P,3),\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amximum pressure occurs at the bottom of the tank = 24768.9 N\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 2.18 Page no 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "d = 1 # diamter of the jar in ft\n", + "\n", + "h =2 # height of the jar in ft\n", + "\n", + "H = 1 # height of water in the jar in ft\n", + "\n", + "N = 150 # RPM\n", + "\n", + "g = 32.2 # acceleration due to gravity in ft/s**2\n", + "\n", + "\n", + "w = 2*pi*N/60\n", + "\n", + "ho = H+((w**2*(d/2)**2)/(4*g))\n", + "print \"(a) Height of paraboliod revolution of base = \", round(ho,2),\"ft\"\n", + "\n", + "Pmax = 62.4*ho\n", + "\n", + "print \"(b) Maximum pressure corresponding to maximum height = \",round(Pmax,1),\"lbs/ft**2\"\n", + "\n", + "z = H - ((w**2*(d/2)**2)/(4*g))\n", + "\n", + "r = 0.2 # distance from center\n", + "\n", + "y = -(0.52-0.25)\n", + "\n", + "P = po + (62.4*w**2*r**2/(2*g))-(62.4*y)\n", + "\n", + "print \"(c) Pressure =\",round(P,1),\"lbs/ft**2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Height of paraboliod revolution of base = 1.48 ft\n", + "(b) Maximum pressure corresponding to maximum height = 92.3 lbs/ft**2\n", + "(c) Pressure = 26.4 lbs/ft**2\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter3.ipynb b/Fluid_Mechanics/Chapter3.ipynb new file mode 100755 index 00000000..845caa9a --- /dev/null +++ b/Fluid_Mechanics/Chapter3.ipynb @@ -0,0 +1,503 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f598cdc0d1e1209f88ec87b2a9e5b6a08368d8e1e45eff28590bd3252c8de961" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Chapter : Fluid Kinematics" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.1 Page no 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "\n", + "x=1 # x co-ordinate\n", + "\n", + "y=2 # y co-ordinate\n", + "\n", + "\n", + "print \"(a) u = 4*X; v = -4*Y \"\n", + "\n", + "u = 4*x\n", + "\n", + "v=- 4*y\n", + "\n", + "print \"(b) u=\",round(u,0),\"m/s and v=\",round(v,0),\"m/s\"\n", + "\n", + "R =sqrt(u**2+v**2)\n", + "\n", + "ang = atan(v/u)*180/pi\n", + "\n", + "print \"(c) Magnitude of velocity =\",round(R,2),\"m/s and angle of resultant velocity = \",round(ang,1),\"deg\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) u = 4*X; v = -4*Y \n", + "(b) u= 4.0 m/s and v= -8.0 m/s\n", + "(c) Magnitude of velocity = 8.94 m/s and angle of resultant velocity = -63.4 deg\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.2 Page no 119" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "d = 0.3 # diameter of pipe in m\n", + "\n", + "v = 15 # velocity in m/s\n", + "\n", + "rho = 997.1 # density in kg/m**3\n", + "\n", + "A = pi*d**2/4\n", + "\n", + "\n", + "Q=A*v\n", + "\n", + "print \"(a) Discharge =\",round(Q,2),\"m**3/s\"\n", + "\n", + "mdot = rho*Q\n", + "\n", + "print \"(b) Mass flow rate = \",round(mdot,2),\"kg/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Discharge = 1.06 m**3/s\n", + "(b) Mass flow rate = 1057.21 kg/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.3 Page no 120 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "from scipy import integrate\n", + "\n", + "\n", + "Vo = 10 # velocity in m/s\n", + "\n", + "r1 = 0\n", + "\n", + "ro = 0.1 # radius in m\n", + "\n", + "N = 1\n", + "\n", + "\n", + "R = lambda r: (10*r-1000*r**3)\n", + "\n", + "R1,err=integrate.quad(R,r1,ro)\n", + "\n", + "Q = R1*2*pi\n", + "\n", + "A = pi*(0.1)**2\n", + "\n", + "V = Q/A\n", + "\n", + "print \"Mean velocity of the flow =\",round(V,0),\"m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mean velocity of the flow = 5.0 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.4 Page no 126" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import matplotlib.pyplot as plt\n", + "\n", + "from math import *\n", + "\n", + "from scipy import integrate\n", + "\n", + "import numpy as np\n", + "\n", + "from sympy import *\n", + "\n", + "\n", + "\n", + "\n", + "x = Symbol('x')\n", + "U = integrate(2,x)\n", + "\n", + "\n", + "y = Symbol('y')\n", + "\n", + "V = integrate(-4*y,y)\n", + "\n", + "\n", + "Zhi = U + V\n", + "\n", + "print Zhi # for x and y =0 we get C = 0\n", + "\n", + "X = [5,6,7,8,9,10,11,12,13,14,15,16,17]\n", + "Y = [0,1.414,2,2.449,2.828,3.16,3.46,3.741,4,4.242,4.472,4.69,4.898]\n", + "\n", + "b1=plt.plot(X,Y)\n", + "\n", + "\n", + "X1 = [2.5,3,4,5,6,7,8,9,10,11,12,13,14,15]\n", + "Y1 = [0,1,1.732,2.23,2.645,3,3.31,3.60,3.87,4.123,4.35889,4.5825,4.795,5]\n", + "\n", + "b2=plt.plot(X1,Y1)\n", + "\n", + "\n", + "X2 = [0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,13.5,14.5,15.5]\n", + "Y2 = [0,1.414,2,2.449,2.828,3.162,3.462,3.741,4,4.242,4.472,4.69,4.898,5.099,5.29,5.4772]\n", + "\n", + "b3=plt.plot(X2,Y2)\n", + "\n", + "plt.xlabel(\"x\")\n", + "\n", + "plt.ylabel(\"y\")\n", + "\n", + "plt.title(\"Streamline plot\")\n", + "\n", + "plt.legend([\"zhi=10\",\"zhi=5\",\"zhi=1\"])\n", + "plt.show()" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2*x - 2*y**2\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.5 PAge no 127" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from sympy import *\n", + "\n", + "import numpy as np\n", + "\n", + "\n", + "x = 2 # X co-ordinate\n", + "\n", + "Y = 4 # Y co-ordiante\n", + "\n", + "y = Symbol('y')\n", + "\n", + "zhi = 4*x*y\n", + "\n", + "zhiprime = zhi.diff(y)\n", + "\n", + "u = zhiprime\n", + "\n", + "x = Symbol('x')\n", + "\n", + "zhi = 4*x*Y\n", + "\n", + "zhiprime = zhi.diff(x)\n", + "\n", + "v = zhiprime\n", + "\n", + "R=sqrt(u**2+v**2)\n", + "\n", + "theta = atan(v/u)*180/pi\n", + "\n", + "print \"Resutant velocity magnitude = \",round(R,2),\"m/s\"\n", + "\n", + "print \"Angle =\",round(theta,1),\"deg with the X-axis in the 4th quadrant\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resutant velocity magnitude = " + ] + }, + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "17.89 m/s\n", + "Angle = 63.4 deg with the X-axis in the 4th quadrant\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.6 Page no 130" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "from sympy import *\n", + "\n", + "import numpy as np\n", + "\n", + "from scipy import integrate\n", + "\n", + "\n", + "d1 = 0.09 # diameter in cm\n", + "\n", + "d2 = 0.025 # diameter in cm\n", + "\n", + "rho = 1000 # density in kg/m**3\n", + "\n", + "mdot = 25 # mass flow rate in kg/s\n", + "\n", + "\n", + "x = Symbol('x')\n", + "\n", + "A1 = pi*d1**2/4\n", + "\n", + "A2 = pi*d2**2/4\n", + "\n", + "AA = A1 - ((A1-A2)/40)*10 # from figure\n", + "\n", + "V = mdot/(rho*AA)\n", + "\n", + "print \"(a) Velocity =\",round(V,1),\"m/s\"\n", + "\n", + "AX = (A1 - ((A1-AA)/40)*x)\n", + "\n", + "v = 25*10**4/(rho*AX)\n", + "\n", + "vprime = v.diff(x)\n", + "\n", + "V1 = vprime\n", + "\n", + "\n", + "VPrime = 0.09\n", + "\n", + "Acx = V*VPrime\n", + "\n", + "print \"(b) Convective acceleration =\",round(Acx,3),\"m**2/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Velocity = 5.1 m/s\n", + "(b) Convective acceleration = 0.46 m**2/s\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.8 Page no 143 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "\n", + "\n", + "y = Symbol('y')\n", + "\n", + "U = 16*y-12*x\n", + "\n", + "zhiprime = U.diff(y)\n", + "\n", + "u = zhiprime\n", + "\n", + "\n", + "x = Symbol('x')\n", + "\n", + "V = 12*y-9*x\n", + "\n", + "zhiprime1 = V.diff(x)\n", + "\n", + "v = zhiprime1\n", + "\n", + "\n", + "\n", + "z = v-u\n", + "\n", + "print \"z = \",round(z,0)\n", + "\n", + "print \"Hence the flow is rotational\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "z = -25.0\n", + "Hence the flow is rotational\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 3.10 Page no 148" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "d1 = 0.1 # diameter in m\n", + "\n", + "d2 = 0.3 # diameter in m\n", + "\n", + "V1 = 30 # velocity in m/s\n", + "\n", + "\n", + "V2 = (d1**2/d2**2)*V1\n", + "\n", + "print \"Velocity at the larger cross section = \",round(V2,2),\"m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity at the larger cross section = 3.33 m/s\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter4.ipynb b/Fluid_Mechanics/Chapter4.ipynb new file mode 100755 index 00000000..ea310eb2 --- /dev/null +++ b/Fluid_Mechanics/Chapter4.ipynb @@ -0,0 +1,529 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1587038d9ed42ba6cd2ab38d651a00ef2c4ed8f4723b6c6b72bdf9880d8ef943" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Chapter 4 : Fluid Dynamics" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.1 Page no 159" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "d1 = 0.1 # diameter in m\n", + "\n", + "d2 = 0.05 # diameter in m\n", + "\n", + "Q = 0.1 # discharge in m**3/s\n", + "\n", + "A1 = pi*d1**2/4\n", + "\n", + "A2 = pi*d2**2/4\n", + "\n", + "gma =9810 # specific weight\n", + "\n", + "z= 6 # difference in the height\n", + "\n", + "g = 9.81\n", + "\n", + "\n", + "V1 = Q/A1 # velocity at section 1\n", + "\n", + "V2 = Q/A2 # velocity at section 2\n", + "\n", + "dP = gma*((V2**2/(2*g))-(V1**2/(2*g))-z)/1000\n", + "\n", + "print \"Difference in pressure in section 1 and 2 = \",round(dP,1),\"kN/m**2\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Difference in pressure in section 1 and 2 = 1157.0 kN/m**2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.2 Page no 160" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "d = 2.5 # diameter in cm\n", + "\n", + "h =200 # head in cm\n", + "\n", + "Cd = 0.65 # coefficient of discharge\n", + "\n", + "A =pi*d**2/4\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2 \n", + "\n", + "\n", + "Q = Cd*A*sqrt(2*g*h)/100\n", + "\n", + "print \"Actual discharge =\",round(Q,2),\"l/s\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual discharge = 2.0 l/s\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.3 Page no 162" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from __future__ import division\n", + "\n", + "from math import *\n", + "\n", + "from scipy import integrate\n", + "\n", + "import numpy as np\n", + "\n", + "\n", + "H1 = 3 # height in m\n", + "\n", + "H2 = 4 # height in m\n", + "\n", + "b = 0.5 # width in m\n", + "\n", + "Cd = 0.65 # co-efficient of discharge \n", + "\n", + "g = 9.81 # acceleration due to grvity in m/s**2\n", + "\n", + "\n", + "q = lambda h: h**(1/2)\n", + " \n", + "Q,err = integrate.quad(q, H1, H2)\n", + "\n", + "Qt = Cd*b*sqrt(2*g)*Q\n", + "\n", + "print \"Discharge through the orifice =\",round(Qt,2),\"m**3/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge through the orifice = 2.69 m**3/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.4 Page no 163" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " \n", + "from math import *\n", + "\n", + "from scipy import integrate\n", + "\n", + "from __future__ import division\n", + "\n", + "import numpy as np\n", + "\n", + "\n", + "b = 1 # bredth of the tank\n", + "\n", + "d = 0.5 # depth of the tank\n", + "\n", + "h1 = 0.2 # height of the orifice in m\n", + "\n", + "Cd = 0.6 # coefficient of discharge\n", + "\n", + "H1 = 2 # height in m\n", + "\n", + "H2 = 2+h1 # height in m\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "A = 1*0.3 # area of submerged section in m**2\n", + "\n", + "\n", + "q = lambda h: h**(1/2)\n", + " \n", + "Q,err = integrate.quad(q, H1, H2)\n", + "\n", + "Q1 = Cd*b*sqrt(2*g)*(Q) # Flow through area 1\n", + "\n", + "Q2 = Cd*sqrt(2*g*H2)*A\n", + "\n", + "Td = Q1+Q2\n", + "\n", + "print \"Total Discharge =\",round(Td,2),\"m**3/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Discharge = 1.95 m**3/s\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.5 Page no 165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "d1 = 2 # radius of pipe\n", + "\n", + "d2 = 1 # radius of throat\n", + "\n", + "D1 = 40\n", + "\n", + "D2 = 20\n", + "\n", + "A1 = pi*D1**2/4\n", + "\n", + "A2 = pi*D2**2/4\n", + "\n", + "Cd = 0.95\n", + "\n", + "\n", + "V2 = sqrt(21582/0.9375)\n", + "\n", + "Q = 1.52*pi*(d1/100)**2/4\n", + "\n", + "Qa = Q*Cd\n", + "\n", + "print \"Actual discharge =\",round(Qa,6),\"m**3/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual discharge = 0.000454 m**3/s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.6 Page no 166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "dx = 0.5 # in ft\n", + "\n", + "K = 1 # constant\n", + "\n", + "g = 32.2 # acceleration due to gravity in ft/s**2\n", + "\n", + "\n", + "V = sqrt(2*g*dx)\n", + "\n", + "print \"velocity at the dept of 1 ft =\",round(V,2),\"ft/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "velocity at the dept of 1 ft = 5.67 ft/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example no 4.7 Page no 172" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "gma= 0.8 # specific weight\n", + "\n", + "V2 = 40 # velocity in m/s\n", + "\n", + "z1 =25 # height at point 1\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "d = 15 # diameter of the nozzle in cm\n", + "\n", + "\n", + "V2 = sqrt(2*g*z1/4.25)\n", + "\n", + "A = pi*(d/100)**2/4\n", + "\n", + "Q = A*V2*1000\n", + "\n", + "print \"Discharge throught the system =\",round(Q,0),\"l/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge throught the system = 190.0 l/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.8 Page no 174" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "\n", + "Eff = 0.8 # pump efficiency\n", + "\n", + "Hl = 30 # head loss in m\n", + "\n", + "D1 =6 # diameter in cm\n", + "\n", + "D2 = 2 # diameter in cm\n", + "\n", + "gma = 9810 # specific weight in N/m**3\n", + "\n", + "V2 = 40 # velocity in m/s\n", + "\n", + "P1 = -50 # pressure at point 1 in N/m**2\n", + "\n", + "z2 = 100 # height at point 2\n", + "\n", + "g = 9.8 # acceleration due to gravity in m/s**2\n", + "\n", + "z1 = 30 # height in m\n", + "\n", + "\n", + "V1=(2/6)**2*V2\n", + "\n", + "Q = (pi*6**2/4)*V1*10**-4\n", + "\n", + "Hs = z2 + (V2**2/(2*g)) + z1 + (50/gma) -(V1**2/(2*g))\n", + "\n", + "P = gma*Q*Hs\n", + "\n", + "Pi = (P/Eff)/1000\n", + "\n", + "print \"Power input = \",round(Pi,1),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Power input = 32.5 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 4.9 Page no 176" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "Q = 0.2 # discharge in m**3/s\n", + "\n", + "d1 = 0.25 # diameter of the pipe in m\n", + "\n", + "A = pi*d1**2/4 # area of the pipe\n", + "\n", + "za = 480 # height in m\n", + "\n", + "z1 = 500 # height in m\n", + "\n", + "z3 = 550 # elevation in m\n", + "\n", + "gma =9810 # specific weight in N/m**2\n", + "\n", + "g =9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "\n", + "V=Q/A # Velocity of in m/s\n", + "\n", + "Hl1 = (0.02*100*V**2/(0.25*2*9.81))\n", + "\n", + "\n", + "Pa =(z1-za-(V**2/(2*g))-Hl1)\n", + "\n", + "El = za+Pa\n", + "\n", + "print \"Elevation at height A =\",round(El,2),\"m\"\n", + "\n", + "\n", + "hs = z3 - z1 + (0.02*(500/0.25)*(V**2/(2*g))) \n", + "\n", + "El2 = El+hs\n", + "\n", + "print \"Elevation at height B =\",round(El2,2),\"m\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Elevation at height A = 492.39 m\n", + "Elevation at height B = 576.23 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter5.ipynb b/Fluid_Mechanics/Chapter5.ipynb new file mode 100755 index 00000000..73c391ca --- /dev/null +++ b/Fluid_Mechanics/Chapter5.ipynb @@ -0,0 +1,545 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cd2be77f3b9478c6cae134ea907a28e897f525fa56fe0f236e6cf640bce7cb59" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Chapter 5 : Fluid Momentum" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.1 Page no 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "Q = 0.3 # Water flow rate in m**3/s\n", + "\n", + "d1 = 0.3 # diameter at inlet in meters\n", + "\n", + "A1 = pi*d1**2/4 # inlet area in m**2\n", + "\n", + "d2 = 0.15 # diameter at outlet in m\n", + "\n", + "A2 = pi*d2**2/4 # area at outlet in m**2\n", + "\n", + "P1 = 175*10**3 # inlet pressure in kN/m**2\n", + "\n", + "P2 = 160*10**3 # Pressure at outlet in kN/m**2\n", + "\n", + "F1 = P1*A1 # Force at inlet\n", + "\n", + "F2 = P2*A2 # Force at outlet\n", + "\n", + "rho = 1000 # density of water in kg/m**3\n", + "\n", + "V1 = Q/A1 # inlet velocity in m/s\n", + "\n", + "V2 = Q/A2 # Velocity at outlet in m/s\n", + "\n", + "theta = 45*pi/180 # angle in deg\n", + "\n", + "\n", + "\n", + "Rx = F1 - F2*cos(theta)-rho*Q*(V2*cos(theta)-V1)\n", + "\n", + "\n", + "Ry = F2*sin(theta)+rho*Q*(V2*sin(theta)-0)\n", + "\n", + "R = sqrt(Rx**2+Ry**2)\n", + "\n", + "print \"Resultant force on the elbow = \",round(R,2),\"N\"\n", + "\n", + "a = atan(Ry/Rx)*180/pi\n", + "\n", + "print \"Angle of resultant force = \",round(a,4),\"deg\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resultant force on the elbow = 9800.58 N\n", + "Angle of resultant force = 34.8516 deg\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.2 Page no 194" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "V1 = 80 # Velocity in ft/s\n", + "\n", + "A1 = 0.1 # area in ft**2\n", + "\n", + "g = 32.2 # Acceleration due to gravity in ft/s**2\n", + "\n", + "rho = 1.94 # density in lb/ft**3\n", + "\n", + "a = pi/3 # angle of pipe bend\n", + "\n", + "\n", + "Q = A1*V1 # Total discharge in m**3\n", + "\n", + "\n", + "V2 = sqrt((2*g*V1**2/(2*32.2))-3*2*g)\n", + "\n", + "\n", + "\n", + "Rx = -(rho*Q*(V2*cos(a)-80))\n", + "\n", + "\n", + "Ry = (rho*Q*(V2*sin(a)-0))\n", + "\n", + "R = sqrt(Rx**2+Ry**2)\n", + "\n", + "print \"Resultant force = \",round(R,0),\"lbs\"\n", + "\n", + "ang = atan(Ry/Rx)*180/pi\n", + "\n", + "print \"Angle of resultant force = \",round(ang,4),\"deg\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resultant force = 1232.0 lbs\n", + "Angle of resultant force = 59.2396 deg\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example no 5.3 Page no 195 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "from __future__ import division\n", + "\n", + "from math import *\n", + "\n", + "Q1 = 0.5 # discharge from pipe 1 in m**3/s\n", + "\n", + "Q2 = 0.3 # discharge from pipe 2 in m**3/s\n", + "\n", + "Q3 = 0.2 # discharge from pipe 3 in m**3/s\n", + "\n", + "d1 = 0.45 # diameter of pipe 1 in m\n", + "\n", + "d2 = 0.3 # diameter of pipe 2 in m\n", + "\n", + "d3 = 0.15 # diameter of pipe 3 in m\n", + "\n", + "A1 = pi*d1**2/4 # area in m**2\n", + "\n", + "A2 = pi*d2**2/4 # area in m**2\n", + "\n", + "A3 = pi*d3**2/4 # area in m**2\n", + "\n", + "P1 = 60*10**3 # Pressure at point 1 in kPa\n", + "\n", + "gma = 9810\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "rho = 1000 # density in kg/m**3\n", + "\n", + "\n", + "V1 = Q1/A1\n", + "\n", + "V2 = Q2/A2\n", + "\n", + "V3 = Q3/A3\n", + "\n", + "P2 = gma*((P1/gma) + V1**2/(2*g) - V2**2/(2*g))\n", + "\n", + "P3 = gma*((P1/gma) + V1**2/(2*g) - V3**2/(2*g))\n", + "\n", + "F1 = P1*A1\n", + "\n", + "F2 = P2*A2\n", + "\n", + "F3 = P3*A3\n", + "\n", + "Rx = rho*(Q2*V2*cos(pi/6)-Q3*V3*cos(pi/9)-0)+F3*cos(pi/9)-F2*cos(pi/6)\n", + "\n", + "Ry = rho*((Q2*V2*sin(pi/6)+Q3*V3*sin(pi/9)-Q1*V1))+F3*sin(pi/9)-F2*sin(pi/6)-F1\n", + "\n", + "R = sqrt(Rx**2+Ry**2)\n", + "\n", + "a = atan(Ry/Rx)*180/pi\n", + "\n", + "print \"Resultant Force = \",round(R,0),\"N\"\n", + "\n", + "print \"Angle with horizontal = \",round(a,1),\"deg with horizontal\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resultant Force = 12489.0 N\n", + "Angle with horizontal = 69.2 deg with horizontal\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.4 Page no 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "d = 2 # diameter in inches\n", + "\n", + "A = pi*d**2/(4*144) # Area of jet\n", + "\n", + "V = 100 # velocity of jet in ft/s\n", + "\n", + "Q = A*V # dischargge in ft**3/s\n", + "\n", + "gma = 62.4 # mass\n", + "\n", + "g = 32.2 # acceleration due to gravity in ft/s**2\n", + "\n", + "\n", + "Rx = (gma*Q*V)/g # horizontal force required to keep plate in position\n", + "\n", + "print \"Normal force on the plate = \",round(Rx,0),\"lbs\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Normal force on the plate = 423.0 lbs\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.5 Page no 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "from math import *\n", + "\n", + "D = 0.075 # diameter in m\n", + "\n", + "A =pi*D**2/4 # area of jet\n", + "\n", + "V =15 # velocity of jet in m/s\n", + "\n", + "w = 9810 # specific weight\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s^2\n", + "\n", + "\n", + "Q =A*V # Discharge in m**3/s\n", + "\n", + "Vp = 10 # velocity of plate in m/s\n", + "\n", + "Rx = w*Q*(V-Vp)/g # force in X direction\n", + "\n", + "print \"Force on the plate = \",round(Rx,2),\"N\"\n", + "\n", + "W = Rx*Vp\n", + "\n", + "print \"Work done per second = \",round(W,1),\"N.m/s\"\n", + "\n", + "Eff = 2*(V-Vp)*Vp/V**2\n", + "\n", + "E = 100*Eff\n", + "\n", + "print \"Efficiency = \",round(E,1),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force on the plate = 331.34 N\n", + "Work done per second = 3313.4 N.m/s\n", + "Efficiency = 44.4 %\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.6 Page no 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "d = 3 # diameter in inches\n", + "\n", + "A = pi*d**2/(4*144) # Area of jet\n", + "\n", + "Q = 2 # discharge in ft**3/s\n", + "\n", + "rho = 1.94 # density in lbs/ft**3\n", + "\n", + "\n", + "V = Q/A # velocity in ft/s\n", + "\n", + "alpha = pi/6 # inlet vane angle\n", + "\n", + "bta = pi/6 # outlet vane angle\n", + "\n", + "Rx = rho*Q*(V*cos(bta)+V*cos(alpha)) # force in X direction\n", + "\n", + "Ry = rho*Q*(V*sin(bta)-V*sin(alpha)) # force in Y direction\n", + "\n", + "print \"Force exerted in X direction = \",round(Rx,1),\"lbs\"\n", + "\n", + "print \"Force exerted in Y direction = \",round(Ry,1),\"lbs\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Force exerted in X direction = 273.8 lbs\n", + "Force exerted in Y direction = 0.0 lbs\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.7 Page no 207" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "from math import *\n", + "\n", + "V1 =40 # velocity in m/s\n", + "\n", + "Vp = 20 # velocity of the plate in m/s\n", + "\n", + "alpha = pi/6 # inlet vane angle\n", + "\n", + "bta = pi/9 # outlet vane angle\n", + "\n", + "g = 9.81\n", + "\n", + "\n", + "V1x = V1*cos(alpha)\n", + "\n", + "Vw1 = V1x;\n", + "\n", + "V1y = V1*sin(alpha)\n", + "\n", + "dV = V1x - Vp\n", + "\n", + "theta = atan(V1y/dV)*180/pi\n", + "\n", + "Vr1 = V1y/sin(theta*pi/180)\n", + "\n", + "Vr2 = Vr1\n", + "\n", + "\n", + "print \"a ) Angle of blade top at inlet and Outlet, Phi = 4 deg\"\n", + "\n", + "phi = 4*pi/180 \n", + "\n", + "V2 = Vr2*sin(phi)/sin(bta)\n", + "\n", + "V2w = V2*cos(bta)\n", + "\n", + "W = (V2w+V1x)*Vp/g\n", + "\n", + "print \"b ) Work done per N of fluid per second = \",round(W,2),\"N.m\"\n", + "\n", + "Eff = (1 - (V2/V1)**2)*100\n", + "\n", + "print \"c ) Efficiency = \",round(Eff,2),\"%\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a ) Angle of blade top at inlet and Outlet, Phi = 4 deg\n", + "b ) Work done per N of fluid per second = 80.31 N.m\n", + "c ) Efficiency = 98.4 %\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 5.8 Page no 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "from math import *\n", + "\n", + "v = 220 # velocity in ft/s\n", + "\n", + "d = 6 # diameter of the propeller\n", + "\n", + "Q = 12000 # discharge in ft**3/s\n", + "\n", + "mf = 0.0022 # mass flow rate in slugs/ft**3\n", + "\n", + "\n", + "V1 = v*5280/3600 # velocity in ft/s\n", + "\n", + "V = Q/(pi*d**2/4) # velocity in ft/s\n", + "\n", + "V4 = 2*V-V1\n", + "\n", + "F = mf*Q*(V4-V1) # thrust on the plane\n", + "\n", + "print \"a - Thrust on the plane = \",round(F,1),\"lbs\"\n", + "\n", + "Eff = V1/V # efficiency \n", + "\n", + "E = Eff*100\n", + "\n", + "print \"b - Theoretical efficiency = \",round(E,0),\"%\"\n", + "\n", + "Thp = F*V1/(500*Eff)\n", + "\n", + "print \"c - Theoretical horsepower required = \",round(Thp,0),\"hp\"\n", + "\n", + "dP = mf*(V4**2-V1**2)/2\n", + "\n", + "print \"d - Pressure difference across blades = \",round(dP,2),\"lbs/ft**3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a - Thrust on the plane = 5372.2 lbs\n", + "b - Theoretical efficiency = 76.0 %\n", + "c - Theoretical horsepower required = 4560.0 hp\n", + "d - Pressure difference across blades = 190.0 lbs/ft**3\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter6.ipynb b/Fluid_Mechanics/Chapter6.ipynb new file mode 100755 index 00000000..0eb8031a --- /dev/null +++ b/Fluid_Mechanics/Chapter6.ipynb @@ -0,0 +1,128 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:779dd4cf4a63ec7ae3b3ee56b532415f0e7430caa393646786820e5bcc3483bb" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Chapter 6 : Dimensional Analysis and Dynamic Similitude" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.2 Page no 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "L = 10 # length scale lp/l\n", + "\n", + "\n", + "rhop = 0.86*998.2 # density inn kg/m**3\n", + "\n", + "mup = 8*10**-3 # viscosity in Ns/m**2\n", + "\n", + "Vp = 2.5 # Velocity in m/s\n", + "\n", + "\n", + "rhom = 998.2 # density in kg/m**3\n", + "\n", + "mum = 1.005*10**-3 # viscosity in Ns/m**2\n", + "\n", + "\n", + "Vm = Vp*L*(rhop/rhom)*(mum/mup) # velocity in m/s\n", + "\n", + "print \"Hence the model should be tested at a velocity of \",round(Vm,2),\"m/s. This velocity in the model is called corresponding velocity\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hence the model should be tested at a velocity of 2.7 m/s. This velocity in the model is called corresponding velocity\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 6.3 Page no 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "from __future__ import division\n", + "\n", + "from math import *\n", + "\n", + "l = 300 # length in ft\n", + "\n", + "Q = 100000 # discharge in cfs\n", + "\n", + "Cd = 3.8 # coefficient of discharge\n", + "\n", + "L = (1/50) # length scale\n", + "\n", + "\n", + "Qm = 100000*(L)**(5/2) # model discharge in cfs\n", + "\n", + "print \"Maximum discharge, Qm = \",round(Qm,8),\"cfs\"\n", + "\n", + "H = (Q/(Cd*l))**(2/3) # height over spill way\n", + "\n", + "h = H*L*12 # head over spill model\n", + "\n", + "print \"Maximum head over crest = \",round(h,2),\"ft\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum discharge, Qm = 5.65685425 cfs\n", + "Maximum head over crest = 4.74 ft\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter7.ipynb b/Fluid_Mechanics/Chapter7.ipynb new file mode 100755 index 00000000..baafd643 --- /dev/null +++ b/Fluid_Mechanics/Chapter7.ipynb @@ -0,0 +1,367 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:efc6f8f4cd32e5126c4de163e157356596c0806f949ff4295acc9cf31cf6d207" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Chapter 7 : Fluid Resistance" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.1 Page no 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "nu1 = 0.804*10**-6 # viscosity in m**2/s\n", + "\n", + "V = 0.3 # velocity in m/s\n", + "\n", + "D = 0.02 # diameter in m/s\n", + "\n", + "\n", + "rho = 995.7 # density in kg/m**3\n", + "\n", + "\n", + "mu = 8620*10**-4 # viscosity in Ns/m**2\n", + "\n", + "S = 1.26 # specific gravity\n", + "\n", + "nu2 = mu/(S*rho) # viscosity of glycerine in Ns/m**2\n", + "\n", + "\n", + "R1 = V*D/nu1\n", + "\n", + "print \"Reynolds number for water =\",round(R1,0)\n", + "\n", + "print \"R > 2000 the flow is turbulent for water\"\n", + "\n", + "print \"\\n\"\n", + "R2 = V*D/nu2\n", + "\n", + "print \"Reynolds number for glycerine =\",round(R2,1)\n", + "\n", + "print \"R < 2000 the flow is laminar for glycerine\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reynolds number for water = 7463.0\n", + "R > 2000 the flow is turbulent for water\n", + "\n", + "\n", + "Reynolds number for glycerine = 8.7\n", + "R < 2000 the flow is laminar for glycerine\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.2 Page no 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "from scipy import *\n", + "\n", + "import numpy as np\n", + "\n", + "from sympy import *\n", + "\n", + "y = Symbol('y')\n", + "\n", + "d = 0.0175 # diameter in m\n", + "\n", + "s = 0.3 # shear stress at a distance in m\n", + "\n", + "tau = 103 # shear stress in Pa\n", + "\n", + "rho = 1000 # density in kg/m**3\n", + "\n", + "\n", + "\n", + "Up = diff(8.5+0.7*log(y),y)\n", + "\n", + "print Up\n", + "\n", + "Up = (0.7/0.3) # for y = 0.3\n", + "\n", + "k = sqrt(tau/(rho*s**2*Up**2))\n", + "\n", + "print \"Turbulence constant = \",round(k,2)\n", + "\n", + "Ml = k*s*100 # mixing length\n", + "\n", + "print \"Mixing length = \",round(Ml,1),\"cm\"\n", + "\n", + "Eta = rho*(Ml/100)**2*Up\n", + "\n", + "print \"Eddy viscosity =\",round(Eta,1),\"Nm/s**2\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.7/y\n", + "Turbulence constant = 0.46\n", + "Mixing length = 13.8 cm\n", + "Eddy viscosity = 44.1 Nm/s**2\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.3 Page no 256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "from pylab import plt\n", + "\n", + "from numpy import *\n", + "\n", + "from scipy import *\n", + "\n", + "from sympy import *\n", + "\n", + "import matplotlib.pyplot as plt\n", + "\n", + "\n", + "\n", + "S = 1.26 # specific gravity \n", + "\n", + "mu = 0.862 # dynamic viscosity in Ns/m**2\n", + "\n", + "rho = S *1000 # density in kg/m**3\n", + "\n", + "K2 = 0.332\n", + "\n", + "V=1 # velocity in m/s\n", + "\n", + "\n", + "\n", + "x = [0,0.1,0.5,1.0,2.0];\n", + "\n", + "d = 0.1307*np.sqrt(x)*100\n", + "\n", + "tauo = K2*rho*V**2/(sqrt(1462)*np.sqrt(x))\n", + "\n", + "plt.plot(x, d, 'r')\n", + "plt.xlabel('x(m)')\n", + "plt.ylabel('delta(cm),tauo(N/m**2)')\n", + "\n", + "plt.plot(x, tauo, 'b')\n", + "plt.xlabel('x')\n", + "plt.legend('d''t')\n", + "plt.show()\n" + ], + "language": "python", + "metadata": {}, + "outputs": [], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.4 page no 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import numpy as np\n", + "\n", + "from math import *\n", + "\n", + "from __future__ import division\n", + "\n", + "import matplotlib.pyplot as plt\n", + "\n", + "from numpy import sqrt\n", + "\n", + "\n", + "rho = 1.197 # air density in kg/m**3\n", + "\n", + "mu = 18.22*10**-6 # viscosity in Ns/m**2\n", + "\n", + "l = 5 # length of the plate\n", + "\n", + "V = 8 # velocity in m/s\n", + "\n", + "Rec = 5*10**5 # crictical reynolds number\n", + "\n", + "l1 = 0.951 # length from 0 to 0.951\n", + "\n", + "l2 = 5.0 # length from 0 to 5\n", + "\n", + "l3 = 0.951 # length from 0 to 0.951\n", + "\n", + "\n", + "X = Rec/525576\n", + "\n", + "x = [0,0.1,0.3,0.6,0.951];\n", + "\n", + "d = 0.0069*np.sqrt(x)*100\n", + "\n", + "plt.figure()\n", + "plt.plot(x, d, 'r')\n", + "plt.xlabel('x(m)')\n", + "plt.ylabel('delta(cm)')\n", + "plt.title('delta v/s x')\n", + "plt.legend('L')\n", + "plt.show()\n", + "\n", + "X1 = [0.951,1.5,2.0,2.5,3.0,4.0,5.0]\n", + "\n", + "Dt = 0.0265*np.power(X1,(4/5))*100\n", + "\n", + "plt.figure()\n", + "plt.plot(X1, Dt, 'g')\n", + "plt.xlabel('x(m)')\n", + "plt.ylabel('delta(cm)')\n", + "plt.title('delta v/s x')\n", + "plt.legend('T')\n", + "plt.show()\n", + "\n", + "Td = 0.664*sqrt(mu*rho*V**3*l1)+0.036*rho*V**2*l2*(mu/(rho*V*l2))**0.2-0.036*rho*V**2*l3*(mu/(rho*V*l3))**0.2\n", + "\n", + "print \"Total Drag = \",round(Td,3),\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total Drag = 0.595 N\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 7.5 Page no 270" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "from pylab import plt\n", + "\n", + "from __future__ import division\n", + "\n", + "\n", + "d = 0.01 # doameter of sphere in m\n", + "\n", + "v = 0.05 # velocity in m/s\n", + "\n", + "S = 1.26 # specific gravity\n", + "\n", + "mu = 0.826 # kinematic viscosity in Ns/m**2\n", + "\n", + "rho = S*1000 # density\n", + "\n", + "\n", + "R = rho*v*d/mu\n", + "\n", + "\n", + "Cd = 35\n", + "\n", + "Fd = 0.5*Cd*rho*v**2*pi*d**2/4\n", + "\n", + "print \"Drag on the sphere = \",round(Fd,4),\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Drag on the sphere = 0.0043 N\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter8.ipynb b/Fluid_Mechanics/Chapter8.ipynb new file mode 100755 index 00000000..6972a7f7 --- /dev/null +++ b/Fluid_Mechanics/Chapter8.ipynb @@ -0,0 +1,358 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:74db613da6801f860dadcdbf59265a8239e5864c8922257a769d0c0fa0f7c4e0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Chapter 8 : Laminar Flow" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.1 Page no 286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "from math import *\n", + "\n", + "P1 = 200 # Pressure at inlet in kPa\n", + "\n", + "P2 = 260 # Pressure at outlet in kPa\n", + "\n", + "d = 0.004 # diameter in m\n", + "\n", + "L = 8 # length of pipe in meters\n", + "\n", + "z = 6 # height of the pipe from the ground\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "\n", + "mu = 19.1*10**-4 # viscosity of kerosene at 20 deg C\n", + "\n", + "S = 0.81 # specific gravity of kerosene\n", + "\n", + "rho = 1000 # density in kg/m**3\n", + "\n", + "\n", + "\n", + "p1 = (P1+g*z*S)*1000 # point 1\n", + "\n", + "p2 = (P2)*1000 # point 2\n", + "\n", + "\n", + "\n", + "Sp = -((p1-p2)/sqrt(L**2+z**2))\n", + "\n", + "r = d/2\n", + "\n", + "Tau_max = r*Sp/2\n", + "\n", + "print \"(a) Maximum shear stress =\",round(Tau_max,3),\"N/m**2\"\n", + "\n", + "\n", + "Vmax = r**2*Sp/(4*mu)\n", + "\n", + "print \"(b) Maximum velocity =\",round(Vmax,3),\"m/s\"\n", + "\n", + "\n", + "Q = pi*r**4*Sp/(8*mu)\n", + "\n", + "print \"(c) Discharge = \",round(Q,7),\"m**3/s\"\n", + "\n", + "\n", + "V = Vmax/2\n", + "\n", + "R = rho*V*d*S/mu\n", + "\n", + "print \"Reynolds number =\",round(R,0),\"is less than 2000, the flow is laminar and the calculations are valid\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) Maximum shear stress = 1.232 N/m**2\n", + "(b) Maximum velocity = 0.645 m/s\n", + "(c) Discharge = 4.1e-06 m**3/s\n", + "Reynolds number = 547.0 is less than 2000, the flow is laminar and the calculations are valid\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example no 8.2 Page no 289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "d = 0.02 # diameter of the pipe in m\n", + "\n", + "l = 30 # length of the pipe in m\n", + "\n", + "v = 0.1 # velocity in m/s\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "\n", + "nu = 1.54*10**-6 # kinematic viscosity of water in m**2/s\n", + "\n", + "\n", + "R = v*d/nu\n", + "\n", + "print \"R = \",round(R,0),\"is lesss than 2000 , the flow is laminar\"\n", + "\n", + "f = 64/R # friction factor\n", + "\n", + "Hf = f*l*v**2/(2*g*d) # head loss due to friction\n", + "\n", + "H=Hf*100\n", + "\n", + "print \"Head loss = \",round(H,2),\"cm of water\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 1299.0 is lesss than 2000 , the flow is laminar\n", + "Head loss = 3.77 cm of water\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.3 Page no 290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "from math import *\n", + "\n", + "\n", + "S = 0.92 # specific gravity\n", + "\n", + "gma = S*62.4 # density in lbs/ft**3\n", + "\n", + "nu=0.0205 # viscosity in ft**2/s\n", + "\n", + "W = 50 # weight of oil\n", + "\n", + "d = 9 # diameter of the pipe in inches\n", + "\n", + "g = 32.2 # acceleration due to gravity in ft/s**2\n", + "\n", + "\n", + "Q = W*2000/(gma*3600) # discharge in ft**3/s\n", + "\n", + "A = pi*d**2/(4*144) # area of pipe\n", + "\n", + "V = Q*1000/(A) # velocity in ft/s\n", + "\n", + "R = V*0.75/(nu*1000) # Reynolds number\n", + "\n", + "print \"R =\",round(R,2),\"is less than 2000 and hence flow is laminar\"\n", + "\n", + "f = 64/R # friction factor\n", + "\n", + "Hf = (f*5280*(V/1000)**2)/(2*g*0.75)\n", + "\n", + "Hp = gma*Q*Hf/(550)\n", + "\n", + "print \"Horse power required to pump the oil = \",round(Hp,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R = 40.07 is less than 2000 and hence flow is laminar\n", + "Horse power required to pump the oil = 10.6\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.4 Page no 291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "from math import *\n", + "\n", + "V = 50 # Volume in m**3\n", + "\n", + "d = 5 # diameter in m\n", + "\n", + "d1 = 0.1 # diameter of bore\n", + "\n", + "l = 10 # length of the tube\n", + "\n", + "t = 20*60 # time in seconds\n", + "\n", + "rho = 0.88 # density in g/cm**3\n", + "\n", + "H1 = 5 # height from the base in m\n", + "\n", + "A = pi*d**2/4\n", + "\n", + "a = pi*d1**2/4\n", + "\n", + "\n", + "\n", + "H2 = H1-(V/A)\n", + "\n", + "mu = t*rho*a*(0.1)*98.1/(32*A*10*log(H1/H2))\n", + "\n", + "print \"Viscosity of the liquid =\",round(mu,4),\"poise\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Viscosity of the liquid = 0.0182 poise\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 8.5 Page no 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "\n", + "from math import *\n", + "\n", + "\n", + "S = 0.81 # specific gravity of oil\n", + "\n", + "mu = 4*10**-5 # viscosity of oil in lb.s/ft**2\n", + "\n", + "gma = 62.4*S # density in lbs/ft**3\n", + "\n", + "p1 = 6.51 # pressure at point 1 in psia\n", + "\n", + "p2 = 8 # pressure at point 2 in psia\n", + "\n", + "h = 0.006 # distance between the plate in ft\n", + "\n", + "l = 4 # length of the plate in ft\n", + "\n", + "theta = pi/6 # angle of inclination\n", + "\n", + "\n", + "\n", + "P1 = p1*144 + gma*l*sin(theta)\n", + "\n", + "\n", + "P2 = p2*144\n", + "\n", + "\n", + "Sp = (P2-P1)/4\n", + "\n", + "\n", + "y = h\n", + "\n", + "\n", + "q = (2154.75*y**2/2) - (359125*y**3/3)\n", + "\n", + "print \"Discharge q = \",round(q,3),\"per unit ft of the plate\"\n", + "\n", + "\n", + "dV = 2154.75 - 718250*h\n", + "\n", + "\n", + "T = -mu*dV\n", + "\n", + "print \"Shear stress on the plate = \",round(T,3),\"lbs/ft**2 and resisting the motion of the plate\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge q = 0.013 per unit ft of the plate\n", + "Shear stress on the plate = 0.086 lbs/ft**2 and resisting the motion of the plate\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics/Chapter9.ipynb b/Fluid_Mechanics/Chapter9.ipynb new file mode 100755 index 00000000..503ee70d --- /dev/null +++ b/Fluid_Mechanics/Chapter9.ipynb @@ -0,0 +1,799 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:81c0a87082bc2a398c522de3be6bcb735589adaa60c31ff7051c7c79b83652d0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Chapter 9 : Turbulent flow in Pipes" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.1 Page no 308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "S = 1.26 # specific gravity\n", + "\n", + "mu = 0.826 # kinematic viscosity in Ns/m**2\n", + "\n", + "\n", + "rho = 998 # density of water in kg/m**3\n", + "\n", + "mu1 = 1.005*10**-3 # viscosity in Ns/m**2\n", + "\n", + "\n", + "rho1 = S*rho # density of glycerine in kg/m**3\n", + "\n", + "Q = 0.1 # discharge in m**3/s\n", + "\n", + "d1 = 0.2 # diameter in m\n", + "\n", + "A = pi*d1**2/4 # area in m**2\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "l =100 # length of the pipe\n", + "\n", + "\n", + "V = Q/A\n", + "\n", + "R = rho1*V*d1/mu\n", + "\n", + "print \"It is a laminar flow\"\n", + "\n", + "f = 64/R # friction factor\n", + "\n", + "Hf = f*l*V**2/(2*g*d1) # head loss due to friction\n", + "\n", + "print \"(a) Head loss due to flow for glycerine =\",round(Hf,1),\"m \"\n", + "\n", + "R1 = rho*V*d1/mu1\n", + "\n", + "print \"The flow is turbulent\"\n", + "\n", + "e = 0.025\n", + "\n", + "r = e/(d1*100)\n", + "\n", + "f = 0.021\n", + "\n", + "hf = f*l*V**2/(2*g*d1)\n", + "\n", + "print \"(a) Head loss due to flow for water =\",round(hf,2),\"m \"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "It is a laminar flow\n", + "(a) Head loss due to flow for glycerine = 17.1 m \n", + "The flow is turbulent\n", + "(a) Head loss due to flow for water = 5.42 m \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.2 Page no 311" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "\n", + "nu = 1.007*10**-6 # viscosity in m**2/s\n", + "\n", + "e = 0.025 # for cast iron in cm\n", + "\n", + "L = 100 # length of the pipe in m\n", + "\n", + "D = 0.2 # diameter in m\n", + "\n", + "hf = 5.43 # head loss due to friction\n", + "\n", + "r = e/(D*100)\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "\n", + "A = sqrt(2*g*D*hf/L)\n", + "\n", + "B = D/nu\n", + "\n", + "f = 0.021 # from moodys diagram\n", + "\n", + "V = A/sqrt(f)\n", + "\n", + "print V\n", + "\n", + "R = B*f\n", + "\n", + "A = pi*D**2/4\n", + "\n", + "Q = A*V\n", + "\n", + "print \"Discharge =\",round(Q,2),\"m**3/s\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "3.1853324563\n", + "Discharge = 0.1 m**3/s\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.3 Page no 314" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "Q =0.1 # discharge in m**3/s\n", + "\n", + "hf = 5.43 # friction loss head in m\n", + "\n", + "L = 100 # length of pipe\n", + "\n", + "nu = 1.00*10**-6 # viscosity in m**2/s\n", + "\n", + "e = 0.025 # for cast iron in cm\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "\n", + "A = 8*L*Q**2/(hf*g*pi**2)\n", + "\n", + "B = 4*Q/(pi*nu)\n", + "\n", + "D = 0.172\n", + "\n", + "r = e/D\n", + "\n", + "Re = B/D\n", + "\n", + "f = 0.022 # for Re and r\n", + "\n", + "\n", + "D1 = 0.199\n", + "\n", + "r1 = e/D1\n", + "\n", + "R = B/D1\n", + "\n", + "f = 0.021 # for R and r\n", + "\n", + "print \"Hence the convergence is attained, D=\",round(D1,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hence the convergence is attained, D= 0.2 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.4 Page no 318" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "L = 500 # length of the pipe in ft\n", + "\n", + "D= 9*2.54/100 # diameter in cm\n", + "\n", + "C = 100 # constant\n", + "\n", + "S = 0.004\n", + "\n", + "\n", + "Hf = S*L\n", + "\n", + "print \"Head loss =\",round(Hf,0),\"ft\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Head loss = 2.0 ft\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.5 Page no 319" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "Q = 0.1 # water flow rate in m**3/s\n", + "\n", + "d = 30 # diameter in m\n", + "\n", + "l = 500 # length in m\n", + "\n", + "e = 0.025 # for cast iron\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "\n", + "r = log(d/e,10)\n", + "\n", + "K = (pi/4)*sqrt(2*g)*(2*r+1.14)*(0.3)**(2.5)\n", + " \n", + "S = (Q/K)**2\n", + "\n", + "hf = S*l\n", + "\n", + "print \"Head loss of water =\",round(hf,1),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Head loss of water = 3.2 m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.6 Page no 319" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "Q = 0.1 # water flow rate in m**3/s\n", + "\n", + "d = 20 # diameter in cm\n", + "\n", + "l = 500 # length in m\n", + "\n", + "e = 0.025 # for cast iron\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "S = 5.43 \n", + "\n", + "\n", + "r = log(d/e,10)\n", + "\n", + "K = (pi/4)*sqrt(2*g)*(2*r+1.14)*(0.2)**2.5\n", + "\n", + "Q=K*sqrt(S/100)\n", + "\n", + "print \"Head loss of water =\",round(Q,2),\"m**3/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Head loss of water = 0.1 m**3/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.7 Page no 320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "eps = 0.025*10**-2 # for cast iron epsilon = 0.0025 cm\n", + "\n", + "\n", + "\n", + "D = 0.2 # value in m\n", + "\n", + "g = 9.81\n", + "\n", + "\n", + "K = (pi/4)*sqrt(2*g)*(2*log10(D/(eps))+1.14)*D**(2.5)\n", + "\n", + "print \"K = \",round(K,3),\" from trial and error\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "K = 0.432 from trial and error\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.8 Page no 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "d = 0.1 # diameter of the pipe\n", + "\n", + "Q= 0.075 # discharge in m**3/s\n", + "\n", + "L = 30 # length in m\n", + "\n", + "A = pi*d**2/4\n", + "\n", + "g = 9.81 # acceleration due to gravity in m/s**2\n", + "\n", + "\n", + "nu = 1.007*10**-6 # viscosity in m**2/s\n", + "\n", + "e = 0.025\n", + "\n", + "r = e/(10*d)\n", + "\n", + "\n", + "V = Q/A\n", + "\n", + "Re = V*d/nu\n", + "\n", + "f = 0.025 # firction factor from moodys diagram\n", + "\n", + "hf = f*L*V**2/(2*g*d) \n", + "\n", + "K= 0.5 # contraction constant\n", + "\n", + "hc = K*V**2/(2*g) \n", + "\n", + "K1 =10 # loss of the globe valve\n", + "\n", + "hg = K1*V**2/(2*g)\n", + "\n", + "Th = hf+hc+hg\n", + "\n", + "print \"Total head loss =\",round(Th,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total head loss = 83.7 m\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.9 Page no 328" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "\n", + "nu = 1.007*10**-6 # viscosity in m**2/s\n", + "\n", + "d1 = 0.3 # diameter of pipe 1 in m\n", + "\n", + "d2 = 0.15 # diameter of pipe 2 in m\n", + "\n", + "d3 = 0.08 # diameter of pipe 3 in m\n", + "\n", + "g = 9.81 # acclelration due to gravity in m/s**2\n", + "\n", + "e = 0.025 # for cast iron\n", + "\n", + "f1 = 0.019 # foe e/d1\n", + "\n", + "f2 = 0.022 # foe e/d2\n", + "\n", + "\n", + "V3 = sqrt(2*g*100/((8.4*(f1)+268.85*(f2)+4.85)))\n", + "\n", + "V1 = (d3/d1)**2*V3\n", + "\n", + "V2 = (d3/d2)**2*V3\n", + "\n", + "\n", + "R1 = V1*d1/nu\n", + "\n", + "R2 = V2*d2/nu\n", + "\n", + "Q = V3*pi*d3**2/4\n", + "\n", + "print \"Discharge through the pipe =\",round(Q,3),\"m**3/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge through the pipe = 0.067 m**3/s\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.10 Page no 332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "D = 0.2 # diameter of pipe 1\n", + "\n", + "D1 = 0.15 # diameter of pipe 2\n", + "\n", + "Q = 0.1 # discharge in m**3/s\n", + "\n", + "nu = 1.007*10**-6 # viscosity in m**2/s\n", + "\n", + "e = 0.025 # e for cast iron\n", + "\n", + "r = e/(100*D) \n", + "\n", + "\n", + "V = Q/(pi*(0.2)**2/4)\n", + "\n", + "R = V*D/nu\n", + "\n", + "f = 0.021 # from moodys law\n", + "\n", + "r2 = e/D1\n", + "\n", + "V1 = Q/(pi*D1**2/4)\n", + "\n", + "R1 = V*D1/nu\n", + "\n", + "f2 = 0.023 # from moodys law\n", + "\n", + "L2 = 28562*D1**5/f2\n", + "\n", + "print \"Replacement of the flow system =\",round(L2,2),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Replacement of the flow system = 94.3 m\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.11 Page no 335" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "e = 0.025 # in cm\n", + "\n", + "nu = 1.007*10**-6 # viscosity in m**2/s\n", + "\n", + "Q1 = 0.5 # discharge in m**3/s\n", + "\n", + "D1 = 50\n", + "\n", + "L1 = 500 # length in m\n", + "\n", + "g = 9.81\n", + "\n", + "\n", + "r1 = e/D # r1 for pipe 1\n", + "\n", + "V1 = Q1/(pi*(0.5)**2/4)\n", + "\n", + "R = V*(0.5)/nu\n", + "\n", + "f1 = 0.018 # for the reynolds no\n", + "\n", + "hf1 = f*L1*V1**2/(2*g*D1)\n", + "\n", + "\n", + "hf2 = hf1\n", + "\n", + "L2 =200 # length in m\n", + "\n", + "D2 = 0.3 # diameter in m\n", + "\n", + "r2 = e/D2\n", + "\n", + "f2 = 0.02 \n", + "\n", + "V2 = 0.419/sqrt(f2) \n", + "\n", + "R2 = V2*D2/nu\n", + "\n", + "Q2 = V2*(pi*D2**2/4)\n", + "\n", + "\n", + "hf3=hf1\n", + "\n", + "L3 = 300 # length of pipe 3 in m\n", + "\n", + "D3 =0.15 # diameter of pipe 3 in m\n", + "\n", + "r3 = e/D3 \n", + "\n", + "f = 0.022 # from moody's law\n", + "\n", + "V3 = 0.242/sqrt(f2)\n", + "\n", + "R3 = V3*D3/nu\n", + "\n", + "Q3 = V3*(pi*D3**2/4)\n", + "\n", + "Td = Q1+Q2+Q3\n", + "\n", + "q1 = Q1*(2.0/Td)\n", + "\n", + "q2 = Q2*(2.0/Td)\n", + "\n", + "q3 = Q3*(2.0/Td)\n", + "\n", + "print \"Discharge through branch 1 =\",round(q1,2),\"m**3/s\"\n", + "\n", + "print \"Discharge through branch 2 =\",round(q2,3),\"m**3/s\"\n", + "\n", + "print \"Discharge through branch 3 =\",round(q3,3),\"m**3/s\"\n", + "\n", + "\n", + "d = 0.5\n", + "\n", + "v1 = q1/(pi*(d)**2/4)\n", + "\n", + "R4 = v1*d/nu\n", + "\n", + "r4 = 0.0005 # ratio of e/D\n", + "\n", + "f = 0.018\n", + "\n", + "Hf1 = f*L1*v1**2/(2*g*d)\n", + "\n", + "print \"It is found that hf1=hf2=hf3 =\",round(Hf1,1),\"The distribution od discharge is correct\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Discharge through branch 1 = 1.35 m**3/s\n", + "Discharge through branch 2 = 0.566 m**3/s\n", + "Discharge through branch 3 = 0.082 m**3/s\n", + "It is found that hf1=hf2=hf3 = 43.5 The distribution od discharge is correct\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 9.14 Page no 349" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "from math import *\n", + "\n", + "\n", + "e = 0.00015 # from moody's chart\n", + "\n", + "D = 2 # depth in ft\n", + "\n", + "r = e/D\n", + "\n", + "z1 = 100 # elevation in ft\n", + "\n", + "mu = 1.084*10**-5 # viscosity in Ns/ft**2\n", + "\n", + "p1 = 34 # pressure head in ft\n", + "\n", + "p2 = 10 # pressure head in ft\n", + "\n", + "g = 32.2 # acclelration due to gravity in ft/s**2\n", + "\n", + "L = 1000 # length in ft\n", + "\n", + "\n", + "f = 0.011 # assume\n", + "\n", + "V = sqrt(100/(10000/(2*2*g)))/sqrt(f)\n", + "\n", + "R = V*D/mu\n", + "\n", + "V1 = 10.15\n", + "\n", + "f1 = 0.0125\n", + "\n", + "Q = V1*pi*D**2/4\n", + "\n", + "x = p1-p2-(V1**2/(2*g))-(f1*L*V1**2/(2*g*D))\n", + "\n", + "Dp = 30 - x\n", + "\n", + "print \"Minimum depth =\",round(Dp,2),\"ft\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum depth = 17.6 ft\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Fluid_Mechanics/README.txt b/Fluid_Mechanics/README.txt new file mode 100755 index 00000000..8c978256 --- /dev/null +++ b/Fluid_Mechanics/README.txt @@ -0,0 +1,10 @@ +Contributed By: Rahul Joshi +Course: mtech +College/Institute/Organization: IIT Bombay +Department/Designation: Mechanical Engineering +Book Title: Fluid Mechanics +Author: Irfan A. Khan +Publisher: Holt, Rinehart and Winston, The Dryden Press , Saunders College Publishing +Year of publication: 1987 +Isbn: 0-03-071473-7 +Edition: 1st Edition \ No newline at end of file diff --git a/Fluid_Mechanics/screenshots/Screenshot_from_2014-04-24_10_11_42.png b/Fluid_Mechanics/screenshots/Screenshot_from_2014-04-24_10_11_42.png new file mode 100755 index 00000000..03ac1d9d Binary files /dev/null and b/Fluid_Mechanics/screenshots/Screenshot_from_2014-04-24_10_11_42.png differ diff --git a/Fluid_Mechanics/screenshots/plot1.png b/Fluid_Mechanics/screenshots/plot1.png new file mode 100755 index 00000000..caf0a78f Binary files /dev/null and b/Fluid_Mechanics/screenshots/plot1.png differ diff --git a/Fluid_Mechanics/screenshots/plot2.png b/Fluid_Mechanics/screenshots/plot2.png new file mode 100755 index 00000000..35633e7f Binary files /dev/null and b/Fluid_Mechanics/screenshots/plot2.png differ -- cgit