Chapter 06:Deflection of Beam

Example 6.6.1, Page No:196

In [8]:
import math

#Variable Decleration
wo=400 #loading in lb/ft
E=29*10**6 #Modulus of elasticity in psi
I=285 #Moment of inertia in in^4
S=45.6 #Sectional Modulus in in^3
L=8 #Span in ft

#Calculations
#Part 1
#Part1 is theoretical in nature hence not coded

#Part 2
delta_max=((wo*12**-1)*(L*12)**4)/(8*E*I) #maximum deflection in inches
M_max=(wo*12**-1)*(L*12)**2 #Maximum moment
sigma_max=M_max/(2*S) #Maximum bending stress in psi

#Result
print M_max
print "The maximum deflection is",round(delta_max,4),"in"
print "The maximum Bending Stress is",round(sigma_max),"psi"

#Answer in the textbook for sigma_max is incorrect
307200.0
The maximum deflection is 0.0428 in
The maximum Bending Stress is 3368.0 psi

Example 6.6.3, Page No:198

In [10]:
import math

#Variable Decleration
P=300 #Point Load in N
R_a=100 #Reaction at A in N
R_c=200 #Reaction at C in N
E=12 #Youngs Modulus in GPa
L1=2 #Length of the load from A in m
L2=1 #Length of the load from C in m
b=0.04 #Width of the CS of the beam in m
h=0.08 #Depth of the CS of the beam in m

#Claculations
#Moment of inertia 
I=b*h**3*12**-1 #Moment of Inertia in m^4
#Flexural Rigidity
FR=E*10**9*I #FLexural rigidity in N.m^2

#Moments in terms of x are
#Given
#After the variable Calculations we get
C1=-400/3 #Constant
C3=C1 #Constant
C2=0 #Constant
C4=0 #Constant

#to get max displacement x we have
x=(6.510/2.441)**0.5 #Length at which displacement is maximum in m
v=(0.8138*x**3-6.510*x) #Displacement in mm

#Largest slope
theta=(2.441*(L1+L2)**2-(7.324*(L1+L2-L1)**2)-6.150)*10**-3#Angle in radians

#Result 
print "The maximum displacement is",round(-v,2),"mm downwards"
print "The maximum angle is",round(theta*180*pi**-1,3),"degrees anticlockwise"
The maximum displacement is 7.09 mm downwards
The maximum angle is 0.487 degrees anticlockwise

Example 6.6.4, Page No:200

In [15]:
import math

#Variable Decleration
#The computation is mostly variable based hence values will be directly declared 
C1=19.20*10**3 #lb.ft^2
C2=-131.6*10**3 #lb.ft^2
C3=14.7*10**3 #lb.ft^2
C4=-112.7*10**3 #lb.ft^2
EI=10**7 #Flexural Rigidity in psi

#Calculations
v=-(C2*12**3)/(EI*40) #Displacement in inches

#Result
print "The maximum displacement is",round(v,3),"in downwards"
The maximum displacement is 0.569 in downwards

Example 6.6.6, Page No:210

In [18]:
import math

#Variable Decleration
L1=3 #Length in m
L2=1 #Length in m
L3=8 #Length in m
L4=4 #Length in m
L5=6 #Length in m

#Calculations
#Deflection midway
EIv=250*3**-1*L1**3-(50*3**-1*(L1-L2)**4)-(3925*3**-1*L1) #Deflection in N.m^3

#Deflection at E
EIv_E=250*3**-1*L3**3-(50*3**-1*(L3-L2)**4)+(50*3**-1*(L3-L4)**4)+(650*3**-1*(L3-L5)**3)-(3925*3**-1*L3) #Deflection in N.m^3

#Result
print "The deflection at midspan is",round(-EIv),"N.m^3 downwards"
print "The deflection at point E is",round(-EIv_E),"N.m^3 downwards"
The deflection at midspan is 1942.0 N.m^3 downwards
The deflection at point E is 1817.0 N.m^3 downwards

Example 6.6.8, Page No:223

In [23]:
import math

