from __future__ import division
import math
sigma6=200
sigma1=200
sigma2=sigma5=150 #these are not real shear stress but taken
sigma3=sigma4=100 #proportional to length because we need just ratio
l16=400
t16=3
l12=l21=600
t12=t21=2 #thickness and lengths as shown in Fig 20.4
l23=600
t23=1.5
l25=300
t25=2.5
l34=200
t34=2
#eqn 20.1 B1=t_D*b/6*(2+sigma_2/sigma_1)
#eqn 20.2 B2=t_D*b/6*(2+sigma_1/sigma_2)
B1=B6=300+l16*t16/6*(2-sigma6/sigma1)+l12*t12/6*(2+sigma2/sigma1)
print "B1=B6=%5.2f mm^2\n"%(B1)
B2=B5=2*300+l12*t12/6*(2+sigma1/sigma2)+t25*l25/6*(2-sigma5/sigma2)+l23*t23/6*(2+sigma3/sigma2)
print "B2=B5=%5.2f mm^2\n"%(B2)
B3=300+l23*t23/6*(2+sigma2/sigma3)+l34*t34/6*(2-sigma4/sigma3)
print "B3=B4=%5.2f mm^2\n"%(B3)
from __future__ import division
import math
Mx=100*10**6 #bending moment(N.mm)
y=[660,600,420,228,25,-204,-396,-502,-540]
B=[640,600,600,600,620,640,640,850,640]
print "direct stress in each boom in last column"
print "Boom\t y(mm)\t B(mm^2)\t delIxx=By^2\t sigma_z"
for i in range (0,9):
print "%1.0f \t %3.0f \t %3.0f \t \t%2.1e \t %2.1f"%(i+1,y[i],B[i],B[i]*y[i]**2,Mx*y[i]/(1854*10**6))
from __future__ import division
import math
Ixx=48*10**6
Sy=4.8*10**3
B=300
q12=-Sy/Ixx*B*200 #until point 2
q23=q12-Sy/Ixx*B*200
q34=q23-Sy/Ixx*B*(-200)
print "shear flow in flange 12 = %2.0f N/mm\n"%(q12)
print "shear flow in web 23 = %2.0f N/mm\n"%(q23)
print "shear flow in flange 34 = %2.0f N/mm\n"%(q34)
from __future__ import division
import math
B=[200,250,400,100,100,400,250,200]
Ixx=13.86*10**6
Sy=10*10**3
qb23=0
qb34=qb23-Sy/Ixx*B[2]*100
qb45=qb34-Sy/Ixx*B[3]*50
qb56=qb34
qb67=qb23
qb21=qb67-Sy/Ixx*(B[1]*100)
qb18=qb21-Sy/Ixx*B[7]*30
qb87=qb21
qs0=-5.4
print "Distribution of shear flow :"
print "q23 = %2.1f N/mm"%(qb23+qs0)
print "q21 = %2.1f N/mm"%(qb21-qs0)
print "q34 = %2.1f N/mm"%(qb34-qs0)
print "q45 = %2.1f N/mm"%(qb45-qs0)
print "q56 = %2.1f N/mm"%(qb56-qs0)
print "q67 = %2.1f N/mm"%(qb67+qs0)
print "q18 = %2.1f N/mm"%(qb18-qs0)
print "q87 = %2.1f N/mm\n"%(qb87-qs0)
from __future__ import division
import math
from sympy import symbols, integrate
z=symbols('z')
E=70000 #youngs modulus (N/mm^2)
G=30000 #shear modulus (N/mm^2)
P=4.8*10**3 #applied force (N)
L=2000 #cantilever length(mm)
Sy=P
Ixx=48*10**6 #second moment of area
t=1 #actual thickness (mm)
Mx0=-Sy*(L-z)
Mx1=-(L-z)
del_M=integrate(Mx0*Mx1/E/Ixx,(z,0,L))
del_S=integrate((1/G/t/Sy*(6**2*200+12**2*400+6**2*200)),(z,0,L))
print "total deflection in vertical direction = %1.2f mm\n"%(del_M+del_S)