# Variables
sigma = 20000. #psi
b = 6. #in
h = 0.5 #in
p1 = 3750.
# Calculations
P = sigma*b*h
L = (P-p1*b)/(2*p1)
# Results
print 'L = %.2f in'%(L)
from numpy import linalg
# Variables
P = 5000. #lb per in
Tl = 75. #kips
y1 = 2.63 #in
y2 = 1.37 #in
# Calculations
A = [[P, P],[y1*P, -y2*P]]
b = [Tl*10**3, 0]
c = linalg.solve(A,b)
L1 = c[0]
L2 = c[1]
# Results
print 'L1 = %.2f in'%(L1)
print 'L2 = %.2f in'%(L2)
import math
# Variables
d = 3./8 #in
d1 = 1./8 #in
y = 1. #in
T = 15000. #psi
sigmab = 32000. #psi
sigmat = 18000. #psi
# Calculations
Ps = math.pi*T*(d/2)**2
Pt = sigmat*d1*(y-d)
Pb = sigmab*d1*d
Pmin =Ps
sigma =T
if(Pt<Pmin):
Pmin =Pt
sigma =sigmat
else:
Pmin =Pb
sigma =sigmab
e = Pmin*100/(sigma*d1*y)
# Results
print 'e = %.2f per cent'%(e)
import math
# Variables
d = 7./8 #in
Ss = 15000. #psi
Sb = 32000. #psi
St = 20000. #psi
n = 8.
t = 3./8 #in
l = 10. #in
# Calculations
Ps = Ss*math.pi*n*(d/2)**2
Pb = Sb*math.pi*n*d*t
Pt1 = St*(l-d*2)*t
Pt2 = 4*St*(l-d*4)*t/3
Pt3 = 4*St*(l-d*2)*t
Pmin = Ps
sigma = Ss
if (Pb<Pmin):
Pmin =Pb
sigma =Sb
elif (Pt1<Pmin):
Pmin =Pt1
sigma =St
elif (Pt2<Pmin):
Pmin =Pt2
sigma =St
elif (Pt3<Pmin):
Pmin =Pt3
sigma =St
e = Pmin*100/(sigma*t*l)
# Results
print 'e = %.1f per cent'%(e)
# Variables
n = 8.
shear = 15. #ksi
Dr = 7/8. #in
Ss = 32. #ksi
Ds = 40. #si
D = 3/8. #in
x = 0.504 #in
pmin=0
# Calculations
Ps = shear*n*(Dr/2)**2
Pb = Ds*(n/2)*x*Dr
Pb1 = Ss*n*D*Dr
pmin = Ps
if (Pb<pmin):
Pmin = Pb
else:
Pmin = Pb1
# Results
print 'load capacity of connection = %.1f kips'%(Pb)
import math
# Variables
T = 15000. #psi
x1 = 3. #in
x2 = 3. #in
y1 = 3. #in
y2 = 3. #in
d = 0.5 #in
n = 4.
# Calculations
P = T*(math.pi/4)*d**2/(math.sqrt((1/n)**2+(1/((math.sqrt(y1**2+y2**2)/y1)*n))**2+ \
(2*(1/n)*(1/(n*(math.sqrt(y1**2+y2**2))/y1))*math.cos(math.radians(45)))))
P1 = T*(math.pi/4)*d**2/((1/n)+(y1/(n*y1)))
if (P>P1):
print 'Stornger P = %.2f lb'%(P)
else:
print 'Stornger P = %.2f lb'%(P1)
# note : answer is different because of rounding off error. please check.
import math
# Variables
P = 5. #kips
xab = 3. #in
xbc = 6. #in
xbp = 1. #in
y = 6. #in
n = 3.
# Calculations
Dl = P/3
Pct = (6*P)/(((xab+xbp)*(xab+xbp)/(xbc-xbp))+(xbp/(xbc-xbp))+(xbc-xbp))
R = math.sqrt(Pct**2+Dl**2)
# Results
print 'Greatest Load = %.2f kips'%(R)