Chapter 5:Deflections Of Beams By Double Integration Methods

Example 5.5.2,Page No.192

In [1]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

L=3000 #mm #span of beam
a=2000 #mm
W1=20*10**3 #N #Pt Load Acting on beam
W2=30*10**3 #N #Pt Load Acting on beam
E=2*10**5 #N/mm**2 #Young's Modulus
I=2*10**8 #mm**4 #M.I

#Calculations

#Deflection at free End Due to W2
dell1=W2*L**3*(3*E*I)**-1 #mm

#Deflection at free end Due to W1
dell2=W1*a**3*(3*E*I)**-1+(L-a)*W1*a**2*(2*E*I)**-1 #mm

#Total Deflection at free end
dell=dell1+dell2 #mm

#Result
print"Deflection at Free End is",round(dell,2),"mm"
Deflection at Free End is 9.08 mm

Example 5.5.4,Page No.193

In [2]:
import math
from math import sin, cos, tan, pi, radians


#Initilization of Variables

E=2*10**5 #N/mm**2 #Young's Modulus
I=180*10**6 #mm**4 #M.I
W1=20 #N/m #u.d.l
W2=20*10**3 #N #Pt load
L=3000 #m #Span of beam
a=2000 #m #Span of u.d.l

#Calculations

#Displacement of free End due to 20 KN Pt load at free end
dell1=W2*L**3*(3*E*I)**-1 #mm

#Displacement of free end due to u.d.l
dell2=W1*a**4*(8*E*I)**-1+(L-a)*W1*a**3*(6*E*I)**-1

#Deflection at free end
dell=dell1+dell2 #mm

#Result
print"The Displacement of Free End of cantilever beam is",round(dell,2),"mm"
The Displacement of Free End of cantilever beam is 6.85 mm

Example 5.5.10,Page No.201

In [3]:
import math
from math import sin, cos, tan, pi, radians


#Initilization of Variables

E=200*10**6 #KN/m**2  #Young's Modulus
I=15*10**-6 #m**4 #M.I
a=4000 #m 
L_AB=6 #m #Span of beam
L_CB=2 #m #Length of CB
F_C=18 #KN #force at C

#Calculations

#Let V_A & V_B be the Reactions at A & B Respectively
#V_A+V_B=18
#Now taking moment at B,we get M_B
V_A=(F_C*L_CB)*L_AB**-1
V_B=18-V_A

#Now Taking Moment at distance x
#M_x=6*x-18*(x-4)
#EI*d**2*y*(d*x**2)**-1=6*x-18*(x-4)

#Now Integrating above equation,we get
#EI*dy*(dx)**-1=C1+3*x**2-9(x-4)**4

#Again Integrating above equation we get
#EI*y=C2+C1*x+x**3-3*(x-4)**3

#The Boundary conditions
x=0
y=0  #.....(a)

x=6
y=0   #....(b)

#From Boundary Condition(B.C) a we get
C2=0

#From Boundary Condition(B.C) b we get
#6*C1+216-3*8
#After Further simplifying we get
C1=-(216-24)*6**-1

#EI*y=-32*x+x**3-3*(x-4)**3
#EI*dy*(dx)**-1=-32+3*x**2-9(x-4)**4

#For Max Deflection
#Assume it inthe Porion AC i.e x=4=a
#0=-32+3*x**2
x=(32*3**-1)**0.5

#Value of Max deflection is
ymax=(-32*x+x**3)*(E*I)**-1 #mm

#slope at mid-span

#EI*(dy*(dx)**-1)_centre=-32+3*x**2
#at centre ,
x1=3 #m

#Let (dy*(dx)**-1)_centre=X
X=-(-32+3*x1**2)*(E*I)**-1 #Radian

#Deflection at Load Point
x2=4 #m
#EI*y_c=-32*x2+x2**3

y_c=-(-32*x2+x2**3)*(E*I)**-1


#Result
print"Value of Max Deflection",round(ymax,4),"mm"
print"SLope at mid-span",round(X,4),"radian"
print"Deflection at the Load Point is",round(y_c,4),"mm"
Value of Max Deflection -0.0232 mm
SLope at mid-span 0.0017 radian
Deflection at the Load Point is 0.0213 mm

