# Stress produced in an Al
import math
#Variable Declaration
ld=2000.0 # Load applied
g=9.8 # Acceleration due to gravity in m/s^2
r=0.005 # radious of test piece
#Calculation
force=ld*g
stress= force/(math.pi*r**2)
#Result
print('The stress produce in an aluminium alloy is %.1f MPa'%(stress*10**-6))
# perentage elongation and reduction
import math
#Variable Declaration
lf=53.75*10**-3
l0=50*10**-3
df=9.4*10**-3
d0=8.8*10**-3
#Calculation
pl=(lf-l0)*100.0/l0
pa=((math.pi*df**2)-(math.pi*d0**2))*100.0/(math.pi*df**2)
#Result
print('\nThe %% elongation is %.1f%% and \nthe %% reduction in area is %.2f%%'%(pl,pa))
#Brinell Hardness Number
import math
#Variable Declaration
ts=937.0 # Tensile strength of steel
#Calculation
bhn=ts/3.45
#Result
print('The Brinell Hardness Number is %.2f'%bhn)
#Tensile strength and fatigue limit of Steel plate
import math
#Variable Declaration
p=3000.0 # Load applied
D=10.0 # diameter of the indenter
d=2.2 # diameter of the impression
#Calculation
Hb=2*p/(math.pi*D*(D-math.sqrt(D**2-d**2)))
Hb= math.floor(Hb*10)/10
ts=3.45*Hb
fl=0.5*ts
#Result
print('\nBrinell Hardness Number of steel Plate, Hb=%.1f\n'%Hb)
print('\nThe Tensile strength of steel plate is %.3f MPa\n'%ts)
print('\nThe Fatigue limit of steel plate is %.4f MPa'%fl)