diff options
Diffstat (limited to 'Mechanics_of_Structures/Chapter8.ipynb')
-rwxr-xr-x | Mechanics_of_Structures/Chapter8.ipynb | 489 |
1 files changed, 489 insertions, 0 deletions
diff --git a/Mechanics_of_Structures/Chapter8.ipynb b/Mechanics_of_Structures/Chapter8.ipynb new file mode 100755 index 00000000..ea8f2292 --- /dev/null +++ b/Mechanics_of_Structures/Chapter8.ipynb @@ -0,0 +1,489 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:48abd6a26c994c0391cd48807ab25037b2bca2d3bc885b33747ef231a0cbe4f3"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter8-Direct and bending stresses"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg322"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate p_max and p_min\n",
+ "d = 6.;##inches\n",
+ "b = 3/4.;##inch\n",
+ "P = 18.;##tons\n",
+ "e = 1/8.;##inch\n",
+ "A = b*d;##sq.in\n",
+ "M = P*e;##ton-in\n",
+ "Z = (1./6.)*b*d**2;##in^3\n",
+ "p_0 = P/A;## tons/in^2\n",
+ "p_b = M/Z;## ton/in^2\n",
+ "p_max = p_0+p_b;## tons/in^2\n",
+ "p_min = p_0-p_b;## tons/in^2\n",
+ "print'%s %.1f %s'%('p_max =',p_max,'tons/in^2 tensile')\n",
+ "print'%s %.1f %s'%('p_min = ',p_min,'tons/in^2.,tensile')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "p_max = 4.5 tons/in^2 tensile\n",
+ "p_min = 3.5 tons/in^2.,tensile\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg323"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate p_max and p_min\n",
+ "d1 = 12.;##inches\n",
+ "t = 1.;##inch\n",
+ "d2 = d1-2.*t;##inches\n",
+ "P = 5.;##tons\n",
+ "e = 12.;##inch\n",
+ "A = 0.25*math.pi*(d1**2-d2**2);##sq.in\n",
+ "M = P*e;##ton-in\n",
+ "Z = math.pi*(d1**4-d2**4)/(32*d1);##in^3\n",
+ "p_0 = P/A;## tons/in^2\n",
+ "p_b = M/Z;## ton/in^2\n",
+ "p_max = p_0+p_b;## tons/in^2\n",
+ "p_min = p_0-p_b;## tons/in^2\n",
+ "print'%s %.4f %s'%('p_max =',p_max,'ton/in^2.,cmopressive')\n",
+ "print'%s %.4f %s'%('p_min =',p_min,'ton/in^2., tensile')\n",
+ "print'%s %.4f %s'%('p_min = ',-p_min,'ton/in^2., tensile')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "p_max = 0.8278 ton/in^2.,cmopressive\n",
+ "p_min = -0.5384 ton/in^2., tensile\n",
+ "p_min = 0.5384 ton/in^2., tensile\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate p_max and p_min\n",
+ "l = 6.;##inches\n",
+ "b = 4.;##inches\n",
+ "d = 1/2.;##inch\n",
+ "P = 10.;##tons\n",
+ "r = 1.5;##inches\n",
+ "A = 4.771;## in^2\n",
+ "J = 0.968;## inches\n",
+ "I_xx = 6.07;## in^4\n",
+ "I_yy = 8.64;## in^4\n",
+ "e = r-J;## inches\n",
+ "M = P*e;## ton-inches\n",
+ "y_t = J;##inches \n",
+ "y_c = b-y_t;##inches\n",
+ "##compressive\n",
+ "p_c = M*y_c/I_xx;## tons/in^2\n",
+ "##tensile\n",
+ "p_t = M*y_t/I_xx;## tons/in^2\n",
+ "##compressive\n",
+ "p_0 = P/A ;## tons/in^2\n",
+ "p_max = p_0+p_c;## tons/in^2\n",
+ "p_min = p_0-p_t;## tons/in^2\n",
+ "print'%s %.3f %s'%('p_max =',p_max,'tons/in^2.,compressive')\n",
+ "print'%s %.3f %s'%('p_min =',p_min,'tons/in^2.,compressive')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "p_max = 4.753 tons/in^2.,compressive\n",
+ "p_min = 1.248 tons/in^2.,compressive\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate p_max and p_min\n",
+ "b = 5.;##inches\n",
+ "t = 1/2.;##inch\n",
+ "P = 12.;##tons\n",
+ "d = 1/2.;##inch\n",
+ "r = 3/2.;##inch\n",
+ "A = (b-d)*t;## in^2\n",
+ "p_0 = P/A;## tons/in^2\n",
+ "a1 = b*d;## in^2\n",
+ "x1 = 0.;\n",
+ "a2 = d*t;## in^2\n",
+ "x2 = -3/2.;\n",
+ "e = (a1*x1-a2*x2)/(a1-a2);##inches\n",
+ "M = P*e;## ton-inches\n",
+ "y_c = a1-e;## inches\n",
+ "y_t = a1+e;## inches\n",
+ "I_yy = (t*b**3)/12. - ((t*d**3)/12. + 0.5*d*r**2);## in^4\n",
+ "I_GG = I_yy - (a1-a2)*(e**2);## in^4\n",
+ "p_c = M*y_c/I_GG;## tons/in^2\n",
+ "p_t = M*y_t/I_GG;## tons/in^2\n",
+ "p_max = p_0 + p_t;## tons/in^2\n",
+ "p_min = p_0 - p_c;## tons/in^2\n",
+ "print'%s %.1f %s'%('p_max = ',p_max,' tons/in^2., tensile')\n",
+ "print'%s %.2f %s'%('p_min =',p_min,'tons/in^2., tensile')\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "p_max = 6.5 tons/in^2., tensile\n",
+ "p_min = 4.31 tons/in^2., tensile\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate p_max and p_min\n",
+ "h = 20.;## feet\n",
+ "b = 12.;## feet\n",
+ "d = 4.;## feet\n",
+ "p = 30.;## lb. per sq.foot\n",
+ "rho = 140.;## lb. per cubic foot\n",
+ "p_0 = rho*h;## lb-ft^2\n",
+ "P = p*b*h;## lb-wt\n",
+ "M = P*h/2;##lb-ft\n",
+ "Z = b*d**2/6;## ft^3\n",
+ "p_b = M/Z;## lb/ft^2\n",
+ "p_max = p_0 + p_b;## lb/ft^2\n",
+ "p_min = p_0 - p_b;## lb/ft^2\n",
+ "print'%s %.d %s'%('p_max =',p_max,'lb/ft^2., compressive')\n",
+ "print'%s %.d %s'%('p_min =',p_min,'lb/ft^2., compressive')\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "p_max = 5050 lb/ft^2., compressive\n",
+ "p_min = 550 lb/ft^2., compressive\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex6-pg327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate The necessary thickness\n",
+ "h = 80.;## feet\n",
+ "p = 28.;## lb. per sq.foot\n",
+ "rho = 126.;## lb. per cubic foot\n",
+ "p_0 = rho*h/2240.;## tons-ft^2\n",
+ "p_max = 7.;## tons/ft^2\n",
+ "d = 4.;## feet\n",
+ "p_b = p_max - p_0;## tons/ft^2\n",
+ "D = math.sqrt(3*p*h**2 /(2*p_b*2240.) +math.sqrt(d**4 + (3*p*h**2 /(2.*p_b*2240.))**2));## feet\n",
+ "t = 0.5*(D-d);## feet\n",
+ "print'%s %.d %s'%('The necessary thickness is, t =',round(t),'feet');\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The necessary thickness is, t = 3 feet\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex7-pg330"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate p_max and p_min\n",
+ "h = 60.;##feet\n",
+ "rho = 130.;## lb. per cubic foot\n",
+ "D = 12.;##feet\n",
+ "d = 5.;##feet\n",
+ "P_h = 24.;## lb. per sq. foot\n",
+ "p_0 = rho*h;## lb-ft^2\n",
+ "P = P_h*D*h;## lb-wt\n",
+ "M = P*h/2;## lb-feet\n",
+ "Z = math.pi*(D**4 - d**4)/(32*D);##lb-ft^3\n",
+ "p_b = M/Z;## lb/ft^2\n",
+ "p_max = p_0 + p_b;## lb/ft^2\n",
+ "p_min = p_0 - p_b;## lb/ft^2\n",
+ "print'%s %.d %s'%('p_max =',p_max,'lb/ft^2., compressive')\n",
+ "print'%s %.d %s'%('p_min =',p_min,'lb/ft^2., compressive')\n",
+ "##there is an error in the answer given in text book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "p_max = 10950 lb/ft^2., compressive\n",
+ "p_min = 4649 lb/ft^2., compressive\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex8-pg330"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "import scipy\n",
+ "#calculate Bending moment at the foot of the chimney \n",
+ "from scipy import integrate\n",
+ "h = 120.;## feet\n",
+ "d = 5.;## feet\n",
+ "h1 = 49.;## feet\n",
+ "p = 42.;## lb. per square foot\n",
+ "c = 0.6;\n",
+ "k = p/math.sqrt(h1);\n",
+ "##p = k*math.sqrt(x)\n",
+ "\n",
+ "def fun(x):\n",
+ "\ty=18.*x**(3./2.)\n",
+ "\treturn y\n",
+ "\n",
+ "M = scipy.integrate.quad(fun,0.,120.);\n",
+ "M=M[0]\n",
+ "print'%s %.1f %s'%('Bending moment at the foot of the chimney is, M =',M,'lb-ft');\n",
+ "##there is an error in the answer given in text book\n",
+ "print(M)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bending moment at the foot of the chimney is, M = 1135757.5 lb-ft\n",
+ "1135757.49523\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex9-pg331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate Bending moment at the foot of the chimney \n",
+ "import scipy\n",
+ "from scipy import integrate\n",
+ "h = 100.;## feet\n",
+ "d = 4.;## feet\n",
+ "p = 50.;## lb. per square foot\n",
+ "c = 2/3.;\n",
+ "def fun(x):\n",
+ "\ty=(100*x/3.)*(10-(6*x/100.))\n",
+ "\treturn y;\n",
+ "\n",
+ "M=scipy.integrate.quad(fun,0,100)\t\n",
+ "M = M[0]\n",
+ "print'%s %.d %s'%('Bending moment at the foot of the chimney is, M =',M,'lb-feet');\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bending moment at the foot of the chimney is, M = 1000000 lb-feet\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex10-pg332"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#calculate p_max and p_min\n",
+ "h = 20.;## feet\n",
+ "b = 4.;## feet\n",
+ "d = 12.;## feet\n",
+ "h1 = 18.;## feet\n",
+ "##density of masonary\n",
+ "rho_m = 140.;## lb-ft^3\n",
+ "##density of water\n",
+ "rho_w = 62.5;## lb-ft^3\n",
+ "W = rho_m*0.5*(b+d)*h;## lb-wt\n",
+ "##to locate its line of action divide the dam section into a rectangle and a triangle \n",
+ "x1 = b/2.;##feet\n",
+ "a1 = b*h;## sq. feet\n",
+ "a2 = 0.5*(d-b)*h;## sq. feet\n",
+ "x2 = b+((d-b)/3);## feet\n",
+ "x_bar = (a1*x1+a2*x2)/(a1+a2);## feet\n",
+ "P = rho_w*h1**2/2;## lb-wt\n",
+ "z = x_bar + (h1/3)*(P/W);## feet\n",
+ "e = z - d/2.;## feet\n",
+ "p_0 = W/d;## lb/ft^2\n",
+ "M = W*e;## lb-feet\n",
+ "Z = 1*d**2*1/6.;## ft^3\n",
+ "p_b = M/Z;## lb-ft^2\n",
+ "p_max = p_0 + p_b;## lb-ft^2\n",
+ "p_min = p_0 - p_b;## lb-ft^2\n",
+ "print'%s %.1f %s'%('p_max =',p_max,'lb/ft^2., compressive at B.')\n",
+ "print'%s %.1f %s'%('p_min =',p_min,'lb/ft^2., compressive at A.')\n",
+ "\n",
+ "\n",
+ "##there is an error in the answer given in text book\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "p_max = 2842.4 lb/ft^2., compressive at B.\n",
+ "p_min = 891.0 lb/ft^2., compressive at A.\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |