diff options
19 files changed, 13268 insertions, 0 deletions
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 \"KA<KB,gas A is more compressible than gas B,in the notified situation\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "KA= 100 kPa\n",
+ "KB= 112 kPa\n",
+ "KA<KB,gas A is more compressible than gas B,in the notified situation\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.26 Page No11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "k=1.43E+9 #bulk modulus of elasticity of kerosene in Pa\n",
+ "\n",
+ "r=0.804 #relative density \n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "rho=round(r*998,1) #density of kerosene in kg/m^3\n",
+ "\n",
+ "C=math.ceil(math.sqrt(k/rho))\n",
+ "\n",
+ "print \"velocity of sound C=\",int(C),\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "velocity of sound C= 1335 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.28 Page No11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "R=287 #gas constant\n",
+ "\n",
+ "T=80 #temperature in degree C\n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "T=273+80 #temperature in K\n",
+ "\n",
+ "k=1.4 #for air\n",
+ "\n",
+ "C=round(math.sqrt(k*R*T),1) #velocity of sound at 80 degree\n",
+ "\n",
+ "print \"C=\",C,\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "C= 376.6 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter2_2.ipynb b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter2_2.ipynb new file mode 100644 index 00000000..839871b2 --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter2_2.ipynb @@ -0,0 +1,858 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:5caa8b95d9d2e8d9ac3b8ae923407e4f4753eb950ecec9bfbb143b70f619f199"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2:Fluid Statics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1 Page No22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "h1=10 #column water in cm\n",
+ "\n",
+ "h2=5 #column of oil in cm\n",
+ "\n",
+ "rd=0.75 #relative density of oil\n",
+ "\n",
+ "h3=2 #column of mercury in cm\n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "ga=9790 #density in N/m^3\n",
+ "\n",
+ "a=h1/100\n",
+ "\n",
+ "p=ga*a #pressure\n",
+ "\n",
+ "print \"(i)For water Column,p=\",int(p),\"N/m^2\"\n",
+ "\n",
+ "ga_o=rd*ga \n",
+ "\n",
+ "p_o=(ga_o*h2)/100 #pressure\n",
+ "\n",
+ "print \"(ii)For Oil Column, p=\",round(p_o,2),\"N/m^2\"\n",
+ "\n",
+ "ga_m=13.6*ga\n",
+ "\n",
+ "p_m=ga_m*h3/100 #pressure\n",
+ "\n",
+ "print \"(iii)for Mercury Column,p=\",round(p_m,1),\"N/m^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)For water Column,p= 979 N/m^2\n",
+ "(ii)For Oil Column, p= 367.13 N/m^2\n",
+ "(iii)for Mercury Column,p= 2662.9 N/m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2 Page No22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "d=5 #depth in m\n",
+ "\n",
+ "rd=0.85 #relative density of liquid\n",
+ "\n",
+ "br=0.750 #barometer reading of mercury in m\n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "ga=rd*9790 #calculating gamma\n",
+ "\n",
+ "p=int(br*13.6*9790) #Atmospheric Pressure\n",
+ "\n",
+ "print \"atmospheric pressure=\",p ,\"N/m^2\"\n",
+ "\n",
+ "ap=round(((d*ga)+p),0)\n",
+ "\n",
+ "print \"absolute pressure in the liquid at 5.0 m depth=\",ap/1000,\"kPa\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "atmospheric pressure= 99858 N/m^2\n",
+ "absolute pressure in the liquid at 5.0 m depth= 141.466 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3 Page No22"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "p1=0 #pressure\n",
+ "\n",
+ "rho=0.88 #density\n",
+ "\n",
+ "ga_w=9790 #relative density in N/m^3\n",
+ "\n",
+ "h=4 #height of water in m\n",
+ "\n",
+ "h1=2 #height of water in m\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "ga_0=rho*9790\n",
+ "\n",
+ "p2=p1+(ga_0*h1) #pressure at the oil-water interface\n",
+ "\n",
+ "p3=round(p2+(ga_w*h),1) #pressure due to 4m of water\n",
+ "\n",
+ "print \"P3=\",round(p3/1000,4),\"kPa\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "P3= 56.3904 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5 Page No23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "k=1.4 #assumed value\n",
+ "\n",
+ "g=9.81 #gravity\n",
+ "\n",
+ "rho=1.1120 #relative density in kg/m^3\n",
+ "\n",
+ "h1=3500 #elevation above sea level in m\n",
+ "\n",
+ "h2=1000 #elevation sea level in m\n",
+ "\n",
+ "p1=89890 #pressue in Pa\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#For an adiabatic process,\n",
+ "\n",
+ "a=k/(k-1)\n",
+ "\n",
+ "p2=int(((1-(((k-1)/k)*(((g*rho)*(h1-h2))/p1)))**a)*p1)\n",
+ "\n",
+ "rho2=((p2/p1)**(1/k))*rho\n",
+ "\n",
+ "print \"Answer given in the book is wrong in decimal.It should be,\"\n",
+ "\n",
+ "print \"rho2=\",round(rho2,5),\"kg/m^3\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Answer given in the book is wrong in decimal.It should be,\n",
+ "rho2= 0.88645 kg/m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6 Page No23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "RD_oil=0.70 #relative density of oil in kg/m^3\n",
+ "\n",
+ "RD_mercury=13.6 #relative density of mercury in kg/m^3\n",
+ "\n",
+ "RD_oil2=0.8 #relative density of oil 2 in kg/m^3\n",
+ "\n",
+ "W=9790 #unit weight of water in N/m^3\n",
+ "\n",
+ "D1=10 #diameter 1 in cm\n",
+ "\n",
+ "D2=13 #diameter 2 in cm\n",
+ "\n",
+ "D3=8 #diameter 3 in cm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "D1=D1/100 #converting into m\n",
+ "\n",
+ "D2=D2/100\n",
+ "\n",
+ "D3=D3/100\n",
+ "#Equating the pressures on both the limbs at the horizontal plane.\n",
+ "\n",
+ "#P_A+(D1+D2+D3)*ga_A=P_B+(D2*ga_B)+(D3*ga_m)\n",
+ "\n",
+ "ga_A=RD_oil*W\n",
+ "\n",
+ "ga_B=RD_oil2*W\n",
+ "\n",
+ "ga_m=RD_mercury*W\n",
+ "\n",
+ "#P_A-P_B is taken as PD\n",
+ "\n",
+ "PD=((D2*ga_B)+(D3*ga_m)-(D1+D2+D3)*ga_A)/1000\n",
+ "\n",
+ "print \"P_A-P_B=\",round(PD,3),\"kPa\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "P_A-P_B= 9.545 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7 Page No23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "ga_w=9790 #unit weight of water in N/m^3\n",
+ "\n",
+ "ga_oil=0.83 #unit weight of oil in N/m^3\n",
+ "\n",
+ "D1=3.5 #diameter 1 in cm\n",
+ "\n",
+ "D2=6 #diameter 1 in cm\n",
+ "\n",
+ "D3=12 #diameter 1 in cm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "D1=D1/100 #converting into m\n",
+ "\n",
+ "D2=D2/100\n",
+ "\n",
+ "D3=D3/100\n",
+ "\n",
+ "ga_oil=ga_oil*9790 #unit weight\n",
+ "\n",
+ "#P_A+(D1+D2+D3)*ga_A=P_B+(D2*ga_B)+(D3*ga_m)\n",
+ "\n",
+ "PD=((ga_w*(D1+D2))-(ga_w*(D2+D3))-(ga_oil*D1))/1000\n",
+ "\n",
+ "print \"Pressure at N is larger thean at M by\",-round(PD,3),\"kPa\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure at N is larger thean at M by 1.117 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8 Page No24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "p1=20 #pressure in inner tank in kPa\n",
+ "\n",
+ "p2=35 #pressure in outer tank in kPa\n",
+ "\n",
+ "N=750 #barometer reading in mm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#Bourdon guage records guage pressure relative to the pressure of medium\n",
+ "\n",
+ "#local pressure is measured by aneroid barometer\n",
+ "\n",
+ "pN_abs=N+((p2*1000)/(13.6*9.79))\n",
+ "\n",
+ "print \"pN_abs=\",round(pN_abs,1),\"mm of mercury (abs)\"\n",
+ "\n",
+ "pM_abs=pN_abs+((p1*1000)/(13.6*9.79))\n",
+ "\n",
+ "print \"pN_abs=\",round(pM_abs,1),\"mm of mercury (abs)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "pN_abs= 1012.9 mm of mercury (abs)\n",
+ "pN_abs= 1163.1 mm of mercury (abs)\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9 Page No24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "RD_oil=0.75 #relative density of oil in kg/m^3\n",
+ "\n",
+ "RD_mercury=13.6 #relative density of oil in kg/m^3\n",
+ "\n",
+ "D1=10 #Diameter 1 in cm\n",
+ "\n",
+ "D2=150 #Diameter 2 in cm\n",
+ "\n",
+ "D3=200 #Diameter 3 in cm\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "D1=D1/100 #Converting into m\n",
+ "\n",
+ "D2=D2/100\n",
+ "\n",
+ "D3=D3/100\n",
+ "\n",
+ "#Considering the pressure at the horizontal plane,\n",
+ "\n",
+ "ga_o=RD_oil*9790 #specific weight of oil in N/m^3\n",
+ "\n",
+ "ga_w=9790 #specific weight of water in N/m^3\n",
+ "\n",
+ "ga_m=RD_mercury*9790 #specific weight of mercury in N/m^3\n",
+ "\n",
+ "P_A=(D1*ga_m)-(D3-D2)*ga_w-D2*ga_o-D1*ga_w\n",
+ "\n",
+ "print \"P_A=\",round(P_A/1000,3),\"kPa\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "P_A= -3.573 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.10 Page No24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "RD_oil=0.8 #relative density of oil in kg/m^3\n",
+ "\n",
+ "RD_mercury=13.6 #relative density of mercury in kg/m^3\n",
+ "\n",
+ "D1=20 #Diameter in cm\n",
+ "\n",
+ "D2=16 #Diameter in cm\n",
+ "\n",
+ "D3=12 #Diameter in cm\n",
+ "\n",
+ "D4=15 #Diameter in cm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "D1=D1/100 #Converting into m\n",
+ "\n",
+ "D2=D2/100\n",
+ "\n",
+ "D3=D3/100\n",
+ "\n",
+ "D4=D4/100\n",
+ "\n",
+ "ga_o=RD_oil*9790 #specific weight of oil in N/m^3\n",
+ "\n",
+ "ga_m=RD_mercury*9790 #specific weight of water in N/m^3\n",
+ "\n",
+ "e=-(ga_o*(D1+D2))+((ga_o*(D4)))+(-((ga_o)*D3))+(ga_m*(D4+D3+(D1-D2)))\n",
+ "\n",
+ "print \"(P_M-P_N)=\",round(e/1000,4),\"kPa\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(P_M-P_N)= 38.6901 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.17 Page No28"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "ga_o=0.9*9790 #relative density of oil in kg/m^3\n",
+ "\n",
+ "P0=0 #pressure at top\n",
+ "\n",
+ "d=0.6 #depth in m\n",
+ "\n",
+ "s=1.5 #sides of tank in m\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Pi=0.9*ga_o #pressure at the interface in N/m^2\n",
+ "\n",
+ "Pb=Pi+9790*d #pressure on the bottom in N/m^2\n",
+ "\n",
+ "F1=(1/2)*Pi*(0.9*s) #Force on the top of 0.l9 m of a side\n",
+ "\n",
+ "F2=Pi*s*d #Force on the bottom of 0.6 m of a side\n",
+ "\n",
+ "F3=(1/2)*(Pb-Pi)*d*s #remaining part of force on the bottom 0.6m of a side\n",
+ "\n",
+ "F=F1+F2+F3 #Total force\n",
+ "\n",
+ "print \"Total force F=\",round(F/1000,3),\"kN\"\n",
+ "\n",
+ "Y_p=((F1*d)+(F2*(0.9+(d/2)))+(F3*(0.9+(2/3)*d)))/F #centre of pressure\n",
+ "\n",
+ "print \"Y_p=\",round(Y_p,3),\"m\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total force F= 15.133 kN\n",
+ "Y_p= 1.005 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.19 Page No29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "h=4.5 #height of board in m\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#For critical stability,the centre of pressure must be at C\n",
+ "\n",
+ "#h=height of C above B\n",
+ "\n",
+ "Max=h/3\n",
+ "\n",
+ "print \"The maximum height=\",Max,\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum height= 1.5 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.37 Page No38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#variable initialisation\n",
+ "\n",
+ "D=2.5 #diameter in m\n",
+ "\n",
+ "rd=0.25 #relative density \n",
+ "\n",
+ "p=1000 #pressure in kPA\n",
+ "\n",
+ "f_a=120 #allowable stress in MPa\n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "#Hoop stress in cylinder,sigma=(p*D)/(2*t)\n",
+ "\n",
+ "#sigma=f_a=allowable stress\n",
+ "\n",
+ "t=(p*D)/(2*f_a*1000)\n",
+ "\n",
+ "print \"A Thickness of\",round(t*1000,2),\"mm can therefore be used\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A Thickness of 10.42 mm can therefore be used\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.40 Page No39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#variable initialisation\n",
+ "\n",
+ "W_s1=10 #weight\n",
+ "\n",
+ "W_s2=20 #weight \n",
+ "\n",
+ "S1=0.8 #relative density\n",
+ "\n",
+ "S2=1.2 #relative density \n",
+ "\n",
+ "ga=9.79E+3 #gamma\n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "V=(W_s2-W_s1)/(ga*(S2-S1)) \n",
+ "\n",
+ "print \"volume=\",round((V*1000),4),\"L\"\n",
+ "\n",
+ "W_s1=20 \n",
+ "\n",
+ "W_s=W_s1+(ga*S1*V)\n",
+ "\n",
+ "print \"Weight in air=\",int(W_s),\"N\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "volume= 2.5536 L\n",
+ "Weight in air= 40 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.42 Page No40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "W=0.2 #weight in N\n",
+ "\n",
+ "D=5 #diameter in mm\n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "#(i)distance between marking of RD of 1.0 and 0.95\n",
+ "\n",
+ "h1=(W/(9790*((math.pi/4)*(D*D)/(1000*1000))))*((1/0.95)-1)\n",
+ "\n",
+ "print \"h1=\",round(h1*1000,2),\"mm\"\n",
+ "\n",
+ "#(ii)distance between marking of RD of 1.0 and 1.05\n",
+ "\n",
+ "h2=(W/(9790*((math.pi/4)*(D*D)/(1000*1000))))*((1/1.05)-1)\n",
+ "\n",
+ "print \"h2=\",round(h2*1000,2),\"mm\"\n",
+ " \n",
+ "print \"h2 will be below the marking corresponding to relative density of 1.0\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "h1= 54.76 mm\n",
+ "h2= -49.54 mm\n",
+ "h2 will be below the marking corresponding to relative density of 1.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.58 Page No48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "\n",
+ "az=2.5 #acceleration in m/s^2\n",
+ "\n",
+ "g=9.81 #gravity\n",
+ "\n",
+ "ga=9.79 #density \n",
+ "\n",
+ "d=1.5 #depth in m\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "#(a)When the acceleration is upwards\n",
+ "\n",
+ "h=d*(d/2)\n",
+ "\n",
+ "F_H=ga*h*(1+az/g) #Pressure force on a side wall per metre width\n",
+ "\n",
+ "print \"F_H=\",round(F_H,2),\"kN\"\n",
+ "\n",
+ "#(b)When the acceleration is downwards\n",
+ "\n",
+ "az=-2.5 #acceleration in m/s^2\n",
+ "\n",
+ "h=d*(d/2)\n",
+ "\n",
+ "F_H=ga*h*(1+az/g) #Pressure force on a side wall per metre width\n",
+ "\n",
+ "print \"F_H=\",round(F_H,3),\"kN\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "F_H= 13.82 kN\n",
+ "F_H= 8.207 kN\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter3.ipynb b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter3.ipynb new file mode 100644 index 00000000..a979f7eb --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter3.ipynb @@ -0,0 +1,964 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f95d8fc0e85f999623c145342afc794cce273d357d90e981a23af293d857bbb1"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3:Fluid Flow Kinematics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1 Page No74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "D=0.1 #diameter in cm\n",
+ "\n",
+ "L=2 #length in m\n",
+ "\n",
+ "V1=2.0 #inlet discharge in m/s\n",
+ "\n",
+ "V2=1.2 #outlet dischargein m/s\n",
+ "\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "A=(math.pi/4)*(D*D) #area calculation\n",
+ "\n",
+ "Q1= round(V1*A,5) #inlet discharge\n",
+ "\n",
+ "Q2=round(V2*A,7) #outlet discharge\n",
+ "\n",
+ "Q_e=Q1-Q2 #discharge emitted through walls of the porous pipe\n",
+ "\n",
+ "print \"Answer given in the book for discharge emitted is wrong.It should come as\"\n",
+ "\n",
+ "print \"Q_e=\",Q_e,\"m^3/s\"\n",
+ "\n",
+ "A_e=math.pi*D*L #surface area of emission \n",
+ "\n",
+ "V_e=Q_e/A_e #Velocity of emission\n",
+ "\n",
+ "print \"V_e=\",round(V_e,2),\"m/s\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Answer given in the book for discharge emitted is wrong.It should come as\n",
+ "Q_e= 0.0062852 m^3/s\n",
+ "V_e= 0.01 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3 Page No74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "Q=0.08 #Discharge in m^3/s\n",
+ "\n",
+ "D_a=12 #Diameter of inlet in cm\n",
+ "\n",
+ "V_r=25 #Width in mm\n",
+ "\n",
+ "D_i=30 #Diameter of impeller in cm of impeller\n",
+ "\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "A=round(math.pi*(D_i/100)*(25/1000)*(0.95),5)#Area calculation\n",
+ "\n",
+ "R_v=Q/A #radial velocity at the edge of impeller\n",
+ "\n",
+ "print \"R_v=\",round(R_v,3),\"m/s\"\n",
+ "\n",
+ "#V_A*A_A=0.08 #V_a is the axial Velocity,A_z is the area of inlet\n",
+ "\n",
+ "D=D_a/100 #converting diameter of inlet into m\n",
+ "\n",
+ "V_a=0.08/((math.pi/4)*(D*D)) #calculating axial velocity\n",
+ "\n",
+ "print \"V_a=\",round(V_a,3),\"m/s\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R_v= 3.575 m/s\n",
+ "V_a= 7.074 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.10 Page No78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "#points of A\n",
+ "\n",
+ "x=2\n",
+ "\n",
+ "y=-3\n",
+ "\n",
+ "z=1\n",
+ "\n",
+ "t=2\n",
+ "\n",
+ "#V=(10*t+x*y)i+(-y*z-10*t)j+(-y*z|+z*z/2)k given velocity equation 1\n",
+ "\n",
+ "#V=4xi+(-4*y+3*t)j given velocit equation 2\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#V is in the form ui+vj+zk\n",
+ "\n",
+ "U_a=(10*t)+(x*y)\n",
+ "\n",
+ "V_a=-(y*z)-(10*t)\n",
+ "\n",
+ "W_a=-(y*z)+((z*z)/2)\n",
+ "\n",
+ "V_A=math.sqrt((U_a**2)+(V_a**2)+(W_a**2)) #calculating Magnitude\n",
+ "\n",
+ "print \"(i) V_A=\",round(V_A,1),\"units\"\n",
+ "\n",
+ "#Second Equation,\n",
+ "\n",
+ "U_a=4*x\n",
+ "\n",
+ "V_a=(-4*y)+(3*t)\n",
+ "\n",
+ "W_a=0\n",
+ "\n",
+ "V_A=math.sqrt((U_a**2)+(V_a**2)+(W_a**2)) #Calculating magnitude\n",
+ "\n",
+ "print \"(ii) V_A=\",round(V_A,1),\"units\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) V_A= 22.3 units\n",
+ "(ii) V_A= 19.7 units\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.11 Page No78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "t=3 #time in s from commencement of flow\n",
+ "\n",
+ "x=0.5 #distance from inlet into the nozzle in m\n",
+ "\n",
+ "L=0.8 #in m\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "c=1-(x/(2*L)) #calculating local acceleration\n",
+ "\n",
+ "c=c**2\n",
+ "\n",
+ "lo=c*2\n",
+ "\n",
+ "print \"(i)Local acceleration doe_v/doe_t=\",round(lo,3),\"m/s^2\"\n",
+ "\n",
+ "c=(1-(x/(2*L)))**3 #calculating convective acceleration Vdoe_V/doe_x\n",
+ "\n",
+ "b=-((4*t*t)/L)*c\n",
+ "\n",
+ "print \"(ii)Convective acceleration=\",round(b,3),\"m/s^2\"\n",
+ "\n",
+ "T=lo+b #calculating total acceleration\n",
+ "\n",
+ "print \"(iii)Total acceleration=\",round(T,2),\"m/s^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Local acceleration doe_v/doe_t= 0.945 m/s^2\n",
+ "(ii)Convective acceleration= -14.623 m/s^2\n",
+ "(iii)Total acceleration= -13.68 m/s^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.14 Page No80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable Initialisation\n",
+ "\n",
+ "x, y,z=symbols(\"x y z\")\n",
+ "\n",
+ "u=4*x*y+y**2 #Given equations\n",
+ "\n",
+ "v=6*x*y+3*x\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#For steady,incompressible flow,the equation (du/dx)+(dv/dy)=0 must be satisfied.\n",
+ "\n",
+ "#Let us take,a=(du/dx,b=du/dy)\n",
+ "\n",
+ "a=diff(u,x,1) #differentiating to get (du/dx)\n",
+ "\n",
+ "b=diff(v,y,1) #differentiating to get (dv/dy)\n",
+ "\n",
+ "c=a+b\n",
+ "\n",
+ "print \"(du/dx)+(du/dy)=\",c,\"not equal to 0.Hence flow is not possible\"\n",
+ "\n",
+ "u=2*x**2+y**2 #Given equations \n",
+ "\n",
+ "v=-4*x*y\n",
+ "\n",
+ "a=diff(u,x,1) #differentiating to get (du/dx)\n",
+ "\n",
+ "b=diff(v,y,1) #differentiating to get (dv/dy)\n",
+ "\n",
+ "c=a+b\n",
+ "\n",
+ "print \"(du/dx)+(du/dy)=\",c,\".Hence flow is possible\"\n",
+ "\n",
+ "u=-(x/(x**2+y**2)) #Given equations\n",
+ "\n",
+ "v=-(y/(x**2+y**2))\n",
+ "\n",
+ "a=diff(u,x,1) #differentiating to get (du/dx)\n",
+ "\n",
+ "s=simplify(a)\n",
+ "\n",
+ "b=diff(v,y,1) #differentiating to get (dv/dy)\n",
+ "\n",
+ "q=simplify(b) #simplifying\n",
+ " \n",
+ "c=cancel(s+q)\n",
+ "\n",
+ "print \"(du/dx)+(du/dy)=\",c,\"Hence flow is possible\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(du/dx)+(du/dy)= 6*x + 4*y not equal to 0.Hence flow is not possible\n",
+ "(du/dx)+(du/dy)= 0 .Hence flow is possible\n",
+ "(du/dx)+(du/dy)="
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " 0 Hence flow is possible\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.15 Page No80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable Initialisation\n",
+ "\n",
+ "x, y,z,c,A=symbols(\"x y z c A\")\n",
+ "\n",
+ "u=c*x #Given equations\n",
+ "\n",
+ "v=-c*y\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#For steady,incompressible flow,the equation (du/dx)+(dv/dy)=0 must be satisfied.\n",
+ "\n",
+ "#Let us take,a=(du/dx,b=du/dy)\n",
+ "\n",
+ "a=diff(u,x,1) #differentiating to get (du/dx)\n",
+ "\n",
+ "b=diff(v,y,1) #differentiating to get (dv/dy)\n",
+ "\n",
+ "c=a+b\n",
+ "\n",
+ "print \"(du/dx)+(du/dy)=\",c,\"Hence,the continuity equation is satisfied\"\n",
+ "\n",
+ "u=-c*c/y #Given equations \n",
+ "\n",
+ "v=c*ln(x*y)\n",
+ "\n",
+ "a=diff(u,x,1) #differentiating to get (du/dx)\n",
+ "\n",
+ "b=diff(v,y,1) #differentiating to get (dv/dy)\n",
+ "\n",
+ "c=a+b\n",
+ "\n",
+ "print \"(du/dx)+(du/dy)=\",c,\".Hence,the continuity equation is satisfied\"\n",
+ "\n",
+ "u=A*sin(x*y) #Given equations\n",
+ "\n",
+ "v=-A*sin(x*y)\n",
+ "\n",
+ "a=diff(u,x,1) #differentiating to get (du/dx)\n",
+ "\n",
+ "s=simplify(a)\n",
+ "\n",
+ "b=diff(v,y,1) #differentiating to get (dv/dy)\n",
+ "\n",
+ "q=simplify(b) #simplifying\n",
+ " \n",
+ "c=cancel(s+q)\n",
+ "\n",
+ "print \"(du/dx)+(du/dy)=\",c,\",not equal to 0.Hence,the continuity equation is not satisfied\"\n",
+ "\n",
+ "u=x+y #Given equations \n",
+ "\n",
+ "v=x-y\n",
+ "\n",
+ "a=diff(u,x,1) #differentiating to get (du/dx)\n",
+ "\n",
+ "b=diff(v,y,1) #differentiating to get (dv/dy)\n",
+ "\n",
+ "c=a+b\n",
+ "\n",
+ "print \"(du/dx)+(du/dy)=\",c,\".Hence,the continuity equation is satisfied\"\n",
+ "\n",
+ "u=2*x**2+z*y #Given equations \n",
+ "\n",
+ "v=-2*x*y+3*y**3+3*z*y\n",
+ "\n",
+ "w=-(3/2)*z**2-2*x*y-6*y*z\n",
+ "\n",
+ "a=diff(u,x,1) #differentiating to get (du/dx)\n",
+ "\n",
+ "b=diff(v,y,1) #differentiating to get (dv/dy)\n",
+ "\n",
+ "s=diff(w,z,1)\n",
+ "\n",
+ "c=a+b+s\n",
+ "\n",
+ "print \"(du/dx)+(du/dy)=\",c,\",not equal to 0.Hence,the continuity equation is not satisfied\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(du/dx)+(du/dy)= 0 Hence,the continuity equation is satisfied\n",
+ "(du/dx)+(du/dy)= 0 .Hence,the continuity equation is satisfied\n",
+ "(du/dx)+(du/dy)="
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " -A*x*cos(x*y) + A*y*cos(x*y) ,not equal to 0.Hence,the continuity equation is not satisfied\n",
+ "(du/dx)+(du/dy)= 0 .Hence,the continuity equation is satisfied\n",
+ "(du/dx)+(du/dy)= 2*x + 9*y**2 - 6*y ,not equal to 0.Hence,the continuity equation is not satisfied\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.16 Page No80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import *\n",
+ "\n",
+ "#Variable Initialisation\n",
+ "\n",
+ "x, y, A,e,L=symbols(\"x y A e L\")\n",
+ "\n",
+ "u=A*(x**2+y**2)\n",
+ "\n",
+ "du=-diff(u,x,1) #differentiating u with respect to x\n",
+ "\n",
+ "a=integrate((du), y) #integrating with respect to y\n",
+ "\n",
+ "print \"(a)v=\",a,\"+f(x)\"\n",
+ "\n",
+ "u=A*(e**x)\n",
+ "\n",
+ "du=-diff(u,x,1) #differentiating u with respect to x\n",
+ "\n",
+ "a=integrate((du),x) #integrating with respect to x\n",
+ "\n",
+ "print \"(b)v=\",a,\"y+f(x)\"\n",
+ "\n",
+ "u=-A*ln(x/L)\n",
+ "\n",
+ "du=-diff(u,x,1) #differentiating u with respect to x\n",
+ "\n",
+ "a=integrate((du), y) #integrating with respect to y\n",
+ "\n",
+ "print \"(c)v=\",a,\"+f(x)\"\n",
+ "\n",
+ "v=-A*x*y\n",
+ "\n",
+ "dv=-diff(v,y,1) #differentiating u with respect to y\n",
+ "\n",
+ "a=-integrate((dv), x) #integrating with respect to x\n",
+ "\n",
+ "print \"(d)u=\",a,\"+f(y)\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(a)v= -2*A*x*y +f(x)\n",
+ "(b)v="
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " -A*e**x y+f(x)\n",
+ "(c)v= A*y/x +f(x)\n",
+ "(d)u= -A*x**2/2 +f(y)\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.17 Page No81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable Initialisation\n",
+ "\n",
+ "x, y,z=symbols(\"x y z\")\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#let us take a=(dv/dx),b=(du/dy),c=(dw/dy),d=(dv/dz),e=du/dz,f=(dw/dx)\n",
+ "\n",
+ "u=x*y**3*z\n",
+ "\n",
+ "v=-y**2*z**2\n",
+ "\n",
+ "w=y*z**2-(y**3*z**2)/2\n",
+ "\n",
+ "a=diff(v,x,1) #finding (dv/dx)\n",
+ "\n",
+ "b=diff(u,y,1) #finding (du/dy)\n",
+ "\n",
+ "c=diff(w,y,1) #finding (dw/dy)\n",
+ "\n",
+ "d=diff(v,z,1) #finding (dv/dz)\n",
+ "\n",
+ "e=diff(u,z,1) #finding (du/dz)\n",
+ "\n",
+ "f=diff(w,x,1) #finding (dw/dx)\n",
+ " \n",
+ "omega_z=(1/2)*((a-b)) #calculating omega_z\n",
+ "\n",
+ "print \"(i)omega_z=\",omega_z\n",
+ "\n",
+ "omega_x=(1/2)*((c-d)) #calculating omega_x\n",
+ "\n",
+ "print \"omega_x=\",omega_x\n",
+ "\n",
+ "omega_y=(1/2)*(e-f) #calculating omega_y\n",
+ "\n",
+ "print \"omega_y=\",omega_y\n",
+ "\n",
+ "#second values given \n",
+ "\n",
+ "u=3*x*y\n",
+ "\n",
+ "v=(3/2)*x**2-(3/2)*y**2\n",
+ "\n",
+ "a=diff(v,x,1) #finding (dv/dx)\n",
+ "\n",
+ "b=diff(u,y,1) #finding (du/dy)\n",
+ "\n",
+ "omega_z=(1/2)*((a-b)) #calculating omega_z\n",
+ "\n",
+ "print \"(ii)omega_z=\",omega_z,\"As the flow is two-dimensional in the x-y plane omega_z=omega_y=0\"\n",
+ "\n",
+ "#third values given \n",
+ "\n",
+ "u=y**2\n",
+ "\n",
+ "v=-3*x\n",
+ "\n",
+ "a=diff(v,x,1) #finding (dv/dx)\n",
+ "\n",
+ "b=diff(u,y,1) #finding (du/dy)\n",
+ "\n",
+ "omega_z=(1/2)*((a-b)) #calculating omega_z\n",
+ "\n",
+ "print \"(iii)omega_z=\",omega_z,\"As the flow is two-dimensional in x-y plane omega_z=omega_y=0\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)omega_z= -1.5*x*y**2*z\n",
+ "omega_x= -0.75*y**2*z**2 + 1.0*y**2*z + 0.5*z**2\n",
+ "omega_y= 0.5*x*y**3\n",
+ "(ii)omega_z= 0 As the flow is two-dimensional in the x-y plane omega_z=omega_y=0\n",
+ "(iii)omega_z= -1.0*y - 1.5 As the flow is two-dimensional in x-y plane omega_z=omega_y=0\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.19 Page No81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable Initialisation\n",
+ "\n",
+ "x,y,z,a=symbols(\"x y z a\")\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "u=2*x*y\n",
+ "\n",
+ "v=a**2+x**2-y**2\n",
+ "\n",
+ "#let us take c=(du/dx),b=dv/dy\n",
+ "\n",
+ "c=diff(u,x,1) #finding (dv/dx)\n",
+ "\n",
+ "b=diff(v,y,1) #finding (du/dy)\n",
+ "\n",
+ "#The continuity equation for steady,incompressible flow is satisfied.Hence the flow is possible.The stream, function psi is related to u and v as,\n",
+ "\n",
+ "psi=integrate((u),y) #integrating with respect to y\n",
+ "\n",
+ "print \"psi\",psi,\"+f(x)\"\n",
+ "\n",
+ "d_psi=diff(psi,x,1) #finding (dpsi/dx)\n",
+ "\n",
+ "#take f'(x) as ff\n",
+ "\n",
+ "ff=-(a**2)+(x**2) # assigning f'(x)\n",
+ "\n",
+ "f_x=integrate(ff, x) #integrating to get f(x)\n",
+ "\n",
+ "print \"psi=\",psi,f_x,\"+constant\" #replacing f(x)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "psi x*y**2 +f(x)\n",
+ "psi= x*y**2 -a**2*x + x**3/3 +constant\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.24 Page No83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import *\n",
+ "\n",
+ "#Variable Initialisation\n",
+ "\n",
+ "x,y,z,U_in,a,r=symbols(\"x y z U_in a r\")\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "n=3*x*y #given value\n",
+ "\n",
+ "u=diff(n,x,1) #d_psi/dy\n",
+ "\n",
+ "psi=integrate(u, y) #integrating to find psi \n",
+ "\n",
+ "v=diff(n,y,1) #d_psi/dx\n",
+ "\n",
+ "ff=-v #assinging to f'(x)\n",
+ "\n",
+ "f_x=integrate(ff, x) #integrating to get f(x)\n",
+ "\n",
+ "psi=psi-(-f_x) #substituting in psi\n",
+ "\n",
+ "print \"(i)psi=\",psi,\"+c,where c is a constant\"\n",
+ "\n",
+ "#second equation\n",
+ "\n",
+ "n=4*(x**2-y**2) #given value\n",
+ "\n",
+ "u=diff(n,x,1) #d_psi/dy\n",
+ "\n",
+ "psi=integrate(u, y) #integrating to find psi \n",
+ "\n",
+ "v=diff(n,y,1) #d_psi/dx\n",
+ "\n",
+ "ff=-v #assinging to f'(x)\n",
+ "\n",
+ "f_x=diff(ff,x) #differentiating to get f(x)\n",
+ "\n",
+ "psi=psi-(-f_x) #substituting in psi\n",
+ "\n",
+ "print \"(i)psi=\",psi,\"+c\"\n",
+ "\n",
+ "\n",
+ "#Third value\n",
+ "\n",
+ "n=x+y+3 #given value\n",
+ "\n",
+ "u=diff(n,x,1) #d_psi/dy\n",
+ "\n",
+ "psi=integrate(u, y) #integrating to find psi \n",
+ "\n",
+ "v=diff(n,y,1) #d_psi/dx\n",
+ "\n",
+ "ff=-v #assinging to f'(x)\n",
+ "\n",
+ "f_x=integrate(ff, x) #integrating to get f(x)\n",
+ "\n",
+ "psi=psi-(-f_x) #substituting in psi\n",
+ "\n",
+ "print \"(i)psi=\",psi,\"+c,where c is a constant\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)psi= -3*x**2/2 + 3*y**2/2 +c,where c is a constant\n",
+ "(i)psi= 8*x*y +c\n",
+ "(i)psi= -x + y +c,where c is a constant\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.25 Page No84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import *\n",
+ "\n",
+ "#Variable Initialisation\n",
+ "\n",
+ "x, y,z,c,A,m=symbols(\"x y z c A m\")\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#A valid potential function satisfies the Laplace equation.(d**2u/dx**2)+(d**2v/dy**2)=0.\n",
+ "\n",
+ "phi=A*x*y #Given equations\n",
+ "\n",
+ "a=diff(phi,x,2) #differentiating to get (d**2u/dx**2)\n",
+ "\n",
+ "b=diff(phi,y,2) #Differentiating to get (d**2v/dy**2)\n",
+ "\n",
+ "c=a+b\n",
+ "\n",
+ "print \"(d**2u/dx**2)+(d**2u/dy**2)=\",c,\"Hence,phi=\",phi,\"is a valid potential function\"\n",
+ "\n",
+ "phi=m*ln(x) #Given equations\n",
+ "\n",
+ "a=diff(phi,x,2) #differentiating to get (d**2u/dx**2)\n",
+ "\n",
+ "b=diff(phi,y,2) #Differentiating to get (d**2v/dy**2)\n",
+ "\n",
+ "c=a+b\n",
+ "\n",
+ "print \"(d**2u/dx**2)+(d**2u/dy**2)=\",c,\"Hence,phi=\",phi,\"is not a valid potential function\"\n",
+ "\n",
+ "phi=A*(x**2-y**2) #Given equations\n",
+ "\n",
+ "a=diff(phi,x,2) #differentiating to get (d**2u/dx**2)\n",
+ "\n",
+ "b=diff(phi,y,2) #Differentiating to get (d**2v/dy**2)\n",
+ "\n",
+ "c=a+b\n",
+ "\n",
+ "print \"(d**2u/dx**2)+(d**2u/dy**2)=\",c,\"Hence,phi=\",phi,\"is a valid potential function\"\n",
+ "\n",
+ "phi=A*cos(x) #Given equations\n",
+ "\n",
+ "a=diff(phi,x,2) #differentiating to get (d**2u/dx**2)\n",
+ "\n",
+ "b=diff(phi,y,2) #Differentiating to get (d**2v/dy**2)\n",
+ "\n",
+ "c=a+b\n",
+ "\n",
+ "print \"(d**2u/dx**2)+(d**2u/dy**2)=\",c,\"Hence,phi=\",phi,\"is not a valid potential function\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(d**2u/dx**2)+(d**2u/dy**2)= 0 Hence,phi= A*x*y is a valid potential function\n",
+ "(d**2u/dx**2)+(d**2u/dy**2)= -m/x**2 Hence,phi= m*log(x) is not a valid potential function\n",
+ "(d**2u/dx**2)+(d**2u/dy**2)= 0 Hence,phi= A*(x**2 - y**2) is a valid potential function\n",
+ "(d**2u/dx**2)+(d**2u/dy**2)= -A*cos(x) Hence,phi= A*cos(x) is not a valid potential function\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.26 Page No85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import *\n",
+ "\n",
+ "#Variable Initialisation\n",
+ "\n",
+ "x,y,z,A=symbols(\"x y z A\")\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "psi=A*((x**2)-(y**2)) #given\n",
+ "\n",
+ "u=diff(psi,y,1) #differentiating to find dn/dx\n",
+ "\n",
+ "n=integrate(u, x) #integrating to find n\n",
+ "\n",
+ "v=-diff(psi,x,1) #differentiating to find dn/dy\n",
+ "\n",
+ "#v=diff(n,y,1)=-2*A*x+f'(y),By comparing those two\n",
+ "\n",
+ "#f'(y)=0\n",
+ "\n",
+ "print \"n=\",n,\"+constant\"\n",
+ "\n",
+ "#second equation is taken\n",
+ "\n",
+ "psi=y**3-(3*x**2*y) #given\n",
+ "\n",
+ "u=diff(psi,y,1) #differentiating to find dn/dx\n",
+ "\n",
+ "n=integrate(u, x) #integrating to find n\n",
+ "\n",
+ "v=-diff(psi,x,1) #differentiating to find dn/dy\n",
+ "\n",
+ "#v=diff(n,y,1)=-2*A*x+f'(y),By comparing those two\n",
+ "\n",
+ "#f'(y)=0\n",
+ "\n",
+ "print \"n=\",n,\"+constant\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "n= -2*A*x*y +constant\n",
+ "n= -x**3 + 3*x*y**2 +constant\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter4.ipynb b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter4.ipynb new file mode 100644 index 00000000..166aa580 --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter4.ipynb @@ -0,0 +1,763 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2f13b10d00543bfad520008e8fd14a2627132428dc21fe006dc7d21a59db0909"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4:Energy Equation and Its Applications"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1 Page No95"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "d1=0.15 #diameter of section A in m\n",
+ "\n",
+ "Q=0.05 #discharge in m^3/s\n",
+ "\n",
+ "d2=0.30 #diameter of section B in m\n",
+ "\n",
+ "Z1=100 #elevation at section A in m\n",
+ "\n",
+ "Z2=107 #elevation at section B in m\n",
+ "\n",
+ "p1=30 #pressure at section A in kPa\n",
+ "\n",
+ "H_L=2 #energy loss in the pipe\n",
+ "\n",
+ "g=9.81\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "A1=(math.pi/4)*(d1*d1) #calculating area for section A\n",
+ "\n",
+ "V1=round(Q/A1,3) #calculating volume \n",
+ "\n",
+ "A2=(math.pi/4)*(d2*d2) #calculating area for section B\n",
+ "\n",
+ "V2=round(Q/A2,4) #calculating volume\n",
+ "\n",
+ "ga=round(998*g/1000,2) #unit length of water in kN/m^3\n",
+ "\n",
+ "#By,Bernuolli equation\n",
+ "\n",
+ "#when the flow is from A to B,taling the pressure as zero\n",
+ "\n",
+ "p2=round((((p1/ga)+((V1*V1)/(2*g))+Z1)-(((V2*V2)/(2*g))+Z2+H_L))*ga,2) #calculating pressure\n",
+ "\n",
+ "print \"(i)p2=\",p2,\"kPa(guage)\"\n",
+ "\n",
+ "#when the flow is from B to A,taking pressure as zero\n",
+ "\n",
+ "b=(p1/ga)+((V1*V1)/(2*g))+Z1\n",
+ "\n",
+ "a=(((V2*V2/(2*g)))+Z2)-H_L\n",
+ "\n",
+ "p2=round((b-a)*ga,2) #calculating pressure \n",
+ "\n",
+ "print \"(ii)p2=\",p2,\"kPa(guage)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)p2= -54.37 kPa(guage)\n",
+ "(ii)p2= -15.21 kPa(guage)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3 Page No96"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "p1=0 #pressure in kPa\n",
+ "\n",
+ "V1=0 #Velocity in m/s\n",
+ "\n",
+ "p3=0 #pressure in kPa\n",
+ "\n",
+ "Z3=20 #elevation at section 3 in m\n",
+ "\n",
+ "H=4 #head in the tank in m\n",
+ "\n",
+ "d=25 #diameter in mm\n",
+ "\n",
+ "D=100 #Diameter of pipe in mm\n",
+ "\n",
+ "g=9.81 #gravity \n",
+ "\n",
+ "RD_oil=0.8 #relative density in kg/m^3\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#By continuity ctiterion,V2(math.pi/4)(D**2)=V3(math.pi/4)(d**2)=Q\n",
+ "\n",
+ "#Applying Bernoullis equation to points 1 and 2 with centre line of pipe as datum and pressure as zero\n",
+ "\n",
+ "#V2=(d/D)**2*V3\n",
+ "\n",
+ "#Using this equation,(p1/ga)+(V1**2)/(2*g)+Z1)=(p3/ga)+((V3**2)/(2*g))+Z3+H_L\n",
+ "\n",
+ "#H=V3**2/2g+20*V2**2/2g\n",
+ "\n",
+ "#H_L=20*V2**2/(2*g) #given loss of pipe\n",
+ "\n",
+ "V3=round(((2*g*H)/(Z3*((d/D)**4)+1))**(1/2),4)#Velocity in the pipe\n",
+ "\n",
+ "Q=(math.pi/4)*((d/1000)**2)*(V3)*1000 #Discharge\n",
+ "\n",
+ "print \"Q=\",round(Q,4),\"L/s\"\n",
+ "\n",
+ "V2=round((d/D)**2*V3,4)\n",
+ "\n",
+ "H_L=round(Z3*V2**2/(2*g),4) #Loss of head in the pipe\n",
+ "\n",
+ "#Applying Bernoulli equation to points 1 and 2,\n",
+ "\n",
+ "#(p1/ga)+(V1**2)/(2*g)+Z1)=(p3/ga)+((V3**2)/(2*g))+Z3+H_L\n",
+ "\n",
+ "ga=round(RD_oil*998*(g/1000),3)\n",
+ "\n",
+ "p2=round((H-(((V2**2)/(2*g))+p3+H_L)),4) #Pressure at the base of the nozzle\n",
+ "\n",
+ "print \"p2=\",round(p2*ga,3),\"kPa\"\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q= 4.1881 L/s\n",
+ "p2= 28.945 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4 Page No97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "d=0.30 #diameter in m\n",
+ "\n",
+ "d1=0.15 #diameter in m\n",
+ "\n",
+ "S=13.6 #relative density of mercury \n",
+ "\n",
+ "g=9.81 #gravity \n",
+ "\n",
+ "Q=0.120 #discharge in L/s\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#by continuity creiterion,\n",
+ "\n",
+ "V1=round(Q/((math.pi/4)*(d*d)),4)\n",
+ "\n",
+ "V2=round(Q/((math.pi/4)*(d1*d1)),4)\n",
+ "\n",
+ "#Considering the elevation of section 1 as datum,\n",
+ "\n",
+ "#by assumption ((p1-p2)/ga) is taken as a\n",
+ "\n",
+ "#a=(S-1)*h\n",
+ "\n",
+ "#By,Bernoulli equation for points 1 and 2\n",
+ "\n",
+ "#a-0.8=((v2^2-V1^2)/2g)\n",
+ "\n",
+ "h=((V2**2-V1**2)/(2*g))/(S-1)\n",
+ "\n",
+ "print \"h=\",round(h*100,01),\"cm\" #calculating magnitude\n",
+ "\n",
+ "print \"Deflection:The manometer limb connected to section 1 will be having smaller column of mercury than the other limb\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "h= 17.5 cm\n",
+ "Deflection:The manometer limb connected to section 1 will be having smaller column of mercury than the other limb\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7 Page No99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "p_A=4 #vapour prssure in kPa(abs)\n",
+ "\n",
+ "p1=95.48 #atmospheric pressure in kPa\n",
+ "\n",
+ "p2=95.48 #atmospheric pressure in kPa\n",
+ "\n",
+ "g=9.81 #gravity\n",
+ "\n",
+ "Z1=1.5 #elevation at section 1 in m\n",
+ "\n",
+ "Z_A=0 #elevation at section A in m\n",
+ "\n",
+ "ga=9.79 #unit length of water in kN/m^3\n",
+ "\n",
+ "V1=0 #volume of section 1\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#by applying Bernoullis equation to points 1 and A\n",
+ "\n",
+ "#formula is,(p1/ga)+(V1**2)/(2*g)+Z1)=(pA/ga)+((V_A**2)/(2g))+Z_A\n",
+ "\n",
+ "V_A=round(math.sqrt((((p1/ga)+(V1**2)/(2*g)+Z1)-(p_A/ga)+Z_A)*2*g),2)\n",
+ "\n",
+ "V2=round(V_A/2,2)\n",
+ "\n",
+ "print \"V2=\",V2,\"m/s\"\n",
+ "\n",
+ "#by applying Bernoullis equation to points 1 and 2,with datum at point 2,\n",
+ "\n",
+ "#(p1/ga)+(V1**2)/(2*g)+Z1)=(p2/ga)+((V_A**2)/(2g))+Z_A\n",
+ "\n",
+ "c=(p1/ga)+((V1**2)/(2*g))+Z1\n",
+ "\n",
+ "e=(p2/ga)+(V2**2)/(2*g)\n",
+ "\n",
+ "L=e-c #Calculating length of pipe\n",
+ "\n",
+ "print\"L=\",round(L,2),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V2= 7.29 m/s\n",
+ "L= 1.21 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.8 Page No99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "Q=0.015 #discharge in m^3/s\n",
+ "\n",
+ "d=0.05 #diameter in m\n",
+ "\n",
+ "V1=0 #volume in m/s\n",
+ "\n",
+ "Z1=0 #elevation at section 1 in m\n",
+ "\n",
+ "Z2=3.00 #elevation at section 2 in m\n",
+ "\n",
+ "H_L=1.5 #Energy loss due to friction in m\n",
+ "\n",
+ "p2=0 #pressure\n",
+ "\n",
+ "ga=9.79 #unit length of water in kN/m^3\n",
+ "\n",
+ "g=9.81 #gravity\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "V2=(Q*4)/(math.pi*(d**2))\n",
+ "\n",
+ "#By applying Bernoullis equation to points 1 and 2,\n",
+ "\n",
+ "#(p1/ga)+(V1**2)/(2*g)+Z1)=(p2/ga)+((V2**2)/(2g))+Z2\n",
+ "\n",
+ "p1=(((p2/ga)+((V2**2)/(2*g))+Z2)+H_L-((V1**2)/(2*g)+Z1))*ga\n",
+ "\n",
+ "print \"p1=\",round(p1,2),\"kPa\" #Calculating air pressure\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "p1= 73.18 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.16 Page No104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable Initialisation\n",
+ "\n",
+ "x, y,z,c,r,r1,r2=symbols(\"x y z c r r1 r2\")\n",
+ "\n",
+ "b=0.4 #breadth in m\n",
+ "\n",
+ "V0=2 #volume in m/s\n",
+ "\n",
+ "r2=1.2 #radius in m\n",
+ "\n",
+ "r1=0.8 #radius in m\n",
+ "\n",
+ "g=9.81 #gravity\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "q=integrate(c/r, r) #Integrating v\n",
+ "\n",
+ "s=q.subs(r,r2/r1)\n",
+ "\n",
+ "C=(b*V0)/ln(r2/r1) #Finding C\n",
+ "\n",
+ "V1=C/r1\n",
+ "\n",
+ "print \"V1=\",round(V1,3),\"m/s\" #Velocity at the inner wall\n",
+ "\n",
+ "V2=C/r2\n",
+ "\n",
+ "print \"V2=\",round(V2,3),\"m/s\" #velocity at the outer wall\n",
+ "\n",
+ "#Since the flow is irrotational,Bernoullis theorem can be applied across streamlines.\n",
+ "\n",
+ "#(p1/ga)+(V1**2)/(2*g)+Z1)=(pb/ga)+((V2**2)/(2*g))+Z2\n",
+ "\n",
+ "PD=(V1**2-V2**2)/(2*g)\n",
+ "\n",
+ "print \"The difference in pressure head between outer and inner wall is\",round(PD,3),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V1= 2.466 m/s\n",
+ "V2= 1.644 m/s\n",
+ "The difference in pressure head between outer and inner wall is 0.172 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.19 Page No105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "Q=0.8 #discharge in m^3/s\n",
+ "\n",
+ "r=0.45 #radius in m\n",
+ "\n",
+ "Z1=40 #elevation at section 1 in m\n",
+ "\n",
+ "Z2=0 #elevation at section 2 in m\n",
+ "\n",
+ "P1=0 #power at section 1 in m\n",
+ "\n",
+ "V1=0 #volume at section 1 in m\n",
+ "\n",
+ "ga=9.79 #unit length of water in kN/m^3\n",
+ "\n",
+ "g=9.81 #gravity\n",
+ "\n",
+ "H_L=10 #frictional loss\n",
+ "\n",
+ "eta=0.85 #turbine efficiency \n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#(i)Water friction loss is neglected:\n",
+ "\n",
+ "V2=round(Q/((math.pi/4)*(r**2)),2)\n",
+ "\n",
+ "#Applying Bernoullis equation to points 1 and 2\n",
+ "\n",
+ "#(p1/ga)+(V1**2)/(2*g)+Z1)=(pb/ga)+((V2**2)/(2*g))+Z2\n",
+ "\n",
+ "H_T=round(((P1/ga)+(V1**2)/(2*g)+Z1)-(((V2**2)/(2*g))+Z2),2) #Calculating heat extracted by the turbine\n",
+ "\n",
+ "print\"P=\",round(ga*Q*H_T,1),\"kW\" #power extracted by the turbine\n",
+ "\n",
+ "print \"(ii)when loses are included:\"\n",
+ "\n",
+ "#Applying Bernoullis equation to points 1 and 2\n",
+ "\n",
+ "H_T=round(((P1/ga)+(V1**2)/(2*g)+Z1)-(((V2**2)/(2*g))+H_L+Z2),2)\n",
+ "\n",
+ "Pn=ga*Q*H_T*eta #power output of the turbine\n",
+ "\n",
+ "print \"Pn=\",round(Pn,1),\"kW\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "P= 303.2 kW\n",
+ "(ii)when loses are included:\n",
+ "Pn= 191.1 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.17 Page No105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "Q=0.060 #discharge in m^3/s\n",
+ "\n",
+ "a=60 #pumping water rate from tank in L/s\n",
+ "\n",
+ "r1=0.15 #radius in m\n",
+ "\n",
+ "r2=0.10 #radius in m\n",
+ "\n",
+ "ga=9.79 #unit length of water in kN/m^3\n",
+ "\n",
+ "P=10 #power delivered by the pump in kW\n",
+ "\n",
+ "P_c=0 #power delivered by section b in m\n",
+ "\n",
+ "V_c=0 #volume in m\n",
+ "\n",
+ "Z_c=3 #elevation at section c in m\n",
+ "\n",
+ "Z_b=3 #elevation at section b in m\n",
+ "\n",
+ "H_L=1.2 #heat delivered in m\n",
+ "\n",
+ "g=9.81 #gravity\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "V_a=round(Q/((math.pi/4)*(r1**2)),3)\n",
+ "\n",
+ "V_b=round(Q/((math.pi/4)*(r2**2)),3)\n",
+ "\n",
+ "#by applying power delivered formula,P=ga*Q*H_p\n",
+ "\n",
+ "H_p=round(P/(Q*ga),2) #calculating heat delivered by the pump\n",
+ "\n",
+ "#By applying Bernoullis equation between C and A \n",
+ "\n",
+ "P_a=round((((P_c/ga)+((V_c**2)/(2*g))+Z_c)-((V_a**2)/(2*g)))*ga,4)\n",
+ "\n",
+ "print \"P_a=\",round(P_a,3),\"kPa\" #Calculating pressure at A\n",
+ "\n",
+ "#By applying Bernoullis equation between C and B with level at A as datum,\n",
+ "\n",
+ "#(pc/ga)+(Vc**2)/(2*g)+Zc)=(pb/ga)+((Vb**2)/(2g))+Zb\n",
+ "\n",
+ "P_b=round((((P_c/ga)+((V_c**2)/(2*g))+Z_c+H_p)-(((V_b**2)/(2*g))+Z_b+H_L))*ga-0.01,2) #Calculating pressure at B\n",
+ "\n",
+ "print \"P_b=\",P_b,\"kPa\"\n",
+ "\n",
+ "print \"when loses are considered:\"\n",
+ "\n",
+ "s=((P_c/ga)+((V_c**2)/(2*g))+Z_c+H_p)-(((V_b**2)/(2*g))+(Z_b+H_L)+(2*((V_b**2)/(2*g))))\n",
+ "\n",
+ "print \"P_b=\",round((s*ga),1),\"kPa\" #Calculating pressure at B\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "P_a= 23.619 kPa\n",
+ "P_b= 125.75 kPa\n",
+ "when loses are considered:\n",
+ "P_b= 67.5 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.20 Page No106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "Q=0.5 #discharge in m^3/s\n",
+ "\n",
+ "r=0.4 #radius in m\n",
+ "\n",
+ "r1=0.6 #radius in m\n",
+ "\n",
+ "P_a=30.0 #pressure head at the upstream of turbine in m\n",
+ "\n",
+ "P_b=-4 #pressure head at the point B in draft tube in m\n",
+ "\n",
+ "Z_a=2 #elevation at section A in m\n",
+ "\n",
+ "Z_b=0 #elevation at section B in m\n",
+ "\n",
+ "g=9.81 #gravity\n",
+ "\n",
+ "eta=0.90 #turbine efficiency \n",
+ "\n",
+ "ga=9.79 #unit length of water in kN/m^3\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "V_a=round(Q/((math.pi/4)*(r**2)),2)\n",
+ "\n",
+ "V_b=round(Q/((math.pi/4)*(r1**2)),3)\n",
+ "\n",
+ "#Applying Bernoullis equation to points A and B\n",
+ "\n",
+ "#(P_a/ga)+(V_a**2)/(2*g)+Z_a)=(P_b/ga)+((V_b**2)/(2*g))+Z_b+H_t\n",
+ "\n",
+ "H_T=round(((P_a)+(V_a**2)/(2*g)+Z_a)-((P_b)+((V_b**2)/(2*g))+Z_b)#calculating heat extracted\n",
+ ",2)\n",
+ "\n",
+ "P=round(ga*Q*H_T*eta,2) #Calculating power\n",
+ "\n",
+ "print \"Answer given in the book is wrong.It is,\"\n",
+ "\n",
+ "print \"P=\",P,\"kW\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Answer given in the book is wrong.It is,\n",
+ "P= 161.46 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.23 Page No107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "Q=0.20 #Discharge in m^3/s\n",
+ "\n",
+ "r=0.25 #radius at point 1 in m\n",
+ "\n",
+ "r1=0.35 #radius at point 2 in m\n",
+ "\n",
+ "P1=120 #pressure head at the upstream of turbine in m\n",
+ "\n",
+ "ga=9.79 #unit length of water in kN/m^3\n",
+ "\n",
+ "alpha_1=1.1 #kinetic energy correction factors for section 1\n",
+ "\n",
+ "Z1=25 #elevation at section 1 in m\n",
+ "\n",
+ "alpha_2=1.5 #kinetic energy correction factors for section 2\n",
+ "\n",
+ "Z2=20 #elevation at section 2 in m\n",
+ "\n",
+ "g=9.81 #gravity\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "V1=round(Q/((math.pi/4)*(r**2)),3)\n",
+ "\n",
+ "V2=round((Q/((math.pi/4)*(r1**2))),3)\n",
+ "\n",
+ "#Applying Bernoullis equation to points 1 and 2\n",
+ "\n",
+ "#(P1/ga)+(V1**2)/(2*g)+Z1)=(P2/ga)+((V2**2)/(2*g))+Z2+H_L\n",
+ "\n",
+ "#given H_L is,\n",
+ "\n",
+ "H_L=round((1.2*(V1-V2)**2)/(2*g),3) #calculating frictional loss\n",
+ "\n",
+ "P2=round((((P1/ga)+alpha_1*((V1**2)/(2*g))+Z1)-(alpha_2*((V2**2)/(2*g))+Z2+H_L)),3)\n",
+ "\n",
+ "print \"P2=\",round(P2*ga,2),\"kPa\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "P2= 172.45 kPa\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/chapter5.ipynb b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter5.ipynb new file mode 100644 index 00000000..aa6b155b --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter5.ipynb @@ -0,0 +1,486 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:4512caad83833b695829ee7e41ead3cce8d9d4f539ab1cf386596a2fbe1c76d0"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5:Momentum Equation and Its Applications"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2 Page No121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "V1=11 #Velocity in m/s\n",
+ "\n",
+ "r=0.075 #radius in m\n",
+ "\n",
+ "Ry=400 #total load in N\n",
+ "\n",
+ "rho=800 #oil density in kg/m^3\n",
+ "\n",
+ "g=9.81 #gravity\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "A1=(math.pi/4)*(r**2)\n",
+ "\n",
+ "Q=A1*V1\n",
+ "\n",
+ "#since the jet is issuing into atmosphere p1=p2=0\n",
+ "\n",
+ "#h=equilibrium height of the plane above 1,V2=velocity of the plate just before impact\n",
+ "\n",
+ "#Ry=rho*Q*V1**2\n",
+ "\n",
+ "h=(((Ry/(rho*Q))**2)-(V1**2))/(-(2*g))\n",
+ "\n",
+ "print \"The equilibrium height of the plate is\",round(h,3),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The equilibrium height of the plate is 0.772 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6 Page No124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "Q=0.06 #discharge in m^3/s\n",
+ "\n",
+ "D1=15 #Diameter 1 in cm\n",
+ "\n",
+ "D2=5 #Diameter 2 in cm\n",
+ "\n",
+ "ga=9.79 #unit length of water in kN/m^3\n",
+ "\n",
+ "g=9.81 #gravity\n",
+ "\n",
+ "rho= 998 #relative density\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "A2=((math.pi)/4)*((D2/100)**2)\n",
+ "\n",
+ "V2=Q/A2\n",
+ "\n",
+ "V1=V2*((D2/D1)**2)\n",
+ "\n",
+ "#By applying Bernoullis equation to sections 1 and 2,by assuming the bend to be in the horizontal plane,\n",
+ "\n",
+ "p1=round(((((V2**2)/(2*g))-((V1**2)/(2*g)))*ga),1)\n",
+ "\n",
+ "#By momentum equation in the x-direction,\n",
+ "\n",
+ "A1=((math.pi)/4)*((D1/100)**2)\n",
+ "\n",
+ "Rx=rho*Q*(V2-(-V1))+((p1*1000)*A1)\n",
+ "\n",
+ "#The force exerted by the fluid on the pipe,and hence on the bolts in section1,is equal and opposite to Rx.\n",
+ "\n",
+ "print \"F=\",int(Rx),\" N and acts to the left,i.e. in the negative x-direction,as a pull (tension) on the joint.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "F= 10165 N and acts to the left,i.e. in the negative x-direction,as a pull (tension) on the joint.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.9 Page No125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "D1=0.5 #diameter in m\n",
+ "\n",
+ "D2=0.25 #diameter in m\n",
+ "\n",
+ "ga=9.79 #unit length of water in kN/m^3\n",
+ "\n",
+ "g=9.81 #gravity\n",
+ "\n",
+ "p1=15.0 #pressure at section 1 in kPa\n",
+ "\n",
+ "h=2 #height in m\n",
+ "\n",
+ "rho=0.998 #relative density\n",
+ "\n",
+ "Q=0.5 #discharge in m\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "A1=(math.pi/4)*(D1**2)\n",
+ "\n",
+ "A2=(math.pi/4)*(D2**2)\n",
+ "\n",
+ "V1=D1/A1 #Velocities at section 1 and 2\n",
+ "\n",
+ "print \"(i)V1=\",round(V1,3),\"m/s\"\n",
+ "\n",
+ "V2=D1/A2\n",
+ "\n",
+ "print \"V2=\",round(V2,3),\"m/s\"\n",
+ "\n",
+ "#By applying Bernoullis theorem to sections 1 and 2,\n",
+ "\n",
+ "p2=(((p1/ga)+(V1**2)/(2*g))-(h+(V2**2)/(2*g)))*ga #Calculating pressure at section 2\n",
+ "\n",
+ "print \"(ii)P2=\",round(p2,3),\"kPa(guage)\"\n",
+ "\n",
+ "#Now,consider a control volume.\n",
+ "\n",
+ "r1=D1/2\n",
+ "\n",
+ "r2=D2/2\n",
+ "\n",
+ "#weight of water in the control volume which is in the shape of frustum of cone\n",
+ "\n",
+ "W=round((ga*(math.pi/3))*(h*((r1**2)+(r1*r2)+(r2**2))),3)\n",
+ "\n",
+ "#Applying linear momentum equation in the vertical direction to cv\n",
+ "\n",
+ "#reaction force on the water in the control volume\n",
+ "\n",
+ "Ry=round((rho*Q*(V2-V1))-(-W+(p1*A1)+(-p2*A2)),3)\n",
+ "\n",
+ "#F=Net force on the nozzle walls is equal and opposite to Ry\n",
+ "\n",
+ "print \"(iii)F=\",Ry,\"kN acting vertically downwards\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)V1= 2.546 m/s\n",
+ "V2= 10.186 m/s\n",
+ "(ii)P2= -53.115 kPa(guage)\n",
+ "(iii)F= 0.503 kN acting vertically downwards\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.16 Page No129"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "A1=0.01 #Area of cross section 1 in m^2\n",
+ "\n",
+ "V1=20 #velocity1 in m/s\n",
+ "\n",
+ "V2=10 #velocity2 in m/s\n",
+ "\n",
+ "A2=0.02 #Area of cross section 2 in m^2\n",
+ "\n",
+ "rho=1000 #density of water in kg/m^3\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Q1=V1*A1\n",
+ "\n",
+ "Q2=V2*(A2-A1)\n",
+ "\n",
+ "Q=Q1+Q2 #total flow\n",
+ "\n",
+ "V3=Q/A2 #velocity 3\n",
+ "\n",
+ "#By momentum equation in the x-direction:\n",
+ "\n",
+ "#p1*A2-p2*A2=Mout-Min\n",
+ "\n",
+ "#let us take (p1-p2) as a\n",
+ "\n",
+ "a=(-(rho*((Q*V3)-(Q1*V1)-(Q2*V2)))/A2)\n",
+ "\n",
+ "print \"(p2-p1)=\",round(a/1000,0),\"kPa\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(p2-p1)= 25.0 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.18 Page No130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "D=1 #diameter in cm\n",
+ "\n",
+ "Q=2500 #discharge in cm^3/s\n",
+ "\n",
+ "r=0.30 #radius in m\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "a=round((math.pi/4)*(D**2),4)\n",
+ "\n",
+ "print \"answer calculated in this book for V2 is wrong.It should be as follows,\"\n",
+ "\n",
+ "V2=(Q/(2*a))/100\n",
+ "\n",
+ "print \"V2=\",round(V2,2),\"m/s\" #relative velocity of jet\n",
+ "\n",
+ "#T=-rho*Q*r(U2-V2) #Torque\n",
+ "\n",
+ "omega=V2/r #angular velocity\n",
+ "\n",
+ "print \"omega\",round(omega,2),\"rad./s\"\n",
+ "\n",
+ "N=(omega/(2*math.pi))*60 #Speed of rotation per minute,\n",
+ "\n",
+ "print \"N=\",round(N,1),\"rpm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "answer calculated in this book for V2 is wrong.It should be as follows,\n",
+ "V2= 15.92 m/s\n",
+ "omega 53.05 rad./s\n",
+ "N= 506.6 rpm\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.19 Page No130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "rho=998 #relative density of water in kg/m^3\n",
+ "\n",
+ "Q=2.5 #discharge in L/s\n",
+ "\n",
+ "D=1 #diameter in cm\n",
+ "\n",
+ "r=0.30 #radius in cm\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "a=round((math.pi/4)*(D**2),4)\n",
+ "\n",
+ "print \"answer calculated in this book for V2 is wrong.It should be as follows,\"\n",
+ "\n",
+ "V2=((Q*1000)/(2*a))/100\n",
+ "\n",
+ "print \"V2=\",round(V2,2),\"m/s\" #relative velocity of jet\n",
+ "\n",
+ "To=rho*Q*r*V2 #when the sprinkler is stationary\n",
+ "\n",
+ "print \"Torque To=\",round((To)/1000,2),\"N.m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "answer calculated in this book for V2 is wrong.It should be as follows,\n",
+ "V2= 15.92 m/s\n",
+ "Torque To= 11.91 N.m\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.22 Page No131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "Q=1.5 #discharge in L/s\n",
+ "\n",
+ "A=0.8 #area in cm^2\n",
+ "\n",
+ "V2=9.375 #relative velocity in m/s\n",
+ "\n",
+ "V3=9.375 #relative velocity in m/s\n",
+ "\n",
+ "r3=0.4 #radius in cm\n",
+ "\n",
+ "r2=0.3 #radius in cm\n",
+ "\n",
+ "rho=998 #density of water in kg/m^3\n",
+ "\n",
+ "#calculation\n",
+ "\n",
+ "Qn=Q/2\n",
+ "\n",
+ "V=(Q*1000)/(A*2)\n",
+ "\n",
+ "#absolute velocity,V2=v2+omega*r2\n",
+ "\n",
+ "#V3=v3-omega-omega*r3\n",
+ "\n",
+ "#r2V2=r3V3,for zero frictional resistance\n",
+ "\n",
+ "omega=(r3*V2-r2*V2)/(r3*r3+r2*r2)\n",
+ "\n",
+ "N=(omega*60)/(math.pi*2)\n",
+ "\n",
+ "print \"(i)Torque on the arm\"\n",
+ "\n",
+ "print \"N=\",round(N,2),\"rpm\"\n",
+ "\n",
+ "To=(-rho*Qn*(-r3*V3+r2*V2))/1000\n",
+ "\n",
+ "print \"(ii)When the arm is stationary\"\n",
+ "\n",
+ "print \"To=\",round(To,3),\"N.m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Torque on the arm\n",
+ "N= 35.81 rpm\n",
+ "(ii)When the arm is stationary\n",
+ "To= 0.702 N.m\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter6_2.ipynb b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter6_2.ipynb new file mode 100644 index 00000000..da9d0c86 --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter6_2.ipynb @@ -0,0 +1,885 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9c660e9d97dd87e451372acab037edaf245a1e1285c7a23634062392e2bc2073"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6:Dimensional Analysis and Similitude"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2 Page No143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "from sympy import *\n",
+ "\n",
+ "#Variable Initialisation\n",
+ "\n",
+ "q = Symbol('q')\n",
+ "\n",
+ "q=0.305 #value of one feet\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "p=2.67*sqrt(q)\n",
+ "\n",
+ "#Rewriting the given equation\n",
+ "\n",
+ "#2.67=p/sqrt(q)\n",
+ "\n",
+ "#in terms of dimensions,\n",
+ "\n",
+ "p=2.67*(q)**(-1/2)\n",
+ "\n",
+ "print\"The formula in SI units would now read as,P=\",round(p,2),\"*sqrt(q)\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The formula in SI units would now read as,P= 4.83 *sqrt(q)\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.13 Page No147"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "Lr=1/50 #size of model\n",
+ "\n",
+ "Qm=1.25 #discharge in m^3/s\n",
+ "\n",
+ "tp=12 #time taken by prototype\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#Frm=Vm/math.sqrt(g*Lm)\n",
+ "\n",
+ "Qp=(1/Lr)**(2.5)*Qm #Prorotype ratio\n",
+ "\n",
+ "print \"Qp=\",int(Qp),\"m^3/s\"\n",
+ "\n",
+ "#Tr=Lr/Vr #Time ratio\n",
+ "\n",
+ "tm=tp/math.sqrt(1/Lr)\n",
+ "\n",
+ "print \"tm=\",round(tm,3),\"hours\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Qp= 22097 m^3/s\n",
+ "tm= 1.697 hours\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.14 Page No147"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "Lr=1/100 #size of prototype\n",
+ "\n",
+ "Fm=0.12 #resistance in N\n",
+ "\n",
+ "rhor=1 #relative density\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#resistance is the significant force and is appropriate by froude's law.\n",
+ "\n",
+ "#Frm=Vm/math.sqrt(g*Lm)\n",
+ "\n",
+ "#Vr=math.sqrt(Lr)\n",
+ "\n",
+ "Fp=(Fm/(Lr)**3*rhor)/1000 #Prototype force\n",
+ "\n",
+ "print \"Fp=\",(Fp),\"kN\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fp= 120.0 kN\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.15 Page No147"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import *\n",
+ "\n",
+ "x,Lr=symbols(\"x Lr\")\n",
+ "\n",
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "Lr=1/100 #size of prototype\n",
+ "\n",
+ "nm=0.013 #Manning's n\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#froude model law is applicable\n",
+ "\n",
+ "#Frm=Vm/math.sqrt(g*Lm)\n",
+ "\n",
+ "a=Lr**(2/3) #By mannings formula,\n",
+ "\n",
+ "s=Lr**(1/2)\n",
+ "\n",
+ "x=cancel(a/s) #simplifying \n",
+ "\n",
+ "np=nm/x #prototype roughness coefficient\n",
+ "\n",
+ "print \"np=\",round(np,3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "np= 0.028\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.16 Page No147"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "Lr=1/20 #size of prototype\n",
+ "\n",
+ "Vm=1.5 #velocity in m/s \n",
+ "\n",
+ "qm=0.20 #unit width in m^3/s\n",
+ "\n",
+ "Pm=5 #model pressure head in cm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Vp=round(Vm/math.sqrt(Lr),2) #Prototype velocity\n",
+ "\n",
+ "print \"Vp=\",Vp,\"m/s\"\n",
+ "\n",
+ "#qr=Qr/Lr\n",
+ "\n",
+ "qp=round(qm/(Lr)**(3/2),2) #prototype discharge\n",
+ "\n",
+ "print \"qp=\",qp,\"m^3/s/m\"\n",
+ "\n",
+ "#Assuming rho_r=1,hence,Pr=Lr\n",
+ "\n",
+ "Pp=Pm/Lr #pressure head in prototype\n",
+ "\n",
+ "print \"Pp=\",Pp,\"cm of mercury\"\n",
+ "\n",
+ "#Power ratio=(energy loss/second)\n",
+ "\n",
+ "Pm=Pp*10*Lr**(7/2) #Energy dissipated\n",
+ "\n",
+ "print \"Pm=\",round(Pm,3),\"W\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vp= 6.71 m/s\n",
+ "qp= 17.89 m^3/s/m\n",
+ "Pp= 100.0 cm of mercury\n",
+ "Pm= 0.028 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.17 Page No148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "rho_p=917 #density in kg/m^3\n",
+ "\n",
+ "mu_p=0.29 #viscosity in Pa.s\n",
+ "\n",
+ "L_p=15.0 #diameter in cm\n",
+ "\n",
+ "V_p=2 #velocity of pipe\n",
+ "\n",
+ "rho_m=998 #density in kg/m^3\n",
+ "\n",
+ "L_m=1.0 #diameter in cm\n",
+ "\n",
+ "mu_m=1.31E-3 #viscosity in Pa.s\n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "#Reynold's similarity law of applicable,referring oil with p and water with m\n",
+ "\n",
+ "m=round((mu_m/mu_p)*(1)/((L_m/L_p)*(rho_m)/(rho_p)),4)\n",
+ "\n",
+ "V_m=V_p*m #velocity of water flow\n",
+ "\n",
+ "print \"V_m=\",V_m,\"m/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V_m= 0.1246 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.18 Page No148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "V_p=60 #velocity in Km/h\n",
+ "\n",
+ "F_m=250 #model drag\n",
+ "\n",
+ "mu_r=1 #viscosity\n",
+ "\n",
+ "rho_r=1 #density in in kg/m^3\n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "#Reynold's similarity law is applicable\n",
+ "\n",
+ "#V_r=vr/L_r\n",
+ "\n",
+ "#If vr=1,then V_r=1/L_r\n",
+ "\n",
+ "L_r=6 \n",
+ "\n",
+ "V_m=((V_p*L_r)*1000)/3600 #V_m in m/s\n",
+ "\n",
+ "#using force ratio,Fm/Fp=(mu_r**2)/rho_r\n",
+ "\n",
+ "#Fm/Fp=1.0\n",
+ "\n",
+ "Fp=F_m/((mu_r*mu_r))/rho_r #drag required\n",
+ "\n",
+ "print \"Fp=\",int(Fp),\"N(same as in the model)\"\n",
+ "\n",
+ "V_p=(V_p*1000)/(3600) #V_m in m/s\n",
+ "\n",
+ "Pp=Fp*V_p #power to overcome drag in the prototype\n",
+ "\n",
+ "print \"Pp=\",math.ceil(Pp)/1000,\"kW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Fp= 250 N(same as in the model)\n",
+ "Pp= 4.167 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.19 Page No149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "Vr=1E-3 #Viscosity in Pa.s\n",
+ "\n",
+ "Vp=0.104 #viscosity of prototype in Pa.s\n",
+ "\n",
+ "rho_p=900 #density of prototype in kg/m^3\n",
+ "\n",
+ "Lr=1/6 #size of prototype\n",
+ "\n",
+ "Pm=450 #Pressure drop in Pa\n",
+ "\n",
+ "Qp=200 #Prototype discharge\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#Reynolds model law is applicable,\n",
+ "\n",
+ "mu_r=Vr/Vp\n",
+ "\n",
+ "rho_r=998/rho_p\n",
+ "\n",
+ "Pr=(mu_r)**2/(Lr**2*rho_r)\n",
+ "\n",
+ "rh_p=(Pm/Pr)/1000 #Prototype pressure drop\n",
+ "\n",
+ "print \"rho_p=\",round(rh_p,0),\"kPa\"\n",
+ "\n",
+ "Qr=(mu_r)*Lr/rho_r\n",
+ "\n",
+ "Qm=Qp*Qr #model discharge\n",
+ "\n",
+ "print \"Qm=\",round(Qm,3),\"L/s\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rho_p= 150.0 kPa\n",
+ "Qm= 0.289 L/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.20 Page No149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "Lm=0.30 #length of model in m\n",
+ "\n",
+ "Lp=1.50 #Elength of device in m\n",
+ "\n",
+ "Vm=35 #Velocity of model in m/s\n",
+ "\n",
+ "Vp=3.5 #Velocity of prototype in m/s\n",
+ "\n",
+ "mu_m=1.90E5 #relative density in Pa.s\n",
+ "\n",
+ "mu_p=1E-3 #relative density in Pa.s\n",
+ "\n",
+ "P=1.17 #atmospheric pressure in kg/m^3\n",
+ "\n",
+ "Fm=40 #drag force in N\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#Reynolds model law is applicable\n",
+ "\n",
+ "a=1E-6\n",
+ "\n",
+ "Lr=Lm/Lp #prototype length\n",
+ "\n",
+ "Vr=Vm/Vp #prototype velocity\n",
+ "\n",
+ "mu_r=mu_m/mu_p*a\n",
+ "\n",
+ "rho_r=mu_r/(Vr*Lr)/10000 #prototype density\n",
+ "\n",
+ "rho_air=(998*rho_r) #density of air\n",
+ "\n",
+ "print \"rho_air=\",rho_air\n",
+ "\n",
+ "#This is 8 times larger than the density at atmospheric pressure.\n",
+ "\n",
+ "P_model=rho_air/P\n",
+ "\n",
+ "print round(P_model,3),\"times local atmospheric pressure\"\n",
+ "\n",
+ "Fr=mu_r**2/rho_r*a/100 #Force ratio\n",
+ "\n",
+ "Fp=Fm/Fr #Drag force of prototype\n",
+ "\n",
+ "print \"Fp=\",round(Fp/1000,3),\"kN\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "rho_air= 9.481\n",
+ "8.103 times local atmospheric pressure\n",
+ "Fp= 1.053 kN\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.21 Page No149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "D_p=1.5 #Diameter in m\n",
+ "\n",
+ "rd=0.9 #relative density\n",
+ "\n",
+ "v_p=0.03 #viscosity in stoke\n",
+ "\n",
+ "Q=3.0 #rate\n",
+ "\n",
+ "D_m=0.15 #diameter2 in m\n",
+ "\n",
+ "V_m=0.01 #viscosity2 in stoke \n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "#Reynolds number must be the same in the model and prototype for similar pipe flows\n",
+ "\n",
+ "V_p=round((Q)/((math.pi/4)*(1.5*1.5)),4)\n",
+ "\n",
+ "V_m=V_p*(D_p/D_m)*(V_m/v_p) \n",
+ "\n",
+ "print \"V_m=\",V_m,\"m/s\"\n",
+ "\n",
+ "Q_m=(math.pi/4)*(D_m**2)*(V_m) #Discharge in the model\n",
+ "\n",
+ "print \"Q_m=\",round(Q_m,1),\"m^3/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V_m= 5.659 m/s\n",
+ "Q_m= 0.1 m^3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.22 Page No150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "Lr=1/10 #model length\n",
+ "\n",
+ "mu_r=400 #speed of prototype in km/h\n",
+ "\n",
+ "rho_r=10 #density \n",
+ "\n",
+ "Vr=1 #model velocity\n",
+ "\n",
+ "Vp=1 #prototype velocity\n",
+ "\n",
+ "Fm=500 #Force ratio\n",
+ "\n",
+ "fm=25 #Frequency in Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#Reynolds number and prototype is same in this model.\n",
+ "\n",
+ "Vm=Vp*mu_r/(rho_r*Lr) #Velocity in m/s\n",
+ "\n",
+ "print \"Vm=\",Vm,\"km/h\"\n",
+ "\n",
+ "#Model Velocity is the same as prototype velocity\n",
+ "\n",
+ "Fr=Lr**2*rho_r*Vr**2 #Force ratio\n",
+ "\n",
+ "Fp=Fm/Fr\n",
+ "\n",
+ "print \"Fp=\",Fp,\"N\"\n",
+ "\n",
+ "Fr=Fm/Fp\n",
+ "\n",
+ "Fp=fm/10 #Prototype frequency\n",
+ "\n",
+ "print \"Fp=\",Fp,\"Hz\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vm= 400.0 km/h\n",
+ "Fp= 5000.0 N\n",
+ "Fp= 2.5 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.25 Page No151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "L_r=1/200 #horizontal scale\n",
+ "\n",
+ "h_r=1/40 #vertical scale\n",
+ "\n",
+ "Q_p=152 #normal discharge in m^3/s\n",
+ "\n",
+ "y_p=2.0 #depth in metres\n",
+ "\n",
+ "B_p=90 #width in metres\n",
+ "\n",
+ "n_p=0.025 #roughness value\n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "L_r=1/200\n",
+ "\n",
+ "h_r=1/40\n",
+ "\n",
+ "h=math.sqrt(h_r)\n",
+ " \n",
+ "Q_m=Q_p*L_r*h*h_r*10 #Discharge \n",
+ "\n",
+ "print \"(i)Qm=\",round(Q_m,2),\"m^3/s\"\n",
+ "\n",
+ "y_m=y_p*h_r #Depth\n",
+ "\n",
+ "print \"(ii) ym=\",y_m,\"m\"\n",
+ "\n",
+ "B_m=B_p*L_r #Width\n",
+ "\n",
+ "print \"(iii)Bm=\",B_m/10,\"m\"\n",
+ " \n",
+ "a=math.pow(h_r,2/3) #Manning's n_m\n",
+ "\n",
+ "b=math.sqrt(L_r)*L_r\n",
+ "\n",
+ "n_m=((n_p)*(math.pow(h_r,2/3)))/(math.pow(L_r,1/2))\n",
+ "\n",
+ "print \"(iv) n_m=\",round(n_m,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)Qm= 0.03 m^3/s\n",
+ "(ii) ym= 0.05 m\n",
+ "(iii)Bm= 0.045 m\n",
+ "(iv) n_m= 0.03\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.26 Page No151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "L_r=1/500 #horizontal scale ratio\n",
+ "\n",
+ "h_r=1/50 #vertical scale ratio\n",
+ "\n",
+ "T_p=12 #time period\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "h_r=1/50\n",
+ "\n",
+ "L_r=1/500\n",
+ "\n",
+ "a=(math.sqrt(h_r))\n",
+ "\n",
+ "T_r=round((L_r)/(a),5) #Time ratio\n",
+ "\n",
+ "T_p=12*60*60 #model period\n",
+ "\n",
+ "T_m=T_p*T_r\n",
+ "\n",
+ "a=T_m/60 #To separate minutes and seconds\n",
+ "\n",
+ "b=T_m%60\n",
+ "\n",
+ "print \"Model Period T_m =\",int(a),\"minutes\",int(b),\"seconds\"\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Model Period T_m = 10 minutes 10 seconds\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.27 Page No151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "L_r=1/250 #horizontal scale\n",
+ "\n",
+ "h_r=1/25 #vertical scale\n",
+ "\n",
+ "S_p=0.0002 #prototype slope\n",
+ "\n",
+ "V_m=0.50 #velocity in m/s\n",
+ "\n",
+ "Q_m=0.02 #discharge in m^3/s\n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "h_r=1/25\n",
+ "\n",
+ "L_r=1/250\n",
+ "\n",
+ "S_r=h_r/L_r\n",
+ "\n",
+ "S_m=round((S_p)*(S_r),3) #Slope ratio \n",
+ "\n",
+ "print \"(i)S_m=\",S_m\n",
+ "\n",
+ "V_r=math.sqrt(h_r)\n",
+ "\n",
+ "V_p=V_m/V_r #Velocity ratio\n",
+ "\n",
+ "print \"(ii)V_p=\", V_p,\"r\"\n",
+ "\n",
+ "Q_p=(L_r)*(math.sqrt(h_r))*(h_r)\n",
+ "\n",
+ "Q_p=(Q_m)/(Q_p) #Discharge ratio\n",
+ "\n",
+ "print \"(iii)Q_p=\",int(round(Q_p,1)),\"m^3/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i)S_m= 0.002\n",
+ "(ii)V_p= 2.5 r\n",
+ "(iii)Q_p= 625 m^3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file diff --git a/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter7_2.ipynb b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter7_2.ipynb new file mode 100644 index 00000000..9d387c11 --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/chapter7_2.ipynb @@ -0,0 +1,943 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:ac68ac9e93ca4906686b39d1ab7585fe858e0b0b8e55c7de32d938bd00ba42a9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7:Laminar Flow"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4 Page No162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "R=0.06 #Diamter in m\n",
+ "\n",
+ "r=0.02 #radical distance\n",
+ "\n",
+ "u=0.6 #velocity in m/s\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#For a laminar flow,\n",
+ "\n",
+ "#(-ga/4*mu*()dh/ds\n",
+ "\n",
+ "K=(u)/(R**2-r**2)\n",
+ "\n",
+ "u_m=K*R**2 #Maximum velocity\n",
+ "\n",
+ "print \"u_m=\",u_m,\"m/s\"\n",
+ "\n",
+ "M=u_m/2 #Mean velocity\n",
+ "\n",
+ "print \"M=\",M,\"m/s\"\n",
+ "\n",
+ "Q=math.pi/4 *(R**2)*(M) #Discharge\n",
+ "\n",
+ "print \"Q=\",round(Q*1000,3),\"L/s\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "u_m= 0.675 m/s\n",
+ "M= 0.3375 m/s\n",
+ "Q= 0.954 L/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.6 Page No163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "mu=0.08 #viscosity in kg/ms\n",
+ "\n",
+ "D=0.1 #Diameter in m\n",
+ "\n",
+ "u_m=1.4 #Maximum velocity \n",
+ "\n",
+ "L=1.0 #Length in m\n",
+ "\n",
+ "R=0.05 #Radius in m\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#u=1.4(1-r/R**2)\n",
+ "\n",
+ "tau_0=2*mu*1.4*R/(R**2) #shear stress\n",
+ "\n",
+ "print \"tau_0=\",tau_0,\"N/m^2\"\n",
+ "\n",
+ "#Maximum velocity um occurs at r=0\n",
+ "\n",
+ "V=u_m/2 #mean velocity\n",
+ "\n",
+ "delp1=(32*mu*V*L)/D**2 #Pressure drop per unit length of the pipe\n",
+ "\n",
+ "print \"(-delP)1=\",delp1,\"N/m^2\"\n",
+ "\n",
+ "#Alternate method for pressure drop\n",
+ "\n",
+ "Pd=4*tau_0*L/(D)\n",
+ "\n",
+ "print \"(-delP)1=\",Pd,\"N/m^2\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tau_0= 4.48 N/m^2\n",
+ "(-delP)1= 179.2 N/m^2\n",
+ "(-delP)1= 179.2 N/m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7 Page No163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "ga=9.81 #gravity constant\n",
+ "\n",
+ "h_f=20 #Head loss\n",
+ "\n",
+ "L=3000 #length of pipe in m\n",
+ "\n",
+ "R=0.30 #Radius in m\n",
+ "\n",
+ "r=0.10 #radial distance in m\n",
+ "\n",
+ "mu=0.15 #absolute viscosity in Pa.s\n",
+ "\n",
+ "D=0.30 #Diameter in m\n",
+ "\n",
+ "rho=0.85*998 #relative density in kg/m^3\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "tau_0=round((R/2)*(ga*rho*h_f/L),3) #Wall shear stress\n",
+ "\n",
+ "tau=(tau_0/(R/2))*r #shear stress\n",
+ "\n",
+ "print \"tau=\",tau,\"Pa\"\n",
+ "\n",
+ "V=round((h_f/L)*(rho*ga*(D**2))/(32*mu),2)#Volume\n",
+ "\n",
+ "Re=round(V*D*rho/mu,1) #Reynold's number\n",
+ "\n",
+ "#Re is less than 2000.hence laminar flow is correct.\n",
+ "\n",
+ "f=64/Re #friction factor\n",
+ "\n",
+ "print \"f=\",round(f,5)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tau= 5.548 Pa\n",
+ "f= 0.03627\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.8 Page No163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "mu=1.50 #absolute viscosity\n",
+ "\n",
+ "rho=1260 #relative density in kg/m^3\n",
+ "\n",
+ "V=5.0 #Velocity in m/s\n",
+ "\n",
+ "D=0.10 #Diameter in m\n",
+ "\n",
+ "ga=9.81*rho #density \n",
+ "\n",
+ "L=12 #Length in m\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Re=rho*V*D/mu #Reynold's number\n",
+ "\n",
+ "#As,Re value less than 2000,the flow is conduit\n",
+ "\n",
+ "tau_0=8*mu*V/D\n",
+ "\n",
+ "print \"tau_0=\",int(tau_0),\"Pa\"\n",
+ "\n",
+ "h_f=32*mu*V*L/(ga*(D**2)) #In laminar flow the head loss\n",
+ "\n",
+ "print \"h_f=\",round(h_f,1),\"m\"\n",
+ "\n",
+ "#P=ga*Q*h_f\n",
+ "\n",
+ "A=(math.pi*(D**2)/4) #Area\n",
+ "\n",
+ "Q=A*V #Discharge\n",
+ "\n",
+ "P=ga*Q*h_f #Power\n",
+ "\n",
+ "print \"P=\",round(P/1000,2),\"kW\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tau_0= 600 Pa\n",
+ "h_f= 23.3 m\n",
+ "P= 11.31 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.9 Page No164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "R=2000 #maximum Reynolds number\n",
+ "\n",
+ "rho=950 #density in kg/m^3\n",
+ "\n",
+ "mu=8E-2 #Viscosity in Pa.s\n",
+ "\n",
+ "L=200 #length in metre\n",
+ "\n",
+ "D=50 #diameter in cm\n",
+ "\n",
+ "#solution\n",
+ " \n",
+ "D=15/100 #diameter in m\n",
+ "\n",
+ "#Re=(V*D)/v\n",
+ "\n",
+ "V=R*(mu/rho)/D\n",
+ "\n",
+ "#by,Hagen-Poiseuille equation,\n",
+ "\n",
+ "h_f=(32*mu*V*L)/((rho*9.81)*(D**2)) #headloss\n",
+ "\n",
+ "print \"Maximum difference in oil surface elevations h_f=\",round(h_f,3),\"m\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum difference in oil surface elevations h_f= 2.742 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.10 Page No164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "D=0.075 #Diamter in m\n",
+ "\n",
+ "mu=0.1 #visocity of oil in N.s/m^2\n",
+ "\n",
+ "P=5.4 #power in kW\n",
+ "\n",
+ "rho=0.90*998 #relative density\n",
+ "\n",
+ "E=60 #efficiency in %\n",
+ "\n",
+ "L=1000 #length in m\n",
+ "\n",
+ "#solution\n",
+ "\n",
+ "P=P*(E/100) #power spent in fluid friction\n",
+ "\n",
+ "Q=round(math.sqrt(((P*1000)*(math.pi)*(D**4))/(128*mu*L)),5) #quantity\n",
+ "\n",
+ "print \"Quantity of oil=\",round(Q*1000*60,3),\"L/min\"\n",
+ "\n",
+ "V=round((Q)/((math.pi/4)*(D**2)),3) #Velocity in m/s\n",
+ "\n",
+ "Re=(V*D*rho)/mu #Reynolds number\n",
+ "\n",
+ "print \"Reynolds number=\",int (Re)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Quantity of oil= 301.2 L/min\n",
+ "Reynolds number= 765\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.11 Page No164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#variable initialisation\n",
+ "\n",
+ "mu=1.5 #absolute viscosity\n",
+ "\n",
+ "rho=0.9 #relative density in kg/m^3\n",
+ "\n",
+ "ga=9.81 #gravity\n",
+ "\n",
+ "Pa=200 #Pressure of guage A in kPa\n",
+ "\n",
+ "Za=20 #Pressure guages in m\n",
+ "\n",
+ "Pb=500 #Pressure of guage B in kPa\n",
+ "\n",
+ "Zb=0 #Pressure guages in m\n",
+ "\n",
+ "L=30 #Length in m\n",
+ "\n",
+ "D=0.03 #Diameter in m\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "mu=mu/10 #in Pa.s\n",
+ "\n",
+ "rho=rho*998 #density in kg/m^3\n",
+ "\n",
+ "ga=(ga*rho)/1000 #in kN/m^3 \n",
+ "\n",
+ "ha=(Pa/ga)+Za #piezometric head at A\n",
+ "\n",
+ "hb=(Pb/ga)+Zb #piezometric head at B\n",
+ "\n",
+ "print \"Since hb>ha,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 Binary files differnew file mode 100644 index 00000000..784d1f76 --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_01_00.png 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 Binary files differnew file mode 100644 index 00000000..e132c14c --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_01_25.png 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 Binary files differnew file mode 100644 index 00000000..b31fff16 --- /dev/null +++ b/1000_solved_Problems_in_Fluid_Mechanics_includes_Hydraulic_machines_by_K.Subramanya/screenshots/Screenshot_from_2016-01-14_17_02_44.png |