# Chapter07:Mechanical Tests of Metals¶

## Ex7.1:pg-146¶

In [2]:
#Example 7.1 : shear modulus of the material

#given data :
E=210  # youngs's modulus in GN/m**2
v=0.3  # poisson ratio
G=E/(2*(1+v)) # shear modulus

print "shear modulus,G(GN/m**2) = ",round(G,2)

shear modulus,G(GN/m**2) =  80.77


## Ex7.2:pg-152¶

In [3]:
#Example 7.2 : young's modulus of elasticity,yield point stress, ultimate stress and percentage elongation

#given data :
d=40.0*10**-3 #in m
del_l=3.04*10**-5 # in m
L=200.0*10**-3 # in m
l=249*10.0**-3 # length of specimen in m
l0=(d+L)  # in m
A=(math.pi*d**2)/4.0

b=W/A

epsilon=del_l/L

E=(b/epsilon)

print"young modulus,E(N/m**2) = ","{:.2e}".format(E)

print "yield point stress,Y_stress(N/m**2) =  ","{:.2e}".format(Y_stress)

print "ultimate stress,U_stress(N/m**2) = ","{:.2e}".format(U_stress)

p_elongation=((l-l0)/l0)*100

print "percentage elongation,p_elongation(%) = ",p_elongation
#percentage elongation is calculated wrong in textbook

young modulus,E(N/m**2) =  2.09e+11
yield point stress,Y_stress(N/m**2) =   1.28e+08
ultimate stress,U_stress(N/m**2) =  1.93e+08
percentage elongation,p_elongation(%) =  3.75


## Ex7.3.a:pg-153¶

In [7]:
# Example 7.3.a: yield point stress

glf=79.5 #gauge length of fratture in mm
st=7.75*10**-4 #strain at load of 20kN
d=12.5 #specimen diamtere in mm
sl=62.5 #specimen length in mm
A=(math.pi*(d*10**-3)**2)/4.0 # in meter square
ylp=((yl*10.0**3)/(A)) #yeild point stress in N/m**2
print "yeild point stress in N/m**2 is ","{:.2e}".format(ylp)

yeild point stress in N/m**2 is  3.26e+08


## Ex7.3.b:pg-153¶

In [8]:
# Example 7.3.b: ultimate tensile strength

glf=79.5 #gauge length of fratture in mm
st=7.75*10**-4 #strain at load of 20kN
d=12.5 #specimen diamtere in mm
sl=62.5 #specimen length in mm
A=(math.pi*(d*10**-3)**2)/4.0 # in meter square
ylp=((yl*10.0**3)/(A)) #yeild point stress in N/m**2
uts=((ml*10.0**3)/(A)) #ultimate tensile strangth in N/m**2
print "{:.2e}".format(uts),"is ultimate tensile strangth in N/m**2"

5.83e+08 is ultimate tensile strangth in N/m**2


## Ex7.3.c:pg153¶

In [8]:
# Example 7.3.c: percentage elongation

glf=79.5 #gauge length of fratture in mm
st=7.75*10**-4 #strain at load of 20kN
d=12.5 #specimen diamtere in mm
sl=62.5 #specimen length in mm
a=(math.pi*d*10**-3)**2/4 # in meter square
pel=((glf-sl)/sl)*100 #percentage elongation
print pel,"% is percentage elongation"

27.2 % is percentage elongation


## Ex7.3.d:pg-153¶

In [9]:
# Example 7.3.d:modulus of elasticity
import math
glf=79.5 #gauge length of fratture in mm
st=7.75*10**-4 #strain at load of 20kN
d=12.5 #specimen diamtere in mm
sl=62.5 #specimen length in mm
A=(math.pi*(d*10**-3)**2)/4.0 # in meter square
ylp=((yl*10**3)/(A)) #yeild point stress in N/m**2
uts=((ml*10**3)/(A)) #ultimate tensile strangth in N/m**2
pel=((glf-sl)/sl)*100 #percentage elongation
strss=((20*10**3)/A) #stress at 20kN in N/m**2
mel=strss/st #modulus of elasticity in N/m**2
print "{:.2e}".format(mel),"is modulus of elasticity in N/m**2"

2.10e+11 is modulus of elasticity in N/m**2


## Ex7.3.e:pg153¶

In [13]:
# Example 7.3.e: yield point stress
import math
glf=79.5 #gauge length of fratture in mm
st=7.75*10**-4.0  #strain at load of 20kN
d=12.5 #specimen diamtere in mm
sl=62.5 #specimen length in mm
A=(math.pi*(d*10**-3)**2)/4.0  # in meter square
ylp=((yl*10**3)/(A)) #yeild point stress in N/m**2
uts=((ml*10**3)/(A)) #ultimate tensile strangth in N/m**2
pel=((glf-sl)/sl)*100 #percentage elongation
strss=((20*10**3)/A) #stress at 20kN in N/m**2
mel=strss/st #modulus of elasticity in N/m**2
mrs=((ylp*10**-3)**2/(2*mel)) #modulus of resilience
print round(mrs,4)," is modulus of resilience"

0.2526  is modulus of resilience


## Ex7.3.f:pg-153¶

In [14]:
# Example 7.3.f: fracture stress

glf=79.5 #gauge length of fratture in mm
st=7.75*10**-4 #strain at load of 20kN
d=12.5#specimen diamter in mm
sl=62.5 #specimen length in mm
A=(math.pi*(d*10**-3)**2.0)/4 # in meter square
ylp=((yl*10**3)/(A)) #yeild point stress in N/m**2
uts=((ml*10**3)/(A)) #ultimate tensile strangth in N/m**2
pel=((glf-sl)/sl)*100 #percentage elongation
strss=((20*10.0**3)/A) #stress at 20kN in N/m**2
mel=strss/st #modulus of elasticity in N/m**2
mrs=((ylp*10**-3)**2.0/(2*mel)) #modulus of resilience
fs=((fl*10.0**3)/(A)) #fracture stress in N/m**2
print "{:.2e}".format(fs),"is fracture stress in N/m**2"

