{ "metadata": { "name": "", "signature": "sha256:9ca9b2e0d1cc4391d74881e14e5e9fe9e8aa0cd9b6ad3418d2abbf628f065e94" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter1-Simple stresses and strains" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex1-pg 5" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math\n", "#calculate the elongnation of the bar \n", "P = 5.5 ;##Axial pull in tons\n", "E = 13000 ;##modulus of elasticity tons/in^2\n", "l = 120 ;##length in inches\n", "A = math.pi/4. ;##Area of resisting section in^2\n", "p = P/A ;##Intensity of stress in tons/in^2\n", "e = p/E ;##strain\n", "delta_l = l*e;##elongation of the bar in inches\n", "print'%s %.4f %s'%('The elongation of the bar is',delta_l,'inch');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The elongation of the bar is 0.0646 inch\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex2-pg5" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate the minimum diameter d of each stay bolt\n", "s_p = 200.;##steam pressure in lb/in^2\n", "l = 4.;##length in inches\n", "b = 4.;##breadth in inches\n", "p = 14000.;##permissible streaa in lb/in^2\n", "P = s_p*l*b;##Pull on each bolt in lb-wt\n", "A = P/p ;##necessary area of bolt-section\n", "d = math.sqrt(4*A/math.pi) ;##minimum diameter in inches\n", "print'%s %.2f %s'%('The minimum diameter d of each stay bolt =',d,'inch');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The minimum diameter d of each stay bolt = 0.54 inch\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex3-pg7" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate the safe load in tons\n", "D = 8.;##external diameter in inches \n", "d = 6.;##internal diameter in inches\n", "sigma = 36.;##ultimate stress in tons/in^2\n", "n = 6.;##safety factor\n", "A = 0.25*math.pi*(D**2 - d**2);##Area of section in in^2\n", "P = sigma*A; ##crushing load for the column in tons \n", "P_safe = P/n ;##safe load in tons\n", "print'%s %.2f %s'%('Safe load =',P_safe,'tons'); \n", "##there is an error in the answer given in textbook.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Safe load = 131.95 tons\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex4-pg7" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate compressive stress of the punch\n", "sigma = 20.;##ultimate sheat stress in tons/in^2\n", "d = 1./2.;##diameter of the hole in inches\n", "t = 3./8.;##thickness of the plate in inches\n", "A = 0.25*math.pi*d**2;##area of the cross-section of the punch in^2\n", "P = math.pi*d*t*sigma;##necessary force in tons\n", "sigma_comp = P/A;##compressive stress on the punch\n", "print'%s %.1f %s'%('The compressive stress of the punch =',sigma_comp,'tons/in^2');\n", "##there is an error in the answer given in textbook.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The compressive stress of the punch = 60.0 tons/in^2\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5-pg9" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate change in volume \n", "b = 8.;##width in inches\n", "t = 3./8.;##thickness in inches\n", "l = 20.;##length in feets\n", "P = 22.;##pull in tons\n", "E = 13500.;##modulus of elasticity in tons/in^2\n", "sigma = 0.3;##poisson/s ratio\n", "A = b*t;##in in^2\n", "V = l*A*12;##in cub.inch\n", "p = P/A;##in tons/in^2\n", "e = p/E;\n", "delta_l = e*l*12;##stretch of the bar in inches\n", "Lateral_strain = e*sigma ;##lateral strain\n", "del_b = b*Lateral_strain;##in inches\n", "del_t = t*Lateral_strain;##in inches\n", "k = e*(1-2*sigma);##(del_V)/(V)\n", "del_V = k*V;##change in volume in cub.inch\n", "print'%s %.3f %s'%('The change in volume is',del_V,'cub.inch');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The change in volume is 0.156 cub.inch\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex6-pg10" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate contraction in diameter and change in volume and work done in streching the bar \n", "d = 7./8.;##diameter of the bar in inches\n", "l = 10.;##length in feets\n", "P = 6.;##axial pull in tons\n", "E = 13000.;##modulus of elsticity in tons/in^2\n", "m = 4.;\n", "A = 0.25*math.pi*d**2;##in in^2\n", "V = 0.25*math.pi*d**2*l*12;##volume in cub.inches\n", "p = P/A;##in tons/in^2\n", "e = p/E;\n", "del_l = e*l*12;##stretchof the bar in inches\n", "Lateral_strain = e/m ;##lateral strain\n", "del_d = Lateral_strain*d;##Contraction in diameter in inches\n", "print'%s %.4f %s'%('The Contraction in diameter is',del_d,'inches');\n", "k = e*(1-2/m);##(del_V)/(V)\n", "del_V = k*V;##change in volume in cub.inch\n", "print'%s %.4f %s'%('The change in volume is',del_V,'cub. inch');\n", "W = 0.5*P*del_l;##work done in stretching the bar in in-ton\n", "print'%s %.4f %s'%('The work done in stretching the bar is',W,'in-ton');\n", "##there is an error in the answer given in textbook.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The Contraction in diameter is 0.0002 inches\n", "The change in volume is 0.0277 cub. inch\n", "The work done in stretching the bar is 0.2763 in-ton\n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7-pg11" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate total change in length of the bar and energy stored in bar \n", "L = 24.;##length of the bar in ft\n", "d1 = 9./8.;##diameter of the bar in inches\n", "l1 = 6.;##in ft\n", "d2 = 1.;##in inches\n", "l2 = 12.;##in ft\n", "d3 = 5./4.;##in inches\n", "l3 = L-l1-l2;##in ft\n", "P = 10000.;##axial compression in lb-wt\n", "E = 28.*10**6;##modulus of elasticity in lb/in^2\n", "A1 = 0.25*math.pi*d1**2;##in in^2\n", "A2 = 0.25*math.pi*d2**2;##in in^2\n", "A3 = 0.25*math.pi*d3**2;##in in^2\n", "p1 = P/A1 ;##in lb/in^2\n", "e1 = p1/E;\n", "p2 = P/A2 ;##in lb/in^2\n", "e2 = p2/E;\n", "p3 = P/A3 ;##in lb/in^2\n", "e3 = p3/E;\n", "del_l1 = e1*l1*12;##in inches\n", "del_l2 = e2*l2*12;##in inches\n", "del_l3 = e3*l3*12;##in inches\n", "del_l = del_l1+del_l2+del_l3;##total change in length in ft\n", "W = 0.5*P*del_l/12;##energy stored in the bar in ft-lbs\n", "print'%s %.3f %s'%('Total change in length of the bar is',del_l,'inches');\n", "print'%s %.f %s'%('The energy stored in the bar is',W,'ft-lbs');\n", "##there is an error in the answer given in textbook.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Total change in length of the bar is 0.112 inches\n", "The energy stored in the bar is 47 ft-lbs\n" ] } ], "prompt_number": 16 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex8-pg13" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate change in lenght of the rod \n", "P = 1200.;##axial pull in lb-wt\n", "d1 = 1.;##diameter of one end in inches\n", "d2 = 0.5;##diameter of other end in inches\n", "l = 10.;##length of the rod in inches\n", "E = 14.*10**6;##modulus of elsticity in lb/in^2\n", "del_l = 4*P*l/(math.pi*E*d1*d2);##change in length in inches \n", "print'%s %.4f %s'%('The change in length of the rod is',del_l,'inches');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The change in length of the rod is 0.0022 inches\n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex9-pg14" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate the strain and extension of the bar and the work done in streching \n", "d = 1.;##diameter of the steel bar in inches\n", "l = 12.;##length of the steel bar in inches\n", "d1 = 3./2.;##external diameter in inches\n", "d2 = 1.;##internal diameter in inches\n", "P = 5.;##axial pull in tons\n", "E_s = 30.*10**6;##modulus of elasticity of steel in lb/in^2\n", "E_b = 14.*10**6;##modulus of elasticity of brass in lb/in^2\n", "A_s = 0.25*math.pi*d**2;##area of the steel section in in^2\n", "A_b = 0.25*math.pi*(d1**2-d2**2);##area of the brass section in in^2\n", "P_b = (P/((E_s/E_b)*A_s+A_b))*A_b;##load resisted by the brass tube in tons\n", "P_s = P-P_b;##bal;ance load resisted by the steel tube\n", "e = (P_b/A_b)*2240./E_b ;##strain\n", "print'%s %.4f %s'%('The strain e =',e,'');\n", "del_l = e*l ;##extension of the bar in inches\n", "print'%s %.4f %s'%('The extension of the bar =',del_l,'inches');\n", "W = 0.5*P*del_l;##work done in stretching in inch-ton\n", "print'%s %.3f %s'%('The work done in stretching is',W,'inch-ton');" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The strain e = 0.0003 \n", "The extension of the bar = 0.0036 inches\n", "The work done in stretching is 0.009 inch-ton\n" ] } ], "prompt_number": 20 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex10-pg15" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate safe central load and the reinforcing bar\n", "a = 12.;##length of each side in inches\n", "d = 9./8.;##diameter of each reinforced bar in inches\n", "r = 3.;##distance of centre from the edges in inches\n", "p_c = 600.;##in lb/in^2\n", "n = 18.;##modular ration E_s/E_c\n", "A_s = 4.*0.25*math.pi*d**2;##in in^2\n", "A_c = a**2 - A_s;##in in^2\n", "p_s = n*p_c;##in lb/in^2\n", "P = p_s*A_s+p_c*A_c;##safe central load in lb-wt\n", "print'%s %.f %s'%('Safe central load =',P,'lb-wt');\n", "print'%s %.d %s'%('Of this, the reinforcing bars carry',p_s*A_s,'lb-wt',);\n", "\n", "##there is an error in the answer given in textbook.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Safe central load = 126956 lb-wt\n", "Of this, the reinforcing bars carry 42941 lb-wt\n" ] } ], "prompt_number": 21 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex11-pg15" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate P_sand p_b and x\n", "l = 8.;##length in feet\n", "d = 0.5;##diameter in inches\n", "r = 30.;##distance between two rods in inches\n", "P = 2000.;##load in lb-wt\n", "E_s = 30.*10**6;##modulus of elsticity of steel rod\n", "E_b = 16.*10**6;##modulus of elsticity of brass rod\n", "A_s = 0.25*math.pi*d**2;##section area in in**2\n", "p_b = P/(A_s*(1+(E_s/E_b)));\n", "p_s = (P/A_s) - p_b ;\n", "P_b = A_s*p_b;\n", "P_s = A_s*p_s;\n", "print'%s %.1f %s'%('P_s =',P_s,'lb/in**2')\n", "print'%s %.1f %s'%('and P_b =',P_b,'lb/in**2');\n", "x = r*P_b/P ;##\n", "print'%s %.2f %s'%('x =',x,'inches');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "P_s = 1304.3 lb/in**2\n", "and P_b = 695.7 lb/in**2\n", "x = 10.43 inches\n" ] } ], "prompt_number": 22 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex12-pg17" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math \n", "#calculate tensile strain imposed by end grips and p and P\n", "alpha = 0.0000062 ;##co-efficient of the expansion in \"per F\"\n", "t = 100.;##in F\n", "d = 3/4.;##in inches\n", "D = 0.02;##in inches\n", "l = 15.;##in ft\n", "E = 13000.;##in tons/in**2\n", "e = alpha*t - (D/(l*12));\n", "p = E*e;##in tons/in**2\n", "A = 0.25*math.pi*d**2;##in in**2\n", "P = p*A ;##in tons\n", "print'%s %.4f %s'%('Tensile strain imposed by end-grips,e =',e,'');\n", "print'%s %.2f %s'%('p =',p,'tons/in**2')\n", "print'%s %.4f %s'%('P =',P,'tons');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Tensile strain imposed by end-grips,e = 0.00051 \n", "p = 6.62 tons/in**2\n", "P = 2.9227 tons\n" ] } ], "prompt_number": 23 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex13-pg18" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate the stresses induced in each metal and p_s\n", "d = 1.;##diameter of steel bar in inches\n", "d1 = 3./2.;##external diameter of brass tube in inches\n", "d2 = 1.;##internal diameter of brass tube in inches\n", "t = 100.;##in F\n", "alpha_s = 0.0000062;##alpha of steel in \"per F\"\n", "alpha_b = 0.000010;##alpha of brass in \"per F\"\n", "E_s = 30.*10**6;##in lb/in^2\n", "E_b = 14.*10**6;##in lb/in^2\n", "A_s = 0.25*math.pi*d**2;##section area of steel bar in in^2\n", "A_b = 0.25*math.pi*(d1**2-d2**2);##section area of brass tube in in^2\n", "p_b = t*(alpha_b-alpha_s)*E_s/((A_b/A_s)+(E_s/E_b));\n", "p_s = (A_b/A_s)*p_b;\n", "print'%s %.d %s'%('The stresses induced in each metal are, p_b =',p_b,'lb/in^2')\n", "print'%s %.d %s'%('p_s =',p_s,'lb/in^2');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The stresses induced in each metal are, p_b = 3360 lb/in^2\n", "p_s = 4200 lb/in^2\n" ] } ], "prompt_number": 24 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex14-pg19" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate the least temperature the tube must be heated\n", "D = 4.;##diameter of the wheel in ft\n", "p = 6. ;##hoop stress in tons/in^2\n", "alpha = 0.0000062;##in \"per F\" \n", "E = 13000.;##in tons/in^2\n", "d = (1./(1.+(p/E)))*D*12.;##internal diameter in inches\n", "t = (D*12.-d)/(d*alpha);\n", "print'%s %.1f %s'%('The least temperature the tube must be heated is, t =',t,'F');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The least temperature the tube must be heated is, t = 74.4 F\n" ] } ], "prompt_number": 25 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex15-pg21" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate Resultant stress intensity and normal stress intensity and tangential stress intensity and The maximum possible shear on any plane and these planes are inclined at',angle,'degrees to the normal section.\n", "p = 8.;##normal stress intensity in tons/in^2\n", "theta = 35.*math.pi/180.;##inclination of the section in degrees\n", "P = p*math.cos(theta);##resultant stress intensity in tons/in^2\n", "p_n = P*math.cos(theta);##normal stress intensity in tons/in^2\n", "p_t = P*math.sin(theta);##tangential stress intensity in tons/in^2\n", "p_max = 0.5*p;##maximum possible shear in tons/in^2\n", "angle = 45.;##inclination of these planes in degrees\n", "print'%s %.2f %s'%('Resultant stress intensity =',P,'tons/in^2');\n", "print'%s %.2f %s'%('normal stress intensity =',p_n,'tons/in^2');\n", "print'%s %.2f %s'%('tangential stress intensity =',p_t,'tons/in^2');\n", "print'%s %.d %s'%('The maximum possible shear on any plane is',p_max,'tons/in^2');\n", "print'%s %.d %s'%('and these planes are inclined at',angle,'degrees to the normal section.');\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Resultant stress intensity = 6.55 tons/in^2\n", "normal stress intensity = 5.37 tons/in^2\n", "tangential stress intensity = 3.76 tons/in^2\n", "The maximum possible shear on any plane is 4 tons/in^2\n", "and these planes are inclined at 45 degrees to the normal section.\n" ] } ], "prompt_number": 26 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex16-pg28" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate poisson ratio and E,N,K,\n", "d = 9./8.;##diameter of the steel bar in inches\n", "P = 6.;##tensile load in tons\n", "del_l = 0.0036 ;##extension of length inches\n", "l = 8.;##gauge length in inches\n", "del_d = 0.00015;##change in diameter in inches\n", "A = 0.25*math.pi*d**2;##section area in in^2\n", "p = P/A;##stress in tons/in^2\n", "e = del_l/l;##strain\n", "E = p/e;##modulus of elasticity in tons/in^2\n", "LS = del_d/d;##lateral strain \n", "PR = LS/e;##poisson's ratio \n", "N = E/(2.*(1.+PR));##rigidity modulus in tons/in^2\n", "K = E/(3.*(1.-2.*PR));##bulk modulus in tons/in^2\n", "print'%s %.4f %s'%('Poisson ratio 1/m =',PR,'');\n", "print'%s %.d %s'%('E =',E,'tons/in^2');\n", "print'%s %.d %s'%('N =',N,'tons/in^2');\n", "print'%s %.d %s'%('K =',K,'tons/in^2');\n", "\n", "##there is an error in the answer given in textbook.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Poisson ratio 1/m = 0.2963 \n", "E = 13413 tons/in^2\n", "N = 5173 tons/in^2\n", "K = 10974 tons/in^2\n" ] } ], "prompt_number": 27 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex17-pg29" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate Poisson ratio and E\n", "N = 2640.;##rigidity modulus in tons/in^2\n", "d = 3./8.;##diameter of the rod in inches\n", "P = 1./2.;##axial pull in tons\n", "del_d = 0.000078;##change in diameter in inches\n", "A = 0.25*math.pi*d**2;##section area in in^2\n", "p = P/A ;##stress tons/in^2\n", "LS = del_d/d;##lateral strain\n", "m = p/(LS*2.*N) - 1.;\n", "E = 2.*N*(1. + 1./m);##modulus of elasticity in ton/in^2\n", "PR = 1./m;##poisson's ratio \n", "print'%s %.3f %s'%('Poisson ratio 1/m =',PR,'');\n", "print'%s %.d %s'%('E =',E,'ton/in^2');\n", "\n", "##there is an error in the answer given in textbook.\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Poisson ratio 1/m = 0.320 \n", "E = 6971 ton/in^2\n" ] } ], "prompt_number": 28 } ], "metadata": {} } ] }