summaryrefslogtreecommitdiff
path: root/Elementary_Fluid_Mechanics
diff options
context:
space:
mode:
Diffstat (limited to 'Elementary_Fluid_Mechanics')
-rwxr-xr-xElementary_Fluid_Mechanics/README.txt10
-rwxr-xr-xElementary_Fluid_Mechanics/ch1.ipynb253
-rwxr-xr-xElementary_Fluid_Mechanics/ch10.ipynb291
-rwxr-xr-xElementary_Fluid_Mechanics/ch11.ipynb247
-rwxr-xr-xElementary_Fluid_Mechanics/ch12.ipynb65
-rwxr-xr-xElementary_Fluid_Mechanics/ch13.ipynb192
-rwxr-xr-xElementary_Fluid_Mechanics/ch2.ipynb505
-rwxr-xr-xElementary_Fluid_Mechanics/ch3.ipynb250
-rwxr-xr-xElementary_Fluid_Mechanics/ch4.ipynb491
-rwxr-xr-xElementary_Fluid_Mechanics/ch5.ipynb364
-rwxr-xr-xElementary_Fluid_Mechanics/ch6.ipynb622
-rwxr-xr-xElementary_Fluid_Mechanics/ch7.ipynb292
-rwxr-xr-xElementary_Fluid_Mechanics/ch8.ipynb193
-rwxr-xr-xElementary_Fluid_Mechanics/ch9.ipynb780
-rwxr-xr-xElementary_Fluid_Mechanics/screenshots/2FluidStatics.pngbin0 -> 122795 bytes
-rwxr-xr-xElementary_Fluid_Mechanics/screenshots/7FlowOfaRealFluid.pngbin0 -> 115810 bytes
-rwxr-xr-xElementary_Fluid_Mechanics/screenshots/9FluidFlowInPipes.pngbin0 -> 120324 bytes
17 files changed, 4555 insertions, 0 deletions
diff --git a/Elementary_Fluid_Mechanics/README.txt b/Elementary_Fluid_Mechanics/README.txt
new file mode 100755
index 00000000..d40ffd56
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/README.txt
@@ -0,0 +1,10 @@
+Contributed By: jaykishan mehta
+Course: btech
+College/Institute/Organization: CSPIT
+Department/Designation: CS
+Book Title: Elementary Fluid Mechanics
+Author: J. K. Vennard
+Publisher: John Wiley & Sons, USA
+Year of publication: 1961
+Isbn: 9780471905851
+Edition: 4 \ No newline at end of file
diff --git a/Elementary_Fluid_Mechanics/ch1.ipynb b/Elementary_Fluid_Mechanics/ch1.ipynb
new file mode 100755
index 00000000..d7bfb12e
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/ch1.ipynb
@@ -0,0 +1,253 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:93240c9461961fb318dd0bfb1fd759f5d83f741dfd8a4a76ea2b51b81a776bec"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1 : Fundamentals"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1 Page No : 8"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# variables\n",
+ "T = 80.;\t\t#temperature of chlorine gas in degree F\n",
+ "p = 100.;\t\t#pressure in psia\n",
+ "W = 2*35.45;\t\t#molecular weight of chlorine \n",
+ "\n",
+ "# calculations \n",
+ "R = 1545/W;\t\t#specific gas constant in ft-lb/lb-degreeR\n",
+ "gam = p*(144/R)*(1/(460+T));\t\t#specific weight of chlorine in lb/cuft\n",
+ "Spec_vol = 1/gam;\t\t#specific volume in cuft/lb\n",
+ "rho = gam/32.2;\t\t#density of chlorine in slug/cuft\n",
+ "\n",
+ "# results \n",
+ "print 'Specific weight = %.3f lb/cuft \\nSpecific volume = %.3f cuft/lb \\ndensity = %.4f slug/cuft'%(gam,Spec_vol,rho);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Specific weight = 1.224 lb/cuft \n",
+ "Specific volume = 0.817 cuft/lb \n",
+ "density = 0.0380 slug/cuft\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2 Page No : 12"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "gamma = 1.4;\n",
+ "T1 = 60.;\t\t#temperature of air in degree F\n",
+ "p1 = 14.7;\t\t#pressure in psia\n",
+ "k = 0.5;\t\t#(final volume/initial volume) = k\n",
+ "R = 53.3;\t\t#Engineering gas constant\n",
+ "\n",
+ "# calculations \n",
+ "gam1 = p1*(144/R)*(1/(460+T1));\t\t#lb/cuft\n",
+ "gam2 = gam1/k;\t\t#lb/cuft\n",
+ "p2 = (p1/(gam1**(gamma)))*(gam2**(gamma));\t\t# in psia\n",
+ "T2 = p2*(144/R)*(1/gam2);\t\t#in degree F\n",
+ "a1 = math.sqrt(gamma*32.2*R*(460+T1));\t\t# in fps\n",
+ "a2 = math.sqrt(gamma*32.2*R*(T2));\t\t# in fps\n",
+ "\n",
+ "# results \n",
+ "print 'Final pressure = %.1f psia \\\n",
+ "\\nFinal temperature = %d degreeR \\\n",
+ "\\nSonic velocity before compression = %d fps \\\n",
+ "\\nSonic velocity after compression = %.f fps'%(p2,T2,a1,a2);\n",
+ "\n",
+ "#the answers differ due to rounding-off errors"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0.152749314475\n",
+ "Final pressure = 38.8 psia \n",
+ "Final temperature = 686 degreeR \n",
+ "Sonic velocity before compression = 1117 fps \n",
+ "Sonic velocity after compression = 1284 fps\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3 Page No : 17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# variables\n",
+ "r1 = 0.25;\t\t# radius of cylinder in feet\n",
+ "l = 2.;\t \t#length of cylnider in feet\n",
+ "r2 = 0.30;\t\t# radius of co-axial cylinder in feet\n",
+ "mu = 0.018;\t\t#lb-sec/ft**2\n",
+ "torque = 0.25;\t\t# in ft-lb\n",
+ "dv_dy1 = torque/(4*math.pi*mu*r1**2);\t\t#velocity gradient at radius = 0.25 in fps/ft\n",
+ "dv_dy2 = torque/(4*math.pi*mu*r2**2);\t\t#velocity gradient at radius = 0.30 in fps/ft\n",
+ "\n",
+ "# calculations \n",
+ "def f4(r): \n",
+ "\t return -torque/(4*math.pi*mu*r**2)\n",
+ "\n",
+ "V1 = quad(f4,r2,r1)[0]\n",
+ "\n",
+ "rpm1 = V1*60/(2*math.pi*r1);\n",
+ "V2 = torque*(r2-r1)/(4*math.pi*mu*r1**2);\t\t#in fps\n",
+ "rpm2 = V2*60/(2*math.pi*r1);\n",
+ "hp = 2*math.pi*r1*(rpm1/(550*60));\n",
+ "\n",
+ "# results \n",
+ "print 'Velocity gradient at the inner cylinder wall is %.1f fps/ft and at the outer cylinder wall is %.1f fps/ft'%(dv_dy1,dv_dy2);\n",
+ "print 'rpm = %.1f and approximate rpm = %.1f, hp = %.5f '%(rpm1,rpm2,hp);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity gradient at the inner cylinder wall is 17.7 fps/ft and at the outer cylinder wall is 12.3 fps/ft\n",
+ "rpm = 28.1 and approximate rpm = 33.8, hp = 0.00134 \n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4 Page No : 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# variables\n",
+ "T = 70. \t\t#degreeF\n",
+ "del_p = 0.1;\t\t# in psi\n",
+ "sigma = 0.00498;\t\t# lb/ft\n",
+ "\n",
+ "# calculations \n",
+ "R = (sigma*2)/(del_p*144);\t\t#in ft\n",
+ "d = 12*2*R;\t\t# in inches\n",
+ "\n",
+ "# results \n",
+ "print 'Diameter of the droplet of water = %.4f in'%(d);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter of the droplet of water = 0.0166 in\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5 Page No : 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "l = 12.;\t\t# length of the cylinder\n",
+ "T = 150.;\t\t#temperature of water in degreeF\n",
+ "p1 = 14.52;\t\t#atmospheric pressure in psia\n",
+ "p2 = 3.72;\t\t#the pressure on the inside of the piston in psia\n",
+ "\n",
+ "# calculations \n",
+ "F = 0.25*(p1-p2)*math.pi*l**2;\t\t#Force on the piston in lb\n",
+ "\n",
+ "# results \n",
+ "print 'Minimum force on the piston to be applied is, F = %d lb'%(F);\n",
+ "\n",
+ "#incorrect answer given in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum force on the piston to be applied is, F = 1221 lb\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Fluid_Mechanics/ch10.ipynb b/Elementary_Fluid_Mechanics/ch10.ipynb
new file mode 100755
index 00000000..1f2ac4f3
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/ch10.ipynb
@@ -0,0 +1,291 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10 : Liquid Flow in Open Channels"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.1 Pageno : 353"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import *\n",
+ "\n",
+ "# variables\n",
+ "yo = Symbol(\"yo\")\n",
+ "A = 20*yo\n",
+ "P = 20 + 2*yo\n",
+ "Rh= 20*yo/(20+2*yo)\n",
+ "n = 0.017 # ft\n",
+ "\n",
+ "# calculations\n",
+ "ans = solve((1.49/n)*A*Rh**(2./3)*(0.0001)**(1./2) - 400) #*yo*Rh**(2./3)\n",
+ "\n",
+ "# result\n",
+ "print \"Yo = %.2f ft\"%ans[0]\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Yo = 8.32 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.2 pageno : 356"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# calculations\n",
+ "Rh = 20*8.34/(20+2*8.34)\n",
+ "\n",
+ "# result\n",
+ "print \"Rh = %.2f ft\"%Rh"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rh = 4.55 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.3 pageno : 362"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import *\n",
+ "\n",
+ "# variables\n",
+ "yo = Symbol(\"yo\")\n",
+ "n = 0.017 #ft 1/6\n",
+ "A = 2*yo**2\n",
+ "Rh = yo/2\n",
+ "\n",
+ "# Calculations\n",
+ "ans = solve((1.49/n)*A*Rh**(2./3) * (0.0001)**(1./2) - 400,yo)\n",
+ "Yo = ans[0]\n",
+ "B = 2*Yo\n",
+ "\n",
+ "#result\n",
+ "print \"Yo**(8/3) = %.f \"%(Yo**(8./3))\n",
+ "print \"Yo = %.2f ft \"%(Yo)\n",
+ "print \"B = %.2f ft \"%(B)\n",
+ "\n",
+ "# note : answer are slightly differenet because of solve method of sympy"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Yo**(8/3) = 362 \n",
+ "Yo = 9.11 ft \n",
+ "B = 18.22 ft \n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.4 Page no : 367"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "from sympy import Symbol, solve\n",
+ "\n",
+ "# variables\n",
+ "q = 500./40 # cfs/ft\n",
+ "ye = ((12.5)**2 / 32.2)**(1./3)\n",
+ "n = 0.017\n",
+ "So = Symbol(\"So\")\n",
+ "\n",
+ "# calculations\n",
+ "Sc = 32.2 * n**2 / (2.2 * ye**(1./3))\n",
+ "ans = solve((1.49/n)*160*(3.33)**(2./3)*So**(1./2) - 500)\n",
+ "So = ans[0]\n",
+ "\n",
+ "# result\n",
+ "print \"Sc = %.4f\"%Sc\n",
+ "print \"So = %f\"%So\n",
+ "print \"So is a mild slope since it is less than Se\"\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sc = 0.0035\n",
+ "So = 0.000256\n",
+ "So is a mild slope since it is less than Se\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.5 page no : 369"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import solve,Symbol\n",
+ "import math\n",
+ "\n",
+ "# variables\n",
+ "y = Symbol(\"y\")\n",
+ "A = 10*y + 2*y**2\n",
+ "n = 0.017\n",
+ "b = 10 + 4*y\n",
+ "P = 10 + 2*math.sqrt(5)*y\n",
+ "\n",
+ "# calculations\n",
+ "ans = solve(A**3/b *32.2/1000**2 - 1)\n",
+ "yo = ans[1]\n",
+ "Ae = 97.3 # sqft\n",
+ "be = 29.65 # ft\n",
+ "Rhe = Ae/32 # ft\n",
+ "Sc = 32.2*n**2/2.2 * (Ae/(be*Rhe**(4./3)))\n",
+ "\n",
+ "# result\n",
+ "print \"Yo = %.2f ft\"%yo\n",
+ "print \"Sc = %.5f\"%Sc"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Yo = 4.91 ft\n",
+ "Sc = 0.00315\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.6 page no : 373"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import Symbol,solve\n",
+ "\n",
+ "# variables\n",
+ "Q = round((1.49/0.015)*50*(50./20)**(2./3)*(0.001)**(1./2)) # cfs\n",
+ "E = 5.52 # ft\n",
+ "\n",
+ "# calculations and results\n",
+ "Ye = ((Q/10)**2/32.2)**(1./3)\n",
+ "Emin = 3 * Ye/2\n",
+ "\n",
+ "print \"Ye = %.2f ft\"%Ye\n",
+ "print \"Minimum height of hump : Emin = %.2f ft\"%Emin\n",
+ "\n",
+ "Ye = 2 * 5.52/3\n",
+ "b = Symbol(\"b\")\n",
+ "ans = solve( ( (289/b)**2 / 32.2 )**(1./3) - Ye)\n",
+ "b = ans[1]\n",
+ "\n",
+ "print \"Ye = %.2f ft\"%Ye\n",
+ "print \"Maximum width of contraction : b = %.1f ft\"%b"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ye = 2.96 ft\n",
+ "Minimum height of hump : Emin = 4.44 ft\n",
+ "Ye = 3.68 ft"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Maximum width of contraction : b = 7.2 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Fluid_Mechanics/ch11.ipynb b/Elementary_Fluid_Mechanics/ch11.ipynb
new file mode 100755
index 00000000..8703141c
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/ch11.ipynb
@@ -0,0 +1,247 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:0e31426ac89cda24a76ca914e9a6ea49437d729b6061fc8d885e61953cdd31e2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 11 : Fluid Measurements"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.1 Page No : 409"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "C_I = 0.98;\t\t#coefficient of pitot tube\n",
+ "d = 3.;\t\t#in\n",
+ "\n",
+ "# calculations \n",
+ "del_p = (d/12)*(13.55-0.88)/0.88;\n",
+ "v_c = C_I*math.sqrt(2*32.2*del_p);\n",
+ "\n",
+ "# results \n",
+ "print 'The velocity at the centerline of the pipe = %.1f fps'%(v_c);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity at the centerline of the pipe = 14.9 fps\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2 Page No : 411"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "P = 25.;\t\t#in. of mercury\n",
+ "p = 18.;\t\t#in. of mercury\n",
+ "T = 150.;\t\t#degreeF\n",
+ "\n",
+ "# calculations \n",
+ "k = P/p;\n",
+ "if k < (1.893) :\n",
+ " V = math.sqrt(2*32.2*186.5*(T+460)*(1-(1/k)**0.286));\n",
+ "\n",
+ "print 'The local velocity just upstream from the pitot static tube = %d fps'%(V);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The local velocity just upstream from the pitot static tube = 810 fps\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3 Page No : 411"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "P = 20.;\t\t#in. of mercury\n",
+ "p = 5.;\t\t#in. of mercury\n",
+ "T = 150.;\t\t#degreeF\n",
+ "\n",
+ "# calculations \n",
+ "k = P/p;\n",
+ "\n",
+ "if k >1.893:\n",
+ " M_0 = 1.645;\n",
+ "\n",
+ "V_0 = math.sqrt(2*32.2*186.5*(T+460)/(1+ (2*186.5)/(53.3*1.4*M_0**2)));\n",
+ "\n",
+ "print 'The speed of this airplane = %d fps'%(round(V_0,-1));\n",
+ "\n",
+ "\t\t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The speed of this airplane = 1600 fps\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.4 Page No : 420"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "b = 6.;\t\t#in\n",
+ "d = 3.;\t\t#in\n",
+ "p = 20.;\t\t#psi\n",
+ "del_p = 6.;\t\t#in. of mercury\n",
+ "p_bar = 14.70;\t\t#psia\n",
+ "T = 60.;\t\t#degreeF\n",
+ "\n",
+ "# calculations \n",
+ "k = (p + p_bar - b*(p_bar/29.92))/(p+p_bar);\n",
+ "gam1 = (p+p_bar)*144/53.3 /(T+460);\n",
+ "A2 = 0.0491;\t\t#sqft\n",
+ "Y = 0.949;\n",
+ "Cv = 0.98;\n",
+ "G = Y*Cv*A2*gam1*math.sqrt(2*32.2*b*10*A2*144/gam1) /(math.sqrt(1-0.25**2));\n",
+ "Cv_true = 0.981;\n",
+ "G_true = G*Cv_true/Cv;\n",
+ "\n",
+ "# results \n",
+ "print 'G = %.2f lb/sec'%(G);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "G = 3.31 lb/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.5 Page No : 422"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "d = 3.;\t\t#in\n",
+ "l = 6.;\t\t#in\n",
+ "h = 6.;\t\t#in\n",
+ "T = 60.;\t\t#degreeF\n",
+ "\n",
+ "# calculations \n",
+ "Cv= 0.99;\n",
+ "A1 = 0.25*math.pi*(d/12)**2;\n",
+ "Q = Cv*A1*math.sqrt(2*32.2*(h/12)*(13.55-1)) /(math.sqrt(1-0.25**2));\n",
+ "Cv_true = 0.988;\n",
+ "Q_true = Q*Cv_true/Cv;\n",
+ "h_L = 3.8;\n",
+ "\n",
+ "# results \n",
+ "print 'Q = %.3f cfs'%(Q);\n",
+ "print 'True Q = %.3f cfs'%(Q_true);\n",
+ "print 'Total head loss is about %.1f ft of water'%(h_L);\n",
+ "\n",
+ "#there are small errors in the answer given in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q = 1.009 cfs\n",
+ "True Q = 1.007 cfs\n",
+ "Total head loss is about 3.8 ft of water\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Fluid_Mechanics/ch12.ipynb b/Elementary_Fluid_Mechanics/ch12.ipynb
new file mode 100755
index 00000000..7e205823
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/ch12.ipynb
@@ -0,0 +1,65 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:3092cd2ae5a90e09126e9d647e026620efd1b57b1d7964dfe20aa5cd324764f3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12 : Elementary Hydrodynamics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12.1 Page No : 490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "Q = 0.00010;\t\t#cfs\n",
+ "t = 0.1;\t\t#ft\n",
+ "h = 3.;\t\t#ft\n",
+ "d = 6.;\t\t#in\n",
+ "\n",
+ "# calculations \n",
+ "K = Q*h/(t*0.25*math.pi*(d/12)**2);\n",
+ "\n",
+ "# results \n",
+ "print 'K = %.4f fps'%(K);\n",
+ "\n",
+ "\t\t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "K = 0.0153 fps\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Fluid_Mechanics/ch13.ipynb b/Elementary_Fluid_Mechanics/ch13.ipynb
new file mode 100755
index 00000000..99c09079
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/ch13.ipynb
@@ -0,0 +1,192 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:bd33818d3448353cd987bb363aa4b45c6fc5ac2971d0999934915bf83d11a9cd"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 13 : Fluid Flow about Immersed Objects"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.1 Page No : 502"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "b = 50.;\t\t#ft\n",
+ "c = 7.;\t\t #ft\n",
+ "CL = 0.6;\t\t#lift coefficient\n",
+ "CD = 0.05;\t\t#drag coefficient\n",
+ "alpha = 7.;\t\t#degrees\n",
+ "V = round(150/0.681818);\t\t#coverting mph to fps\n",
+ "H = 10000.;\t\t#ft\n",
+ "rho = 0.001756;\t\t#slug/cuft\n",
+ "\n",
+ "# calculations \n",
+ "D = CD*b*c*rho*0.5*V**2;\n",
+ "hp = D*V/550;\n",
+ "L = CL*b*c*rho*0.5*V**2;\n",
+ "mu = 3.534*10**-7;\t\t#lb-sec/sqft\n",
+ "R = V*c*rho/mu;\n",
+ "a = math.sqrt(1.4*32.2*53.3*(23.4+459.6));\n",
+ "M = V/a;\n",
+ "\n",
+ "# results \n",
+ "print 'hp = %.f hp, L = %.2f lb, R = %d, M = %.3f'%(hp,L,round(R,-4),M);\n",
+ "\n",
+ "# note : answer is different because of rounding off error"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "hp = 297 hp, L = 8923.99 lb, R = 7650000, M = 0.204\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.2 Page No : 511"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "l = 5.;\t\t#ft\n",
+ "d = 0.5;\t\t#ft\n",
+ "v = 1.;\t\t#fps\n",
+ "T = 60.;\t\t#degreeF\n",
+ "D = 0.04;\t\t#lb\n",
+ "k = 1./64;\t\t#model scale\n",
+ "\n",
+ "# calculations \n",
+ "nu = 0.00001217;\n",
+ "R = round(v*l/nu,-4);\n",
+ "Cf1 = 0.0020;\n",
+ "Cf2 = 0.0052;\n",
+ "Dx1 = round(2*Cf1*l*d*1.938*0.5*v**2,4);\n",
+ "Dx2 = round(2*Cf2*l*d*1.938*0.5*v**2,3) \n",
+ "delta1 = round(l*5.20/math.sqrt(R),2);\n",
+ "delta2 = l*0.38/(R**0.2);\n",
+ "V_0 = math.sqrt((v**2 /l)*(l*(1/k)));\n",
+ "R_p = V_0*l*(1/k)/nu;\n",
+ "Cf = 0.00185;\n",
+ "Dx = 2*Cf*l*d*(1/k)**2 *1.938*0.5*V_0**2;\n",
+ "Dw = D-Dx2;\n",
+ "Dw_p = (1/k)**2 *d*l*V_0**2 *Dw/(l*d);\n",
+ "D = round(Dw_p + Dx,-1);\n",
+ "\n",
+ "# results \n",
+ "print 'Total drag of the prototype = %d lb'%(D);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total drag of the prototype = 6280 lb\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13.3 Page No : 524"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "c = 6.;\t\t#ft\n",
+ "b = 36.;\t\t#ft\n",
+ "AR1 = 6.;\t\t#aspect ratio\n",
+ "Cd = 0.0543;\t\t#drag coefficient\n",
+ "Cl = 0.960;\t\t#lift coefficient\n",
+ "alpha1 = 7.2;\t\t#degrees\n",
+ "AR2 = 8.;\n",
+ "\n",
+ "# calculations \n",
+ "#for aspect ratio = 8\n",
+ "CL = 0.960;\t\t#negligible change of lift coefficient\n",
+ "#for aspect ratio = 6\n",
+ "C_Di = Cl**2 /(math.pi*AR1);\n",
+ "#for aspect ratio = infinity\n",
+ "C_D0 = Cd - C_Di;\n",
+ "#for AR = 8\n",
+ "C_D = C_D0 + Cl**2 /(math.pi*AR2);\n",
+ "#for AR = 6\n",
+ "alpha_i = (180/math.pi)*Cl/(math.pi*AR1);\n",
+ "#for AR = infinty\n",
+ "alpha_0 = alpha1 - alpha_i;\n",
+ "#for AR = 8\n",
+ "alpha = alpha_0 + Cl/(AR2*math.pi) *(360/(2*math.pi));\n",
+ "\n",
+ "# results \n",
+ "print 'Lift coefficient = %.3f (negligible change of lift coefficient)'%(CL); #incorrect answer in the textbook\n",
+ "print 'Drag coefficient = %.4f'%(C_D);\n",
+ "print 'Angle of attack = %.1f degress'%(alpha);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Lift coefficient = 0.960 (negligible change of lift coefficient)\n",
+ "Drag coefficient = 0.0421\n",
+ "Angle of attack = 6.5 degress\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Fluid_Mechanics/ch2.ipynb b/Elementary_Fluid_Mechanics/ch2.ipynb
new file mode 100755
index 00000000..5fbe2709
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/ch2.ipynb
@@ -0,0 +1,505 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:fae9d4c3d571f5f27d1259174500abbced27ed669ce1d759f1518557eb996672"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2 : Fluid Statics"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1 Page No : 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "# variables\t\t\n",
+ "T = 68;\t\t#degreeF\n",
+ "p = 10;\t\t# psi\n",
+ "d = 15;\t\t# feet\n",
+ "rho = 1.59;\t\t#specific gravity\n",
+ "\n",
+ "# calculations \n",
+ "gam = rho*62.4;\t\t#lb/cuft\n",
+ "p1 = gam*d + p*144;\t\t#psf\n",
+ "\n",
+ "# results \n",
+ "print 'p1 = %d psf = %.1f psi '%(p1,p1*0.00694);\n",
+ "\n",
+ "#incorrect answer given in the textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "p1 = 2928 psf = 20.3 psi \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2 Page No : 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# variables\t\t\n",
+ "h = 35000;\t\t# feet\n",
+ "p1 = 14.7;\t\t# psia\n",
+ "T1 = 519;\t\t# degreeR\n",
+ "gam1 = 0.0765;\t\t# lb/cuft\n",
+ "p2 = 504;\t\t# psfa\n",
+ "\n",
+ "# calculations \n",
+ "T2 = T1 - h*0.00356;\t\t# degreeR\n",
+ "gam2 = p2/(53.3*T2);\t\t# lb/cuft\n",
+ "\n",
+ "# results \n",
+ "print 'p2 = %d psfa = %.2f psia \\nspecific weight = %.3f lb/cuft'%(p2,p2*0.00695,gam2);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "p2 = 504 psfa = 3.50 psia \n",
+ "specific weight = 0.024 lb/cuft\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3 Page No : 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\t\t\n",
+ "# variables\n",
+ "h1 = 12.5;\t\t# inches\n",
+ "p1 = 14.50;\t\t# psia\n",
+ "\n",
+ "# calculations \n",
+ "p = p1 - h1*(14.70/29.92);\t\t#absolute pressure in psia\n",
+ "\n",
+ "# results \n",
+ "print 'Absolute pressure = %.2f psia'%(p);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Absolute pressure = 8.36 psia\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4 Page No : 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# variables\t\t\n",
+ "gam1 = 0.9*62.4;\n",
+ "gam2 = 13.55*62.4;\n",
+ "l1 = 10;\t\t# feet\n",
+ "l2 = 15./12;\t\t# feet\n",
+ "\n",
+ "# calculations \n",
+ "p_x = gam2*l2 - gam1*l1;\t\t# psf\n",
+ "\n",
+ "# results \n",
+ "print 'The gauge reading = %d psf = %.2f psi'%(p_x,0.00694*p_x);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The gauge reading = 495 psf = 3.44 psi\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5 Page No : 42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\t\t\n",
+ "# variables \n",
+ "l1 = 4.;\t\t# feet\n",
+ "b1 = 6.;\t\t# feet\n",
+ "b2 = 6.;\t\t# feet\n",
+ "l2 = 2.55;\t\t# feet\n",
+ "t = 1.; \t\t# feet\n",
+ "\n",
+ "# calculations \n",
+ "F1 = 0.5*l1*b1*62.4*(0.5*l1 + t) ;\t\t# lb\n",
+ "F2 = 0.25*math.pi*b2**2 *62.4*(l2 + t);\t\t# lb\n",
+ "a1 = l1*b2**3 /(36*0.5*b2*0.5*l1*b1);\t\t# feet\n",
+ "a2 = 70/((0.5*l2 + t)*28.3);\t\t# feet\n",
+ "l_p = (F1*(0.5*l1 + a1)+F2*(l2+a2))/(F1+F2) +1;\t\t#feet\n",
+ "x_p1 = (0.5*l1-a1) - a1*2/b2;\t\t# feet\n",
+ "\n",
+ "def f2(y): \n",
+ "\t return (62.4/2)*(36-y**2)*(y+1)\n",
+ "\n",
+ "M = quad(f2,0,6)[0]\n",
+ "\n",
+ "x_p2 = M/F2;\t\t# feet\n",
+ "x_p = (x_p2*F2 - F1*x_p1)/(F1+F2);\t\t# feet\n",
+ "\n",
+ "# results \n",
+ "print 'Total force on composite area is %d lb'%(F1+F2); \n",
+ "print ' Vertical location of resultant force is %.2f ft below the water surface'%(l_p);\n",
+ "print ' Horizontal location of resultant force is %.3f ft right of the water surface'%(x_p);\n",
+ "\n",
+ "#incorrect answer given in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total force on composite area is 8509 lb\n",
+ " Vertical location of resultant force is 4.38 ft below the water surface\n",
+ " Horizontal location of resultant force is 1.423 ft right of the water surface\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6 Page No : 45"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import numpy\n",
+ "\t\t\n",
+ "# variables\n",
+ "l = 8.; \t\t#feet\n",
+ "b = 10.;\t \t# feet\n",
+ "\n",
+ "# calculations \n",
+ "F_h = 0.5*l*b*62.4*(b+2.5);\t\t# lb\n",
+ "x = 83.2/(40*(b+2.5));\t\t# feet\n",
+ "F_v = (b+5)*62.4*40-(l*62.4*(25 - 0.25*math.pi*25));\t\t# lb\n",
+ "F = math.sqrt(F_h**2 + F_v**2);\t\t# lb\n",
+ "e = (2680*3.91 + 37440*(0.25*b))/F_v ;\t\t# feet\n",
+ "theta = 180*numpy.arctan(F_v/F_h) /math.pi;\t\t# degrees\n",
+ "x_p = 0.25*b-x;\t\t# feet\n",
+ "\n",
+ "# results \n",
+ "print 'Magnitude of resultant force is %d lb'%(F);\n",
+ "print 'Theta = %d degrees'%(theta);\n",
+ "print 'Location is %.3f feet above and %.2f feet to the right of B'%(x_p,e);\n",
+ "\n",
+ "#there are errors in the answer given in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Magnitude of resultant force is 46709 lb\n",
+ "Theta = 48 degrees\n",
+ "Location is 2.334 feet above and 2.99 feet to the right of B\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7 Page No : 48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "# variables\n",
+ "A = 4000.;\t\t# sq.ft\n",
+ "d1 = 10.;\t\t# feet\n",
+ "d2 = 2.;\t\t# inches\n",
+ "rho = 64.;\t\t# lb/cuft\n",
+ "\n",
+ "# calculations \n",
+ "W = A*(d2/12)*rho;\t\t# lb\n",
+ "\n",
+ "# results \n",
+ "print 'Weight of cargo = %d lb'%(round(W,-2));\n",
+ "\n",
+ "\t\t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Weight of cargo = 42700 lb\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8 Page No : 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "gam = 53.0;\t\t# lb/cuft\n",
+ "D = 17.;\t\t# inches\n",
+ "d = 12.;\t\t# inches\n",
+ "\n",
+ "# calculations \n",
+ "V = (math.pi/6)*(D/d)**3;\n",
+ "V1 = 0.584;\t\t#cuft\n",
+ "V2 = 0.711;\t\t#cuft\n",
+ "W = V*gam;\n",
+ "F_B = V1*62.4;\n",
+ "F_ACA = (V2)*62.4;\n",
+ "F = W+F_ACA-F_B;\n",
+ "\n",
+ "# results \n",
+ "print 'The force exerted between sphere and orfice plate = %.1f lb'%(F);\n",
+ "\n",
+ "#incorrect answer for W in textbook. Hence the answer differs"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The force exerted between sphere and orfice plate = 86.8 lb\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9 Page No : 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# variables\n",
+ "v = 15;\t\t# ft/sec**2\n",
+ "d = 5;\t\t# ft\n",
+ "\n",
+ "# calculations \n",
+ "def f3(z): \n",
+ "\t return -62.4*(v+32.2)/32.2\n",
+ "\n",
+ "p = quad(f3,0,-5)[0]\n",
+ "\n",
+ "# results \n",
+ "print 'p = %d psf'%(p);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "p = 457 psf\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.10 Page No : 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\n",
+ "# variables\n",
+ "m = -0.229;\t\t#slope\n",
+ "a_z = 1.96;\t\t# ft/sec**2\n",
+ "a_x = 4*a_z;\t\t# ft/sec**2\n",
+ "a = math.sqrt(a_x**2 + a_z**2);\t\t# ft/sec**2\n",
+ "\n",
+ "def f1(z): \n",
+ "\t return -(32.2 + a_z)*(62.4/32.2)\n",
+ "\n",
+ "p = quad(f1,0,-2.75)[0]\n",
+ "\n",
+ "# results \n",
+ "print 'p = %.1f psf'%(p);\n",
+ "\n",
+ "#there is an error in the answer given in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "p = 182.0 psf\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.11 Page No : 54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "l1 = 2.;\t\t# feet\n",
+ "l2 = 3.;\t\t# feet\n",
+ "rpm = 100;\n",
+ "\n",
+ "# calculations \n",
+ "p_A = (l1+l2)-(2./3)*(2*math.pi*rpm/60)**2 /(2*32.2);\n",
+ "p_B = (l1+l2)+(1./3)*(2*math.pi*rpm/60)**2 /(2*32.2);\n",
+ "\n",
+ "# results \n",
+ "print 'Pressure heads at point A and point B ae %.2f ft and %.2ft ft respectively'%(p_A,p_B);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure heads at point A and point B ae 3.86 ft and 5.57t ft respectively\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Fluid_Mechanics/ch3.ipynb b/Elementary_Fluid_Mechanics/ch3.ipynb
new file mode 100755
index 00000000..eeb66d6e
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/ch3.ipynb
@@ -0,0 +1,250 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:78fe20b770d35c2d23108a58f50bb1579f3cddf4dfa3efb233fab2fa5b1b32cd"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3 : Kinematics of Fluid Motion"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1 Page No : 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "v_mag = 3.;\n",
+ "x = 8.;\n",
+ "y = 6.;\n",
+ "\n",
+ "# calculations \n",
+ "s = math.sqrt(x**2 + y**2);\n",
+ "v = v_mag*s;\t\t# fps\n",
+ "a_t = v_mag*s*v_mag;\t\t# ft/sec**2\n",
+ "a_r = 0;\n",
+ "a = math.sqrt(a_r**2 + a_t**2);\n",
+ "\n",
+ "# results \n",
+ "print 'v = %d fps a = %d ft/sec**2'%(v,a);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "v = 30 fps a = 90 ft/sec**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2 Page No : 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "v = 5;\t\t# fps\n",
+ "a_t = 0;\n",
+ "\n",
+ "# calculations \n",
+ "a_r = v**2 /2.;\t\t# ft/sec**2\n",
+ "\n",
+ "# results \n",
+ "print 'Radial component of acceleration = %.1f ft/sec**2 \\nTangential component of acceleration = %d '%(a_r,a_t);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Radial component of acceleration = 12.5 ft/sec**2 \n",
+ "Tangential component of acceleration = 0 \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3 Page No : 85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\t\t\n",
+ "v = 5.;\t\t# fps\n",
+ "r = 2.;\n",
+ "theta = 60.;\t\t# degrees\n",
+ "x = 1.;\n",
+ "y = math.sqrt(3);\n",
+ "v_t = v;\n",
+ "v_r = 0;\n",
+ "\n",
+ "# calculations \n",
+ "u = -v*y/(math.sqrt(x**2 + y**2));\n",
+ "v = v*x/(math.sqrt(x**2 + y**2));\n",
+ "a_x = -50*x/8;\n",
+ "a_y = -50*y/8;\n",
+ "a_r = -v_t**2 /r;\n",
+ "a_t = v_r*v_t/r;\n",
+ "\n",
+ "# results \n",
+ "print 'u = %.2f fps, v = %.2f fps'%(u,v);\n",
+ "print ' v_r = %d, v_t = %d fps'%(v_r,v_t);\n",
+ "print ' a_x = %.2f ft/sec**2, a_y = %.2f ft/sec**2'%(a_x,a_y);\n",
+ "print ' a_r = %.1f ft/sec**2, a_t = %d'%(a_r,a_t);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "u = -4.33 fps, v = 2.50 fps\n",
+ " v_r = 0, v_t = 5 fps\n",
+ " a_x = -6.25 ft/sec**2, a_y = -10.83 ft/sec**2\n",
+ " a_r = -12.5 ft/sec**2, a_t = 0\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4 Page No : 88"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "w = 600.;\t\t# pounds\n",
+ "l1 = 12.;\t\t#inches\n",
+ "l2 = 8.;\t\t#inches\n",
+ "\n",
+ "# calculations \n",
+ "Q = w/(62.4);\n",
+ "V_12 = Q/(0.25*math.pi*(l1/12)**2);\n",
+ "V_8 = Q/(0.25*math.pi*(l2/12)**2);\n",
+ "\n",
+ "# results \n",
+ "print 'Q = %.2f cfs'%(Q);\n",
+ "print 'V_12 = %.2f fps and V_8 = %.2f fps'%(V_12,V_8);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q = 9.62 cfs\n",
+ "V_12 = 12.24 fps and V_8 = 27.55 fps\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5 Page No : 89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "l = 12.;\t\t# inches\n",
+ "W = 6.;\t\t# pounds\n",
+ "w = 0.0624\t\t# lb/cuft\n",
+ "l1 = 8.;\t\t# inches\n",
+ "rho = 0.050;\t\t# lb/cuft\n",
+ "\n",
+ "# calculations \n",
+ "Q_12 = W/w ;\n",
+ "Q_8 = W/rho ;\n",
+ "V_12 = Q_12/(0.25*math.pi*(l/12)**2);\n",
+ "V_8 = Q_8/(0.25*math.pi*(l1/12)**2);\n",
+ "\n",
+ "# results \n",
+ "print 'Q_12 = %.1f cfs, Q_8 = %d cfs'%(Q_12,Q_8);\n",
+ "print ' V_12 = %.1f fps, V_8 = %.f fps'%(V_12,V_8);\n",
+ "\n",
+ "\t\t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q_12 = 96.2 cfs, Q_8 = 120 cfs\n",
+ " V_12 = 122.4 fps, V_8 = 344 fps\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Fluid_Mechanics/ch4.ipynb b/Elementary_Fluid_Mechanics/ch4.ipynb
new file mode 100755
index 00000000..16e36170
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/ch4.ipynb
@@ -0,0 +1,491 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:a6ceb1d5d0407522d73c0769aac7029af109171f45086c52eac4f70c895f07f9"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4 : Flow of an Incompressible Ideal Fluid"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1 Page No : 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "d = 4.;\t\t #feet\n",
+ "theta = 30.;\t\t# degrees\n",
+ "p_C = 5. \t\t# psi\n",
+ "\n",
+ "# calculations \n",
+ "p_A = p_C-(62.4/144)*math.cos(theta*math.pi/180) *2;\n",
+ "p_B = p_C+(62.4/144)*math.cos(theta*math.pi/180) *2;\n",
+ "h = p_C*144/62.4;\n",
+ "\n",
+ "# results \n",
+ "print 'The static pressures at A and B are %.2f psi and %.2f psi respectively.'%(p_A,p_B);\n",
+ "print 'The hydraulic grade line is %.2f ft vertically above C'%(h);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The static pressures at A and B are 4.25 psi and 5.75 psi respectively.\n",
+ "The hydraulic grade line is 11.54 ft vertically above C\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2 Page No : 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables \n",
+ "h = 100.;\t\t#ft\n",
+ "d1 = 5.;\t\t#in\n",
+ "d2 = 8.;\t\t#in\n",
+ "h1 = 60.;\t\t# ft\n",
+ "h2 = 10.;\t\t#ft\n",
+ "h3 = 40.;\t\t#ft\n",
+ "h4 = 102.;\t\t#ft\n",
+ "H = 300.;\t\t#ft\n",
+ "theta = 30.;\t\t#degrees\n",
+ "gam = 0.43;\n",
+ "\n",
+ "# calculations \n",
+ "V5 = math.sqrt(h*2*32.2);\n",
+ "Q = V5*0.25*math.pi*(d1/12)**2;\n",
+ "V1 = (d1/12)**4 *h;\n",
+ "V2 = h*(d1/d2)**4;\n",
+ "p1 = (h1-V1)*gam;\n",
+ "p2 = -(h2-V2)*2.04*gam;\n",
+ "p3 = (h3-V1)*gam;\n",
+ "p4 = (h4-V1)*gam;\n",
+ "V6 = V5*math.cos(theta*math.pi/180);\n",
+ "e = H - (V6**2)/(2*32.2);\n",
+ "\n",
+ "# results \n",
+ "print 'p1 = %.1f psi, p2 = %.1f in. of Hg vacuum, p3 = %.f psi and p4 = %.1f psi'%(p1,p2,p3,p4);\n",
+ "print 'elevation = %.1f ft'%(e);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "p1 = 24.5 psi, p2 = 4.6 in. of Hg vacuum, p3 = 16 psi and p4 = 42.6 psi\n",
+ "elevation = 225.0 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3 Page No : 107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables \n",
+ "p = 14.;\t\t#psia\n",
+ "gam = 62.;\t\t#lb/cuft\n",
+ "l1 = 35.;\t\t# ft\n",
+ "l2 = 10.;\t\t# ft\n",
+ "d = 6.; \t\t#in\n",
+ "\n",
+ "# calculations \n",
+ "p_v = 2.2*gam;\n",
+ "p_B = p*144;\n",
+ "k_c = l1-l2+(p_B/gam)-(p_v/gam);\n",
+ "K6 = l1;\n",
+ "d_c = d*(K6/k_c)**0.25;\n",
+ "\n",
+ "# results \n",
+ "print 'd = %.2f in'%(d_c);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "d = 5.35 in\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4 Page No : 108"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "rho = 0.00238;\t\t#slug/cuft\n",
+ "h = 6. \t\t#in\n",
+ "\n",
+ "# calculations \n",
+ "V_0 = math.sqrt(2*(h/12)*(62.4 - rho*32.2)/rho);\n",
+ "\n",
+ "# results \n",
+ "print 'The velocity of the air stream = %.f fps'%(V_0);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The velocity of the air stream = 162 fps\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5 Page No : 110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "sg = 0.82;\n",
+ "p1 = 20.;\t\t#psia\n",
+ "p2 = 10.;\t\t#psia\n",
+ "d1 = 6.;\t\t#in\n",
+ "d2 = 12.;\t\t#in\n",
+ "del_z = 4.;\t\t#ft\n",
+ "d = 18.7;\t\t#in\n",
+ "\n",
+ "# calculations \n",
+ "h1 = (p1-p2)*144/(sg*62.4) - del_z;\n",
+ "A1 = 0.25*math.pi*(d1/12)**2;\n",
+ "A2 = 0.25*math.pi*(d2/12)**2;\n",
+ "V2 = math.sqrt(-2*h1*32.2/(1-(A2/A1)**2));\n",
+ "V1 = (A2/A1)*V2;\n",
+ "Q = A1*V1;\n",
+ "\n",
+ "# results \n",
+ "print 'Flow rate = %.2f cfs'%(Q);\n",
+ "\n",
+ "#there is a small error in the answer given in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Flow rate = 8.00 cfs\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6 Page No : 112"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "e1 = 100.; \t\t#ft\n",
+ "theta = 60.;\t\t#degrees\n",
+ "e2 = 98.5;\t \t#ft\n",
+ "V_s2 = 20.;\t \t#fps\n",
+ "e3 = 95.;\t \t#ft\n",
+ "\n",
+ "# calculations \n",
+ "t2 = (e1-e2)/math.cos(theta*math.pi/180);\n",
+ "p2 = 3*62.4*math.cos(theta*math.pi/180);\n",
+ "V_F2 = math.sqrt((e1 + (V_s2**2 /(2*32.2)) - p2/62.4 -e2)*2*32.2);\n",
+ "q = 3*1*V_s2;\n",
+ "y = 11.22;\t\t#ft\n",
+ "y1 = 10.74;\t\t#ft\n",
+ "V1 = math.sqrt((y-y1)*2*32.2);\n",
+ "\n",
+ "# results \n",
+ "print 'On spillway: Pressure = %.1f psf , velocity = %d fps' %(p2,V_F2);\n",
+ "print 'In the approach channel: Depth = %.2f ft, V1 = %.1f fps'%(y1,V1);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "On spillway: Pressure = 93.6 psf , velocity = 20 fps\n",
+ "In the approach channel: Depth = 10.74 ft, V1 = 5.6 fps\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7 Page No : 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "d = 10.;\t\t# in\n",
+ "p = 40.;\t\t#psi\n",
+ "G = 5.;\t\t#cfs\n",
+ "y1 = 92.4;\t\t#ft\n",
+ "k1 = -11.3;\t\t#ft\n",
+ "k2 = 92.4;\t\t#ft\n",
+ "k3 = 3.2;\t\t#ft\n",
+ "k4 = 10.1;\t\t#ft\n",
+ "\n",
+ "# calculations \n",
+ "E_p = k4+y1+d-k1-k3;\n",
+ "hp = G*62.4*E_p/550;\n",
+ "\n",
+ "# results \n",
+ "print 'Pump horsepower = %.1f hp'%(hp);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pump horsepower = 68.4 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.9 Page No : 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "sw = 20.;\t\t# specific weight in lb/cuft\n",
+ "p_B = 6.;\t\t#psi\n",
+ "p_A = 2.;\t\t#psi\n",
+ "L = 17.28;\t\t#ft\n",
+ "l = 10.;\t\t#ft\n",
+ "\n",
+ "# calculations \n",
+ "V_A = math.sqrt(2*32.2*((p_B-p_A)*144/50 - l));\n",
+ "\n",
+ "# results \n",
+ "print 'The mean velocity = %.2f fps'%(V_A);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The mean velocity = 9.89 fps\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.11 Page No : 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "D = 6.;\t\t#in\n",
+ "v = 100.;\t#fps\n",
+ "p = 0.;\t\t#psi\n",
+ "gam = 0.08;\t#specific weight in lb/cuft\n",
+ "R = 6.;\t\t#in\n",
+ "theta = 60.;\t\t#degrees\n",
+ "\n",
+ "# calculations \n",
+ "v_r = v*(1-(0.5*D/R)**2)*math.cos(theta*math.pi/180);\n",
+ "v_t = -v*(1+(0.5*D/R)**2)*math.sin(theta*math.pi/180);\n",
+ "V = math.sqrt(v_r**2 + v_t**2);\n",
+ "p = ((v**2 /(2*32.2)) - (V**2 /(2*32.2)) - (math.cos(theta*math.pi/180)*math.sin(theta*math.pi/180)))*gam;\n",
+ "\n",
+ "# results \n",
+ "print 'Velocity = %.1f fps Pressure = %.2f psf'%(V,p);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity = 114.6 fps Pressure = -3.92 psf\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.12 Page No : 127"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "from scipy.integrate import quad \n",
+ "\t\t\n",
+ "# variables\n",
+ "p_A = 0;\n",
+ "p_B = 0;\n",
+ "p_C = 0;\n",
+ "p_D = 0;\n",
+ "#velocity heads\n",
+ "V1 = 15.28;\t\t#fps\n",
+ "V2 = 16.78;\t\t#fps\n",
+ "V3 = 15.50;\t\t#fps\n",
+ "V4 = 16.50;\t\t#fps\n",
+ "\n",
+ "# calculations \n",
+ "def f0(h): \n",
+ "\t return h**(1./2)\n",
+ "\n",
+ "\n",
+ "q = math.sqrt(2*32.2)* quad(f0,3.771,4.229)[0]\n",
+ "\n",
+ "# results \n",
+ "print 'V_A = %.2f fps, V_B = %.2f fps, V_C = %.2f fps, V_D = %.2f fps'%(V1,V2,V3,V4);\n",
+ "print 'Flow rate = %.2f cfs/ft'%(q);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V_A = 15.28 fps, V_B = 16.78 fps, V_C = 15.50 fps, V_D = 16.50 fps\n",
+ "Flow rate = 7.35 cfs/ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Fluid_Mechanics/ch5.ipynb b/Elementary_Fluid_Mechanics/ch5.ipynb
new file mode 100755
index 00000000..ecbe1153
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/ch5.ipynb
@@ -0,0 +1,364 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f32ce99f1a0136b5cca3224fda443fb508c92875ffc981f9eb147519b1c553ca"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5 : Flow of a Compressible Ideal Fluid"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1 Page No : 152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\n",
+ "\n",
+ "# variables\n",
+ "v1 = 100.;\t\t# fps\n",
+ "p1 = 50.;\t\t# psia\n",
+ "T1 = 300.;\t\t# degreeF\n",
+ "v2 = 500.;\t\t# fps\n",
+ "Cp = 186.5;\n",
+ "gam = 1.4;\n",
+ "\n",
+ "# calculations \n",
+ "T2 = T1 - (v2**2 - v1**2)/(2*36.2*Cp);\n",
+ "p2 = p1*(1 - (v2**2 - v1**2)/(2*36.2*53.3*(T1+460)*(gam/(gam-1))))**(1/0.286);\n",
+ "\n",
+ "# results \n",
+ "print 'T2 = %d degreeF'%(round(T2,-1));\n",
+ "print 'p2 = %.1f psia'%(p2);\n",
+ "\n",
+ "#there is an error in the answer given in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "T2 = 280 degreeF\n",
+ "p2 = 46.0 psia\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2 Page No : 153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "p1 = 300.;\t\t# psia\n",
+ "T1 = 900.;\t\t# degreeF\n",
+ "p2 = 200.;\t\t# psia\n",
+ "T2 = 780.;\t\t# degreeF\n",
+ "H2 = 1414.;\t\t#Btu/lb\n",
+ "H1 = 1471.;\t\t# Btu/lb\n",
+ "\n",
+ "# calculations \n",
+ "V2 = math.sqrt(2*31.1*778*(H1-H2));\n",
+ "\n",
+ "# results \n",
+ "print 'T2 = %d degreeF and V2 = %d fps'%(T2,V2);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "T2 = 780 degreeF and V2 = 1660 fps\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3 Page No : 155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "v = 586.;\t\t# fps\n",
+ "p = 13.;\t\t# psia\n",
+ "T = 0.;\t\t# degreeF\n",
+ "gam = 1.4;\n",
+ "\n",
+ "# calculations \n",
+ "rho_0 = p*144/(32.2*53.3*(460+T));\n",
+ "a_0 = math.sqrt(gam*32.2*53.3*(T+460));\n",
+ "M_0 = v/a_0;\n",
+ "p_8_approx = p+(0.5/144)*rho_0*v**2 *(1+0.25*M_0**2);\n",
+ "p_8_exact = p*(1+M_0**2 *(gam-1)/2)**(gam/(gam-1));\n",
+ "T_8 = v**2 /(2*32.2*186.5) +460;\n",
+ "rho_8 = p_8_exact*144/(T_8*32.2*53.3);\n",
+ "\n",
+ "# results \n",
+ "print 'At stagnetion point, p = %.2f psia, T = %.1f degreeR and density = %.5f slug/cuft'%(p_8_exact,T_8,rho_8);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At stagnetion point, p = 16.05 psia, T = 488.6 degreeR and density = 0.00276 slug/cuft\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4 pageno : 159"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# variables\n",
+ "g = 32.2\n",
+ "k = 1.40\n",
+ "R = 53.3\n",
+ "A2 = 0.005454\n",
+ "p1 = 114.7 * 144\n",
+ "T1 = 560\n",
+ "\n",
+ "# calculations\n",
+ "y1 = p1 /(R * T1)\n",
+ "p2 = 0.528 * 114.7\n",
+ "G1 = math.sqrt(g*k/R * (2/(k+1))**((k+1)/(k-1))) * A2*p1/math.sqrt(T1)\n",
+ "\n",
+ "p2 = 94.7 # psia\n",
+ "p2byp1 = 0.825\n",
+ "G = A2*math.sqrt( (2*g*k)/(k-1) * p1*y1 * ((p2byp1)**(2/k) - (p2byp1)**((k+1)/k)))\n",
+ "# result\n",
+ "print \"part a\"\n",
+ "print \"G = %.2f lb/sec\"%G1\n",
+ "print \"\\npart b\"\n",
+ "print \"G = %.2f lb/sec\"%G"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "part a\n",
+ "G = 2.03 lb/sec\n",
+ "\n",
+ "part b\n",
+ "G = 1.58 lb/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5 Page No : 161"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "d = 1.;\t\t # in\n",
+ "p = 100.;\t\t# psi\n",
+ "T = 10.;\t\t# degreeF\n",
+ "p_i = 80.;\t\t#psi\n",
+ "p_b = 14.7;\t\t#psi\n",
+ "p1 = 16520.;\t# psfa\n",
+ "gam1 = 0.553;\t# lb/cuft\n",
+ "k = 0.874;\n",
+ "\n",
+ "# calculations \n",
+ "G = (0.5*k*0.25*math.pi*(d/12)**2 /(1-(2./3)**4)) *math.sqrt(2*32.2*(p-p_i)*144/gam1);\n",
+ "\n",
+ "# results \n",
+ "print 'flow rate = %.2f lb/sec'%(G);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "flow rate = 1.72 lb/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6 Page No : 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\t\t\n",
+ "d = 1.;\t\t# in\n",
+ "p_r = 100.;\t\t#psi\n",
+ "T_r = 100.;\t\t# degreeF\n",
+ "p_b = 14.7;\t\t# psi\n",
+ "p3 = 14.7;\t\t#psi\n",
+ "G = 2.03;\t\t# lb/sec\n",
+ "gam1 = 0.553;\n",
+ "gam = 1.4;\n",
+ "\n",
+ "# calculations \n",
+ "V3 = math.sqrt(2*32.2*(gam/(gam-1))*(p_r+p_b)*144/gam1 *(1-(p3/(p_r+p_b))**((gam-1)/gam)));\n",
+ "T3 = (T_r+460) - V3**2 /(2*32.2*186.5);\n",
+ "a3 = math.sqrt(gam*32.2*53.3*T3);\n",
+ "M3 = V3/a3;\n",
+ "A3 = G/(gam1*V3);\n",
+ "d3 = (A3/(0.25*math.pi))**(1./2);\n",
+ "p3_dash = 103.3;\t\t# psia\n",
+ "p_B = p3*(1+ (2*gam/(gam+1))*(M3**2 -1));\n",
+ "\n",
+ "# results \n",
+ "print 'V3 = %d fps, a3 = %d fps, M3 = %.2f '%(V3,a3,M3);\n",
+ "print 'p3_dash = %.1f psia, p_B = %.1f psia'%(p3_dash,p_B);\n",
+ "\n",
+ "#there are rounding-off errors in the answer given in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V3 = 1728 fps, a3 = 864 fps, M3 = 2.00 \n",
+ "p3_dash = 103.3 psia, p_B = 66.1 psia\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7 Page No : 166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "V_0 = 586.;\t\t# fps\n",
+ "t_0 = 0;\t\t# degreeF\n",
+ "P_0 = 13.;\t\t# psia\n",
+ "a_0 = 1052.;\t\t# fps\n",
+ "M_0 = 0.557;\n",
+ "V_A = 800.;\t\t#fps\n",
+ "V_B = 900.;\t\t#fps\n",
+ "gam = 1.4;\n",
+ "\n",
+ "# calculations \n",
+ "T_A = 488.5- V_A**2 /(2*32.2*186.5);\n",
+ "T_B = 488.5- V_B**2 /(2*32.2*186.5); \n",
+ "p_A = 16.18*(T_A/488.5)**(gam/(gam-1));\n",
+ "p_B = 16.18*(T_B/488.5)**(gam/(gam-1));\n",
+ "a_A = math.sqrt(gam*32.2*53.3*T_A);\n",
+ "a_B = math.sqrt(gam*32.2*53.3*T_B);\n",
+ "M_A = V_A/a_A;\n",
+ "M_B = V_B/a_B;\n",
+ "\n",
+ "# results \n",
+ "print 'At point A, p = %.2f psia, T = %.1f degreeR, a = %d fps, M = %.3f'%(p_A,T_A,a_A,M_A);\n",
+ "print 'At point B, p = %.2f psia, T = %.1f degreeR, a = %d fps, M = %.1f'%(p_B,T_B,a_B,M_B);\n",
+ "\n",
+ "#answer differs due to rounding-off errors in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At point A, p = 10.80 psia, T = 435.2 degreeR, a = 1022 fps, M = 0.782\n",
+ "At point B, p = 9.62 psia, T = 421.1 degreeR, a = 1005 fps, M = 0.9\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Fluid_Mechanics/ch6.ipynb b/Elementary_Fluid_Mechanics/ch6.ipynb
new file mode 100755
index 00000000..9b793271
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/ch6.ipynb
@@ -0,0 +1,622 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:8c235771f8d92166381a73459d7317269e7af4580e65930e8ce9765659a9e720"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6 : The Impulse Momentum Principle"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1 Page No : 176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "G = 10.;\t\t#cfs\n",
+ "d1 = 12.;\t\t#in\n",
+ "d2 = 8.;\t\t#in\n",
+ "p1 = 10.;\t\t#psi\n",
+ "V = 3.;\t\t #cuft\n",
+ "theta = 60.;\t#degrees\n",
+ "p2 = 3.43;\t\t# psi\n",
+ "w = 187.;\t\t#lb\n",
+ "\n",
+ "# calculations \n",
+ "V1 = G/(0.25*math.pi*(d1/12)**2);\n",
+ "V2 = G/(0.25*math.pi*(d2/12)**2);\n",
+ "F1 = 0.25*math.pi*(d1**2)*p1;\n",
+ "F2 = 0.25*math.pi*d2**2 *p2;\n",
+ "Fx = F1+F2*math.cos(theta*math.pi/180) - G*1.935*(-V2*math.cos(theta*math.pi/180) - V1);\n",
+ "Fz = F2*math.sin(theta*math.pi/180) + w + G*1.935*(V2*math.sin(theta*math.pi/180));\n",
+ "F = round(math.sqrt(Fx**2 + Fz**2),-1);\n",
+ "alpha = (180/math.pi)*math.atan(Fz/Fx);\n",
+ "\n",
+ "# results \n",
+ "print 'The force on the bend = %d lb at %d degrees with the horizontal'%(F,alpha);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The force on the bend = 1920 lb at 25 degrees with the horizontal\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2 Page No : 178"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "l1 = 5.;\t\t#ft\n",
+ "l2 = 2.;\t\t#ft\n",
+ "\n",
+ "# calculations \n",
+ "V1 = round(math.sqrt(2*32.2*(l2-l1)/(1-(l1/l2)**2)),2);\n",
+ "V2 = round((l1/l2)*V1,1);\n",
+ "q = round(l1*V1,1);\n",
+ "F1 = 62.4*(l1**2)/2;\n",
+ "F2 = 62.4*(l2**2)/2;\n",
+ "Fx = F1-F2-q*1.935*(V2-V1);\n",
+ "\n",
+ "# results \n",
+ "print 'Force = %d lb and direction is in downstream direction'%(Fx);\n",
+ "\n",
+ "#answer differs due to incorrect value of F2 in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Force = 118 lb and direction is in downstream direction\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3 Page No : 182"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "d = 2.;\t\t#ft\n",
+ "Q = 40.;\t\t#cfs/ft\n",
+ "\n",
+ "# calculations \n",
+ "V1 = Q/d;\n",
+ "y1 = d;\n",
+ "K1 = V1**2 /(32.2*y1);\n",
+ "y2 = (-1 +math.sqrt(1+8*K1));\n",
+ "V2 = Q/y2 ;\n",
+ "delta = d + (V1**2 /(2*32.2)) - y2 - (V2**2 /(2*32.2));\n",
+ "hp = Q*62.4*delta/550.;\n",
+ "\n",
+ "# results \n",
+ "print 'y2 = %.2f ft, delta = %.2f ft, Horsepower dissipated = %.1f hp'%(y2,delta,hp);\n",
+ "\n",
+ "#incorrect answer given in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "y2 = 6.12 ft, delta = 1.43 ft, Horsepower dissipated = 6.5 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.4 Page No : 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "y1 = 2.;\t\t#ft\n",
+ "V1 = 20.;\t\t#fps\n",
+ "beta = 40.;\t\t#degrees\n",
+ "\n",
+ "# calculations \n",
+ "K1 = (V1**2)/(32.2*y1);\n",
+ "y2 = (-1 + math.sqrt(1+8*K1*(math.sin(beta*math.pi/180))**2));\n",
+ "k = (y1/y2)*V1*math.sin(beta*math.pi/180);\n",
+ "del_angle = (180/math.pi)*math.tan(math.sqrt((math.tan(beta*math.pi/180)) *(1+2*k**2 /(32.2*y2))/(1+2*K1*(math.sin(beta*math.pi/180))**2)));\n",
+ "theta = beta-del_angle;\n",
+ "\n",
+ "# results \n",
+ "print 'The required wedge angle = %.d degrees'%(2*theta);\n",
+ " \n",
+ "#rounding-off errors in the answer given in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The required wedge angle = 16 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5 Page No : 186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "p1 = 14.7;\t\t#psia\n",
+ "V1 = 1732.;\t\t#pfs\n",
+ "a1 = 862.;\t\t#fps\n",
+ "\n",
+ "# calculations \n",
+ "M1 = round(V1/a1,2);\n",
+ "M2 = (math.sqrt((1+(0.4*M1**2)/2)/(1.4*M1**2 - (0.4/2))));\n",
+ "p2 = p1*(1+2*(1.4/2.4)*(M1**2 -1));\n",
+ "V2 = V1*((2+0.4*M1**2)/(2.4*M1**2));\n",
+ "a2 = V2/M2;\n",
+ "T2 = a2**2/(1.4*32.2*53.3);\n",
+ "T1 = a1**2/(1.4*32.2*53.3);\n",
+ "del_T = T2-T1;\n",
+ "\n",
+ "# results \n",
+ "print 'p2 = %.1f psia, V2 = %d fps, a2 = %d fps, T2 = %d degreeR'%(p2,V2,a2,T2);\n",
+ "print 'Rise of temperature = %d degreeF'%(del_T);\n",
+ "\n",
+ "#Answer differs due to rounding-off errors in M2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "p2 = 66.8 psia, V2 = 645 fps, a2 = 1122 fps, T2 = 523 degreeR\n",
+ "Rise of temperature = 214 degreeF\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6 Page No : 188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "p1 = 14.7;\t\t# psia\n",
+ "v1 = 1732.;\t\t# fps\n",
+ "a1 = 862.;\t\t# fps\n",
+ "beta = 40.;\t\t# degrees\n",
+ "\n",
+ "# calculations \n",
+ "M1 = round(v1/a1,2);\n",
+ "T1 = round(a1**2 /(1.4*32.2*53.3),-1);\n",
+ "p2 = round(p1*(1 + 2*(1.4/2.4)*(M1**2 *(math.sin(beta*math.pi/180))**2 -1)));\n",
+ "beta_theta = math.degrees(math.atan(math.tan(math.radians(beta)) * (0.4*(M1*math.sin(math.radians(beta)))**2 +2)/(2.4*(M1*math.sin(math.radians(beta)))**2)))\n",
+ "theta = round(beta - beta_theta,1)\n",
+ "M2 = round(math.sqrt((1/math.sin((beta-theta)*math.pi/180)**2) *(1 + (0.4/2)*((M1*math.sin(beta*math.pi/180))**2) )/((1.4*(M1*math.sin(beta*math.pi/180))**2) -(0.4/2))),2)\n",
+ "v2 = v1*math.cos(beta*math.pi/180)/math.cos((29.3)*math.pi/180);\n",
+ "a2 = v2/M2;\n",
+ "T2 = a2**2 /(1.4*32.2*53.3);\n",
+ "\n",
+ "# results \n",
+ "print 'Angle required = %.1f degrees, p2 = %.1f psia, v2 = %d fps, a2 = %.f fps, T2 = %.1f degreeR'%(theta,p2,v2,round(a2,-1),T2);\n",
+ "\n",
+ "# note : answers differ due to rounding off error\t\t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Angle required = 10.8 degrees, p2 = 26.0 psia, v2 = 1521 fps, a2 = 940 fps, T2 = 367.1 degreeR\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.7 Page No : 190"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "F = 1000;\t\t#lb\n",
+ "H = 30000;\t\t#ft\n",
+ "v1 = 500.;\t\t#fps\n",
+ "v2 = 4000.;\t\t#fps\n",
+ "p2 = 5;\t\t #psia\n",
+ "A2 = 1;\t\t #sqft\n",
+ "p1 = 4.37;\t\t#psia\n",
+ "\n",
+ "# calculations \n",
+ "G_a = (F - (p2-p1)*A2*144)*32.2/(v2-v1);\n",
+ "\n",
+ "# results \n",
+ "print 'Ga = %.1f lb/sec'%(G_a);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Ga = 8.4 lb/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.8 Page No : 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "gam = 0.0765;\t# lb/cuft\n",
+ "V1 = 293.;\t\t#fps\n",
+ "hp = 1500.;\n",
+ "h = 10.;\t\t#ft\n",
+ "V4 = 338.;\t\t#fps\n",
+ "\n",
+ "# calculations \n",
+ "V = 0.5*(V1+V4);\n",
+ "Q = hp*550/((V4-V1)*V*gam/32.2);\n",
+ "d1 = math.sqrt(Q/(V1*0.25*math.pi));\n",
+ "d4 = math.sqrt(Q/(V4*0.25*math.pi));\n",
+ "F = Q*(gam/32.2)*(V4-V1);\n",
+ "eta = V1/V;\n",
+ "\n",
+ "# results \n",
+ "print 'V4 = %d fps, V = %.1f fps, d1 = %.1f ft, d4 = %.2f ft, F = %d lb, efficiency = %.1f percentage'%(V4,V,d1,d4,F,eta*100);\n",
+ "\n",
+ "#answer differs due to rounding-off errors"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V4 = 338 fps, V = 315.5 fps, d1 = 10.3 ft, d4 = 9.60 ft, F = 2614 lb, efficiency = 92.9 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.9 Page No : 198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "D = 6.;\t\t#ft\n",
+ "d = 2.;\t\t#in\n",
+ "V1 = 200.;\t\t#fps\n",
+ "rpm = 250.;\n",
+ "theta = 150.;\t\t#degrees\n",
+ "\n",
+ "# calculations \n",
+ "u = (rpm/60)*2*math.pi*0.5*D;\n",
+ "v1 = V1-u;\n",
+ "v2 = v1;\n",
+ "V_2x = v1*math.cos(theta*math.pi/180) + u;\n",
+ "V_2y = v2*math.sin(theta*math.pi/180);\n",
+ "V2 = math.sqrt(V_2x**2 + V_2y**2);\n",
+ "Q = 0.25*math.pi*(d/12)**2 *V1;\n",
+ "F_x = Q*1.935*(V_2x-V1);\n",
+ "P = F_x*u/550;\n",
+ "\n",
+ "# results \n",
+ "print 'The working component of force on fluid = %d lb, P = %.f hp'%(F_x,-P);\n",
+ "\n",
+ "#answer differs due to rounding-off errors"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The working component of force on fluid = -1913 lb, P = 273 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.10 Page No : 199"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "P = 100.;\t\t#hp\n",
+ "V = 75.;\t\t#fps\n",
+ "V1 = 150.;\t\t#fps\n",
+ "d = 2.;\t\t#in\n",
+ "alpha1 = 60.;\t\t#degrees\n",
+ "\n",
+ "# calculations \n",
+ "Q = round(0.25*math.pi*(d/12)**2 *V1,2);\n",
+ "F_y = round(550*P/V);\n",
+ "V2 = math.sqrt(V1**2 - P*550/(Q*1.935/2));\n",
+ "alpha2 = (180/math.pi)*math.asin((V1*math.sin(alpha1*math.pi/180) - (F_y/(Q*1.935)))/V2);\n",
+ "beta1 = 90 - (180/math.pi)*math.atan((V1*math.sin(alpha1*math.pi/180) - V)/(V1*math.cos(alpha1*math.pi/180)));\n",
+ "beta2 = 90 + (180/math.pi)*math.atan((V-V2*math.sin(alpha2*math.pi/180))/(V1*math.cos(alpha1*math.pi/180)));\n",
+ "\n",
+ "\n",
+ "# results \n",
+ "print 'Beta1 = %.f degrees, Beta2 = %.f degrees'%(beta1,round(beta2,-1));\n",
+ "\n",
+ "\n",
+ "# note : answer differs due to rounding off error\t\t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Beta1 = 54 degrees, Beta2 = 130 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.11 Page No : 203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "r1 = 5.;\t\t#ft\n",
+ "r2 = 3.5;\t\t#ft\n",
+ "beta1 = 60.;\t\t#degrees\n",
+ "beta2 = 150.;\t\t#degrees\n",
+ "t = 1.;\t\t#ft\n",
+ "alpha1 = 15.;\t\t#degree\n",
+ "Q = 333.;\t\t#cfs\n",
+ "gam = 0.434;\n",
+ "\n",
+ "# calculations \n",
+ "V_r1 = round(Q/(2*math.pi*r1),1);\n",
+ "V_r2 = round(Q/(2*math.pi*r2),2);\n",
+ "V_t1 = round(V_r1*(1/math.tan(alpha1*math.pi/180)),1);\n",
+ "u1 = round(V_t1 - V_r1*math.tan((90-beta1)*math.pi/180),1);\n",
+ "omega = round(u1/r1,1);\n",
+ "u2 = round(omega*r2,1);\n",
+ "V_t2 = round(u2 - V_r2*(1/math.tan((90-beta1)*math.pi/180)),1);\n",
+ "T = Q*1.935*(V_t1*r1 - (V_t2*r2));\n",
+ "hp = T*omega/550;\n",
+ "E_T = hp*550/(Q*62.4);\n",
+ "V1 = math.sqrt(V_r1**2 + V_t1**2);\n",
+ "V2 = math.sqrt(V_r2**2 + V_t2**2);\n",
+ "del_p = E_T*gam + (gam/(2*32.2))*(V2**2 - V1**2);\n",
+ "\n",
+ "# results \n",
+ "print 'V1 = %.1f fps, V2 = %.1f fps, T = %d ft-lb, hp = %d lb, E_T = %.1f ft-lb/lb, p1-p2 = %.1f psi'%(V1,V2,T,hp,E_T,del_p);\n",
+ "\n",
+ "#incorrect answer given in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V1 = 41.0 fps, V2 = 15.4 fps, T = 133896 ft-lb, hp = 1631 lb, E_T = 43.2 ft-lb/lb, p1-p2 = 9.0 psi\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.12 Page No : 204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "r1 = 3.;\t\t#in\n",
+ "r2 = 10.;\t\t#in\n",
+ "beta1 = 120.;\t\t#degrees\n",
+ "beta2 = 135.;\t\t#degrees\n",
+ "t = 1.;\t\t#in\n",
+ "Q = 4.;\t\t#cfs\n",
+ "gam = 0.434;\n",
+ "\n",
+ "# calculations \n",
+ "V1 = Q*144/(2*math.pi*r1);\n",
+ "V_r1 = V1;\n",
+ "V_r2 = Q*144/(2*math.pi*r2);\n",
+ "u1 = V1*math.tan((beta1-90)*math.pi/180);\n",
+ "omega = u1/(r1/12);\n",
+ "u2 = omega*(r2/12);\n",
+ "V_t2 = u2 - V_r2/math.tan((180-beta2)*math.pi/180);\n",
+ "T = Q*1.935*(V_t2*(r2/12));\n",
+ "P = T*omega/547.561;\t\t#hp\n",
+ "E_P = P*550/(Q*62.4);\n",
+ "V2 = math.sqrt(V_r2**2 + V_t2**2);\n",
+ "del_p = E_P*gam + (gam/(2*32.2))*(V1**2 - V2**2);\n",
+ "\n",
+ "# results \n",
+ "print 'Rotational speed = %.1f rad/sec '%(omega)\n",
+ "print ' T = %d ft-lb, P = %.1f hp'%(T,P);\n",
+ "print ' The energy given to each pound of water = %d ft'%(E_P);\n",
+ "print ' The pressure rise = %.1f psi'%(del_p);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rotational speed = 70.6 rad/sec \n",
+ " T = 320 ft-lb, P = 41.3 hp\n",
+ " The energy given to each pound of water = 90 ft\n",
+ " The pressure rise = 28.6 psi\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Fluid_Mechanics/ch7.ipynb b/Elementary_Fluid_Mechanics/ch7.ipynb
new file mode 100755
index 00000000..219a93a5
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/ch7.ipynb
@@ -0,0 +1,292 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:46e45d2f6c46e25d719ba327e4ef8cabd3b2b67788136ad3286b5847149f6378"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7 : Flow of a Real Fluid"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.1 Page No : 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "nu = 0.00001;\t\t# sqft/sec\n",
+ "d = 1.;\t\t#in\n",
+ "R_c = 2100.;\n",
+ "\n",
+ "# calculations \n",
+ "V = R_c*nu/(d/12);\n",
+ "Q = V*0.25*math.pi*(d/12)**2;\n",
+ "\n",
+ "# results \n",
+ "print 'Q = %.6f cfs'%(Q);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q = 0.001374 cfs\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2 pageno : 230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# calculations\n",
+ "e = 0.2/(1./0.33)\n",
+ "l2 = 0.2/(1.94 * (1/0.33)**2)\n",
+ "l = math.sqrt(l2)\n",
+ "k2 = 0.2/(1.94 * (1/0.33)**2 / (-1/(0.33**2)**0.5)**2)\n",
+ "k = math.sqrt(k2)\n",
+ "\n",
+ "# results\n",
+ "print \"E = %.3f lb-sec/sqft\"%e\n",
+ "print \"l = %.3f ft\"%l\n",
+ "print \"k = %.2f\"%k\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "E = 0.066 lb-sec/sqft\n",
+ "l = 0.106 ft\n",
+ "k = 0.32\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4 Page No : 240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "G = 240.;\t\t#lb/sec\n",
+ "A1 = 4.;\t\t#sqft\n",
+ "A2 = 2.;\t\t#sqft\n",
+ "z1 = 30.;\t\t#ft\n",
+ "z2 = 80.;\t\t#ft\n",
+ "V1 = 600.;\t\t# fps\n",
+ "V2 = 800.;\t\t#fps\n",
+ "p1 = 20.;\t\t#psia\n",
+ "p2 = 35.;\t\t# psia\n",
+ "\n",
+ "# calculations \n",
+ "gam1 = G/(A1*V1);\n",
+ "gam2 = G/(A2*V2);\n",
+ "T1 = p1*144/(53.3*gam1);\n",
+ "T2 = p2*144/(53.3*gam2);\n",
+ "del_H = 186.5*(T2-T1);\n",
+ "E_H1 = (V2**2)/(2*32.2) - (V1**2)/(2*32.2) +del_H+z2-z1;\n",
+ "E_H2 = (V2**2)/(2*32.2) - (V1**2)/(2*32.2) +del_H;\n",
+ "Q = G*E_H2/550.;\n",
+ "\n",
+ "# results \n",
+ "print 'T1 = %d degreeR, T2 = %d degreeR'%(T1,T2);\n",
+ "print ' The net heat energy added = %d hp'%(round(Q,-1));\n",
+ "\n",
+ "#answer differs due to rounding-off errors"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "T1 = 540 degreeR, T2 = 630 degreeR\n",
+ " The net heat energy added = 9230 hp\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5 Page No : 240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "G = 50.;\t\t#cfs\n",
+ "Q = 400.;\t\t#hp\n",
+ "A1 = 4.;\t\t#sqft\n",
+ "A2 = 2.;\t\t#sqft\n",
+ "z1 = 30.;\t\t#ft\n",
+ "z2 = 80.;\t\t#ft\n",
+ "p1 = 20.;\t\t#psi\n",
+ "p2 = 10.;\t\t#psi\n",
+ "\n",
+ "# calculations \n",
+ "V1 = G/A1;\n",
+ "V2 = G/A2;\n",
+ "E_p = Q*(550/62.4)/G;\n",
+ "h_L = (p1-p2)*144/62.4 + (V1**2 - V2**2)/(2*32.2) +(z1-z2)+E_p;\n",
+ "\n",
+ "# results \n",
+ "print 'Head lost = %.1f ft'%(h_L);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Head lost = 36.3 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.6 Page No : 243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "b = 3.;\t\t#ft\n",
+ "d = 2.;\t\t#ft\n",
+ "l = 200.;\t\t#ft\n",
+ "h_L = 30.;\t\t#ft\n",
+ "\n",
+ "# calculations \n",
+ "tau_0 = h_L*62.4*b*d/(10*l);\t\t#0.00694\n",
+ "\n",
+ "# results \n",
+ "print 'The resistance stress exerted between fluid and conduit walls = %.2f psf = %.3f psi'%(tau_0,tau_0*0.00694);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The resistance stress exerted between fluid and conduit walls = 5.62 psf = 0.039 psi\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.7 Page No : 244"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables \n",
+ "h_L = 30.;\t\t#ft\n",
+ "l = 200.;\t\t#ft\n",
+ "d = 2.;\t\t#ft\n",
+ "r = 8.;\t\t#in\n",
+ "\n",
+ "# calculations \n",
+ "#part (a)\n",
+ "tau_0 = h_L*62.4/(d*l);\n",
+ "#part(b)\n",
+ "tau = (0.5*r/12)*(tau_0*0.00694);\n",
+ "\n",
+ "# results \n",
+ "print 'Parta): Shear stress = %.2f psf = %.4f psi '%(tau_0,tau_0*0.00694);\n",
+ "print 'Partb): Shear stress = %.4f psi '%(tau);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parta): Shear stress = 4.68 psf = 0.0325 psi \n",
+ "Partb): Shear stress = 0.0108 psi \n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Fluid_Mechanics/ch8.ipynb b/Elementary_Fluid_Mechanics/ch8.ipynb
new file mode 100755
index 00000000..7725321e
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/ch8.ipynb
@@ -0,0 +1,193 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:736a6a7d4118b4fdd4663c0d1027cf5bfb979230c26b70e1555cf0d37da46444"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8 : Similitude and Dimensional Analysis"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.1 Page No : 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\t\t\n",
+ "\n",
+ "# variables\n",
+ "Tw = 32.;\t\t# degreeF\n",
+ "d1 = 3.;\t\t# in\n",
+ "v = 10.;\t\t#fps\n",
+ "delp = 2.;\t\t#psi\n",
+ "h1 = 30.;\t\t# ft\n",
+ "Tb = 68.;\t\t#degreeF\n",
+ "d2 = 1.;\t\t#in\n",
+ "h2 = 10.;\t\t#ft\n",
+ "\n",
+ "# calculations \n",
+ "V = v*(d1/12)*0.0000137/((d2/12)*0.88*0.0000375);\n",
+ "del_p = delp/h2**2 *0.88*V**2;\n",
+ "\n",
+ "# results \n",
+ "print 'V = %.2f fps del_p = %.2f psi'%(V,del_p);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V = 12.45 fps del_p = 2.73 psi\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.2 Page No : 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "l = 400.;\t\t# ft\n",
+ "h = 10.;\t\t#ft\n",
+ "v = 30.;\t\t# fps\n",
+ "D = 2.;\t\t#lb\n",
+ "\n",
+ "# calculations \n",
+ "V = math.sqrt((v**2 /l)*h);\n",
+ "D_p = (D/V**2) *(v**2)*(l**2)/h**2;\n",
+ "\n",
+ "# results \n",
+ "print 'V = %.2f fps Prototype drag = %d lb'%(V,D_p);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V = 4.74 fps Prototype drag = 128000 lb\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.3 Page No : 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\t\t\n",
+ "# variables\n",
+ "G = 20000.;\t\t#cfs\n",
+ "k = 1./15;\n",
+ "\n",
+ "# calculations \n",
+ "Q_m = G*(k)**(2+ 1./2);\n",
+ "\n",
+ "# results \n",
+ "print 'Qm = %.f cfs'%(Q_m);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Qm = 23 cfs\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8.4 Page No : 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "k = 1./10;\n",
+ "v = 3000.;\t\t#fps\n",
+ "h = 15000.;\t\t#altitude\n",
+ "T = 68.;\t\t# degreeF\n",
+ "am = 870.;\t\t#fps\n",
+ "ap = 1057.;\t\t#fps\n",
+ "\n",
+ "# calculations \n",
+ "Vm = v*(am/ap);\n",
+ "rho_m = v*(1/k)*0.001495*0.031/(0.033*Vm);\n",
+ "p_m = 32.2*rho_m*34.9*(T+460)/(144);\n",
+ "\n",
+ "# results \n",
+ "print 'Vm = %d fps p_m = %d psia'%(Vm,p_m);\n",
+ "\n",
+ "#rounding-off errors"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vm = 2469 fps p_m = 70 psia\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Fluid_Mechanics/ch9.ipynb b/Elementary_Fluid_Mechanics/ch9.ipynb
new file mode 100755
index 00000000..bbe5b2d4
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/ch9.ipynb
@@ -0,0 +1,780 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:0b5a0b6f6c6e071c339201ca91727b19aa4afe9cff0ebf23f723c14d23de7be3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 9 : Fluid Flow in Pipes"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.1 Page No : 281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\t\t\n",
+ "d = 6.;\t \t#inches\n",
+ "v = 15.;\t\t#fps\n",
+ "l = 100.;\t\t#ft\n",
+ "h_L = 17.5;\t\t#ft\n",
+ "\n",
+ "# calculations \n",
+ "f = round(h_L*(d/(12*l))*(2*32.2/v**2),3);\n",
+ "V_f = v*math.sqrt(f/8.);\n",
+ "\n",
+ "# results \n",
+ "print 'The friction velocity = %.2f fps'%(V_f);\n",
+ "\n",
+ "#incorrect answer in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0.025\n",
+ "The friction velocity = 0.84 fps\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.2 Page No : 285"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "T = 100.;\t\t# degreeF\n",
+ "d = 3.;\t\t # inches\n",
+ "Re = 80000.;\t# Reynolds number\n",
+ "e = 0.006;\t\t# inches\n",
+ "l = 1000.;\t\t#feet\n",
+ "f1 = 0.021;\t\t#friction factor\n",
+ "nu = 0.729*10**-5;\t\t# sqft/sec\n",
+ "\n",
+ "# calculations \n",
+ "V = Re*nu/0.25;\n",
+ "h_L1 = f1*(l/0.25)*(V**2 /(2*32.2));\n",
+ "f = 0.316/Re**0.25;\n",
+ "h_L = (f/f1)*h_L1;\n",
+ "\n",
+ "# results \n",
+ "print 'Head loss expected = %.1f ft and head loss expected if the pipe were smooth = %.2f ft'%(h_L1,h_L);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Head loss expected = 7.1 ft and head loss expected if the pipe were smooth = 6.35 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.3 Page No : 288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "T = 100.;\t\t#degreeF\n",
+ "d = 3.;\t\t # inches\n",
+ "Re = 80000.;\t# Reynolds number\n",
+ "e = 0.006;\t\t#inches\n",
+ "l = 1000.;\t\t#ft\n",
+ "f = 0.0255;\t\t#friction factor\n",
+ "V = 2.33;\t\t#fps\n",
+ "\n",
+ "# calculations \n",
+ "h_L = f*(l/0.25)*(V**2 /(2*32.2));\n",
+ "\n",
+ "# results \n",
+ "print 'Head loss expected = %.1f ft'%(h_L);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Head loss expected = 8.6 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.4 Page No : 290"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "Q = 100.;\t\t#gallons per minute\n",
+ "sg = 0.90;\n",
+ "nu = 0.0012;\t# lb-sec/sqft\n",
+ "d = 3.;\t\t # in\n",
+ "l = 1000.;\t\t#ft\n",
+ "r = 1.;\t\t #in\n",
+ "V = 4.53;\t\t#fps\n",
+ "\n",
+ "# calculations \n",
+ "Re = V*(d/12)*sg*1.935/nu;\n",
+ "h_L = (64/Re)*(12*l/d)*(V**2 /(2*32.2));\n",
+ "v = 2*V*(1 - (2/d)**2);\n",
+ "tau = 62.4*sg*h_L/(2*l*12);\n",
+ "\n",
+ "# results \n",
+ "print 'v = %.2f fps, h_L = %.1f ft of oil and tau = %.3f psf'%(v,h_L,tau);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "v = 5.03 fps, h_L = 49.6 ft of oil and tau = 0.116 psf\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.5 pageno : 293"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "# variables\n",
+ "# assume\n",
+ "v_vc = 0.80 \n",
+ "V = 8.35 #fps\n",
+ "R = 737000\n",
+ "f = 0.019 # from fig.\n",
+ "\n",
+ "# calculations\n",
+ "V_Vc = 1./(1+ 4.07* math.sqrt(f/8))\n",
+ "Q = math.pi * V/4\n",
+ "# results\n",
+ "print \"V/Vc = %.3f\"%V_Vc\n",
+ "print \"Q = %.2f cfs\"%Q"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "V/Vc = 0.834\n",
+ "Q = 6.56 cfs\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.6 Page No : 295"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "Q = 90.;\t\t# gallons per minute\n",
+ "T = 68.;\t\t#degreeF\n",
+ "d = 3.;\t\t # in\n",
+ "l = 3000.;\t\t#ft\n",
+ "r = 1.;\t\t # in\n",
+ "f = 0.018;\n",
+ "\n",
+ "# calculations \n",
+ "V = Q/(60*7.48*0.25*math.pi*(d/12)**2);\n",
+ "Re = V*(d/12)*1.935/(0.000021);\n",
+ "h_L = f*(l/0.25)*(V**2 /(2*32.2));\n",
+ "tau_0 = f*1.935*V**2 /8;\n",
+ "tau1 = 2*tau_0/d;\n",
+ "v_c = V*(1+4.07*math.sqrt(f/8));\n",
+ "v_ = math.sqrt(tau_0/1.935);\n",
+ "v1 = v_*(5.50+5.75*math.log10(v_*(r/(2*12))/0.00001085));\n",
+ "v1_ = v_c-v_*5.75*math.log10(0.5*d/(r/2));\n",
+ "delta = d*32.8/(Re*math.sqrt(f));\n",
+ "\n",
+ "# results \n",
+ "print 'Head lost = %.1f ft of water \\\n",
+ "\\nWall shear stress = %.3f psf \\\n",
+ "\\nthe center velocity = %.2f fps \\\n",
+ "\\nshearing stress = %.3f psf \\\n",
+ "\\nv1 = %.2f fps \\\n",
+ "\\ndelta = %.4f in.'%(h_L,tau_0,v_c,tau1,v1_,delta);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Head lost = 56.0 ft of water \n",
+ "Wall shear stress = 0.073 psf \n",
+ "the center velocity = 4.87 fps \n",
+ "shearing stress = 0.048 psf \n",
+ "v1 = 4.34 fps \n",
+ "delta = 0.0078 in.\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.7 Page No : 298"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "d = 12.;\t\t# in\n",
+ "v = 10.;\t\t#fps\n",
+ "e = 2.;\t\t #in\n",
+ "k = 0.002;\t\t#relative roughness\n",
+ "l = 1000.;\t\t#ft\n",
+ "\n",
+ "# calculations \n",
+ "f = (1/(1.14+2*math.log10(1/k)))**2;\n",
+ "v_c = v*(1+4.07*math.sqrt(f/8));\n",
+ "tau_0 = f*1.935*v**2 /8;\n",
+ "v2 = v_c - tau_0*5.75*math.log10(0.5*d/e);\n",
+ "v2_ = 8.48*tau_0 + tau_0*5.75*math.log10(e/(12*k));\n",
+ "h_L = f*(l)*v**2 /(2*32.2); \n",
+ "\n",
+ "# results \n",
+ "print 'f = %.4f, v_c = %.2f fps, v2 = %.1f fps and h_L = %.1f ft of water'%(f,v_c,v2_,h_L);\n",
+ "\n",
+ "#there are small errors in the answer given in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "f = 0.0234, v_c = 12.20 fps, v2 = 11.0 fps and h_L = 36.3 ft of water\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.8 Page No : 300"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "V = 4.08;\t\t # fps\n",
+ "Re = 93800.;\t\t#Reynolds number\n",
+ "r = 1.;\t\t#in\n",
+ "m = 1./7;\n",
+ "R = 3.;\t\t#in\n",
+ "\n",
+ "# calculations \n",
+ "f = 0.316/(Re**0.25);\n",
+ "v_c = V/(2/((m+1)*(m+2)));\n",
+ "v1 = v_c*(r/R)**(1./7);\n",
+ "tau_0 = f*1.935*V**2 /8;\n",
+ "\n",
+ "# results \n",
+ "print 'f = %.3f, v_c = %.2f fps, v1 = %.2f fps and wall shear = %.3f ps'%(f,v_c,v1,tau_0);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "f = 0.018, v_c = 5.00 fps, v1 = 4.27 fps and wall shear = 0.073 ps\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.9 Page No : 302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "p = 14.7;\t\t#psia\n",
+ "T = 60.;\t\t# degreeF\n",
+ "l = 2000.;\t\t#ft\n",
+ "b = 18.;\t\t#in\n",
+ "h = 12.;\t\t# in\n",
+ "v = 10.;\t\t# fps\n",
+ "\n",
+ "# calculations \n",
+ "R_h = (b*h)/(2*12*(b+h));\n",
+ "Re = v*4*R_h*0.0763/(32.2*0.000000375);\n",
+ "f = 0.019;\n",
+ "h_L = f*(l/(4*R_h))*v**2 /(2*32.2);\n",
+ "del_p = 0.0763*h_L;\n",
+ "\n",
+ "# results \n",
+ "print 'loss of head = %.1f ft of air and the pressure drop = %.2f psf = %.3f psi'%(h_L,del_p,del_p*0.0069);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "loss of head = 49.2 ft of air and the pressure drop = 3.75 psf = 0.026 psi\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.10 Page No : 305"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "Q = 90.;\t\t#gpm\n",
+ "d = 3.;\t\t#in\n",
+ "l = 3000.;\t\t#ft\n",
+ "\n",
+ "# calculations \n",
+ "V = Q/(60*7.48*0.25*math.pi*(d/12)**2);\n",
+ "R_h = (d/12)/4;\n",
+ "C_hw = 140;\n",
+ "S = (V/(1.318*140*R_h**0.63))**(1/0.54);\n",
+ "h_L = S*l;\n",
+ "\n",
+ "# results \n",
+ "print 'The loss of head = %.1f ft of water'%(h_L);\n",
+ "\n",
+ "\t\t"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The loss of head = 65.7 ft of water\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.11 Page No : 307"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import *\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "G = 40.;\t\t# lb/min\n",
+ "d = 3.;\t\t# in\n",
+ "T = 100.;\t\t# degreeF\n",
+ "p = 50.;\t\t# psia\n",
+ "l = 2000.;\t\t#ft\n",
+ "\n",
+ "# calculations \n",
+ "Re = ((G/60)*(d/12))/(0.0491*32.2*4*10**-7);\n",
+ "f = 0.015;\n",
+ "gam1 = p*(144/(53.3*(T+460)));\n",
+ "V1 = (G/60)/(gam1*0.0491);\n",
+ "a = math.sqrt(1.4*32.2*53.3*(T+460));\n",
+ "M1 = V1/a;\n",
+ "M2_limit = math.sqrt(1/1.4);\n",
+ "l = (((1-(M1/M2_limit)**2)/(1.4*M1**2)) - 2*math.log(M2_limit/M1))*(0.25/0.015);\n",
+ "p2 = 38.9;\t\t#psia, from trial and error method \n",
+ "#p2 = Symbol('p2')\n",
+ "#ans = solve((G/60)**2 * 53.3*560/(32.2 * 0.0491**2) * (2*log(p/p2) + gam1*l/0.25) - (144**2 * (p**2 - p2**2)))\n",
+ "\n",
+ "# results \n",
+ "print 'p2 = %.1f psia'%(p2);\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "p2 = 38.9 psia\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.12 Page No : 312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "d = 12.;\t\t# in\n",
+ "D = 24.;\t\t#in\n",
+ "theta = 20.;\t\t#degrees\n",
+ "G = 10.;\t\t#cfs\n",
+ "p = 20.;\t\t#psi\n",
+ "\n",
+ "# calculations \n",
+ "V12 = G/(0.25*math.pi);\n",
+ "V24 = V12/4;\n",
+ "K_L = 0.43;\n",
+ "p24 = ((p*144/62.4) + (V12**2 /(2*32.2)) - ((V24**2)/(2*32.2)) - K_L*(V12-V24)**2 /(2*32.2))/2.314;\n",
+ "\n",
+ "# results \n",
+ "print 'Pressure in the larger pipe = %.1f psi'%(p24);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure in the larger pipe = 20.7 psi\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.13 Page No : 322"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "# variables\n",
+ "d = 12.;\t\t# in\n",
+ "l = 1000.;\t\t#ft\n",
+ "h1 = 200.;\t\t#elevation\n",
+ "h2 = 250.;\t\t#elevation\n",
+ "T = 50.;\t\t#degreeF\n",
+ "f1 = 0.030;\n",
+ "\n",
+ "# calculations \n",
+ "V1 = math.sqrt((h2-h1)*2*32.2/(0.5+f1*l +1));\n",
+ "R1 = V1/0.00000141;\n",
+ "f2 = 0.019;\n",
+ "V2 = math.sqrt((h2-h1)*2*32.2/(0.5+f2*l +1));\n",
+ "R2 = V1/0.00000141;\n",
+ "Q = 0.25*math.pi*(d/12)**2 *V2; \n",
+ "\n",
+ "# results \n",
+ "print 'Velocity = %.1f fps \\\n",
+ "\\nflow rate = %.1f cfs'%(V2,Q);\n",
+ "\n",
+ "\t\t#there is a minute error in the answer given in textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity = 12.5 fps \n",
+ "flow rate = 9.8 cfs\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.14 Page No : 322"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "l = 200.;\t\t#ft\n",
+ "Q = 0.1;\t\t#cfs\n",
+ "del_h = 5.;\t\t#ft\n",
+ "T = 50.;\t\t#degreeF\n",
+ "d = 0.187;\t\t#ft\n",
+ "\n",
+ "# calculations \n",
+ "V = Q/(0.25*math.pi*d**2);\n",
+ "R = V*d/0.0000141;\n",
+ "f = (del_h*2*32.2/V**2 -(1+0.5))*(d/l);\n",
+ "\n",
+ "# results \n",
+ "print 'Required diameter of the pipe = %.2f in.'%(d*12);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Required diameter of the pipe = 2.24 in.\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.15 Page No : 324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "Q = 2.5;\t\t#cfs\n",
+ "T = 50.;\t\t#degreeF\n",
+ "d1 = 8.;\t\t#in\n",
+ "d2 = 6.;\t\t#in\n",
+ "l1 = 1000.;\t\t#ft\n",
+ "l2 = 2000.;\t\t#ft\n",
+ "\n",
+ "# calculations \n",
+ "V8 = Q/(0.25*math.pi*(d1/12)**2);\n",
+ "V6 = Q/(0.25*math.pi*(d2/12)**2);\n",
+ "R8 = V8*0.667/0.0000141;\n",
+ "f8 = 0.020;\n",
+ "R6 = V6*0.5/0.0000141;\n",
+ "f6 = 0.019;\n",
+ "h_L8 = f8*(l1/0.667)*(V8**2 /(2*32.2));\n",
+ "h_L6 = f6*(l2/0.5)*(V6**2 /(2*32.2));\n",
+ "Ep = 100+h_L8+h_L6;\n",
+ "n = Q*62.4*(Ep)/550;\n",
+ "V8 = math.sqrt((30/f8)*2*32.2/(l1/0.667));\n",
+ "Q_max = V8*0.25*math.pi*(d1/12)**2;\n",
+ "\n",
+ "# results \n",
+ "print 'Maximum reliable flow that can be pumped = %.1f cfs'%(Q_max);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum reliable flow that can be pumped = 2.8 cfs\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9.16 Page No : 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\t\t\n",
+ "# variables\n",
+ "Q = 5.;\t\t#cfs\n",
+ "d = 12.;\t\t#in\n",
+ "l = 5000.;\t\t#ft\n",
+ "h = 70.;\t\t#ft\n",
+ "L = 2000.;\t\t#ft\n",
+ "\n",
+ "# calculations \n",
+ "K = (h/Q**1.85);\n",
+ "a = (L/l)*K;\n",
+ "b = ((l-L)/l)*K;\n",
+ "Q_ = (h/((b+a*(0.5**(1.85)))))**(1/1.85);\n",
+ "Q_A = Q_/2;\n",
+ "Q_B = Q_/2;\n",
+ "del1 = Q_-Q;\t\t#gain capcaity\n",
+ "percent = (del1/Q)*100;\t\t#gain percentage\n",
+ "\n",
+ "# results \n",
+ "print 'The gain of capacity by looping the pipe is %.1f cfs or %d percentage'%(del1,percent);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The gain of capacity by looping the pipe is 1.0 cfs or 20 percentage\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Elementary_Fluid_Mechanics/screenshots/2FluidStatics.png b/Elementary_Fluid_Mechanics/screenshots/2FluidStatics.png
new file mode 100755
index 00000000..d76fd832
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/screenshots/2FluidStatics.png
Binary files differ
diff --git a/Elementary_Fluid_Mechanics/screenshots/7FlowOfaRealFluid.png b/Elementary_Fluid_Mechanics/screenshots/7FlowOfaRealFluid.png
new file mode 100755
index 00000000..a44c1931
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/screenshots/7FlowOfaRealFluid.png
Binary files differ
diff --git a/Elementary_Fluid_Mechanics/screenshots/9FluidFlowInPipes.png b/Elementary_Fluid_Mechanics/screenshots/9FluidFlowInPipes.png
new file mode 100755
index 00000000..946b0283
--- /dev/null
+++ b/Elementary_Fluid_Mechanics/screenshots/9FluidFlowInPipes.png
Binary files differ