Example 5.5.11,Page No.203

In [4]:
import math
from math import sin, cos, tan, pi, radians


#Initilization of Variables

L_CB=2 #m #Length of CB
L_AC=4 #m #Length of AB
M_C=15 #KN.m #Moment At Pt C
F_C=30 #KN
L=6 #m Span of Beam

#Let X=E*I
X=10000 #KN-m**2

#Calculations

#Let V_A and V_B be the reactions at A & B respectively
#V_A+V_B=30

#Taking Moment a A,we get
V_B=(F_C*L_AC+M_C)*L**-1
V_A=30-V_B

#Now Taking Moment at distacnce x from A
#M_x=7.5*x-30*(x-4)+15

#By using Macaulay's Method
#EI*(d**2*x/dx**2)=M_x=7.5*x-30*(x-4)+15

#Now Integrating above Equation we get
#EI*(dy/dx)=C1+7.5*x**2*2**-1-15*(x-4)**2+15*(x-4)  ............(1)

#Again Integrating above Equation we get
#EIy=C2+C1*x+7.5*6**-1*x**3-5*(x-4)**3+15*(x-4)**2*2**-1..........(2)

#Boundary Cinditions
x=0
y=0

#Substituting above equations we get 
C2=0

x=6 #m
y=0

C1=-(7.5*6**3*6**-1-5*2**3+15*2**2*2**-1)*6**-1

#EIy_c=C2+C1*x+7.5*6**-1*x**3-5*(x-4)**3+15*(x-4)**2*2**-1
#Sub values in Above equation we get
y_c=(93.3333*(X)**-1)

#Result
print"The Deflection at C",round(y_c,4),"mm"
The Deflection at C 0.0093 mm

Example 5.5.12,Page No.204

In [5]:
import math
from math import sin, cos, tan, pi, radians


#Initilization of Variables

L_AC=L_CD=L_DB=2 #m #Length of AC,CD,DB
F_C=40 #KN #Force at C
w=20 #KN/m #u.d.l
L=6 #m #span of beam

#Let E*I=X
X=15000 #KN-m**2


#Calculations

#Let V_A & V_B be the reactions at A & B respectively
#V_A+V_B=80

#Taking Moment B,M_B
V_A=(F_C*(L_CD+L_DB)+w*L_DB*L_DB*2**-1)*L**-1 #KN
V_B=80-V_A #KN

#Taking Moment at distance x from A
#M_x=33.333*x-40*(x-2)-20*(x-4)**2*2**-1
#EI*(d**2/dx**2)=33.333*x-40*(x-2)-10*(x-4)**2

#Integrating above equation we get
#EI*(dy/dx)=C1+33.333*x**2*2**-1-20*(x-2)**2-10*3**-1*(x-4)**3

#Again Integrating above equation we get
#EI*y=C2+C1*x+33.333*x**3*6**-1-20*3**-1*(x-2)**3-10*12**-1*(x-4)**4

#At
x=0
y=0
C2=0

#At
x=6
y=0
C1=-760*6**-1

#Assuming Deflection to be max in portion CD and sustituting value of C1 in equation of slope we get
#EI*y=C2+C1*x+33.333*x**3*6**-1-20*3**-1*(x-2)**3-10*12**-1*(x-4)**4
#0=-126.667+33.333*x**2**-1-20*(x-2)**2

#After rearranging and simplifying further we get

#x**2-24*x+62=0
#From above equations
a=1
b=-24
c=62

y=(b**2-4*a*c)**0.5

x1=(-b+y)*(2*a)**-1
x2=(-b-y)*(2*a)**-1

#Taking x2 into account
x=2.945 #m
C1=-126.667
C2=0

y_max=(C2+C1*x+33.333*x**3*6**-1-20*3**-1*(x-2)**3)*X**-1 #mm

#Max slope occurs at the ends
#At A,
#EI*(dy/dx)_A=-126.667
#At B
#EI*(dy/dx)_B=126.667+33.333*6**2*2**-1-20*4**2-10*2**3
#After simplifying Further we get
#EI*(dy/dx)_B=73.3273

