{ "metadata": { "name": "", "signature": "sha256:b247ec2e1379385ed0f35ffe97eee5f72043d6e428051be379a0d7ae0011dd3e" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter07:Mechanical Tests of Metals" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.1:pg-146" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Example 7.1 : shear modulus of the material\n", " \n", "#given data :\n", "E=210 # youngs's modulus in GN/m**2\n", "v=0.3 # poisson ratio\n", "G=E/(2*(1+v)) # shear modulus\n", "\n", "print \"shear modulus,G(GN/m**2) = \",round(G,2)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "shear modulus,G(GN/m**2) = 80.77\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.2:pg-152" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Example 7.2 : young's modulus of elasticity,yield point stress, ultimate stress and percentage elongation\n", " \n", "#given data :\n", "d=40.0*10**-3 #in m\n", "W=40.0*10**3 # load in N\n", "del_l=3.04*10**-5 # in m\n", "L=200.0*10**-3 # in m\n", "load_max=242.0*10**3 #in N\n", "l=249*10.0**-3 # length of specimen in m\n", "l0=(d+L) # in m\n", "A=(math.pi*d**2)/4.0\n", "\n", "b=W/A\n", "\n", "epsilon=del_l/L\n", "\n", "E=(b/epsilon)\n", "\n", "print\"young modulus,E(N/m**2) = \",\"{:.2e}\".format(E)\n", "\n", "Y_load=161*10**3\n", "\n", "Y_stress=Y_load/A\n", "\n", "print \"yield point stress,Y_stress(N/m**2) = \",\"{:.2e}\".format(Y_stress)\n", "\n", "U_stress=load_max/A\n", "\n", "print \"ultimate stress,U_stress(N/m**2) = \",\"{:.2e}\".format(U_stress)\n", "\n", "p_elongation=((l-l0)/l0)*100\n", "\n", "print \"percentage elongation,p_elongation(%) = \",p_elongation\n", "#percentage elongation is calculated wrong in textbook\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "young modulus,E(N/m**2) = 2.09e+11\n", "yield point stress,Y_stress(N/m**2) = 1.28e+08\n", "ultimate stress,U_stress(N/m**2) = 1.93e+08\n", "percentage elongation,p_elongation(%) = 3.75\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.3.a:pg-153" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 7.3.a: yield point stress\n", " \n", "\n", "yl=40.0 #yeild load in kN\n", "ml=71.5 #maximum load in kN\n", "fl=50.5 #fracture load in kN\n", "glf=79.5 #gauge length of fratture in mm\n", "st=7.75*10**-4 #strain at load of 20kN\n", "d=12.5 #specimen diamtere in mm\n", "sl=62.5 #specimen length in mm\n", "A=(math.pi*(d*10**-3)**2)/4.0 # in meter square\n", "ylp=((yl*10.0**3)/(A)) #yeild point stress in N/m**2\n", "print \"yeild point stress in N/m**2 is \",\"{:.2e}\".format(ylp) \n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "yeild point stress in N/m**2 is 3.26e+08\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.3.b:pg-153" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 7.3.b: ultimate tensile strength\n", " \n", "yl=40.0 #yeild load in kN\n", "ml=71.5 #maximum load in kN\n", "fl=50.5 #fracture load in kN\n", "glf=79.5 #gauge length of fratture in mm\n", "st=7.75*10**-4 #strain at load of 20kN\n", "d=12.5 #specimen diamtere in mm\n", "sl=62.5 #specimen length in mm\n", "A=(math.pi*(d*10**-3)**2)/4.0 # in meter square\n", "ylp=((yl*10.0**3)/(A)) #yeild point stress in N/m**2\n", "uts=((ml*10.0**3)/(A)) #ultimate tensile strangth in N/m**2\n", "print \"{:.2e}\".format(uts),\"is ultimate tensile strangth in N/m**2\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "5.83e+08 is ultimate tensile strangth in N/m**2\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.3.c:pg153" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 7.3.c: percentage elongation\n", " \n", "yl=40 #yeild load in kN\n", "ml=71.5 #maximum load in kN\n", "fl=50.5 #fracture load in kN\n", "glf=79.5 #gauge length of fratture in mm\n", "st=7.75*10**-4 #strain at load of 20kN\n", "d=12.5 #specimen diamtere in mm\n", "sl=62.5 #specimen length in mm\n", "a=(math.pi*d*10**-3)**2/4 # in meter square\n", "pel=((glf-sl)/sl)*100 #percentage elongation\n", "print pel,\"% is percentage elongation\"\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "27.2 % is percentage elongation\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.3.d:pg-153" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 7.3.d:modulus of elasticity\n", "import math\n", "yl=40 #yeild load in kN\n", "ml=71.5 #maximum load in kN\n", "fl=50.5 #fracture load in kN\n", "glf=79.5 #gauge length of fratture in mm\n", "st=7.75*10**-4 #strain at load of 20kN\n", "d=12.5 #specimen diamtere in mm\n", "sl=62.5 #specimen length in mm\n", "A=(math.pi*(d*10**-3)**2)/4.0 # in meter square\n", "ylp=((yl*10**3)/(A)) #yeild point stress in N/m**2\n", "uts=((ml*10**3)/(A)) #ultimate tensile strangth in N/m**2\n", "pel=((glf-sl)/sl)*100 #percentage elongation\n", "strss=((20*10**3)/A) #stress at 20kN in N/m**2\n", "mel=strss/st #modulus of elasticity in N/m**2\n", "print \"{:.2e}\".format(mel),\"is modulus of elasticity in N/m**2\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "2.10e+11 is modulus of elasticity in N/m**2\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.3.e:pg153" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 7.3.e: yield point stress\n", "import math\n", "yl=40.0 #yeild load in kN\n", "ml=71.5 #maximum load in kN\n", "fl=50.5 #fracture load in kN\n", "glf=79.5 #gauge length of fratture in mm\n", "st=7.75*10**-4.0 #strain at load of 20kN\n", "d=12.5 #specimen diamtere in mm\n", "sl=62.5 #specimen length in mm\n", "A=(math.pi*(d*10**-3)**2)/4.0 # in meter square\n", "ylp=((yl*10**3)/(A)) #yeild point stress in N/m**2\n", "uts=((ml*10**3)/(A)) #ultimate tensile strangth in N/m**2\n", "pel=((glf-sl)/sl)*100 #percentage elongation\n", "strss=((20*10**3)/A) #stress at 20kN in N/m**2\n", "mel=strss/st #modulus of elasticity in N/m**2\n", "mrs=((ylp*10**-3)**2/(2*mel)) #modulus of resilience \n", "print round(mrs,4),\" is modulus of resilience\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "0.2526 is modulus of resilience\n" ] } ], "prompt_number": 13 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.3.f:pg-153" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 7.3.f: fracture stress\n", " \n", "yl=40 #yeild load in kN\n", "ml=71.5 #maximum load in kN\n", "fl=50.5 #fracture load in kN\n", "glf=79.5 #gauge length of fratture in mm\n", "st=7.75*10**-4 #strain at load of 20kN\n", "d=12.5#specimen diamter in mm\n", "sl=62.5 #specimen length in mm\n", "A=(math.pi*(d*10**-3)**2.0)/4 # in meter square\n", "ylp=((yl*10**3)/(A)) #yeild point stress in N/m**2\n", "uts=((ml*10**3)/(A)) #ultimate tensile strangth in N/m**2\n", "pel=((glf-sl)/sl)*100 #percentage elongation\n", "strss=((20*10.0**3)/A) #stress at 20kN in N/m**2\n", "mel=strss/st #modulus of elasticity in N/m**2\n", "mrs=((ylp*10**-3)**2.0/(2*mel)) #modulus of resilience \n", "fs=((fl*10.0**3)/(A)) #fracture stress in N/m**2\n", "print \"{:.2e}\".format(fs),\"is fracture stress in N/m**2\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "4.12e+08 is fracture stress in N/m**2\n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.3.g:pg153" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Example 7.3.g: modulus of toughness\n", " \n", "yl=40.0 #yeild load in kN\n", "ml=71.5 #maximum load in kN\n", "fl=50.5 #fracture load in kN\n", "glf=79.5 #gauge length of fratture in mm\n", "st=7.75*10**-4 #strain at load of 20kN\n", "d=12.5 #specimen diamtere in mm\n", "sl=62.5 #specimen length in mm\n", "A=(math.pi*(d*10**-3)**2)/4 # in meter square\n", "ylp=((yl*10**3)/(A)) #yeild point stress in N/m**2\n", "uts=((ml*10**3)/(A)) #ultimate tensile strangth in N/m**2\n", "pel=((glf-sl)/sl)*100 #percentage elongation\n", "strss=((20*10**3)/A) #stress at 20kN in N/m**2\n", "mel=strss/st #modulus of elasticity in N/m**2\n", "mrs=((ylp*10**-3)**2/(2*mel)) #modulus of resilience \n", "fs=((fl*10**3)/(A)) #fracture stress in N/m**2\n", "mth=((ylp+uts)*(pel/100))/2 #modulus of toughness in N/m**2\n", "print \"{:.2e}\".format(mth),\" is modulus of toughness in N/m**2\"\n", "#percentage reduction in area is not calulated in the textbook\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "1.24e+08 is modulus of toughness in N/m**2\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.4:pg-155" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "#Example 7.4 : true breaking stress and nominal breaking stress \n", " \n", "\n", "#given data :\n", "d1=12.7; # in mm\n", "B_load=14;# in K-N\n", "A1=(math.pi*d1**2)/4;# original cross section area\n", "d2=7.87; # in mm\n", "A2=(math.pi*d2**2)/4;# final cross sction area\n", "T_stress=B_load/A2;\n", "print round(T_stress*1000),\" is true breaking stress,T_stress in (N/mm**2) \"\n", "N_stress=B_load/A1;\n", "print int(N_stress*1000),\" is nominal breaking stress,N_stress in (N/mm**2) \"\n", "#true breaking stress unit is wrong in the textbook\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "288.0 is true breaking stress,T_stress in (N/mm**2) \n", "110 is nominal breaking stress,N_stress in (N/mm**2) \n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.5.a:pg-155" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 7.5.a: yield point stress\n", " \n", "\n", "yl=34.0;#yeild load in kN\n", "ul=61.0;#ultimate load in kN\n", "fl=78.0;#final length in mm\n", "glf=60.0;#gauge length of fratture in mm\n", "fd=7.0;#final diamtere in mm\n", "d=12.0;#specimen diamtere in mm\n", "sl=62.5;#specimen length in mm\n", "A=(math.pi*(d)**2)/4;# in meter square\n", "ylp=((yl*10**3)/(A));# yeild point stress in N/mm**2\n", "print floor(ylp),\" is yeild point stress in N/mm**2\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "300.0 is yeild point stress in N/mm**2\n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.5.b:pg-155" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 7.5.b: ultimate tensile stress\n", " \n", "\n", "yl=34.0;#yeild load in kN\n", "ul=61.0;#ultimate load in kN\n", "fl=78.0;#final length in mm\n", "glf=60.0;#gauge length of fratture in mm\n", "fd=7.0;#final diamtere in mm\n", "d=12.0;#specimen diamtere in mm\n", "sl=62.5;#specimen length in mm\n", "A=(math.pi*(d)**2)/4.0;# in meter square\n", "uts=((ul*10**3)/(A));#ultimate tensile strangth in N/mm**2\n", "print round(uts),\" is ultimate tensile strangth in N/mm**2\"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "539.0 is ultimate tensile strangth in N/mm**2\n" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.5.c:pg-155" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 7.5.c: percentage reduction\n", " \n", " \n", "yl=34;#yeild load in kN\n", "ul=61;#ultimate load in kN\n", "fl=78;#final length in mm\n", "glf=60;#gauge length of fratture in mm\n", "fd=7;#final diamtere in mm\n", "d=12;#specimen diamtere in mm\n", "sl=62.5;#specimen length in mm\n", "A=(math.pi*(d)**2)/4;# in mm square\n", "A1=(math.pi*(fd)**2)/4;# in mm square\n", "pr=(A-A1)/A;# reduction\n", "print round(pr*100),\"% is percentage reduction\"\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "66.0 % is percentage reduction\n" ] } ], "prompt_number": 20 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.5.d:pg-155" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 7.5.d: percentage elonagtion\n", " \n", "\n", "yl=34.0;#yeild load in kN\n", "ul=61.0;#ultimate load in kN\n", "fl=78.0;#final length in mm\n", "glf=60.0;#gauge length of fratture in mm\n", "fd=7.0;#final diamtere in mm\n", "d=12.0;#specimen diamtere in mm\n", "sl=62.5;#specimen length in mm\n", "A=(math.pi*(d)**2)/4;# in mm square\n", "A1=(math.pi*(fd)**2)/4;# in mm square\n", "pr=(fl-glf)/glf;# elongation\n", "print round(pr*100,2),\"% is percentage elongtion \"\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "30.0 % is percentage elongtion \n" ] } ], "prompt_number": 21 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.6:pg-156" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Example 7.6 : strain \n", " \n", "\n", "#given data :\n", "b=44.5*10**3;#force\n", "E=1.1*10**5;# in N/mm**2\n", "A=15.2*19.1# in mm**2\n", "epsilon=b/(A*E);\n", "print \"strain,epsilon (mm) = \",\"{:.2e}\".format(epsilon)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "strain,epsilon (mm) = 1.39e-03\n" ] } ], "prompt_number": 22 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.7:pg-156" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Example 7.7 :stress and strain \n", " \n", "\n", "#given data :\n", "sigma=450;#in MPa\n", "epsilon=0.63;\n", "sigma_t=sigma*(1+epsilon);\n", "print \"true stress,sigma_t(MPa) = \",sigma_t\n", "epsilon_t=math.log(1+epsilon);\n", "print \"true strain,epsilon_t(MPa) = \",round(epsilon_t,3)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "true stress,sigma_t(MPa) = 733.5\n", "true strain,epsilon_t(MPa) = 0.489\n" ] } ], "prompt_number": 25 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex7.8:pg-157" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 7.8: which part has a greater stress\n", " \n", "l=24.0;#length in mm\n", "b=30;#breadth in mm\n", "ld=7000;#load in kg\n", "sd=10;#steel bar diamtere in mm\n", "sl=5000.0;#load in kg\n", "al=ld/(l*b);#stress on aluminium bar in kg/mm**2\n", "a=((math.pi*sd**2)/4.0);#area in mm**2\n", "slb=sl/a;#stress on steel bar in kg/mm**2\n", "print\"stress on aluminium bar is \",round(al,2),\" kg/mm**2 is less than stress on steel bar \",round(slb,2),\" kg/mm**2 \"\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "stress on aluminium bar is 9.72 kg/mm**2 is less than stress on steel bar 63.66 kg/mm**2 \n" ] } ], "prompt_number": 26 } ], "metadata": {} } ] }