summaryrefslogtreecommitdiff
path: root/Fluid_Mechanics/Chapter1.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Fluid_Mechanics/Chapter1.ipynb')
-rwxr-xr-xFluid_Mechanics/Chapter1.ipynb562
1 files changed, 0 insertions, 562 deletions
diff --git a/Fluid_Mechanics/Chapter1.ipynb b/Fluid_Mechanics/Chapter1.ipynb
deleted file mode 100755
index 2869f384..00000000
--- a/Fluid_Mechanics/Chapter1.ipynb
+++ /dev/null
@@ -1,562 +0,0 @@
-{
- "metadata": {
- "name": "",
- "signature": "sha256:5a200234453d213b93dc5d138f72ecdaaca8b6177244c9440288df8fe014829f"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Chapter 1 : Fluid Properties"
- ]
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.1 Page no 8"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "Mw = 29.0 # Molecular weight of air\n",
- "\n",
- "R = 8323/Mw # Universal gas constant\n",
- "\n",
- "T = 273 + 20 # temperature in K\n",
- "\n",
- "p = 50*144*47.88 # Pressure in N/m**2\n",
- "\n",
- "\n",
- "rho = p/(R*T) # from the state law\n",
- "\n",
- "print \"Desnity of air at 20 deg C and 50 psia = \",round(rho,2),\"kg/m**3\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Desnity of air at 20 deg C and 50 psia = 4.1 kg/m**3"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.2 Page no 12"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "dP = 10**6 # Pressure drop in N/m**2\n",
- "\n",
- "V = 1 # Volume in m**3\n",
- "\n",
- "bta = 2.2*10**9 # Bulk modulus of elasticity in N/m**2\n",
- "\n",
- "\n",
- "dV = -dP*V/bta # Change in volume in m**3\n",
- "\n",
- "v = -dV*100\n",
- "\n",
- "print \"Reduction in volume = \",round(v,3),\"%\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Reduction in volume = 0.045 %\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.3 Page no 13"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "bta1 = 2.28*10**9 # Bulk modulus of elasticity at 20 deg C and 103.4 N/m**2\n",
- "\n",
- "bta2 = 2.94*10**9 # Bulk modulus of elasticity at 20 deg C and 1034 N/m**2\n",
- "\n",
- "p1 = 103.4 # Pressure in N/m**2\n",
- "\n",
- "p2 = 1034 # Pressure in N/m**2\n",
- "\n",
- "\n",
- "bavg = (bta1+bta2)/2 # bulk modulus average in N/m**2\n",
- "\n",
- "dP = p2-p1 # pressure drop in N/m**2\n",
- "\n",
- "V = 10 # Volume in m**3\n",
- "\n",
- "dV = dP*V/bavg # Change in volume in m**3\n",
- "\n",
- "v = -dV\n",
- "\n",
- "print \"Volume reduction = \",round(v,8),\"m**3\"\n",
- "\n",
- "print \"Negative sign indicates the volume has reduced\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Volume reduction = -3.57e-06 m**3\n",
- "Negative sign indicates the volume has reduced"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.4 Page no 14"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "patm = 14.6 # Atmospheric pressure in psia\n",
- "\n",
- "p1 = 100 # gauge pressure at point 1 in psia\n",
- "\n",
- "p2 = 102 # gauge pressure at point 2 in psia\n",
- "\n",
- "V = 1 # volume in m**3\n",
- "\n",
- "p = p1+patm # absolute pressure in psia\n",
- "\n",
- "b = p # for isothermal air\n",
- "\n",
- "p1 = p2+patm # absolute pressure in psia\n",
- "\n",
- "b1 = p1 # for isothermal air\n",
- "\n",
- "dP = p1 - p # change in pressure\n",
- "\n",
- "bavg = (b1+b)/2 # average bulk modulus of elasticity in N/m**2\n",
- "\n",
- "dV = dP*V/bavg\n",
- "\n",
- "v = -dV\n",
- "\n",
- "print \"An increase in pressure by 2 psia will result in a volume reduction of\",round(v,4),\"ft**3\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "An increase in pressure by 2 psia will result in a volume reduction of -0.0173 ft**3\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.5 Page no 14"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "from math import *\n",
- "\n",
- "\n",
- "k = 1.4 # gas constant\n",
- "\n",
- "R = 1716 # Universal gas constant in ft.lb/slug^oR\n",
- "\n",
- "T = 68+460 # temperature in *oR\n",
- "\n",
- "\n",
- "c = sqrt(k*R*T)\n",
- "\n",
- "print \"Sonic velocity in air at 68 deg F = \",round(c,0),\"ft/s\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Sonic velocity in air at 68 deg F = 1126.0 ft/s\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.6 Page no 19"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "from math import *\n",
- "\n",
- "\n",
- "d = 0.05 # diameter of cylinder 1 in m\n",
- "\n",
- "l = 0.2 # length of the cylinder in meters\n",
- "\n",
- "d1 = 0.052 # diameter of cylinder in m\n",
- "\n",
- "mu = 0.09 # Viscosity of oil in Ns/m**2\n",
- "\n",
- "U = 1 # velocity in m/s\n",
- "\n",
- "Y = (d1-d)/2 # clearance between the two cylinders in m\n",
- "\n",
- "A = pi*l*d # area in m**2\n",
- "\n",
- "\n",
- "tau = mu*U/Y # Shear stress in N/m**2\n",
- "\n",
- "F = tau*A # Shear foce in N\n",
- "\n",
- "print \"Force required to move the piston by 1 m/s = \",round(F,2),\"N\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Force required to move the piston by 1 m/s = 2.83 N\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.7 Page no 20"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "from math import *\n",
- "\n",
- "from sympy import *\n",
- "\n",
- "\n",
- "mu = 1.005*10**-3 # Viscosity of water in Ns/m**2\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "Y = 0.01 # Distance between the walls\n",
- "\n",
- "Y1 = Y*100\n",
- "\n",
- "print \" (a) Distance between the walls = \",round(Y1,1),\"cm\"\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "y = Symbol('y')\n",
- "\n",
- "u = 10*(0.01*y-y**2)\n",
- "\n",
- "uprime = u.diff(y)\n",
- "\n",
- "y = 0\n",
- "\n",
- "U = uprime\n",
- "\n",
- "\n",
- "U1 = 0.01 # from U\n",
- "\n",
- "tau = mu*10*U1 # shear stress in N/m**2\n",
- "\n",
- "print \" (b) Shear stress = \",round(tau,9),\"N/m**2\"\n",
- "\n",
- "\n",
- "\n",
- "tau1 = mu*10*(0.01-2*20*10**-6) # using the equation of U and y = 20*10**-6 calc shear stress in N/m**2\n",
- "\n",
- "print \" (c) Shear Stress at 20 um from the plate = \",round(tau1,9),\"N/m**2\"\n",
- "\n",
- "\n",
- "\n",
- "\n",
- "y1 = 0.01/2 # shear stress location\n",
- "\n",
- "print \" (d) Location of maximum velocity = \",round(y1,3),\"m\"\n",
- "\n",
- "print \"Above calculation indicates that the zero shear stress and the maximum velocity occurs at the same location which is half way between the plate\",\"\\n\",\"This also is in conformity with the fact that , in a flowing fluid, the velocity is maximum where shear stress is zero\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " (a) Distance between the walls = 1.0 cm\n",
- " (b) Shear stress = 0.0001005 N/m**2\n",
- " (c) Shear Stress at 20 um from the plate = 0.000100098 N/m**2\n",
- " (d) Location of maximum velocity = 0.005 m\n",
- "Above calculation indicates that the zero shear stress and the maximum velocity occurs at the same location which is half way between the plate \n",
- "This also is in conformity with the fact that , in a flowing fluid, the velocity is maximum where shear stress is zero\n"
- ]
- }
- ],
- "prompt_number": 6
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.8 Page 24"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "from math import *\n",
- "\n",
- "d = 0.1 # diameter of shaft in m\n",
- "\n",
- "l = 0.2 # length of the shaft in m\n",
- "\n",
- "t = 0.00002 # thickness in m\n",
- "\n",
- "N = 30 # RPM of shaft\n",
- "\n",
- "U = pi*d*30/60 # velocity in m/s\n",
- "\n",
- "r1 = d/2\n",
- "\n",
- "r2 = r1 + t # radius of bearing in m\n",
- "\n",
- "mu = 0.44 # Viscosity of SAE-30 oil in Ns/m**2\n",
- "\n",
- "\n",
- "\n",
- "F = 2*pi*r1*l*mu*U/t\n",
- "\n",
- "T =F*r1\n",
- "\n",
- "print \" (a) For linear distribution of velocity , shaft torque = \",round(T,2),\"m.N\"\n",
- "\n",
- "\n",
- "F1 = 2*pi*l*mu*U/log(r2/r1)\n",
- "\n",
- "\n",
- "T1 =F1*r1\n",
- "\n",
- "print \" (b) For non-linear distribution of velocity , shaft torque = \",round(T1,2),\"m.N\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " (a) For linear distribution of velocity , shaft torque = 10.86 m.N\n",
- " (b) For non-linear distribution of velocity , shaft torque = 10.86 m.N\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.9 Page 26"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "from math import *\n",
- "\n",
- "mu = 0.44 # viscosity of the oil in Ns/m**2\n",
- "\n",
- "N = 300 # RPM of the shaft\n",
- "\n",
- "t = 0.00025 # thickness of the film oil in m\n",
- "\n",
- "r1 = 0.15 # radius in m\n",
- "\n",
- "r2 = 0.1 # radius in m\n",
- "\n",
- "T = pi**2*mu*N*(r1**4-r2**4)/(60*t)\n",
- "\n",
- "P = T*2*pi*N/60\n",
- "\n",
- "print \"Watts of energy lost in overcoming friction at 300 RPM = \",round(P,0),\"Watts\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Watts of energy lost in overcoming friction at 300 RPM = 1108.0 Watts\n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.10 Page no 28"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "d = 0.01 # diameter in m\n",
- "\n",
- "sigma = 0.073 # surface tension in N/m\n",
- "\n",
- "\n",
- "dP = 4*sigma/d # pressure excessive\n",
- "\n",
- "print \"Excessive pressure inside the droplet = \",round(dP,2),\"N\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Excessive pressure inside the droplet = 29.2 N"
- ]
- }
- ],
- "prompt_number": 42
- },
- {
- "cell_type": "heading",
- "level": 3,
- "metadata": {},
- "source": [
- "Example 1.11 Page no 31"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "\n",
- "\n",
- "sigma = 0.022 # surface tension in N/m\n",
- "\n",
- "gma = 9789 # specific weight\n",
- "\n",
- "S = 0.79 # specific gravity\n",
- "\n",
- "d = 0.002 # diameter in m\n",
- "\n",
- "\n",
- "\n",
- "h =4*sigma*1000/(gma*S*d) # capillary height in m\n",
- "\n",
- "print \"The alcohol will rise to a height of\",round(h,1),\"mm in the glass tube\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "The alcohol will rise to a height of 5.7 mm in the glass tube"
- ]
- }
- ],
- "prompt_number": 50
- }
- ],
- "metadata": {}
- }
- ]
-} \ No newline at end of file