#Now Max slope is EI(dy/dx)_A=-126.667
#15000*(dy/dx)_=-126.667

#Let Y=dy/dx
Y=-126.667*X**-1 #Radians

#Result
print"Maximum Deflection for Beam is",round(y_max,4),"mm"
print"Maximum Slope for beam is",round(Y,4),"radians"
Maximum Deflection for Beam is -0.0158 mm
Maximum Slope for beam is -0.0084 radians

Example 5.5.13,Page No.206

In [6]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

E=2*10**8 #KN/m**2
I=450*10**-6 #m**4
L_AC=1 #m #Length of AC
L_CD=3 #m #Length of CD
L_DB=2 #m #Length of DB
w=10 #KN/m #u.d.l

#Calculations

#Let V_A & V_B be the reactions at A & B respectively
#V_A+V_B=30

#Taking Moment at distance x from A
#M_x=17.5*x-10*(x-1)**2*2**-1+10*(x-4)**2*2**-1
#EI*(d**2/dx**2)=17.5*x-10*(x-1)**2*2**-1+10*(x-4)**2*2**-1

#Now Integrating Above equation we get
#EI(dy/dx)=C1+17.5*x**2*2**-1-5*3**-1*(x-1)**2+5*3**-1*(x-4)**3

#Again  Integrating Above equation we get
#EI*y=C2+C1*x+17.5*x**3*6**-1-5*12**-1*(x-1)**4+5*12**-1*(x-4)**4

#At 
x=0
y=0
C2=0

#At 
x=6 
y=0
C1=(-17.5*x**3*6**-1+5*12**-1*(x-1)**4-5*12**-1*(x-4)**4)*x**-1

# 1)Slope at A .i.e at x=0
#EI*(dy/dx)_A=C1=-62.708 #KN-m**2
#let (dy/dx)=X
X=C1*(E*I)**-1 #radiams

#Deflection at mid-span
x=3 #m
#EI*y_centre=C1*x+17.5*x**3*6**-1-5*12**-1*(x-1)**2
y_centre=-(C1*x+17.5*x**3*6**-1-5*12**-1*(x-1)**4)*(E*I)**-1

#Maximum Deflection

#At point of Max deflection (dy/dx)=0
#Assuming it in portion CD

#0=C1*x+17.5*x**2*2**-1-5*3**-1*(x-1)**3

#Now Let
#F(x)=C1+17.5*x**2*2**-1-5*3**-1*(x-1)**3

#Let F(x)=Y
#At 
x=2.5
Y1=-(C1+17.5*x**2*2**-1-5*3**-1*(x-1)**3)

#AT
x=3
Y2=-(C1+17.5*x**2*2**-1-5*3**-1*(x-1)**3)

#At
x=2.9 #m
Y3=-(C1+17.5*x**2*2**-1-5*3**-1*(x-1)**3)

#A curve may be plotted for (F(x) and the value for which F(x)=0 may be found
#For F(x)=0 for x=2.92 m
#Therefore y_max occur at x=2.92

x=2.92 #m
y_max=(C1*x+17.5*x**3*6**-1-5*12**-1*(x-1)**4)*(E*I)**-1

#Result
print"Slope at A",round(X,6),"mm"
print"Deflection at mid-span",round(y_centre,6),"mm"
print"Maxmimum Deflection is",round(y_max,5),"mm"
Slope at A -0.000697 mm
Deflection at mid-span 0.001289 mm
Maxmimum Deflection is -0.00129 mm

Example 5.5.14,Page No.208

In [7]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

L_AC=LDE=L_EB=1 #m #Length of AC
L_CD=2 #m #Length of CD
E=200 #KN/mm**2
I=60*10**6 #mm**4 #M.I
F_C=20 #KN #Force at C
F_E=30 #KN #Force at E
w=10 #KN/m #u.d.l

#Calculations

X=E*I*10**-6 #KN-m**2

#Let V_A & V_B be the reactions at A & B respectively
#V_A+V_B=70

#Taking Moment at distance x from A
#M_x=34*x-20*(x-1)-10*(x-1)**2*2**-1+10*(x-3)**2*2**-1-30*(x-4)
#EI*(d**2y/dx**2)=34*x-20*(x-1)-10*(x-1)**2*2**-1+10*(x-3)**2*2**-1-30*(x-4)

#Now Integrating Above equation,we get
#EI*(dy/dx)=C1+17*x**2-10*(x-1)**2-5*3**-1*(x-1)**3+5*3**-1*(x-3)**3-15*(x-4)**2

#Again Integrating Above equation,we get
#EI*y=C2+C1*x+17*3**-1*x**3-10*3**-1*(x-1)**3-5*12**-1*(x-1)**4+5*12**-1*(x-3)**4-5*(x-4)**3

#At
x=0
y=0
C2=0

#At 
x=5 #m
y=0
C1=(-17*3**-1*x**3+10*3**-1*(x-1)**3+5*12**-1*(x-1)**4-5*12**-1*(x-3)**4+5*(x-4)**3)*5**-1

#EI*y=C2+C1*x+17*3**-1*x**3-10*3**-1*(x-1)**3-5*12**-1*(x-1)**4+5*12**-1*(x-3)**4-5*(x-4)**3
C2=0
C1=-78
x=1
y_c=(-78*x+17*3**-1*x)*(X)**-1

#EI*y_D=C2+C1*x+17*3**-1*x**3-10*3**-1*(x-1)**3-5*12**-1*(x-1)**4
x=3
C1-78
C2=0
y_D=(C2+C1*x+17*3**-1*x**3-10*3**-1*(x-1)**3-5*12**-1*(x-1)**4)*(X**-1)

#EI*y_E=C2+C1*x+17*3**-1*x**3-10*3**-1*(x-1)**3-5*12**-1*(x-1)**4+5*12**-1*(x-3)**4
x=4
C1-78
C2=0
y_E=(C2+C1*x+17*3**-1*x**3-10*3**-1*(x-1)**3-5*12**-1*(x-1)**4+5*12**-1*(x-3)**4)*X**-1

#Result
print"Deflections at C",round(y_c,5),"mm"
print"Deflections at D",round(y_D,5),"mm"
print"Deflections at E",round(y_E,4),"mm"
Deflections at C -0.00603 mm
Deflections at D -0.00953 mm
Deflections at E -0.0061 mm

Example 5.5.15,Page No.209

In [8]:
import math
import matplotlib.pyplot as plt

#Initilization of Variables

E=200 #KN/mm**2 #Modulus of Elasticity
I=300*10**6 #mm
L_AB=L_BC=L_CD=L_DE=1 #m #Length of AB,BC,CD,DE respectively
F_A=20 #KN #Force at A
F_C=10 #KN #Force at C
w=30 #KN/m #u.d.l

#Let E*I=X
X=E*I*10**-6 #KN-2**2

#Calculations

#Let V_E be the reactions at E
V_E=F_A+F_C+w*(L_BC+L_CD) #KN 

#Taking Moment at distance x
#EI*(d**2x/dy**2)=M=-20*x-30*(x-1)**2*2**-1-10*(x-2)+30*(x-3)**2*2**-1

#Integrating above equation we get
#EI*(dy/dx)=C1-10*x**2-5*(x-1)**3-5*(x-2)**2+5*(x-3)**3

#Again Integrating above equation
#EI*y=C2+C1*x-10*x**3*3**-1-5*(x-1)**4*4**-1-5*(x-3)**4*4**-1-5*3*(x-2)**3

#At
#dy/dx=0
x=4 #m
C1=10*x**2+5*(x-1)**3+5*(x-2)**2-5*(x-3)**3

#AT
x=4
y=0
C2=-C1*4+10*x**3*3**-1+5*(x-1)**4*4**-1-5*(x-3)**4*4**-1+5*3**-1*(x-2)**3

#Max Deflection and Max slopes occurs at Free end in case of cantilever
y_max=y_A=C2*X**-1

#EI*(dy/dx)_max=C1
#Let (dy/dx)=Y
Y=C1*X**-1 #radian

#Now deflection at x=1 #m
C2=-913.333
C1=310
x=1
y_B=(C2+C1*x-10*x**3*3**-1)*X**-1

#Now Deflection at x=2 #m
C2=-913.333
C1=310
x=2 #m
y_C=(C2+C1*x-10*x**3*3**-1-5*(x-1)**4*4**-1)*X**-1

#Now Deflection at x=3 #m
C2=-913.333
C1=310
x=3 #m
y_D=(C2+C1*x-10*x**3*3**-1-5*(x-1)**4*4**-1-5*3**-1*(x-2)**3)*X**-1

y_E=0

#Result
print"Max Deflection for Beam",round(y_A,4),"mm"
print"Max Slope for beam",round(Y,5),"radians"

#Plotting the ELastic Curve

Y2=[y_E,y_D,y_C,y_B,y_A]
X2=[L_AB+L_BC+L_CD+L_DE,L_AB+L_BC+L_CD,L_AB+L_BC,L_AB,0]
Z2=[0,0,0,0,0]
plt.plot(X2,Y2,X2,Z2)
plt.xlabel("Length in mm")
plt.ylabel("Deflection in mm")
plt.show()
Max Deflection for Beam -0.0152 mm
Max Slope for beam 0.00517 radians

Example 5.5.16,Page No.211

In [9]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

L_BD=L_CB=L_AC=2 #m #Length of BD,CB,AC
F_C=40 #KN #Force at C
F_D=10 #KN Force at D
L=6 #m spna of beam

#EI is constant in this problem

#Calculations

#Let V_A & V_B be the reactions at A & B Respectively
#V_A+V_B=50

#Taking Moment at Pt A
V_B=(F_D*L+F_C*L_AC)*(L_AC+L_CB)**-1
V_A=50-V_B

#Now Taking Moment at distance x from A,M_x
#M_x=15*x-40*(x-2)+35*(x-4)
#EI*(d**2*y/dx**2)=15*x-40*(x-2)+35*(x-4)

#Now Integrating above equation we get
#EI*(dy/dx)=C1+7.5*x**2-20*(x-2)**2+17.5(x-4)**2

#Again Integrating above equation we get
#EI*y=C2+C1*x+2.5*x**2-20*3**-1*(x-2)**3+17.5*(x-4)**3*3**-1

#At
x=0
y=0
#we get
C2=0

#At
x=4 
y=0
#we get
C1=(2.5*4**3-20*3**-1*2**3)*4**-1

#Now Deflection at C
x=2
C1=-26.667
C2=0
y_C=C2+C1*x+2.5*x**3

#Now Deflection at D
C1=-21.667
C2=0
y_D=-26.667*6+2.5*6**3-20*3**-1*4**3+17.5*2**3*3**-1

#Result
print"Deflections Under Loads are:y_D",round(y_D,4)
print"                           :y_C",round(y_C,2)
Deflections Under Loads are:y_D -0.002
                           :y_C -33.33

Example 5.5.17,Page No.212

In [10]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

L_BC=L_EB=2 #m #Length of BC & EB
E=200*10**6 #KN/m**2 #Modulus of eLasticity
I=45*10**-6 #mm**4 #M.I
L_DE=3 #m #Length of DE
L_AD=1 #m #Length of AD
w=20 #KN/m #u.d.l
L=8 #m #span of beam
F_C=30 #KN #Force at C

#Calculations

#Let V_A & V_B be the reactions at A & B respectively
#V_A+V_B=90

#Taking Moment at A,M_A
V_B=(w*L_DE*(L_DE*2**-1+L_AD)+F_C*L)*(L_AD+L_DE+L_EB)**-1
V_A=90-V_B

#Taking Moment at distance x
#M_x=25*x-20*(x-1)**2*2**-1+20*(x-4)**2*2**-1+65*(x-6)

#Integrating above equation we get
#EI*(d**2*y/dx**2)=25*x-10*(x-1)**2+10*(x-4)**2+65*(x-6)

#again Integrating above equation we get
#EI*(dy/dx)=C1+25*x**2*2**-1-10*3**-1*(x-1)**3+10*3**-1*(x-4)**2+65*2**-1*(x-6)**2

#again Integrating above equation we get
#EI*y=C2+C1*x+25*6**-1*x**3-10*12**-1*(x-1)**4+10*12**-1*(x-4)**4+65*6**-1*(x-6)**3

x=0
y=0
#Sub these values in above equation,we get
C2=0

x=6 #m
y=0
C1=-(25*6**-1*6**3-10*12**-1*5**4+10*12**-1*2**4)*6**-1

#deflection at C is given by
x=8
y_c=(C2+C1*x+25*6**-1*x**3-10*12**-1*(x-1)**4+10*12**-1*(x-4)**4+65*6**-1*(x-6)**3)*(E*I)**-1

#Assuming y is max in the portion DE,then
#(dy/dx)=0 for that point

#0=-65.417+25*2**-1*x**2-10*3**-1*x(-1)**3

#Let F(x)=-65.417+25*2**-1*x**2-10*3**-1*x(-1)**3
#Let z=F(x)

#AT 
x=3
z=-65.417+25*2**-1*x**2-10*3**-1*(x-1)**3

x=2.5
z1=-65.417+25*2**-1*x**2-10*3**-1*(x-1)**3

x=2.4
z2=-65.417+25*2**-1*x**2-10*3**-1*(x-1)**3

#The assumption is max in portion DE
x=2.46
y_max=(-65.417*x+25*6**-1*x**3-10*12**-1*1.46**4)*(E*I)**-1

#Result
print"Deflection at free end C",round(y_c,4),"mm"
print"Max Deflection between A and B",round(y_max,4),"mm"
Deflection at free end C -0.0101 mm
Max Deflection between A and B -0.0114 mm

Example 5.5.18,Page No.213

In [11]:
import math
from math import sin, cos, tan, pi, radians

#Initilization of Variables

L_DB=L_AC=L_ED=2 #m #Length of DB & AC
L_CD=4 #m #Length of CD
L_CE=2 #m #Length of CE
F_A=40 #KN #Force at C
F_B=20 #KN #Force at A
E=200*10**6 #KN/mm**2 #Modulus of Elasticity
I=50*10**-6 #m**4 #M.I

#Calculations

#LEt V_C & V_D be the reactions at C &  D respectively
#V_C+V_D=60

#Taking Moment At D,M_D
V_C=-(-F_A*(L_AC+L_CE+L_ED)+F_B*L_DB)*L_CD**-1
V_D=60-V_C

#Now Taking Moment at Distance x from A,
#M_x=-40*x+50*(x-2)+10*(x-6)

#EI*(d**2*y/dx**2)=-40*x+50*(x-2)+10*(x-6)

#Now Integrating above Equation we get
#EI*(dy/dx)=C1+20*x**2-25*(x-2)+5*(x-6)**2

#Again Integrating above Equation we get
#EI*y=C2+C1*x-20*3**-1*x**3+25*3**-1*(x-2)**3+5*3**-1*(x-6)**3

#At
x=0
y=0
#C2+2*C1=-53.33    ...............(1)

#At 
x=6
y=0
#C2+6*C1=906.667    ...............(2)

#Subtracting Equation 1 from 2 we get
C1=853.333*4**-1
C2=53.333-2*C1
x=0
y_A=(C2+C1*x-20*3**-1*x**3+25*3**-1*(x-2)**3+5*3**-1*(x-6)**3)*(E*I)**-1

#Answer For y_A is incorrect in textbook

#At Mid-span
C1=853.333*4**-1
C2=53.333-2*C1
x=4
y_E=(C2+C1*x-20*3**-1*x**3+25*3**-1*(x-2)**3+5*3**-1*(x-6)**3)*(E*I)**-1

#Answer For y_E is incorrect in textbook

#At B
C1=853.333*4**-1
C2=53.333-2*C1
x=8
y_B=(C2+C1*x-20*3**-1*x**3+25*3**-1*(x-2)**3+5*3**-1*(x-6)**3)*(E*I)**-1


#Result
print"Deflection relative to the level of the supports:at End A",round(y_A,4),"mm"
print"                                                :at End B",round(y_B,4),"mm"
print"                                                :at Centre of CD",round(y_E,4),"mm"
Deflection relative to the level of the supports:at End A -0.08 mm
                                                :at End B -0.0267 mm
                                                :at Centre of CD 0.0107 mm