{ "metadata": { "name": "", "signature": "sha256:f143b35f244a2a7e967ebf0b33077a6d51a6aba9e6ffcf138aad816a0cdd4f33" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter11-Hydrostatics" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex1-pg141" ] }, { "cell_type": "code", "collapsed": false, "input": [ "##Solutions to Problems In applied mechanics\n", "##A N Gobby\n", "import math\n", "##initialisation of variables\n", "w=62.5##lbf\n", "a=4.*6.##ft\n", "x=4.##ft\n", "l=(6.*6**3)/3.-(6.*2**3)/3.##ft^3\n", "q=24.*x##ft^3\n", "##CALCULATIONS\n", "T=w*a*x##lbf\n", "P=l/q##ft\n", "##RESULTS\n", "print'%s %.2f %s'%('the depth of centre of pressure= ',P,' ft')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the depth of centre of pressure= 4.33 ft\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex2-pg142" ] }, { "cell_type": "code", "collapsed": false, "input": [ "##Solutions to Problems In applied mechanics\n", "##A N Gobby\n", "import math\n", "##initialisation of variables\n", "a=60.##degre\n", "w=2.5##ft\n", "x=3.##ft\n", "p=6.*3.##ft^2\n", "h=62.4##ft\n", "p1=(3.*6**3)/12.##ft^4\n", "##CALCULATIONS\n", "D=w+x*(math.sin(a))##ft\n", "T=h*p*D##lbf\n", "P=(p1*math.sin(a)**2)/p*D+D+3##ft\n", "##RESULTS\n", "print'%s %.2f %s'%('the depth of centre of pressure= ',P,' ft')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the depth of centre of pressure= 5.03 ft\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex3-pg143" ] }, { "cell_type": "code", "collapsed": false, "input": [ "##Solutions to Problems In applied mechanics\n", "##A N Gobby\n", "import math\n", "##initialisation of variables\n", "t=62.5*4.*1.##lbf\n", "a=2./3.*2.##ft\n", "m=62.5*4*(4/3)##lbf\n", "f=500.*2.##lbf ft\n", "T=((62.5*2.*2.)/2.)*1./3.*2.##lbf\n", "H=(62.5*2.*1.)##ft\n", "##CALCULATIONS\n", "H1=f/(H+T)*2./2.9##/ft\n", "##RESULTS\n", "print'%s %.2f %s'%('the trap door width= ',H1,' ft')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the trap door width= 3.31 ft\n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex4-pg146" ] }, { "cell_type": "code", "collapsed": false, "input": [ "##Solutions to Problems In applied mechanics\n", "##A N Gobby\n", "import math\n", "##initialisation of variables\n", "g=6.##ft\n", "g1=50.##ft\n", "d=10.##ft\n", "w1=10.##ft\n", "w2=20.##ft\n", "w3=62.5##ft\n", "t=w3*60.*5.##lbf\n", "t2=8.37##tonf\n", "t1=g1+t##lbf\n", "H=26.4##ft\n", "##CALCULATIONS\n", "M=t*d/3##lbf ft\n", "D=w3*w2*g*d##lbf\n", "M1=D*(w2/3.)##lbf ft\n", "f=D-t##lbf\n", "R=(M1-M)/f##ft\n", "##RESULTS\n", "print'%s %.2f %s'%('the moment of resultant force about gate base= ',R,' ft')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the moment of resultant force about gate base= 7.78 ft\n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex6-pg148" ] }, { "cell_type": "code", "collapsed": false, "input": [ "##Solutions to Problems In applied mechanics\n", "##A N Gobby\n", "import math\n", "##initialisation of variables\n", "w=62.5##lbf/ft\n", "w1=1.5##ft\n", "d=4.##ft\n", "w2=3.##ft\n", "g=0.8##in\n", "p1=2./3.*w1##ft\n", "q=2./3.*p1##ft\n", "##CALCULATIONS\n", "t1=w1*w*w1/2.##lbf\n", "p=(g*w*p1*p1)/2.##lbf\n", "A=g*w*p1*1./2.##lbf\n", "T=(w*0.5*0.5/2.)##lbf\n", "P=t1-p-A-T##lbf\n", "h=2.9*P/(t1*1.-p*2.)/3.-p*(1.*0.25)-(T*1.33)##ft\n", "F=P*A/w+3##lbf\n", "\n", "H=F/2.##lbf\n", "##RESULTS\n", "print'%s %.2f %s'%('depth of forces= ',F,' lbf')\n", "print'%s %.2f %s'%('the moment of force on hinge= ',H,' lbf')\n", "\n", "#ans is slightly different due to round off error" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "depth of forces= 8.00 lbf\n", "the moment of force on hinge= 4.00 lbf\n" ] } ], "prompt_number": 16 } ], "metadata": {} } ] }