diff options
author | root | 2014-07-07 16:45:58 +0530 |
---|---|---|
committer | root | 2014-07-07 16:45:58 +0530 |
commit | 1b0d935754549d175d2bad3d5eb5dc541bd7a0d4 (patch) | |
tree | fe73fe578ee4ce75d83ca61cdc533c4110d03a2a /Fluid_Mechanics_/Chapter4.ipynb | |
parent | fffcc90da91b66ee607066d410b57f34024bd1de (diff) | |
download | Python-Textbook-Companions-1b0d935754549d175d2bad3d5eb5dc541bd7a0d4.tar.gz Python-Textbook-Companions-1b0d935754549d175d2bad3d5eb5dc541bd7a0d4.tar.bz2 Python-Textbook-Companions-1b0d935754549d175d2bad3d5eb5dc541bd7a0d4.zip |
removing unwanted files
Diffstat (limited to 'Fluid_Mechanics_/Chapter4.ipynb')
-rw-r--r-- | Fluid_Mechanics_/Chapter4.ipynb | 529 |
1 files changed, 0 insertions, 529 deletions
diff --git a/Fluid_Mechanics_/Chapter4.ipynb b/Fluid_Mechanics_/Chapter4.ipynb deleted file mode 100644 index ea310eb2..00000000 --- a/Fluid_Mechanics_/Chapter4.ipynb +++ /dev/null @@ -1,529 +0,0 @@ -{ - "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 |