diff options
Diffstat (limited to 'Fluid_Mechanics_/Chapter3.ipynb')
-rw-r--r-- | Fluid_Mechanics_/Chapter3.ipynb | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/Fluid_Mechanics_/Chapter3.ipynb b/Fluid_Mechanics_/Chapter3.ipynb index e702596e..845caa9a 100644 --- a/Fluid_Mechanics_/Chapter3.ipynb +++ b/Fluid_Mechanics_/Chapter3.ipynb @@ -28,19 +28,15 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Dimension of flow field ; velocity components at (1,2) ; magnitude and direction of velocity \n", "\n", "from math import *\n", "\n", - "# Given\n", "\n", - "# V = 4*Xi-4Yj\n", "\n", "x=1 # x co-ordinate\n", "\n", "y=2 # y co-ordinate\n", "\n", - "# Solution\n", "\n", "print \"(a) u = 4*X; v = -4*Y \"\n", "\n", @@ -83,13 +79,11 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Discharge and mass flow rate\n", "\n", "from math import *\n", "\n", "from __future__ import division\n", "\n", - "# Given\n", "\n", "d = 0.3 # diameter of pipe in m\n", "\n", @@ -99,7 +93,6 @@ "\n", "A = pi*d**2/4\n", "\n", - "# Solution\n", "\n", "Q=A*v\n", "\n", @@ -135,7 +128,6 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Mean Velocity\n", "\n", "from math import *\n", "\n", @@ -143,7 +135,6 @@ "\n", "from scipy import integrate\n", "\n", - "# Given\n", "\n", "Vo = 10 # velocity in m/s\n", "\n", @@ -153,7 +144,6 @@ "\n", "N = 1\n", "\n", - "# Solution\n", "\n", "R = lambda r: (10*r-1000*r**3)\n", "\n", @@ -192,7 +182,6 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Sketch the stream lines in the first quadrant\n", "\n", "import matplotlib.pyplot as plt\n", "\n", @@ -204,22 +193,17 @@ "\n", "from sympy import *\n", "\n", - "#init_printing(use_unicode=False, warp_line=False, no_global=True)\n", "\n", - "# Given\n", "\n", - "# V = 4*y(m)i+2(m)j\n", "\n", "x = Symbol('x')\n", "U = integrate(2,x)\n", "\n", - "#print u\n", "\n", "y = Symbol('y')\n", "\n", "V = integrate(-4*y,y)\n", "\n", - "#print V\n", "\n", "Zhi = U + V\n", "\n", @@ -276,7 +260,6 @@ "cell_type": "code", "collapsed": false, "input": [ - "# magnitude and direction of flow field\n", "\n", "from math import *\n", "\n", @@ -284,13 +267,11 @@ "\n", "import numpy as np\n", "\n", - "# Given\n", "\n", "x = 2 # X co-ordinate\n", "\n", "Y = 4 # Y co-ordiante\n", "\n", - "# Solution\n", "y = Symbol('y')\n", "\n", "zhi = 4*x*y\n", @@ -348,7 +329,6 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Determine velocity ; convective accleration\n", "\n", "from math import *\n", "\n", @@ -360,7 +340,6 @@ "\n", "from scipy import integrate\n", "\n", - "# Given\n", "\n", "d1 = 0.09 # diameter in cm\n", "\n", @@ -370,7 +349,6 @@ "\n", "mdot = 25 # mass flow rate in kg/s\n", "\n", - "# Solution\n", "\n", "x = Symbol('x')\n", "\n", @@ -392,7 +370,6 @@ "\n", "V1 = vprime\n", "\n", - "# at x = 0.1 m we get dv/dx = 0..09\n", "\n", "VPrime = 0.09\n", "\n", @@ -426,15 +403,11 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Is the flow irrotational\n", "\n", "from math import *\n", "\n", - "# Given\n", "\n", - "# w = (16y-12x)i +(12y-9x)j\n", "\n", - "# Solution\n", "\n", "y = Symbol('y')\n", "\n", @@ -453,10 +426,7 @@ "\n", "v = zhiprime1\n", "\n", - "#Vx = -9 # differentiate V wrt x\n", "\n", - "#Vx = -9 # differentiate V wrt x\n", - "#Uy = 16 # differentiate U wrt y\n", "\n", "z = v-u\n", "\n", @@ -490,11 +460,9 @@ "cell_type": "code", "collapsed": false, "input": [ - "# Velocity in larger section\n", "\n", "from math import *\n", "\n", - "# Given\n", "\n", "d1 = 0.1 # diameter in m\n", "\n", @@ -502,7 +470,6 @@ "\n", "V1 = 30 # velocity in m/s\n", "\n", - "# Solution\n", "\n", "V2 = (d1**2/d2**2)*V1\n", "\n", |