summaryrefslogtreecommitdiff
path: root/mechanics_of_fluid
diff options
context:
space:
mode:
Diffstat (limited to 'mechanics_of_fluid')
-rwxr-xr-xmechanics_of_fluid/Chapter1-.ipynb151
-rwxr-xr-xmechanics_of_fluid/Chapter1-_1.ipynb151
-rwxr-xr-xmechanics_of_fluid/Chapter10.ipynb355
-rwxr-xr-xmechanics_of_fluid/Chapter10_1.ipynb355
-rwxr-xr-xmechanics_of_fluid/Chapter11.ipynb433
-rwxr-xr-xmechanics_of_fluid/Chapter11_1.ipynb433
-rwxr-xr-xmechanics_of_fluid/Chapter12-.ipynb141
-rwxr-xr-xmechanics_of_fluid/Chapter12-_1.ipynb141
-rwxr-xr-xmechanics_of_fluid/Chapter13.ipynb166
-rwxr-xr-xmechanics_of_fluid/Chapter13_1.ipynb166
-rwxr-xr-xmechanics_of_fluid/Chapter2-.ipynb326
-rwxr-xr-xmechanics_of_fluid/Chapter2-_1.ipynb326
-rwxr-xr-xmechanics_of_fluid/Chapter3-.ipynb268
-rwxr-xr-xmechanics_of_fluid/Chapter3-_1.ipynb268
-rwxr-xr-xmechanics_of_fluid/Chapter4-.ipynb170
-rwxr-xr-xmechanics_of_fluid/Chapter4-_1.ipynb170
-rwxr-xr-xmechanics_of_fluid/Chapter5-.ipynb119
-rwxr-xr-xmechanics_of_fluid/Chapter5-_1.ipynb119
-rwxr-xr-xmechanics_of_fluid/Chapter6-.ipynb342
-rwxr-xr-xmechanics_of_fluid/Chapter6-_1.ipynb342
-rwxr-xr-xmechanics_of_fluid/Chapter7-.ipynb295
-rwxr-xr-xmechanics_of_fluid/Chapter7-_1.ipynb295
-rwxr-xr-xmechanics_of_fluid/Chapter8-.ipynb350
-rwxr-xr-xmechanics_of_fluid/Chapter8-_1.ipynb350
-rwxr-xr-xmechanics_of_fluid/Chapter9-.ipynb273
-rwxr-xr-xmechanics_of_fluid/Chapter9-_1.ipynb273
-rwxr-xr-xmechanics_of_fluid/README.txt10
-rwxr-xr-xmechanics_of_fluid/screenshots/Chapter3_fluid.pngbin0 -> 131119 bytes
-rwxr-xr-xmechanics_of_fluid/screenshots/Chapter3_fluid_1.pngbin0 -> 131119 bytes
-rwxr-xr-xmechanics_of_fluid/screenshots/Chapter4_fluid.pngbin0 -> 134925 bytes
-rwxr-xr-xmechanics_of_fluid/screenshots/Chapter4_fluid_1.pngbin0 -> 134925 bytes
-rwxr-xr-xmechanics_of_fluid/screenshots/Chapter5_fluid.pngbin0 -> 137139 bytes
-rwxr-xr-xmechanics_of_fluid/screenshots/Chapter5_fluid_1.pngbin0 -> 137139 bytes
33 files changed, 6788 insertions, 0 deletions
diff --git a/mechanics_of_fluid/Chapter1-.ipynb b/mechanics_of_fluid/Chapter1-.ipynb
new file mode 100755
index 00000000..9483f3d7
--- /dev/null
+++ b/mechanics_of_fluid/Chapter1-.ipynb
@@ -0,0 +1,151 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:b9f90dbe8cdd3ac15f14ed9a5dcea4d99b8c522db4806d23bf359fc881d94c73"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter1-Fundamental concepts"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate denisty of air and its mass\n",
+ "p=2.*10**5; ## Pa\n",
+ "T=300.; ## K\n",
+ "R=287.; ## J/(kg.K)\n",
+ "V=3.; ## m^3\n",
+ "\n",
+ "rho=p/(R*T);\n",
+ "print'%s %.2f %s'%('The density of air =',rho,'kg/m^3')\n",
+ "m=rho*V;\n",
+ "print'%s %.2f %s'%('Its mass =',m,'m^3')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The density of air = 2.32 kg/m^3\n",
+ "Its mass = 6.97 m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate gas constant Co ,Co2 ,No,N2o\n",
+ "M_C=12.;\n",
+ "M_N=14.;\n",
+ "M_O=16.;\n",
+ "R=8314.; ## J/(kg.K)\n",
+ "\n",
+ "M_CO=M_C+M_O;\n",
+ "R_CO=R/M_CO;\n",
+ "\n",
+ "M_CO2=M_C+2.*M_O;\n",
+ "R_CO2=R/M_CO2;\n",
+ "\n",
+ "M_NO=M_N+M_O;\n",
+ "R_NO=R/M_NO;\n",
+ "\n",
+ "M_N2O=2.*M_N+M_O;\n",
+ "R_N2O=R/M_N2O;\n",
+ "\n",
+ "print'%s %.1f %s'%('Gas constant for CO =',R_CO,'J/(kg.K)')\n",
+ "print'%s %.1f %s'%('Gas constant for CO2 =',R_CO2,'J/(kg.K)')\n",
+ "print'%s %.1f %s'%(\"Gas constant for NO =\",R_NO,\"J/(kg.K)\")\n",
+ "print'%s %.1f %s'%(\"Gas constant for N2O =\",R_N2O,\"J/(kg.K)\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gas constant for CO = 296.9 J/(kg.K)\n",
+ "Gas constant for CO2 = 189.0 J/(kg.K)\n",
+ "Gas constant for NO = 277.1 J/(kg.K)\n",
+ "Gas constant for N2O = 189.0 J/(kg.K)\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate reynodls number and prove the \n",
+ "d=0.004; ## m\n",
+ "rho=1000; ## kg/m^3\n",
+ "v=3; ## m/s\n",
+ "meu=10**(-3); ## khm(m.s)\n",
+ "\n",
+ "Re=rho*v*d/meu; \n",
+ "print'%s %.f %s'%(\"Reynolds number =\",Re,\"\")\n",
+ "\n",
+ "print(\"The Reynolds number is well in excess of 4000, so the flow is turbulent.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reynolds number = 12000 \n",
+ "The Reynolds number is well in excess of 4000, so the flow is turbulent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter1-_1.ipynb b/mechanics_of_fluid/Chapter1-_1.ipynb
new file mode 100755
index 00000000..9483f3d7
--- /dev/null
+++ b/mechanics_of_fluid/Chapter1-_1.ipynb
@@ -0,0 +1,151 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:b9f90dbe8cdd3ac15f14ed9a5dcea4d99b8c522db4806d23bf359fc881d94c73"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter1-Fundamental concepts"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate denisty of air and its mass\n",
+ "p=2.*10**5; ## Pa\n",
+ "T=300.; ## K\n",
+ "R=287.; ## J/(kg.K)\n",
+ "V=3.; ## m^3\n",
+ "\n",
+ "rho=p/(R*T);\n",
+ "print'%s %.2f %s'%('The density of air =',rho,'kg/m^3')\n",
+ "m=rho*V;\n",
+ "print'%s %.2f %s'%('Its mass =',m,'m^3')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The density of air = 2.32 kg/m^3\n",
+ "Its mass = 6.97 m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg19"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate gas constant Co ,Co2 ,No,N2o\n",
+ "M_C=12.;\n",
+ "M_N=14.;\n",
+ "M_O=16.;\n",
+ "R=8314.; ## J/(kg.K)\n",
+ "\n",
+ "M_CO=M_C+M_O;\n",
+ "R_CO=R/M_CO;\n",
+ "\n",
+ "M_CO2=M_C+2.*M_O;\n",
+ "R_CO2=R/M_CO2;\n",
+ "\n",
+ "M_NO=M_N+M_O;\n",
+ "R_NO=R/M_NO;\n",
+ "\n",
+ "M_N2O=2.*M_N+M_O;\n",
+ "R_N2O=R/M_N2O;\n",
+ "\n",
+ "print'%s %.1f %s'%('Gas constant for CO =',R_CO,'J/(kg.K)')\n",
+ "print'%s %.1f %s'%('Gas constant for CO2 =',R_CO2,'J/(kg.K)')\n",
+ "print'%s %.1f %s'%(\"Gas constant for NO =\",R_NO,\"J/(kg.K)\")\n",
+ "print'%s %.1f %s'%(\"Gas constant for N2O =\",R_N2O,\"J/(kg.K)\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gas constant for CO = 296.9 J/(kg.K)\n",
+ "Gas constant for CO2 = 189.0 J/(kg.K)\n",
+ "Gas constant for NO = 277.1 J/(kg.K)\n",
+ "Gas constant for N2O = 189.0 J/(kg.K)\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate reynodls number and prove the \n",
+ "d=0.004; ## m\n",
+ "rho=1000; ## kg/m^3\n",
+ "v=3; ## m/s\n",
+ "meu=10**(-3); ## khm(m.s)\n",
+ "\n",
+ "Re=rho*v*d/meu; \n",
+ "print'%s %.f %s'%(\"Reynolds number =\",Re,\"\")\n",
+ "\n",
+ "print(\"The Reynolds number is well in excess of 4000, so the flow is turbulent.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reynolds number = 12000 \n",
+ "The Reynolds number is well in excess of 4000, so the flow is turbulent.\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter10.ipynb b/mechanics_of_fluid/Chapter10.ipynb
new file mode 100755
index 00000000..9502b293
--- /dev/null
+++ b/mechanics_of_fluid/Chapter10.ipynb
@@ -0,0 +1,355 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:0abcc423492072a54fb770a61520bf727ac4ace788fa5f2dbb0a6db0caff8ec2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter10-Flow with free surfaces"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg436"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The depth of the water under the brigde and the depth of water upstream\n",
+ "Q=400.; ## m^3/s\n",
+ "b2=20.; ## m\n",
+ "g=9.81; ## m/s^2\n",
+ "b1=25.; ## m\n",
+ "\n",
+ "h2=(Q/b2/math.sqrt(g))**(2./3.);\n",
+ "## Since energy is conserved\n",
+ "## h1 + u1^2/2g = h2 +u2^2/2g = h2 + h2/2 = 3h2/2\n",
+ "\n",
+ "## h1 + 1/2*g*(Q/(b1h1))^2 = 3*h2/2;\n",
+ "\n",
+ "## h1^3-5.16*h1^2+13.05 = 0;\n",
+ "\n",
+ "## By solving this cubic equation\n",
+ "\n",
+ "h1=4.52; ## m\n",
+ "\n",
+ "print'%s %.1f %s'%(\" The depth of the water under the brigde =\",h2,\"m\")\n",
+ "\n",
+ "\n",
+ "print'%s %.2f %s'%(\" the depth of water upstream =\",h1,\"m\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The depth of the water under the brigde = 3.4 m\n",
+ " the depth of water upstream = 4.52 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg447"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Rate of flow \n",
+ "w=0.04; ## thickness of block in m\n",
+ "d=0.07; ## depth of liquid in m\n",
+ "b=0.4; ## m\n",
+ "g=9.81; ## m/s^2\n",
+ "\n",
+ "H=d-w; \n",
+ "\n",
+ "Q=1.705*b*H**(3/2.);\n",
+ "\n",
+ "u1=Q/d/b;\n",
+ "h=u1**2/(2.*g);\n",
+ "\n",
+ "H1=H+h;\n",
+ "\n",
+ "Q1=1.705*b*H1**(3/2.);\n",
+ "\n",
+ "print'%s %.4f %s'%(\"Rate of flow =\",Q1,\" m^3/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of flow = 0.0037 m^3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg455"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate depth of water at the throat and the new flow rate and the Froude number at the throat and flow rate\n",
+ "h1=0.45; ## m\n",
+ "g=9.81; ## m/s^2\n",
+ "b1=0.8; ## m\n",
+ "h2=0.35; ## m\n",
+ "b2=0.3; ## m\n",
+ "print(\"the flow rate\")\n",
+ "Q=math.sqrt((h1-h2)*2*g/(-(1./(h1*b1)**2)+(1./(h2*b2)**2)));\n",
+ "print'%s %.3f %s'%(\"Flow rate =\",Q,\"m^3/s\")\n",
+ "\n",
+ "\n",
+ "print(\" the Froude number at the throat\")\n",
+ "Fr2=Q/(math.sqrt(g)*b2*h2**(3/2.));\n",
+ "print'%s %.3f %s'%(\"The Froude number at the throat =\",Fr2,\"\")\n",
+ "\n",
+ "\n",
+ "print(\"the depth of water at the throat\")\n",
+ "\n",
+ "## (h1/h2)^(3) + 1/2*(b2/b1)^2 = 3/2*(h1/h2)^2\n",
+ "\n",
+ "## The solution for the above eqn is as follows\n",
+ "## (h1/h2) = 0.5 + cos(2arcsin(b2/b1)/3)\n",
+ "\n",
+ "## h1/h2=1.467\n",
+ "\n",
+ "h2_new=h1/1.467;\n",
+ "print'%s %.3f %s'%(\"Depth of water at the throat =\",h2_new,\"m\")\n",
+ "\n",
+ "print(\"the new flow rate\")\n",
+ "w=math.sqrt(g)*b2*h2_new**(3/2.);\n",
+ "print'%s %.3f %s'%(\"New flow rate =\",Q,\"m^3/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the flow rate\n",
+ "Flow rate = 0.154 m^3/s\n",
+ " the Froude number at the throat\n",
+ "The Froude number at the throat = 0.790 \n",
+ "the depth of water at the throat\n",
+ "Depth of water at the throat = 0.307 m\n",
+ "the new flow rate\n",
+ "New flow rate = 0.154 m^3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate depth\n",
+ "Q=8.75; ## m^3/s\n",
+ "w=5.; ## m\n",
+ "n=0.0015; \n",
+ "s=1./5000.;\n",
+ "\n",
+ "## Q/(w*h0) = u = m^(2/3)*i^(1/2)/n = 1/0.015*(w*h0/(w+2*h0))^(2/3)*sqrt(s);\n",
+ "## Solution by trial gives h0\n",
+ "h0=1.8; ## m\n",
+ "\n",
+ "q=1.75;\n",
+ "g=9.81;\n",
+ "hc=(q**2/g)**(1/3); ## critical depth\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Depth =\",h0,\"m\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Depth = 1.8 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg469"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate wave length\n",
+ "g=9.81; ## m/s^2\n",
+ "T=5.; ## s\n",
+ "h=4.; ## m\n",
+ "\n",
+ "## lambda=g*T^2/(2*%pi)*tanh(2*%pi*h/lambda1);\n",
+ "## by trial method , we get \n",
+ "lambda1=28.04;\n",
+ "\n",
+ "D=g*T**2/(2*math.pi)*math.tanh(2*math.pi*h/lambda1);\n",
+ "print'%s %.1f %s'%(\"Wavelength =\",D,\"m\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength = 27.9 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EX6-pg470"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate phase velocity and wave length\n",
+ "g=9.81; ## m/s^2\n",
+ "T=12; ## s\n",
+ "\n",
+ "c=g*T/(2*math.pi);\n",
+ "\n",
+ "D=c*T;\n",
+ "\n",
+ "print\"%s %.1f %s\"%(\"Phase velocity =\",c,\"m/s\")\n",
+ "\n",
+ "\n",
+ "print\"%s %.1f %s\"%(\"Wavelength =\",D,\"m\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Phase velocity = 18.7 m/s\n",
+ "Wavelength = 224.8 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg476"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Estimate the time elapsed since the waves were generated in a storm occurring 800 km out to sea and Estimate the depth at which the waves begin to be significantly influenced by the sea bed as they approach the shore\n",
+ "c=18.74; ## m/s\n",
+ "lambd=225.; ## m\n",
+ "\n",
+ "print(\"Estimate the time elapsed since the waves were generated in a storm occurring 800 km out to sea. \")\n",
+ "\n",
+ "x=800.*10**3.; ## m\n",
+ "cg=c/2.;\n",
+ "\n",
+ "t=x/cg;\n",
+ "\n",
+ "print\"%s %.1f %s\"%(\"time elapsed =\",t/3600.,\"hours\")\n",
+ "\n",
+ "\n",
+ "print(\"Estimate the depth at which the waves begin to be significantly influenced by the sea bed as they approach the shore.\")\n",
+ "\n",
+ "h1=lambd/2.;\n",
+ "\n",
+ "h2=lambd/(2.*math.pi)*math.atanh(0.99);\n",
+ "\n",
+ "print\"%s %.1f %s %.1f %s\"%(\"The answers show that h lies in the range between about\",h2,\"m , \",h1, \"m\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Estimate the time elapsed since the waves were generated in a storm occurring 800 km out to sea. \n",
+ "time elapsed = 23.7 hours\n",
+ "Estimate the depth at which the waves begin to be significantly influenced by the sea bed as they approach the shore.\n",
+ "The answers show that h lies in the range between about 94.8 m , 112.5 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter10_1.ipynb b/mechanics_of_fluid/Chapter10_1.ipynb
new file mode 100755
index 00000000..9502b293
--- /dev/null
+++ b/mechanics_of_fluid/Chapter10_1.ipynb
@@ -0,0 +1,355 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:0abcc423492072a54fb770a61520bf727ac4ace788fa5f2dbb0a6db0caff8ec2"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter10-Flow with free surfaces"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg436"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The depth of the water under the brigde and the depth of water upstream\n",
+ "Q=400.; ## m^3/s\n",
+ "b2=20.; ## m\n",
+ "g=9.81; ## m/s^2\n",
+ "b1=25.; ## m\n",
+ "\n",
+ "h2=(Q/b2/math.sqrt(g))**(2./3.);\n",
+ "## Since energy is conserved\n",
+ "## h1 + u1^2/2g = h2 +u2^2/2g = h2 + h2/2 = 3h2/2\n",
+ "\n",
+ "## h1 + 1/2*g*(Q/(b1h1))^2 = 3*h2/2;\n",
+ "\n",
+ "## h1^3-5.16*h1^2+13.05 = 0;\n",
+ "\n",
+ "## By solving this cubic equation\n",
+ "\n",
+ "h1=4.52; ## m\n",
+ "\n",
+ "print'%s %.1f %s'%(\" The depth of the water under the brigde =\",h2,\"m\")\n",
+ "\n",
+ "\n",
+ "print'%s %.2f %s'%(\" the depth of water upstream =\",h1,\"m\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " The depth of the water under the brigde = 3.4 m\n",
+ " the depth of water upstream = 4.52 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg447"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Rate of flow \n",
+ "w=0.04; ## thickness of block in m\n",
+ "d=0.07; ## depth of liquid in m\n",
+ "b=0.4; ## m\n",
+ "g=9.81; ## m/s^2\n",
+ "\n",
+ "H=d-w; \n",
+ "\n",
+ "Q=1.705*b*H**(3/2.);\n",
+ "\n",
+ "u1=Q/d/b;\n",
+ "h=u1**2/(2.*g);\n",
+ "\n",
+ "H1=H+h;\n",
+ "\n",
+ "Q1=1.705*b*H1**(3/2.);\n",
+ "\n",
+ "print'%s %.4f %s'%(\"Rate of flow =\",Q1,\" m^3/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of flow = 0.0037 m^3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg455"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate depth of water at the throat and the new flow rate and the Froude number at the throat and flow rate\n",
+ "h1=0.45; ## m\n",
+ "g=9.81; ## m/s^2\n",
+ "b1=0.8; ## m\n",
+ "h2=0.35; ## m\n",
+ "b2=0.3; ## m\n",
+ "print(\"the flow rate\")\n",
+ "Q=math.sqrt((h1-h2)*2*g/(-(1./(h1*b1)**2)+(1./(h2*b2)**2)));\n",
+ "print'%s %.3f %s'%(\"Flow rate =\",Q,\"m^3/s\")\n",
+ "\n",
+ "\n",
+ "print(\" the Froude number at the throat\")\n",
+ "Fr2=Q/(math.sqrt(g)*b2*h2**(3/2.));\n",
+ "print'%s %.3f %s'%(\"The Froude number at the throat =\",Fr2,\"\")\n",
+ "\n",
+ "\n",
+ "print(\"the depth of water at the throat\")\n",
+ "\n",
+ "## (h1/h2)^(3) + 1/2*(b2/b1)^2 = 3/2*(h1/h2)^2\n",
+ "\n",
+ "## The solution for the above eqn is as follows\n",
+ "## (h1/h2) = 0.5 + cos(2arcsin(b2/b1)/3)\n",
+ "\n",
+ "## h1/h2=1.467\n",
+ "\n",
+ "h2_new=h1/1.467;\n",
+ "print'%s %.3f %s'%(\"Depth of water at the throat =\",h2_new,\"m\")\n",
+ "\n",
+ "print(\"the new flow rate\")\n",
+ "w=math.sqrt(g)*b2*h2_new**(3/2.);\n",
+ "print'%s %.3f %s'%(\"New flow rate =\",Q,\"m^3/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the flow rate\n",
+ "Flow rate = 0.154 m^3/s\n",
+ " the Froude number at the throat\n",
+ "The Froude number at the throat = 0.790 \n",
+ "the depth of water at the throat\n",
+ "Depth of water at the throat = 0.307 m\n",
+ "the new flow rate\n",
+ "New flow rate = 0.154 m^3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate depth\n",
+ "Q=8.75; ## m^3/s\n",
+ "w=5.; ## m\n",
+ "n=0.0015; \n",
+ "s=1./5000.;\n",
+ "\n",
+ "## Q/(w*h0) = u = m^(2/3)*i^(1/2)/n = 1/0.015*(w*h0/(w+2*h0))^(2/3)*sqrt(s);\n",
+ "## Solution by trial gives h0\n",
+ "h0=1.8; ## m\n",
+ "\n",
+ "q=1.75;\n",
+ "g=9.81;\n",
+ "hc=(q**2/g)**(1/3); ## critical depth\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Depth =\",h0,\"m\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Depth = 1.8 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg469"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate wave length\n",
+ "g=9.81; ## m/s^2\n",
+ "T=5.; ## s\n",
+ "h=4.; ## m\n",
+ "\n",
+ "## lambda=g*T^2/(2*%pi)*tanh(2*%pi*h/lambda1);\n",
+ "## by trial method , we get \n",
+ "lambda1=28.04;\n",
+ "\n",
+ "D=g*T**2/(2*math.pi)*math.tanh(2*math.pi*h/lambda1);\n",
+ "print'%s %.1f %s'%(\"Wavelength =\",D,\"m\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength = 27.9 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "EX6-pg470"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate phase velocity and wave length\n",
+ "g=9.81; ## m/s^2\n",
+ "T=12; ## s\n",
+ "\n",
+ "c=g*T/(2*math.pi);\n",
+ "\n",
+ "D=c*T;\n",
+ "\n",
+ "print\"%s %.1f %s\"%(\"Phase velocity =\",c,\"m/s\")\n",
+ "\n",
+ "\n",
+ "print\"%s %.1f %s\"%(\"Wavelength =\",D,\"m\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Phase velocity = 18.7 m/s\n",
+ "Wavelength = 224.8 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg476"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Estimate the time elapsed since the waves were generated in a storm occurring 800 km out to sea and Estimate the depth at which the waves begin to be significantly influenced by the sea bed as they approach the shore\n",
+ "c=18.74; ## m/s\n",
+ "lambd=225.; ## m\n",
+ "\n",
+ "print(\"Estimate the time elapsed since the waves were generated in a storm occurring 800 km out to sea. \")\n",
+ "\n",
+ "x=800.*10**3.; ## m\n",
+ "cg=c/2.;\n",
+ "\n",
+ "t=x/cg;\n",
+ "\n",
+ "print\"%s %.1f %s\"%(\"time elapsed =\",t/3600.,\"hours\")\n",
+ "\n",
+ "\n",
+ "print(\"Estimate the depth at which the waves begin to be significantly influenced by the sea bed as they approach the shore.\")\n",
+ "\n",
+ "h1=lambd/2.;\n",
+ "\n",
+ "h2=lambd/(2.*math.pi)*math.atanh(0.99);\n",
+ "\n",
+ "print\"%s %.1f %s %.1f %s\"%(\"The answers show that h lies in the range between about\",h2,\"m , \",h1, \"m\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Estimate the time elapsed since the waves were generated in a storm occurring 800 km out to sea. \n",
+ "time elapsed = 23.7 hours\n",
+ "Estimate the depth at which the waves begin to be significantly influenced by the sea bed as they approach the shore.\n",
+ "The answers show that h lies in the range between about 94.8 m , 112.5 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter11.ipynb b/mechanics_of_fluid/Chapter11.ipynb
new file mode 100755
index 00000000..fd043621
--- /dev/null
+++ b/mechanics_of_fluid/Chapter11.ipynb
@@ -0,0 +1,433 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:a7351edf5e2fdcb0afd4d02f998ad2152ac8acdf9928739e63efa7de906e2b49"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter11-Compressible Flow of Gases"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg492"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate \"Density at plane 1 and tagnation temperature and temperautre and density\n",
+ "p1=1.5*10**5; ## N/m^2\n",
+ "R=287.; ## J/kg.K\n",
+ "T1=271.; ## K\n",
+ "\n",
+ "rho1=p1/R/T1; \n",
+ "print'%s %.1f %s'%(\"Density at plane 1 =\",rho1,\"kg/m^3\")\n",
+ "\n",
+ "\n",
+ "print(\"the stagnation temperature\")\n",
+ "\n",
+ "u1=270.; ## m/s\n",
+ "cp=1005.; ## J/Kg.K\n",
+ "\n",
+ "T0=T1+u1**2./(2.*cp);\n",
+ "print'%s %.1f %s'%(\"The stagnation temperature =\",T0,\"K\")\n",
+ "\n",
+ "\n",
+ "print(\"the temperature and density at plane 2\")\n",
+ "\n",
+ "u2=320; ## m/s\n",
+ "p2=1.2*10**5; ## N/m^2\n",
+ "\n",
+ "T2=T0-u2**2/(2*cp);\n",
+ "print'%s %.1f %s'%(\"Temperature = \",T2,\"K\")\n",
+ "\n",
+ "\n",
+ "rho2=p2/(R*T2);\n",
+ "print'%s %.2f %s'%(\"density =\",rho2,\"kg/m^3\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Density at plane 1 = 1.9 kg/m^3\n",
+ "the stagnation temperature\n",
+ "The stagnation temperature = 307.3 K\n",
+ "the temperature and density at plane 2\n",
+ "Temperature = 256.3 K\n",
+ "density = 1.63 kg/m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg509"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Deflection angle and the final Mach number and the pressure ratio across the wave\n",
+ "y=1.4;\n",
+ "R=287.; ## J/kg.K\n",
+ "T1=238.; ## K\n",
+ "u1=773.; ## m/s\n",
+ "beta1=38.; ## degrees\n",
+ "cp=1005.; ## J/kg.K\n",
+ "\n",
+ "a1=math.sqrt(y*R*T1);\n",
+ "M1=u1/a1;\n",
+ "\n",
+ "beta2=math.atan(math.tan(beta1)*((2.+(y-1.)*M1**2.*(math.sin(beta1))**2.)/((y+1.)*M1**2.*(math.sin(beta1))**2.)));\n",
+ "\n",
+ "deflection_angle=beta1-beta2;\n",
+ "print'%s %.1f %s'%(\"Deflection angle =\",deflection_angle,\"degrees\")\n",
+ "\n",
+ "\n",
+ "print(\"the final Mach number\")\n",
+ "\n",
+ "u2=u1*math.cos(beta1)/math.cos(beta2);\n",
+ "\n",
+ "T2=T1+1./(2.*cp)*(u1**2.-u2**2.);\n",
+ "a2=math.sqrt(y*R*T2);\n",
+ "\n",
+ "M2=u2/a2;\n",
+ "\n",
+ "print'%s %.2f %s'%(\"Final Mach number =\",M2,\"\")\n",
+ "\n",
+ "\n",
+ "print(\" the pressure ratio across the wave.\")\n",
+ "ratio=T2/T1*(math.tan(beta1)/math.tan(beta2));\n",
+ "print'%s %.2f %s'%(\"Pressure ratio =\",ratio,\"\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Deflection angle = 37.5 degrees\n",
+ "the final Mach number\n",
+ "Final Mach number = 3.02 \n",
+ " the pressure ratio across the wave.\n",
+ "Pressure ratio = 0.47 \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg515"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Pressure after the bend\n",
+ "M1=1.8;\n",
+ "theta1=20.73; ## degrees\n",
+ "theta2=30.73; ## degrees\n",
+ "M2=2.162;\n",
+ "p1=50; ## kPa\n",
+ "y=1.4;\n",
+ "\n",
+ "p2=p1*((1.+(y-1.)/2.*M1**2.)/(1.+(y-1.)/2.*M2**2.))**(y/(y-1.));\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Pressure after the bend =\",p2,\"kPa\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure after the bend = 28.5 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg525"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate the pressures in the reservoir and at the nozzle throat and Pressure in the reservoir and Pressure at the nozzle throat and the temperature and velocity of the air at the exit \n",
+ "p=28*10**3; ## N/m^2 \n",
+ "y=1.4;\n",
+ "M1=2.4;\n",
+ "M2=1.;\n",
+ "T0=291.; ## K\n",
+ "R=287.; ## J/kg.K\n",
+ "\n",
+ "print(\"the pressures in the reservoir and at the nozzle throat\")\n",
+ "\n",
+ "p0=p*(1+(y-1)/2*M1**2)**(y/(y-1));\n",
+ "pc=p0*(1+(y-1)/2*M2**2)**(-y/(y-1));\n",
+ "\n",
+ "print'%s %.2f %s'%(\"Pressure in the reservoir =\",p0,\"N/m^2\")\n",
+ "\n",
+ "print'%s %.2f %s'%(\"Pressure at the nozzle throat =\",pc,\"N/m^2\")\n",
+ "\n",
+ "\n",
+ "print(\"the temperature and velocity of the air at the exit.\")\n",
+ "\n",
+ "T=T0*(1+(y-1)/2*M1**2)**(-1);\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Temperature =\",T,\"K\")\n",
+ "\n",
+ "\n",
+ "a=math.sqrt(y*R*T)\n",
+ "\n",
+ "u=M1*a;\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Velocity =\",u,\"m/s\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the pressures in the reservoir and at the nozzle throat\n",
+ "Pressure in the reservoir = 409360.53 N/m^2\n",
+ "Pressure at the nozzle throat = 216257.71 N/m^2\n",
+ "the temperature and velocity of the air at the exit.\n",
+ "Temperature = 135.2 K\n",
+ "Velocity = 559.4 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg529"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Mach number before the shock and Stagnation Pressure\n",
+ "M_He=1.8;\n",
+ "y_He=5/3;\n",
+ "y_air=1.4;\n",
+ "p2=30; ## kPa\n",
+ "\n",
+ "## (A/At)=(1+(y-1)/2*M^2)^((y+1)/(y-1))/M^2*(2/(y+1))^((y+1)/(y-1))\n",
+ "\n",
+ "## = (1+1/3*1.8^2)^(4)/1.8^(2)*(3/4)^(4) = 1.828 for helium\n",
+ "\n",
+ "## = (1+0.2*M^2)^6/M^2*1/1.2^6 for air\n",
+ "## Hence by trial \n",
+ "\n",
+ "M1=1.715;\n",
+ "print'%s %.3f %s'%(\"Mach number before the shock =\",M1,\"\")\n",
+ "\n",
+ "\n",
+ "p1=p2/((2*y_air*M1**2-(y_air-1))/(y_air+1));\n",
+ "\n",
+ "p0_1=p1*(1+(y_air-1)/2*M1**2)**(y_air/(y_air-1));\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Stagnation Pressure =\",p0_1,\"kPa\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mach number before the shock = 1.715 \n",
+ "Stagnation Pressure = 46.4 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg538"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate the value of the friction factor for the pipe and friction factor and the overall length of the pipe, L, if the flow exhausts to atmosphere\n",
+ "p0=510.; ## kPa\n",
+ "pA=500.; ## kPa\n",
+ "pB=280.; ## kPa\n",
+ "d=0.02; ## m\n",
+ "l_max=12.; ## m\n",
+ "\n",
+ "print(\" the value of the friction factor for the pipe\");\n",
+ "\n",
+ "## At A, pA/p0 = 500/510 = 0.980. From the Isentropic Flow Tables (Appendix 3), M_A = 0.17.\n",
+ "\n",
+ "pC=pA*0.1556;\n",
+ "\n",
+ "## From the Fanno Tables at pc/pB = 0.278,M_B = 0.302 and (fl_maxP/A)B = 5.21. For a circular pipe P/A=4/d\n",
+ "M_B=0.302;\n",
+ "f=(21.37-5.21)/l_max/4*d;\n",
+ "\n",
+ "print'%s %.3f %s'%(\"friction factor =\",f,\"\")\n",
+ "\n",
+ "\n",
+ "print(\" the overall length of the pipe, L, if the flow exhausts to atmosphere\")\n",
+ "\n",
+ "p=100; ## kPa\n",
+ "\n",
+ "## At exit, pc/p = 77.8/100 = 0.778. From the Fanno Tables, (fl_maxP/A) = 0.07\n",
+ "L=l_max*(21.37-0.07)/(21.37-5.21);\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Overall Length =\",L,\"m\")\n",
+ "\n",
+ "print(\" the mass flow rate if the reservoir temperature is 294 K.\")\n",
+ "T0=294.; ## K\n",
+ "R=287.; ## J/kg.K\n",
+ "y=1.4;\n",
+ "M=0.302;\n",
+ "\n",
+ "m=math.pi/4.*d**2.*pB*10.**3.*M_B*(y*(1.+(y-1.)*M**2./2.)/R/T0)**(1/2.);\n",
+ "print'%s %.3f %s'%(\"mass flow rate =\",m,\"kg/s\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " the value of the friction factor for the pipe\n",
+ "friction factor = 0.007 \n",
+ " the overall length of the pipe, L, if the flow exhausts to atmosphere\n",
+ "Overall Length = 15.8 m\n",
+ " the mass flow rate if the reservoir temperature is 294 K.\n",
+ "mass flow rate = 0.109 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg542"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Diameter of pipe and Entry and Exit Mach number and at various points\n",
+ "p1=8.*10.**5.; ## N/m**2\n",
+ "p2=5.*10.**5.; ## N/m**2\n",
+ "f=0.006;\n",
+ "l=145.; ## m\n",
+ "m=0.32; ## kg/s\n",
+ "R=287.; ## J/kg.K\n",
+ "T=288.; ## K\n",
+ "y=1.4;\n",
+ "\n",
+ "d=(4.*f*l*m**2.*R*T/(math.pi/4.)**2./(p1**2.-p2**2.))**(1/5.);\n",
+ "print'%s %.3f %s'%(\" Diameter of pipe =\",d,\"m\")\n",
+ "\n",
+ "rho=p1/R/T;\n",
+ "A=math.pi/4.*d**2.;\n",
+ "u=m/rho/A;\n",
+ "\n",
+ "a=math.sqrt(y*R*T);\n",
+ "\n",
+ "M1=u/a;\n",
+ "M2=p1/p2*M1;\n",
+ "\n",
+ "print(\" Entry and Exit Mach number =\")\n",
+ "\n",
+ "print'%s %.3f %s'%(\"Entry Mach number =\",M1,\"\")\n",
+ "\n",
+ "\n",
+ "print'%s %.2f %s'%(\"Exit Mach number =\",M2,\"\")\n",
+ "\n",
+ "print(\" Determine the pressure halfway along the pipe.\")\n",
+ "px=math.sqrt((p1**2.+p2**2.)/2.);\n",
+ "print'%s %.1f %s'%(\"Pressure =\",px,\"N/m**2\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Diameter of pipe = 0.041 m\n",
+ " Entry and Exit Mach number =\n",
+ "Entry Mach number = 0.072 \n",
+ "Exit Mach number = 0.12 \n",
+ " Determine the pressure halfway along the pipe.\n",
+ "Pressure = 667083.2 N/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter11_1.ipynb b/mechanics_of_fluid/Chapter11_1.ipynb
new file mode 100755
index 00000000..fd043621
--- /dev/null
+++ b/mechanics_of_fluid/Chapter11_1.ipynb
@@ -0,0 +1,433 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:a7351edf5e2fdcb0afd4d02f998ad2152ac8acdf9928739e63efa7de906e2b49"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter11-Compressible Flow of Gases"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg492"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate \"Density at plane 1 and tagnation temperature and temperautre and density\n",
+ "p1=1.5*10**5; ## N/m^2\n",
+ "R=287.; ## J/kg.K\n",
+ "T1=271.; ## K\n",
+ "\n",
+ "rho1=p1/R/T1; \n",
+ "print'%s %.1f %s'%(\"Density at plane 1 =\",rho1,\"kg/m^3\")\n",
+ "\n",
+ "\n",
+ "print(\"the stagnation temperature\")\n",
+ "\n",
+ "u1=270.; ## m/s\n",
+ "cp=1005.; ## J/Kg.K\n",
+ "\n",
+ "T0=T1+u1**2./(2.*cp);\n",
+ "print'%s %.1f %s'%(\"The stagnation temperature =\",T0,\"K\")\n",
+ "\n",
+ "\n",
+ "print(\"the temperature and density at plane 2\")\n",
+ "\n",
+ "u2=320; ## m/s\n",
+ "p2=1.2*10**5; ## N/m^2\n",
+ "\n",
+ "T2=T0-u2**2/(2*cp);\n",
+ "print'%s %.1f %s'%(\"Temperature = \",T2,\"K\")\n",
+ "\n",
+ "\n",
+ "rho2=p2/(R*T2);\n",
+ "print'%s %.2f %s'%(\"density =\",rho2,\"kg/m^3\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Density at plane 1 = 1.9 kg/m^3\n",
+ "the stagnation temperature\n",
+ "The stagnation temperature = 307.3 K\n",
+ "the temperature and density at plane 2\n",
+ "Temperature = 256.3 K\n",
+ "density = 1.63 kg/m^3\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg509"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Deflection angle and the final Mach number and the pressure ratio across the wave\n",
+ "y=1.4;\n",
+ "R=287.; ## J/kg.K\n",
+ "T1=238.; ## K\n",
+ "u1=773.; ## m/s\n",
+ "beta1=38.; ## degrees\n",
+ "cp=1005.; ## J/kg.K\n",
+ "\n",
+ "a1=math.sqrt(y*R*T1);\n",
+ "M1=u1/a1;\n",
+ "\n",
+ "beta2=math.atan(math.tan(beta1)*((2.+(y-1.)*M1**2.*(math.sin(beta1))**2.)/((y+1.)*M1**2.*(math.sin(beta1))**2.)));\n",
+ "\n",
+ "deflection_angle=beta1-beta2;\n",
+ "print'%s %.1f %s'%(\"Deflection angle =\",deflection_angle,\"degrees\")\n",
+ "\n",
+ "\n",
+ "print(\"the final Mach number\")\n",
+ "\n",
+ "u2=u1*math.cos(beta1)/math.cos(beta2);\n",
+ "\n",
+ "T2=T1+1./(2.*cp)*(u1**2.-u2**2.);\n",
+ "a2=math.sqrt(y*R*T2);\n",
+ "\n",
+ "M2=u2/a2;\n",
+ "\n",
+ "print'%s %.2f %s'%(\"Final Mach number =\",M2,\"\")\n",
+ "\n",
+ "\n",
+ "print(\" the pressure ratio across the wave.\")\n",
+ "ratio=T2/T1*(math.tan(beta1)/math.tan(beta2));\n",
+ "print'%s %.2f %s'%(\"Pressure ratio =\",ratio,\"\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Deflection angle = 37.5 degrees\n",
+ "the final Mach number\n",
+ "Final Mach number = 3.02 \n",
+ " the pressure ratio across the wave.\n",
+ "Pressure ratio = 0.47 \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg515"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Pressure after the bend\n",
+ "M1=1.8;\n",
+ "theta1=20.73; ## degrees\n",
+ "theta2=30.73; ## degrees\n",
+ "M2=2.162;\n",
+ "p1=50; ## kPa\n",
+ "y=1.4;\n",
+ "\n",
+ "p2=p1*((1.+(y-1.)/2.*M1**2.)/(1.+(y-1.)/2.*M2**2.))**(y/(y-1.));\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Pressure after the bend =\",p2,\"kPa\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure after the bend = 28.5 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg525"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate the pressures in the reservoir and at the nozzle throat and Pressure in the reservoir and Pressure at the nozzle throat and the temperature and velocity of the air at the exit \n",
+ "p=28*10**3; ## N/m^2 \n",
+ "y=1.4;\n",
+ "M1=2.4;\n",
+ "M2=1.;\n",
+ "T0=291.; ## K\n",
+ "R=287.; ## J/kg.K\n",
+ "\n",
+ "print(\"the pressures in the reservoir and at the nozzle throat\")\n",
+ "\n",
+ "p0=p*(1+(y-1)/2*M1**2)**(y/(y-1));\n",
+ "pc=p0*(1+(y-1)/2*M2**2)**(-y/(y-1));\n",
+ "\n",
+ "print'%s %.2f %s'%(\"Pressure in the reservoir =\",p0,\"N/m^2\")\n",
+ "\n",
+ "print'%s %.2f %s'%(\"Pressure at the nozzle throat =\",pc,\"N/m^2\")\n",
+ "\n",
+ "\n",
+ "print(\"the temperature and velocity of the air at the exit.\")\n",
+ "\n",
+ "T=T0*(1+(y-1)/2*M1**2)**(-1);\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Temperature =\",T,\"K\")\n",
+ "\n",
+ "\n",
+ "a=math.sqrt(y*R*T)\n",
+ "\n",
+ "u=M1*a;\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Velocity =\",u,\"m/s\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the pressures in the reservoir and at the nozzle throat\n",
+ "Pressure in the reservoir = 409360.53 N/m^2\n",
+ "Pressure at the nozzle throat = 216257.71 N/m^2\n",
+ "the temperature and velocity of the air at the exit.\n",
+ "Temperature = 135.2 K\n",
+ "Velocity = 559.4 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg529"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Mach number before the shock and Stagnation Pressure\n",
+ "M_He=1.8;\n",
+ "y_He=5/3;\n",
+ "y_air=1.4;\n",
+ "p2=30; ## kPa\n",
+ "\n",
+ "## (A/At)=(1+(y-1)/2*M^2)^((y+1)/(y-1))/M^2*(2/(y+1))^((y+1)/(y-1))\n",
+ "\n",
+ "## = (1+1/3*1.8^2)^(4)/1.8^(2)*(3/4)^(4) = 1.828 for helium\n",
+ "\n",
+ "## = (1+0.2*M^2)^6/M^2*1/1.2^6 for air\n",
+ "## Hence by trial \n",
+ "\n",
+ "M1=1.715;\n",
+ "print'%s %.3f %s'%(\"Mach number before the shock =\",M1,\"\")\n",
+ "\n",
+ "\n",
+ "p1=p2/((2*y_air*M1**2-(y_air-1))/(y_air+1));\n",
+ "\n",
+ "p0_1=p1*(1+(y_air-1)/2*M1**2)**(y_air/(y_air-1));\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Stagnation Pressure =\",p0_1,\"kPa\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mach number before the shock = 1.715 \n",
+ "Stagnation Pressure = 46.4 kPa\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg538"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate the value of the friction factor for the pipe and friction factor and the overall length of the pipe, L, if the flow exhausts to atmosphere\n",
+ "p0=510.; ## kPa\n",
+ "pA=500.; ## kPa\n",
+ "pB=280.; ## kPa\n",
+ "d=0.02; ## m\n",
+ "l_max=12.; ## m\n",
+ "\n",
+ "print(\" the value of the friction factor for the pipe\");\n",
+ "\n",
+ "## At A, pA/p0 = 500/510 = 0.980. From the Isentropic Flow Tables (Appendix 3), M_A = 0.17.\n",
+ "\n",
+ "pC=pA*0.1556;\n",
+ "\n",
+ "## From the Fanno Tables at pc/pB = 0.278,M_B = 0.302 and (fl_maxP/A)B = 5.21. For a circular pipe P/A=4/d\n",
+ "M_B=0.302;\n",
+ "f=(21.37-5.21)/l_max/4*d;\n",
+ "\n",
+ "print'%s %.3f %s'%(\"friction factor =\",f,\"\")\n",
+ "\n",
+ "\n",
+ "print(\" the overall length of the pipe, L, if the flow exhausts to atmosphere\")\n",
+ "\n",
+ "p=100; ## kPa\n",
+ "\n",
+ "## At exit, pc/p = 77.8/100 = 0.778. From the Fanno Tables, (fl_maxP/A) = 0.07\n",
+ "L=l_max*(21.37-0.07)/(21.37-5.21);\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Overall Length =\",L,\"m\")\n",
+ "\n",
+ "print(\" the mass flow rate if the reservoir temperature is 294 K.\")\n",
+ "T0=294.; ## K\n",
+ "R=287.; ## J/kg.K\n",
+ "y=1.4;\n",
+ "M=0.302;\n",
+ "\n",
+ "m=math.pi/4.*d**2.*pB*10.**3.*M_B*(y*(1.+(y-1.)*M**2./2.)/R/T0)**(1/2.);\n",
+ "print'%s %.3f %s'%(\"mass flow rate =\",m,\"kg/s\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " the value of the friction factor for the pipe\n",
+ "friction factor = 0.007 \n",
+ " the overall length of the pipe, L, if the flow exhausts to atmosphere\n",
+ "Overall Length = 15.8 m\n",
+ " the mass flow rate if the reservoir temperature is 294 K.\n",
+ "mass flow rate = 0.109 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg542"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Diameter of pipe and Entry and Exit Mach number and at various points\n",
+ "p1=8.*10.**5.; ## N/m**2\n",
+ "p2=5.*10.**5.; ## N/m**2\n",
+ "f=0.006;\n",
+ "l=145.; ## m\n",
+ "m=0.32; ## kg/s\n",
+ "R=287.; ## J/kg.K\n",
+ "T=288.; ## K\n",
+ "y=1.4;\n",
+ "\n",
+ "d=(4.*f*l*m**2.*R*T/(math.pi/4.)**2./(p1**2.-p2**2.))**(1/5.);\n",
+ "print'%s %.3f %s'%(\" Diameter of pipe =\",d,\"m\")\n",
+ "\n",
+ "rho=p1/R/T;\n",
+ "A=math.pi/4.*d**2.;\n",
+ "u=m/rho/A;\n",
+ "\n",
+ "a=math.sqrt(y*R*T);\n",
+ "\n",
+ "M1=u/a;\n",
+ "M2=p1/p2*M1;\n",
+ "\n",
+ "print(\" Entry and Exit Mach number =\")\n",
+ "\n",
+ "print'%s %.3f %s'%(\"Entry Mach number =\",M1,\"\")\n",
+ "\n",
+ "\n",
+ "print'%s %.2f %s'%(\"Exit Mach number =\",M2,\"\")\n",
+ "\n",
+ "print(\" Determine the pressure halfway along the pipe.\")\n",
+ "px=math.sqrt((p1**2.+p2**2.)/2.);\n",
+ "print'%s %.1f %s'%(\"Pressure =\",px,\"N/m**2\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Diameter of pipe = 0.041 m\n",
+ " Entry and Exit Mach number =\n",
+ "Entry Mach number = 0.072 \n",
+ "Exit Mach number = 0.12 \n",
+ " Determine the pressure halfway along the pipe.\n",
+ "Pressure = 667083.2 N/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter12-.ipynb b/mechanics_of_fluid/Chapter12-.ipynb
new file mode 100755
index 00000000..2905ba7e
--- /dev/null
+++ b/mechanics_of_fluid/Chapter12-.ipynb
@@ -0,0 +1,141 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1f6973f8c8d9996abb4c23a2c5352b16bfcd60086af954d2e49808504d3171d0"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "CHapter12-Unsteady Flow"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg557"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Time for which flow into the tank continues after the power failure \n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "Q=0.05; ## m^3/s\n",
+ "d=0.15; ## m^2\n",
+ "h=8.; ## m\n",
+ "g=9.81; ## m/s^2\n",
+ "l=90.; ## m\n",
+ "f=0.007;\n",
+ "\n",
+ "u1=Q/(math.pi/4.*d**2.);\n",
+ "\n",
+ "def function(u):\n",
+ "\tfun=(1./((h*g/l)+(2.*f/d)*u**2))\n",
+ "\treturn fun\n",
+ "\n",
+ "t=scipy.integrate.quad(function,u1,0)\n",
+ "\n",
+ "\n",
+ "print(\"Time for which flow into the tank continues after the power failure is\" )\n",
+ "print'%s %.1f %s'%(\" \",-t[0],\"s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time for which flow into the tank continues after the power failure is\n",
+ " 2.6 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg588"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Estimate the height of tank required\n",
+ "\n",
+ "print(\"Estimate the height of tank required\")\n",
+ "\n",
+ "f=0.006;\n",
+ "l=1400.; ## m\n",
+ "g=9.81; ## m/s^2\n",
+ "d1=0.75; ## m\n",
+ "d2=3.; ## m\n",
+ "Q=1.2; ## m^3/s\n",
+ "a=20.; ## m\n",
+ "\n",
+ "K=4*f*l/(2*g*d1);\n",
+ "\n",
+ "## 2*K*Y = l*a/(g*A) = 8.919 s^2\n",
+ "\n",
+ "## Y=2*K*Y/2*K\n",
+ "\n",
+ "Y=8.919/(2*K);\n",
+ "## When t=0\n",
+ "\n",
+ "u0=Q/(math.pi/4*d1**2);\n",
+ "\n",
+ "y0=K*u0**2;\n",
+ "\n",
+ "C=-Y/K/math.exp(y0/Y);\n",
+ "\n",
+ "## To determine the height of the surge tank, we consider the condition y = y_max when u = 0. \n",
+ "\n",
+ "## 0 = 1/K*(y_max+Y) + C*exp(y_max/Y)\n",
+ "\n",
+ "## From the above eqn we get\n",
+ "\n",
+ "y_max=-Y;\n",
+ "\n",
+ "H=a-y_max;\n",
+ "print'%s %.1f %s'%(\"The minimum height of the surge tank =\",H,\"m\")\n",
+ "\n",
+ "\n",
+ "print(\"The actual design height should exceed the minimum required, say 23 m\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Estimate the height of tank required\n",
+ "The minimum height of the surge tank = 22.0 m\n",
+ "The actual design height should exceed the minimum required, say 23 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter12-_1.ipynb b/mechanics_of_fluid/Chapter12-_1.ipynb
new file mode 100755
index 00000000..2905ba7e
--- /dev/null
+++ b/mechanics_of_fluid/Chapter12-_1.ipynb
@@ -0,0 +1,141 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1f6973f8c8d9996abb4c23a2c5352b16bfcd60086af954d2e49808504d3171d0"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "CHapter12-Unsteady Flow"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg557"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Time for which flow into the tank continues after the power failure \n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "Q=0.05; ## m^3/s\n",
+ "d=0.15; ## m^2\n",
+ "h=8.; ## m\n",
+ "g=9.81; ## m/s^2\n",
+ "l=90.; ## m\n",
+ "f=0.007;\n",
+ "\n",
+ "u1=Q/(math.pi/4.*d**2.);\n",
+ "\n",
+ "def function(u):\n",
+ "\tfun=(1./((h*g/l)+(2.*f/d)*u**2))\n",
+ "\treturn fun\n",
+ "\n",
+ "t=scipy.integrate.quad(function,u1,0)\n",
+ "\n",
+ "\n",
+ "print(\"Time for which flow into the tank continues after the power failure is\" )\n",
+ "print'%s %.1f %s'%(\" \",-t[0],\"s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time for which flow into the tank continues after the power failure is\n",
+ " 2.6 s\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg588"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Estimate the height of tank required\n",
+ "\n",
+ "print(\"Estimate the height of tank required\")\n",
+ "\n",
+ "f=0.006;\n",
+ "l=1400.; ## m\n",
+ "g=9.81; ## m/s^2\n",
+ "d1=0.75; ## m\n",
+ "d2=3.; ## m\n",
+ "Q=1.2; ## m^3/s\n",
+ "a=20.; ## m\n",
+ "\n",
+ "K=4*f*l/(2*g*d1);\n",
+ "\n",
+ "## 2*K*Y = l*a/(g*A) = 8.919 s^2\n",
+ "\n",
+ "## Y=2*K*Y/2*K\n",
+ "\n",
+ "Y=8.919/(2*K);\n",
+ "## When t=0\n",
+ "\n",
+ "u0=Q/(math.pi/4*d1**2);\n",
+ "\n",
+ "y0=K*u0**2;\n",
+ "\n",
+ "C=-Y/K/math.exp(y0/Y);\n",
+ "\n",
+ "## To determine the height of the surge tank, we consider the condition y = y_max when u = 0. \n",
+ "\n",
+ "## 0 = 1/K*(y_max+Y) + C*exp(y_max/Y)\n",
+ "\n",
+ "## From the above eqn we get\n",
+ "\n",
+ "y_max=-Y;\n",
+ "\n",
+ "H=a-y_max;\n",
+ "print'%s %.1f %s'%(\"The minimum height of the surge tank =\",H,\"m\")\n",
+ "\n",
+ "\n",
+ "print(\"The actual design height should exceed the minimum required, say 23 m\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Estimate the height of tank required\n",
+ "The minimum height of the surge tank = 22.0 m\n",
+ "The actual design height should exceed the minimum required, say 23 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter13.ipynb b/mechanics_of_fluid/Chapter13.ipynb
new file mode 100755
index 00000000..4bd1ca7e
--- /dev/null
+++ b/mechanics_of_fluid/Chapter13.ipynb
@@ -0,0 +1,166 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:6ab6ca7ec50b12b4ad5664b1412855d8b1bafd30fee8faf6c1773c772ff215d4"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter13-Fluid Machines"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg618"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Hydraulic Efficiency and Overall Efficiency and Outlet angles of the guide vanes and Rotor blade angle at inlet and oulet\n",
+ "\n",
+ "## Maximum hydraulic efficiency occurs for minimum pressure loss, that is, when\n",
+ "\n",
+ "## dp1/dQ=2.38Q-1.43=0\n",
+ "\n",
+ "Q_opt=1.43/2.38;\n",
+ "\n",
+ "p1_min=1.19*Q_opt**2-1.43*Q_opt+0.47; ## MPa\n",
+ "\n",
+ "rho=1000.; ## kg/m**3\n",
+ "g=9.81; ## m/s**2\n",
+ "w=69.1; ## rad/s\n",
+ "P=200.*10.**3.; ## W\n",
+ "Ohm_P=0.565; ## rad\n",
+ "d=0.5; ## m\n",
+ "h=0.06; ## m\n",
+ "\n",
+ "p1=p1_min*10.**6./(rho*g); ## mH2O, coversion of units\n",
+ "\n",
+ "H=(w*P**(1/2.)/(rho**(1/2.)*Ohm_P))**(4/5.)/g;\n",
+ "\n",
+ "Hydraulic_efficiency=(H-p1)/H;\n",
+ "print'%s %.3f %s'%(\"Hydraulic Efficiency =\",Hydraulic_efficiency,\"\")\n",
+ "\n",
+ "\n",
+ "Overall_efficiency=P/(Q_opt*rho*g*H);\n",
+ "print'%s %.3f %s'%(\"Overall Efficiency =\",Overall_efficiency,\"\")\n",
+ "\n",
+ "\n",
+ "H_Euler=H-p1;\n",
+ "\n",
+ "u1=w*0.25;\n",
+ "v_w1=g*H_Euler/u1;\n",
+ "A=math.pi*d*h*0.95; \n",
+ "v_r=Q_opt/A;\n",
+ "\n",
+ "alpha1=math.atan(v_r/v_w1);\n",
+ "print'%s %.3f %s'%(\"Outlet angles of the guide vanes =\",alpha1,\"degrees\")\n",
+ "\n",
+ "beta1=math.atan(v_r/(v_w1-u1));\n",
+ "print'%s %.2f %s'%(\"Rotor blade angle at inlet =\",beta1,\"degrees\")\n",
+ "\n",
+ "u2=w*0.325/2;\n",
+ "beta2=math.atan(v_r/u2);\n",
+ "print'%s %.3f %s'%(\"Rotor blade angle at outlet =\",beta2,\"degrees\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hydraulic Efficiency = 0.896 \n",
+ "Overall Efficiency = 0.855 \n",
+ "Outlet angles of the guide vanes = 0.321 degrees\n",
+ "Rotor blade angle at inlet = 1.16 degrees\n",
+ "Rotor blade angle at outlet = 0.539 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg622"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Overall efficiency and Limiting value for the height of the draft tube above\n",
+ "w=6.25;\n",
+ "D=0.75; ## m\n",
+ "gv_angle=15; ## guide vane angle in degrees\n",
+ "g=9.81; ## m/s^2\n",
+ "H=27.5; ## m\n",
+ "A1=0.2; ## m^2\n",
+ "rho=1000.; ## kg/m^3\n",
+ "p_atm=101.3*10**3.;\n",
+ "p_min=35.*10.**3.;\n",
+ "\n",
+ "u1=math.pi*w*D;\n",
+ "v1=u1*math.sin(105.)/math.sin(60.);\n",
+ "v_r1=v1*math.sin(gv_angle);\n",
+ "v_w1=v1*math.cos(gv_angle);\n",
+ "v_w2=0.;\n",
+ "\n",
+ "n_hydraulic=u1*v_w1/g/H;\n",
+ "\n",
+ "n_overall=0.97*n_hydraulic;\n",
+ "print'%s %.1f %s'%(\"Overall efficiency =\",n_overall,\"\")\n",
+ "\n",
+ "\n",
+ "Q=A1*v_r1;\n",
+ "\n",
+ "P=n_overall*Q*rho*g*H;\n",
+ "Ohm_P=w*2.*math.pi/(g*H)**(5/4)*(P/rho)**(1/2);\n",
+ "\n",
+ "## sigma > 0.119*(0.5)^(1.84) = 0.0331\n",
+ "\n",
+ "sigma=0.0331;\n",
+ "\n",
+ "##((p_atm-p_min)/(rho*g)-z0)/H > 0.0331\n",
+ "\n",
+ "z0=((p_atm-p_min)/(rho*g))-sigma*H;\n",
+ "print'%s %.2f %s'%(\"Limiting value for the height of the draft tube above =\",z0,\"m\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Overall efficiency = -1.9 \n",
+ "Limiting value for the height of the draft tube above = 5.85 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter13_1.ipynb b/mechanics_of_fluid/Chapter13_1.ipynb
new file mode 100755
index 00000000..4bd1ca7e
--- /dev/null
+++ b/mechanics_of_fluid/Chapter13_1.ipynb
@@ -0,0 +1,166 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:6ab6ca7ec50b12b4ad5664b1412855d8b1bafd30fee8faf6c1773c772ff215d4"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter13-Fluid Machines"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg618"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Hydraulic Efficiency and Overall Efficiency and Outlet angles of the guide vanes and Rotor blade angle at inlet and oulet\n",
+ "\n",
+ "## Maximum hydraulic efficiency occurs for minimum pressure loss, that is, when\n",
+ "\n",
+ "## dp1/dQ=2.38Q-1.43=0\n",
+ "\n",
+ "Q_opt=1.43/2.38;\n",
+ "\n",
+ "p1_min=1.19*Q_opt**2-1.43*Q_opt+0.47; ## MPa\n",
+ "\n",
+ "rho=1000.; ## kg/m**3\n",
+ "g=9.81; ## m/s**2\n",
+ "w=69.1; ## rad/s\n",
+ "P=200.*10.**3.; ## W\n",
+ "Ohm_P=0.565; ## rad\n",
+ "d=0.5; ## m\n",
+ "h=0.06; ## m\n",
+ "\n",
+ "p1=p1_min*10.**6./(rho*g); ## mH2O, coversion of units\n",
+ "\n",
+ "H=(w*P**(1/2.)/(rho**(1/2.)*Ohm_P))**(4/5.)/g;\n",
+ "\n",
+ "Hydraulic_efficiency=(H-p1)/H;\n",
+ "print'%s %.3f %s'%(\"Hydraulic Efficiency =\",Hydraulic_efficiency,\"\")\n",
+ "\n",
+ "\n",
+ "Overall_efficiency=P/(Q_opt*rho*g*H);\n",
+ "print'%s %.3f %s'%(\"Overall Efficiency =\",Overall_efficiency,\"\")\n",
+ "\n",
+ "\n",
+ "H_Euler=H-p1;\n",
+ "\n",
+ "u1=w*0.25;\n",
+ "v_w1=g*H_Euler/u1;\n",
+ "A=math.pi*d*h*0.95; \n",
+ "v_r=Q_opt/A;\n",
+ "\n",
+ "alpha1=math.atan(v_r/v_w1);\n",
+ "print'%s %.3f %s'%(\"Outlet angles of the guide vanes =\",alpha1,\"degrees\")\n",
+ "\n",
+ "beta1=math.atan(v_r/(v_w1-u1));\n",
+ "print'%s %.2f %s'%(\"Rotor blade angle at inlet =\",beta1,\"degrees\")\n",
+ "\n",
+ "u2=w*0.325/2;\n",
+ "beta2=math.atan(v_r/u2);\n",
+ "print'%s %.3f %s'%(\"Rotor blade angle at outlet =\",beta2,\"degrees\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Hydraulic Efficiency = 0.896 \n",
+ "Overall Efficiency = 0.855 \n",
+ "Outlet angles of the guide vanes = 0.321 degrees\n",
+ "Rotor blade angle at inlet = 1.16 degrees\n",
+ "Rotor blade angle at outlet = 0.539 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg622"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Overall efficiency and Limiting value for the height of the draft tube above\n",
+ "w=6.25;\n",
+ "D=0.75; ## m\n",
+ "gv_angle=15; ## guide vane angle in degrees\n",
+ "g=9.81; ## m/s^2\n",
+ "H=27.5; ## m\n",
+ "A1=0.2; ## m^2\n",
+ "rho=1000.; ## kg/m^3\n",
+ "p_atm=101.3*10**3.;\n",
+ "p_min=35.*10.**3.;\n",
+ "\n",
+ "u1=math.pi*w*D;\n",
+ "v1=u1*math.sin(105.)/math.sin(60.);\n",
+ "v_r1=v1*math.sin(gv_angle);\n",
+ "v_w1=v1*math.cos(gv_angle);\n",
+ "v_w2=0.;\n",
+ "\n",
+ "n_hydraulic=u1*v_w1/g/H;\n",
+ "\n",
+ "n_overall=0.97*n_hydraulic;\n",
+ "print'%s %.1f %s'%(\"Overall efficiency =\",n_overall,\"\")\n",
+ "\n",
+ "\n",
+ "Q=A1*v_r1;\n",
+ "\n",
+ "P=n_overall*Q*rho*g*H;\n",
+ "Ohm_P=w*2.*math.pi/(g*H)**(5/4)*(P/rho)**(1/2);\n",
+ "\n",
+ "## sigma > 0.119*(0.5)^(1.84) = 0.0331\n",
+ "\n",
+ "sigma=0.0331;\n",
+ "\n",
+ "##((p_atm-p_min)/(rho*g)-z0)/H > 0.0331\n",
+ "\n",
+ "z0=((p_atm-p_min)/(rho*g))-sigma*H;\n",
+ "print'%s %.2f %s'%(\"Limiting value for the height of the draft tube above =\",z0,\"m\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Overall efficiency = -1.9 \n",
+ "Limiting value for the height of the draft tube above = 5.85 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter2-.ipynb b/mechanics_of_fluid/Chapter2-.ipynb
new file mode 100755
index 00000000..7cf5ac34
--- /dev/null
+++ b/mechanics_of_fluid/Chapter2-.ipynb
@@ -0,0 +1,326 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f587ddef55b28db4a216d9527633644d2f15945b69280f84d70b5536f38a83a6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter2- Fluid Statics\n"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "##calculate hieght above sea level to which ballon will rise\n",
+ "d=1.5; ##m\n",
+ "m=1.2; ## kg\n",
+ "rate=0.0065; ## K/m\n",
+ "R=287.; ## J/(kg.K)\n",
+ "T_0=288.15; ## K\n",
+ "p_0=101*10**3; ## Pa\n",
+ "g=9.81; ## m/s^2\n",
+ "\n",
+ "rho=m/(math.pi*d**3/6);\n",
+ "rho_0=p_0/R/T_0;\n",
+ "\n",
+ "## log(rho/rho_0)=(g/R*rate - 1)*log((T_0-rate*z)/T_0)\n",
+ "\n",
+ "z=1/rate*(T_0-T_0*math.exp(math.log(rho/rho_0)/(g/R/rate-1)));\n",
+ "print'%s %.f %s'%(\"The height above sea level to which the ballon will rise =\",z,\"m\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The height above sea level to which the ballon will rise = 5708 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate total force and Distance of line of action of total force from top of cylinder\n",
+ "d=2.; ## m\n",
+ "a=1.; ## radius in m\n",
+ "rho=880.; ## density of oil in kg/m^3\n",
+ "g=9.81; ## m/s^2\n",
+ "rho_w=1000.; ## density of water in kg/m^3\n",
+ "\n",
+ "C_0=4*a/3/math.pi; ## centroid of the upper semicircle\n",
+ "h1=a-C_0; ## distance of the centroid from the top\n",
+ "\n",
+ "P1=rho*g*h1; ## Pressure of the oil at this point\n",
+ "F1=P1*math.pi*a**2/2; ## Force exerted by the oil on the upper half of the wall\n",
+ "\n",
+ "cp1=a**4*(math.pi/8-8/(9*math.pi)); ## (AK^2)_C\n",
+ "\n",
+ "cp2=cp1/(math.pi*a**2/2*h1); ## Centre of Pressure below the centroid\n",
+ "\n",
+ "cp0=cp2+h1; ## Centre of Pressure below the top\n",
+ "\n",
+ "P_w=(rho*g*a)+(rho_w*g*C_0);\n",
+ "F_w=P_w*math.pi*a**2/2;\n",
+ "\n",
+ "h2=C_0+rho/rho_w;\n",
+ "cp2_w=cp1/(math.pi*a**2/2*h2);\n",
+ "cp0_w=a+C_0+cp2_w; ## below the top of cylinder\n",
+ "\n",
+ "F_total=F1+F_w;\n",
+ "\n",
+ "## F1*cp0 + F_w*cp0_w = F_total*x\n",
+ "\n",
+ "x=(F1*cp0 + F_w*cp0_w)/F_total;\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Total force =\",F_total,\"N\")\n",
+ "print'%s %.3f %s'%(\"Distance of line of action of total force from top of cylinder =\",x,\"m\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total force = 27905.5 N\n",
+ "Distance of line of action of total force from top of cylinder = 1.260 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "rho=1000.; ## kg/m**3\n",
+ "g=9.81; ## m/s**2\n",
+ "r=4.; ## m\n",
+ "h=2.; ## m\n",
+ "l=5.; ## m\n",
+ "theta=math.pi/6.;\n",
+ "A=h*l;\n",
+ "\n",
+ "F_h=rho*g*h*A; ## Horizontal force\n",
+ "\n",
+ "C0=(2.**2./(12.*2.))+2.; ## distance of line of action below the free surface\n",
+ "\n",
+ "AB=4.-4.*math.cos(theta);\n",
+ "\n",
+ "F_v=rho*g*l*(AB*1.+math.pi*r**2.*theta/(2.*math.pi)-1./2.*h*r*math.cos(theta));\n",
+ "BC=0.237; ## m\n",
+ "\n",
+ "F_net=math.sqrt(F_h**2.+F_v**2.);\n",
+ "\n",
+ "phi=math.atan(F_v/F_h);\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Net force =\",F_net,\"N\")\n",
+ "print'%s %.3f %s'%(\"Angle between net force and horizontal =\",phi,\"degrees\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net force = 205712.4 N\n",
+ "Angle between net force and horizontal = 0.305 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#GM and states that negative or positive give explanation\n",
+ "m=10.; ## kg\n",
+ "M=80.; ## kg\n",
+ "H=1.5; ## m\n",
+ "rho=1026.; ## kg/m**3\n",
+ "g=9.81; ## m/s**2\n",
+ "d=1.; ## m\n",
+ "\n",
+ "## m*H + M*H/2 =(M+m)(OG)\n",
+ "\n",
+ "OG=(m*H + M*H/2)/(M+m);\n",
+ "\n",
+ "## For vertical equilibrium, buoyancy = weight\n",
+ "h=(M+m)/(rho*math.pi/4*d**2);\n",
+ "\n",
+ "BM=(math.pi*d**4./64.)/(math.pi*d**2.*h/4.);\n",
+ "OB=h/2.;\n",
+ "\n",
+ "GM=OB+BM-OG;\n",
+ "\n",
+ "print'%s %.4f %s'%(\"GM =\",GM,\"m\")\n",
+ "\n",
+ "print(\"Since this is negative (i.e. M is below G) buoy is unstable.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "GM = -0.2179 m\n",
+ "Since this is negative (i.e. M is below G) buoy is unstable.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Least vertical downward force and Depth of immersion\n",
+ "m=10.; ## kg\n",
+ "M=80.; ## kg\n",
+ "OG=0.8333; ## m\n",
+ "rho=1026.; ## kg/m^3\n",
+ "g=9.81; ## m/s^2\n",
+ "d=1.; ## m\n",
+ "W=(m+M)*g;\n",
+ "\n",
+ "## W(OG) = (W + F)(OB + BM) = rho*g*%pi/4*d^2*h1*(h1/2+d^2/(16*h1))\n",
+ "\n",
+ "h1=math.sqrt(2*(W*OG/(rho*g*math.pi/4.*d**2) - d**2/16.));\n",
+ "\n",
+ "F=rho*g*math.pi/4*d**2*h1 - W;\n",
+ "\n",
+ "print'%s %.f %s'%(\"Least vertical downward force =\",F,\"N\")\n",
+ "print'%s %.3f %s'%(\"Depth of immersion =\",h1,\"m\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Least vertical downward force = 1072 N\n",
+ "Depth of immersion = 0.247 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Volume left in the tank and Pressure at the lowest corners of the tank \n",
+ "a=5.; ## m/s^2\n",
+ "s=0.5; ## m\n",
+ "phi=math.atan(1./4.); ## degrees\n",
+ "g=9.81; ## m/s^2\n",
+ "rho=880.; ## kg/m^3\n",
+ "\n",
+ "a_x=a*math.cos(phi); ## Horizontal component of acceleration\n",
+ "a_z=a*math.sin(phi); ## Vertical component of acceleration\n",
+ "\n",
+ "theta=math.atan(a_x/(a_z+g)); ## b=tan(theta)\n",
+ "\n",
+ "d=(math.tan(phi)+math.tan(theta))/(1-math.tan(phi)*math.tan(theta));\n",
+ "\n",
+ "c=s*d;\n",
+ "\n",
+ "V=s*(s**2-s*c/2.);\n",
+ "Z=V*1000.\n",
+ "print'%s %.1f %s'%(\"Volume left in the tank =\",Z,\"L\")\n",
+ "P=rho*g*s*math.cos(phi);\n",
+ "print'%s %.f %s'%(\"Pressure at the lowest corners of the tank =\",P,\"Pa\")\n",
+ "#apporxmatilty it is correct which is 4190 is given in text book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume left in the tank = 76.5 L\n",
+ "Pressure at the lowest corners of the tank = 4188 Pa\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter2-_1.ipynb b/mechanics_of_fluid/Chapter2-_1.ipynb
new file mode 100755
index 00000000..7cf5ac34
--- /dev/null
+++ b/mechanics_of_fluid/Chapter2-_1.ipynb
@@ -0,0 +1,326 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f587ddef55b28db4a216d9527633644d2f15945b69280f84d70b5536f38a83a6"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter2- Fluid Statics\n"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "##calculate hieght above sea level to which ballon will rise\n",
+ "d=1.5; ##m\n",
+ "m=1.2; ## kg\n",
+ "rate=0.0065; ## K/m\n",
+ "R=287.; ## J/(kg.K)\n",
+ "T_0=288.15; ## K\n",
+ "p_0=101*10**3; ## Pa\n",
+ "g=9.81; ## m/s^2\n",
+ "\n",
+ "rho=m/(math.pi*d**3/6);\n",
+ "rho_0=p_0/R/T_0;\n",
+ "\n",
+ "## log(rho/rho_0)=(g/R*rate - 1)*log((T_0-rate*z)/T_0)\n",
+ "\n",
+ "z=1/rate*(T_0-T_0*math.exp(math.log(rho/rho_0)/(g/R/rate-1)));\n",
+ "print'%s %.f %s'%(\"The height above sea level to which the ballon will rise =\",z,\"m\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The height above sea level to which the ballon will rise = 5708 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate total force and Distance of line of action of total force from top of cylinder\n",
+ "d=2.; ## m\n",
+ "a=1.; ## radius in m\n",
+ "rho=880.; ## density of oil in kg/m^3\n",
+ "g=9.81; ## m/s^2\n",
+ "rho_w=1000.; ## density of water in kg/m^3\n",
+ "\n",
+ "C_0=4*a/3/math.pi; ## centroid of the upper semicircle\n",
+ "h1=a-C_0; ## distance of the centroid from the top\n",
+ "\n",
+ "P1=rho*g*h1; ## Pressure of the oil at this point\n",
+ "F1=P1*math.pi*a**2/2; ## Force exerted by the oil on the upper half of the wall\n",
+ "\n",
+ "cp1=a**4*(math.pi/8-8/(9*math.pi)); ## (AK^2)_C\n",
+ "\n",
+ "cp2=cp1/(math.pi*a**2/2*h1); ## Centre of Pressure below the centroid\n",
+ "\n",
+ "cp0=cp2+h1; ## Centre of Pressure below the top\n",
+ "\n",
+ "P_w=(rho*g*a)+(rho_w*g*C_0);\n",
+ "F_w=P_w*math.pi*a**2/2;\n",
+ "\n",
+ "h2=C_0+rho/rho_w;\n",
+ "cp2_w=cp1/(math.pi*a**2/2*h2);\n",
+ "cp0_w=a+C_0+cp2_w; ## below the top of cylinder\n",
+ "\n",
+ "F_total=F1+F_w;\n",
+ "\n",
+ "## F1*cp0 + F_w*cp0_w = F_total*x\n",
+ "\n",
+ "x=(F1*cp0 + F_w*cp0_w)/F_total;\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Total force =\",F_total,\"N\")\n",
+ "print'%s %.3f %s'%(\"Distance of line of action of total force from top of cylinder =\",x,\"m\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total force = 27905.5 N\n",
+ "Distance of line of action of total force from top of cylinder = 1.260 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "rho=1000.; ## kg/m**3\n",
+ "g=9.81; ## m/s**2\n",
+ "r=4.; ## m\n",
+ "h=2.; ## m\n",
+ "l=5.; ## m\n",
+ "theta=math.pi/6.;\n",
+ "A=h*l;\n",
+ "\n",
+ "F_h=rho*g*h*A; ## Horizontal force\n",
+ "\n",
+ "C0=(2.**2./(12.*2.))+2.; ## distance of line of action below the free surface\n",
+ "\n",
+ "AB=4.-4.*math.cos(theta);\n",
+ "\n",
+ "F_v=rho*g*l*(AB*1.+math.pi*r**2.*theta/(2.*math.pi)-1./2.*h*r*math.cos(theta));\n",
+ "BC=0.237; ## m\n",
+ "\n",
+ "F_net=math.sqrt(F_h**2.+F_v**2.);\n",
+ "\n",
+ "phi=math.atan(F_v/F_h);\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Net force =\",F_net,\"N\")\n",
+ "print'%s %.3f %s'%(\"Angle between net force and horizontal =\",phi,\"degrees\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Net force = 205712.4 N\n",
+ "Angle between net force and horizontal = 0.305 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#GM and states that negative or positive give explanation\n",
+ "m=10.; ## kg\n",
+ "M=80.; ## kg\n",
+ "H=1.5; ## m\n",
+ "rho=1026.; ## kg/m**3\n",
+ "g=9.81; ## m/s**2\n",
+ "d=1.; ## m\n",
+ "\n",
+ "## m*H + M*H/2 =(M+m)(OG)\n",
+ "\n",
+ "OG=(m*H + M*H/2)/(M+m);\n",
+ "\n",
+ "## For vertical equilibrium, buoyancy = weight\n",
+ "h=(M+m)/(rho*math.pi/4*d**2);\n",
+ "\n",
+ "BM=(math.pi*d**4./64.)/(math.pi*d**2.*h/4.);\n",
+ "OB=h/2.;\n",
+ "\n",
+ "GM=OB+BM-OG;\n",
+ "\n",
+ "print'%s %.4f %s'%(\"GM =\",GM,\"m\")\n",
+ "\n",
+ "print(\"Since this is negative (i.e. M is below G) buoy is unstable.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "GM = -0.2179 m\n",
+ "Since this is negative (i.e. M is below G) buoy is unstable.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Least vertical downward force and Depth of immersion\n",
+ "m=10.; ## kg\n",
+ "M=80.; ## kg\n",
+ "OG=0.8333; ## m\n",
+ "rho=1026.; ## kg/m^3\n",
+ "g=9.81; ## m/s^2\n",
+ "d=1.; ## m\n",
+ "W=(m+M)*g;\n",
+ "\n",
+ "## W(OG) = (W + F)(OB + BM) = rho*g*%pi/4*d^2*h1*(h1/2+d^2/(16*h1))\n",
+ "\n",
+ "h1=math.sqrt(2*(W*OG/(rho*g*math.pi/4.*d**2) - d**2/16.));\n",
+ "\n",
+ "F=rho*g*math.pi/4*d**2*h1 - W;\n",
+ "\n",
+ "print'%s %.f %s'%(\"Least vertical downward force =\",F,\"N\")\n",
+ "print'%s %.3f %s'%(\"Depth of immersion =\",h1,\"m\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Least vertical downward force = 1072 N\n",
+ "Depth of immersion = 0.247 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Volume left in the tank and Pressure at the lowest corners of the tank \n",
+ "a=5.; ## m/s^2\n",
+ "s=0.5; ## m\n",
+ "phi=math.atan(1./4.); ## degrees\n",
+ "g=9.81; ## m/s^2\n",
+ "rho=880.; ## kg/m^3\n",
+ "\n",
+ "a_x=a*math.cos(phi); ## Horizontal component of acceleration\n",
+ "a_z=a*math.sin(phi); ## Vertical component of acceleration\n",
+ "\n",
+ "theta=math.atan(a_x/(a_z+g)); ## b=tan(theta)\n",
+ "\n",
+ "d=(math.tan(phi)+math.tan(theta))/(1-math.tan(phi)*math.tan(theta));\n",
+ "\n",
+ "c=s*d;\n",
+ "\n",
+ "V=s*(s**2-s*c/2.);\n",
+ "Z=V*1000.\n",
+ "print'%s %.1f %s'%(\"Volume left in the tank =\",Z,\"L\")\n",
+ "P=rho*g*s*math.cos(phi);\n",
+ "print'%s %.f %s'%(\"Pressure at the lowest corners of the tank =\",P,\"Pa\")\n",
+ "#apporxmatilty it is correct which is 4190 is given in text book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volume left in the tank = 76.5 L\n",
+ "Pressure at the lowest corners of the tank = 4188 Pa\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter3-.ipynb b/mechanics_of_fluid/Chapter3-.ipynb
new file mode 100755
index 00000000..41b83b2a
--- /dev/null
+++ b/mechanics_of_fluid/Chapter3-.ipynb
@@ -0,0 +1,268 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:333c941e92e4c238ee8e681acc0f0427a31d9cb623c5863e0f5d970ef2bcf529"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter3-The Principles Governing Fluids in Motion"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Overall efficiency of the pump\n",
+ "u_A=1.35; ## m/s\n",
+ "d_A=0.225; ## m\n",
+ "d_B=0.150; ## m\n",
+ "d_C=0.150; ## m\n",
+ "d=5.6; ##m\n",
+ "friction=2.5; ## kW\n",
+ "power_req=12.7; ## kW\n",
+ "\n",
+ "rho=1000.; ## kg/m^3\n",
+ "rho_m=13560.; ## kg/m^3\n",
+ "\n",
+ "g=9.81; ## m/s^2\n",
+ "\n",
+ "pC=35000.; ## Pa\n",
+ "pA=rho_m*g*(-d_B);\n",
+ "\n",
+ "Area_A=math.pi*d_A**2/4;\n",
+ "Area_B=math.pi*d_B**2/4;\n",
+ "Area_C=math.pi*d_C**2/4;\n",
+ "\n",
+ "u_B=u_A*(Area_A/Area_B);\n",
+ "u_C=u_A*(Area_A/Area_C);\n",
+ "\n",
+ "## Energy_added_by_pump/time = (Mass/time)*((pC-pA)/rho+(u_C^2-u_A^2)/2+g*(zC-zA))\n",
+ "\n",
+ "Energy_added = Area_A*u_A*(pC-pA+rho/2.*(u_C**2-u_A**2)+rho*g*d)/1000.+friction;\n",
+ "\n",
+ "Efficiency=Energy_added/power_req*100.;\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Overall efficiency of the pump =\",Efficiency,\" %\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Overall efficiency of the pump = 67.7 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Rate of discharge\n",
+ "d_jet = 0.0086; ## m\n",
+ "d_orifice = 0.011; ## m\n",
+ "x = 2.; ## m\n",
+ "y = 0.6; ## m\n",
+ "h = 1.75; ## m\n",
+ "g = 9.81; ## m/s^2\n",
+ "\n",
+ "A2 = math.pi/4.*d_orifice**2;\n",
+ "\n",
+ "Cc = (d_jet/d_orifice)**2.; ## Coefficient of Contraction\n",
+ "\n",
+ "Cv = x/2./math.sqrt(y*h); ## Coefficient of velocity\n",
+ "\n",
+ "Cd = Cv*Cc; ## Coefficient of Discharge\n",
+ "\n",
+ "Q = Cd*A2*math.sqrt(2.*g*h);\n",
+ "\n",
+ "print'%s %.4f %s'%(\"Rate of discharge =\",Q,\"m^3/s \")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of discharge = 0.0003 m^3/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Flow rate\n",
+ "Cd=0.97;\n",
+ "d1=0.28; ## m\n",
+ "d2=0.14; ## m\n",
+ "\n",
+ "g=9.81; ## m/s^2\n",
+ "d=0.05; ## difference in mercury level in metre\n",
+ "rho=1000.; ## kg/m^3\n",
+ "rho_m=13600.; ## kg/m^3\n",
+ "\n",
+ "A1=math.pi/4.*d1**2.;\n",
+ "A2=math.pi/4.*d2**2.;\n",
+ "\n",
+ "p_diff=(rho_m-rho)*g*d;\n",
+ "h=p_diff/rho/g;\n",
+ "\n",
+ "Q=Cd*A1*((2.*g*h)/((A1/A2)**2-1.))**(1./2.);\n",
+ "\n",
+ "print'%s %.4f %s'%(\"Flow rate =\",Q,\"m^3/s \")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Flow rate = 0.0542 m^3/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Mass flow rate\n",
+ "Cd=0.62;\n",
+ "g=9.81; ## m/s^2\n",
+ "d=0.1; ## m\n",
+ "d0=0.06; ## m\n",
+ "d1=0.12; ## m\n",
+ "\n",
+ "rho=1000.; ## kg/m^3\n",
+ "rho_m=13600.; ## kg/m^3\n",
+ "rho_f=0.86*10**3; ##kg/m^3\n",
+ "\n",
+ "A0=math.pi/4.*d0**2.;\n",
+ "A1=math.pi/4.*d1**2.;\n",
+ "\n",
+ "p_diff=(rho_m-rho_f)*g*d;\n",
+ "\n",
+ "h=p_diff/rho_f/g;\n",
+ "\n",
+ "Q=Cd*A0*((2.*g*h)/(1.-(A0/A1)**2))**(1./2.);\n",
+ "\n",
+ "m=rho_f*Q;\n",
+ "\n",
+ "print'%s %.2f %s'%(\"Mass flow rate =\",m,\"kg/s \")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass flow rate = 8.39 kg/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "Cd=0.61;\n",
+ "#calculate Rate of discharge\n",
+ "g=9.81; ## m/s^2\n",
+ "b=0.6; ## m\n",
+ "H=0.155; ## mQ\n",
+ "A=0.26; ## m^2\n",
+ "u1=0.254; ## m/s\n",
+ "\n",
+ "Q=2./3.*Cd*math.sqrt(2.*g*b*(H)**3/2);\n",
+ "\n",
+ "velo=Q/A;\n",
+ "\n",
+ "H1=H+u1**2/(2.*g);\n",
+ "\n",
+ "Q1=2./3.*Cd*math.sqrt(2*g*b*(H1)**3/2);\n",
+ "\n",
+ "print'%s %.3f %s'%(\"Discharge =\",Q1,\"m^3/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Discharge = 0.062 m^3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter3-_1.ipynb b/mechanics_of_fluid/Chapter3-_1.ipynb
new file mode 100755
index 00000000..41b83b2a
--- /dev/null
+++ b/mechanics_of_fluid/Chapter3-_1.ipynb
@@ -0,0 +1,268 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:333c941e92e4c238ee8e681acc0f0427a31d9cb623c5863e0f5d970ef2bcf529"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter3-The Principles Governing Fluids in Motion"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Overall efficiency of the pump\n",
+ "u_A=1.35; ## m/s\n",
+ "d_A=0.225; ## m\n",
+ "d_B=0.150; ## m\n",
+ "d_C=0.150; ## m\n",
+ "d=5.6; ##m\n",
+ "friction=2.5; ## kW\n",
+ "power_req=12.7; ## kW\n",
+ "\n",
+ "rho=1000.; ## kg/m^3\n",
+ "rho_m=13560.; ## kg/m^3\n",
+ "\n",
+ "g=9.81; ## m/s^2\n",
+ "\n",
+ "pC=35000.; ## Pa\n",
+ "pA=rho_m*g*(-d_B);\n",
+ "\n",
+ "Area_A=math.pi*d_A**2/4;\n",
+ "Area_B=math.pi*d_B**2/4;\n",
+ "Area_C=math.pi*d_C**2/4;\n",
+ "\n",
+ "u_B=u_A*(Area_A/Area_B);\n",
+ "u_C=u_A*(Area_A/Area_C);\n",
+ "\n",
+ "## Energy_added_by_pump/time = (Mass/time)*((pC-pA)/rho+(u_C^2-u_A^2)/2+g*(zC-zA))\n",
+ "\n",
+ "Energy_added = Area_A*u_A*(pC-pA+rho/2.*(u_C**2-u_A**2)+rho*g*d)/1000.+friction;\n",
+ "\n",
+ "Efficiency=Energy_added/power_req*100.;\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Overall efficiency of the pump =\",Efficiency,\" %\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Overall efficiency of the pump = 67.7 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Rate of discharge\n",
+ "d_jet = 0.0086; ## m\n",
+ "d_orifice = 0.011; ## m\n",
+ "x = 2.; ## m\n",
+ "y = 0.6; ## m\n",
+ "h = 1.75; ## m\n",
+ "g = 9.81; ## m/s^2\n",
+ "\n",
+ "A2 = math.pi/4.*d_orifice**2;\n",
+ "\n",
+ "Cc = (d_jet/d_orifice)**2.; ## Coefficient of Contraction\n",
+ "\n",
+ "Cv = x/2./math.sqrt(y*h); ## Coefficient of velocity\n",
+ "\n",
+ "Cd = Cv*Cc; ## Coefficient of Discharge\n",
+ "\n",
+ "Q = Cd*A2*math.sqrt(2.*g*h);\n",
+ "\n",
+ "print'%s %.4f %s'%(\"Rate of discharge =\",Q,\"m^3/s \")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate of discharge = 0.0003 m^3/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Flow rate\n",
+ "Cd=0.97;\n",
+ "d1=0.28; ## m\n",
+ "d2=0.14; ## m\n",
+ "\n",
+ "g=9.81; ## m/s^2\n",
+ "d=0.05; ## difference in mercury level in metre\n",
+ "rho=1000.; ## kg/m^3\n",
+ "rho_m=13600.; ## kg/m^3\n",
+ "\n",
+ "A1=math.pi/4.*d1**2.;\n",
+ "A2=math.pi/4.*d2**2.;\n",
+ "\n",
+ "p_diff=(rho_m-rho)*g*d;\n",
+ "h=p_diff/rho/g;\n",
+ "\n",
+ "Q=Cd*A1*((2.*g*h)/((A1/A2)**2-1.))**(1./2.);\n",
+ "\n",
+ "print'%s %.4f %s'%(\"Flow rate =\",Q,\"m^3/s \")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Flow rate = 0.0542 m^3/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Mass flow rate\n",
+ "Cd=0.62;\n",
+ "g=9.81; ## m/s^2\n",
+ "d=0.1; ## m\n",
+ "d0=0.06; ## m\n",
+ "d1=0.12; ## m\n",
+ "\n",
+ "rho=1000.; ## kg/m^3\n",
+ "rho_m=13600.; ## kg/m^3\n",
+ "rho_f=0.86*10**3; ##kg/m^3\n",
+ "\n",
+ "A0=math.pi/4.*d0**2.;\n",
+ "A1=math.pi/4.*d1**2.;\n",
+ "\n",
+ "p_diff=(rho_m-rho_f)*g*d;\n",
+ "\n",
+ "h=p_diff/rho_f/g;\n",
+ "\n",
+ "Q=Cd*A0*((2.*g*h)/(1.-(A0/A1)**2))**(1./2.);\n",
+ "\n",
+ "m=rho_f*Q;\n",
+ "\n",
+ "print'%s %.2f %s'%(\"Mass flow rate =\",m,\"kg/s \")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass flow rate = 8.39 kg/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "Cd=0.61;\n",
+ "#calculate Rate of discharge\n",
+ "g=9.81; ## m/s^2\n",
+ "b=0.6; ## m\n",
+ "H=0.155; ## mQ\n",
+ "A=0.26; ## m^2\n",
+ "u1=0.254; ## m/s\n",
+ "\n",
+ "Q=2./3.*Cd*math.sqrt(2.*g*b*(H)**3/2);\n",
+ "\n",
+ "velo=Q/A;\n",
+ "\n",
+ "H1=H+u1**2/(2.*g);\n",
+ "\n",
+ "Q1=2./3.*Cd*math.sqrt(2*g*b*(H1)**3/2);\n",
+ "\n",
+ "print'%s %.3f %s'%(\"Discharge =\",Q1,\"m^3/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Discharge = 0.062 m^3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter4-.ipynb b/mechanics_of_fluid/Chapter4-.ipynb
new file mode 100755
index 00000000..be52c7b9
--- /dev/null
+++ b/mechanics_of_fluid/Chapter4-.ipynb
@@ -0,0 +1,170 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:745d131b65427d77eef09608cde1afafe8a3c0b2b5d38233f35ec5b6ceb45ab5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter4- The Momentum Equation"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The Hydrodynamic force on the vane and resultant force of angle \n",
+ "rho=1000.; ## kg/m^3\n",
+ "u1=36.; ## m/s\n",
+ "u2=30.; ## m/s\n",
+ "d=0.05; ## m\n",
+ "theta=60.; ## degrees\n",
+ "\n",
+ "A=math.pi/4.*d**2.;\n",
+ "\n",
+ "Q=A*u1;\n",
+ "\n",
+ "F_x=rho*Q*(u2*(math.cos(theta/57.3)) - u1);\n",
+ "F_y=rho*Q*u2*math.sin(theta/57.3);\n",
+ "\n",
+ "F=math.sqrt(F_x**2+F_y**2);\n",
+ "phi=math.atan((F_y/F_x));\n",
+ "\n",
+ "print'%s %.1f %s'%(\"The Hydrodynamic force on the vane =\",F,\"N\")\n",
+ "\n",
+ "\n",
+ "print'%s %.1f %s'%(\"This resultant force acts at angle of\",phi*180/math.pi,\"to the x-direction\")\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Hydrodynamic force on the vane = 2361.2 N\n",
+ "This resultant force acts at angle of -51.1 to the x-direction\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The net horizontal force exerted by the water onthe bend and resultant force of angle\n",
+ "Q1=0.45; ## m**3/s\n",
+ "Q2=0.425; ## m**3/s\n",
+ "d1=0.6; ## m\n",
+ "d2=0.3; ## m\n",
+ "p1=1.4*10.**5.; ## Pa\n",
+ "rho=1000.; ## kg/m**3\n",
+ "theta=45/57.3; ## degrees\n",
+ "\n",
+ "A1=math.pi/4*d1**2;\n",
+ "A2=math.pi/4*d2**2;\n",
+ "\n",
+ "u1=Q1/A1;\n",
+ "u2=Q2/A2;\n",
+ "\n",
+ "p2=p1+rho/2.*(u1**2-u2**2.);\n",
+ "\n",
+ "F_x=rho*Q2*(u2*math.cos(theta)-u1)-p1*A1+p2*A2*math.cos(theta)\n",
+ "F_y=rho*Q2*(u2*math.sin(theta)-0)+p2*A2*math.sin(theta);\n",
+ "\n",
+ "F=math.sqrt(F_x**2+F_y**2);\n",
+ "phi=math.atan(F_y/F_x);\n",
+ "\n",
+ "print'%s %.1f %s'%(\"The net horizontal force exerted by the water onthe bend =\",F,\"N\")\n",
+ "\n",
+ "\n",
+ "print'%s %.1f %s'%(\"This resultant force acts at angle of\",phi*57.3,\"to the x-direction\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The net horizontal force exerted by the water onthe bend = 33263.1 N\n",
+ "This resultant force acts at angle of -13.9 to the x-direction\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The thrust on the turbine and Power generated by the turbine\n",
+ "rho=1.2; ## kg/m**3\n",
+ "d=12.; ## m\n",
+ "u1=20.; ## m/s\n",
+ "u4=8.; ## m/s\n",
+ "\n",
+ "A=math.pi/4.*d**2\n",
+ "F=rho*A*(u1+u4)/2.*(u1-u4);\n",
+ "\n",
+ "print'%s %.3f %s'%(\"The thrust on the turbine = \",F,\"N\")\n",
+ "\n",
+ "P=rho*A*(u1+u4)/2.*(u1**2/2.-u4**2/2.);\n",
+ "print'%s %.2f %s'%(\"Power generated by the turbine =\",P,\"W\")\n",
+ "#in book it is converted into kw\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The thrust on the turbine = 22800.423 N\n",
+ "Power generated by the turbine = 319205.92 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter4-_1.ipynb b/mechanics_of_fluid/Chapter4-_1.ipynb
new file mode 100755
index 00000000..be52c7b9
--- /dev/null
+++ b/mechanics_of_fluid/Chapter4-_1.ipynb
@@ -0,0 +1,170 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:745d131b65427d77eef09608cde1afafe8a3c0b2b5d38233f35ec5b6ceb45ab5"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter4- The Momentum Equation"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The Hydrodynamic force on the vane and resultant force of angle \n",
+ "rho=1000.; ## kg/m^3\n",
+ "u1=36.; ## m/s\n",
+ "u2=30.; ## m/s\n",
+ "d=0.05; ## m\n",
+ "theta=60.; ## degrees\n",
+ "\n",
+ "A=math.pi/4.*d**2.;\n",
+ "\n",
+ "Q=A*u1;\n",
+ "\n",
+ "F_x=rho*Q*(u2*(math.cos(theta/57.3)) - u1);\n",
+ "F_y=rho*Q*u2*math.sin(theta/57.3);\n",
+ "\n",
+ "F=math.sqrt(F_x**2+F_y**2);\n",
+ "phi=math.atan((F_y/F_x));\n",
+ "\n",
+ "print'%s %.1f %s'%(\"The Hydrodynamic force on the vane =\",F,\"N\")\n",
+ "\n",
+ "\n",
+ "print'%s %.1f %s'%(\"This resultant force acts at angle of\",phi*180/math.pi,\"to the x-direction\")\n",
+ " "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Hydrodynamic force on the vane = 2361.2 N\n",
+ "This resultant force acts at angle of -51.1 to the x-direction\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The net horizontal force exerted by the water onthe bend and resultant force of angle\n",
+ "Q1=0.45; ## m**3/s\n",
+ "Q2=0.425; ## m**3/s\n",
+ "d1=0.6; ## m\n",
+ "d2=0.3; ## m\n",
+ "p1=1.4*10.**5.; ## Pa\n",
+ "rho=1000.; ## kg/m**3\n",
+ "theta=45/57.3; ## degrees\n",
+ "\n",
+ "A1=math.pi/4*d1**2;\n",
+ "A2=math.pi/4*d2**2;\n",
+ "\n",
+ "u1=Q1/A1;\n",
+ "u2=Q2/A2;\n",
+ "\n",
+ "p2=p1+rho/2.*(u1**2-u2**2.);\n",
+ "\n",
+ "F_x=rho*Q2*(u2*math.cos(theta)-u1)-p1*A1+p2*A2*math.cos(theta)\n",
+ "F_y=rho*Q2*(u2*math.sin(theta)-0)+p2*A2*math.sin(theta);\n",
+ "\n",
+ "F=math.sqrt(F_x**2+F_y**2);\n",
+ "phi=math.atan(F_y/F_x);\n",
+ "\n",
+ "print'%s %.1f %s'%(\"The net horizontal force exerted by the water onthe bend =\",F,\"N\")\n",
+ "\n",
+ "\n",
+ "print'%s %.1f %s'%(\"This resultant force acts at angle of\",phi*57.3,\"to the x-direction\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The net horizontal force exerted by the water onthe bend = 33263.1 N\n",
+ "This resultant force acts at angle of -13.9 to the x-direction\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The thrust on the turbine and Power generated by the turbine\n",
+ "rho=1.2; ## kg/m**3\n",
+ "d=12.; ## m\n",
+ "u1=20.; ## m/s\n",
+ "u4=8.; ## m/s\n",
+ "\n",
+ "A=math.pi/4.*d**2\n",
+ "F=rho*A*(u1+u4)/2.*(u1-u4);\n",
+ "\n",
+ "print'%s %.3f %s'%(\"The thrust on the turbine = \",F,\"N\")\n",
+ "\n",
+ "P=rho*A*(u1+u4)/2.*(u1**2/2.-u4**2/2.);\n",
+ "print'%s %.2f %s'%(\"Power generated by the turbine =\",P,\"W\")\n",
+ "#in book it is converted into kw\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The thrust on the turbine = 22800.423 N\n",
+ "Power generated by the turbine = 319205.92 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter5-.ipynb b/mechanics_of_fluid/Chapter5-.ipynb
new file mode 100755
index 00000000..bc9d154f
--- /dev/null
+++ b/mechanics_of_fluid/Chapter5-.ipynb
@@ -0,0 +1,119 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cc924f0db45ef8f074cc8f1d8a1ee198ea5115e6305e3da74ea78f614afb5f88"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter5- Physical Similarity and Dimensional Analysis"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The total resistance of the prototype\n",
+ "u_p=10.; ## m/s\n",
+ "scale=1/25.; ## l_m/l_p\n",
+ "L=125.; ## m\n",
+ "meu=1.235*10**(-6); ## m**2/s\n",
+ "meu_p=1.188*10**(-6); ## m**2/s\n",
+ "rho_p=1025.; ## kg/m**3\n",
+ "rho_m=1000.; ## kg/m**3\n",
+ "A=3500.; ## wetted surface in m**2\n",
+ "\n",
+ "u_m=u_p*math.sqrt(scale);\n",
+ "\n",
+ "d=L*scale;\n",
+ "Re=d*u_m/meu; ## Reynolds no.\n",
+ "C_F=0.075/(math.log10(Re)-2)**2; ## Skin friction coefficient\n",
+ "\n",
+ "res_skin=rho_m/2*u_m**2*(A*scale**2)*C_F;\n",
+ "\n",
+ "res_tot=54.2; ## N\n",
+ "\n",
+ "F_resid_m=res_tot-res_skin;\n",
+ "\n",
+ "F_resid_p=F_resid_m*rho_p/rho_m/scale**3;\n",
+ "\n",
+ "Re_p=u_p*L/meu_p;\n",
+ "\n",
+ "C_F_p=0.075/(math.log10(Re_p)-2)**2+0.0004;\n",
+ "C_F_pnew=1.45*C_F_p;\n",
+ "\n",
+ "res_friction=rho_p/2*u_p**2*A*C_F_pnew;\n",
+ "\n",
+ "Resistance=F_resid_p+res_friction;\n",
+ "print'%s %.1f %s'%(\"The total resistance of the prototype\",Resistance,\"N\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total resistance of the prototype 809273.4 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Maximum speed of the redesigned torpedo\n",
+ "\n",
+ "A=0.88; ## ratio of A2 and A1\n",
+ "C_D=0.85; ## ratio of C_D2 to C_D1\n",
+ "P=1.20; ## ratio of P2 to P1\n",
+ "V1=11.; ## m/s\n",
+ "\n",
+ "V2=V1*(P/A/C_D)**(1/3.);\n",
+ "print'%s %.2f %s'%(\"Maximum speed of the redesigned torpedo =\",V2,\"m/s\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum speed of the redesigned torpedo = 12.88 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter5-_1.ipynb b/mechanics_of_fluid/Chapter5-_1.ipynb
new file mode 100755
index 00000000..bc9d154f
--- /dev/null
+++ b/mechanics_of_fluid/Chapter5-_1.ipynb
@@ -0,0 +1,119 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cc924f0db45ef8f074cc8f1d8a1ee198ea5115e6305e3da74ea78f614afb5f88"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Chapter5- Physical Similarity and Dimensional Analysis"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The total resistance of the prototype\n",
+ "u_p=10.; ## m/s\n",
+ "scale=1/25.; ## l_m/l_p\n",
+ "L=125.; ## m\n",
+ "meu=1.235*10**(-6); ## m**2/s\n",
+ "meu_p=1.188*10**(-6); ## m**2/s\n",
+ "rho_p=1025.; ## kg/m**3\n",
+ "rho_m=1000.; ## kg/m**3\n",
+ "A=3500.; ## wetted surface in m**2\n",
+ "\n",
+ "u_m=u_p*math.sqrt(scale);\n",
+ "\n",
+ "d=L*scale;\n",
+ "Re=d*u_m/meu; ## Reynolds no.\n",
+ "C_F=0.075/(math.log10(Re)-2)**2; ## Skin friction coefficient\n",
+ "\n",
+ "res_skin=rho_m/2*u_m**2*(A*scale**2)*C_F;\n",
+ "\n",
+ "res_tot=54.2; ## N\n",
+ "\n",
+ "F_resid_m=res_tot-res_skin;\n",
+ "\n",
+ "F_resid_p=F_resid_m*rho_p/rho_m/scale**3;\n",
+ "\n",
+ "Re_p=u_p*L/meu_p;\n",
+ "\n",
+ "C_F_p=0.075/(math.log10(Re_p)-2)**2+0.0004;\n",
+ "C_F_pnew=1.45*C_F_p;\n",
+ "\n",
+ "res_friction=rho_p/2*u_p**2*A*C_F_pnew;\n",
+ "\n",
+ "Resistance=F_resid_p+res_friction;\n",
+ "print'%s %.1f %s'%(\"The total resistance of the prototype\",Resistance,\"N\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The total resistance of the prototype 809273.4 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Maximum speed of the redesigned torpedo\n",
+ "\n",
+ "A=0.88; ## ratio of A2 and A1\n",
+ "C_D=0.85; ## ratio of C_D2 to C_D1\n",
+ "P=1.20; ## ratio of P2 to P1\n",
+ "V1=11.; ## m/s\n",
+ "\n",
+ "V2=V1*(P/A/C_D)**(1/3.);\n",
+ "print'%s %.2f %s'%(\"Maximum speed of the redesigned torpedo =\",V2,\"m/s\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum speed of the redesigned torpedo = 12.88 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter6-.ipynb b/mechanics_of_fluid/Chapter6-.ipynb
new file mode 100755
index 00000000..40c8d053
--- /dev/null
+++ b/mechanics_of_fluid/Chapter6-.ipynb
@@ -0,0 +1,342 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1481d1999e9016b92221ce8448ff32599db545d782d2bf3365587f6b7e7a231e"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter6- Laminar Flow Between Solid Boundaries"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Reynolds number and Maximum velocity and Volumetric flow rate and \"Pressure gradient along the pipe\n",
+ "RD=0.83;\n",
+ "rho_w=1000.; ## density of water in kg/m^3\n",
+ "v=2.3; ## m/s\n",
+ "d=0.012; ## m\n",
+ "u=0.08; ## dynamic viscocity in kg/m/s\n",
+ "\n",
+ "rho_oil=RD*rho_w;\n",
+ "\n",
+ "Re=rho_oil*v*d/u;\n",
+ "print'%s %.1f %s'%(\"Reynolds number =\",Re,\"\")\n",
+ "\n",
+ "v_max=2*v;\n",
+ "print'%s %.1f %s'%(\"Maximum velocity =\",v_max,\"m/s^-1\")\n",
+ "\n",
+ "\n",
+ "Q=math.pi/4*d**2*v;\n",
+ "print'%s %.2f %s'%(\"Volumetric flow rate =\",Q,\"m^3/s^-1\")\n",
+ "\n",
+ "\n",
+ "p=-128.*Q*u/math.pi/d**4;\n",
+ "print'%s %.3f %s'%(\"Pressure gradient along the pipe = \",p,\"Pa/m^-1\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reynolds number = 286.3 \n",
+ "Maximum velocity = 4.6 m/s^-1\n",
+ "Volumetric flow rate = 0.00 m^3/s^-1\n",
+ "Pressure gradient along the pipe = -40888.889 Pa/m^-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Rate at which oil must be supplied\n",
+ "c=0.001; ## m\n",
+ "p1=15*10**3; ## Pa\n",
+ "u=0.6; ## kg/m/s\n",
+ "R=6.; ## ratio of R2/R1\n",
+ "\n",
+ "Q=math.pi*c**3*p1/(6*u*math.log(R));\n",
+ "print'%s %.8f %s'%(\"Rate at which oil must be supplied =\",Q,\"m^3/s\")\n",
+ "#without round off error we cant get exact result \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate at which oil must be supplied = 0.00000731 m^3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate \"The load the pad will support and The rate at which oil must be supplied\n",
+ "F=6*10**3; ## Pa\n",
+ "b=0.12; ## m\n",
+ "\n",
+ "f=F*b;\n",
+ "print'%s %.f %s'%(\"The load the pad will support =\",f,\"N/m\")\n",
+ "\n",
+ "\n",
+ "dp=12*10**3; ## N/m^2\n",
+ "dx=0.12; ## m\n",
+ "c=0.00018; ## m\n",
+ "u=0.5; ## kg/m/s\n",
+ "V=5.; ## m/s\n",
+ "\n",
+ "q=(dp/dx)*c**3/12./u + V*c/2.;\n",
+ "print'%s %.5f %s'%(\"The rate at which oil must be supplied =\",q,\"m^2/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The load the pad will support = 720 N/m\n",
+ "The rate at which oil must be supplied = 0.00045 m^2/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate \"Velocity of the dashpot\n",
+ "d_p=0.05; ## diameter of piston in m\n",
+ "d_c=0.0504; ## diameter of cylinder in m\n",
+ "SG=0.87;\n",
+ "rho_w=1000.; ## kg/m^3\n",
+ "v=10**-4; ## m^2/s\n",
+ "dp=1.4*10**6; ## Pa\n",
+ "l=0.13; ## m\n",
+ "\n",
+ "c=(d_c-d_p)/2.; ## clearance\n",
+ "\n",
+ "u=SG*rho_w*v; ## Dynamice viscocity\n",
+ "\n",
+ "Vp=dp*c**3/(6.*u*l*(d_p/2.+c));\n",
+ "print'%s %.4f %s'%(\"Velocity of the dashpot =\",Vp,\"m/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity of the dashpot = 0.0065 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg214"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#calculate Dynamic viscosity and Kinematic viscosity and Reynolds number of sphere and Reynolds number\n",
+ "\n",
+ "d=0.00475; ## m\n",
+ "g=9.81; ## m/s^2\n",
+ "rho_s=1151.; ## kg/m^3\n",
+ "rho=880.; ## kg/m^3\n",
+ "u=0.006; ## m/s\n",
+ "\n",
+ "F=math.pi/6.*d**3*g*(rho_s-rho);\n",
+ "\n",
+ "rat_d=0.25; ## ratio of d/D\n",
+ "rat_F=1.8; ## ratio of F/Fo\n",
+ "\n",
+ "dynamic=F/(1.8*3*math.pi*u*d);\n",
+ "\n",
+ "kinematic=dynamic/rho;\n",
+ "\n",
+ "print'%s %.3f %s'%(\"Dynamic viscosity = \",dynamic,\"kg/m/s\")\n",
+ "\n",
+ "\n",
+ "print'%s %.5f %s'%(\"Kinematic viscosity =\",kinematic,\"m^2/s\")\n",
+ "\n",
+ "\n",
+ "print(\"Reynolds number of sphere \")\n",
+ "\n",
+ "Re=rho*u*d/dynamic;\n",
+ "print'%s %.3f %s'%(\"Reynolds number =\",Re,\"\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dynamic viscosity = 0.309 kg/m/s\n",
+ "Kinematic viscosity = 0.00035 m^2/s\n",
+ "Reynolds number of sphere \n",
+ "Reynolds number = 0.081 \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg218"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate viscosity of the liquid \n",
+ "D=0.120; ## m\n",
+ "h=0.08; ## m\n",
+ "c=0.001; ## m\n",
+ "t=0.01875; ## m\n",
+ "rev=65.; ## revolutions per min\n",
+ "T=4*10**-3; ## N.m\n",
+ "\n",
+ "K1=math.pi*h/4./c;\n",
+ "K2=math.pi/32./t;\n",
+ "\n",
+ "u=T/(rev*2*math.pi/60.)/(K1*D**3+K2*D**4);\n",
+ "print'%s %.4f %s'%(\"viscosity of the liquid =\",u,\"pa.s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "viscosity of the liquid = 0.0054 pa.s\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Volumetric flow rate of oil and The load supported by the bearing\n",
+ "V=10.; ## m/s\n",
+ "h1=0.0005; ## m\n",
+ "h2=0.00025; ## m\n",
+ "L=0.1; ## m\n",
+ "b=0.1; ## m\n",
+ "RD=0.87;\n",
+ "u=2*10**-4; ## m^2/s\n",
+ "rho_w=1000.; ## kg/m^3\n",
+ "\n",
+ "H=h1/h2;\n",
+ "\n",
+ "Q=V/2*(1+H**2)/(1+H**3)*b*h1;\n",
+ "print'%s %.5f %s'%(\"Volumetric flow rate of oil =\",Q,\"m^3/s\")\n",
+ "\n",
+ "\n",
+ "F=V/2.*(1.-(1.+H**2)/(1.+H**3))*12.*RD*rho_w*u/h1**2*L**2/4.*b;\n",
+ "print'%s %.1f %s'%(\"The load supported by the bearing =\",F,\"N\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volumetric flow rate of oil = 0.00014 m^3/s\n",
+ "The load supported by the bearing = 4640.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter6-_1.ipynb b/mechanics_of_fluid/Chapter6-_1.ipynb
new file mode 100755
index 00000000..40c8d053
--- /dev/null
+++ b/mechanics_of_fluid/Chapter6-_1.ipynb
@@ -0,0 +1,342 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1481d1999e9016b92221ce8448ff32599db545d782d2bf3365587f6b7e7a231e"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter6- Laminar Flow Between Solid Boundaries"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Reynolds number and Maximum velocity and Volumetric flow rate and \"Pressure gradient along the pipe\n",
+ "RD=0.83;\n",
+ "rho_w=1000.; ## density of water in kg/m^3\n",
+ "v=2.3; ## m/s\n",
+ "d=0.012; ## m\n",
+ "u=0.08; ## dynamic viscocity in kg/m/s\n",
+ "\n",
+ "rho_oil=RD*rho_w;\n",
+ "\n",
+ "Re=rho_oil*v*d/u;\n",
+ "print'%s %.1f %s'%(\"Reynolds number =\",Re,\"\")\n",
+ "\n",
+ "v_max=2*v;\n",
+ "print'%s %.1f %s'%(\"Maximum velocity =\",v_max,\"m/s^-1\")\n",
+ "\n",
+ "\n",
+ "Q=math.pi/4*d**2*v;\n",
+ "print'%s %.2f %s'%(\"Volumetric flow rate =\",Q,\"m^3/s^-1\")\n",
+ "\n",
+ "\n",
+ "p=-128.*Q*u/math.pi/d**4;\n",
+ "print'%s %.3f %s'%(\"Pressure gradient along the pipe = \",p,\"Pa/m^-1\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reynolds number = 286.3 \n",
+ "Maximum velocity = 4.6 m/s^-1\n",
+ "Volumetric flow rate = 0.00 m^3/s^-1\n",
+ "Pressure gradient along the pipe = -40888.889 Pa/m^-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Rate at which oil must be supplied\n",
+ "c=0.001; ## m\n",
+ "p1=15*10**3; ## Pa\n",
+ "u=0.6; ## kg/m/s\n",
+ "R=6.; ## ratio of R2/R1\n",
+ "\n",
+ "Q=math.pi*c**3*p1/(6*u*math.log(R));\n",
+ "print'%s %.8f %s'%(\"Rate at which oil must be supplied =\",Q,\"m^3/s\")\n",
+ "#without round off error we cant get exact result \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate at which oil must be supplied = 0.00000731 m^3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate \"The load the pad will support and The rate at which oil must be supplied\n",
+ "F=6*10**3; ## Pa\n",
+ "b=0.12; ## m\n",
+ "\n",
+ "f=F*b;\n",
+ "print'%s %.f %s'%(\"The load the pad will support =\",f,\"N/m\")\n",
+ "\n",
+ "\n",
+ "dp=12*10**3; ## N/m^2\n",
+ "dx=0.12; ## m\n",
+ "c=0.00018; ## m\n",
+ "u=0.5; ## kg/m/s\n",
+ "V=5.; ## m/s\n",
+ "\n",
+ "q=(dp/dx)*c**3/12./u + V*c/2.;\n",
+ "print'%s %.5f %s'%(\"The rate at which oil must be supplied =\",q,\"m^2/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The load the pad will support = 720 N/m\n",
+ "The rate at which oil must be supplied = 0.00045 m^2/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate \"Velocity of the dashpot\n",
+ "d_p=0.05; ## diameter of piston in m\n",
+ "d_c=0.0504; ## diameter of cylinder in m\n",
+ "SG=0.87;\n",
+ "rho_w=1000.; ## kg/m^3\n",
+ "v=10**-4; ## m^2/s\n",
+ "dp=1.4*10**6; ## Pa\n",
+ "l=0.13; ## m\n",
+ "\n",
+ "c=(d_c-d_p)/2.; ## clearance\n",
+ "\n",
+ "u=SG*rho_w*v; ## Dynamice viscocity\n",
+ "\n",
+ "Vp=dp*c**3/(6.*u*l*(d_p/2.+c));\n",
+ "print'%s %.4f %s'%(\"Velocity of the dashpot =\",Vp,\"m/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity of the dashpot = 0.0065 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg214"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#calculate Dynamic viscosity and Kinematic viscosity and Reynolds number of sphere and Reynolds number\n",
+ "\n",
+ "d=0.00475; ## m\n",
+ "g=9.81; ## m/s^2\n",
+ "rho_s=1151.; ## kg/m^3\n",
+ "rho=880.; ## kg/m^3\n",
+ "u=0.006; ## m/s\n",
+ "\n",
+ "F=math.pi/6.*d**3*g*(rho_s-rho);\n",
+ "\n",
+ "rat_d=0.25; ## ratio of d/D\n",
+ "rat_F=1.8; ## ratio of F/Fo\n",
+ "\n",
+ "dynamic=F/(1.8*3*math.pi*u*d);\n",
+ "\n",
+ "kinematic=dynamic/rho;\n",
+ "\n",
+ "print'%s %.3f %s'%(\"Dynamic viscosity = \",dynamic,\"kg/m/s\")\n",
+ "\n",
+ "\n",
+ "print'%s %.5f %s'%(\"Kinematic viscosity =\",kinematic,\"m^2/s\")\n",
+ "\n",
+ "\n",
+ "print(\"Reynolds number of sphere \")\n",
+ "\n",
+ "Re=rho*u*d/dynamic;\n",
+ "print'%s %.3f %s'%(\"Reynolds number =\",Re,\"\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dynamic viscosity = 0.309 kg/m/s\n",
+ "Kinematic viscosity = 0.00035 m^2/s\n",
+ "Reynolds number of sphere \n",
+ "Reynolds number = 0.081 \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg218"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate viscosity of the liquid \n",
+ "D=0.120; ## m\n",
+ "h=0.08; ## m\n",
+ "c=0.001; ## m\n",
+ "t=0.01875; ## m\n",
+ "rev=65.; ## revolutions per min\n",
+ "T=4*10**-3; ## N.m\n",
+ "\n",
+ "K1=math.pi*h/4./c;\n",
+ "K2=math.pi/32./t;\n",
+ "\n",
+ "u=T/(rev*2*math.pi/60.)/(K1*D**3+K2*D**4);\n",
+ "print'%s %.4f %s'%(\"viscosity of the liquid =\",u,\"pa.s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "viscosity of the liquid = 0.0054 pa.s\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Volumetric flow rate of oil and The load supported by the bearing\n",
+ "V=10.; ## m/s\n",
+ "h1=0.0005; ## m\n",
+ "h2=0.00025; ## m\n",
+ "L=0.1; ## m\n",
+ "b=0.1; ## m\n",
+ "RD=0.87;\n",
+ "u=2*10**-4; ## m^2/s\n",
+ "rho_w=1000.; ## kg/m^3\n",
+ "\n",
+ "H=h1/h2;\n",
+ "\n",
+ "Q=V/2*(1+H**2)/(1+H**3)*b*h1;\n",
+ "print'%s %.5f %s'%(\"Volumetric flow rate of oil =\",Q,\"m^3/s\")\n",
+ "\n",
+ "\n",
+ "F=V/2.*(1.-(1.+H**2)/(1.+H**3))*12.*RD*rho_w*u/h1**2*L**2/4.*b;\n",
+ "print'%s %.1f %s'%(\"The load supported by the bearing =\",F,\"N\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Volumetric flow rate of oil = 0.00014 m^3/s\n",
+ "The load supported by the bearing = 4640.0 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter7-.ipynb b/mechanics_of_fluid/Chapter7-.ipynb
new file mode 100755
index 00000000..2d73578f
--- /dev/null
+++ b/mechanics_of_fluid/Chapter7-.ipynb
@@ -0,0 +1,295 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:53c88693c5ad5193ad81179b96376eeb7bad9150fdb2bbf705d611fc5268083f"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter7-Flow and Losses in Pipes and Fittings"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Head lost to friction\n",
+ "Q=50*10**-3; ## m^3/s\n",
+ "d=0.15; ## m\n",
+ "l=300.; ## m\n",
+ "v=1.14*10**-6; ## m^2/s\n",
+ "g=9.81; ## m/s^2\n",
+ "\n",
+ "## For galvanised steel\n",
+ "k=0.00015; ## m\n",
+ "t=0.001; ## ratio of k to d ; (k/d)\n",
+ "f=0.00515;\n",
+ "\n",
+ "A1=math.pi/4.*d**2;\n",
+ "\n",
+ "u=Q/A1; \n",
+ "Re=u*d/v;\n",
+ "\n",
+ "h_f=4*f*l*u**2/d/(2*g);\n",
+ "print'%s %.3f %s'%(\"Head lost to friction =\",h_f,\"m\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Head lost to friction = 16.811 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\t\t\t\n",
+ "#calculate rate of discharge\n",
+ "k=0.00025; ## m\n",
+ "d=0.1; ## m\n",
+ "l=120.; ## m\n",
+ "h_f=5.; ## m\n",
+ "g=9.81; ## m/s^2\n",
+ "v=10**-5; ## m^2/s\n",
+ "\n",
+ "f=0.0079042;\n",
+ "\n",
+ "u=math.sqrt(h_f*d*(2.*g)/(4.*f*l));\n",
+ "Re=u*d/v;\n",
+ "\n",
+ "Q=u*math.pi/4*d**2;\n",
+ "print'%s %.4f %s'%(\"Rate =\",Q,\"m^3/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate = 0.0126 m^3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The size of galvanized steel pipe \n",
+ "h_f=9.; ## m\n",
+ "l=180.; ## m\n",
+ "Q=85.*10**-3; ## m^3/s\n",
+ "f=0.00475; \n",
+ "k=0.00015; ## m\n",
+ "v=1.14*10**-6; ## m^2/s\n",
+ "g=9.81; ## m/s^2\n",
+ "\n",
+ "d=(4.*f*l*Q**2./h_f/(math.pi/4.)**2/(2.*g))**(1/5.);\n",
+ "Re=(Q/(math.pi*d**2/4))*d/v;\n",
+ "\n",
+ "print'%s %.3f %s'%(\"The size of galvanized steel pipe =\",d,\"m \")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The size of galvanized steel pipe = 0.187 m \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Revised estimate of the optimum pipe diameter\n",
+ "## D1=(5*b1/3/a)^(1/8)\n",
+ "## D2=(5*b1/3/a)^(1/8)\n",
+ "\n",
+ "## But b2=2.5*b1\n",
+ "## Therefore D2=(2.5)^(1/8)*D1\n",
+ "\n",
+ "D1=600.; ## mm\n",
+ "\n",
+ "D2=(2.5)**(1/8.)*D1;\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Revised estimate of the optimum pipe diameter =\",D2,\"mm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Revised estimate of the optimum pipe diameter = 672.8 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Pressure difference and Feed is at the centre of the main and Pressure difference \n",
+ "Q0=4.5*10**-3; ## m**3/s\n",
+ "d=0.1; ## m\n",
+ "l=4.5*10**3; ## m\n",
+ "g=9.81; ## m/s**2\n",
+ "f=0.006; \n",
+ "rho=1000.; ## kg/m**3\n",
+ "\n",
+ "u0=Q0/(math.pi/4.*d**2);\n",
+ "h_f=4.*f*u0**2*l/3./(d*2*g);\n",
+ "\n",
+ "dp=h_f*rho*g;\n",
+ "print'%s %.1f %s'%(\"Pressure difference =\",dp,\"N/m**2\")\n",
+ "\n",
+ "\n",
+ "print(\"Feed is at the centre of the main\")\n",
+ "\n",
+ "Q0_b=Q0/2.;\n",
+ "u0_b=u0/2.;\n",
+ "l_b=l/2.;\n",
+ "\n",
+ "dp_b=(u0_b/u0)**2*(l_b/l)*dp;\n",
+ "print'%s %.1f %s'%(\"Pressure difference =\",dp_b,\"N/m**2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure difference = 59090.5 N/m**2\n",
+ "Feed is at the centre of the main\n",
+ "Pressure difference = 7386.3 N/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The change in the level in larger tank \n",
+ "d1=3.; ## m\n",
+ "d2=2.; ## m\n",
+ "f=0.007;\n",
+ "l=75.; ## m\n",
+ "d=0.05; ## m\n",
+ "g=9.81; ## m/s**2\n",
+ "h1=1.8; ## m\n",
+ "\n",
+ "A1=math.pi/4.*d1**2;\n",
+ "A2=math.pi/4.*d2**2;\n",
+ "\n",
+ "## dh/dt=dz1/dr*(1+A1/A2)\n",
+ "## Q=-A1*dz1/dt = -4/13*A1*dh/dt\n",
+ "\n",
+ "## u=(Q/2)**2/(%pi/4*d**2)\n",
+ "## h=(4*f*l/d + 1.5)*u**2/2g = 1.438*10**5*Q**2\n",
+ "\n",
+ "## t=integrate('-1/(1+A1/A2)*A1*(1.438*10**5/h)**(1/2)','h',h1,H)\n",
+ "\n",
+ "## By integrating, we get\n",
+ "H=(h1**(1/2.)-(900./2./824.7))**2;\n",
+ "h=h1-H;\n",
+ "dz1=1./(1+A1/A2)*h;\n",
+ "\n",
+ "print'%s %.3f %s'%(\"The change in the level in larger tank =\",dz1,\"m\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The change in the level in larger tank = 0.359 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter7-_1.ipynb b/mechanics_of_fluid/Chapter7-_1.ipynb
new file mode 100755
index 00000000..2d73578f
--- /dev/null
+++ b/mechanics_of_fluid/Chapter7-_1.ipynb
@@ -0,0 +1,295 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:53c88693c5ad5193ad81179b96376eeb7bad9150fdb2bbf705d611fc5268083f"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter7-Flow and Losses in Pipes and Fittings"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Head lost to friction\n",
+ "Q=50*10**-3; ## m^3/s\n",
+ "d=0.15; ## m\n",
+ "l=300.; ## m\n",
+ "v=1.14*10**-6; ## m^2/s\n",
+ "g=9.81; ## m/s^2\n",
+ "\n",
+ "## For galvanised steel\n",
+ "k=0.00015; ## m\n",
+ "t=0.001; ## ratio of k to d ; (k/d)\n",
+ "f=0.00515;\n",
+ "\n",
+ "A1=math.pi/4.*d**2;\n",
+ "\n",
+ "u=Q/A1; \n",
+ "Re=u*d/v;\n",
+ "\n",
+ "h_f=4*f*l*u**2/d/(2*g);\n",
+ "print'%s %.3f %s'%(\"Head lost to friction =\",h_f,\"m\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Head lost to friction = 16.811 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\t\t\t\n",
+ "#calculate rate of discharge\n",
+ "k=0.00025; ## m\n",
+ "d=0.1; ## m\n",
+ "l=120.; ## m\n",
+ "h_f=5.; ## m\n",
+ "g=9.81; ## m/s^2\n",
+ "v=10**-5; ## m^2/s\n",
+ "\n",
+ "f=0.0079042;\n",
+ "\n",
+ "u=math.sqrt(h_f*d*(2.*g)/(4.*f*l));\n",
+ "Re=u*d/v;\n",
+ "\n",
+ "Q=u*math.pi/4*d**2;\n",
+ "print'%s %.4f %s'%(\"Rate =\",Q,\"m^3/s\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rate = 0.0126 m^3/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The size of galvanized steel pipe \n",
+ "h_f=9.; ## m\n",
+ "l=180.; ## m\n",
+ "Q=85.*10**-3; ## m^3/s\n",
+ "f=0.00475; \n",
+ "k=0.00015; ## m\n",
+ "v=1.14*10**-6; ## m^2/s\n",
+ "g=9.81; ## m/s^2\n",
+ "\n",
+ "d=(4.*f*l*Q**2./h_f/(math.pi/4.)**2/(2.*g))**(1/5.);\n",
+ "Re=(Q/(math.pi*d**2/4))*d/v;\n",
+ "\n",
+ "print'%s %.3f %s'%(\"The size of galvanized steel pipe =\",d,\"m \")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The size of galvanized steel pipe = 0.187 m \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Revised estimate of the optimum pipe diameter\n",
+ "## D1=(5*b1/3/a)^(1/8)\n",
+ "## D2=(5*b1/3/a)^(1/8)\n",
+ "\n",
+ "## But b2=2.5*b1\n",
+ "## Therefore D2=(2.5)^(1/8)*D1\n",
+ "\n",
+ "D1=600.; ## mm\n",
+ "\n",
+ "D2=(2.5)**(1/8.)*D1;\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Revised estimate of the optimum pipe diameter =\",D2,\"mm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Revised estimate of the optimum pipe diameter = 672.8 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Pressure difference and Feed is at the centre of the main and Pressure difference \n",
+ "Q0=4.5*10**-3; ## m**3/s\n",
+ "d=0.1; ## m\n",
+ "l=4.5*10**3; ## m\n",
+ "g=9.81; ## m/s**2\n",
+ "f=0.006; \n",
+ "rho=1000.; ## kg/m**3\n",
+ "\n",
+ "u0=Q0/(math.pi/4.*d**2);\n",
+ "h_f=4.*f*u0**2*l/3./(d*2*g);\n",
+ "\n",
+ "dp=h_f*rho*g;\n",
+ "print'%s %.1f %s'%(\"Pressure difference =\",dp,\"N/m**2\")\n",
+ "\n",
+ "\n",
+ "print(\"Feed is at the centre of the main\")\n",
+ "\n",
+ "Q0_b=Q0/2.;\n",
+ "u0_b=u0/2.;\n",
+ "l_b=l/2.;\n",
+ "\n",
+ "dp_b=(u0_b/u0)**2*(l_b/l)*dp;\n",
+ "print'%s %.1f %s'%(\"Pressure difference =\",dp_b,\"N/m**2\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Pressure difference = 59090.5 N/m**2\n",
+ "Feed is at the centre of the main\n",
+ "Pressure difference = 7386.3 N/m**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The change in the level in larger tank \n",
+ "d1=3.; ## m\n",
+ "d2=2.; ## m\n",
+ "f=0.007;\n",
+ "l=75.; ## m\n",
+ "d=0.05; ## m\n",
+ "g=9.81; ## m/s**2\n",
+ "h1=1.8; ## m\n",
+ "\n",
+ "A1=math.pi/4.*d1**2;\n",
+ "A2=math.pi/4.*d2**2;\n",
+ "\n",
+ "## dh/dt=dz1/dr*(1+A1/A2)\n",
+ "## Q=-A1*dz1/dt = -4/13*A1*dh/dt\n",
+ "\n",
+ "## u=(Q/2)**2/(%pi/4*d**2)\n",
+ "## h=(4*f*l/d + 1.5)*u**2/2g = 1.438*10**5*Q**2\n",
+ "\n",
+ "## t=integrate('-1/(1+A1/A2)*A1*(1.438*10**5/h)**(1/2)','h',h1,H)\n",
+ "\n",
+ "## By integrating, we get\n",
+ "H=(h1**(1/2.)-(900./2./824.7))**2;\n",
+ "h=h1-H;\n",
+ "dz1=1./(1+A1/A2)*h;\n",
+ "\n",
+ "print'%s %.3f %s'%(\"The change in the level in larger tank =\",dz1,\"m\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The change in the level in larger tank = 0.359 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter8-.ipynb b/mechanics_of_fluid/Chapter8-.ipynb
new file mode 100755
index 00000000..a66b62b6
--- /dev/null
+++ b/mechanics_of_fluid/Chapter8-.ipynb
@@ -0,0 +1,350 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:0fec1a915dc11972a0b348fe3db6dc5cdc775b2840fa9a3ae3580b08a05d480b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter8-Boundary Layers, Wakes and Other Shear Layers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Displacement thickness and Momentum thickness \n",
+ "delta=0.6; ## mm\n",
+ "\n",
+ "delta1=delta/3.;\n",
+ "\n",
+ "theta=2./15*delta;\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Displacement thickness =\",delta1,\"mm\")\n",
+ "\n",
+ "print'%s %.2f %s'%(\"Momentum thickness =\",theta,\"mm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Displacement thickness = 0.2 mm\n",
+ "Momentum thickness = 0.08 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg309"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Evaluate the constants A and B\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "## To determine the values of a1 & a2 following conditions must be satisfied\n",
+ "\n",
+ "## Condition I - When n=0, u/um=0\n",
+ "## Condition II - When n=1, u/um=a1+a2=1\n",
+ "## Condition III - When n=1, d(u/um)/dn = a1+2a2=0\n",
+ "\n",
+ "## By satisfying these conditions, we have\n",
+ "## a1+a2=1;\n",
+ "## a1+2a2=0;\n",
+ "\n",
+ "A=([[1,1],[1,2]]);\n",
+ "B=([[1],[0]]);\n",
+ "X=numpy.linalg.inv(A)*B;\n",
+ "\n",
+ "a1=X[0];\n",
+ "a2=X[1];\n",
+ "\n",
+ "print(\"a1=\",a1[0])\n",
+ "\n",
+ "print(\"a2=\",a1[1])\n",
+ "\n",
+ "\n",
+ "print(\"Evaluate the constants A and B\")\n",
+ "\n",
+ "## A = integrate('(1-f(n))*f(n)','n',0,1)\n",
+ "\n",
+ "def function(n):\n",
+ "\tfun=(1-(2*n-n**2))*(2*n-n**2)\n",
+ "\treturn fun\n",
+ "\n",
+ "A=scipy.integrate.quad(function,0,1)\n",
+ "print(\"A = \",A[0],\"\")\n",
+ "\n",
+ "\n",
+ "## B = differentiation of (2*n-n^2) at n=0, we get \n",
+ "B=2;\n",
+ "\n",
+ "print(\"B =\",B,\"\")\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "('a1=', 2.0)\n",
+ "('a2=', -1.0)\n",
+ "Evaluate the constants A and B\n",
+ "('A = ', 0.13333333333333333, '')\n",
+ "('B =', 2, '')\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg310"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Evaluate the constants A and B\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "## To determine the values of a1 & a2 following conditions must be satisfied\n",
+ "\n",
+ "## Condition I - When n=0, u/um=0\n",
+ "## Condition II - When n=1, u/um=a1+a2=1\n",
+ "## Condition III - When n=1, d(u/um)/dn = a1+2a2=0\n",
+ "\n",
+ "## By satisfying these conditions, we have\n",
+ "## a1+a2=1;\n",
+ "## a1+2a2=0;\n",
+ "\n",
+ "A=([[1,1],[1,2]]);\n",
+ "B=([[1],[0]]);\n",
+ "X=numpy.linalg.inv(A)*B;\n",
+ "\n",
+ "a1=X[0];\n",
+ "a2=X[1];\n",
+ "\n",
+ "print(\"a1=\",a1[0])\n",
+ "\n",
+ "print(\"a2=\",a1[1])\n",
+ "\n",
+ "\n",
+ "print(\"Evaluate the constants A and B\")\n",
+ "\n",
+ "## A = integrate('(1-f(n))*f(n)','n',0,1)\n",
+ "\n",
+ "def function(n):\n",
+ "\tfun=(1-(2*n-n**2))*(2*n-n**2)\n",
+ "\treturn fun\n",
+ "\n",
+ "A=scipy.integrate.quad(function,0,1)\n",
+ "print(\"A = \",A[0],\"\")\n",
+ "\n",
+ "\n",
+ "## B = differentiation of (2*n-n^2) at n=0, we get \n",
+ "B=2;\n",
+ "\n",
+ "print(\"B =\",B,\"\")\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "('a1=', 2.0)\n",
+ "('a2=', -1.0)\n",
+ "Evaluate the constants A and B\n",
+ "('A = ', 0.13333333333333333, '')\n",
+ "('B =', 2, '')\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate the velocity of the airstream and frictional drag of the plat\n",
+ "v=1.5*10**(-5); ## m^2/s\n",
+ "Re_t=5.*10**5;\n",
+ "x_t=1.2; ## m\n",
+ "rho=1.21; ## kg/m^3\n",
+ "\n",
+ "u_m=v*Re_t/x_t;\n",
+ "\n",
+ "print'%s %.2f %s'%(\"the velocity of the airstream =\",u_m,\"m/s\")\n",
+ "\n",
+ "\n",
+ "theta=0.646*x_t/math.sqrt(Re_t);\n",
+ "\n",
+ "F=rho*u_m**2*theta;\n",
+ "\n",
+ "D_F=2.*F*x_t;\n",
+ "print'%s %.3f %s'%(\"the frictional drag of the plate, D_F =\",D_F,\"N\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the velocity of the airstream = 6.25 m/s\n",
+ "the frictional drag of the plate, D_F = 0.124 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg316"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate the boundary layer thickness at the rear of the train and the frictional drag acting on the train and the power required to overcome the frictional drag\n",
+ "u_m = 50.; ## m/s or 180 km/h\n",
+ "v=1.5*10**(-5); ## m^2/s\n",
+ "l=100.; ## m\n",
+ "rho=1.2; ## kg/m^3\n",
+ "b=8.3; ## m\n",
+ "\n",
+ "delta = 0.37*(v/u_m)**(1/5.)*l**(4/5.);\n",
+ "\n",
+ "print'%s %.3f %s'%(\"the boundary layer thickness at the rear of the train =\",delta,\"m\")\n",
+ "Re_l = u_m*l/v;\n",
+ "C_F=0.074*(Re_l)**(-1/5.);\n",
+ "F=0.037*rho*u_m**2*l*Re_l**(-1/5.);\n",
+ "\n",
+ "D_F = F*b;\n",
+ "\n",
+ "print'%s %.4f %s'%(\"the frictional drag acting on the train, D_F =\",D_F,\"N\")\n",
+ "\n",
+ "\n",
+ "P=D_F*u_m;\n",
+ "print'%s %.1f %s'%(\"the power required to overcome the frictional drag =\",P/1000,\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the boundary layer thickness at the rear of the train = 0.731 m\n",
+ "the frictional drag acting on the train, D_F = 1818.9691 N\n",
+ "the power required to overcome the frictional drag = 90.9 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg318"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate the proportion of the plate occupied by the laminar boundary layer and the skin friction coefficient CF evaluated at the trailing edge\n",
+ "Re_t=5.*10**5;\n",
+ "Re_l=5.*10**6;\n",
+ "\n",
+ "r1=Re_t/Re_l; ## r1=x_t/l\n",
+ "r2=1-36.9*(1./Re_t)**(3/8.); ## r2=x_0/x_t\n",
+ "\n",
+ "r=r1*r2; ## r=x_0/l;\n",
+ "\n",
+ "print'%s %.2f %s'%(\"the proportion of the plate occupied by the laminar boundary layer =\",r*100,\"%\")\n",
+ "\n",
+ "C_F = 0.074/Re_l**(1/5.)*(1-r)**(4/5.);\n",
+ "print'%s %.4f %s'%(\"the skin friction coefficient CF evaluated at the trailing edge =\",C_F,\"\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the proportion of the plate occupied by the laminar boundary layer = 7.31 %\n",
+ "the skin friction coefficient CF evaluated at the trailing edge = 0.0032 \n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter8-_1.ipynb b/mechanics_of_fluid/Chapter8-_1.ipynb
new file mode 100755
index 00000000..a66b62b6
--- /dev/null
+++ b/mechanics_of_fluid/Chapter8-_1.ipynb
@@ -0,0 +1,350 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:0fec1a915dc11972a0b348fe3db6dc5cdc775b2840fa9a3ae3580b08a05d480b"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter8-Boundary Layers, Wakes and Other Shear Layers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg302"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Displacement thickness and Momentum thickness \n",
+ "delta=0.6; ## mm\n",
+ "\n",
+ "delta1=delta/3.;\n",
+ "\n",
+ "theta=2./15*delta;\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Displacement thickness =\",delta1,\"mm\")\n",
+ "\n",
+ "print'%s %.2f %s'%(\"Momentum thickness =\",theta,\"mm\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Displacement thickness = 0.2 mm\n",
+ "Momentum thickness = 0.08 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg309"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Evaluate the constants A and B\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "## To determine the values of a1 & a2 following conditions must be satisfied\n",
+ "\n",
+ "## Condition I - When n=0, u/um=0\n",
+ "## Condition II - When n=1, u/um=a1+a2=1\n",
+ "## Condition III - When n=1, d(u/um)/dn = a1+2a2=0\n",
+ "\n",
+ "## By satisfying these conditions, we have\n",
+ "## a1+a2=1;\n",
+ "## a1+2a2=0;\n",
+ "\n",
+ "A=([[1,1],[1,2]]);\n",
+ "B=([[1],[0]]);\n",
+ "X=numpy.linalg.inv(A)*B;\n",
+ "\n",
+ "a1=X[0];\n",
+ "a2=X[1];\n",
+ "\n",
+ "print(\"a1=\",a1[0])\n",
+ "\n",
+ "print(\"a2=\",a1[1])\n",
+ "\n",
+ "\n",
+ "print(\"Evaluate the constants A and B\")\n",
+ "\n",
+ "## A = integrate('(1-f(n))*f(n)','n',0,1)\n",
+ "\n",
+ "def function(n):\n",
+ "\tfun=(1-(2*n-n**2))*(2*n-n**2)\n",
+ "\treturn fun\n",
+ "\n",
+ "A=scipy.integrate.quad(function,0,1)\n",
+ "print(\"A = \",A[0],\"\")\n",
+ "\n",
+ "\n",
+ "## B = differentiation of (2*n-n^2) at n=0, we get \n",
+ "B=2;\n",
+ "\n",
+ "print(\"B =\",B,\"\")\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "('a1=', 2.0)\n",
+ "('a2=', -1.0)\n",
+ "Evaluate the constants A and B\n",
+ "('A = ', 0.13333333333333333, '')\n",
+ "('B =', 2, '')\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg310"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#Evaluate the constants A and B\n",
+ "import numpy\n",
+ "from numpy import linalg\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "## To determine the values of a1 & a2 following conditions must be satisfied\n",
+ "\n",
+ "## Condition I - When n=0, u/um=0\n",
+ "## Condition II - When n=1, u/um=a1+a2=1\n",
+ "## Condition III - When n=1, d(u/um)/dn = a1+2a2=0\n",
+ "\n",
+ "## By satisfying these conditions, we have\n",
+ "## a1+a2=1;\n",
+ "## a1+2a2=0;\n",
+ "\n",
+ "A=([[1,1],[1,2]]);\n",
+ "B=([[1],[0]]);\n",
+ "X=numpy.linalg.inv(A)*B;\n",
+ "\n",
+ "a1=X[0];\n",
+ "a2=X[1];\n",
+ "\n",
+ "print(\"a1=\",a1[0])\n",
+ "\n",
+ "print(\"a2=\",a1[1])\n",
+ "\n",
+ "\n",
+ "print(\"Evaluate the constants A and B\")\n",
+ "\n",
+ "## A = integrate('(1-f(n))*f(n)','n',0,1)\n",
+ "\n",
+ "def function(n):\n",
+ "\tfun=(1-(2*n-n**2))*(2*n-n**2)\n",
+ "\treturn fun\n",
+ "\n",
+ "A=scipy.integrate.quad(function,0,1)\n",
+ "print(\"A = \",A[0],\"\")\n",
+ "\n",
+ "\n",
+ "## B = differentiation of (2*n-n^2) at n=0, we get \n",
+ "B=2;\n",
+ "\n",
+ "print(\"B =\",B,\"\")\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "('a1=', 2.0)\n",
+ "('a2=', -1.0)\n",
+ "Evaluate the constants A and B\n",
+ "('A = ', 0.13333333333333333, '')\n",
+ "('B =', 2, '')\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate the velocity of the airstream and frictional drag of the plat\n",
+ "v=1.5*10**(-5); ## m^2/s\n",
+ "Re_t=5.*10**5;\n",
+ "x_t=1.2; ## m\n",
+ "rho=1.21; ## kg/m^3\n",
+ "\n",
+ "u_m=v*Re_t/x_t;\n",
+ "\n",
+ "print'%s %.2f %s'%(\"the velocity of the airstream =\",u_m,\"m/s\")\n",
+ "\n",
+ "\n",
+ "theta=0.646*x_t/math.sqrt(Re_t);\n",
+ "\n",
+ "F=rho*u_m**2*theta;\n",
+ "\n",
+ "D_F=2.*F*x_t;\n",
+ "print'%s %.3f %s'%(\"the frictional drag of the plate, D_F =\",D_F,\"N\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the velocity of the airstream = 6.25 m/s\n",
+ "the frictional drag of the plate, D_F = 0.124 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg316"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate the boundary layer thickness at the rear of the train and the frictional drag acting on the train and the power required to overcome the frictional drag\n",
+ "u_m = 50.; ## m/s or 180 km/h\n",
+ "v=1.5*10**(-5); ## m^2/s\n",
+ "l=100.; ## m\n",
+ "rho=1.2; ## kg/m^3\n",
+ "b=8.3; ## m\n",
+ "\n",
+ "delta = 0.37*(v/u_m)**(1/5.)*l**(4/5.);\n",
+ "\n",
+ "print'%s %.3f %s'%(\"the boundary layer thickness at the rear of the train =\",delta,\"m\")\n",
+ "Re_l = u_m*l/v;\n",
+ "C_F=0.074*(Re_l)**(-1/5.);\n",
+ "F=0.037*rho*u_m**2*l*Re_l**(-1/5.);\n",
+ "\n",
+ "D_F = F*b;\n",
+ "\n",
+ "print'%s %.4f %s'%(\"the frictional drag acting on the train, D_F =\",D_F,\"N\")\n",
+ "\n",
+ "\n",
+ "P=D_F*u_m;\n",
+ "print'%s %.1f %s'%(\"the power required to overcome the frictional drag =\",P/1000,\"kW\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the boundary layer thickness at the rear of the train = 0.731 m\n",
+ "the frictional drag acting on the train, D_F = 1818.9691 N\n",
+ "the power required to overcome the frictional drag = 90.9 kW\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg318"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate the proportion of the plate occupied by the laminar boundary layer and the skin friction coefficient CF evaluated at the trailing edge\n",
+ "Re_t=5.*10**5;\n",
+ "Re_l=5.*10**6;\n",
+ "\n",
+ "r1=Re_t/Re_l; ## r1=x_t/l\n",
+ "r2=1-36.9*(1./Re_t)**(3/8.); ## r2=x_0/x_t\n",
+ "\n",
+ "r=r1*r2; ## r=x_0/l;\n",
+ "\n",
+ "print'%s %.2f %s'%(\"the proportion of the plate occupied by the laminar boundary layer =\",r*100,\"%\")\n",
+ "\n",
+ "C_F = 0.074/Re_l**(1/5.)*(1-r)**(4/5.);\n",
+ "print'%s %.4f %s'%(\"the skin friction coefficient CF evaluated at the trailing edge =\",C_F,\"\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the proportion of the plate occupied by the laminar boundary layer = 7.31 %\n",
+ "the skin friction coefficient CF evaluated at the trailing edge = 0.0032 \n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter9-.ipynb b/mechanics_of_fluid/Chapter9-.ipynb
new file mode 100755
index 00000000..d3acb158
--- /dev/null
+++ b/mechanics_of_fluid/Chapter9-.ipynb
@@ -0,0 +1,273 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:3a2694f8f0eab29c82f8ee266172c1c857b71aa63b1096f76897d1574494f3bb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter9-The Flow of an Inviscid Fluid"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg380"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Mass flow rate\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "## p_a-p_b=-1/2*rho*C^2*(1/R_A^2-1/R_B^2)\n",
+ "\n",
+ "rho_w=1000.; ## kg/m^3\n",
+ "g=9.81; ## m/s^2\n",
+ "h=0.0115; ## m\n",
+ "rho=1.22; ## kg/m^3\n",
+ "R_A=0.4; ## m\n",
+ "R_B=0.2; ## m\n",
+ "\n",
+ "C=math.sqrt(rho_w*g*h*2./(rho*(1./R_B**2-1./R_A**2)));\n",
+ "\n",
+ "def function(R):\n",
+ "\ty=1./R;\n",
+ "\treturn y;\n",
+ "\n",
+ "new=scipy.integrate.quad(function, R_B, R_A);\n",
+ "m=rho*C*R_B*new[0]\n",
+ "print\"%s %.4f %s\"%(\"Mass flow rate =\",m,\"kg/s\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass flow rate = 0.5312 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg382"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#The maximum speed at which the paddles may rotate about their vertical axis\n",
+ "## p=1/2*rho*w^2*R^2 + C\n",
+ "\n",
+ "\n",
+ "## At z=0\n",
+ "rho=900.; ## kg/m^3\n",
+ "g=9.81; ## m/s^2\n",
+ "h=0.6; ## m\n",
+ "\n",
+ "C=rho*g*h;\n",
+ "\n",
+ "## p = -rho*K^2/(2*R^2)+D\n",
+ "## From this we get, D = 9*w^2 + C\n",
+ "\n",
+ "## At z = 0\n",
+ "## p = D - rho*K^2/2/R^2;\n",
+ "p_max=150000.; ## Pa\n",
+ "\n",
+ "## From the above equation we obtain,\n",
+ "w=135.6; ## rad/s\n",
+ "\n",
+ "print'%s %.1f %s'%(\"The maximum speed at which the paddles may rotate about their vertical axis =\",w,\"rad/s\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum speed at which the paddles may rotate about their vertical axis = 135.6 rad/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg386"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate the strength of the line source and the distance s the line source is located behind the leading edge of the step and Horizontal component andVertical Component \n",
+ "U=40; ## m/s\n",
+ "h=0.01; ## m\n",
+ "\n",
+ "m=2*U*h;\n",
+ "print'%s %.1f %s'%(\"the strength of the line source =\",m,\"m^2/s\")\n",
+ "\n",
+ "\n",
+ "s = m/(2*math.pi*U);\n",
+ "print'%s %.2f %s'%(\" the distance s the line source is located behind the leading edge of the step =\",s*1000,\"mm\")\n",
+ "\n",
+ "\n",
+ "\n",
+ "x=0; ## m\n",
+ "y=0.005; ## m\n",
+ "\n",
+ "u=U + m/(2*math.pi)*(x/(x**2+y**2));\n",
+ "v=m/(2*math.pi)*(y/(x**2+y**2));\n",
+ "print'%s %.f %s'%(\"Horizontal component =\",u,\"m/s\")\n",
+ "\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Vertical Component =\",v,\"m/s\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the strength of the line source = 0.8 m^2/s\n",
+ " the distance s the line source is located behind the leading edge of the step = 3.18 mm\n",
+ "Horizontal component = 40 m/s\n",
+ "Vertical Component = 25.5 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg389"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate length\n",
+ "b=0.0375; ## m\n",
+ "t=0.0625; ## m\n",
+ "U=5.; ## m/s\n",
+ "\n",
+ "m=2*math.pi*U*t/math.atan(2*b*t/(t**2-b**2));\n",
+ "\n",
+ "L=2.*b*(1+m/(math.pi*U*b))**(1/2.);\n",
+ "\n",
+ "print'%s %.7f %s'%(\"L =\",L,\"m\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L = 0.1515673 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg409"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Lift coefficient and Drag coefficient and Effective angle of attack\n",
+ "l1=10.; ## m\n",
+ "r1=2.; ## m\n",
+ "C_D1=0.0588;\n",
+ "theta1=6.5; ## degrees\n",
+ "\n",
+ "AR1=l1/r1; ## Aspect ratio\n",
+ "\n",
+ "C_L=0.914;\n",
+ "\n",
+ "C_D2=C_L**2./(math.pi*AR1);\n",
+ "theta2=math.atan(C_L/(math.pi*AR1))*57.3\n",
+ "\n",
+ "C_D3=C_D1-C_D2;\n",
+ "theta3=theta1-theta2;\n",
+ "\n",
+ "AR2=8.;\n",
+ "\n",
+ "C_Di=C_L**2./(math.pi*AR2);\n",
+ "C_D=C_Di+C_D3;\n",
+ "\n",
+ "theta4=math.atan(C_L/(math.pi*AR2))*57.3;\n",
+ "theta=theta4+theta3;\n",
+ "\n",
+ "print'%s %.3f %s'%(\"Lift coefficient =\",C_L,\"\")\n",
+ "\n",
+ "\n",
+ "print'%s %.4f %s'%(\"Drag coefficient =\",C_D,\"\")\n",
+ "\n",
+ "\n",
+ "print'%s %.3f %s'%(\"Effective angle of attack =\",theta,\"degrees\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Lift coefficient = 0.914 \n",
+ "Drag coefficient = 0.0389 \n",
+ "Effective angle of attack = 5.253 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/Chapter9-_1.ipynb b/mechanics_of_fluid/Chapter9-_1.ipynb
new file mode 100755
index 00000000..d3acb158
--- /dev/null
+++ b/mechanics_of_fluid/Chapter9-_1.ipynb
@@ -0,0 +1,273 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:3a2694f8f0eab29c82f8ee266172c1c857b71aa63b1096f76897d1574494f3bb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter9-The Flow of an Inviscid Fluid"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg380"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Mass flow rate\n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "## p_a-p_b=-1/2*rho*C^2*(1/R_A^2-1/R_B^2)\n",
+ "\n",
+ "rho_w=1000.; ## kg/m^3\n",
+ "g=9.81; ## m/s^2\n",
+ "h=0.0115; ## m\n",
+ "rho=1.22; ## kg/m^3\n",
+ "R_A=0.4; ## m\n",
+ "R_B=0.2; ## m\n",
+ "\n",
+ "C=math.sqrt(rho_w*g*h*2./(rho*(1./R_B**2-1./R_A**2)));\n",
+ "\n",
+ "def function(R):\n",
+ "\ty=1./R;\n",
+ "\treturn y;\n",
+ "\n",
+ "new=scipy.integrate.quad(function, R_B, R_A);\n",
+ "m=rho*C*R_B*new[0]\n",
+ "print\"%s %.4f %s\"%(\"Mass flow rate =\",m,\"kg/s\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Mass flow rate = 0.5312 kg/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg382"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#The maximum speed at which the paddles may rotate about their vertical axis\n",
+ "## p=1/2*rho*w^2*R^2 + C\n",
+ "\n",
+ "\n",
+ "## At z=0\n",
+ "rho=900.; ## kg/m^3\n",
+ "g=9.81; ## m/s^2\n",
+ "h=0.6; ## m\n",
+ "\n",
+ "C=rho*g*h;\n",
+ "\n",
+ "## p = -rho*K^2/(2*R^2)+D\n",
+ "## From this we get, D = 9*w^2 + C\n",
+ "\n",
+ "## At z = 0\n",
+ "## p = D - rho*K^2/2/R^2;\n",
+ "p_max=150000.; ## Pa\n",
+ "\n",
+ "## From the above equation we obtain,\n",
+ "w=135.6; ## rad/s\n",
+ "\n",
+ "print'%s %.1f %s'%(\"The maximum speed at which the paddles may rotate about their vertical axis =\",w,\"rad/s\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum speed at which the paddles may rotate about their vertical axis = 135.6 rad/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg386"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate the strength of the line source and the distance s the line source is located behind the leading edge of the step and Horizontal component andVertical Component \n",
+ "U=40; ## m/s\n",
+ "h=0.01; ## m\n",
+ "\n",
+ "m=2*U*h;\n",
+ "print'%s %.1f %s'%(\"the strength of the line source =\",m,\"m^2/s\")\n",
+ "\n",
+ "\n",
+ "s = m/(2*math.pi*U);\n",
+ "print'%s %.2f %s'%(\" the distance s the line source is located behind the leading edge of the step =\",s*1000,\"mm\")\n",
+ "\n",
+ "\n",
+ "\n",
+ "x=0; ## m\n",
+ "y=0.005; ## m\n",
+ "\n",
+ "u=U + m/(2*math.pi)*(x/(x**2+y**2));\n",
+ "v=m/(2*math.pi)*(y/(x**2+y**2));\n",
+ "print'%s %.f %s'%(\"Horizontal component =\",u,\"m/s\")\n",
+ "\n",
+ "\n",
+ "print'%s %.1f %s'%(\"Vertical Component =\",v,\"m/s\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the strength of the line source = 0.8 m^2/s\n",
+ " the distance s the line source is located behind the leading edge of the step = 3.18 mm\n",
+ "Horizontal component = 40 m/s\n",
+ "Vertical Component = 25.5 m/s\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg389"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate length\n",
+ "b=0.0375; ## m\n",
+ "t=0.0625; ## m\n",
+ "U=5.; ## m/s\n",
+ "\n",
+ "m=2*math.pi*U*t/math.atan(2*b*t/(t**2-b**2));\n",
+ "\n",
+ "L=2.*b*(1+m/(math.pi*U*b))**(1/2.);\n",
+ "\n",
+ "print'%s %.7f %s'%(\"L =\",L,\"m\")\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "L = 0.1515673 m\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg409"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Lift coefficient and Drag coefficient and Effective angle of attack\n",
+ "l1=10.; ## m\n",
+ "r1=2.; ## m\n",
+ "C_D1=0.0588;\n",
+ "theta1=6.5; ## degrees\n",
+ "\n",
+ "AR1=l1/r1; ## Aspect ratio\n",
+ "\n",
+ "C_L=0.914;\n",
+ "\n",
+ "C_D2=C_L**2./(math.pi*AR1);\n",
+ "theta2=math.atan(C_L/(math.pi*AR1))*57.3\n",
+ "\n",
+ "C_D3=C_D1-C_D2;\n",
+ "theta3=theta1-theta2;\n",
+ "\n",
+ "AR2=8.;\n",
+ "\n",
+ "C_Di=C_L**2./(math.pi*AR2);\n",
+ "C_D=C_Di+C_D3;\n",
+ "\n",
+ "theta4=math.atan(C_L/(math.pi*AR2))*57.3;\n",
+ "theta=theta4+theta3;\n",
+ "\n",
+ "print'%s %.3f %s'%(\"Lift coefficient =\",C_L,\"\")\n",
+ "\n",
+ "\n",
+ "print'%s %.4f %s'%(\"Drag coefficient =\",C_D,\"\")\n",
+ "\n",
+ "\n",
+ "print'%s %.3f %s'%(\"Effective angle of attack =\",theta,\"degrees\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Lift coefficient = 0.914 \n",
+ "Drag coefficient = 0.0389 \n",
+ "Effective angle of attack = 5.253 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/mechanics_of_fluid/README.txt b/mechanics_of_fluid/README.txt
new file mode 100755
index 00000000..0bdbbd0a
--- /dev/null
+++ b/mechanics_of_fluid/README.txt
@@ -0,0 +1,10 @@
+Contributed By: nemi chand
+Course: btech
+College/Institute/Organization: iitbombay
+Department/Designation: chemical engineering
+Book Title: mechanics of fluid
+Author: B. S. Massey And A. J. Ward-Smith
+Publisher: Taylor & Francis Group
+Year of publication: 2009
+Isbn: 9788131512340
+Edition: 8 \ No newline at end of file
diff --git a/mechanics_of_fluid/screenshots/Chapter3_fluid.png b/mechanics_of_fluid/screenshots/Chapter3_fluid.png
new file mode 100755
index 00000000..42e64e0d
--- /dev/null
+++ b/mechanics_of_fluid/screenshots/Chapter3_fluid.png
Binary files differ
diff --git a/mechanics_of_fluid/screenshots/Chapter3_fluid_1.png b/mechanics_of_fluid/screenshots/Chapter3_fluid_1.png
new file mode 100755
index 00000000..42e64e0d
--- /dev/null
+++ b/mechanics_of_fluid/screenshots/Chapter3_fluid_1.png
Binary files differ
diff --git a/mechanics_of_fluid/screenshots/Chapter4_fluid.png b/mechanics_of_fluid/screenshots/Chapter4_fluid.png
new file mode 100755
index 00000000..e82ea1b2
--- /dev/null
+++ b/mechanics_of_fluid/screenshots/Chapter4_fluid.png
Binary files differ
diff --git a/mechanics_of_fluid/screenshots/Chapter4_fluid_1.png b/mechanics_of_fluid/screenshots/Chapter4_fluid_1.png
new file mode 100755
index 00000000..e82ea1b2
--- /dev/null
+++ b/mechanics_of_fluid/screenshots/Chapter4_fluid_1.png
Binary files differ
diff --git a/mechanics_of_fluid/screenshots/Chapter5_fluid.png b/mechanics_of_fluid/screenshots/Chapter5_fluid.png
new file mode 100755
index 00000000..63d1c1a0
--- /dev/null
+++ b/mechanics_of_fluid/screenshots/Chapter5_fluid.png
Binary files differ
diff --git a/mechanics_of_fluid/screenshots/Chapter5_fluid_1.png b/mechanics_of_fluid/screenshots/Chapter5_fluid_1.png
new file mode 100755
index 00000000..63d1c1a0
--- /dev/null
+++ b/mechanics_of_fluid/screenshots/Chapter5_fluid_1.png
Binary files differ