From 2c007afb09c2620205730ed5e7c57d97487e420a Mon Sep 17 00:00:00 2001 From: Trupti Kini Date: Sat, 25 Jun 2016 23:30:25 +0600 Subject: Added(A)/Deleted(D) following books A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter10_2.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter11.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter12_2.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter13_2.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter14_2.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter15_2.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter16_2.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter1_2.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter2_2.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter3.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter4.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter5.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter6_2.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter7_2.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter8_2.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter9_2.ipynb A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_01_00.png A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_01_25.png A 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_02_44.png --- .../chapter10_2.ipynb | 909 +++++++++++++ .../chapter11.ipynb | 574 ++++++++ .../chapter12_2.ipynb | 1373 ++++++++++++++++++++ .../chapter13_2.ipynb | 749 +++++++++++ .../chapter14_2.ipynb | 785 +++++++++++ .../chapter15_2.ipynb | 582 +++++++++ .../chapter16_2.ipynb | 871 +++++++++++++ .../chapter1_2.ipynb | 962 ++++++++++++++ .../chapter2_2.ipynb | 858 ++++++++++++ .../chapter3.ipynb | 964 ++++++++++++++ .../chapter4.ipynb | 763 +++++++++++ .../chapter5.ipynb | 486 +++++++ .../chapter6_2.ipynb | 885 +++++++++++++ .../chapter7_2.ipynb | 943 ++++++++++++++ .../chapter8_2.ipynb | 841 ++++++++++++ .../chapter9_2.ipynb | 723 +++++++++++ .../Screenshot_from_2016-01-14_17_01_00.png | Bin 0 -> 97215 bytes .../Screenshot_from_2016-01-14_17_01_25.png | Bin 0 -> 98330 bytes .../Screenshot_from_2016-01-14_17_02_44.png | Bin 0 -> 92700 bytes 19 files changed, 13268 insertions(+) create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter10_2.ipynb create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter11.ipynb create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter12_2.ipynb create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter13_2.ipynb create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter14_2.ipynb create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter15_2.ipynb create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter16_2.ipynb create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter1_2.ipynb create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter2_2.ipynb create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter3.ipynb create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter4.ipynb create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter5.ipynb create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter6_2.ipynb create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter7_2.ipynb create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter8_2.ipynb create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter9_2.ipynb create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_01_00.png create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_01_25.png create mode 100644 1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_02_44.png diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter10_2.ipynb b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter10_2.ipynb new file mode 100644 index 00000000..475c2087 --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter10_2.ipynb @@ -0,0 +1,909 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9fb8f046854eae9d21b30aac47c32add8b7b352fc02c558db335f7a7c30f0313" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 10:Turbulent Pipe Flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.1 Page No216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "D=2 #diameter in cm\n", + "\n", + "v=0.0098 #viscosity of water\n", + "\n", + "Re=2000 #Critical Reynolds number\n", + "\n", + "rho=998 #density in kg/m^3\n", + "\n", + "#solution\n", + "\n", + "V=Re*v/10000/(D/100) #Calculating V\n", + "\n", + "L=(math.pi/4)*((D/100)**2)*V\n", + "\n", + "print \"The required Largest Discharge\",round(L*1000*60,3),\"L/min\"\n", + "\n", + "f=64/Re\n", + "\n", + "u=V*(math.sqrt(f/8)) #Boundary shear stress\n", + "\n", + "tou=rho*(u**2)\n", + "\n", + "print \"tou=\",round(tou,4),\"Pa\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required Largest Discharge 1.847 L/min\n", + "tou= 0.0383 Pa\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.2 Page No216" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "from sympy import *\n", + "\n", + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "f=0.02 #Friction factor\n", + "\n", + "#Calculation\n", + "\n", + "Ut=math.sqrt(f/8) #Shear velocity\n", + "\n", + "print \"U*=\",Ut,\"V\"\n", + "\n", + "Um=1.43*math.sqrt(f)+1 #Maximum velocity\n", + "\n", + "print \"Um=\",round(Um,5),\"V\"\n", + "\n", + "r0=1\n", + "\n", + "y=r0-0.3*r0\n", + "\n", + "#Let us take (u-V/U*) as U\n", + "\n", + "a=round(log(0.7,10),4)\n", + "\n", + "U=5.75*a+3.75\n", + "\n", + "#But,U*=0.05V\n", + "\n", + "#Let's take u/V as V #Ratio of local velcotiy to mean velocity\n", + "\n", + "V=U*(Ut)\n", + "\n", + "print \"u/V=\",round(V+1,5)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "U*= 0.05 V\n", + "Um= 1.20223 V\n", + "u/V= 1.14297\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.5 Page No217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "f=0.035 #friction factor\n", + "\n", + "Re=1E+5 #Reynolds number\n", + "\n", + "d=10 #diameter in cm\n", + "\n", + "Es=0.80 #roughness of pipe\n", + "\n", + "#solution\n", + "\n", + "ro=(d/2)/100 #Radius in m\n", + "\n", + "delta=(65.6*ro)/(Re*math.sqrt(f))*1000 #Thickness of lamina sublayer\n", + "\n", + "print \"delta=\",round(delta,3),\"mm\" \n", + "\n", + "Es_delta=Es/delta\n", + "\n", + "print \"Es_delta=\",round(Es_delta,2)\n", + "\n", + "print \"This value being less than 6.0 and greater than 0.25,the pipe flow is in transition regime\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "delta= 0.175 mm\n", + "Es_delta= 4.56\n", + "This value being less than 6.0 and greater than 0.25,the pipe flow is in transition regime\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.6 Page No217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "r0=0.10 #Constant value\n", + "\n", + "epsillon=0.0002 #roughness magnitude in mm\n", + "\n", + "v=1E-6 #velocity in m**2/s\n", + "\n", + "D=0.2 #Diameter in mm\n", + "\n", + "#Calculation\n", + "\n", + "#Transition from the smooth pipe regime begins at,\n", + "\n", + "Ref=17*(r0/epsillon)\n", + "\n", + "Re=(2*(math.log(Ref,10))-0.8)*Ref #friction factor\n", + "\n", + "V=(Re*v)/D\n", + "\n", + "print \"Velocity at the upper limit of smooth pipe regime is\",round(V,1),\"m/s\"\n", + "\n", + "#Fully rough turbulent flow begins at,\n", + "\n", + "Ref=400*(r0/epsillon)\n", + "\n", + "Re=(2*(math.log((r0/epsillon),10))+1.74)*Ref\n", + "\n", + "V=(Re*v)/D\n", + "\n", + "print \"The flow will be at fully rough turbulent regime at V=\",round(V,2),\"m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity at the upper limit of smooth pipe regime is 0.3 m/s\n", + "The flow will be at fully rough turbulent regime at V= 7.14 m/s\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.7 Page No218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "r0=0.30 #constant value\n", + "\n", + "v1=4.50 #velocity in m/s\n", + "\n", + "v2=4.20 #velocity in m/s\n", + "\n", + "D=60 #diameter in cm\n", + "\n", + "#Calculation\n", + "\n", + "D=D/100\n", + "\n", + "u=(v1-v2)/(5.75*(math.log((r0/(0.20)),10)))#For smooth and rough pipe\n", + "\n", + "V=(3.75*u)-v1 #mean velocity V related to um as,\n", + "\n", + "Q=math.pi/4*(D**2)*V #Discharge\n", + "\n", + "print \"Q=\",round(-Q,3),\"m**3/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q= 0.958 m**3/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.14 Page No220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "rho=804 #Relative density in kg/m^3\n", + "\n", + "mu=1.92E-3 #viscosity in Pa.s.\n", + "\n", + "D=20 #Diameter in cm\n", + "\n", + "v=3 #Velocity in m/s\n", + "\n", + "r0=0.10 #Constant value\n", + "\n", + "#Calculation\n", + "\n", + "D=D/100#Converting into m\n", + "\n", + "Re=rho*v*D/mu\n", + "\n", + "#At the permissible height of roughness in the pipe the flow will be in smooth-turbulent regime.\n", + "\n", + "f=0.0032+(0.221/(Re**0.237))\n", + "\n", + "#Since the pipe will behave as smooth,at the limiting value\n", + "\n", + "epsillon=r0/((Re*math.sqrt(f))/17)\n", + "\n", + "print \"Permissible height of surface roughness=\",round(epsillon*1000,4),\"mm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Permissible height of surface roughness= 0.0556 mm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.15 Page No220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "r0=0.05 #radius \n", + "\n", + "epsillon=0.0002 #roughness magnitude in m\n", + "\n", + "r1=0.075 #radius\n", + "\n", + "D1=10 #Diameter in cm\n", + "\n", + "D2=15 #Diameter in cm\n", + "\n", + "#Calculation\n", + "\n", + "f1=round(1/((2*(math.log((r0/epsillon),10)))+1.74)**2,4)\n", + "\n", + "f2=round(1/((2*(math.log((r1/epsillon),10)))+1.74)**2,4)\n", + "\n", + "#P1/P2 is taken as P\n", + "\n", + "P=(f1/f2)*((D2/D1)**5) #Ratio of powers,\n", + "\n", + "#Cost of pumping is proportional to power consumed.\n", + "\n", + "print \"cost of pumping in 10cm pipe/cost of pumping in 15 cm=\",round(P,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "cost of pumping in 10cm pipe/cost of pumping in 15 cm= 8.42\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.18 Page No222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "v=1.0E-6 #Velocity in m/s\n", + "\n", + "epsillon_s=15E-3 #roughness in m\n", + "\n", + "epsillon2_s=0.2E-3 #roughness in m\n", + "\n", + "Q=4.0 #discharge in m\n", + "\n", + "D1=1.5 #diameter in m\n", + "\n", + "t=0.01 #thickness\n", + "\n", + "g=9.81 #gravity \n", + "\n", + "L=1000 #length \n", + "\n", + "ga=9.79 #density\n", + "\n", + "#Calculation\n", + "\n", + "V1=round(Q/((math.pi/4)*(D1**2)),3)\n", + "\n", + "Re1=round(V1*D1/v,3)\n", + "\n", + "#From the emrpirical equivalent of colrebook equation,\n", + "\n", + "f1=round((1/(1.14-(2*(math.log(((epsillon_s/D1)+(21.25/Re1**0.9)),10)))))**2,4)\n", + "\n", + "#After the lining,\n", + "\n", + "D2=D1-2*t #Diameter2 calculation\n", + "\n", + "V2=round(Q/((math.pi/4)*(D2**2)),4)\n", + "\n", + "Re2=round(V2*D2/v,3)\n", + "\n", + "#From the emrpirical equivalent of colrebook equation,\n", + "\n", + "f2=round((1/(1.14-(2*(math.log(((epsillon2_s/D2)+(21.25/Re2**0.9)),10)))))**2,4)\n", + "\n", + "h_f1=round((f1*L*(V1**2))/(2*g*D1),3)\n", + "\n", + "h_f2=round((f2*L*(V2**2))/(2*g*D2),6)\n", + "\n", + "h_s=round(h_f1-h_f2,5) #Saving in head\n", + "\n", + "Ps=ga*Q*h_s #Saving in power\n", + "\n", + "print\"answer in the book is wrong.It should be as,\"\n", + "\n", + "print \"Ps=\",round(Ps,1),\"kW\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "answer in the book is wrong.It should be as,\n", + "Ps= 162.3 kW\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.19 Page No222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "D=0.25 #Diameter in m\n", + "\n", + "v=1E-6 #velocity\n", + "\n", + "epsillon_s=0.15E-3 #roughness\n", + "\n", + "h_f=0.025 #hydraulic gradient\n", + "\n", + "L=100 #length in m\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "ga=9790 #density\n", + "\n", + "#calculation\n", + "\n", + "#Re*math.sqrrt(f) is taken as Ref\n", + "\n", + "#Re(math.sqrt(f))=(((V*D)/v)*((2*g*h_f*D)/(V**2*L)))\n", + "\n", + "Ref=(((D)**(3/2))/v)*((2*g*h_f)**(1/2))\n", + "\n", + "#By colerbrook formula,\n", + "\n", + "f1=round((1/(1.14-(2*(math.log(((epsillon_s/D)+(9.35/Ref)),10)))))**2,5)\n", + "\n", + "Re=round(Ref/math.sqrt(f1),3)\n", + "\n", + "V=round((Re*v)/D,4)\n", + "\n", + "Q=(math.pi/4)*(D**2)*V #Discharge\n", + "\n", + "print \"Q=\",round(Q*1000,1),\"L/s\"\n", + "\n", + "h_f=h_f*100 #head lost in 100 m length of pipe\n", + "\n", + "P=ga*Q*h_f\n", + "\n", + "print \"P=\",round(P/1000,2),\"kW\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q= 127.9 L/s\n", + "P= 3.13 kW\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.20 Page No223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "L=1500 #Length in m\n", + "\n", + "Q=250 #discharge in L/s\n", + "\n", + "g=9.81 #gravity \n", + "\n", + "h_f=15 #head loss\n", + "\n", + "epsillon_s=0.12E-3 #roughness\n", + "\n", + "v=1E-6 #viscosity in m^2/s\n", + "\n", + "#Calculation\n", + "\n", + "Q=Q/1000\n", + "\n", + "#hf=fLV^2/2gD=(8*L*(Q**2))/((math.pi**2)*g)\n", + "\n", + "D=((8*L*(Q**2))/((math.pi**2)*g))/h_f\n", + "\n", + "#Re=1/D)(4*Q)/(math.pi*v)\n", + "\n", + "#trial and error procedure is adpoted,\n", + "\n", + "#1 st trail,assume\n", + "\n", + "f=0.025\n", + "\n", + "D1=(D*f)**(1/5)\n", + "\n", + "Re=((4*Q)/(math.pi*v))/D1\n", + "\n", + "f=round((1/(1.14-(2*(math.log(((epsillon_s/D1)+(21.25/Re**0.9)),10)))))**2,4)\n", + "\n", + "#trial and error procedure is adpoted,\n", + "\n", + "#2 nd trail,assume\n", + "\n", + "f=0.0159\n", + "\n", + "D1=(D*f)**(1/5)\n", + "\n", + "Re=((4*Q)/(math.pi*v))/D1\n", + "\n", + "f=round((1/(1.14-(2*(math.log(((epsillon_s/D1)+(21.25/Re**0.9)),10)))))**2,4)\n", + "\n", + "#This value is practically same as assumbed hence no further trails are required.\n", + "\n", + "#In practicce,the next larger size would be used.\n", + "\n", + "print \"The required diameter D=\",round(D1*100,1),\"cm\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required diameter D= 38.3 cm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.21 Page No223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "v=1E-6 #Viscosity in m^2/s\n", + "\n", + "V=1 #Velcoity in m/s\n", + "\n", + "L=100 #Length in m\n", + "\n", + "h_f=10/100 #headloss\n", + "\n", + "epsillon_s=0.45E-3 #roughness\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "#Calculation\n", + "\n", + "#Re=V*D/v\n", + "\n", + "Re=(V)/v #Reynolds number\n", + "\n", + "f=0.0055*(1+(2000*epsillon_s+1)**(1/3))\n", + "\n", + "#h_f=f*L*V^2/2gD\n", + "\n", + "f1=(2*g*h_f)/(L*V**2)\n", + "\n", + "#Using trial and error methods,F is found to be 0.0133,\n", + "\n", + "f=0.0133\n", + "\n", + "D=f/f1\n", + "\n", + "print \"D=\",round(D,3),\"m\"\n", + "\n", + "#This value is practically same as assumbed hence no further trails are required.\n", + "\n", + "#In practicce,the next larger size would be used.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "D= 0.678 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.22 Page No224" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "Rd=0.85 #relative density of oil\n", + "\n", + "L=150 #length in m\n", + "\n", + "h_f=67 #head loss in m\n", + "\n", + "v=0.1 #viscosity in cm\n", + "\n", + "Q=80 #Discharge in L/s\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "#Calculation\n", + "\n", + "Q=Q/1000#Converting into m\n", + "\n", + "v=v/10000\n", + "\n", + "#h_f=f*L*V**2/(2*g*D)\n", + "\n", + "f=h_f*(math.pi**2)*g/(8*L*(Q**2))\n", + "\n", + "#D=f/(844.66)**(1/5)\n", + "\n", + "#Reynolds number,\n", + "\n", + "Re=(4*Q)/(math.pi*v)\n", + "\n", + "#Re=Re*(1/D)\n", + "\n", + "#A trial and error procedure is used.\n", + "\n", + "#1 st trial assume,\n", + "\n", + "f1=0.02\n", + "\n", + "D=(f1/f)**(1/5)\n", + "\n", + "Re1=Re*(1/D)\n", + "\n", + "#As Re<10^5,Blasius formula can be used.\n", + "\n", + "#2nd trial,\n", + "\n", + "f1=0.316/(Re1**(1/4))\n", + "\n", + "D=round((f1/f)**(1/5)*100,1)\n", + "\n", + "Re2=Re/D\n", + "\n", + "#3 rs trial,\n", + "\n", + "f1=0.316/(Re2**(1/4))\n", + "\n", + "print \"The required diameter is D=\",round(D,2),\"cm\"\n", + "\n", + "#This value is practically same as assumbed hence no further trails are required.\n", + "\n", + "#In practicce,the next larger size would be used." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required diameter is D= 11.7 cm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 10.23 Page No223" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "rho=1.20 #relative density\n", + "\n", + "l=0.4 #length in m\n", + "\n", + "b=0.25 #breadth in m\n", + "\n", + "V=20 #velcity in m/s\n", + "\n", + "v=1.5E-5 #viscosity\n", + "\n", + "epsillon_s=0.05E-3 #roughness\n", + "\n", + "ga=9.81*1.2 #gravity\n", + "\n", + "eta=0.60 #efficiency\n", + "\n", + "L=200 #length in m\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "#Calculation\n", + "\n", + "area=l*b #Calculating area\n", + "\n", + "perimeter=2*(l+b) #Calculating perimeter\n", + "\n", + "Dh=4*(area/perimeter)\n", + "\n", + "Reh=(V*Dh)/v\n", + "\n", + "#By empirical equivalent of colrebook formula,\n", + "\n", + "f=round((1/(1.14-(2*(math.log(((epsillon_s/Dh)+(21.25/Reh**0.9)),10)))))**2,4)\n", + "\n", + "hf=(f*L*(V**2))/(2*g*Dh) #Head loss\n", + "\n", + "print \"hf=\",round(hf,1),\"m(of air column)\"\n", + "\n", + "del_p=int(rho*g*hf)/1000 #pressure loss\n", + "\n", + "print \"del_p=\",round(del_p,3),\"kPa\"\n", + "\n", + "Q=V*l*b\n", + "\n", + "P=ga*Q*hf/eta #Power required at 60% efficiency\n", + "\n", + "print \"P=\",round(P/1000,1),\"kW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "hf= 204.1 m(of air column)\n", + "del_p= 2.402 kPa\n", + "P= 8.0 kW\n" + ] + } + ], + "prompt_number": 15 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter11.ipynb b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter11.ipynb new file mode 100644 index 00000000..55f3b3b7 --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter11.ipynb @@ -0,0 +1,574 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:bb244b39e4a751b06f136d02e7fc5b51ede4385cdce4eee2eabee533d81b8476" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 11:Pipe Flow Systems" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.1 Page No238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "Q=450 #discharge in L/s\n", + "\n", + "D1=6 #diameter in cm\n", + "\n", + "D2=9 #diameter in cm\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "p1=20 #pressure at upstream of the expansion in kN/m^3\n", + "\n", + "ga=9.79 #relative density in kg/m^3\n", + "\n", + "#Calculation\n", + "\n", + "Q=(Q/60)/1000 #coverting into m^3/s\n", + "\n", + "V1=round(Q/((math.pi/4)*((D1/100)**2)),3) #Velocity before expansion\n", + "\n", + "V2=round(V1*(((D1/100)/(D2/100))**2),3) #Velocity downstream of the expansion\n", + "\n", + "H_L=round(((V1-V2)**2)/(2*g),3)\n", + "\n", + "#By energy equation:\n", + "\n", + "#(p1/ga)+(V1**2)/(2*g)+Z1)=(p2/ga)+((V2**2)/(2*g))+Z2\n", + "\n", + "#As Z1=Z2\n", + "\n", + "p2=round(((p1/ga)+(V1**2)/(2*g)-((V2**2)/(2*g))-H_L)*ga,2)\n", + "\n", + "print \"p2=\",p2,\"kPa\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "p2= 21.73 kPa\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.4 Page No239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "L1=1800 #length of pipe1\n", + "\n", + "L2=1200 #length of pipe 2\n", + "\n", + "L3=600 #length of pipe 3\n", + "\n", + "D1=50 #diameter of pipe 1 in cm\n", + "\n", + "D2=40 #diameter of pipe 2 in cm\n", + "\n", + "D3=30 #diameter of pipe 3 in cm\n", + "\n", + "De=40 #Equivalent length of pipe in cm\n", + "\n", + "#Calculation\n", + "\n", + "#It's assumed that f is same for all pipes.\n", + "\n", + "D1=D1/100\n", + "\n", + "D2=D2/100 #Converting into m\n", + "\n", + "D3=D3/100\n", + "\n", + "De=De/100\n", + "\n", + "Le=round(((L1/(D1**5))+(L2/(D2**5))+(L3/(D3**5)))*(De**5),1)\n", + "\n", + "print \"(i)Le=\",Le,\"m\"\n", + "\n", + "Le=3600 #assumed equivalent length of pipe in m\n", + "\n", + "De=round(((Le/((L1/(D1**5))+(L2/(D2**5))+(L3/(D3**5))))**(1/5))*100,2)\n", + "\n", + "print \"(ii)De=\",De,\"cm\"\n", + "\n", + "#when three pipes in parallel\n", + "\n", + "#h_f1=h_f2=h_f3=h_fe\n", + "\n", + "#assume a=(V2/V1),b=(V3/V1),c=Ve/V1\n", + "\n", + "a=round(math.sqrt((L1*D2)/(L2*D1)),4)\n", + "\n", + "b=round(math.sqrt((L1*D3)/(L3*D1)),4)\n", + "\n", + "#Total discharges is given by,Q0=(0.546)*(math.pi/4)*V1\n", + "\n", + "#Qe=(math.pi/4)*(D1/100)**2)*Ve\n", + "\n", + "#for an equivalent pipe,Q0=Qe,so equating,\n", + "\n", + "c=((0.546)/((D1/100)**2))/10000\n", + "\n", + "#Ve/V1=math.sqrt(L1/Le)\n", + "\n", + "Le=L1/c**2\n", + "\n", + "print \"(iii)Le=\",round(Le,2),\"m\"\n", + "\n", + "print \"Using Alternative method,\"\n", + "\n", + "De=0.50 #discharge in m\n", + "\n", + "a=round(((((D1**5)/L1)**(1/2))+(((D2**5)/L2)**(1/2))+(((D3**5)/L3)**(1/2))),4)\n", + "\n", + "Le=((De**5)**(1/2))/a\n", + "\n", + "print \"Le=\",round(Le**2,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)Le= 4318.2 m\n", + "(ii)De= 38.57 cm\n", + "(iii)Le= 377.37 m\n", + "Using Alternative method,\n", + "Le= 377.37 m\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.5 Page No240" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "D1=10 #Diameter of pipe AB in cm\n", + "\n", + "D2=16 #Diameter of pipe BC in cm\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "f=0.02 #value of pipe AB\n", + "\n", + "f1=0.018 #Value of pipe BC\n", + "\n", + "#Calculation\n", + " \n", + "#(i)entrance loss h_L1=0.5 V^2/2g\n", + "\n", + "#(ii)loss at expansion:\n", + "\n", + "#Equating, math.pi/4 *D1^2*V1=math.pi/4 *D2^2*V2\n", + "\n", + "#we get,h_eL=0.3714(V1^2)/(2*g)\n", + "\n", + "#(iii)he=V2^2/(2*g)\n", + "\n", + "#Total loss H_L=6.300(V1**2)/(2*g)\n", + "\n", + "H_L=10 #taking H_L as 10m,\n", + "\n", + "V1=math.sqrt((H_L*2*g)/(6.300))\n", + "\n", + "V2=(((D1/100)/(D2/100))**2)*(V1)\n", + "\n", + "Q=(math.pi/4)*((D1/100)**2)*(V1) #Calculating discharge\n", + "\n", + "print \"Q=\",round(Q*1000,1),\"L/s\" #Converting from m^3/s into L/s\n", + "\n", + "#taking Q=15 L/s\n", + "\n", + "Q=15/1000 #Converting into m^3/s\n", + "\n", + "V1=Q/((math.pi/4)*(D1/100))\n", + "\n", + "H_L=6.300*((V1**2)/(2*g)) #Difference in reservoir elevations \n", + "\n", + "print \"H_L=\",round(H_L*100,3),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q= 43.8 L/s\n", + "H_L= 1.171 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.9 Page No243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "fb=0.018 #friction factor\n", + "\n", + "Lb=100 #length of pipe b in m\n", + "\n", + "D2=12 #diameter of the pipe b in cm\n", + "\n", + "D1=15 #diameter of the pipe 1 in cm\n", + "\n", + "fa=0.018 #friction factor\n", + "\n", + "La=150 #length of pipe 1 in cm\n", + "\n", + "#Calculation\n", + "\n", + "#Since the discharges are same in both the pipes,\n", + "\n", + "#AaVa=AbVb\n", + "\n", + "#math.pi/4*(D1**2)*Va=math.pi/4*(D2**2)*(Vb)\n", + "\n", + "#Vb=((D1/D2)**2)*Va=1.5625Va\n", + "\n", + "#let the loss in the value be Kl*Va**2/2*g\n", + "\n", + "#Head losses in both pipes are the same\n", + "\n", + "D1=D1/100 #Converting into m\n", + "\n", + "D2=D2/100\n", + "\n", + "#(fa*La*Va^2/2gDa)+K_L*(Va^2/2g)=(fbLbVb^2/2gDb)\n", + "\n", + "#calculating value of the valve coefficient\n", + "\n", + "K_L=(fb*Lb*(((D1/D2)**2)**2)/(D2))-((fa*La)/(D1))\n", + "\n", + "print \"K_L=\",round(K_L,2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "K_L= 18.62\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.17 Page No248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "f=0.02 #friction factor\n", + "\n", + "L=1000 #length of pipe in m\n", + "\n", + "h_f=16 #water surface elevation in m\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "D=15 #diameter in cm\n", + "\n", + "L1=600 #length in m\n", + "\n", + "p2=10.3 #atmospherric pressure in m(abs)\n", + "\n", + "Z2=100 #elevation of the upstream in m\n", + "\n", + "Z1=98 #elevation in m\n", + "\n", + "ga=9.79 #density in kg/m^3\n", + "\n", + "p=20.00 #pressure in kPa\n", + "\n", + "#Calculation\n", + "\n", + "D=D/100\n", + "\n", + "V=round(math.sqrt((h_f*(2*g*D))/(f*L)),3)\n", + "\n", + "Q=round(((math.pi/4)*(D**2)*(V))*1000,1)\n", + "\n", + "#Head loss upto the summit=h_f1\n", + "\n", + "h_f1=round(((f*L1)/(2*g*D))*(V**2),1)\n", + "\n", + "#By energy equation between upstream reservoir water surface and the summit.\n", + "\n", + "#(p1/ga)+(V1**2)/(2*g)+Z1)=(p2/ga)+((V**2)/(2*g))+Z2\n", + "\n", + "p1=((p2+Z2)-((V**2)/(2*g)+Z1+h_f1))*ga\n", + "\n", + "print \"(a)p1=\",round(p1,2),\"kPa\"\n", + "\n", + "#By energy equation,\n", + "\n", + "a=p2+Z2\n", + "\n", + "b=(p/ga)+Z1 #Calculating volume V1\n", + "\n", + "V1=math.sqrt((a-b)/(1+((f*L1)/(2*g*D))))\n", + "\n", + "Q1=(math.pi/4)*(D**2)*(V1) #Calculating discharge\n", + "\n", + "print \"(b)Q1=\",round(Q1*1000,1),\"L/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)p1= 25.26 kPa\n", + "(b)Q1= 25.1 L/s\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.28 Page No259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "D=50 #diameter in cm\n", + "\n", + "f=0.019 #friction factor\n", + "\n", + "L=1000 #length in m\n", + "\n", + "H=100 #head at the inlet in m\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "ga=9.79 #density in kg/m^3\n", + "\n", + "#Calculation\n", + "\n", + "D=D/100\n", + "\n", + "#For the condition of maximum power,the diameter of the nozzle,\n", + "\n", + "d=round(((D**5)/(2*f*L))**(1/4)*100,2)\n", + "\n", + "h_f=round(H/3,2) #Head loss\n", + "\n", + "V=math.sqrt(((h_f*2*g*D))/(f*L))\n", + "\n", + "Q=round((math.pi/4)*(D**2)*V,4) #Discharge\n", + "\n", + "Pm=ga*Q*(2/3)*H #Maximum power\n", + "\n", + "print \"Pm=\",round(Pm,1),\"kW\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pm= 531.6 kW\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 11.31 Page No260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "EL_p=100 #length of pipe\n", + "\n", + "EL_a=95 #Length of pipe a\n", + "\n", + "EL_c=110 #Length of pipe c\n", + "\n", + "D1=15 #Diameter in cm\n", + "\n", + "D2=12 #Diameter in cm\n", + "\n", + "Q=0.02 #discharge\n", + "\n", + "f1=f2=0.02 #force\n", + "\n", + "L1=20 #Length in m\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "L2=300 #Length in m\n", + "\n", + "ga=9.79 #density\n", + "\n", + "Ph=10 #atmospheric pressure head in m\n", + "\n", + "#Calculation\n", + "\n", + "r=(D1/2)/100 #Calculating radius\n", + "\n", + "Hs=EL_c-EL_a #Static head\n", + "\n", + "V1=Q/((math.pi/4)*((D1/100)**2)) #Velcoity in the suction pipe\n", + "\n", + "V2=V1*(D1/D2)**2 #Velocity in the delivery pipe\n", + "\n", + "hf1=(f1*L1*(V1**2))/(D1/100*2*g) #Head loss in the suction pipe\n", + "\n", + "hL1=0.5*((V1**2)/(2*g)) #Inlet loss\n", + "\n", + "hf2=(f2*L2*(V2**2))/(D2/100*2*g) #friction loss in the delivery pipe\n", + "\n", + "hL2=((V2**2)/(2*g)) #Loss at exit\n", + "\n", + "TL=hf1+hf2+hL1+hL2 #Total loss\n", + "\n", + "Hf=Hs+TL #Heat delivered by pump\n", + "\n", + "P=ga*Q*Hf #Power delivered\n", + "\n", + "print \"P=\",round(P,2),\"kW\"\n", + "\n", + "#(b)By energy equation between resorviour A and pump B\n", + "\n", + "#Ps=pressure at the suction side of the pump\n", + "\n", + "a=(V1**2)/(2*g)\n", + "\n", + "Ps=(Ph+(EL_a-(EL_p+a+hf1+hL1)))*ga\n", + "\n", + "print \"Ps=\",round(Ps,2),\"kPa(abs)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P= 4.57 kW\n", + "Ps= 46.29 kPa(abs)\n" + ] + } + ], + "prompt_number": 8 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter12_2.ipynb b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter12_2.ipynb new file mode 100644 index 00000000..f81fc6cb --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter12_2.ipynb @@ -0,0 +1,1373 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:c7576411fc8859039bc51685b704f5ec0b51bc813a5e78fb95df2a4cac220a89" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12:Flow in Open Channels" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.1 Page No277" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#variable initialisation\n", + "\n", + "B=2.5 #width in m\n", + "\n", + "y=1.2 #depth in m\n", + "\n", + "s_o=0.0036 #Bed slope\n", + "\n", + "ga=998\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "#solution\n", + "\n", + "A=B*y #area\n", + "\n", + "P=B+2*y #Wetted Perimeter\n", + "\n", + "R=A/P #Hydraulic radius\n", + "\n", + "tou=ga*g*R*s_o #average shear stress\n", + "\n", + "print \"tou=\",round(tou,2),\"Pa\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "tou= 21.58 Pa\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.3 Page No278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "w=10 #width in m\n", + "\n", + "h=1.5 # horizantal slope\n", + "\n", + "v=1 #vertical slope\n", + "\n", + "d=3 #depth in m\n", + "\n", + "n=0.015 #mannings n\n", + "\n", + "Q=100\n", + "\n", + "#solution\n", + "\n", + "A=(w+(h*d))*d #Area\n", + "\n", + "P=round((w+(2*d)*math.sqrt((h**2)+v)),3) #wetted perimeter\n", + "\n", + "R=A/P #hydraulic radius\n", + "\n", + "#By mannings formula\n", + "\n", + "So=((Q*n)/(A*(math.pow(R,2/3))))**2\n", + "\n", + "print \"So=\",'%0.3E' % So\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "So= 4.451E-04\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.4 Page No278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "w=5 #width in m\n", + "\n", + "d=2.3 #depthin m\n", + "\n", + "f=0.02 #friction factor\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "#solution\n", + "\n", + "A=w*d #area\n", + "\n", + "P=w+(2*d) #Wetted perimeter\n", + "\n", + "R=round(A/P ,3) #Hydraulic radius\n", + "\n", + "C=round(math.sqrt((8*g)/f),1) #value of chezy's C\n", + "\n", + "print \"C=\",C\n", + "\n", + "n=(math.pow(R,1/6))\n", + "\n", + "print \"n=\",round(n/C,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C= 62.6\n", + "n= 0.0165\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.5 Page No278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable iniatialization\n", + "\n", + "B=3 #width in m\n", + "\n", + "h=1 #horizantal slope\n", + "\n", + "m=1 #vertical slope\n", + "\n", + "So=0.0036 #bottom slope of channel\n", + "\n", + "y=1.25 #depth in m\n", + "\n", + "Q=15 #discharge in m^3/s\n", + "\n", + "#solution\n", + "\n", + "A=(B+(h*y))*y #area\n", + "\n", + "V=round(Q/A,3) #velocity\n", + "\n", + "P=round(B+(2*y*(math.sqrt((m**2)+1))),4) #wetted perimeter\n", + "\n", + "R=round(A/P,4)\n", + " \n", + "C=V/(math.sqrt(R*So)) #By chezy formula\n", + "\n", + "print \"C=\",round(C,1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C= 52.2\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.6 Page No278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "Q=1.10 #Discharge in m^3/s\n", + "\n", + "n=0.018 #Manning's n\n", + "\n", + "S0=0.0004 #slope \n", + "\n", + "#Calculation\n", + "\n", + "#A=math.pi/8*(D**2)\n", + "\n", + "#Perimeter=D*math.pi/2\n", + "\n", + "#By Manning's formula,discharge\n", + "\n", + "#Q=(1/n)*AR(2/3)S(1/2)\n", + "\n", + "D=(Q*n*8*(4**(2/3)))/(math.pi*(S0**(1/2)))\n", + "\n", + "print \"D=\",round(D**(3/8),3),\"m\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "D= 2.0 m\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.10 Page No279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "m=1.0 #side slopes\n", + "\n", + "Q=50 #discharge\n", + "\n", + "V=2.0 #Velocity in m/s\n", + "\n", + "n=0.02 #Manning's n\n", + "\n", + "#Calculation\n", + "\n", + "A=Q/V#Area\n", + "\n", + "y=(A/9)**(1/2)\n", + "\n", + "print \"y=\",round(y,3),\"m\"\n", + "\n", + "B=8*y\n", + "\n", + "print \"B=\",round(B,2),\"m\"\n", + "\n", + "P=B+(2*y*math.sqrt(m**2+1)) #Wetted Perimeter\n", + "\n", + "R=A/P\n", + "\n", + "S0=V*n/((R**(2/3))) #By Manning's formula,\n", + "\n", + "print \"S0=\",round(S0**2,6),\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "y= 1.667 m\n", + "B= 13.33 m\n", + "S0= 0.001036\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.17 Page No282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "m=2.0 #side slopes\n", + "\n", + "Q=15.0 #discharge\n", + "\n", + "n=0.014 #Manning's n\n", + "\n", + "S0=1/5000\n", + "\n", + "#Calculation\n", + "\n", + "#R=ye/2\n", + "\n", + "#Dicarge by Manning's formula,\n", + "\n", + "#Q=(1/n)*AR(2/3)S(1/2)\n", + "\n", + "Be=0.4721\n", + "\n", + "A=Be+m\n", + "\n", + "ye=(Q/((1/n)*(A)*(0.5**(2/3))*(S0**(0.5))))**(3/8)\n", + "\n", + "print \"Ye=\",round(ye,3),\"m\"\n", + "\n", + "Be=ye*Be #Bottom width\n", + "\n", + "print \"Be=\",round(Be,3),\"m\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ye= 2.329 m\n", + "Be= 1.1 m\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.18 Page No282" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "Q=10 #Discharge ihn m^3/s\n", + "\n", + "V=1.25 #Velocity in m/s\n", + "\n", + "m=1.0 #Manning's n\n", + "\n", + "#Calculation\n", + "\n", + "A=Q/V #Calculating area\n", + "\n", + "#(a)For the most efficient rectangular channel,\n", + "\n", + "Yem=(A/2)**(1/2)\n", + "\n", + "print \"(a)Yem=\",round(Yem,2),\"m\"\n", + "\n", + "Bem=A/Yem #Bottom width\n", + "\n", + "print \"Bem=\",round(Bem,2),\"m\"\n", + "\n", + "Pem=Bem+(2*Yem)#Perimeter\n", + "\n", + "print \"Pem=\",round(Pem,1),\"m\"\n", + "\n", + "#(b)For the most efficient triangular section,\n", + "\n", + "Yem=math.sqrt(A)\n", + "\n", + "print \"(b)Yem=\",round(Yem,3),\"m\"\n", + "\n", + "Pem=2*math.sqrt(2)*Yem #Perimeter\n", + "\n", + "print \"Pem=\",round(Pem,1),\"m\"\n", + "\n", + "#(c)For the most efficient trpezoidal section,\n", + "\n", + "Yem=(A/math.sqrt(3))**(1/2)\n", + "\n", + "print \"(c)Yem=\",round(Yem,3),\"m\"\n", + "\n", + "Bem=2/math.sqrt(3)*Yem #Bottom width\n", + "\n", + "print \"Bem=\",round(Bem,3),\"m\"\n", + "\n", + "Pem=2*math.sqrt(3)*Yem #Perimeter\n", + "\n", + "print \"Pem=\",round(Pem,3),\"m\"\n", + "\n", + "#(d)The most efficient circular section is a semicircle.\n", + "\n", + "Yem=(A/(math.pi/2))**(1/2)\n", + "\n", + "print \"(d)Yem=\",round(Yem,3),\"m\"\n", + "\n", + "Pem=math.pi*Yem #Perimeter\n", + "\n", + "print \"Pem=\",round(Pem,4),\"m\"\n", + "\n", + "print \"The most efficient circular section has the least perimeter and maximum perimeter is 8.00m\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Yem= 2.0 m\n", + "Bem= 4.0 m\n", + "Pem= 8.0 m\n", + "(b)Yem= 2.828 m\n", + "Pem= 8.0 m\n", + "(c)Yem= 2.149 m\n", + "Bem= 2.482 m\n", + "Pem= 7.445 m\n", + "(d)Yem= 2.257 m\n", + "Pem= 7.0898 m\n", + "The most efficient circular section has the least perimeter and maximum perimeter is 8.00m\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.25 Page No285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "B=2 #width in m\n", + "\n", + "Q=6 #Discharge in m\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "#Calculation\n", + "\n", + "#At critical depth,Q**2/g=A**3/Tc\n", + "\n", + "q=Q/B #Discharge intensity\n", + "\n", + "yc=(q**2/g)**(1/3)\n", + "\n", + "print \"Yc=\",round(yc,3),\"m\"\n", + "\n", + "Vc=Q/(B*yc)\n", + "\n", + "Ec=yc+((Vc**2)/(2*g)) #Specific energy at critical depth\n", + "\n", + "print \"Ec=\",round(Ec,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Yc= 0.972 m\n", + "Ec= 1.458 m\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.28 Page No286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "B=3 #width in m\n", + "\n", + "Q=6 #Discharge in m\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "m=1.5 #side slop in m\n", + "\n", + "#Calculation\n", + "\n", + "#(a)Rectangular channel\n", + "\n", + "q=Q/B #Discharge intensity\n", + "\n", + "yc1=(q**2/g)**(1/3)\n", + "\n", + "print \"Yc=\",round(yc1,3),\"m\"\n", + "\n", + "#(b)In a triangular channel of side slope m horizpntal:1 vertical\n", + "\n", + "Yc=((2*Q**2)/(g*m**2))**(1/5)\n", + "\n", + "print \"Yc=\",round(Yc,3),\"m\"\n", + "\n", + "#(c)Trapezoidal channel of side slope m horizontal:1 vertical\n", + "\n", + "yc=((q**2)/(g))*2\n", + "\n", + "#By trial and error method,\n", + "\n", + "a=0.237\n", + "\n", + "print \"By trial and error method,Yc=\",round(Yc+a,3),\"m\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Yc= 0.742 m\n", + "Yc= 1.267 m\n", + "By trial and error method,Yc= 1.504 m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.29 Page No287" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "Yc=1.2 #critical depth\n", + "\n", + "B=3 #Width in m\n", + "\n", + "m=2 #side slop in m\n", + "\n", + "#Calculation\n", + "\n", + "#(a)Rectangular channel\n", + "\n", + "q=(g*Yc**3)**(1/2)\n", + "\n", + "Q=B*q\n", + "\n", + "print \"Q=\",round(Q,3),\"m^3/s\"\n", + "\n", + "#(B)Triangular channel\n", + "\n", + "Q=((g*(m**2)*Yc**5)/2)**(1/2)\n", + "\n", + "print \"Q=\",round(Q,3),\"m^3/s\"\n", + "\n", + "#(c)Trapezoidal section\n", + "\n", + "m=1.5\n", + "\n", + "B=2.5 #Bottom width\n", + "\n", + "Q=(((B+(m*Yc))**3)*(Yc**3))/(B+(2*m*Yc))\n", + "\n", + "Q=Q*g\n", + "\n", + "print \"Q=\",round(Q**(1/2),3),\"m^3/s\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q= 12.352 m^3/s\n", + "Q= 6.987 m^3/s\n", + "Q= 14.864 m^3/s\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.30 Page No287" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "Yc=0.90 #Critical depth\n", + "\n", + "m=2 #side slope in m\n", + "\n", + "B=3.5 #Bottom width in m\n", + "\n", + "#Calculation\n", + "\n", + "#At Critical depth,Q**2/g=A**3/Tc\n", + "\n", + "Ec=Yc+((B+m*Yc)*Yc)/(2*(B+2*m*Yc)) #Minimum speific energy\n", + "\n", + "print \"Ec=\",round(Ec,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ec= 1.236 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.31 Page No278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "n=0.014 #Manning's n\n", + "\n", + "w=Tc=3 #Width in m\n", + "\n", + "Yc=1.2 #Critical depth\n", + "\n", + "g=9.81 #Gravity constant\n", + "\n", + "#Calculation\n", + "\n", + "Ac=w*Yc #Area\n", + "\n", + "Q=(g*(Ac**3/Tc))**(1/2) #Discharge\n", + "\n", + "#If this discharge is to flow at a normal depth of 1.2m,By Manning's formula\n", + "\n", + "P=w+2*Yc #Perimeter\n", + "\n", + "R=Ac/P\n", + "\n", + "S0=((Q*n)/(Ac*R**(2/3)))**2\n", + "\n", + "print \"S0=\"'%4.2E' % S0\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "S0=3.96E-03\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.35 Page No289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "W=3.5 #Width in m\n", + "\n", + "d=2 #depth in m\n", + "\n", + "S0=0.0036 #slope\n", + "\n", + "g=9.81 #gravity constant\n", + "\n", + "n=0.015 #Manning's n\n", + "\n", + "#Calculation\n", + "\n", + "A1=W*d #Area\n", + "\n", + "P1=2*d+W #Perimeter\n", + "\n", + "R1=A1/P1\n", + "\n", + "Q=(1/n)*A1*R1**(2/3)*S0**(1/2) #Discharge\n", + "\n", + "V1=Q/A1\n", + "\n", + "F1=V1/(math.sqrt(2*g)) #Hence flow is subcritical.\n", + "\n", + "#Case 1:LAt the maximum height of the hump del_Zm\n", + "\n", + "q=Q/W\n", + "\n", + "Yc=(q**2/g)**(1/3)\n", + "\n", + "#By the energy equation,assuming ni loss between sections 1 and 2,\n", + "\n", + "E1=d+((V1**2)/(2*g))\n", + "\n", + "del_Zm=E1-Yc-(Yc/2)\n", + "\n", + "print \"del_Zm=\",round(del_Zm,3),\"m\"\n", + "\n", + "#Case 2:The discharge remains at 26.74.\n", + "\n", + "d=2.4\n", + "\n", + "V2=Q/(W*d)\n", + "\n", + "Vc=2.718\n", + "\n", + "del_Zm=d+(V2**2/(2*g))-Vc\n", + "\n", + "print \"del_Zm=\",round(del_Zm,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "del_Zm= 0.026 m\n", + "del_Zm= 0.199 m\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.37 Page No290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "Q=10.0 #Discharge in m^3/s\n", + "\n", + "V1=1.25 #Velocity in m/s\n", + "\n", + "w=5.2 #width in m\n", + "\n", + "B2=3.0 #bed width in m\n", + "\n", + "g=9.81 #Gravity constant\n", + "\n", + "#Calculation\n", + "\n", + "A1=Q/V1\n", + "\n", + "Y1=A1/w\n", + "\n", + "q1=Y1*V1\n", + "\n", + "E1=Y1+(V1**2/(2*g)) #Specific energy\n", + "\n", + "F1=V1/(math.sqrt(g*Y1)) #Froude number\n", + "\n", + "q2=Q/B2 #Downstream section\n", + "\n", + "Yc2=(q2**2/g)**(1/3)\n", + "\n", + "del_Z=E1-(1.5*Yc2)\n", + "\n", + "print \"Required height of the hump is,del_Z=\",round(del_Z,4),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required height of the hump is,del_Z= 0.0545 m\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.40 Page No292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "y1=0.20 #initial depth\n", + "\n", + "y2=1.20 #sequent depth\n", + "\n", + "g=9.81 #Gravity\n", + "\n", + "#Calculation\n", + "\n", + "#y2/y1=(1/2)(-1)+math.sqrt(1+8F1**2)\n", + "\n", + "F1=(y2/y1)*(2)+1+8\n", + "\n", + "F1=(F1)**(1/2)\n", + "\n", + "V1=F1*math.sqrt(0.2*g)\n", + "\n", + "q=V1*y1 #Discharge per unit width\n", + "\n", + "print \"q=\",round(q,3),\"m^3/s/m\"\n", + "\n", + "EL=((y2-y1)**3)/(4*y1*y2) #Energy loss \n", + "\n", + "print \"EL=\",round(EL,3),\"m\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "q= 1.284 m^3/s/m\n", + "EL= 1.042 m\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.41 Page No292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "F1=10.0 #Froude number before jump\n", + "\n", + "EL=3.20 #energy loss\n", + "\n", + "g=9.81 #Gravity\n", + "\n", + "#Calculation\n", + "\n", + "#Let's take Y2/Y1 as Y\n", + "\n", + "Y=(1/2)*(-1+math.sqrt(1+8*F1**2))\n", + "\n", + "#Sequent depth ratio\n", + "\n", + "#EL/y1=(Y-1)**3/(4*Y)\n", + "\n", + "y1=round(EL/((Y-1)**3/(4*Y)),4)\n", + "\n", + "print \"(i)Y1=\",y1,\"m\"\n", + "\n", + "y2=Y*y1 #Depthh after jump\n", + "\n", + "print \"Y2=\",round(y2,3),\"m\"\n", + "\n", + "V1=F1*(math.sqrt(g*y1))\n", + "\n", + "q=V1*y1 #Discharge intensity\n", + "\n", + "print \"(ii)q=\",round(q,4),\"m^3/s/m\"\n", + "\n", + "F2=q/(y2*math.sqrt(g*y2)) #Froude number after the jump\n", + "\n", + "print \"(iii)F2=\",round(F2,4)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)Y1= 0.0863 m\n", + "Y2= 1.178 m\n", + "(ii)q= 0.7941 m^3/s/m\n", + "(iii)F2= 0.1983\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.42 Page No292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "V2=0.80 #Velocity\n", + "\n", + "y2=1.75 #depth after jump\n", + "\n", + "ga=9790 #density\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "#Calculation\n", + "\n", + "F2=V2/(math.sqrt(g*y2)) #Froude number after the jump\n", + "\n", + "#Let's take Y2/Y1 as Y\n", + "\n", + "Y=(1/2)*(-1+math.sqrt(1+8*F2**2))\n", + "\n", + "y1=Y*y2\n", + "\n", + "print \"Y1=\",round(y1,3),\"m\"\n", + "\n", + "#Sequent depth ratio\n", + "\n", + "EL=((y2-y1)**3)/(4*y1*y2) #Energy loss\n", + "\n", + "print \"EL=\",round(EL,3),\"m\"\n", + "\n", + "Q=V2*y2\n", + "\n", + "P=ga*Q*EL #Power dissipated\n", + "\n", + "print \"P=\",round(P/1000,2),\"kW/metre width\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Y1= 0.122 m\n", + "EL= 5.054 m\n", + "P= 69.27 kW/metre width\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.43 Page No292" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "F2=0.12 #Froude number after the jump\n", + "\n", + "EL=9.0 #Energy loss\n", + "\n", + "g=9.81 #Gravity\n", + "\n", + "#Calculation\n", + "\n", + "#Let's take Y2/Y1 as Y\n", + "\n", + "Y=round((1/2)*(-1+math.sqrt(1+8*F2**2)),4) #ratio of depth\n", + "\n", + "y2=EL/(((1-Y)**3)/(4*Y))\n", + "\n", + "V2=F2*(math.sqrt(g*y2))\n", + "\n", + "q=V2*y2 #Discharge intensity\n", + "\n", + "print \"q=\",round(q,4),\"m^3/s/m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "q= 0.4322 m^3/s/m\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.44 Page No293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "F1=4.5 #By assumption of Froude number\n", + "\n", + "g=9.81 #Gravity\n", + "\n", + "q=2.0 #discharge per unit width\n", + "\n", + "#Calculation\n", + "\n", + "y1=(q**2/(g*F1**2))**(1/3)\n", + "\n", + "Y=round((1/2)*(-1+math.sqrt(1+8*F1**2)),2) #ratio of depth\n", + "\n", + "EL=round(y1*((Y-1)**3/(4*Y)),3)\n", + "\n", + "print \"EL=\",EL,\"m.But actual EL=1.75.Hence assumed F1 is not correct\"\n", + "\n", + "#F1 should be higher than 4.5\n", + "\n", + "F1=5.10\n", + "\n", + "y1=round((q**2/(g*F1**2))**(1/3),3)\n", + "\n", + "Y=round((1/2)*(-1+math.sqrt(1+8*F1**2)),2) #ratio of depth\n", + "\n", + "EL=round(y1*((Y-1)**3/(4*Y)),3)\n", + "\n", + "print\"Hence the assumption F1=5.10 is all right.\"\n", + "\n", + "print \"y1=\",y1,\"m\"\n", + "\n", + "y2=y1*Y\n", + "\n", + "print \"y2=\",round(y2,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "EL= 1.344 m.But actual EL=1.75.Hence assumed F1 is not correct\n", + "Hence the assumption F1=5.10 is all right.\n", + "y1= 0.25 m\n", + "y2= 1.683 m\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.45 Page No293" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "y1=0.5 #depth of flow before jump\n", + "\n", + "y2=3.0 #depth of flow after jump\n", + "\n", + "g=9.81 #gravity in m/s^2\n", + "\n", + "ga=9790 #specific weight\n", + "\n", + "#solution\n", + "\n", + "#sequent depths related to critical depth as,\n", + "\n", + "yc=((y1)*(y2)*(y1+y2))/2 #Critical depth\n", + "\n", + "print \"(i)yc=\",round(math.pow(yc,1/3),3),\"m\"\n", + "\n", + "#(q**2)/g=yc**3\n", + "\n", + "q=round(math.sqrt(yc*g),3)\n", + "\n", + "E_L=round(((y2-y1)**3)/(4*y1*y2),3) #Head loss\n", + "\n", + "P=ga*q*E_L #Power lost per metre width\n", + "\n", + "print \"(ii)P=\",round(P/1000,1),\"kW\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)yc= 1.379 m\n", + "(ii)P= 129.4 kW\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 12.47 Page No294" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "F1=10 #Froude number before jump\n", + "\n", + "y1=0.4 #depth of flow in m\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "#Calculation\n", + "\n", + "y2=(1/2)*(-1+math.sqrt(1+8*F1**2))*y1\n", + "\n", + "EL=(y2-y1)**3/(4*y1*y2) #Energy loss\n", + "\n", + "E1=y1*(1+F1**2/2) #Initial specific energy\n", + "\n", + "E2=E1-EL #Specific energy at the heel\n", + "\n", + "print \"E2=\",round(E2,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "E2= 5.57 m\n" + ] + } + ], + "prompt_number": 25 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter13_2.ipynb b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter13_2.ipynb new file mode 100644 index 00000000..5882ec6a --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter13_2.ipynb @@ -0,0 +1,749 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:114e27d0f75ab0a3937767151340a6084dece65cd6fc08658c68961d11e12fb8" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 13:Flow Measurement" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.1 Page No320" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "g=9.81 #Gravity constant\n", + "\n", + "H=2 #height in m\n", + "\n", + "hL=0.2 #headloss\n", + "\n", + "Cc=0.63 #Coefficient of contraction\n", + "\n", + "D=4 #Diameter in cm\n", + "\n", + "#Calculation\n", + "\n", + "D=D/100 #Converting into m\n", + "\n", + "V=round(math.sqrt(2*g*H),3) #Ideal Velocity\n", + "\n", + "Va=math.sqrt(2*g*(H-hL))\n", + "\n", + "Cv=round(Va/V,3)\n", + "\n", + "print \"(i)Coefficient of velocity Cv=\",Cv\n", + "\n", + "Cd=round(Cc*Cv,3)\n", + "\n", + "print \"Coefficient of discharge Cd=\",Cd\n", + "\n", + "a=math.pi/4*(D**2) #Discharge through the orifice\n", + "\n", + "Q=Cd*a*(V)\n", + "\n", + "print \"(ii)Q=\",round(Q*1000,3),\"L/s\"\n", + "\n", + "y=0.50 #Given value\n", + "\n", + "x=Cv*(4*y*H)**(1/2)\n", + "\n", + "print \"(iii)x=\",x,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)Coefficient of velocity Cv= 0.949\n", + "Coefficient of discharge Cd= 0.598\n", + "(ii)Q= 4.707 L/s\n", + "(iii)x= 1.898 m\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.2 Page No321" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "d=25 #diameter im mm\n", + "\n", + "H=5.5 #head in m\n", + "\n", + "Q=3 #rate in L/s\n", + "\n", + "x=1.5 #horizontal distance\n", + "\n", + "y=0.12 #vertical distance\n", + "\n", + "g=9.81 #gravity in m/s^2\n", + "\n", + "#solution\n", + "\n", + "Cv=round(x/(math.sqrt(4*y*H)),3) #Coefficient of velocity\n", + "\n", + "print \"Cv=\",Cv \n", + "\n", + "Q=Q/1000 \n", + "\n", + "a=((math.pi)/4)*((d/1000)**2)\n", + "\n", + "Cd=round(Q/(a*(math.sqrt(2*g*H))),3) #Coefficient of contadiction\n", + "\n", + "print \"Cd=\",Cd\n", + "\n", + "Cc=Cd/Cv #Coefficient of discharge\n", + "\n", + "print \"Cc=\",round(Cc,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cv= 0.923\n", + "Cd= 0.588\n", + "Cc= 0.637\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.5 Page No322" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "D=10 #diameter in cm\n", + "\n", + "V1=2.5 #Velocity in pipe in m/s\n", + "\n", + "P1=50 #pressure in kPa\n", + "\n", + "Cv=0.98 #coefficient of velocity\n", + "\n", + "ga=9.79 #Relative density\n", + "\n", + "g=9.81 #gravity in m/s^2\n", + "\n", + "#solution\n", + "\n", + "H=round((P1/ga)+((V1**2)/(2*g)),3) #Total head\n", + "\n", + "Vj=round(Cv*(math.sqrt(2*g*H)),2) #Velocity of jet\n", + "\n", + "print \"Vj=\",Vj,\"m/s\"\n", + "\n", + "A1=(math.pi/4)*((D/100)**2) #Discharge\n", + "\n", + "aj=(A1*V1)/Vj\n", + "\n", + "Dj=math.sqrt(aj*4/(math.pi))\n", + "\n", + "print \"Dj=\",round((Dj*100),2),\"cm\"\n", + "\n", + "Hl=((1/(Cv**2))-1)*((Vj**2)/(2*g)) #Headloss\n", + "\n", + "print \"HL=\",round(Hl,3),\"m\" \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vj= 10.11 m/s\n", + "Dj= 4.97 cm\n", + "HL= 0.215 m\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.7 Page No323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "D=20 #Diameter in cm\n", + "\n", + "del_H=0.5 #pressure head differential in m\n", + "\n", + "mu=0.001 #Coefficient of viscosity in Pa.s\n", + "\n", + "rho=998 #density in kg/m63\n", + "\n", + "g=9.81 #Gravity constant\n", + "\n", + "#Calculation\n", + "\n", + "D=D/100 #Coverting into m\n", + "\n", + "#Q=K0*A2*math.sqrt(2*g*del_H)\n", + "\n", + "A2=(math.pi/4)*((D/2)**2)\n", + "\n", + "Q=A2*math.sqrt(2*g*del_H)\n", + "\n", + "#As K0 is not known use trial and error method,\n", + "\n", + "K0=0.62\n", + "\n", + "Q=K0*Q\n", + "\n", + "print \"Q=\",round(Q,5),\"m^3/s\"\n", + "\n", + "V=Q/(math.pi*D**2/4) #Velocity\n", + "\n", + "v=mu/rho\n", + "\n", + "Re=V*D/v #Reynold's number\n", + "\n", + "#For this value of Re,K0 is same as assumed.Hence no iterations required.\n", + "\n", + "print \"Q=\",round(Q*1000,2),\"L/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q= 0.01525 m^3/s\n", + "Q= 15.25 L/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.8 Page No323" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "Q=20 #Discharge in L/s\n", + "\n", + "g=9.81 #gravity in m/s^2\n", + "\n", + "Kf=0.99 #flow coefficient of nozzle\n", + "\n", + "D=3.0 #diameter in cm\n", + "\n", + "ga=0.70*9.79 #relative density\n", + "\n", + "#solution\n", + "\n", + "A2=math.pi/4*(D/100)**2 #calculating area\n", + "\n", + "Q=Q/10000 #converting into m^3/s\n", + "\n", + "del_H=((Q/(Kf*A2))**2)/(2*g) #Head difference across nozzle\n", + "\n", + "#For a Horizontal nozzle Z1-Z2=0\n", + "\n", + "del_P=ga*del_H #calculating del_p\n", + "\n", + "print \"del_p=\", round(del_P,3),\"kPa\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "del_p= 2.853 kPa\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.18 Page No328" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "D2=10 #diameter in cm\n", + "\n", + "D1=20 #diameter in cm\n", + "\n", + "Sm=13.6 #relative density constant\n", + "\n", + "Sp=0.9 #relative density\n", + "\n", + "Cd=0.99 #coefficient of discharge\n", + "\n", + "g=9.81 #gravity in m/s^2\n", + "\n", + "y=9 #manometer reading in cm\n", + "\n", + "#solution\n", + "\n", + "#for a differential monometer\n", + "\n", + "r=(D1/2)/100 #radius\n", + "\n", + "A2=(math.pi/4)*((r)**2) #area\n", + "\n", + "D=round(math.sqrt(1-(D2/D1)**4),3) \n", + "\n", + "delh=(Sm/Sp)-1 #calculating delh\n", + "\n", + "Q=round(((Cd*A2)/D)*(math.sqrt(2*g*(delh*(y/100)))),2) #calculating flow\n", + "\n", + "print \"Q=\",Q*1000,\"L/s\"\n", + "\n", + "#when Q=50L/s\n", + "\n", + "Q=50/1000\n", + "\n", + "s=(((Cd*A2)/D)*(math.sqrt(2*g*(delh))))\n", + "\n", + "y=round((Q/s)**2,2) #manometer reading\n", + "\n", + "print \"y=\",int(y*100),\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q= 40.0 L/s\n", + "y= 14 cm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.22 Page No330" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "D1=20 #diameter in cm\n", + "\n", + "Cd=0.985 #coefficient of discharge\n", + "\n", + "Sm=0.6 #relative density of liquid\n", + "\n", + "Sp=1.0 #relative density\n", + "\n", + "y=15 #U-tube reading in cm\n", + "\n", + "D2=10 #diameter in cm\n", + "\n", + "g=9.81 #gravityi in m/s^2\n", + "\n", + "#solution\n", + "\n", + "#from the inverted differential manometer\n", + "\n", + "delh=(y/100)*(1-(Sm/Sp))\n", + "\n", + "#By the venturimeter equation,\n", + "\n", + "A2=(math.pi/4)*(((D1/100)/2)**2) #area\n", + "\n", + "s=math.sqrt((1-((D2/D1)**4)))\n", + "\n", + "Q=((Cd*A2)/s)*(math.sqrt((2*g*delh)))\n", + "\n", + "print \"Q=\",round(Q*1000,2),\"L/s\"\n", + "\n", + "HLi=(1-(Cd**2))*delh #Head loss in the intel section\n", + "\n", + "print \"HLi=\",(round(HLi,4)*1000),\"mm of water\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q= 8.67 L/s\n", + "HLi= 1.8 mm of water\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.24 Page No331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "Sp=0.85 #Relative density\n", + "\n", + "y=4 #pitot static tube reading in cm\n", + "\n", + "C=0.99 #coefficient of pitot tube\n", + "\n", + "Sm=13.6 #relative density\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "#solution\n", + "\n", + "#For the differential monometer\n", + "\n", + "del_h=(y/100)*((Sm/Sp)-1) #del_h\n", + "\n", + "#For the pitot tube\n", + "\n", + "Vo=C*(math.sqrt(2*g*del_h)) #Velocity\n", + "\n", + "print \"Velocity at M=\",round(Vo,3),\"m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Velocity at M= 3.397 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.26 Page No332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "Ps=3.0 #Stagnation Pressure in kPa\n", + "\n", + "Po=-3.0 #Static pressure in kPa\n", + "\n", + "rho=1.20 #mass density in kg/m^3\n", + "\n", + "C=0.98 #instrument coefficient\n", + "\n", + "#solution\n", + "\n", + "#In a pitot static tube,\n", + "\n", + "#Velocity of flow\n", + "\n", + "Vo=C*math.sqrt(((2*(Ps-Po))/rho)*1000)\n", + "\n", + "print \"Vo=\",int(Vo),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vo= 98 m/s\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.27 Page No332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "D=30 #diameter in cm\n", + "\n", + "Ps=-10 #static pressure in cm\n", + "\n", + "Psn=1.0 #stagnation pressure in N/cm^2\n", + "\n", + "C=0.98 #coefficient of tube\n", + " \n", + "ga=9790 #density\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "#solution\n", + "\n", + "Po=(Ps/100)*13.6 #Calculating Po/ga\n", + "\n", + "Ps=Psn*(10**4)/ga #Calculating ps/ga\n", + "\n", + "del_h=(Ps-Po)\n", + "\n", + "Vm=C*math.sqrt(2*g*del_h) #Centreline velocity\n", + "\n", + "V=0.85*Vm #Mean velocity\n", + "\n", + "Q=(math.pi/4)*((D/100)**2)*V #Discharge\n", + "\n", + "print \"Q=\",round(Q,3),\"m^3/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q= 0.402 m^3/s\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.31 Page No333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "L=0.40 #Width in m\n", + "\n", + "Q=25 #discharge in L/s\n", + "\n", + "H1=10 #head in cm\n", + "\n", + "g=9.81 #gravity in m/s^2\n", + "\n", + "#solution\n", + "\n", + "#By the weir formula,\n", + "\n", + "Cd=(Q/1000)/((2/3)*(math.sqrt(2*g))*L*(math.pow((H1/100),3/2)))\n", + "\n", + "print \"Cd=\",round(Cd,3) #Coefficient of discharge\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cd= 0.669\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 13.35 Page No334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "L=2.5 #length in m\n", + " \n", + "Cd=0.62 #Coefficient of discharge\n", + "\n", + "H1=0.7 #head in m\n", + "\n", + "t=0.15 #thickness in m\n", + "\n", + "g=9.81 #gravity in m/s^2\n", + "\n", + "#solution\n", + "\n", + "L=L-2*t #crest length\n", + "\n", + "n=2+(2*2) #no of end contractions\n", + "\n", + "Le=L-(0.1*n*H1) #effective crest length\n", + "\n", + "#The discharge from Francis Formula by neglecting the velocity of approach,\n", + "\n", + "Q=(2/3)*(Cd)*(math.sqrt(2*g))*(Le)*(math.pow(H1,3/2)) \n", + "\n", + "print \"Q=\",round(Q,2),\"m^3/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q= 1.91 m^3/s\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter14_2.ipynb b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter14_2.ipynb new file mode 100644 index 00000000..e68989e1 --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter14_2.ipynb @@ -0,0 +1,785 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3f4f998f72684cffa9780465ca64d4846d2ef896c2b80cb970d0fc405ba894c0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 14:Unsteady Flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.11 Page No358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "#bulk modulus of elasticity for water in MPa\n", + "\n", + "k_w=2.22E+3 \n", + "\n", + "k_c=1.50E+3\n", + "\n", + "k_g=9.58E+2\n", + "\n", + "rho=998 #density in kg/m^3\n", + "\n", + "RD_c=0.8 #relative density of crude oil\n", + "\n", + "RD_g=0.68 #relative density of gasolene\n", + "\n", + "#solution\n", + "\n", + "C=math.sqrt((k_w*10**6)/rho) #for water\n", + "\n", + "print \"C=\",round(C,1),\"m/s\"\n", + "\n", + "C=math.sqrt((k_c*10**6)/(RD_c*rho)) #for crude oil\n", + "\n", + "print \"C=\",round(C,1),\"m/s\"\n", + "\n", + "C=math.sqrt((k_g*10**6)/(RD_g*rho)) #for gasolene\n", + "\n", + "print \"C=\",int(C),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C= 1491.5 m/s\n", + "C= 1370.7 m/s\n", + "C= 1188 m/s\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.12 Page No358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "E=2.07E+5 #pressure in steel pipe\n", + "\n", + "K=1.43E+3 #Bulk modulus in MPa\n", + "\n", + "t=2 #thickness in cm\n", + "\n", + "D=2.5 #diameter in m\n", + "\n", + "RD=0.80 #relative density\n", + "\n", + "rho=998 #density in m/s^2\n", + "\n", + "#solution\n", + "\n", + "D=D*100 #converting D to cm\n", + "\n", + "E=E*(10**6) #converting MPa to Pa\n", + "\n", + "K=K*(10**6) #converting MPa to Pa\n", + "\n", + "#velocity of pressure wave\n", + "\n", + "C=(math.sqrt(K/(rho*RD)))*(math.pow(1/(1+((D/t)*(K/E))),1/2))\n", + "\n", + "print \"C=\",round(C,1),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C= 980.4 m/s\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.13 Page No358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "k=2.2E9 #Bulk modulus in MPa\n", + "\n", + "rho=998 #relative density\n", + "\n", + "V2=1.0 #velocity in m/s\n", + "\n", + "V1=4.0 #Decreased velocity in m/s\n", + "\n", + "#calculation\n", + "\n", + "del_V=-(V2-V1) \n", + "\n", + "C=(k/rho)**(1/2) #change of pressure surge\n", + "\n", + "delP_h=(rho*C*del_V)\n", + "\n", + "print \"delP_h=\"'%4.3E' % delP_h,\"which is \",round(delP_h/1000000,3),\"MPa\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "delP_h=4.445E+06 which is 4.445 MPa\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.14 Page No358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "E=1.0E+11 #modulus of elasticity\n", + "\n", + "K=2.0E+9 #Bulk modulus in Pa\n", + "\n", + "t=1.25 #thickness in mm\n", + "\n", + "D=0.9 #diameter in m\n", + "\n", + "rho=998 #density in kg/m^3\n", + "\n", + "L=1000 #length in m\n", + "\n", + "V=2.60 #velocity in m/s\n", + "\n", + "g=9.81 #gravity in m/s^2\n", + "\n", + "#solution\n", + "\n", + "D=D*100 #converting D to cm\n", + "\n", + "#velocity of pressure wave\n", + "\n", + "C=(math.sqrt(K/(rho)))*(math.pow(1/(1+((D/t)*(K/E))),1/2))\n", + "\n", + "#with Pressure rise,\n", + "\n", + "del_V=0-V #calculating del_V\n", + "\n", + "h_h=-(C*del_V)/g #Water Wammer Head\n", + "\n", + "print \"h_W=\",round(h_h,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "h_W= 240.2 m\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.15 Page No358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "k=2.1E9 #Bulk modulus in MPa\n", + "\n", + "rho=998 #relative density\n", + "\n", + "V2=0 #velocity in m/s\n", + "\n", + "V1=2.1 #Decreased velocity in m/s\n", + "\n", + "D=60 #Diameter in cm\n", + "\n", + "t=1.2 #thickness in cm\n", + "\n", + "E=2.1E11 #modulus of elasticity\n", + "\n", + "#calculation\n", + "\n", + "del_V=-(V2-V1) \n", + "\n", + "c=(k/rho)**(1/2) #By neglecting the elasticity of pipe material velocity,\n", + "\n", + "delP_h=(rho*c*del_V) #water hammer pressure rise\n", + "\n", + "print \"delP_h=\"'%4.3E' % delP_h,\"which is \",round(delP_h/1000000,3),\"MPa\"\n", + "\n", + "#By considering the elasticity of pressure material,\n", + "\n", + "C=(((1/(1+(D/t)*(k/E))))**(1/2))*c\n", + "\n", + "delP_h=(rho*C*del_V)\n", + "\n", + "print \"delP_h=\"'%4.3E' % delP_h,\"which is \",round(delP_h/1000000,3),\"MPa\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "delP_h=3.040E+06 which is 3.04 MPa\n", + "delP_h=2.482E+06 which is 2.482 MPa\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.16 Page No359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "E=2.10E+11 #modulus of elasticity\n", + "\n", + "K=1.43E+9 #Bulk modulus in Pa\n", + "\n", + "t=80 #thickness in mm\n", + "\n", + "D=80 #diameter in cm\n", + "\n", + "RD=0.8 #relative density for kerosene\n", + "\n", + "rho=998 #density in m/s^2\n", + "\n", + "L=1000 #length in m\n", + "\n", + "#solution\n", + "\n", + "D=D*10 #converting D to mm\n", + "\n", + "#velocity of pressure wave\n", + "\n", + "C=(math.sqrt(K/(rho*RD)))*(math.pow(1/(1+((D/t)*(K/E))),1/2))\n", + "\n", + "To=(2*L)/C\n", + "\n", + "print \"Hence maximum time for a sudden closure is\",round(To,3),\"s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hence maximum time for a sudden closure is 1.544 s\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.17 Page No359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "L=100 #length in m\n", + "\n", + "C=1430 #Sonic velocity in m/s\n", + "\n", + "v=0.5 #Velocity in m/s\n", + "\n", + "D=0.5 #Diameter in m\n", + "\n", + "rho=998 #relative density \n", + "\n", + "T=1 #time in second\n", + "\n", + "#Calculation\n", + "\n", + "T0=round((2*L)/C,2) #Critical time\n", + "\n", + "V=round(v/((math.pi/.4)*(D**2)),4)\n", + "\n", + "Ph=rho*C*V\n", + "\n", + "print \"Ph=\",round(Ph/1000,2),\"kPa\"\n", + "\n", + "Pvsc=rho*L*V/T #P|ressure rise\n", + "\n", + "print \"Pvsc=\",round(Pvsc/1000,2),\"kPa\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ph= 363.35 kPa\n", + "Pvsc= 25.41 kPa\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.18 Page No359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "k=2.11E9 #Bulk modulus in MPa\n", + "\n", + "rho=998 #relative density\n", + "\n", + "V2=0 #velocity in m/s\n", + "\n", + "V1=2.1 #Decreased velocity in m/s\n", + "\n", + "D=60 #Diameter in cm\n", + "\n", + "t=1.5 #thickness in cm\n", + "\n", + "E=1.041E11 #modulus pf elasticity\n", + "\n", + "del_V=-3.0 #change in volume\n", + "\n", + "T=2.00 #pressure rise\n", + "\n", + "L=800 #length\n", + "\n", + "#calculation\n", + "\n", + "c=int((k/rho)**(1/2))\n", + "\n", + "C=round((((1/(1+(D/t)*(k/E))))**(1/2))*c,3) #Velocity of pressure wave\n", + "\n", + "T0=round((2*L)/C,2)\n", + "\n", + "Ph=-rho*C*del_V #T=1.25,Hence,water hammer pressure\n", + "\n", + "print \"(a)Ph=\",round(Ph/1000000,3),\"MPa\"\n", + "\n", + "Phs=(T0/T)*Ph #Pressure rise at the valve\n", + "\n", + "print \"(b)Phs=\",round(Phs/1000000,3),\"MPa\"\n", + "\n", + "print \"(c)Ph=\",round(Ph/1000000,3),\"MPa\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)Ph= 3.235 MPa\n", + "(b)Phs= 2.394 MPa\n", + "(c)Ph= 3.235 MPa\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.19 Page No359" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "k=2.10E9 #Bulk modulus in Pa\n", + "\n", + "rho=998 #relative density\n", + "\n", + "D=400 #Diameter in cm\n", + "\n", + "t=10 #thickness in cm\n", + "\n", + "E=2.11E11 #modulus pf elasticity\n", + "\n", + "V2=0.5 #Volume 1\n", + "\n", + "V1=3.0 #Volume 2\n", + "\n", + "T=5.00 #pressure rise\n", + "\n", + "L=2500 #length\n", + "\n", + "Pstatic=9.79*250 #Pressure \n", + "\n", + "#calculation\n", + "\n", + "c=((k/rho)**(1/2))\n", + "\n", + "C=round((((1/(1+(D/t)*(k/E))))**(1/2))*c,4) #Velocity of pressure wave\n", + "\n", + "T0=round((2*L)/C,3)\n", + "\n", + "del_V=V2-V1 #change in volume\n", + "\n", + "Ph=-rho*C*del_V #T=1.25,Hence,water hammer pressure\n", + "\n", + "\n", + "Phs=((T0/T)*Ph)/1000 #Pressure rise at the valve\n", + "\n", + "Pt=Pstatic+Phs\n", + "\n", + "print \"Pt=\",int(round(Pt,0)),\"kPa\" #Total pressure at the valve end\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Pt= 4943 kPa\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.20 Page No360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "K=2.2E+3 #bulk modulus in MPa\n", + "\n", + "rho=998 #density in kg/m^3\n", + "\n", + "L=3500 #length in m\n", + "\n", + "Vo=0.8 #velocity in m/s\n", + "\n", + "T=4.0 #closure in s\n", + "\n", + "#solution\n", + "\n", + "C=round(math.sqrt((K*10**6)/rho),1) #velocity of pressure wave\n", + "\n", + "To=(2*L)/C #critical time\n", + "\n", + "#T=4.0 s,the closure is rapid.\n", + "\n", + "Ph=(rho*C*Vo)/(10**6) #water hammer pressure\n", + "\n", + "print \"Ph=\",round(Ph,3),\"MPa\"\n", + "\n", + "#length of the pipe affected by peak pressure\n", + "\n", + "Xo=L-((C*T)/2)\n", + "\n", + "print \"Xo=\",Xo,\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ph= 1.185 MPa\n", + "Xo= 530.6 m\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.23 Page No362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "k=1.52E9 #Bulk modulus in Pa\n", + "\n", + "rho=998 #relative density\n", + "\n", + "D=200 #Diameter in cm\n", + "\n", + "t=10 #thickness in cm\n", + "\n", + "E=2.11E11 #modulus pf elasticity\n", + "\n", + "T=1.25 #pressure rise\n", + "\n", + "L=1000 #length\n", + "\n", + "Pstatic=9.79*250 #Pressure\n", + "\n", + "Rd=0.8 #Relative density\n", + "\n", + "Q=0.040 #discharge \n", + "\n", + "#calculation\n", + "\n", + "c=((k/(Rd*rho))**(1/2))\n", + "\n", + "C=round((((1/(1+(D/t)*(k/E))))**(1/2))*c,4) #Velocity of pressure wave\n", + "\n", + "V0=Q/((math.pi/4)*((D/1000)**2))\n", + "\n", + "T0=round((2*L)/C,3)\n", + "\n", + "Ph=rho*Rd*C*V0 #T=1.25,Hence,water hammer pressure\n", + "\n", + "alpha_a=(Ph*D/(2*t))/1000\n", + "\n", + "print \"alpha_a=\",round(alpha_a/1000000,4),\"kN/mm^2\" #Convert into mm\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "alpha_a= 0.0131 kN/mm^2\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 14.24 Page No362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "k=1E9 #Bulk modulus in Pa\n", + "\n", + "rho=998 #relative density\n", + "\n", + "D=300 #Diameter in cm\n", + "\n", + "t=3 #thickness in cm\n", + "\n", + "E=2.14E11 #modulus pf elasticity\n", + "\n", + "T=1.25 #pressure rise\n", + "\n", + "L=1000 #length\n", + "\n", + "Pstatic=9.79*250 #Pressure\n", + "\n", + "Rd=0.82 #Relative density\n", + "\n", + "Q=0.100 #discharge \n", + "\n", + "Sh=160 #Static head in m\n", + "\n", + "alpha_w=1.0E5 #stress value\n", + "\n", + "#calculation\n", + "\n", + "c=((k/(Rd*rho))**(1/2))\n", + "\n", + "C=round((((1/(1+(D/t)*(k/E))))**(1/2))*c,4) #Velocity of pressure wave\n", + "\n", + "V0=round(Q/((math.pi/4)*((D/1000)**2)),2)\n", + "\n", + "T0=round((2*L)/C,3)\n", + "\n", + "Ph=round((rho*Rd*C*V0)/1000,2) #water hammer pressure\n", + "\n", + "Ps=Sh*(9.79*Rd) #Static pressure\n", + "\n", + "P=Ps+Ph #Total pressure\n", + "\n", + "alpha_a=(Ph*D/(2*t))/1000\n", + "\n", + "#As working stress is lower than alpha_w value,valve must be closed with time T>T0\n", + "\n", + "Pt=alpha_w*2*t/(D)\n", + "\n", + "Phw=Pt-Ps #Allowable hammer pressure in the closure\n", + "\n", + "T=T0*(Ph/Phw)\n", + "\n", + "#Since this value <1.5,the assumption of slow closure is O.K.\n", + "\n", + "print \"Minimum time of closure Tm=\",round(T,2),\"s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Minimum time of closure Tm= 3.23 s\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter15_2.ipynb b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter15_2.ipynb new file mode 100644 index 00000000..06d1ae22 --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter15_2.ipynb @@ -0,0 +1,582 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b8d5e1bb880e94c85c57249a3b8dce00547989931ff13d99297de0b74b583f13" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 15:Compressible Flow" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.1 Page No376" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "Mg=44 #molecular weight of carbondioxide\n", + "\n", + "#solution\n", + "\n", + "R=8314/Mg #gas constant for carbondioxide\n", + "\n", + "print \"R=\",int(round(R,1)),\"N.m/(Kg.K)\"\n", + "\n", + "Mg=32 #molecular weight of oxygen\n", + "\n", + "R=8314/Mg #gas constant for oxygen\n", + "\n", + "print \"R=\",int(math.ceil(round(R,1))),\"N.m/(Kg.K)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R= 189 N.m/(Kg.K)\n", + "R= 260 N.m/(Kg.K)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.2 Page No376" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "Mg=28.96 #molecular weight of air\n", + "\n", + "k=1.4 #constant for air \n", + "\n", + "#solution\n", + "\n", + "R=int(8314/Mg) #in J/(kg.K)\n", + "\n", + "Cp=(k/(k-1.0))*R\n", + "\n", + "print \"Cp=\",Cp,\"J/(Kg.K)\"\n", + "\n", + "Cv=R/(k-1) #in J/(kg.K)\n", + "\n", + "print \"Cv=\",Cv,\"J/(Kg.K)\"\n", + "\n", + "#1 Kcal = 4187 J\n", + "\n", + "print \"In heat units\"\n", + "\n", + "Cp=Cp/4187\n", + "\n", + "print \"Cp=\",round(Cp,3),\"Kcal/(Kg.K)\" \n", + "\n", + "Cv=Cv/4187\n", + "\n", + "print \"Cv=\",round(Cv,3),\"Kcal/(Kg.K)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Cp= 1004.5 J/(Kg.K)\n", + "Cv= 717.5 J/(Kg.K)\n", + "In heat units\n", + "Cp= 0.24 Kcal/(Kg.K)\n", + "Cv= 0.171 Kcal/(Kg.K)\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.3 Page No376" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "T1=15 #temperature initially in degree\n", + "\n", + "T2=65 #increased temperature in degree\n", + "\n", + "Cv=670 #in j/(kg.k)\n", + "\n", + "E=1000 #enthalpy\n", + "\n", + "Cp=858 #in j/(kg.k)\n", + "\n", + "#Calculation\n", + "\n", + "T1=273+T1 #temperature in kelvin\n", + "\n", + "T2=273+T2\n", + "\n", + "m=E/9.81 #Mass of 1000N of co2\n", + "\n", + "del_u=Cv*(T2-T1)\n", + "\n", + "Tc=m*del_u #Total change in internal energy\n", + "\n", + "print \"Total change in internal energy=\",int(Tc/1000),\"kJ\"\n", + "\n", + "del_h=Cp*(T2-T1)\n", + "\n", + "Te=m*del_h\n", + "\n", + "print \"Total change in enthalpy=\",int(Te/1000),\"kJ\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total change in internal energy= 3414 kJ\n", + "Total change in enthalpy= 4373 kJ\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.5 Page No377" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "R=260 #in j/(kg.k)\n", + "\n", + "k=1.4 #given value\n", + "\n", + "T1=27 #temperature initially in degree\n", + "\n", + "T2=85 #increased temperature in degree\n", + "\n", + "p1=150 #Pressure in kPa\n", + "\n", + "p2=450 #pressure 2 in kPa\n", + "\n", + "m=7 #kg of oxygen \n", + "\n", + "#Calculation\n", + "\n", + "Cv=R/(k-1)\n", + "\n", + "T1=T1+273 #Temperature in kelvin\n", + "\n", + "T2=T2+273\n", + "\n", + "S=Cv*math.log((((T2/T1)**k)*((p1/p2)**(k-1)))) #Change in entropy per kg\n", + "\n", + "T=m*S\n", + "\n", + "print \"Total change in entropy=\",round(T,1),\"J/K\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Total change in entropy= -873.6 J/K\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.7 Page No378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "k=1.40 #constant for gases\n", + "\n", + "R=260 #gas constant in J/(Kg.K)\n", + "\n", + "T=25 #temperature in degree C\n", + "\n", + "#solution\n", + "\n", + "T=273 +T #converting into K\n", + "\n", + "C=math.sqrt(k*R*T) #Speed of sound\n", + "\n", + "print \"C=\",round(C,1),\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C= 329.4 m/s\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.8 Page No378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "M=1.5 #Mach number\n", + "\n", + "p=89.89 #Pressure in kPa\n", + "\n", + "rho=1.112 #density in kg/m^3\n", + "\n", + "k=1.4 #constant for gases\n", + "\n", + "#solution\n", + "\n", + "#At 1000 m altitude,\n", + "\n", + "C=math.sqrt((k*(p*1000))/rho)\n", + "\n", + "V=C*M #Using Mach number\n", + "\n", + "V=(V*3600)/1000 #Converting V from m/s to Km/h\n", + "\n", + "print \"V=\",int(math.ceil(round(V,1))),\"Km/h\"\n", + "\n", + "#At 10,000 m altitude\n", + "\n", + "p=26.42 #Pressure in kPa\n", + "\n", + "rho=0.4125 #density in kg/m^3\n", + "\n", + "C=math.sqrt((k*(p*1000))/rho)\n", + "\n", + "V=C*M\n", + "\n", + "V=(V*3600)/1000 #Converting V from m/s to Km/h\n", + "\n", + "print \"V=\",int(V),\"Km/h\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V= 1817 Km/h\n", + "V= 1617 Km/h\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.13 Page No380" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "k=1.28 #given value\n", + "\n", + "R=188 #in j/(kg.k)\n", + "\n", + "T=30 #Temperature in degree\n", + "\n", + "V1=150 #velocity in m/s\n", + "\n", + "P1=500 #pressure in kPa\n", + "\n", + "#Calculation\n", + "\n", + "T=T+273 #Converting into kelvin\n", + "\n", + "C=math.sqrt(k*R*T) #Speed of sound in CO2\n", + "\n", + "M1=V1/C #Mach number\n", + "\n", + "T0=T*((1+((k-1)/2)*(M1**2)))\n", + "\n", + "print \"T0=\",int(T0-273),\"degree C\" #In degree celsius\n", + "\n", + "P0=P1*((1+((k-1)/2)*(M1**2)))**(k/(k-1))\n", + "\n", + "print \"P0=\",round(P0,2),\"kPa(abs)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "T0= 43 degree C\n", + "P0= 606.65 kPa(abs)\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.15 Page No381" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "T0=30 #temperatuer in degree\n", + "\n", + "p1=50 #Pressure in kPa\n", + "\n", + "p0=95 #pressure 2 in kPa\n", + "\n", + "k=1.4 #given value\n", + "\n", + "R=287 #in j/(kg.k)\n", + "\n", + "#Calculation\n", + "\n", + "T0=T0+273 #converting into kelvin\n", + "\n", + "T1=round(T0*(p1/p0)**((k-1)/k),1)#For isentropic flow with subscript zero denoting stagnation values\n", + "\n", + "V1=((2*k*R)/(k-1.0))*(T0-T1)\n", + "\n", + "print \"(i)V1=\",round((V1**(1/2)),1),\"m/s\"\n", + "\n", + "rho1=round((p0*1000)/(R*T0),3) #When compressibility effects are ignored\n", + "\n", + "V1=(2*(p0-p1)*1000)/rho1\n", + "\n", + "print \"(ii)V1=\",round(math.sqrt(V1),1),\"m/s\"\n", + " \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)V1= 319.5 m/s\n", + "(ii)V1= 287.1 m/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.16 Page No381" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "To=35 #temperature in degree C\n", + "\n", + "R=287 #gas constant in (J/Kg.K)\n", + "\n", + "po=250 #pressure in kPa\n", + "\n", + "k=1.4 #constant for gases\n", + "\n", + "V1=200 #velocity in m/s\n", + "\n", + "#solution\n", + "\n", + "To=273+To #converting into K\n", + "\n", + "Cp=(k*R)/(k-1)\n", + "\n", + "T1=int(To-((V1**2)/(2*Cp)))\n", + "\n", + "#The Mach number M1,at the exit is,\n", + "\n", + "M1=math.sqrt(((To/T1)-1)/0.2)\n", + "\n", + "print \"M1=\",round(M1,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "M1= 0.589\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 15.21 Page No384" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "k=1.32 #given value \n", + "\n", + "M2=0.40 #Mach number of downstream\n", + "\n", + "#Calculation\n", + "\n", + "#by using formula M2**2=(2+(k-1)M1**2)/(2*K*M!**2-(k-1))\n", + "\n", + "M1_s=(((M2**2)*2*k)-(k-1))\n", + "\n", + "M1=-((-((M2**2)*(k-1))-2.0)/M1_s)\n", + "\n", + "print \"M1=\",round(M1**(1/2),3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "M1= 4.476\n" + ] + } + ], + "prompt_number": 10 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter16_2.ipynb b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter16_2.ipynb new file mode 100644 index 00000000..fad471bd --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter16_2.ipynb @@ -0,0 +1,871 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6d4bf73c597c8573d7c2f8189f4ea310f5f931d31ffa57ef03b6b5acfe2cd6e1" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 16:Fluid Flow Machines" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.8 Page No408" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "Ht=H=30 #Height\n", + "\n", + "Sp=2.0 #speed ratio\n", + "\n", + "Db=0.35 #Diameter of the boss\n", + "\n", + "F=0.65 #Flow ratio\n", + "\n", + "ga=9.81 #density\n", + "\n", + "eta0=0.90 #overall efficiency\n", + "\n", + "P=15000E3\n", + "\n", + "#Calculation\n", + "\n", + "U1=round(Sp*math.sqrt(2*ga*H),2)\n", + "\n", + "Vf1=round(F*math.sqrt(2*ga*H),2)\n", + "\n", + "#using power equation,P=ga*Q*H*eta0\n", + "\n", + "Q=P/(ga*998*H*eta0) #Discharge\n", + "\n", + "D=math.sqrt(Q/((math.pi/4)*(1-Db**2)*Vf1))\n", + "\n", + "print \"(i)D=\",round(D,3),\"m\" #Diameter of the runner\n", + "\n", + "Db=D*Db\n", + "\n", + "N=(U1*60)/(math.pi*D) #If Speed=N rpm\n", + "\n", + "print \"(ii)N=\",round(N,1),\"rpm\" #Rotational speed\n", + "\n", + "Ns=(N*math.sqrt(P/1000))/(H**(5/4))#Specific speed\n", + "\n", + "print \"(iii)Ns=\",round(Ns,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)D= 2.285 m\n", + "(ii)N= 405.5 rpm\n", + "(iii)Ns= 707.4\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.11 Page No409" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "H=N=300 #Height\n", + "\n", + "Cv=0.98 #Coefficient of velocity of jet\n", + "\n", + "D=2.5 #Diameter \n", + "\n", + "d=0.20 #Diameter of the jet\n", + "\n", + "F=0.65 #Flow ratio\n", + "\n", + "k=0.95 #Blade friction coefficient\n", + "\n", + "Beta=165 #Blade angle\n", + "\n", + "ga=9.81 #density\n", + "\n", + "g=9.79 #gravity\n", + "\n", + "etam=0.95 #Mechanical efficiency\n", + "\n", + "#Calculation\n", + "\n", + "BetaD=180-Beta\n", + "\n", + "V1=round(((Cv*math.sqrt(2*ga*H))),3) #Jet velocity\n", + "\n", + "Q=round((math.pi/4)*((d**2)*V1),3) #Discharge\n", + "\n", + "u=(math.pi*D*H)/(60)\n", + "\n", + "BetaD=BetaD*0.0175 #converting into radians\n", + "\n", + "He=round((1/ga)*(u*(V1-u))*(1+k*(math.cos(BetaD))),1)#Head extracted\n", + "\n", + "etaH=He/H #Hydraulic efficiency\n", + "\n", + "print \"(i)etaH=\",round(etaH,3)\n", + "\n", + "P=g*Q*H*etaH*etam #Power developed\n", + "\n", + "print \"(ii)P=\",int(round(P,0)),\"kW\"\n", + "\n", + "Ns=(N*math.sqrt(P))/(H**(5/4)) #Specific speed\n", + "\n", + "print \"(iii)Ns=\",round(Ns,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)etaH= 0.919\n", + "(ii)P= 6057 kW\n", + "(iii)Ns= 18.7\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.12 Page No409" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "u=14.0 #man bucket diameter in m^3/s\n", + "\n", + "beta=165 #angle deflected in degree\n", + "\n", + "k=1.0 #assumed value\n", + "\n", + "Q=0.8 #discharge\n", + "\n", + "H=45 #height\n", + "\n", + "etam=0.95 #overall efficiency\n", + "\n", + "Cv=0.985 #Given value\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "rho=998 #relative density\n", + "\n", + "#Calculation\n", + "\n", + "BetaD=180-beta #in degrees\n", + "\n", + "V1=((Cv*math.sqrt(2*g*H)))\n", + "\n", + "BetaD=BetaD*0.0175 #converting into radians\n", + "\n", + "P=((rho*Q*u*((V1-u)*(1+math.cos(BetaD))))/1000) #Power produced\n", + "\n", + "Ps=round(P*etam,2)\n", + "\n", + "print \"Ps=\",round(Ps,1),\"kW\"\n", + "\n", + "eta0=Ps/(((g*rho)/1000)*Q*H) #Overall efficiency\n", + "\n", + "#Answer given in the book varies slightly and correct answer is,\n", + "\n", + "print \"eta0=\",round(eta0,3)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ps= 318.7 kW\n", + "eta0= 0.904\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.13 Page No410" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "f=0.05 #friction loss\n", + "\n", + "h=400 #height\n", + "\n", + "N=420 #speed in rpm\n", + "\n", + "ga=9.79 #density\n", + "\n", + "eta0=0.85 #overall efficiency\n", + "\n", + "Cv=0.98 #Given value\n", + "\n", + "Ns=14 #Specific Speed\n", + "\n", + "P=500 #Power per jet\n", + "\n", + "phy=0.46 #speed ratio\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "#Calculation\n", + "\n", + "H=h*(1-f) #Net available Head\n", + "\n", + "N=int((Ns*(H**(5/4)))/(math.sqrt(P))) #Rotational speed\n", + "\n", + "print \"N=\",N,\"rpm\"\n", + "\n", + "V1=round((Cv*math.sqrt(2*g*H)),2)\n", + "\n", + "U=phy*(math.sqrt(2*g*H))\n", + "\n", + "D=round((U*60)/(math.pi*N),3)\n", + "\n", + "print \"D=\",D,\"m\" #mean diameter of bucket circle\n", + "\n", + "Q=P*1000/(ga*998*H*eta0) #Discharge\n", + "\n", + "d=math.sqrt(Q/((math.pi/4)*V1))\n", + "\n", + "print \"d=\",round((d*100),2),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "N= 1050 rpm\n", + "D= 0.722 m\n", + "d= 4.88 cm\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.16 Page No411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "H=270 #Height\n", + "\n", + "D=1.5 #Diameter\n", + "\n", + "N=400 #speed in rpm\n", + "\n", + "ga=9.81 #density\n", + "\n", + "eta0=0.90 #overall efficiency\n", + "\n", + "I=3000 #Impulse\n", + "\n", + "Cv=0.95 #Given value\n", + "\n", + "#Calculation\n", + "\n", + "P=I/2\n", + "\n", + "#using power equation,P=ga*Q*H*eta0\n", + "\n", + "Q=P*1000/(ga*998*H*eta0) #Discharge\n", + "\n", + "V1=round(Cv*math.sqrt(2*ga*H),2)\n", + "\n", + "d=math.sqrt(Q/((math.pi/4)*V1))\n", + "\n", + "print \"(i)d=\",round(d*100,2),\"cm\" #Diameter of the nozzle\n", + "\n", + "U=round(((math.pi*D*N)/60),2) #Peripheral velocity of the bucket\n", + "\n", + "phy=U/(math.sqrt(2*ga*H))\n", + "\n", + "print \"(ii)phy=\",round(phy,3) #Speed ratio\n", + "\n", + "Ns=(N*math.sqrt(P))/(H**(5/4)) #Specific speed\n", + "\n", + "print \"(iii)Ns=\",round(Ns,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)d= 10.78 cm\n", + "(ii)phy= 0.432\n", + "(iii)Ns= 14.15\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.17 Page No411" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "H=500 #Head in m\n", + "\n", + "Cv=0.98 #specific heat\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "fi=0.45 #assume\n", + "\n", + "eta_o=0.85 #assume\n", + "\n", + "d=18 #diameter in cm\n", + "\n", + "gamma=9.79 #specific weight\n", + "\n", + "N=420 \n", + "\n", + "#solution\n", + "\n", + "V1=Cv*(math.sqrt(2*g*H)) #Velocity\n", + "\n", + "d=d/100 #diameter in m\n", + "\n", + "Q=(math.pi/4)*(d**2)*V1 #Discharge\n", + "\n", + "P=eta_o*gamma*Q*H #Power developed\n", + "\n", + "Ns=(N*math.sqrt(P))/(math.pow(H,5/4)) #Specific speed\n", + "\n", + "print \"Ns=\",int(Ns)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ns= 18\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.19 Page No412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "N1=100 #speed of turbine in rpm\n", + "\n", + "H1=30 #head on turbine in m\n", + "\n", + "H2=18 #head reduced in m\n", + "\n", + "P1=8000 #p in kW\n", + "\n", + "#solution\n", + "\n", + "#For geometrically similar turbines,the unit speed,Nu=N/math.sqrt(H)\n", + "\n", + "N2=round(N1*(math.sqrt(H2/H1)),2) #speed \n", + "\n", + "print \"N2=\",N2,\"rpm\"\n", + "\n", + "P2=P1*(math.pow((H2/H1),3/2)) #power developed\n", + "\n", + "print \"P2=\",int(P2),\"kW\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "N2= 77.46 rpm\n", + "P2= 3718 kW\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.20 Page No412" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "P1=6750 #p in kW\n", + "\n", + "N1=300 #speed in rpm\n", + "\n", + "H1=45 #net head in m\n", + "\n", + "H2=60 #net head under homologus conditions in m\n", + "\n", + "ete_o=85 #efficiency in percentage\n", + "\n", + "ga=9.81*998 #density in kg/m^3\n", + "\n", + "#solution\n", + "\n", + "#using unit relationships,\n", + "\n", + "eta_o=85/100\n", + "\n", + "Q=round(P1/((eta_o)*(ga/1000)*H1),2) \n", + "\n", + "N2=round(N1*(math.sqrt(H2/H1)),1) #revolutions per minute\n", + "\n", + "print \"N2=\",N2,\"rpm\"\n", + "\n", + "Q1=18.03 #Q value\n", + "\n", + "Q2=Q1*(math.sqrt(H2/H1)) #Discharge\n", + "\n", + "print \"Q2=\",round(Q2,2),\"m^3/s\"\n", + "\n", + "P2=P1*(math.pow((H2/H1),3/2)) #brake power\n", + "\n", + "print \"P2=\",int(round(P2,5)),\"kW\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "N2= 346.4 rpm\n", + "Q2= 20.82 m^3/s\n", + "P2= 10392 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.38 Page No420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "r=0.15 #radius in m\n", + "\n", + "N=60 #speed at rpm\n", + "\n", + "rho=9800 #density\n", + "\n", + "Ht=15 #Height\n", + "\n", + "Qa=310 #actual discharge in l/min\n", + "\n", + "#calculation\n", + "\n", + "A=math.pi/4*(r**2) #Calculating area\n", + "\n", + "L=2*r\n", + "\n", + "Qt=round(((A*L*N)/60),4)\n", + "\n", + "Qt1=Qt*60*1000 #converting into l/min\n", + "\n", + "slip=(Qt1-Qa)*100/Qt1\n", + "\n", + "print \"slip=\",round(slip,2),\"%\"\n", + "\n", + "Cd=round(Qa/Qt1,3) #Coefficient of discharge\n", + "\n", + "print \"Coefficient of discharge=\",Cd\n", + "\n", + "Pt=rho*(Qt)*Ht #Power\n", + "\n", + "print \"Answer in the book is wrong.It should be as,\"\n", + "\n", + "print \"Power,Pt=\",round(Pt/1000,3),\"kW\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "slip= 2.52 %\n", + "Coefficient of discharge= 0.975\n", + "Answer in the book is wrong.It should be as,\n", + "Power,Pt= 0.779 kW\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.40 Page No420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "r=0.40 #radius in cm\n", + "\n", + "Ld=45.0 #length in m\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "A=20 #size of cylinder in cm\n", + "\n", + "Ad=10 #suction pipe in cm\n", + "\n", + "Hv=2.5 #in m water (abs)\n", + "\n", + "Hatmo=10 #atmospheric pressure of water in m\n", + "\n", + "Hd=40 #height of water\n", + "\n", + "#Calculation\n", + "\n", + "Had=int(-(Hv-Hd-Hatmo))#At incipient caviation in the delivery pipe\n", + "\n", + "N=Had/((Ld/g)*((A/Ad)**2)*(((2*math.pi)/60)**2)*r)\n", + "\n", + "print \"N=\",round(N**(1/2),2),\"rpm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "N= 24.17 rpm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.41 Page No421" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "N=30 #speed in rpm\n", + "\n", + "D=0.30 #radius of cylinder\n", + "\n", + "Ls=5.0 #length in m\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "A=15 #size of cylinder in cm\n", + "\n", + "As=5 #suction pipe in cm\n", + "\n", + "Hv=2.0 #in m water (abs)\n", + "\n", + "Hatmo=10 #atmospheric pressure of water in m\n", + "\n", + "Hs=2.5 #Suction head\n", + "\n", + "#Calculation\n", + "\n", + "omega=(2*math.pi*N)/60\n", + "\n", + "r=D/2\n", + "\n", + "Hasm=(-Hv-Hs+Hatmo)\n", + "\n", + "N=Hasm/((Ls/g)*((A/As)**2)*(((2*math.pi)/60)**2)*r)#At limiting condition for a suction pipe,\n", + "\n", + "print \"N=\",round(N**(1/2),0),\"rpm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "N= 27.0 rpm\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.42 Page No421" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "N=30 #speed in rpm\n", + "\n", + "S=40 #stroke in cm\n", + "\n", + "Ls=5.0 #length in m\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "A=20 #size of cylinder in cm\n", + "\n", + "As=10 #suction pipe in cm\n", + "\n", + "Hv=2.5 #in m water (abs)\n", + "\n", + "Hatmo=10 #atmospheric pressure of water in m\n", + "\n", + "#Calculation\n", + "\n", + "omega=(2*math.pi*N)/60\n", + "\n", + "r=(S/100)/2\n", + "\n", + "Hasm=(Ls/g)*((A/As)**2)*(omega**2)*r\n", + "\n", + "Hs=Hatmo-Hv-Hasm\n", + "\n", + "print \"Hs=\",round(Hs,3),\"m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hs= 3.476 m\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 16.45 Page No422" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialization\n", + "\n", + "N=50 #speed in rpm\n", + "\n", + "Ls=5.0 #length in m\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "r=0.20 #size of cylinder in cm\n", + "\n", + "Hv=2.5 #in m water (abs)\n", + "\n", + "Hatmo=10.0 #atmospheric pressure of water in m\n", + "\n", + "Hs=3.0 #in m\n", + "\n", + "d=25 #diameter in cm\n", + "\n", + "#Calculation\n", + "\n", + "N=N/2 #since there are 2 strokes per revolution\n", + "\n", + "omega=round((2*math.pi*N)/60,3)\n", + "\n", + "Hasm=round((Ls/g)*(omega**2)*r,2)#Maximum acceleration head in suction pipe\n", + "\n", + "Ds=(Hatmo-Hs-Hv)/(Hasm) #At limiting condition for a suction pipe\n", + "\n", + "print \"ds=\",round(d/Ds**(1/2),2),\"cm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ds= 9.86 cm\n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter1_2.ipynb b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter1_2.ipynb new file mode 100644 index 00000000..a932b26d --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter1_2.ipynb @@ -0,0 +1,962 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:cdd86001284b86f17980e1bc93a876da18f7be3f95052c4661d0dcf4eaefd863" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1:Properties of Fluids" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1 Page No5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#variable initialisation\n", + "\n", + "w=500 #mass of liquid in N\n", + "\n", + "g=9.806 #gravity in m/s*2\n", + "\n", + "g1=3.5 #gravity in m/s*2\n", + "\n", + "g2=18.0 #gravity in m/s*2\n", + "\n", + "\n", + "#Solution\n", + "\n", + "m=w/g #mass\n", + "\n", + "print \"a)m=\",round(m,2),\"kg\"\n", + "\n", + "w1=m*g1 #weight\n", + "\n", + "w2=m*g2\n", + "\n", + "print \"b)w1=\",round(w1,2),\"N\"\n", + "\n", + "print \"w2=\",round(w2,1),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)m= 50.99 kg\n", + "b)w1= 178.46 N\n", + "w2= 917.8 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2 Page No5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#variable initialisation\n", + "\n", + "weight=400 # weight in N\n", + "\n", + "gravity= 9.806 # gravity in m/s^2\n", + "\n", + "F=800 # force in n\n", + "\n", + "g=1.6 # gravity in m/s^2\n", + "\n", + "#Solution\n", + "\n", + "m=round(weight/gravity,3)\n", + "\n", + "#mass is constant and does not change with location.By Newton's second law F=m*a\"\n", + "\n", + "a=F/m\n", + "\n", + "#acceleration is independent of g.Hence both on the earth ,as well as on moon\"\n", + "\n", + "print \"a=\",round(a,3),\"m/s^2\"\n", + "\n", + " \n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a= 19.612 m/s^2\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3 Page No5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#variable initialisation\n", + "\n", + "RD=0.8 #relative density\n", + "\n", + "rho_w=998 #density of water at 20 degree C in kg/m^3\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "v=2.3 #viscosity in centistoke\n", + "\n", + "#calculation\n", + "\n", + "UnitWeight=((rho_w*RD)*g)/1000 #Unit Weight \n", + "\n", + "print \"(i) gamma=\",round(UnitWeight,3),\"kN/m^3\"\n", + "\n", + "v=2.3/(10**6) #viscosity in m^2/s\n", + "\n", + "rho=round(rho_w*RD,1) #dymanic viscosity \n", + "\n", + "mu=v*rho\n", + "\n", + "print \"(ii) mu=\"'%4.3E' % mu,\"Pa.s.\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) gamma= 7.832 kN/m^3\n", + "(ii) mu=1.836E-03 Pa.s.\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4 Page No5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "V=1.50 #Velocity in m/s\n", + "\n", + "h=3 #Height in mm\n", + "\n", + "mu=0.2 #Dynamic viscosity in Pa.s.\n", + "\n", + "#Calculation\n", + "\n", + "#Since the gap between the plates is very small,assume linear variation of velocity\n", + "\n", + "#Let us take du/dy=a\n", + "\n", + "a=V/(h/1000)\n", + "\n", + "print \"du/dy=\",a,\"(1/s)\"\n", + "\n", + "tow=mu*(a) #calculating shear stress on the bottom plate\n", + "\n", + "print \"tow=\",int(tow),\"N/m^2\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "du/dy= 500.0 (1/s)\n", + "tow= 100 N/m^2\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5 Page No6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import *\n", + "\n", + "#Variable Initialisation\n", + "\n", + "mu=1.5 #coefficient of dynamic viscosity\n", + "\n", + "#Calculation\n", + "\n", + "y = Symbol('y')\n", + "\n", + "u=4*y-y**2\n", + "\n", + "du=diff(u,y,1) #differentiating u with respect to y\n", + "\n", + "#tau=mu*(du) #Shear stress\n", + "\n", + "y=0 #taking y as 0\n", + "\n", + "tau_0=mu*(4-2*y)\n", + "\n", + "print \"tau_0=\",tau_0,\"Pa.s\"\n", + "\n", + "y=2 #taking y as 2\n", + "\n", + "tau_2=mu*(4-2*y)\n", + "\n", + "print \"tau_2=\",int(tau_2)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "tau_0= 6.0 Pa.s\n", + "tau_2= 0\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9 Page No7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "N=240 #speed in rpm\n", + "\n", + "D=90 #Diameter in mm\n", + "\n", + "D1=95 #internal diameter in mm\n", + "\n", + "mu=2 #dynamic viscosity in poise\n", + "\n", + "L=50 #length in cm\n", + "\n", + "#Calculation\n", + "\n", + "mu=mu/10 #into Pa.s\n", + "\n", + "omega=2*math.pi*N/60\n", + "\n", + "V=omega*(D/1000)/2 #Circumferential velocity of the shaft\n", + "\n", + "h=(D1-D)/2\n", + "\n", + "#Assuming linear variation of velocity across the gap,\n", + "\n", + "du=V #Velocity gradient \n", + "\n", + "dr=h/1000\n", + "\n", + "tau=mu*(du/dr) #Shear stress on the shaft\n", + "\n", + "F_s=tau*(2*math.pi*(D/1000)/2)*(L/100) #shear force\n", + "\n", + "T=F_s*((D/1000)/2)\n", + "\n", + "P=(2*math.pi*N/60)*T #Power required\n", + "\n", + "print \"P=\",round(P,1),\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P= 14.5 W\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.10 Page No7" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "mu=6 #dynamic viscosity in poise\n", + "\n", + "h=0.02 #radical clearence in mm\n", + "\n", + "D=3 #diameter in cm\n", + "\n", + "L=10 #length in cm\n", + "\n", + "W_s=7.51 #effective weight of the sleeve in N\n", + "\n", + "#Calculation\n", + "\n", + "#tau=mu*(du/dr)\n", + "\n", + "tau=(mu/(h/100)) #Shear stress\n", + "\n", + "#shaer stress=submerged weight of the sleeve\n", + "\n", + "#(2*math.pi*r*L)*tau=W_s\n", + "\n", + "a=(2*math.pi*((D/100)/2)*(L/100)*tau)\n", + "\n", + "V=W_s/a #velocity\n", + "\n", + "print \"V=\",round(V*100,2),\"cm/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V= 2.66 cm/s\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11 Page No8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "v=3.7E-4 #kinematic viscosity in m^2/s\n", + "\n", + "rho=0.85 #relative density in kg/m^3\n", + "\n", + "V=15 #velocity in cm\n", + "\n", + "D=25 #diameter in cm\n", + "\n", + "L=3.3 #length in m\n", + "\n", + "D1=25.018 #internal diameter in cm\n", + "\n", + "#Calculation\n", + "\n", + "mu=v*rho*998\n", + "\n", + "h=(D1-D)/(2E2)\n", + "\n", + "tau=mu*((V/100)/h) #shear stress\n", + "\n", + "A=math.pi*(D/100)*L #area\n", + "\n", + "F_s=A*tau #Frictional resistance\n", + "\n", + "print \"F_s=\",round(F_s/1000,3),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "F_s= 1.356 kN\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13 Page No8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "D=10 #Diameter in cm\n", + "\n", + "N=90 #rotations in rpm\n", + "\n", + "D1=9.75 #diameter 2 in cm\n", + "\n", + "Torque=1.2 #torque in N.m\n", + "\n", + "H=2.5 #height in cm\n", + "\n", + "#Calculation\n", + "\n", + "D=D/100 #into m\n", + "\n", + "D1=D1/100\n", + "\n", + "V=math.pi*D*N/60 #Tangential velocity\n", + "\n", + "h=(D-D1)/2 #Radical clearence\n", + "\n", + "tau=(V/h) #shear stress\n", + "\n", + "area=2*math.pi*(D/2)*(H/100) #calculating area\n", + "\n", + "F_s=tau*area #shear force\n", + "\n", + "T=(F_s*(D/2)) #Torque\n", + "\n", + "mu=1.2*100/T #Coefficient of viscosity\n", + "\n", + "print \"mu=\",round(mu/100,3),\"Pa.s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mu= 8.106 Pa.s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15 Page No9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#variable initialisation\n", + "\n", + "sigma=0.073 #surface Tension at air-water interface in N/m\n", + "\n", + "d=0.01 #diameter of air bubble in mm\n", + "\n", + "#calculation\n", + "\n", + "#air bubble has only one surface\n", + "\n", + "R=(d/2)/1000\n", + "\n", + "delta_p=(2*sigma)/R #Pressure difference in N/m^2\n", + "\n", + "print \"delta_p=\",delta_p/1000,\"kPa\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "delta_p= 29.2 kPa\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16 Page No9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#variable initialisation\n", + "\n", + "sigma=0.088 #surface Tension at soap-air interface in N/m\n", + "\n", + "d=3 #diameter of air bubble in cm\n", + "\n", + "#Solution\n", + "\n", + "#soap bubble has two interfaces\n", + "\n", + "R=0.03/2 #in m\n", + "\n", + "delta_p=(4*sigma)/R #in N/m^2\n", + "\n", + "print \"delta_p=\",round(delta_p,2),\"N/m^2 above atmospheric pressure\"\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "delta_p= 23.47 N/m^2 above atmospheric pressure\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.17 Page No9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#variable initialisation\n", + "\n", + "d1=6 #diameter in mm\n", + "\n", + "d2=16 #diameter in mm\n", + "\n", + "sigma=0.073 #surface tension of water in N/m\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "rho=998 #density\n", + "\n", + "#Solution\n", + "\n", + "#assume angle of contact theta=0 degree\n", + "\n", + "R1=0.006/2 #radius in m\n", + "\n", + "R2=0.016/2 #raidus in m\n", + "\n", + "r=(1/R1)-(1/R2)\n", + "\n", + "h=(2*sigma*r)/(rho*g) #difference in water level\n", + "\n", + "print \"h=\",round(h,4)*1000,\"mm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "h= 3.1 mm\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.18 Page No9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "d=3E-3 #diameter of tube\n", + "\n", + "sigma=0.48 #surface tension in N/m\n", + "\n", + "a=130 #angle of contact in degree C\n", + "\n", + "rho=13600 #density of liquid in kg/m^3\n", + "\n", + "g=9.81 #gravity\n", + "\n", + "#solution\n", + "\n", + "R=d/2\n", + "\n", + "gamma=rho*g\n", + "\n", + "e=math.radians(a) #converting degree into radians\n", + "\n", + "c=math.cos(e) #cosine value\n", + "\n", + "h=(2*sigma*c)/(gamma*R)\n", + "\n", + "h1=round(h*1000,2)\n", + "\n", + "print \"Therefore,there is a capillary depression of\",h1,\"mm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Therefore,there is a capillary depression of -3.08 mm\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.19 Page No10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#variable initialisation\n", + "\n", + "d=0.005 #diamter of grain in mm\n", + "\n", + "sigma=0.073 #surface tension of air-water interface in N/m\n", + "\n", + "g= 9.81 #gravity in m/s^2\n", + "\n", + "de=998 #density\n", + "\n", + "#solution\n", + "\n", + "R=(d/2)/1000\n", + "\n", + "ga=g*de\n", + "\n", + "#by assuming theta = 0 degree\n", + "\n", + "del_h=(2*sigma)/(ga*R) #height of water rise\n", + "\n", + "print \"Answer given in the book is wrong.It should be as,\"\n", + "\n", + "print \"delta_h=\",round(del_h,2),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "delta_h= 5.97 m\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.22 Page No10" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "M=28.97 #molecular weight of air\n", + "\n", + "p=120E+3 #in abs\n", + "\n", + "T=60 #Temperature in degree C\n", + "\n", + "#solution\n", + "\n", + "R=math.ceil(8312/28.97) #gas constant for air\n", + "\n", + "T=T+273 #Temperature in K\n", + "\n", + "rho=round(p/(R*T),3)\n", + "\n", + "print \"(i)density of air=\",rho,\"kg/m^3\"\n", + "\n", + "M1=44\n", + "\n", + "R=int(math.ceil(8312/44)) # gas constant for co2\n", + "\n", + "a=R*T\n", + "\n", + "rho=p/a\n", + "\n", + "print \"(ii)density of co2=\",round(rho,3),\"kg/m^3\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i)density of air= 1.256 kg/m^3\n", + "(ii)density of co2= 1.907 kg/m^3\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.24 Page No11" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#variable initialisation\n", + "\n", + "p=100 #compression rate in abs\n", + "\n", + "p1=80 #compression rate in abs\n", + "\n", + "#solution\n", + "\n", + "#In isothermal change K=p\n", + "\n", + "KA=p #bulk modulus \n", + "\n", + "print \"KA=\",KA,\"kPa\"\n", + "\n", + "#In adiabatic change K=kp\n", + "\n", + "k=1.4 #constant for gases\n", + "\n", + "KB=int(k*p1) #bulk modulus\n", + "\n", + "print \"KB=\",KB,\"kPa\"\n", + "\n", + "print \"KAha,the flow is from B towards A.i.e.Upwards\"\n", + "\n", + "h_f=hb-ha\n", + "\n", + "V=(h_f*ga*(D**2))/(32*mu*L)*1000\n", + "\n", + "Re=round(V*D*rho/mu,1) #Reynold's number\n", + "\n", + "#As Re<2000,the flow is laminar and our initial assumption is correct.\n", + "\n", + "A=(math.pi*(D**2)/4) #Area\n", + "\n", + "Q=A*V #Discharge\n", + "\n", + "print \"Q=\",round(Q*1000,4),\"L/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Since hb>ha,the flow is from B towards A.i.e.Upwards\n", + "Q= 0.5468 L/s\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.12 Page No165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "mu=2.5 #absolute viscosity\n", + "\n", + "rho=0.9 #relative density in kg/m^3\n", + "\n", + "ga=9.81 #gravity\n", + "\n", + "L=500 #Length in m\n", + "\n", + "D=100 #Diameter in m\n", + "\n", + "Q=2 #Discharge\n", + "\n", + "P_b=0 #atmospheric pressure in Pa\n", + "\n", + "Z2=f=20 #elevation of pump2,friction factor\n", + "\n", + "e=0.65 #efficiency of pump \n", + "\n", + "#Calculation\n", + "\n", + "mu=mu/10 #in Pa.s\n", + "\n", + "rho=rho*998 #density in kg/m^3\n", + "\n", + "D=D/1000\n", + "\n", + "Q=Q/1000\n", + "\n", + "V=Q/((math.pi/4)*(D**2))\n", + "\n", + "Re=round(V*D*rho/mu,3) #Reynold's number\n", + "\n", + "print \"Re=\",Re\n", + "\n", + "#As Re<2000,the flow is laminar.\n", + "\n", + "h_f=round((32*mu*V*L)/(ga*rho*(D**2)),2) #In laminar flow the head loss\n", + "\n", + "#If A is the pump end and B is the outlet,\n", + "\n", + "P_A=int((Z2+h_f)*(ga*rho))\n", + "\n", + "print \"P_A=\",int(P_A/1000),\"kPa\"\n", + "\n", + "#H=static head+friction head\n", + "\n", + "H=h_f+f #Overall Head\n", + "\n", + "P=int(ga*rho*Q*H) #Power required for pumping\n", + "\n", + "Pi=round(P/e,1) #power input required\n", + "\n", + "print \"Pi=\",Pi,\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Re= 91.49\n", + "P_A= 278 kPa\n", + "Pi= 855.4 W\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.13 Page No165" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "v=1.5 #kinematic viscosity in stokes\n", + "\n", + "rho=900 #relative density in kg/m^3\n", + "\n", + "L=300 #length in m\n", + "\n", + "D=8 #Diameter in cm\n", + "\n", + "e=60 #Overall efficiency\n", + "\n", + "Pi=5000 #input power\n", + "\n", + "#Calculation\n", + "\n", + "v=v/10000 #viscosity in m^2/s\n", + "\n", + "P=e/100*Pi #power delivered to the fluid\n", + "\n", + "D=D/100 #diameter in m\n", + "\n", + "mu=rho*v #Dynamic viscosity in Pa.s\n", + "\n", + "Q= math.sqrt((P*math.pi*(D**4))/(128*mu*L))\n", + "\n", + "print \"Q=\",round(Q*1000,2),\"L/s\" #Rate of flow\n", + "\n", + "V=round(Q/((math.pi/4)*(D**2)),3) #Velocity in m/s\n", + "\n", + "Re=V*D/v #Reynolds number\n", + "\n", + "print \"Re=\",round(Re,1)\n", + "\n", + "#As Re<2000,the flow is laminar\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q= 8.63 L/s\n", + "Re= 915.7\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.14 Page No166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "Q=850 #Discharge in L/min\n", + "\n", + "D=0.15 #Diameter in cm\n", + "\n", + "del_P=95000 #change in pressure\n", + "\n", + "ga=9.81 #gravity\n", + "\n", + "L=800 #Length in m\n", + "\n", + "rho=917 #density\n", + "\n", + "#Calculation\n", + "\n", + "Q=Q/(1000*60) #Converting into m^3/s\n", + "\n", + "V=Q/((math.pi/4)*(D**2)) #velocity\n", + "\n", + "Hf=del_P/(ga*rho) #Head loss\n", + "\n", + "mu=(Hf*ga*rho*(D**2))/(32*V*L)\n", + "\n", + "print \"mu=\",round(mu,5),\"Pa.s.\"\n", + "\n", + "Re=(V*D*rho)/mu #Reynolds number\n", + "\n", + "print \"Re=\",int(round(Re,))\n", + "\n", + "print\"As this value of Re is less than 2000,the flow is laminar as assumed initially\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "mu= 0.10415 Pa.s.\n", + "Re= 1059\n", + "As this value of Re is less than 2000,the flow is laminar as assumed initially\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.16 Page No166" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "rho=0.92 #relative density\n", + "\n", + "mu=0.085 #dynamic viscosity\n", + "\n", + "Q=0.04 #discharge\n", + "\n", + "ga=9.81 #gravity constant\n", + "\n", + "#Calculation\n", + "\n", + "rho=rho*998#relative density in kg/m^3\n", + "\n", + "#Assuming laminar flow,h_f/L=0.0-4\n", + "\n", + "h_f=0.04\n", + "\n", + "D=((((128*mu*Q))/(math.pi*ga*rho))/h_f)**(1/4) #diameter\n", + "\n", + "V=Q/((math.pi/4)*(D**2)) #Velocity\n", + "\n", + "Re=(V*D*rho)/(mu) #Reynold's number\n", + "\n", + "#As this value is >2000,the flow is not laminar.Hence the required diameter is controlled by critical Reynolds number\n", + "\n", + "Re_crit=2000\n", + "\n", + "D=round(((rho/mu)*(Q/(math.pi/4)))/Re_crit,3) #Diameter\n", + "\n", + "h_f=(128*mu*Q)/(math.pi*rho*(D**4)) #Headloss/L\n", + "\n", + "#As this is less than permissible gradient of 0.04 the diameter is acceptable.\n", + "\n", + "print \"Hece the least diameter =\",D*100,\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Hece the least diameter = 27.5 cm\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.18 Page No167" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "Re=1200 #Reynolds number\n", + "\n", + "v=1.92E-3 #kinematic viscosity in m^2/s\n", + "\n", + "g=9.81 #gravity constant\n", + "\n", + "#Calculation\n", + "\n", + "VD=Re*v #equation 1\n", + "\n", + "#Z1-Z2=L\n", + "\n", + "#Se=(Z1-Z2)/(Z1-Z2)=1.0\n", + "\n", + "Se=Sf=1.0 #energy gradient\n", + "\n", + "#Sf=32*v*V/g*D**2\n", + "\n", + "VD2=(g*Sf)/(32*v) #Equation 2\n", + "\n", + "#From VD/VD2,\n", + "\n", + "D=(1/(VD2/VD))**(1/3) #solving to find D\n", + "\n", + "print \"D=\",round(D,3),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "D= 0.243 m\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.19 Page No168" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "B=0.12 #thickness in mm\n", + "\n", + "L=50 #length in cm\n", + "\n", + "h_f=5.0 #headloss in m\n", + "\n", + "ga=9790 #Specific weight\n", + "\n", + "mu=(998)*(0.01E-4) #viscosity \n", + "\n", + "#solution\n", + "\n", + "V=((h_f)*(ga)*((B/1000)**2))/(12*mu*(L/100)) #calculating V in m/s\n", + "\n", + "q=(1*V*(B/1000))*60*1000 #Discharge per metre width\n", + "\n", + "print round(q,3),\"L/min per metre width of crack\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "0.848 L/min per metre width of crack\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.21 Page No169" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "V=1.40 #mean velocity in m/s\n", + "\n", + "B=1.2 #distance between plates in cm\n", + "\n", + "mu=1.05 #dynamic viscosity\n", + "\n", + "y=0.002 #distance in m\n", + "\n", + "ga=0.92*998*9.81 #relative density\n", + "\n", + "L=25 #length in m\n", + "\n", + "#Calculation\n", + "\n", + "B=B/100 #Converting into m\n", + "\n", + "mu=mu/10 #Converting into Pa.s\n", + "\n", + "#For two dimensional laminar flow between parallel plates\n", + "\n", + "um=(3/2)*V #Maximum velocity\n", + "\n", + "print \"Um=\",round(um,1),\"m/s\"\n", + "\n", + "#Let us take (-dp/dx) as dp\n", + "\n", + "#V=(-dp/dx)*(B**2/12*mu)\n", + "\n", + "dp=12*mu*V/(B**2)\n", + "\n", + "tau_0=(dp)*(B/2) #Boundary shear stress\n", + "\n", + "print \"tau_0=\",tau_0,\"Pa\"\n", + "\n", + "#let y=0.002m\n", + "\n", + "tau=(dp)*(B/2-y) #Shear stress\n", + "\n", + "print \"tau=\",int(tau),\"Pa\"\n", + "\n", + "v=(((1/(2*mu))*dp))*(B*y-y**2) #Velocity\n", + "\n", + "print \"v=\",round(v,3),\"m/s\"\n", + "\n", + "h_f=12*mu*V*L/(ga*(B**2)) #Head loss\n", + "\n", + "print \"h_f=\",round(h_f,1),\"m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Um= 2.1 m/s\n", + "tau_0= 73.5 Pa\n", + "tau= 49 Pa\n", + "v= 1.167 m/s\n", + "h_f= 34.0 m\n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter8_2.ipynb b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter8_2.ipynb new file mode 100644 index 00000000..0e5e03ba --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter8_2.ipynb @@ -0,0 +1,841 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:abbef0b066ab549282c5b597a49f485e7d871355c952c6f48a6b8d3f7167b150" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8:Boundary Layer Concepts" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3 Page No180" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import *\n", + "\n", + "#Variable Initialisation\n", + "\n", + "x, y,z,c,u,eta,delt,U=symbols(\"x y z c u delt U eta\")\n", + "\n", + "#Calculation\n", + "\n", + "u=sin(U*pi*y/2*delt) #Given equation 1\n", + "\n", + "#Let us take a=(du/dy)\n", + "\n", + "a=diff(u,y,2) #differentiating\n", + "\n", + "#At y=0,u=U sin(0),\n", + "\n", + "b=a.subs(y,0) #Substituting 0 for y\n", + "\n", + "print \"(a)(d**2u/dy**2)=\",b\n", + "\n", + "#At y=delt,u=U sin(pi/2)\n", + "\n", + "b=a.subs(y,pi/2) #Substituting pi/2 for y\n", + "\n", + "print \"(d**2u/dy**2)=\",b,\"not equal to 0\"\n", + "\n", + "print \"Hence all essential and one desirable boundary condition are satisfied\"\n", + "\n", + "u=U*(1+eta-2*eta**2) #Given equation 2\n", + "\n", + "#Let us take a=(du/dy)\n", + "\n", + "u=u.subs(eta,y/delt)\n", + "\n", + "a=diff(u,y,2) #differentiating\n", + "\n", + "#At y=0,u=U sin(0),\n", + "\n", + "b=a.subs(y,0) #Substituting 0 for y\n", + "\n", + "print \"(b)(d**2u/dy**2)=\",b,\"not equal to 0\"\n", + "\n", + "#At y=delt,u=0\n", + "\n", + "b=a.subs(y,delt) #Substituting delt for y\n", + "\n", + "print \"(d**2u/dy**2)=\",b,\"not equal to 0\"\n", + "\n", + "print \"Hence this is not a proper locality distribution in a laminar boundary layer\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a)(d**2u/dy**2)= 0\n", + "(d**2u/dy**2)= -pi**2*U**2*eta**2*sin(pi**2*U*eta/4)/4 not equal to 0\n", + "Hence all essential and one desirable boundary condition are satisfied\n", + "(b)(d**2u/dy**2)= -4*eta/U**2 not equal to 0\n", + "(d**2u/dy**2)= -4*eta/U**2 not equal to 0\n", + "Hence this is not a proper locality distribution in a laminar boundary layer\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6 Page No182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "U=6 #free stream velocity in m/s\n", + "\n", + "L=45 #length in cm\n", + "\n", + "v=0.9 #kinematic viscosity in stoke\n", + "\n", + "rho=0.925 #relative density of oil\n", + "\n", + "B=15 #Width of plate in cm\n", + "\n", + "#Calculation\n", + "\n", + "L=L/100 #converting into m\n", + "\n", + "v=0.9/10000 #1 stoke=(10^-4) m^2/s\n", + "\n", + "rho=rho*1000\n", + "\n", + "B=B/100 #Converting into m\n", + "\n", + "Re_L=(U*L)/v #calculating reynolds number \n", + "\n", + "#Since Re_L is less than Re(crit)=5.0E5,the boundary layer is laminar\n", + "\n", + "#Using Blasius' results\n", + "\n", + "#del/x=5.0/math.sqrt(Rex)\n", + "\n", + "x=0.45 #At the trailing edge \n", + "\n", + "delta_L=round(((5.0*L)/math.sqrt(Re_L))*100,1)#Boundary layer thickness\n", + "\n", + "print \"delta_L=\",delta_L,\"cm\"\n", + "\n", + "#tau_L=(rho*U**2/2)*(Cf*L),wheren Cf=(0.664/math.sqrt(Re_L))\n", + "\n", + "tau_L=round(((rho*(U**2))/2)*(0.664/math.sqrt(Re_L)),1)\n", + "\n", + "print \"tau_L=\",tau_L,\"N/m^2\" #shear stress at the trailing edge\n", + "\n", + "#F_D=C_Df*(L.B)*rho*U**2/2 where,C_Df=1.328/math.sqrt(Re_L)\n", + "\n", + "C_Df=1.328/(math.sqrt(Re_L))\n", + "\n", + "F_D=round(C_Df*(L*B)*(rho*(U**2))/2,3) #Drag on one side of the plate\n", + "\n", + "print \"F_D=\",F_D,\"N\"\n", + "\n", + "F_2D=2*F_D #on both sides of the plate\n", + "\n", + "print \"F_2D=\",round(F_2D,2),\"N\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "delta_L= 1.3 cm\n", + "tau_L= 63.8 N/m^2\n", + "F_D= 8.617 N\n", + "F_2D= 17.23 N\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7 Page No182" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "x=1.25 #At the centre of plate\n", + "\n", + "U=1.5 #free stream velocity in m/s\n", + "\n", + "v=0.0001 #kinematic viscosity in stoke\n", + "\n", + "rho=0.8*1000 #relative density of oil\n", + "\n", + "B=2 #Width of plate in m \n", + "\n", + "#Calculation\n", + "\n", + "#(a)At the centre of plate\n", + "\n", + "Re_x=(x*U)/v\n", + "\n", + "#This is less than Re(crit)=5E5 and hence boundary layer is laminar\n", + "\n", + "#del/x=5.0/math.sqrt(\\Re_x)\n", + "\n", + "delta_m=round((5.0*x)/(math.sqrt(Re_x))*100,2)\n", + "\n", + "print \"delta_m=\",delta_m,\"cm\"\n", + "\n", + "C_f=0.664/math.sqrt(Re_x) #local friction coefficient \n", + "\n", + "tau_0m=round(C_f*(rho*(U**2))/2,3) #shear stress\n", + "\n", + "print \"tau_m=\",tau_0m,\"N/m^2\"\n", + "\n", + "x=L=2.5 #(b)At the trailing edge\n", + "\n", + "Re_L=(L*U)/v\n", + "\n", + "#This is less than Re(crit)=5E5 and hence boundary layer is laminar\n", + "\n", + "delta_L=round(5.0*L/(math.sqrt(Re_L))*100,2)\n", + "\n", + "print \"delta_L=\",delta_L,\"cm\"\n", + "\n", + "C_f=0.664/math.sqrt(Re_L) #local friction coefficient \n", + "\n", + "tau_0L=round(C_f*(rho*(U**2))/2,3) #shear stress\n", + "\n", + "print \"tau_0L=\",tau_0L,\"N/m^2\"\n", + "\n", + "#F=C_Df*area*(rho*(U**2)/2 #(c)Total force\n", + "\n", + "C_Df=1.328/(math.sqrt(Re_L))\n", + "\n", + "area=2*L*B\n", + "\n", + "F=C_Df*area*(rho*(U**2))/2\n", + "\n", + "print \"F=\",round(F,2),\"N\"\n", + "\n", + "P=F*U\n", + "\n", + "print \"P=\",round(P,2),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "delta_m= 4.56 cm\n", + "tau_m= 4.364 N/m^2\n", + "delta_L= 6.45 cm\n", + "tau_0L= 3.086 N/m^2\n", + "F= 61.72 N\n", + "P= 92.58 W\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8 Page No183" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "U=3.0 #Velocity in m/s\n", + "\n", + "v=1.45E-5 #velocity of air in m^2/s\n", + "\n", + "rho_a=1.2 #density in kg/m^3\n", + "\n", + "Re=5E+5 #critical reynolds number\n", + "\n", + "w=1.5 #width in m\n", + "\n", + "#solution\n", + "\n", + "L=round((Re*v)/U,3) #Maximum Length of plate\n", + "\n", + "print \"L=\",L,\"m\"\n", + "\n", + "C_df=(1.328)/(math.sqrt(Re)) #length of plate in a laminar sublayer\n", + "\n", + "F_D=C_df*(w*L)*((2*(U**2))/2) #Drag force in one side of the plate\n", + "\n", + "print \"F_D=\",round(F_D/100*60,5),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "L= 2.417 m\n", + "F_D= 0.03677 N\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.11 Page No184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "U=2 #free stream velocity in m/s\n", + "\n", + "L=20 #length in m\n", + "\n", + "v=1*(1/1000000) #kinematic viscosity in stoke\n", + "\n", + "Re_crit=5*100000 #critical Reynolds number\n", + "\n", + "rho=998 #Relative density\n", + "\n", + "#Calculation\n", + "\n", + "Re_L=U*L/v\n", + "\n", + "#The boundary layer is turbulent at the trailing edge.\n", + "\n", + "#(i)Taking the critical reynolds number\n", + "\n", + "x_crit=(Re_crit)*v/U\n", + "\n", + "print \"x_crit\",int(x_crit*100),\"cm\"\n", + "\n", + "#Laminate boundary layer exists in the first 25cm of the plate\n", + "\n", + "delta_c=5.0*x_crit/(math.sqrt(Re_crit))*1000\n", + "\n", + "print \"delta_c=\",round(delta_c,3),\"mm\"\n", + "\n", + "#At the trailing edge,as reynolds numbere is >E7,the thickness is obtained by putting,\n", + "\n", + "x=L=20\n", + "\n", + "Re_x=U*L/v\n", + "\n", + "delta_t=(0.22*x)/((Re_x)**(1/6))*100\n", + "\n", + "print \"delta_t=\",round(delta_t,1),\"cm\"\n", + "\n", + "#(iii)shear stress coefficient\n", + "\n", + "C_f=0.370/(log(Re_x,10))**(2.58)\n", + "\n", + "tau_0=C_f*(rho*(U**2))/2\n", + "\n", + "print \"tau_0=\",round(tau_0,2),\"Pa\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "x_crit 25 cm\n", + "delta_c= 1.768 mm\n", + "delta_t= 23.8 cm\n", + "tau_0= 3.94 Pa\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.12 Page No185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "mu=1.8E-6 #viscosity in poise\n", + "\n", + "rho=1.22 #relative density\n", + "\n", + "U=1.75 #free stream velocity in m/s\n", + "\n", + "L=5 #Length in m\n", + "\n", + "B=1.8 #width in m\n", + "\n", + "#Calculation\n", + "\n", + "mu=(mu)*10 #in Poise\n", + "\n", + "v=mu/rho #calculating kinematic viscosity in stoke\n", + "\n", + "Re_L=U*L/v #Reynolds number\n", + "\n", + "#(i)For laminar boundary layer:\n", + "\n", + "C_DF=1.328/(math.sqrt(Re_L)) #Drag Coefficient\n", + "\n", + "area=B*L\n", + "\n", + "F_D=C_DF*area*(rho*(U**2)/2)\n", + "\n", + "print \"F_D=\",round(F_D,3),\"N\"\n", + "\n", + "#(ii)For turbulent boundary layer:\n", + "\n", + "#since Re_L is between 5E5 and E7,the 1/7 th power law is applicable.\n", + "\n", + "C_DF=0.074/((Re_L)**(1/5)) #Drag coefficient\n", + "\n", + "area=B*L\n", + "\n", + "F_D=C_DF*area*(rho*(U**2)/2) #Drag force on one side of the plate\n", + "\n", + "print \"F_D=\",round(F_D,4),\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "F_D= 0.029 N\n", + "F_D= 0.0871 N\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.13 Page No185" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import *\n", + "\n", + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "U=1.5 #velocity in m/s\n", + "\n", + "L=35 #Length in m\n", + "\n", + "mu=0.001 #viscosity in Pa.s\n", + "\n", + "rho=1025 #relative density in kg/m^3\n", + "\n", + "b=10 #breadth in m\n", + "\n", + "ep=0.002 #roughness height in m\n", + "\n", + "#Calculation\n", + "\n", + "v=mu/rho #calculating velocity\n", + "\n", + "ReL=(U*L)/v #Reynolds number\n", + "\n", + "#The flow is turbulent in the boundary layer.\n", + "\n", + "C_Df=round((0.455/(log(ReL,10))**(2.58))-(1700/ReL),5) #Drag coefficient\n", + "\n", + "area=b*L #area\n", + "\n", + "F_D=int(C_Df*area*((rho*U**2)/2))#drag force on the bottom of the barge\n", + "\n", + "print \"F_D=\",F_D,\"N\"\n", + "\n", + "s=L/ep\n", + "\n", + "C_Df=1/((1.89+1.62*(log(s,10)))**(2.5)) #For a rough flat boundary\n", + "\n", + "F_D=int(C_Df*area*((rho*U**2)/2)) #Drag force\n", + "\n", + "print \"F_D=\",F_D,\"N\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "F_D= 924 N\n", + "F_D= 1775 N\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.14 Page No186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "V=20 #velocity in km/h\n", + "\n", + "L=6 #length in m\n", + "\n", + "rho=1.2 #relative density in kg/m^3\n", + "\n", + "v=1.5E-5 #kinematic viscosity in stoke\n", + "\n", + "B=1 #Breadth in m\n", + "\n", + "#Calculation\n", + "\n", + "U=round(V*1000/3600,2) #Wind velocity\n", + "\n", + "Re_L=U*L/(v) #Reynolds number\n", + "\n", + "#The boundary layer is turbulent and the drag coefficient is corresponding to the power law,\n", + "\n", + "C_DF=round((0.074/(Re_L)**(1/5))-(1700/(Re_L)),6)\n", + "\n", + "area=B*L\n", + "\n", + "F_D=round(C_DF*area*(rho*(U**2))/2,4)\n", + "\n", + "print \"F_D=\",F_D,\"N\"\n", + "\n", + "#The turbulent boundary layer thickness at trailing edge:\n", + "\n", + "x=L=6 #in m\n", + "\n", + "delta=round(L*(0.3773/(Re_L**(1/5)))*100,2)\n", + "\n", + "print \"delta=\",delta,\"cm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "F_D= 0.3578 N\n", + "delta= 12.17 cm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.15 Page No186" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "U=3 #free stream velocity in m/s\n", + "\n", + "L=3 #Length in m\n", + "\n", + "v=1E-6 #kinematic viscosity in stoke\n", + "\n", + "rho=998 #Relative density in kg/m^3\n", + "\n", + "area=3.50 #area in m^2\n", + "\n", + "Total=70 #total measured drag in N\n", + "\n", + "#Calculation\n", + "\n", + "Re_L=U*L/v\n", + "\n", + "#The boundary layer is turbulent\n", + "\n", + "C_DF=(0.074/(Re_L**(1/5)))-(1700/Re_L) #Drag coefficient\n", + "\n", + "F_D=round(C_DF*area*(rho*(U**2))/2,1)\n", + "\n", + "print \"F_D=\",F_D,\"N\"\n", + "\n", + "#total measured drag=skin friction drag+wave drag\n", + "\n", + "F_DW=Total-F_D\n", + "\n", + "print \"F_DW=\",F_DW,\"N\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "F_D= 44.3 N\n", + "F_DW= 25.7 N\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.17 Page No187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import *\n", + "\n", + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "U=5 #velocity in m/s\n", + "\n", + "L=10 #Length in m\n", + "\n", + "mu=0.0018 #viscosity in Pa.s\n", + "\n", + "rho=1020 #relative density in kg/m^3\n", + "\n", + "b=2 #breadth in m\n", + "\n", + "ep=0.005 #roughness height in m\n", + "\n", + "#Calculation\n", + "\n", + "ReL=(U*L*rho)/mu #Reynolds number\n", + "\n", + "#The flow is turbulent in the boundary layer.\n", + "\n", + "area=b*L*2 #area\n", + "\n", + "s=L/ep\n", + "\n", + "C_Df=1/((1.89+1.62*(log(s,10)))**(2.5)) #For a rough flat boundary\n", + "\n", + "F_D=int(C_Df*area*((rho*U**2)/2)) #Drag force\n", + "\n", + "P=(F_D*U)/1000\n", + "\n", + "print \"P=\",round(P,1),\"kW\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "P= 18.1 kW\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.18 Page No187" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import *\n", + "\n", + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "Up=10 #speed of prototype\n", + "\n", + "Lm=1 #length of model\n", + "\n", + "Lp=30 #length of prototype\n", + "\n", + "area=1600 #wetted area\n", + "\n", + "rho=1025 #relative density \n", + "\n", + "mu=1.07E-3 #dynamic viscosity in Pa.s\n", + "\n", + "Tm=20 #total measured drag\n", + "\n", + "rho_r=1 #relative density \n", + "\n", + "Lr=(1/30) #ratio of model\n", + "\n", + "#Calculation\n", + "\n", + "#two drage:surface,wave.m for model and p for prototype\n", + "\n", + "#Froude number\n", + "\n", + "Um=round(Up*(math.sqrt(Lm/Lp)),3)\n", + "\n", + "Am=round(area*((Lm/Lp)**2),3)\n", + "\n", + "Lm=100*(Lm/Lp)\n", + "\n", + "Lp=100\n", + "\n", + "ReLP=((rho*Up*Lp)/mu) #Reynolds number\n", + "\n", + "ReLM=rho*Um*Lm/mu\n", + "\n", + "#The boundary is turbulent\n", + "\n", + "C_Dfm=(0.074/(ReLM**(1/5)))-(1700/ReLM)\n", + "\n", + "Fsm=C_Dfm*Am*((rho*(Um**2))/2) #surface resistance\n", + "\n", + "Fwm=Tm-Fsm\n", + "\n", + "#Fwm is modelled by Froude's law,\n", + "\n", + "Fwp=round(Fwm/(rho_r*(Lr**3))/1000,1) #wave drag\n", + "\n", + "C_Dfp=round((0.455/(log(ReLP,10))**(2.58))-(1700/ReLP),5) #Drag coefficient\n", + "\n", + "Fsp=round(C_Dfp*area*((rho*(Up**2))/2)/1000,1)\n", + "\n", + "Fp=Fwp+Fsp #Total prototype drag\n", + "\n", + "print \"Fp=\",round(Fp,0),\"kN\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Fp= 424.0 kN\n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter9_2.ipynb b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter9_2.ipynb new file mode 100644 index 00000000..f17843d0 --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter9_2.ipynb @@ -0,0 +1,723 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:8c778708d02b2b46d4a41ece25f6ebe6a607bf5db03c87ed523f7feae47d8f6c" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9:Drag and Lift on Immersed Bodies" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2 Page No198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "D=20 #diameter in cm\n", + "\n", + "rho_s=2.8*998 #relative density\n", + "\n", + "rho_w=998 #relative density of water in kg/m^3\n", + "\n", + "v=1E-6 #velocity in m^2/s\n", + "\n", + "g=9.81 #gravity constant in m/s^2\n", + "\n", + "rho_f=998\n", + "\n", + "#solution\n", + "\n", + "#assume Re>3*E+5.then\n", + "\n", + "C_D=0.20\n", + "\n", + "#At terminal velocity V-0t,submerged weight=Drag\n", + "\n", + "D=D/100 #converting D in m\n", + "\n", + "V_ot=round(math.sqrt((4/3)*(D/C_D)*((g)*((rho_s/rho_f)-1))),3)\n", + "\n", + "print \"V_ot=\",V_ot,\"m/s\"\n", + "\n", + "Re=(V_ot*(D/100))/v #calculating Re\n", + "\n", + "#from Re,its clear,Re>3*10^5\n", + "\n", + "print \"Hence the assumption is correct and V_ot=\",V_ot,\"m/s\"\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V_ot= 4.852 m/s\n", + "Hence the assumption is correct and V_ot= 4.852 m/s\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3 Page No199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "rho_f=998 #density of water in kg/m^3\n", + "\n", + "mu=1E-3 #coefficient of viscosity in Pa.s\n", + "\n", + "g=9.81 #gravity in m/s^2\n", + "\n", + "ga_s=2.65*998 #particles RD\n", + "\n", + "ga_f=998 #relative density in kg/m^3\n", + "\n", + "#solution\n", + "\n", + "#Stoke's law is valid upto Re=1.0\n", + "\n", + "#For maximum size particles that obey stoke's law,\n", + "\n", + "#Using fall velocity and stoke's law,\n", + "\n", + "V_ot=(1/18)*g*(mu/rho_f)*((ga_s/ga_f)-1) #terminal velocity\n", + "\n", + "V_o=round(math.pow(V_ot,1/3)*1000,2) #taking cube root\n", + "\n", + "print \"V_ot=\",V_o,\"mm/s\"\n", + "\n", + "D=(mu)/(rho_f*V_o/1000) #size\n", + "\n", + "print \"D=\",round(D*1000,4),\"mm\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "V_ot= 9.66 mm/s\n", + "D= 0.1037 mm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4 Page No199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#variable initialisation\n", + "\n", + "ga_s=2.60*998 #relative density of sphere\n", + "\n", + "D=2.0 #Diameter in mm\n", + "\n", + "v=1.25 #velocity in cm/s\n", + "\n", + "ga_f=917 #density of oil in kg/m^3 \n", + "\n", + "g=9.81 #gravity in m/s^2\n", + "\n", + "#solution\n", + "\n", + "#Assuming validity of Stoke's law,\n", + "\n", + "#using Fall Velocity equation,\n", + "\n", + "mu=round((((D/1000)**2)*((ga_s*g)-(ga_f*g)))/(18*(v/100)),3)\n", + "\n", + "print \"coefficient of dynamic viscosity mu=\",mu,\"Pa.s\"\n", + "\n", + "#Reynold's number,\n", + "\n", + "Re=round((ga_f*(v/100)*(D/1000))/(mu),3)\n", + "\n", + "print \"Reynolds number is\",Re\n", + "\n", + "print Re,\" < 1.0\"\n", + "\n", + "print \"Hence the assumed Stoke's law is valid\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "coefficient of dynamic viscosity mu= 0.293 Pa.s\n", + "Reynolds number is 0.078\n", + "0.078 < 1.0\n", + "Hence the assumed Stoke's law is valid\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5 Page No199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "D=0.2 #diameter in mm\n", + "\n", + "rho_f=1.20 #density of air in kg/m^3\n", + "\n", + "rho_s=998 #density of water in kg/m^3\n", + "\n", + "g=9.81 #gravity in m/s^2\n", + "\n", + "C_D=4.20 #Drag coefficient\n", + "\n", + "D1=2.0 #Diameter in mm\n", + "\n", + "C_D1=0.517 #Drag coefficient\n", + "\n", + "#solution\n", + "\n", + "D=D/1000 #converting D to m\n", + "\n", + "print \"For 0.2 mm rain drop:\"\n", + "\n", + "V_ot=round(math.sqrt((((4*g*D)/(3*C_D))*((rho_s/rho_f)-1))),2)\n", + "\n", + "print \"V_ot=\",V_ot,\"m/s\"\n", + "\n", + "print \"For 2.0 mm rain drop:\"\n", + "\n", + "D1=D1/1000 #converting D to m\n", + "\n", + "V_ot=round(math.sqrt((((4*g*D1)/(3*C_D1))*((rho_s/rho_f)-1))),2)\n", + "\n", + "print \"V_ot=\",V_ot,\"m/s\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For 0.2 mm rain drop:\n", + "V_ot= 0.72 m/s\n", + "For 2.0 mm rain drop:\n", + "V_ot= 6.48 m/s\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.6 Page No199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "V_o=60 #velocity in Km/h\n", + "\n", + "C_d=0.35 #Drag coefficient\n", + "\n", + "C_d1=0.30 #reduced Drag coefficient \n", + "\n", + "A=1.6 #area in m^2\n", + "\n", + "rho=1.2 \n", + "\n", + "#solution\n", + "\n", + "V_o=(V_o*1000)/(60*60) #converting V_o into m/s\n", + "\n", + "#power required to overcome wind resistance by the car\n", + "\n", + "F_D=round(C_d * A * rho * ((V_o**2)/2),2)\n", + "\n", + "p=F_D*V_o #power \n", + "\n", + "print \"a)power=\",round(p/1000,3),\"kW\"\n", + "\n", + "V_o=(p*2)/(C_d1*A*rho) #Speed\n", + "\n", + "V=math.pow(V_o,1/3)*18/5 #taking cuberoot\n", + "\n", + "print \"b)Vo=\",round(V,2),\"Km/h\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)power= 1.556 kW\n", + "b)Vo= 63.16 Km/h\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.9 Page No200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "g=9.81 #gravity in m/s^2\n", + "\n", + "h=2 #height in m\n", + "\n", + "F_D=1000 #total load in N\n", + "\n", + "rho=1.2 #density in kg/m^3\n", + "\n", + "#solution\n", + "\n", + "C_d=1.33 #for the hemisphere with concave frontal surface\n", + "\n", + "V_ot=round(math.sqrt(2*g*h),2) #Terminal Velocity\n", + "\n", + "D=F_D*(4/3.14)*(2/(C_d*rho*(V_ot**2)))#minimum size\n", + " \n", + "print \"D=\",round(math.sqrt(D),2),\"m,say 6.5 m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "D= 6.38 m,say 6.5 m\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.10 Page No201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "rho_air=1.2 #relative ddensity in kg/m^3\n", + "\n", + "v=1.5E-5 #velocityin m^2/s\n", + "\n", + "C_D=1.20 #drag coefficient\n", + "\n", + "V0=80 #velocity in km/h\n", + "\n", + "D=0.05 #Diameter in m\n", + "\n", + "L=1 #length in m\n", + "\n", + "S=0.21 #Strouhal number\n", + "\n", + "#Calculation\n", + "\n", + "V0=80*1000/3600 #velcoity in m/s\n", + "\n", + "Re=V0*D/v #Reynolds number\n", + "\n", + "A=L*D#area\n", + "\n", + "F_D=C_D*A*(rho_air*(V0**2))/2 #Drag force for unit length of cable\n", + "\n", + "print \"F_D=\",round(F_D,2),\"N/metre length of cable\"\n", + "\n", + "n=S*(V0/D) #frequency of vortex shedding\"\n", + "\n", + "print \"n=\",round(n,1),\"Hz\"\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "F_D= 17.78 N/metre length of cable\n", + "n= 93.3 Hz\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.11 Page No201" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "rho_air=1.2 #relative ddensity in kg/m^3\n", + "\n", + "v=1.5E-5 #velocityin m^2/s\n", + "\n", + "C_D=0.33 #drag coefficient\n", + "\n", + "V0=80 #velocity in km/h\n", + "\n", + "D=2.5 #Diameter in m\n", + "\n", + "L=50 #length in m\n", + "\n", + "S=0.21 #Strouhal number\n", + "\n", + "#Calculation\n", + "\n", + "V0=80*1000/3600 #velcoity in m/s\n", + "\n", + "Re=V0*D/v #Reynolds number\n", + "\n", + "A=L*D #area\n", + "\n", + "#Calculation\n", + "\n", + "V0=80*1000/3600 #velcoity in m/s\n", + "\n", + "Re=V0*D/v #Reynolds number\n", + "\n", + "A=L*D #area\n", + "\n", + "F_D=C_D*A*(rho_air*(V0**2))/2 #Force on the chimney\n", + "\n", + "M0=F_D*(L/2)\n", + "\n", + "print \"M0=\",round(M0/1000,1),\"kN.m\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "M0= 305.6 kN.m\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.14 Page No202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "l=2.0 #length in m\n", + "\n", + "w=1.5 #width in m\n", + "\n", + "C_d=0.20 #Drag coefficient\n", + "\n", + "C_l=0.60 #lift coefficient\n", + "\n", + "V_o=30 #Velocity in km/hr\n", + "\n", + "rho=998 #density in kg/m^3\n", + "\n", + "#solution\n", + "\n", + "V_o=(V_o*1000/3600)\n", + "\n", + "A=l*w #Calculating area\n", + "\n", + "F_D=round(((C_d*A*(rho*(V_o**2))/2)/1000)-.01,2) #Drag force\n", + "\n", + "F_L=round(((C_l*A*(rho*(V_o**2))/2)/1000)-.01,2) #Lift force\n", + "\n", + "F=round(math.sqrt((F_D**2)+(F_L**2)),2) #Resultant Force\n", + "\n", + "print \"F=\",F,\"kN\"\n", + "\n", + "P=F_D*V_o #Power required to tow the plate\n", + "\n", + "print \"P=\",round(P,1),\"kW\" #when we roundoff,points vary" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "F= 65.74 kN\n", + "P= 173.2 kW\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.17 Page No204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "l=2 #length in m\n", + "\n", + "w=1.2 #width in m\n", + "\n", + "C_d=0.15 #Drag coefficient\n", + "\n", + "C_l=0.75 #lift coefficient\n", + "\n", + "V_o=50 #Velocity in km/hr\n", + "\n", + "rho=1.2 \n", + "\n", + "#solution\n", + "\n", + "V_o=round((V_o*1000)/3600,5)\n", + "\n", + "A=l*w #Calculating area\n", + "\n", + "F_L=round((C_l*A)*((rho*(V_o**2))/2),1) #Lift force\n", + "\n", + "print \"F_L=\",F_L,\"N\"\n", + "\n", + "F_D=round((C_d)*(A)*((rho*(V_o**2))/2),2) #Drag Force\n", + "\n", + "print \"F_D=\",F_D,\"N\"\n", + "\n", + "F=math.sqrt((F_D**2)+(F_L**2))\n", + "\n", + "print \"F=\",round(F,2),\"N\"\n", + "\n", + "theta=math.atan(round((F_L/F_D),0))/0.0175 #Installation of F with free stream\n", + "\n", + "print \"theta=\",int(theta),\"degrees,42 minutes\"\n", + "\n", + "P=F_D*V_o #Power Expended\n", + "\n", + "print \"P=\",round(P,1),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "F_L= 208.3 N\n", + "F_D= 41.67 N\n", + "F= 212.43 N\n", + "theta= 78 degrees,42 minutes\n", + "P= 578.8 W\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.18 Page No204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from sympy import *\n", + "\n", + "from __future__ import division\n", + "\n", + "import math\n", + "\n", + "#variable initialisation\n", + "\n", + "D=1.2 #Diameter in m\n", + "\n", + "N=210 #rotations in rpm\n", + "\n", + "V0=10 #velocity of air stream\n", + "\n", + "L=9 #length in m\n", + "\n", + "rho=1.2 #relative density\n", + "\n", + "#calculation\n", + "\n", + "Vc=round((math.pi*D*N)/60,2) #Tangential velocity due to rotation\n", + "\n", + "T=round(2*math.pi*(D/2)*Vc,2) #Circulation\n", + "\n", + "print \"T=\",T,\"m^2/s\"\n", + "\n", + "F_L=L*rho*V0*T #Lift force\n", + "\n", + "print \"F_L=\",round(F_L/1000,3),\"kN\"\n", + "\n", + "C_L=2*math.pi*(Vc/V0) #Lift coefficient\n", + "\n", + "print \"C_L=\",round(C_L,2)\n", + "\n", + "theta=round(math.degrees(asin(-(Vc/V0)*(1/2))),2) #Stagnation point location\n", + "\n", + "theta1=360+theta\n", + "\n", + "print \"theta=\",theta1,\"degrees,(Stagnation point S2)\"\n", + "\n", + "theta2=180+(-theta)\n", + "\n", + "print \"theta=\",theta2,\"degrees,(Stagnation point S1)\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "T= 49.73 m^2/s\n", + "F_L= 5.371 kN\n", + "C_L= 8.29\n", + "theta= 318.74 degrees,(Stagnation point S2)\n", + "theta= 221.26 degrees,(Stagnation point S1)\n" + ] + } + ], + "prompt_number": 26 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_01_00.png b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_01_00.png new file mode 100644 index 00000000..784d1f76 Binary files /dev/null and b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_01_00.png differ diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_01_25.png b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_01_25.png new file mode 100644 index 00000000..e132c14c Binary files /dev/null and b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_01_25.png differ diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_02_44.png b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_02_44.png new file mode 100644 index 00000000..b31fff16 Binary files /dev/null and b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_02_44.png differ -- cgit