4.12e+08 is fracture stress in N/m**2


## Ex7.3.g:pg153¶

In [15]:
# Example 7.3.g: modulus of toughness

glf=79.5 #gauge length of fratture in mm
st=7.75*10**-4 #strain at load of 20kN
d=12.5 #specimen diamtere in mm
sl=62.5 #specimen length in mm
A=(math.pi*(d*10**-3)**2)/4 # in meter square
ylp=((yl*10**3)/(A)) #yeild point stress in N/m**2
uts=((ml*10**3)/(A)) #ultimate tensile strangth in N/m**2
pel=((glf-sl)/sl)*100 #percentage elongation
strss=((20*10**3)/A) #stress at 20kN in N/m**2
mel=strss/st #modulus of elasticity in N/m**2
mrs=((ylp*10**-3)**2/(2*mel)) #modulus of resilience
fs=((fl*10**3)/(A)) #fracture stress in N/m**2
mth=((ylp+uts)*(pel/100))/2 #modulus of toughness in N/m**2
print "{:.2e}".format(mth)," is modulus of toughness in N/m**2"
#percentage reduction in area is not calulated in the textbook

1.24e+08  is modulus of toughness in N/m**2


## Ex7.4:pg-155¶

In [17]:
#Example 7.4 : true breaking stress and nominal breaking stress

#given data :
d1=12.7; # in mm
A1=(math.pi*d1**2)/4;# original cross section area
d2=7.87; # in mm
A2=(math.pi*d2**2)/4;# final cross sction area
print round(T_stress*1000)," is true breaking stress,T_stress in (N/mm**2) "
print int(N_stress*1000)," is nominal breaking stress,N_stress in (N/mm**2) "
#true breaking stress unit is wrong in the textbook

288.0  is true breaking stress,T_stress in (N/mm**2)
110  is nominal breaking stress,N_stress in (N/mm**2)


## Ex7.5.a:pg-155¶

In [18]:
# Example 7.5.a: yield point stress

fl=78.0;#final length in mm
glf=60.0;#gauge length of fratture in mm
fd=7.0;#final diamtere in mm
d=12.0;#specimen diamtere in mm
sl=62.5;#specimen length in mm
A=(math.pi*(d)**2)/4;# in meter square
ylp=((yl*10**3)/(A));# yeild point stress in N/mm**2
print floor(ylp)," is yeild point stress in N/mm**2"

300.0  is yeild point stress in N/mm**2


## Ex7.5.b:pg-155¶

In [19]:
# Example 7.5.b: ultimate tensile stress

fl=78.0;#final length in mm
glf=60.0;#gauge length of fratture in mm
fd=7.0;#final diamtere in mm
d=12.0;#specimen diamtere in mm
sl=62.5;#specimen length in mm
A=(math.pi*(d)**2)/4.0;# in meter square
uts=((ul*10**3)/(A));#ultimate tensile strangth in N/mm**2
print round(uts)," is ultimate tensile strangth in N/mm**2"

539.0  is ultimate tensile strangth in N/mm**2


## Ex7.5.c:pg-155¶

In [20]:
# Example 7.5.c: percentage reduction

fl=78;#final length in mm
glf=60;#gauge length of fratture in mm
fd=7;#final diamtere in mm
d=12;#specimen diamtere in mm
sl=62.5;#specimen length in mm
A=(math.pi*(d)**2)/4;# in mm square
A1=(math.pi*(fd)**2)/4;# in mm square
pr=(A-A1)/A;# reduction
print round(pr*100),"% is percentage reduction"

66.0 % is percentage reduction


## Ex7.5.d:pg-155¶

In [21]:
# Example 7.5.d: percentage elonagtion

fl=78.0;#final length in mm
glf=60.0;#gauge length of fratture in mm
fd=7.0;#final diamtere in mm
d=12.0;#specimen diamtere in mm
sl=62.5;#specimen length in mm
A=(math.pi*(d)**2)/4;# in mm square
A1=(math.pi*(fd)**2)/4;# in mm square
pr=(fl-glf)/glf;# elongation
print round(pr*100,2),"% is percentage elongtion "

30.0 % is percentage elongtion


## Ex7.6:pg-156¶

In [22]:
#Example 7.6 : strain

#given data :
b=44.5*10**3;#force
E=1.1*10**5;# in N/mm**2
A=15.2*19.1# in mm**2
epsilon=b/(A*E);
print "strain,epsilon (mm) = ","{:.2e}".format(epsilon)

strain,epsilon (mm) =  1.39e-03


## Ex7.7:pg-156¶

In [25]:
#Example 7.7 :stress and strain

#given data :
sigma=450;#in MPa
epsilon=0.63;
sigma_t=sigma*(1+epsilon);
print "true stress,sigma_t(MPa) = ",sigma_t
epsilon_t=math.log(1+epsilon);
print "true strain,epsilon_t(MPa) = ",round(epsilon_t,3)

true stress,sigma_t(MPa) =  733.5
true strain,epsilon_t(MPa) =  0.489


## Ex7.8:pg-157¶

In [26]:
# Example 7.8: which part has a greater stress

l=24.0;#length in mm

stress on aluminium bar is  9.72  kg/mm**2 is less than stress on steel bar  63.66  kg/mm**2