{ "metadata": { "name": "", "signature": "sha256:369e99bb86bfee04526d8c71fa878425d0c2630ec6c7783b1e559db8ef69fb9f" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter5-Beams and bending" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex1-pg140" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate maximum intensity of stress\n", "b = 6.;## inches \n", "t = 1./2.;## inch\n", "R = 40.;## feet\n", "E = 13000.;## tons/in^2\n", "y = t/2.;## inch\n", "f = (E/(R*12.))*(y);## tons/in^2\n", "print'%s %.2f %s'%('The maximum intensity of stress induced is f =',f,'tons/in^2')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The maximum intensity of stress induced is f = 6.77 tons/in^2\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex2-pg141" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate moment of resistance and The radius to which it should be bent \n", "d = 14.;## inches\n", "I = 442.57;##inch units\n", "f = 8.;## tons/in^2\n", "E = 13000.;## tons/in^2\n", "R = E*d/(2.*f);## inches\n", "M_r = f*(I/(d/2.));## ton-inches\n", "print'%s %.d %s'%('The radius to which it should be bent is R =',R,'inches')\n", "print'%s %.1f %s'%('The radius to which it should be bent is R =',R/12,'feet');\n", "print'%s %.1f %s'%('The moment of resistance is M_r =',M_r,'ton-inches');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The radius to which it should be bent is R = 11375 inches\n", "The radius to which it should be bent is R = 947.9 feet\n", "The moment of resistance is M_r = 505.8 ton-inches\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex3-pg141\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate the load is uniformly spread over its span and the load is concentrated at the centre \n", "d = 16.;## inches\n", "I = 618.;## inch units\n", "l = 24.;## feet\n", "f = 15./2.;## tons/in^2\n", "Z = I/(d/2.);## inch-units\n", "M_r = f*Z;## ton-inches\n", "##If the load is uniformly spread over its span,BM = W*l/8\n", "W1 = 8.*M_r/(12.*l);##tons\n", "##If the load is concentrated at the centre,BM = W*l/4\n", "W2 = 4.*M_r/(12.*l);##tons\n", "print'%s %.1f %s'%('If the load is uniformly spread over its span, then W is given by W1=',W1,'tons')\n", "print'%s %.3f %s'%('If the load is uniformly spread over its span, then W is given by W1 =',W1/l,'ton per foot run');\n", "print'%s %.2f %s'%('If the load is concentrated at the centre, then W is given by W =',W2,'tons')\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "If the load is uniformly spread over its span, then W is given by W1= 16.1 tons\n", "If the load is uniformly spread over its span, then W is given by W1 = 0.671 ton per foot run\n", "If the load is concentrated at the centre, then W is given by W = 8.05 tons\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex4-pg142" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculalte The maximum permissible span for this beam\n", "d = 20.;## inches\n", "I = 1673.;## inch units\n", "W = 3./4.;## ton per foot run\n", "f = 8.;## tons/in^2\n", "Z = I/(d/2.);## inch-units\n", "M_r = f*Z;## ton-inches\n", "l = math.sqrt(M_r*32/(3*12));##feet\n", "print'%s %.2f %s'%('The maximum permissible span for this beam is l =',l,'feet')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The maximum permissible span for this beam is l = 34.49 feet\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5-pg145" ] }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex6-pg154" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate X\n", "w = 160.;## lb. per sq. foot\n", "b = 3.;## inches\n", "d = 9.;## inches\n", "l = 15.;## feet\n", "f = 1200.;## lb. per sq. inch\n", "Z = (1./6.)*b*d**2;## in^3\n", "M_r = f*Z;## lb-inches\n", "x = M_r/(w*l**2*12./8.);## feet\n", "print'%s %.1f %s'%('x =',x,'feet');\n", "\n", "##The answer is correct only, but it is approximated in the text book\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "x = 0.9 feet\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7-pg154" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate area of cross section of beam\n", "l = 20.;## feet\n", "b = 9.;## inches\n", "h = 10.;## feet\n", "w = 120.;## lb. per cub. foot\n", "f = 1100.;## lb/in^2\n", "W = w*(3./4.)*l*h;## lb-wt\n", "BM_max = W*l*12./8.;## lb-inches\n", "##assumnig d = 2b\n", "b = (6.*BM_max/(f*4.))**(1/3.);## inches\n", "d = 2.*b;## inches\n", "print'%s %.3f %s'%('b =',b,'inches')\n", "print'%s %.2f %s'%('d =',d,'inches',)\n", "print'%s %.d %s'%('A section',b,'') \n", "print'%s %.d %s'%('X',d,'will therfore do.')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "b = 9.030 inches\n", "d = 18.06 inches\n", "A section 9 \n", "X 18 will therfore do.\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex8-pg155" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate beam of area\n", "B = 5.;## inches\n", "D = 12.;## inches\n", "t1 = 0.55;## inches\n", "t2 = 0.35;## inches\n", "f = 15./2.;## tons/in^2\n", "l = 16.;## feet\n", "b = B-t2;## inches\n", "d = D-2.*t1;## inches\n", "I_xx = (B*D**3 - b*d**3)/12.;## in^4\n", "Z = I_xx/6.;## in^3\n", "M_r = f*Z;## ton-inches\n", "W = M_r/(l*12./8.);## tons\n", "w = W/l;## ton per foot run\n", "print'%s %.2f %s'%('W =',W,'tons')\n", "print'%s %.2f %s'%('w =',w,'ton per foot run')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "W = 11.36 tons\n", "w = 0.71 ton per foot run\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex9-pg156" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate maximum stress\n", "D = 19.5;## inches\n", "d = 18.;## inches\n", "l = 30.;## feet\n", "t1 = 3./4.;## inch\n", "rho1 = 450.;## lb. per cub. foot\n", "rho2 = 62.5;## lb. per cub. foot\n", "A = 0.25*math.pi*(D**2 - d**2);## sq. in\n", "DW = rho1*l*A/144.;## lb-wt\n", "WW = rho2*0.25*math.pi*(D-d)**2*l;## lb-wt\n", "W = DW+WW;## lb-wt\n", "BM_max = W*l*0.0004467202*12./8.;## ton-inches\n", "I_xx = (math.pi/64)*(D**4 - d**4);## in^4\n", "Z_xx = I_xx/(0.5*d+t1);## ton/in^2\n", "f = BM_max/Z_xx;## ton/in^2\n", "print'%s %.3f %s'%('The maximum stress f =',f,'ton/in^2');\n", "\n", "##there is an error in the answer given in text book\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The maximum stress f = 0.751 ton/in^2\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex11-pg158" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate The maximum permissible span for this beam\n", "b = 6.;## inches\n", "d = 12.;## inches\n", "t1 = 7./8;## inch\n", "t2 = 1./2.;## inch\n", "I_xx = (1./12.)*(b*d**3 - (b-t2)*(d-2*t1)**3);## in^4\n", "Z1 = I_xx/b;## in ^3\n", "A = 2*b*t1 + 0.5*(d-2*t1);## in^2\n", "b = math.sqrt(A/2);## inches\n", "d = 2.*b;## inches\n", "Z2 = (1./6.)*b*d**2;## in^3\n", "k = Z1/Z2 ;\n", "print'%s %.2f %s'%('The ratio of strengths Z1/Z2 =',k,'');\n", "\n", "##there is an error in the answer given in text book\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The ratio of strengths Z1/Z2 = 4.24 \n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex12-pg159" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate the strength of the solid circular section is taken as unity\n", "A = 15.625;## in**2\n", "Z1 = 61.75;## in**3\n", "Z2 = 14.63;## in**3\n", "d = math.sqrt(4.*A/math.pi);## inches\n", "Z3 = (math.pi/32.)*d**3.;## in**3\n", "R1 = Z1/Z3;\n", "R2 = Z2/Z3;\n", "print('If the strength of the solid circular section is taken as unity') \n", "print'%s %.2f %s %.2f %s'%('that of the rectangular section is',R1,' and of the I-section it is ',R2,'')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "If the strength of the solid circular section is taken as unity\n", "that of the rectangular section is 7.09 and of the I-section it is 1.68 \n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex13-pg161" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate Position of the c.g of the sections\n", "D = 8.;##h inches\n", "B = 3.;## inches\n", "t1 = 1/2.;## inch\n", "t2 = 3/8.;## inch\n", "b = B-t2;## inches\n", "d = D-2.*t1;## inches\n", "a1 = t1*B;## in**2\n", "x1 = 0.5*B;## inches\n", "a2 = t2*(D-2.*t1);## in**2\n", "x2 = 0.5*t2;## inches\n", "a3 = B*t1;## in**2\n", "x3 = 0.5*B;## inches\n", "a = a1+a2+a3;## in**2\n", "P = (a1*x1+a2*x2+a3*x3)/(a1+a2+a3);## inches\n", "I_xx = (1/12.)*(B*D**3. - b*d**3.);## in**4\n", "I_AB = (1/3.)*t1*B**3. + (1/3.)*d*t2**3. + (1/3.)*t1*B**3.;## in**4\n", "I_yy = I_AB - a*P**2.;## in**4\n", "print'%s %.3f %s'%('Position of the c.g of the section P = ',P,' inches');\n", "print'%s %.4f %s'%('I_xx = ',I_xx,'in**4')\n", "print'%s %.3f %s' %('I_yy =',I_yy,'in**4');\n", "##there is an error in the answer given in text book\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Position of the c.g of the section P = 0.887 inches\n", "I_xx = 52.9688 in**4\n", "I_yy = 4.692 in**4\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex14-pg163" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate The position of the c.g and Maximum stresses induced\n", "b = 6.;## inches\n", "d = 4.;## inches\n", "t = 5/8.;## inch\n", "a1 = d*t;## in^2\n", "y1 = d/2.;## inches\n", "a2 = (b-t)*t;## in^2\n", "y2 = t/2.;## inch\n", "a = a1+a2;## in^2\n", "J = (a1*y1+a2*y2)/(a1+a2);## inches\n", "I_AB = (1/3.)*t*d**3 + (1/3.)*(b-t)*t**3;## in^4\n", "I_xx = I_AB - a*J**2.;## in^4\n", "I_yy = (1/12.)*t*b**3. + (1/12.)*(d-t)*t**3.;## in^4\n", "print'%s %.1f %s'%('The position of the c.g is J = ',J,' inches');\n", "print'%s %.2f %s %.2f %s'%(' I_xx =',I_xx,' in^4,'' I_yy = ',I_yy,'in^4');\n", "\n", "\n", "##14(a)\n", "H = 18.;## feet\n", "l = 10.;## feet\n", "w = 3/2.;## cwt/ per .sq. foot\n", "y_c = 2.97;## inches\n", "y_t = 1.03;## inches\n", "W = (3/40.)*(w*l);## tons\n", "BM_max = W*l*12./8.;## ton-inches\n", "M_r = BM_max;## ton-inches\n", "f_c = M_r*y_c/I_xx ;## tons/in^2\n", "f_t = M_r*y_t/I_xx ;## tons/in^2\n", "print'%s %.2f %s %.2f %s'%(' Maximum stresses induced are f_c = ',f_c,' tons/in^2,''f_t = ',f_t,' tons/in^2');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The position of the c.g is J = 1.0 inches\n", " I_xx = 7.52 in^4, I_yy = 11.32 in^4\n", " Maximum stresses induced are f_c = 6.66 tons/in^2,f_t = 2.31 tons/in^2\n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex15-pg165" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate The position of c.g is x_bar and Total uniformly distribute load over the span\n", "b = 5.;## inches\n", "d = 4.;## inches\n", "t = 1/2.;## inches\n", "a1 = b*t;## in**2\n", "x1 = t/2.;## inches\n", "y1 = b/2.;## inches\n", "a2 = (d-t)*t;## in**2\n", "y2 = t/2.;## inch\n", "x2 = t + 0.5*(d-t);## inches\n", "x_bar = (a1*x1+a2*x2)/(a1+a2);## inches\n", "y_bar = (a1*y1+a2*y2)/(a1+a2);## inches\n", "I_AB = (1/3.)*t*b**3. + (1/3.)*(d-t)*t**3.;## in**4\n", "I_xx = I_AB - (a1+a2)*y_bar**2.;## in**4\n", "I_yy = (1/3.)*t*d**3. + (1/3.)*(b-t)*t**3. - (a1+a2)*x_bar**2.;## in**4\n", "print'%s %.3f %s %.2f %s'%('The position of c.g is x_bar = ',x_bar,'inches'and'y_bar = ',y_bar,'inches');\n", "print'%s %.3f %s %.2f %s'%('I_xx = ',I_xx,'in**4'and 'I_yy = ',I_yy,' in**4');\n", "\n", "\n", "\n", "##Example 15(a)\n", "l = 12.;## feet\n", "y_c = y_bar;##inches\n", "y_t = b - y_c;##inches\n", "f_t_max = 7.;## tons/in**2\n", "f_c = y_c*f_t_max/y_t;## tons/in**2\n", "M_r = f_t_max*I_xx/y_t;## ton-inches\n", "W = M_r/(l*12./8.);## tons\n", "print'%s %.2f %s'%(' Total uniformly distribute load over the span is W = ',W,' tons');\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The position of c.g is x_bar = 1.074 y_bar = 1.57 inches\n", "I_xx = 10.456 I_yy = 5.96 in**4\n", " Total uniformly distribute load over the span is W = 1.19 tons\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex16-pg166" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate The c.g of the section is y_bar and Load required\n", "b1 = 6.;##inches\n", "d1 = 1.;##inch\n", "b2 = 9.;##inches\n", "d2 = 1.;##inch\n", "b3 = 10.;##inches\n", "d3 = 2.;##inch\n", "a1 = b3*d3;## in**2\n", "y1 = d3/2.;## inches\n", "a2 = b2*d2;## in**2\n", "y2 = d3 + b2/2.;## inches\n", "a3 = b1*d1;## in**2\n", "y3 = b2+d3+d1/2.;## inches\n", "y_bar = (a1*y1+a2*y2+a3*y3)/(a1+a2+a3);##inches\n", "I_AB = (1/3.)*b3*d3**3 + (1/12.)*d2*b2**3. +b2*(d3+b2/2.)**2 + (1/12.)*b1*d1**3 + b1*(b2+d3+d1/2.)**2.;## in**4\n", "I_xx = I_AB - (a1+a2+a3)*y_bar**2;## in**4\n", "I_yy = (1/12.)*(d3*b3**3 + b2*d2**3 +d1*b1**3.);## in**4\n", "print'%s %.3f %s'%('The c.g of the section is y_bar = ',y_bar,' inches');\n", "print'%s %.2f %s %.2f %s'%(' I_xx = ',I_xx,' in**4' 'I_yy = ',I_yy,' in**4');\n", "\n", "##Example 16(a)\n", "l = 20.;## feet\n", "y_t = y_bar;## inches\n", "y_c = d1+b2+d3-y_t;## inches\n", "f_t = 1.5;## tons/in**2\n", "f_c = y_c*f_t/y_t;## tons/in**2\n", "M_r = f_c*I_xx/y_c;## ton-inches\n", "W = M_r*8./(l*12.);## tons\n", "w = W/l;## ton per foot run\n", "print'%s %.2f %s'%('Load required is w = ',w,' ton per foot run');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The c.g of the section is y_bar = 4.214 inches\n", " I_xx = 640.06 in**4I_yy = 185.42 in**4\n", "Load required is w = 0.38 ton per foot run\n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex17-pg168" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate stresses\n", "b = 12.;## inches\n", "d = 6.;## inches\n", "h = 14.;## inches\n", "t = 1/2.;## inch\n", "A = 12.94;## in^2\n", "##section moment of inertia\n", "I_xx_s = 315.3;## in^4\n", "I_yy_s = 22.27;## in^4\n", "\n", "I_xx = 2.*I_xx_s + 2.*((1./12.)*h*(2.*t)**3 + h*2.*t*(d+t)**2.);## in^4\n", "I_yy = 2.*(I_yy_s + A*(d/2.)**2.) + 2.*((1/12.)*2*t*h**3.);## in^4\n", "print'%s %.2f %s %.2f %s'%('I_xx = ',I_xx,' in^4 I_yy = ',I_yy,' in^4');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "I_xx = 1815.93 in^4 I_yy = 734.79 in^4\n" ] } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex18-pg169" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate maximum loads\n", "b = 15.;## inches\n", "d = 15/2.;## inches\n", "h = 16.;## inches\n", "t = 1/2.;## inch\n", "P = 0.935;## inches\n", "A = 12.33;## in**2\n", "##section moment of inertia\n", "I_xx_s = 377.;## in**4\n", "I_yy_s = 14.55;## in**4\n", "\n", "I_xx = 2.*I_xx_s + 2.*((1/12.)*h*(2.*t)**3. + h*2.*t*(d+t)**2.);## in**4\n", "I_yy = 2.*(I_yy_s + A*(d/2. + P)**2.) + 2.*((1/12.)*2.*t*h**3.);## in**4\n", "print'%s %.2f %s %.2f %s'%('I_xx = ',I_xx,'in**4 I_yy = ',I_yy,'in**4')\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "I_xx = 2804.67 in**4 I_yy = 1253.03 in**4\n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex19-pg169" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate maximum stresses\n", "b1 = 16.;## inches\n", "d1 = 6.;## inches\n", "b2 = 9.;## inches\n", "d2 = 7.;## inches\n", "A = 14.71;## in**2\n", "I_xx1 = 618.09;## in**4\n", "I_yy1 = 22.47;## in**4\n", "I_xx2 = 208.13;## in**4\n", "I_yy2 = 40.17;## in**4\n", "I_xx = I_xx1 + 2.*I_yy2;## in**4\n", "I_yy = I_yy1 + 2.*(I_xx2 + A*(b2/2. + 0.5*0.4)**2.);## in**4\n", "k_xx = math.sqrt(I_xx/(3.*A));## inches\n", "k_yy = math.sqrt(I_yy/(3.*A));## inches\n", "print'%s %.2f %s %.2f %s %.2f %s %.2f %s'%('I_xx =',I_xx,' in**4 I_yy = ',I_yy,' in**4' 'k_xx =',k_xx,' inches'' k_yy = ',k_yy,' inches');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "I_xx = 698.43 in**4 I_yy = 1088.62 in**4k_xx = 3.98 inches k_yy = 4.97 inches\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex20-pg170" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate maximum load stresses\n", "b1 = 7/2.;## inches\n", "d1 = 7/2.;## inches\n", "t1 = 3/8.;## inches\n", "l = 18.;## inches\n", "I_xx1 = 2.80;## in^4\n", "I_yy1 = 2.80;## in^4\n", "J = 1.;## inch\n", "A = 2.49;## in^2\n", "I_xx = 4.*(I_xx1 + A*(l/2. - J)**2);## in^4\n", "k_xx = math.sqrt(I_xx/(4.*A));## inches\n", "print'%s %.2f %s %.1f %s'%('I_xx = ',I_xx,' in^4'' k_xx = ',k_xx,' inches');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "I_xx = 648.64 in^4 k_xx = 8.1 inches\n" ] } ], "prompt_number": 16 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex21-pg170" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate maximum stresses\n", "b1 = 12.;## inches\n", "d1 = 4.;## inches\n", "A = 9.21;## in^2\n", "I_xx1 = 200.1;## in^4\n", "P = 1.055;## inches\n", "I_yy1 = 12.12;## in^4\n", "I_xx = 2.*I_xx1;\n", "##for equal strength I_xx = I_yy\n", "x = 2.*(math.sqrt(((I_xx/2.)-I_yy1)/A) - P);## in^4\n", "print'%s %.2f %s'%('x = ',x,' inches');\n", "\n", "##answer is corrct only, but it is approximated in the text book.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "x = 6.93 inches\n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex22-pg184" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate The moment of resistance offered by the flanges and The moment of resistance offered by the flanges\n", "import scipy\n", "from scipy import integrate\n", "d =10.;## inches\n", "b = 8.;## inches\n", "t1 = 1.;## inch\n", "t2 = 0.6;## inch\n", "I = (1./12.)*(b*d**3. - (b-t2)*b**3.);## in^4\n", "##(i) Resistance to M\n", "def fun(y):\n", "\tx=(t2/I)*y**2.\n", "\treturn x\n", "\n", "R1 = scipy.integrate.quad(fun,-4.,4.);\n", "R1=R1[0]\n", "##(ii) Resistance to F\n", "def fun(y):\n", "\tz=(4./I)*(25.-y**2.)\n", "\treturn z\n", "\n", "R2 = scipy.integrate.quad(fun,4.,5.);\n", "R2=R2[0]\n", "print'%s %.2f %s %.2f %s %.1f %s '%('The moment of resistance offered by the flanges is',1-R1,'M' 'The flanges take up ',(1-R1)*100,'percentage of the B.M.,''the web resisting only ',R1*100,'percentage of the B.M');\n", "print'%s %.3f %s %.3f %s %.3f %s '%(' The shear borne by the web is',(1-2*R2),'F' and ' The web thus takes up ',(1-2*R2)*100,' ' and 'percentage of the shear force.'and 'the flanges resisting only',2*R2*100,' percentage of the shear force');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The moment of resistance offered by the flanges is 0.93 MThe flanges take up 92.71 percentage of the B.M.,the web resisting only 7.3 percentage of the B.M \n", " The shear borne by the web is 0.894 The web thus takes up 89.362 the flanges resisting only 10.638 percentage of the shear force \n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex23-pg186" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate The maximum intensity of shear stress\n", "b = 14.;## inches\n", "d = 6.;## inches\n", "t1 = 0.7;## inch\n", "t2 = 0.4;## inch\n", "F = 20.;## tons\n", "I = (1./12.)*(d*b**3. - (d-t2)*(b-2.*t1)**3.);## in^4\n", "q = F*t1*0.5*(0.5*b + (0.5*b-t1))/I;## ton/in^2\n", "q_max = (F/(I*t2))*(d*t1*0.5*(0.5*b + (0.5*b-t1)) + t2*(0.5*b-t1)*(0.5*b-t1)*0.5);## tons/in^2\n", "print'%s %.2f %s'%('The maximum intensity of shear stress is q_max = ',q_max,' tons/in^2');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The maximum intensity of shear stress is q_max = 4.09 tons/in^2\n" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex24-pg186" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate The maximum intensity of shear stress\n", "b = 4.;## inches\n", "d = 13/2.;## inches\n", "t = 1/2.;## inch\n", "a = 4.;## inches\n", "F = 10.;## tons\n", "a1 = b*t;## in^2\n", "y1 = t/2.;## inch\n", "a2 = (d-t)*t;## in^2\n", "y2 = t+0.5*(d-t);## inches\n", "y_bar = (a1*y1+a2*y2)/(a1+a2);## inches\n", "I_AB = (1/3.)*b*t**3. + (1./12.)*t*(d-t)**3 + (b-2*t)*(b-t)**2.;## in^4\n", "I_xx = I_AB - (a1+a2)*y_bar**2.;## in^4\n", "q = (F/(b*I_xx))*b*t*(y_bar-0.5*t);## ton/in^2\n", "q_max = (F/(t*I_xx))*(b*t*(y_bar-0.5*t) + 0.5*t*(y_bar-t)*(y_bar-t));## tons/in^2\n", "print'%s %.2f %s'%('The maximum intensity of shear stress at the N.A is q_max = ',q_max,' tons/in^2');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The maximum intensity of shear stress at the N.A is q_max = 4.26 tons/in^2\n" ] } ], "prompt_number": 20 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex25-pg190" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#calculate tensile and compressive various inches at 2,4, 6 and at N.A points\n", "import math\n", "def func(p,q):\n", " p1 = 0.5*p + math.sqrt(q**2. + 0.25*p**2);\n", " p2 = 0.5*p - math.sqrt(q**2. + 0.25*p**2);\n", " theta = 0.5*math.atan(2.*q/p) * 180/math.pi;\n", " return p1,p2,theta\n", "b = 5.;## inches\n", "d = 12.;## inches\n", "F = 4800. ;## lb-wt\n", "M = 192000.;## lb-inches\n", "I = (1/12.)*b*d**3.;## in**4\n", "\n", "##At 6 inches above the N.A\n", "p6 = M*6./I ; ## lb/in**2\n", "q6 = 0;\n", "[p1_6,p2_6,theta6] = func(p6,q6);\n", "\n", "##At 4 inches above the N.A\n", "p4 = M*4/I;## lb/in**2\n", "q4 = (F/(I*b))*b*(0.5*d-4)*b;\n", "[p1_4,p2_4,theta4] = func(p4,q4);\n", "\n", "##At 2 inches above the N.A\n", "p2 = M*2./I;## lb/in**2\n", "q2 = (F/(I*b))*b*(0.5*d-2)*4.;\n", "[p1_2,p2_2,theta2] = func(p2,q2);\n", "\n", "##At the N.A\n", "p = 0.;##\n", "q = F*b*0.5**3*d**2./(I*b);## lb/in**2\n", "p1 = q;## lb/in**2\n", "p2 = -q;## lb/in**2\n", "\n", "print'%s %.2f %s %.2f %s '%('At 6 inches above the N.A, p1 =',p1_6,' lb/in**2.'and 'compressive, and p2 = ',p2_6,'');\n", "print'%s %.2f %s %.2f %s %.2f %s %.2f %s '%(' At 4 inches above the N.A, p1 =',p1_4,' lb/in**2.'and ' compressive, and p2 = ',-p2_4,' lb/in**2 'and'tensile theta1 = ',theta4,' degrees' 'theta2 = ',theta4+90,' degrees');\n", "print'%s %.2f %s %.2f %s %.2f %s %.2f %s'%(' At 2 inches above the N.A, p1 = ',p1_2,' lb/in**2.'and' compressive' and 'p2 = ',-p2_2,' lb/in**2.,'and 'tensile theta1 = ',theta2,' degrees 'and ' theta2 = ',theta2+90,' degrees');\n", "print'%s %.2f %s %.2f %s'%(' At the N.A, p1 = ',p1,' lb/in**2.,'and ' compressive, and p2 = ',-p2,'.,tensile ');\n", "\n", "##there is an error in the answer given in text book\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "At 6 inches above the N.A, p1 = 1600.00 compressive, and p2 = 0.00 \n", " At 4 inches above the N.A, p1 = 1070.82 compressive, and p2 = 4.15 tensile theta1 = 3.56 degreestheta2 = 93.56 degrees \n", " At 2 inches above the N.A, p1 = 553.88 p2 = 20.54 tensile theta1 = 10.90 theta2 = 100.90 degrees\n", " At the N.A, p1 = 120.00 compressive, and p2 = 120.00 .,tensile \n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex26-pg194" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate At the top, principal stresses and The principal stresse across the diagonal and compressive on one plane\n", "b = 10.;## inches\n", "d = 8.;## inches\n", "t1 = 1.;## inch\n", "t2 = 0.6;## inch\n", "M = 500.;## ton-inches\n", "F = 25.;## tons\n", "I = (1./12.)*(d*b**3. - (d-t2)*d**3.);## in**4\n", "\n", "##At the top\n", "p = M*b/(2.*I);## tons/in**2\n", "q = 0.;\n", "p1 = p;## tons/in**2\n", "p2 = 0.;\n", "print'%s %.1f %s %.1f %s'%('At the top, principal stresses are p1 =',p1,'tons/in**2'' p2 = ',p2,' tons/in**2')\n", "\n", "##In the web, 4 inches from the N.A\n", "p = M*d/(2.*I);## tons/in**2\n", "q = F*d*t1*0.5*(d+t1)/(I*t2);## tons/in**2\n", "theta = 0.5*math.atan(2*q/p);\n", "theta1 = theta*180/math.pi;\n", "theta2 = theta1+90;\n", "p1 = 0.5*p + math.sqrt(q**2 + 0.25*p**2);## tons/in**2\n", "p2 = 0.5*p - math.sqrt(q**2 + 0.25*p**2);## tons/in**2\n", "print'%s %.3f %s %.1f %s %.1f %s %.1f %s '%(' In the web, 4 inches from the N.A.:'' The principal stresse are p1 = ',p1,' tons/in**2.,compressive\\n p2 = ',-p2,' tons/in**2.,tensile\\n theta1 =',theta1,' degrees\\n theta2 = ',theta2,' degrees')\n", "\n", "\n", "##At the N.A\n", "p = 0.;\n", "q = (F/(I*t2))*(d*t1*0.5*(d+t1) + t2*0.5*d*2*t1);\n", "p1 = q;## tons/in**2\n", "p2 = -q;##tons/in**2\n", "print'%s %.1f %s %.1f %s'%(' The principal stresse across the diagonal are ',q,' tons/in**2., compressive on one plane and',q,' tons/in**2., tensile on the other.');\n", "\n", "##there is an error in the answer given in text book\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "At the top, principal stresses are p1 = 7.1 tons/in**2 p2 = 0.0 tons/in**2\n", " In the web, 4 inches from the N.A.: The principal stresse are p1 = 7.987 tons/in**2.,compressive\n", " p2 = 2.3 tons/in**2.,tensile\n", " theta1 = 28.2 degrees\n", " theta2 = 118.2 degrees \n", " The principal stresse across the diagonal are 4.8 tons/in**2., compressive on one plane and 4.8 tons/in**2., tensile on the other.\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex27-pg195" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate maximum intensity of shear stress \n", "W = 10.;## tons\n", "l = 16.;## feet\n", "f = 15/2.;## tons/in^2\n", "##section modulus required\n", "SM = W*l*12./(8.*f);## in^3\n", "##for this section modulus \n", "l1 = 12.;## inches\n", "b1 = 5.;## inches\n", "t1 = 0.55;## inches\n", "t2 = 0.35;## inches\n", "I_xx = 220.;## in^4\n", "F_max = 5.;## tons\n", "q_max = (F_max/(I_xx*t2))*(F_max*t1*(0.5*l1-0.5*t1) + t2*0.5*(0.5*l1-t1)**2);## tons/in^2\n", "print'%s %.2f %s'%('The maximum intensity of shear stress is q_max = ',q_max,' tons/in^2');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The maximum intensity of shear stress is q_max = 1.36 tons/in^2\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex28-pg198" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate Skin stresse in steel plate and The total moment of resistance\n", "b = 9/2.;## inches\n", "D = 12.;## inches\n", "d = 10.;## inches\n", "t = 1/2.;## inches\n", "f_w = 1000.;## lb/in**2\n", "m = 18.;##m = E_s/E_w\n", "f_t = m*d*f_w/D ;## lb/in**2\n", "M_w = f_w*(1./6.)*2.*b*D**2.;## lb-inches\n", "M_s = f_t*(1/6.)*t*d**2;## lb-inches\n", "M = M_w + M_s;## lb-inches\n", "print'%s %.1f %s %.1f %s'%('Skin stresse in steel plate is, M_s = ',M_s,' lb-inches'' The total moment of resistance is M =',M,' lb-inches')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Skin stresse in steel plate is, M_s = 125000.0 lb-inches The total moment of resistance is M = 341000.0 lb-inches\n" ] } ], "prompt_number": 4 } ], "metadata": {} } ] }