#Variable Decleration
x1=16*3**-1 #Centroid of the triangle in ft
x2=3 #Centroid of the lower parabola in ft
x3=6 #Centroid of the rectangle in ft
x4=20*3**-1 #Centroid of the triangle in ft
#Moment values
M1=4800 #Moment in lb.ft
M2=14400 #Moment in lb.ft

#Calcualtions
P=((3**-1*4*M1*x2)+(4*M1*x3)+(0.5*4*M1*2*x4))*(x1*8*8*0.5)**-1 #Force P in lb

#Result
print "The magnitude of force P is",round(P,1),"lb"
The magnitude of force P is 1537.5 lb

Example 6.6.9, Page No:225

In [7]:
import math

#Variable Decleration
P=300 #Force in N
L1=1 #Length in m
L2=2 #Length in m
R_a=100 #Reaction at A in N
R_c=200 #Reaction at C in N
EI=20.48*10**3 #Flexural Rigidity in N.m^2

#Calculations
#Part 1
tC_A=(0.5*(L1+L2)*P*L1-(0.5*L1*P*(L1+L2)**-1))*EI**-1 #First Moment in m
theta_A=tC_A/(L1+L2) #Angle in radians 

#Part 2
tD_A=0.5*L1*R_a*(L1+L2)**-1*EI**-1 #First Moment in m
delta_D=(theta_A*L1-tD_A) #Displacement in m 

#Result
print "The angle in part 1 is",round(theta_A*180*pi**-1,3),"Degrees"
print "The displacement in part 2 is",round(delta_D*1000,2),"mm downward"
The angle in part 1 is 0.373 Degrees
The displacement in part 2 is 5.7 mm downward

Example 6.6.10, Page No:227

In [13]:
import math

#Variable Decleration
P1=150 #Load in lb
P2=30 #Load in lb
R_A=78 #Reaction at A in lb
R_C=102 #Reaction at C in lb
L1=4 #Length in ft
L2=6 #Length in ft
M1=780 #Moment in lb.ft
M2=900 #Moment in lb.ft
M3=120 #Moment in lb.ft

#Calculations
EI_AC=0.5*(L1+L2)*M1*(2*3**-1)*(L1+L2)-(0.5*L2*M2*(L1+(2*3**-1)*L2)) #Deflection in lb.ft^3
EI_thetaC=EI_AC/(L1+L2) #Deflection in lb.ft^2

EI_DC=-0.5*L1*M3*2*3**-1*L1 #Deflection in lb.ft^3
EI_deltaD=EI_thetaC*L1-(-EI_DC) #Deflection in lb.ft^2

#Result
print "The deflection is",round(EI_deltaD),"lb.ft^2 upwards"
The deflection is 1120.0 lb.ft^2 upwards

Example 6.6.11, Page No:234

In [14]:
import math

#Variable Decleration
P1=80 #Load in lb
P2=100 #Load in lb
b1=3 #Distance of load from end in ft
b2=2 #Distance of load from end in ft
L=9 #Span of the beam in ft

#Calcualtions
EI_delta1=(P1*b1*48**-1)*(3*L**2-4*b1**2) #Deflection in lb.ft^3
EI_delta2=(P2*b2*48**-1)*(3*L**2-4*b2**2) #Deflection in lb.ft^3
EI_delta=EI_delta1+EI_delta2 #Deflection at modspan in lb.ft^3

#Result
print "The deflection at midspan is",round(EI_delta)," lb.ft^3 downward"
The deflection at midspan is 1981.0  lb.ft^3 downward

Example 6.6.12, Page no:234

In [16]:
import math

#Variable Decleration
wo=600 #Load in N/m
L=6 #Span of the beam in m
b=2 #Distance of the load from end in m
a=1 #Distance of the load from end in m

#Calulations
EI_delta1=wo*384**-1*(5*L**4-12*L**2*b**2+8*b**4) #Deflection in N.m^3
EI_delta2=wo*96**-1*a**2*(3*L**2-2*a**2) #Deflection in N.m^3

EI_delta=EI_delta1-EI_delta2 #Total Delfection at midspan in N.m^3

#Result
print "The total Deflection at midpsan is",round(EI_delta),"N.m^3 downwards"

#NOTE:The answer varies due to decimal point accuracy
The total Deflection at midpsan is 6963.0 N.m^3 downwards