{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 4: viscosity" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exa 4.1" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "SI units (Pa s) = 1.00e-03\n", " \n", " BE units (lbm/ft s) = 6.73e-02\n", " \n", " Reyns units (reyn) = 1.45e-05\n", "press enter key to exit\n" ] }, { "data": { "text/plain": [ "''" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#At 68F the experimental value of absolute viscosity for water is 1 cp.\n", "#What is the equivalent value in (a)SI units (b) BTU and (c)reyns?\n", "import math\n", "#initialisation of variables\n", "V= 1. \t\t\t\t\t\t\t\t#cp\n", "#CALCULATIONS\n", "#An extra 100 is multiplied to convert poise to lbf s \n", "SI= V/100./10. \t\t\t\t\t\t#Pa.s\n", "BE= (V*32.2*100/100)/(4.788*100.) \t#lbf s/ft^2\n", "RE= V*100/100./(4.788*100*144.) \t#reyn\n", "#RESULTS\n", "print '%s %.2e' % ('SI units (Pa s) = ',SI)\n", "print '%s %.2e' % (' \\n BE units (lbm/ft s) = ',BE)\n", "print '%s %.2e' % (' \\n Reyns units (reyn) = ',RE)\n", "raw_input('press enter key to exit')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exa 4.2" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "SI Units (m^2/s) = 1.00e-06\n", " \n", " British Units (ft/s) = 1.08e-05\n", "press enter key to exit\n" ] }, { "data": { "text/plain": [ "''" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#Determine the kinematic viscosity of water at 68F in (a)SI units (b) BTU\n", "import math\n", "#initialisation of variables\n", "T= 68 \t\t\t\t\t\t\t#F\n", "d= 1.0\t\t\t\t\t \t\t#gm/cm^3\n", "mu= math.pow(10,-2) \t\t\t#gm/cm s\n", "SIm= math.pow(10,-4) \t\t\t#m^2/s\n", "m= 10.76 \t\t\t\t\t\t#ft\n", "#CALCULATIONS\n", "SI= mu*SIm \t\t\t\t\t\t#kinematic viscosity in SI\n", "BU= SI*m \t\t\t\t\t\t#kinematic viscosity in BTU\n", "#RESULTS\n", "print '%s %.2e' % ('SI Units (m^2/s) = ',SI)\n", "print '%s %.2e' % (' \\n British Units (ft/s) = ',BU)\n", "raw_input('press enter key to exit')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exa 4.3" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Stoke Units (stoke) = 0.0430\n", "press enter key to exit\n" ] }, { "data": { "text/plain": [ "''" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#Determine the kinematic viscosity of 40 SUS oil.\n", "import math\n", "#initialisation of variables\n", "Ku= 40. \t\t\t\t\t\t#SUS\n", "#CALCULATIONS\n", "SU= 0.0022*Ku-(1.8/Ku) \t\t\t#stoke units\n", "#RESULTS\n", "print '%s %.4f' % ('Stoke Units (stoke) = ',SU)\n", "raw_input('press enter key to exit')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exa 4.4" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Re= 2.604e+05\n", " \n", " Re= 2.604e+05\n", "press enter key to exit\n" ] }, { "data": { "text/plain": [ "''" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#Air at 70F flows through a duct at 50 fps. Calculate the Reynolds number\n", "#if the duct is (a) 10 in in diameter (b) 10 in square\n", "import math\n", "#initialisation of variables\n", "v= 50 \t\t\t\t\t\t\t\t\t#fps\n", "mu= 1.6*math.pow(10,-4) \t\t\t\t#ft^2/s\n", "d1= 10. \t\t\t\t\t\t\t\t#in\n", "d2= 10. \t\t\t\t\t\t\t\t#in square\n", "#CALACULATIONS\n", "D= (math.pi*4*d1*d1/4)/(math.pi*d2*12) \t#Modified diameter\n", "Re= (v*D)/mu \t\t\t\t\t\t\t#Reynolds number\n", "D1= (d1*d1/(4*d2*3)) \t\t\t\t\t#Modified diameter\n", "Re1= (v*D1)/mu \t\t\t\t\t\t\t#Reynolds number\n", "#RESULTS\n", "print '%s %.3e' % ('Re= ',Re)\n", "print '%s %.3e' % (' \\n Re= ',Re1)\n", "raw_input('press enter key to exit')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exa 4.5" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Q (m^3/s) = 8.77e-07\n", "press enter key to exit\n" ] }, { "data": { "text/plain": [ "''" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#A fluid with a viscosity of 1.75x 10^-3 pa.s. flows through a tube of 0.5 mm\n", "#diameter. if the pressure drop across a 1m length of the tube is 1 MPa, and \n", "#the flow is fully developed and laminar, what is the flow rate?\n", "import math\n", "#initialisation of variables\n", "v= 1.75*math.pow(10,-3) \t\t\t\t\t\t\t\t\t#pa s\n", "l= 1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t#m\n", "P= 1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t#Mpa\n", "d= 0.5 \t\t\t\t\t\t\t\t\t\t\t\t\t\t#mm\n", "#CALCULATIONS\n", "Q= (math.pi*P*1000000.*math.pow(((d/2)/1000.),4))/(l*8*v)\t#Flow rate\n", "#RESULTS \n", "print '%s %.2e' % ('Q (m^3/s) = ',Q)\n", "raw_input('press enter key to exit')" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 0 }