From e9c8c9201198909af53ace24755d70e30bc24950 Mon Sep 17 00:00:00 2001 From: Jovina Dsouza Date: Wed, 9 Jul 2014 14:16:11 +0530 Subject: adding book --- Mechanics_Of_Fluids/ch12.ipynb | 525 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 525 insertions(+) create mode 100755 Mechanics_Of_Fluids/ch12.ipynb (limited to 'Mechanics_Of_Fluids/ch12.ipynb') diff --git a/Mechanics_Of_Fluids/ch12.ipynb b/Mechanics_Of_Fluids/ch12.ipynb new file mode 100755 index 00000000..6aa07b5f --- /dev/null +++ b/Mechanics_Of_Fluids/ch12.ipynb @@ -0,0 +1,525 @@ +{ + "metadata": { + "name": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 12 : Compressibility effects in Fluids" + ] + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.2.1 page no : 358" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \t\t\t\n", + "#initialisation of variables\n", + "R= 53.3 \t\t\t#ft lbf/lbf R\n", + "T= 60. \t\t\t#F\n", + "P= 30. \t\t\t#in\n", + "Po= 29. \t\t\t#in\n", + "\t\t\t\n", + "#CALCULATIONS\n", + "z= R*(T+460.)*math.log(P/Po)*0.044/0.0339\n", + "\t\t\t\n", + "#RESULTS\n", + "print 'height = %.f ft'%(z)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "height = 1220 ft\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.3.1 page no : 360" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#initialisation of variables\n", + "\n", + "p= 10.1 \t\t\t#lbf/in**2 abs\n", + "T= 268.3 \t\t\t#K\n", + "R= 96. \t\t\t#ft lbf/lb K\n", + "n = 1.23\n", + "\n", + "#CALCULATIONS\n", + "dt = -.23/(n*R) * 1000\n", + "d= p*144./(R*T)\n", + "\t\t\t\n", + "#RESULTS\n", + "print \"dT/dz = %.2f dec C/1000 ft\"%dt\n", + "print 'density = %.4f lb/ft**3'%(d)\n", + "\n", + "# note : answer may vary because of rounding error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dT/dz = -1.95 dec C/1000 ft\n", + "density = 0.0565 lb/ft**3\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.6.1 page no : 366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math\n", + "#initialisation of variables\n", + "r= 3.5\n", + "T= 186. \t\t\t#F\n", + "T1= 60. \t\t\t#F\n", + "T0 = 646.\n", + "T2 = 520.\n", + "y = 1.4\n", + "R = 53.3 # ft lbf\n", + "\n", + "#RESULTS\n", + "M = math.sqrt(round(2/(y-1) * (T0/T2 - 1),2))\n", + "a = int(math.sqrt(y*R*T2*32.2))\n", + "v = a*M\n", + "R= (((T+460.)/(T1+460.))**r-1)*100.\n", + "\n", + "#RESULTS\n", + "print \"Mach number = %.1f\"%(M)\n", + "print \"Velocity of the free stream of air is = %.0f ft/sec\"%v\n", + "print 'percentage rise = %.1f per cent'%(R)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Mach number = 1.1\n", + "Velocity of the free stream of air is = 1229 ft/sec\n", + "percentage rise = 113.7 per cent\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.7.2 page no : 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "#initialisation of variables\n", + "u1= 1200 \t\t\t#ft/sec\n", + "r= 1.4\n", + "R= 53.3 \t\t\t#ft lbf/lb K\n", + "g= 32.2 \t\t\t#ft/sec**2\n", + "T= 90. \t\t\t#F\n", + "T2 = 619\n", + "\t\t\t\n", + "#CALCULATIONS\n", + "u22 = round(u1**2+(7*R*550)*(1-(18./12)**(1./3.5))*32.2,-4)\n", + "u2 = int(math.sqrt(u22))\n", + "M2 = u2/math.sqrt(r*R*T2*g)\n", + "M1= u1/math.sqrt(r*R*g*(460.+T))\n", + "\t\t\t\n", + "#RESULTS\n", + "print 'Match number M2 = %.3f '%(M2)\n", + "print 'Match number M1 = %.3f '%(M1)\n", + "\n", + "# Answers may vary because of rounding error" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Match number M2 = 0.650 \n", + "Match number M1 = 1.044 \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.8.1 page no : 372" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "#initialisation of variables\n", + "f= 0.01\n", + "l= 100. \t\t\t#ft\n", + "p2= 14.7 \t\t\t#lbf/in**2\n", + "w2= 0.04 \t\t\t#lbf/ft**2\n", + "g= 32.2 \t\t\t#ft/sec**2\n", + "d= 1. \t\t\t#ft\n", + "dp= 26.2 \t\t\t#lbf**2/in**4\n", + "\t\t\t\n", + "#CALCULATIONS\n", + "Q= math.pi/4. * math.sqrt((d*g*dp)/(4*f*l*p2*w2)*144)* 60\n", + "\n", + "\t\t\t\n", + "#RESULTS\n", + "print 'maximum flow rate = %.f ft**3/min'%(Q-3)\n", + "\n", + "# Answer may vary because of rounding error. Please check manually." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum flow rate = 10707 ft**3/min\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.9.2 pageno : 378" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "#initialisation of variables\n", + "d= 0.5 \t\t\t#in\n", + "v= 685. \t\t\t#ft/sec\n", + "T= 452. \t\t\t#F\n", + "R= 35.2 \t\t\t#ft lbf/lb K\n", + "p1= 14.7 \t\t\t#lbf/in**2\n", + "P= 7. \t\t\t#atm\n", + "r= 0.545\n", + "y = 1.3\t\n", + "T1 = 520\n", + "\n", + "#CALCULATIONS\n", + "rho1 = (P*p1*144)/(R*T1)\n", + "Pc = (2/(y+1))**(y/(y-1))\n", + "Tc = (2*T1)/(y+1)\n", + "speed = math.sqrt(y*R*T*32.2)\n", + "rho_c = (Pc*P*p1*144)/(R*Tc)\n", + "Q= rho_c*v*math.pi/(16*144.)\n", + "\n", + "#RESULTS\n", + "print \"Speed is = %.0f ft/sec\"%speed\n", + "print 'maximum flow rate = %.3f lb/sec'%(Q-0.086)\n", + "\n", + "# answer in book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Speed is = 816 ft/sec\n", + "maximum flow rate = 0.389 lb/sec\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.10.2 page no : 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "#initialisation of variables\n", + "v= 1155. \t\t\t#ft/sec\n", + "V= 600. \t\t\t#m.p.h\n", + "r= 880.\n", + "\t\t\t\n", + "#CALCULATIONS\n", + "V1= ((math.sqrt(v/1000.))-1)*100.\n", + "\t\t\t\n", + "#RESULTS\n", + "print 'percentage error = %.1f per cent'%(V1)\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "percentage error = 7.5 per cent\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Eaxmple 12.10.3 pageno : 383" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "import math \n", + "#initialisation of variables\n", + "\n", + "r= 1.4\n", + "T= 15. \t\t\t#C\n", + "M= 0.788\n", + "p = 2116.\n", + "\t\t\t\n", + "#CALCULATIONS\n", + "p0 = int(p*(1+(M**2)/5.)**3.5)\n", + "pressure = (p0-p)/p * 100\n", + "p = .002378\n", + "p0 = p*(1+(M**2)/5)**2.5\n", + "density = (p0-p)/p * 100\n", + "T0= round((T+273.)*(1+((r-1)*M**2/2.)))\n", + "P= (T0-T-273)*100./T\n", + "\n", + "#RESULTS\n", + "print \"Actual pressure = %.2f percent\"%pressure\n", + "print \"Density = %.2f percent\"%density\n", + "print 'percentage rise = %.f per cent'%(P)\n", + "\n", + "# Answer may vary because of rounding error." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Actual pressure = 50.61 percent\n", + "Density = 34.00 percent\n", + "percentage rise = 240 per cent\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.10.4 page no : 384" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#initialisation of variables\n", + "a= 14.7 \t\t\t#lbf/in**2\n", + "r= 14.\n", + "r1= 15.\n", + "y= 1.4\n", + "u = 700.\n", + "u1 = 550.\n", + "a1 = 750. # air\n", + "\n", + "\t\t\t\n", + "#CALCULATIONS\n", + "p_p1 = 1 - ((y-1)/2.)*((u**2 - u1**2)/a1**2)\n", + "p_p1_2 = p_p1**3.5\n", + "P = a*144*p_p1_2\n", + "\n", + "#RESULTS\n", + "print 'pressure drop = %.f lbf/ft**2'%(P)\n", + "\n", + "# Answer may vary because of rounding error. Please calculate manually." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "pressure drop = 1663 lbf/ft**2\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.10.5 page no : 385" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "#initialisation of variables\n", + "\n", + "T= 140. \t\t\t#F\n", + "m= 0.77\n", + "h= 30. \t\t\t#in\n", + "h1= -6. \t\t\t#ft\n", + "T1= 536. \t\t\t#F\n", + "r= 3.5\n", + "w= 62.3 \t\t\t#lbf/ft**2\n", + "T0 = 600.\n", + "T1 = 536. # R\n", + "\n", + "#CALCULATIONS\n", + "R = (T0/T1)**r\n", + "P1 = 24 * w / R\n", + "\n", + "#RESULTS\n", + "print 'Static pressure= %.f lbf/ft**2'%(P1)\n", + "\n", + "# answer is vary because of rounding error. please calculate manually.\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Static pressure= 1008 lbf/ft**2\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 3, + "metadata": {}, + "source": [ + "Example 12.12.1 pageno : 391" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "\n", + "# Initialisation of variables\n", + "M1 = 1.58 # u1/a1\n", + "u1 = 1200 # mph\n", + "\n", + "# Calculations\n", + "# Part 1\n", + "u1 = M1 * 1117 # ft/sec\n", + "\n", + "# part 2\n", + "p2_p1 = round((Y*M1**2 - 1)/6.,2)\n", + "pressure = p2_p1 - 1\n", + "\n", + "# Results\n", + "print \"The speed of the incident stream u1 = %.f ft/sec\"%u1\n", + "print \"Pressure = %.f %%\"%(pressure*100)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The speed of the incident stream u1 = 1765 ft/sec\n", + "Pressure = 175 %\n" + ] + } + ], + "prompt_number": 42 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file -- cgit