from math import pi
F=1000#in lb
Ao=(pi/4)*(0.505)**2#in**2
rho=F/Ao
delta_I=0.001#in
I_o=2#in
e=delta_I/I_o
print"The value in psi is=",rho
print"The value of epselon",e
# Initialisation of Variables
F=45000;#Force applied on an aluminum rod in lb
e=25000;#the maximum allowable stress on the rod in psi
l2=150;#the minimum length of the rod in in
e1=0.0025;#The strain appiled on rod
sigma=16670;#Stress applied on rod in psi
L=0.25;#The maximum allowable elastic deformation in in
from math import sqrt,pi
#CALCULATIONS
Ao1=F/e;#The required crosssectional area of the rod
d=sqrt((Ao1*4)/pi);#Diameter of rod in in
l1=e1*L;#The maximum length of the rod in in
e2=L/e1;#The minimum strain allowed on rod
Ao2=F/sigma;#The minimum cross-sectional area in in^2
print "The required crosssectional area of the rod in in^2:",Ao1
print "Diameter of rod in in:",d
print "The maximum length of the rod in in:",l1
print "The minimum strain allowed on rod:",e2
print "The minimum cross-sectional area in in^2:",Ao2
# Initialisation of Variables
sigma1=35000;#Stress applied of aluminum alloy in psi from table 6-1
e1=0.0035;##Strain applied of aluminum alloy from table 6-1
sigma2=30000;#Stress applied of aluminum alloy in psi
Lo=50;#initial length of aluminum alloy
#CALCULATIONS
E=sigma1/e1;#Modulus of elasticity of aluminum alloy
e2=sigma2/E;#Strain applied of aluminum alloy
L=Lo+(e2*Lo);#The length after deformation of bar in in
print "Modulus of elasticity of aluminum alloy from table 6-1:",E
print "The length after deformation of bar in in",L
print "Strain applied of aluminum alloy:",e2
# Initialisation of Variables
Lf=2.195;#Final length after failure
d1=0.505;#Diameter of alluminum alloy in in
d2=0.398;#Final diameter of alluminum alloy in in
Lo=2;#Initial length of alluminum alloy
from math import pi
#CALCULATIONS
A0=(pi/4)*d1**2;#Area of original of alluminum alloy
Af=(pi/4)*d2**2;#Area of final of alluminum alloy
E=((Lf-Lo)/Lo)*100;#Percentage of Elongation
R=((A0-Af)/A0)*100;#Percentage of Reduction in area
print "Percentage of Elongation:",E
print "Percentage of Reduction in area:",round(R,1)
print"The final length is less than 2.205 in because, after fracture, the elastic strain is recovered."
# Initialisation of Variables
F=8000.;#.......#Load applied for the aluminum alloy in lb
F2=7600.;#......#Load applied for the aluminum alloy in lb at fracture
dt1=0.505;#.......#diameter of for the aluminum alloy in in
dt2=0.497;#.......#The diameter at maximum load
Lt=2.120;#..........#Final length at maxium load
Lot=2.;#.............#Initial length of alluminum alloy
Ff=7600.;#.........#Load applied for the aluminum alloy after fracture in lb
df=0.398;#.......#The diameter at maximum load after fracture
Lf=0.205;#.......#Final length at fracture
from math import pi,log
#CALCULATIONS
Es=F/((pi/4)*dt1**2);#.....#Engineering stress in psiAt the tensile or maximum load
Ts=F/((pi/4)*dt2**2);#.....#True stress in psi At the tensile or maximum load
Ee=(Lt-Lot)/Lot;#........#Engineering strain At the tensile or maximum load
Te=log(Lt/Lot);#........#True strain At the tensile or maximum load
Es2=F2/((pi/4)*dt1**2);#......##Engineering stress At fracture:
Ts2=F2/((pi/4)*df**2);#......#True stress At fracture:
Ee2=Lf/Lot;#..........#Engineering strain At fracture:
Te2=log(((pi/4)*dt1**2)/((pi/4)*df**2));#.......#True strain At fracture:
print "Engineering stress in psiAt the tensile or maximum load",Es
print "True stress in psi At the tensile or maximum load",Ts
print "Engineering strain At the tensile or maximum load",Ee
print "True strain At the tensile or maximum load",Te
print "Engineering stress At fracture:",Es2
print "True stress At fracture",Ts2
print "Engineering strain At fracture:",Ee2
print "True strain At fracture:",round(Te2,3)
# Initialisation of Variables
Fs=45000;#.......#The flexural strength of a composite material in psi
Fm=18*10**6;#........#The flexural modulus of composite material in psi
w=0.5;#.......#wide of sample in in
h=0.375;#......#Height of sample in in
l=5;#..........#Length of sample in in
#CALCULATIONS
F=Fs*2*w*h**2/(3*l);#......#The force required to fracture the material in lb
delta=(l**3)*F/(Fm*4*w*h**3);#.......#The deflection of the sample at fracture
print "The force required to fracture the material in lb:",F
print "The deflection of the sample at fracture in in",round(delta,4)