#Given
l = 12 #ft, length
E = 29*10**3 #GPa, stress
ro = 75 #mm, outside radius
ri = 70 #mm, inside radius
sigma_y = 250 #MPa, stress
#Calculations
import math
Ix=110
Iy=37
A = 9.13
Pcr = (math.pi**2*(E*10**3)*Iy)/((l*12)**2) #Pcr = (math.pi**2*EI)/(l**2)
sigma_cr = (Pcr*1000)/A
p=36*A
print"The maximum allowable axial load that the column can support = ",round(p,0),"kip"
#Given
E = 29*10**3 #GPa, stress
lx= 144 #inch, length
ly=100.8 #inch
A =4.43 #inch**2, area
sigma_y = 60 #ksi, stress
#Calculations
import math
Ix=29
Iy=9.32
Pcrx = ((math.pi**2)*E*Ix)/(lx**2) #Pcr = (math.pi**2*EI)/(l**2)
Pcry = ((math.pi**2)*E*Iy)/(ly**2) #Pcr = (math.pi**2*EI)/(l**2)
sigma_cr = (Pcr*1000)/A
sigmacr = Pcry/A #in kN
if sigmacr<sigma_y:
print"Buckling will occue before the material yield. So Psr=",round(Pcry,0),"kip"
else:
print"n"
#Given
E = 70 #GPa
Ix = 61.3*10**-6 #Moment of inertia along x-axis
Iy = 23.2*10**-6 ##Moment of inertia along y-axis
l = 5
KLx = 2*l #m
KLy = 0.7*(l) #m
FS = 3 #Factor of safety
sigma_y = 215 #MPa
#Calculation
import math
Pcrx = (math.pi**2*E*10**6*Ix)/(KLx**2) #Pcr = (math.pi**2*EI)/(l**2)
Pcry = (math.pi**2*E*10**6*Iy)/(KLy**2) #Pcr = (math.pi**2*EI)/(l**2)
Pcr = min(Pcrx,Pcry)
A = 7.5*10**-3 #mm**2
P_allow = Pcr/FS
sigma_cr = (Pcr*10**-3)/A
if(sigma_cr<sigma_y):
print"The largest allowable load that the column can support = ",round(P_allow,0),"kN"
else:
print"n"
#Given
z1 = 4*1000 #mm, length
e = 200 #mm, elongation
KLy = 100.8 #inch**2
Iy = 49.1 #inch**4
E = 29*10**3 #ksi, stress
sigma_y =421.2 #MPa
#Calculation
#y-y Axis Buckling
import math
Pcry = (math.pi**2*E*10**6*Iy)/(KLy**2) #Pcr = (math.pi**2*EI)/(l**2)
Pcry = Pcry/1000
#x-x Axis Yielding
Kx= 2
KLx = 288 #inch
A=11.7
c = (8.25)/2.0
rx = 3.53 #inch
#Solved by applying the Secant Formula and then finding Px by trial and error
trial_Px = 88.4 #kN
A = 7850#mm**2
sigma = (trial_Px*1000)/(A)
if(Pcry>trial_Px and sigma<sigma_y):
print'The maximum eccentric load that the column can support = ',trial_Px
print'Failure will occur about the x-x axis.'
else:
print"n"
#Given
d = 30 #mm, diameter
r = d/2 #mm, radius
L = 600 #mm
sigma_pl = 150#MPa, stress
#Calculations
import math
I = (math.pi/4)*(r**4)
A = math.pi*r**2
r_gyr = sqrt(I/A)
K = 1
sl_ratio = (K*L)/(r_gyr)
flag1 = 0
#Assuming the critical stress is elastic
E = 150/0.001
sigma_cr1 = (math.pi**2*E)/(sl_ratio**2) #Pcr = (math.pi**2*EI)/(l**2)
if(sigma_cr1 > sigma_pl):
Et = (270 - 150)/(0.002 - 0.001)
sigma_cr2 = (math.pi**2*Et)/(sl_ratio**2) #Pcr = (math.pi**2*EI)/(l**2)
if(sigma_cr2>150 and sigma_cr2<270):
Pcr = sigma_cr2*A
Pcr = Pcr/1000.0 #in kN
print'The critical load when used as a pin supported column = ',round(Pcr,0),"kN"
else:
print""
#given
l=16 #16 ft
A=29.4 #in**2, area
rx=4.60 #in
ry=2.65 #in
k=1
E=29*10**3 #Stress
sigmay=36.0 #ksi
#calculation
import math
x1=k*l*12/ry
x=math.sqrt(2*math.pi**2*E/sigmay)
a=(1-(x1**2/(2.0*x**2)))*((sigmay))
b=(5/3.0)+((3/8.0)*(x1)/(x))-((x1**3)/(8.0*(x**3)))
sigmaallow=a/b
P=sigmaallow*A
#result
print" The largest load is",round(P,0),"kip"
#Given
P = 18 #kip, load
E = 29*10**3 #ksi, stress
sigma_y = 50 #ksi, shear stress
l = 15 #ft, length
k =0.5 #shape factor
#Calculations
import math
I_by_d = (1/4.0)*(math.pi)*(d/2.0)**4
A_by_d = (1/4.0)*(math.pi)*d**2
r_by_d = math.sqrt(I_by_d/A_by_d)
sl_ratio_c = math.sqrt((2*math.pi**2*E)/(sigma_y))
a1=math.sqrt(2*(math.pi)**2*E/(sigma_y))
d_=((18*4*16*23*(k**2)*(l**2)*12**2)/(12*math.pi**3*E))**(1/4.0)
print "The smallest diameter is ",round(d_,2),"inch. So use d=2.25 inch"
d=2.25
a1=k*l*12/(d/4.0)
if a1<200:
print"Use of equation is appropriate"
#Given
L = 30 #inch
P = 12 #kip
sigma =28.0 #ksi
K = 1
#Calculations
import math
b2 = (P)/(2*sigma)
b_ = math.sqrt(b2)
A = 2*b_*b_
Iy = (1/12.0)*(2*b_*b_**3)
ry = sqrt(Iy/A)
sl_ratio = (K*L)/(ry)
if(sl_ratio>12):
b4 = (P*103.9**2)/(2*54000) #Eqn 13.26
b = b4**(1/4.0)
sl_ratio_ = (2598.1)/(b)
w = 2*b
else:
print"j"
if(sl_ratio>55):
print'The thickness of the bar = ',round(b,2),"inch"
else:
print"h"
#Given
P = 5.0 #kip. load
y1 = 5.5 #inch, length
x1 = 1.5 #inch
A = (x1*y1) #area
d = 1.5 #inch
K = 1
#Eqn 13.29
L2 = (540*A*d**2)/(P)
L = sqrt(L2)
KL_d = (K*L)/(d)
if(KL_d>26 and KL_d<=50):
print'The greatest allowable length L as specified by the NFPA = ',round(L,1),"inch"
else:
print"j"
#Given
#the given dimansion are
L = 80.0 #inch
K = 2.0
l = 4.0 #inch
b = 2.0 #inch
e = 1 #inch
c = 2 #inch
#Calculations
I1 = (1/12.0)*(l*b**3)
A = l*b
r = sqrt(I1/A)
sl_ratio = (K*L)/(r)
#Eqn 13.26
sigma_allow = (54000)/(sl_ratio**2)
I2 = (1/12.0)*(b*l**3)
coefficient = (1/A) + (e*c)/I2
sigma_max = sigma_allow
P = sigma_max/coefficient
#Display
print'The load that can be supported if the column is fixed at its base ',P,"kip"
#Given
import math
sigmaB_allow = 22 #ksi, allowable stress
E = 29*10**3 #ksi, stress
sigma_y = 36 #ksi, shear stress
K= 1 #shape factor
A = 5.87 #inch**2, area
Ix = 41.4 #inch**4, moment of inertia
ry = 1.5 #inch
d = 6.2 #inch
c= d/2.0
e = 30 #inch
L = 15 #ft
sl_ratio = (K*L*12)/(ry)
sl_ratio_c = math.sqrt((2*math.pi**2*E)/(sigma_y))
if(sl_ratio<sl_ratio_c):
num = (1 - (sl_ratio**2/(2*sl_ratio_c**2)))*sigma_y
denom1 = (5/3.0) + ((3/8.0)*sl_ratio/sl_ratio_c)
denom2 = (sl_ratio**3)/(8*sl_ratio_c**3)
sigmaA_allow = num/(denom1 - denom2)
coeffP = 1/(sigmaA_allow*A) + (e*c)/(Ix*sigmaB_allow)
P = 1/coeffP
sigA = (P/A)/(sigmaA_allow)
else:
print"k"
if(sigA < 0.15):
print'The maximum allowable value of eccentric load = ',round(P,2),"kN"
else:
print"h"
#Given
K = 2 #shape factor
d= 3.0 #inch, diameter
L = 60 #inch, length
e = 4 #inch
c = d
l = 3.0 #inch
b =6.0 #inch
A = l*b #inch**2
#Calculations
sl_ratio = (K*L)/(d)
if(sl_ratio>26 and sl_ratio<50):
sigma_allow = (540)/(sl_ratio**2)
sigma_max = sigma_allow
I = (1/12.0)*(l*b**3)
coeffP = (1/A) + (e*c)/(I)
P = sigma_max/coeffP
print'The eccentric load that can be supported = ',round(P,2),"kip"
else:
print"no"