{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "

# Chapter 11: GETTING STARTED IN FLUID MECHANICS: FLUID STATICS

" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

## Example 11.01, page: 253

" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "import math\n", "\n", "# Initialization of Variable\n", "rgas = 42.5 #lbf/ft3\n", "rwater = 62.4 #lbf/ft3\n", "hgas = 17 #ft\n", "hwater = 3 #ft\n", "\n", "#calculations:\n", "#pressure relative to atmospheric pressure at 1\n", "#Pdiff1 = P1- P0\n", "Pdiff1 = rgas*hgas\n", "#corresponding pressure head in feet of water is therefore at 1\n", "#head1 = (P1-P0)/rwater\n", "head1 = Pdiff1/rwater\n", "#pressure relative to atmospheric pressure at 2(bottom)\n", "#Pdiff2 = P2- P0\n", "Pdiff2 = rwater*hwater + Pdiff1\n", "#corresponding pressure head in feet of water is therefore at 1\n", "#head2 = (P2-P0)/rwater\n", "head2 = Pdiff2/rwater\n", "\n", "#Results\n", "print \" the pressure relative to atmospheric pressure at junction is\", Pdiff1,\"lbf/ft2 or\", round(Pdiff1/144,2),\"lbf/in2\"\n", "print \" corresponding pressure head in feet of water is\", round(head1,1),\"ft\"\n", "print \" the pressure relative to atmospheric pressure battom is\", Pdiff2,\"lbf/ft2 or\", round(Pdiff2/144,2),\"lbf/in2\"\n", "print \" corresponding pressure head in feet of water is\", round(head2,1),\"ft\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " the pressure relative to atmospheric pressure at junction is 722.5 lbf/ft2 or 5.02 lbf/in2\n", " corresponding pressure head in feet of water is 11.6 ft\n", " the pressure relative to atmospheric pressure battom is 909.7 lbf/ft2 or 6.32 lbf/in2\n", " corresponding pressure head in feet of water is 14.6 ft\n" ] } ], "prompt_number": 2 }, { "cell_type": "markdown", "metadata": {}, "source": [ "

## Example 11.02, page: 258

" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "import math\n", "\n", "# Initialization of Variable\n", "SGoil = 0.9\n", "rwater = 62.4 #lbf/ft3\n", "h1 = 36/12 #ft\n", "h2 = 6/12 #ft\n", "SGhg = 13.6\n", "h3 = 9/12 #ft\n", "\n", "#calculations:\n", "Pair = -1*SGoil*rwater*(h1 + h2) + SGhg*rwater*h3\n", "#gage pressure\n", "Pgage = Pair/144\n", "\n", "#Results\n", "print \"Gage pressure is\",round(Pgage,2),\"lbf/in2(psi)\" \n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Gage pressure is 3.06 lbf/in2(psi)\n" ] } ], "prompt_number": 3 }, { "cell_type": "markdown", "metadata": {}, "source": [ "

## Example 11.03, page: 262

" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "import math\n", "\n", "# Initialization of Variable\n", "b = 2 #m\n", "r = 9.8E3 #N/m3\n", "a = 4 #m\n", "\n", "#calculations:\n", "Yc = 8\n", "#area\n", "A = b*a\n", "hc = Yc*math.sin(60*math.pi/180)\n", "FR = r*hc*A\n", "#moment of Inertia\n", "Ixc = (b*a**3)/12\n", "#location\n", "YR = Ixc/(Yc*A) + Yc\n", "\n", "#Results\n", "print \"the magnitude and location of the resultant force exerted on the gate by the water are\", round(FR,0),\"N at\", round(YR,2),\"m\" \n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the magnitude and location of the resultant force exerted on the gate by the water are 543171.0 N at 8.17 m\n" ] } ], "prompt_number": 4 } ], "metadata": {} } ] }