{ "metadata": { "name": "", "signature": "sha256:3e2ac1bf133acbbd856da5493c5fd89c5f1a7ed7a5559688ae90d4aacb790c72" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter12-Hydrodynamics" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex1-pg155" ] }, { "cell_type": "code", "collapsed": false, "input": [ "##Solutions to Problems In applied mechanics\n", "##A N Gobby\n", "import math\n", "##initialisation of variables\n", "p=144.*60.##lbf/ft^2\n", "A1=1./4.*math.pi*(1/2.)**2##ft^2\n", "A2=1./4.*math.pi*(1/4.)**2##ft^2\n", "w=5.##ft/s\n", "U1=1./A1##ft/s\n", "U2=1./A2##ft/s\n", "g=32.2##ft/s\n", "P=(U1**2/(2.*g))+(p/(2.*g))\n", "P1=(3.+U2**2/(62.4))+(144./(62.4))\n", "##CALCULATIONS\n", "Pb=(P/P1)*w##lbf/in^2\n", "##RESULTS\n", "print'%s %.2f %s'%('the bernouli s equation= ',Pb,' lbf/in^2')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the bernouli s equation= 56.26 lbf/in^2\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex2-pg156" ] }, { "cell_type": "code", "collapsed": false, "input": [ "##Solutions to Problems In applied mechanics\n", "##A N Gobby\n", "import math\n", "##initialisation of variables\n", "p=1.23##ft^2\n", "t=0.197##ft^2\n", "u=1.595##ft^2\n", "g=13.56##ft^2\n", "w=9.2##in\n", "m=0.97##in\n", "##CALCULATIONS\n", "H=(g-1.)*w/12.##ft^2\n", "Q=m*u*math.sqrt(H)##ft^3\n", "S=Q*60.*62.4/10.##gallons/min\n", "##RESULTS\n", "print'%s %.2f %s'%('the head difference in feet of water= ',S,' gallons/min')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the head difference in feet of water= 1797.49 gallons/min\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex3-pg158" ] }, { "cell_type": "code", "collapsed": false, "input": [ "##Solutions to Problems In applied mechanics\n", "##A N Gobby\n", "import math\n", "##initialisation of variables\n", "h=4.##ft\n", "h1=3.24##ft^3/min\n", "d=0.785##in\n", "v=5.26##ft^3/min\n", "##CALCULATIONS\n", "Cd=h1/v##ft\n", "C=1/4.*math.pi*(d)**2/(1./4.*math.pi*(1.)**2)##ft^3\n", "V=Cd/C\n", "##RESULTS\n", "print'%s %.2f %s'%('the coefficients of discharge velocity and contraction=',V,'')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the coefficients of discharge velocity and contraction= 1.00 \n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex4-pg159" ] }, { "cell_type": "code", "collapsed": false, "input": [ "##Solutions to Problems In applied mechanics\n", "##A N Gobby\n", "import math\n", "##initialisation of variables\n", "x=32.5##in\n", "y=33.7##in\n", "h=8.##in\n", "##CALCULATIONS\n", "C=math.sqrt((x)**2/(4.*y*h))##ft\n", "##RESULTS\n", "print'%s %.2f %s'%('the coefficient of velocity= ',C,' ft')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the coefficient of velocity= 0.99 ft\n" ] } ], "prompt_number": 4 } ], "metadata": {} } ] }