summaryrefslogtreecommitdiff
path: root/Mechanics_Of_Fluids/ch8.ipynb
diff options
context:
space:
mode:
authorJovina Dsouza2014-07-09 14:16:11 +0530
committerJovina Dsouza2014-07-09 14:16:11 +0530
commit69673d5117384d1efe3d3ce81130b1ac25718277 (patch)
tree2c861796584af516aad7fcad24d7c0560568b4a9 /Mechanics_Of_Fluids/ch8.ipynb
parent14e9455fda0dbd61d1e8539d9e9b8ce303e81d06 (diff)
downloadPython-Textbook-Companions-69673d5117384d1efe3d3ce81130b1ac25718277.tar.gz
Python-Textbook-Companions-69673d5117384d1efe3d3ce81130b1ac25718277.tar.bz2
Python-Textbook-Companions-69673d5117384d1efe3d3ce81130b1ac25718277.zip
adding book
Diffstat (limited to 'Mechanics_Of_Fluids/ch8.ipynb')
-rwxr-xr-xMechanics_Of_Fluids/ch8.ipynb419
1 files changed, 419 insertions, 0 deletions
diff --git a/Mechanics_Of_Fluids/ch8.ipynb b/Mechanics_Of_Fluids/ch8.ipynb
new file mode 100755
index 00000000..846b475b
--- /dev/null
+++ b/Mechanics_Of_Fluids/ch8.ipynb
@@ -0,0 +1,419 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 8 : Behaviour of Ideal and Viscous Fluids"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.2.1 page no : 190"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "\n",
+ "#initialisation of variables\n",
+ "\n",
+ "v= 5.*10**-6 \t\t\t#gmsec/m**2\n",
+ "g= 32.2 \t\t\t#ft/sec**2\n",
+ "g1= 981. \t\t\t#gm/cm**2\n",
+ "\t\t\t\n",
+ "#CALCULATIONS\n",
+ "v1= v*2.2*30.5**2/1000.\n",
+ "v2= v1*g\n",
+ "v3= v*g1*100\n",
+ "\t\t\t\n",
+ "#RESULTS\n",
+ "print 'viscosity = %.2e lbf sec/ft**2 '%(v1)\n",
+ "print 'viscosity = %.2e lb/ft sec '%(v2)\n",
+ "print 'viscosity = %.3f centi-poise '%(v3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "viscosity = 1.02e-05 lbf sec/ft**2 \n",
+ "viscosity = 3.29e-04 lb/ft sec \n",
+ "viscosity = 0.490 centi-poise \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.3.1 page no : 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "\n",
+ "v= 3.732*10**-7 \t\t\t#slug/ft sec\n",
+ "y= 0.\n",
+ "\t\t\t\n",
+ "#CALCULATIONS\n",
+ "vbyy= 40000.*(1.-50*y)\n",
+ "q= v*vbyy\n",
+ "\t\t\t\n",
+ "#RESULTS\n",
+ "print ' viscous shear stress= %.4f lbf/ft**2 '%(q)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " viscous shear stress= 0.0149 lbf/ft**2 \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.3.2 page no : 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "import math \n",
+ "\n",
+ "T= 2.95 \t\t\t#lbf ft\n",
+ "y= 0.025 \t\t\t#in\n",
+ "d= 3. \t\t\t #in\n",
+ "w= 450. \t\t\t#r.p.m\n",
+ "g= 32.2 \t\t\t#ft/sec**2\n",
+ "R = 1.5\n",
+ "\t\t\t\n",
+ "#CALCULATIONS\n",
+ "A = math.pi*d*(2./3.)\n",
+ "u = (T*y*144*60*32.2)/(A*R**2*w*2*math.pi)\t\t\n",
+ "\n",
+ "#RESULTS\n",
+ "print ' coefficient of viscocity of oil= %.3f lb/ft sec '%(u)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " coefficient of viscocity of oil= 0.513 lb/ft sec \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.3.3 page no : 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "import math \n",
+ "\n",
+ "v= 0.02 \t\t\t#lb/ft sec\n",
+ "L= 5. \t\t\t#in\n",
+ "D= 2.5 \t\t\t#in\n",
+ "M= 26. \t\t\t#lbf in\n",
+ "w= 1200. \t\t\t#rev/min\n",
+ "g= 32.2 \t\t\t#ft/sec**2\n",
+ "\t\t\t\n",
+ "#CALCULATIONS\n",
+ "C= math.pi*v*w*2*math.pi*D**3*L/(2*M*g*60*144.)\n",
+ "\t\t\t\n",
+ "#RESULTS\n",
+ "print ' coefficient= %.4f in '%(C)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " coefficient= 0.0026 in \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.3.4 page no : 195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "import math \n",
+ "\n",
+ "g= 32.2 \t\t\t#ft/sec**2\n",
+ "l= 2.54 \t\t\t#cm\n",
+ "g= 32.2 \t\t\t#ft/sec**2\n",
+ "v= 3.22 \t\t\t#centi-poise\n",
+ "f= 0.01\n",
+ "p= 1.74 \t\t\t#lbf/in**2\n",
+ "w= 100. \t\t\t#rev\n",
+ "\t\t\t\n",
+ "#CALCULATIONS\n",
+ "V= v*l/(453.6*g*12)\n",
+ "R= f*p*60/(math.pi*2*math.pi*w*V)\n",
+ "\n",
+ "\t\t\t\n",
+ "#RESULTS\n",
+ "print ' relevant ratio of diameter to clearance= %.1f '%(R)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " relevant ratio of diameter to clearance= 11.3 \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.4.1 page no : 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "g= 981. \t\t\t#cm/sec**2\n",
+ "d= 0.1 \t\t\t#mm\n",
+ "v= 35. \t\t\t#centi-stokes\n",
+ "d1= 10. \t\t\t#mm\n",
+ "d2= 1. \t\t\t#mm\n",
+ "\t\t\t\n",
+ "#CALCULATIONS\n",
+ "u= g*d**2.*100/(18*v*d1**2)\n",
+ "ub= (d2/d)**2*u\n",
+ "\t\t\t\n",
+ "#RESULTS\n",
+ "print ' rate for diameter 0.1 mm= %.4f cm/sec'%(u) \n",
+ "print ' rate for diameter 1 mm= %.2f cm/sec'%(ub) \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " rate for diameter 0.1 mm= 0.0156 cm/sec\n",
+ " rate for diameter 1 mm= 1.56 cm/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.5.1 page no : 201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "import math\n",
+ "a= 0.25 \t\t\t#ft\n",
+ "v= 1.2 \t\t\t#poises\n",
+ "u= 10. \t\t\t#ft/sec\n",
+ "g= 32.2 \t\t\t#ft/sec**2\n",
+ "s= 0.9\n",
+ "d= 6. \t\t\t#in\n",
+ "\t\t\t\n",
+ "#CALCULATIONS\n",
+ "q= -2.*u*v*30.5/(a*454*g)\n",
+ "Q= math.pi*u*(d/24)**2/2\n",
+ "R= 2.5*30.5**2/(v)\n",
+ "\t\t\n",
+ "#RESULTS\n",
+ "print ' quantity flow = %.2f ft**3/sec'%(q) \n",
+ "print ' shear stress in the oil = %.2f lbf/ft**2'%(Q) \n",
+ "print ' Reynolds number = %.f '%(R)\n",
+ "print 'Which is less than 2300 .Hence flow is laminar.'\n",
+ "# Note : Answer in book is wrong for R. Please check it manually."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " quantity flow = -0.20 ft**3/sec\n",
+ " shear stress in the oil = 0.98 lbf/ft**2\n",
+ " Reynolds number = 1938 \n",
+ "Which is less than 2300 .Hence flow is laminar.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.5.2 page no : 202"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "import math\n",
+ "\n",
+ "s= 0.9 #relative density\n",
+ "v= 5. \t\t\t#ft/sec\n",
+ "l= 10. \t\t\t#ft\n",
+ "di= 0.5 \t\t\t#in\n",
+ "n= 100.\n",
+ "u= 0.002 \t\t\t#lbfsec/ft**2\n",
+ "w= 62.3 \t\t\t#lbf/ft**3\n",
+ "g= 32.2 \t\t\t#ft/sec**2\n",
+ "\t\t\t\n",
+ "#CALCULATIONS\n",
+ "dp= 8.*u*v*l/(di/2)**2\n",
+ "hf= dp*144./(s*w)\n",
+ "hk= v**2/(2.*g)\n",
+ "ht=hf+hk\n",
+ "P= s*w*n*v*math.pi*ht*di**2/(144.*4*550)\n",
+ "\n",
+ "#RESULTS\n",
+ "print ' horse-power required = %.1f h.p'%(P)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " horse-power required = 2.3 h.p\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 3,
+ "metadata": {},
+ "source": [
+ "Example 8.6.2 pageno : 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "#initialisation of variables\n",
+ "import math \n",
+ "\n",
+ "W= 50. \t\t\t#tonf\n",
+ "u= 0.1 \t\t\t#lb/ft sec\n",
+ "d= 8. \t\t\t#in\n",
+ "g= 32.2 \t\t\t#ft/sec**2\n",
+ "r= 0.01\n",
+ "\t\t\t\n",
+ "#CALCULATIONS\n",
+ "P = (4*W**2)/(3*math.pi*u) * ((1./800)**3)*(12./8)*(g/550)*2240**2\n",
+ "Q= 4*W*2240*g*12*(r/d)**3/(3*math.pi*u*(d/12))\n",
+ "\t\t\t\n",
+ "#RESULTS\n",
+ "print ' power required = %.2f'%P\n",
+ "print ' rate = %.3f in/sec'%(Q)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " power required = 9.13\n",
+ " rate = 0.538 in/sec\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file