Chapter 3:Shear Force And Bending Moment Diagrams in Statically Determinate Beams

Example 3.3.1,Page No.100

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

#Initilization of Variables

L_AC=L_CD=1 #m #Length of AC & CD
L_DB=1.5 #m #Lengh of DB
L=3.5 #m #Length of Beam
F_B=10 #KN #Force at pt B
F_C=F_D=20 #KN #Force at pt C & D

#Calculations

R_A=F_C+F_D+F_B #KN #Force at support A 

#Shear Force Calculations

#S.F At pt B
V_B1=0  #KN 
V_B2=F_B #KN

#S.F At pt D
V_D1=V_B2 #KN
V_D2=V_D1+F_D #KN

#S.F At pt C 
V_C1=V_D2 #KN
V_C2=V_D2+F_C #KN

#S.F At Pt A
V_A1=V_C2 #KN
V_A2=V_C2-R_A #KN

#Bending Moment Calculations

#B.M At Pt B
M_B=0 #KN.m

#B.M AT Pt D
M_D=F_B*L_DB #KN.m

#B.M At pt C
M_C=F_B*(L_DB+L_CD)+F_D*L_CD #KN.m

#B.M At pt A
M_A=F_B*L+F_D*(L_CD+L_AC)+F_C*L_AC

#Result
print "The Shear Force and Bending Moment Diagrams are the results"

#Plotting the Shear Force Diagram

X1=[0,0,L_DB,L_DB,L_CD+L_DB,L_CD+L_DB,L_CD+L_DB+L_AC,L_CD+L_DB+L_AC]
Y1=[V_B1,V_B2,V_D1,V_D2,V_C1,V_C2,V_A1,V_A2]
Z1=[0,0,0,0,0,0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in m")
plt.ylabel("Shear Force in kN")
plt.show()

#Plotting the Bendimg Moment Diagram

Y2=[M_B,M_D,M_C,M_A]
X2=[0,L_DB,L_DB+L_CD,L_AC+L_CD+L_DB]
Z2=[0,0,0,0]
plt.plot(X2,Y2,X2,Z2)
plt.xlabel("Length in m")
plt.ylabel("Bending Moment in kN.m")
plt.show()
The Shear Force and Bending Moment Diagrams are the results

Example 3.3.2,Page No.101

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

#Initilization of Variables

w1=10 #KN/m #u.d.L
F_D=20 #KN #Force at pt D
F_C=30 #KN #Force at pt C
L_DB=4 #m #Length of DB
L_CD=L_AC=2 #m #Length of AC & CD
L=8 #m #Length of Beam

#Calculations

#Let R_A And R_B be the Reactions at pt A and B 
#R_A+R_B=90 
#Now Taking moment at A,M_A we get
R_A=(w1*L_DB*(L_DB*2**-1)+F_D*L_DB+F_C*(L_CD+L_DB))*L**-1
R_B=90-R_A

#Shear Force Calculations

#S.F At Pt B
V_B1=0 #KN
V_B2=R_B #KN

#S.F At pt D
V_D1=R_B-w1*L_DB #KN
V_D2=V_D1-F_D #KN

#S.F at Pt C
V_C1=V_D2 #KN
V_C2=V_C1-F_C  

#S.F at PT A
V_A1=V_C2 #KN
V_A2=V_C2+R_A #KN

#Bending Moment Calculations

#B.M At Pt B
M_B=0 #KN.m

#B.M At Pt D
M_D=-R_B*L_DB+w1*L_DB*L_DB*2**-1 #KN.m

#B.M At PT C
M_C=-R_B*(L_DB+L_CD)+w1*L_DB*(L_DB*2**-1+L_CD)+F_D*L_CD #KN.m

#B.M At Pt A
M_A=-R_B*L+w1*L_DB*(L_DB*2**-1+L_CD+L_AC)+F_D*(L_CD+L_AC)+F_C*L_AC

#Result
print "The Shear Force and Bending Moment Diagrams are the results"

#Plotting the Shear Force Diagram

X1=[0,0,L_DB,L_DB,L_CD+L_DB,L_CD+L_DB,L_CD+L_DB+L_AC,L_CD+L_DB+L_AC]
Y1=[V_B1,V_B2,V_D1,V_D2,V_C1,V_C2,V_A1,V_A2]
Z1=[0,0,0,0,0,0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in m")
plt.ylabel("Shear Force in kN")
plt.show()

#Plotting the Bendimg Moment Diagram

Y2=[M_B,M_D,M_C,M_A]
X2=[0,L_DB,L_DB+L_CD,L_AC+L_CD+L_DB]
Z2=[0,0,0,0]
plt.plot(X2,Y2,X2,Z2)
plt.xlabel("Length in m")
plt.ylabel("Bending Moment in kN.m")
plt.show()
The Shear Force and Bending Moment Diagrams are the results

Example 3.3.3,Page No.102

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

#Initilization of Variables

L_DB=L_CD=1.5 #m #Length of DB & CD
L_AC=3 #m #Length of AC
F_D=80 #KN #Force at Pt D
w=40 #KN/m #u.v.l
L=6 #Length of beam

#Calculations

#Let R_A and R_B be the Reactions at Pt A & B respectively
#R_A+R_B=140 
#Taking moment at B we get,M_B
R_A=(1*2**-1*L_AC*w*(1*3**-1*L_AC+(L_CD+L_DB))+F_D*L_DB)*L**-1
R_B=140-R_A

#Shear Force Calculations

#S.F at B
V_B1=0 #KN
V_B2=R_B #KN

#S.F At D
V_D1=V_B2 #KN
V_D2=V_D1-F_D #KN

#S.F at C
V_C=V_D2 #KN

#S.F At A
V_A1=V_C-1*2**-1*w*L_AC #KN
V_A2=V_A1+R_A #KN

#Bending Moment Calculations

#B.M At B
M_B=0 #KN.m

#B.M At D
M_D=-R_B*L_DB

#B.M At C
M_C=F_D*L_CD-R_B*(L_DB+L_CD)

#B.M At A
M_A=F_D*(L_CD+L_AC)-R_B*L+1*2**-1*w*L_AC*(1*3**-1*L_AC)+R_A

#Result
print "The Shear Force and Bending Moment Diagrams are the results"

#Plotting the Shear Force Diagram

X1=[0,0,L_DB,L_DB,L_DB+L_CD,L_DB+L_CD+L_AC,L_DB+L_CD+L_AC]
Y1=[V_B1,V_B2,V_D1,V_D2,V_C,V_A1,V_A2]
Z1=[0,0,0,0,0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in m")
plt.ylabel("Shear Force in kN")
plt.show()

#Plotting the Bendimg Moment Diagram

X2=[0,L_DB,L_CD+L_DB,L_AC+L_CD+L_DB]
Y2=[M_B,M_D,M_C,M_A]
Z2=[0,0,0,0]
plt.plot(X2,Y2,X2,Z2)
plt.xlabel("Length in m")
plt.ylabel("Bending Moment in kN.m")
plt.show()
The Shear Force and Bending Moment Diagrams are the results

Example 3.3.4,Page No.104

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

#Initilization of Variables

M_D=120 #KN.m #B.M at Pt D
F_C=40 #KN #Force at Pt C
w1=20 #KN.m
L_DB=1.5 #m #Length of DB
L_CD=1.5 #m #Length of CD
L_AC=3 #m #Length of AC
L=6 #m #Length of Beam

#Calculations

#Let R_A And R_B be the Reactions at pt A and B 
#R_A+R_B=100
#Now Taking Moment At Pt B We get,M_B
R_A=-(M_D-F_C*(L_CD+L_DB)-w1*L_AC*(L_AC*2**-1+L_CD+L_DB))*L**-1
R_B=100-R_A

#Shear Force Calculations

#S.F At Pt B
V_B1=0
V_B2=R_B

#S.F at Pt D
V_D=V_B2 #KN

#S.F At Pt C
V_C1=V_D #KN
V_C2=V_C1-F_C

#S.F At Pt A
V_A1=V_C2-w1*L_AC #KN
V_A2=V_A1+R_A

#Bending Moment Calculations

#B.M At Pt B
M_B=0 #KN.m

#B.M At Pt D
M_D1=M_B-R_B*L_DB #KN.m
M_D2=M_B+M_D-R_B*L_DB

#B.M At Pt C
M_C=M_D-R_B*(L_CD+L_DB)

#B.M At Pt A
M_A=M_D-R_B*L+F_C*L_AC+w1*L_AC*L_AC*2**-1

#Result
print "The Shear Force and Bending Moment Diagrams are the results"

#Plotting the Shear Force Diagram

X1=[0,0,L_DB,L_DB+L_CD,L_DB+L_CD,L_DB+L_CD+L_AC,L_DB+L_CD+L_AC]
Y1=[V_B1,V_B2,V_D,V_C1,V_C2,V_A1,V_A2]
Z1=[0,0,0,0,0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in m")
plt.ylabel("Shear Force in kN")
plt.show()

#Plotting the Bendimg Moment Diagram

Y2=[M_B,M_D1,M_D2,M_C,M_A]
X2=[0,L_DB,L_DB,L_CD+L_DB,L_AC+L_CD+L_DB]
Z2=[0,0,0,0,0]
plt.plot(X2,Y2,X2,Z2)
plt.xlabel("Length in m")
plt.ylabel("Bending Moment in kN.m")
plt.show()
The Shear Force and Bending Moment Diagrams are the results

Example 3.3.5,Page No.105

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

#Initilization of Variables

F_C=20 #KN #Force at Pt C
F_D=40 #KN #Force at pt D
w=20 #KN.m #u.d.l 
L_AD=L_DB=2 #m #Length of AD & DB
L_BC=1 #m #Length of BC
L=5 #m #Length of Beam

#Calculations

#LEt R_A and R_B be the reactions at A & B respectively
#R_A+R_B=100 
#Now Taking Moment at B,M_B we get
R_A=-(F_C*L_BC-F_D*L_DB-w*L_AD*(L_AD*2**-1+L_DB))*(L_AD+L_DB)**-1
R_B=100-R_A

#Shear Force Calculations

#S.F At pt C
V_C1=0 #KN
V_C2=-F_C #KN

#S.F At PT B
V_B1=V_C2 #KN
V_B2=V_C2+R_B #KN

#S.F At Pt D
V_D1=V_B2 #KN
V_D2=V_D1-F_D #KN

#S.F At Pt A
V_A1=V_D2-w*L_AD #KN
V_A2=V_A1+R_A #KN

#Bending Moment Calculations

#B.M At Pt C
M_C=0 

#B.M At Pt B
M_B=F_C*L_BC

#B.M At Pt D
M_D=F_C*(L_BC+L_DB)-R_B*L_DB

#B.M At Pt A
M_A=F_C*L-R_B*(L_DB+L_AD)+F_D*L_AD+w*L_AD*L_AD*2**-1

#Result
print "The Shear Force and Bending Moment Diagrams are the results"

#Plotting the Shear Force Diagram

X1=[0,0,L_BC,L_BC,L_BC+L_DB,L_BC+L_DB,L_BC+L_DB+L_AD,L_BC+L_DB+L_AD]
Y1=[V_C1,V_C2,V_B1,V_B2,V_D1,V_D2,V_A1,V_A2]
Z1=[0,0,0,0,0,0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in m")
plt.ylabel("Shear Force in kN")
plt.show()

#Plotting the Bendimg Moment Diagram

Y2=[M_C,M_B,M_D,M_A]
X2=[0,L_BC,L_BC+L_DB,L_BC+L_DB+L_AD]
Z2=[0,0,0,0]
plt.plot(X2,Y2,X2,Z2)
plt.xlabel("Lenght in m")
plt.ylabel("Bending Moment in kN.m")
plt.show()
The Shear Force and Bending Moment Diagrams are the results

Example 3.3.6,Page No.107

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

#Initilization of Variables

L_BC=L_EB=L_AD=1 #m #Length of spans BC,ED,AD
L_ED=2 #m #Length of ED
w=60 #KNm #u.d.l
F_C=20 #KN Pt Load at C
L=5 #m #Span of beam 

#Calculations

#Let R_A & R_B be the reactions at A & B respectively
#R_A+R_B=80 
#Taking Moment At A,we get M_A
R_B=(F_C*L+1*2**-1*L_ED*w*(2*3**-1*L_ED+L_AD))*(L_AD+L_ED+L_EB)**-1
R_A=80-R_B

#Shear Force Calculations

#S.F At C
V_C1=0 #KN
V_C2=-F_C #KN

#S.F At B
V_B1=V_C2 #KN
V_B2=V_C2+R_B #KN 

#S.F aT E
V_E=V_B2 #KN

#S.F AT D
V_D=V_B2-1*2**-1*L_ED*w #KN

#S.F At A
V_A1=V_D #KN 
V_A2=V_D+R_A

#Bending Moment Calculations

#B.M at C
M_C=0 #KN.m

#B.M at B
M_B=F_C*L_BC #KN.m

#B.M at E
M_E=F_C*(L_EB+L_BC)-R_B*L_EB #KN.m

#B.M at D
M_D=F_C*(L_ED+L_EB+L_BC)-R_B*(L_ED+L_EB)+1*2**-1*L_ED*w*1*3**-1*L_ED #KN.m

#B.M  at A
M_A=1*2**-1*L_ED*w*(2*3**-1*L_ED+L_AD)-R_B*(L_AD+L_ED+L_EB)+F_C*L

#Result
print "The Shear Force and Bending Moment Diagrams are the results"

#Plotting the Shear Force Diagram

X1=[0,0,L_BC,L_BC,L_EB+L_BC,L_ED+L_EB+L_BC,L_AD+L_ED+L_EB+L_BC,L_ED+L_EB+L_BC+L_AD]
Y1=[V_C1,V_C2,V_B1,V_B2,V_E,V_D,V_A1,V_A2]
Z1=[0,0,0,0,0,0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in m")
plt.ylabel("Shear Force in kN")
plt.show()

#Plotting the Bendimg Moment Diagram

X2=[0,L_BC,L_BC+L_EB,L_EB+L_BC+L_ED,L_EB+L_BC+L_ED+L_AD]
Y2=[M_C,M_B,M_E,M_D,M_A]
Z2=[0,0,0,0,0]
plt.plot(X2,Y2,X2,Z2)
plt.xlabel("Lenght in m")
plt.ylabel("Bending Moment in kN.m")
plt.show()
The Shear Force and Bending Moment Diagrams are the results

Example 3.3.7,Page No.109

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

#Initilization of Variables

L_BC=1 #m #Length of BC
L_DB=2 #m #Length of DB
L_AD=4 #m #Length 0f AD
M_D=30 #KN.m #Moment at D
w=45 #KN/m #u.d.l
L=7 #m #Span of beam

#Calculations

#Let R_B & R_A be the Reactions at B & A respectively
#R_B+R_A=180+P  ............(1)

#Now Taking Moment about A,we get
#R_B=7*P+390   ...............(2)

#Since R_A & R_B Are Equal
#2*R_B=180+P  ...................(3)

#From equation 1 and 3 we get
#3*(180+P)=7P+390
#After simplifying Further above equation we get
P=150*4**-1 #KN
R_A=R_B=(180+P)*2**-1
F_C=P

#Shear Force Calculations

#S.F At C
V_C1=0 #KN
V_C2=-P #KN

#S.F At B
V_B1=V_C2 #KN
V_B2=V_C2+R_B #KN 

#S.F At D
V_D=V_B2 #KN

#S.F At A
V_A1=V_D-w*L_AD #KN
V_A2=V_A1+R_A #KN

#Bending Moment Calculations

#B.M at C
M_C=0 #KN.m 

#B.M at B
M_B=F_C*L_BC #KN.m

#B.M at D
M_D1=F_C*(L_BC+L_DB)-R_B*L_DB #KN.m
M_D2=M_D1+M_D

#B.M At A
M_A=w*L_AD*L_AD*2**-1+M_D-R_B*(L_AD+L_DB)+P*L

#Result
print "The Shear Force and Bending Moment Diagrams are the results"

#Plotting the Shear Force Diagram

X1=[0,0,L_BC,L_BC,L_DB+L_BC,L_DB+L_BC+L_AD,L_DB+L_BC+L_AD]
Y1=[V_C1,V_C2,V_B1,V_B2,V_D,V_A1,V_A2]
Z1=[0,0,0,0,0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in m")
plt.ylabel("Shear Force in kN")
plt.show()

#Plotting the Bendimg Moment Diagram

X2=[0,L_BC,L_DB+L_BC,L_DB+L_BC,L_AD+L_DB+L_BC]
Y2=[M_C,M_B,M_D1,M_D2,M_A]
Z2=[0,0,0,0,0]
plt.plot(X2,Y2,X2,Z2)
plt.xlabel("Lenght in m")
plt.ylabel("Bending Moment in kN.m")
plt.show()
The Shear Force and Bending Moment Diagrams are the results

Example 3.3.8,Page No.110

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

#Initilization of Variables

L=6 #m #Span Of beam
w=30 #KN/m #u.d.l

#Calculations

#Due to Symmetry
#Let R_B and R_C be the reactions at B & C Respectively
R_B=R_C=w*L*2**-1 #KN

#Let a be the overhang.The Max -ve moment occurs at the support and max +ve moment at middle of the beam
#Now Equating these two equations we get
#30*a*a*2**-1=90*(3-a)-w*L*2**-1*L*4**-1
#After simplifying we get an equation as
#a**2+6*a-9=0
x=1
y=6
z=-9

p=y**2-4*x*z

a1=(-y+p**0.5)*2**-1
a2=(-y-p**0.5)*2**-1

#Now Length cannot be negative,so taking a1 into Consideration

L_CD=L_AB=a1
L_BC=L-2*a1

#Shear Force Calculations

#S.F At D
V_D=0

#S.F At C
V_C1=V_D-w*L_CD #KN
V_C2=V_C1+R_C #KN

#S.F At B
V_B1=-w*(L_BC+L_CD)+R_C
V_B2=V_B1+R_B

#S.F At A
V_A=round(V_B2,2)-round(w*L_AB,2)

#Bending Moment Calculations

#B.M At D
M_D=0

#B.M At C
M_C=w*L_CD*L_CD*2**-1 #KN.m

#B.M At B
M_B=w*(L_BC+L_CD)*(L_BC+L_CD)*2**-1-R_C*L_BC*L_BC*2**-1

#B.M At A
X=w*L*L*2**-1
Y=-R_C*(L_AB+L_BC)-R_B*L_AB
M_A=X+Y

#Result
print "The Shear Force and Bending Moment Diagrams are the results"

#Plotting the Shear Force Diagram

X1=[0,L_CD,L_CD,L_CD+L_BC,L_CD+L_BC,L_CD+L_BC+L_AB]
Y1=[V_D,V_C1,V_C2,V_B1,V_B2,V_A]
Z1=[0,0,0,0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in m")
plt.ylabel("Shear Force in kN")
plt.show()

#Plotting the Bendimg Moment Diagram

X2=[0,L_CD,L_BC+L_CD,L_AB+L_BC+L_CD]
Y2=[M_D,M_C,M_B,M_A]
Z2=[0,0,0,0]
plt.plot(X2,Y2,X2,Z2)
plt.xlabel("Lenght in m")
plt.ylabel("Bending Moment in kN.m")
plt.show()
The Shear Force and Bending Moment Diagrams are the results

Example 3.3.9,Page No.112

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

#Initilization of Variables

F_F=6 #KN #Force at  F
w1=w2=w=3 #KN.m #u.d.l
M_D=24 #KN.m 
L_AB=L_CD=L_DE=L_EF=4 #m #Length of AB,CD,DE,EF
L_BC=2 #m #Length of BC
L=18 #m #Span of Beam

#Calculations

#LEt R_B and R_E be the Reactions at B & E respectively
#R_B+R_E=42

#Taking Moment At Pt B,M_B
R_E=(F_F*(L_BC+L_CD+L_DE+L_EF)+w*(L_CD+L_DE)*((L_CD+L_DE)*2**-1+L_BC)-w*L_AB*L_AB*2**-1-M_D)*(L_BC+L_CD+L_DE)**-1
R_B=42-R_E #KN

#Shear Force Calculations

#S.F aT F
V_F1=0 #KN 
V_F2=-F_F #KN

#S.F at E
V_E1=V_F2 #KN
V_E2=V_E1+R_E #KN

#S.F aT C
V_C=V_E2-w*(L_CD+L_DE) #KN

#S.F at B
V_B1=V_C #KN 
V_B2=V_C+R_B #KN

#S.F At A
V_A=V_B2-w*L_AB #KN

#Bending Moment Calculations

#B.M At F
M_F=0

#B.M At E
M_E=F_F*L_EF #KN.m

#B.M At D
M_D1=F_F*(L_DE+L_EF)-R_E*L_DE+w*L_DE*L_DE*2**-1 #KN.m
M_D2=M_D1-M_D

#B.M At C
M_C=F_F*(L_CD+L_DE+L_EF)-R_E*(L_CD+L_DE)+w*(L_CD+L_DE)*(L_CD+L_DE)*2**-1-M_D

#B.M At B
M_B=F_F*(L_BC+L_CD+L_DE+L_EF)-R_E*(L_BC+L_CD+L_DE)-M_D+w*(L_CD+L_DE)*((L_CD+L_DE)*2**-1+L_BC)

#B.M At A
M_A=w*L_AB*L_AB*2**-1-R_B*L_AB+w*(L_CD+L_DE)*((L_CD+L_DE)*2**-1+L_BC+L_AB)-R_E*(L_AB+L_BC+L_CD+L_DE)+F_F*L-M_D

#Result
print "The Shear Force and Bending Moment Diagrams are the results"

#Plotting the Shear Force Diagram

X1=[0,0,L_EF,L_EF,L_EF+L_DE+L_CD,L_EF+L_DE+L_CD+L_BC,L_EF+L_DE+L_CD+L_BC,L_EF+L_DE+L_CD+L_BC+L_AB]
Y1=[V_F1,V_F2,V_E1,V_E2,V_C,V_B1,V_B2,V_A]
Z1=[0,0,0,0,0,0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in m")
plt.ylabel("Shear Force in kN")
plt.show()

#Plotting the Bendimg Moment Diagram

X2=[0,L_EF,L_DE+L_EF,L_DE+L_EF,L_CD+L_DE+L_EF,L_CD+L_DE+L_EF+L_BC,L_CD+L_DE+L_EF+L_BC+L_AB]
Y2=[M_F,M_E,M_D1,M_D2,M_C,M_B,M_A]
Z2=[0,0,0,0,0,0,0]
plt.plot(X2,Y2,X2,Z2)
plt.xlabel("Lenght in m")
plt.ylabel("Bending Moment in kN.m")
plt.show()
The Shear Force and Bending Moment Diagrams are the results

Example 3.3.10,Page No.114

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

#Initilization of Variables

L_DC=L_BA=2 #m #Length of BA & DC
L_CB=1 #m #Length of CB
F_A=10 #KN #Force at pt A
F_B=20 #KN #Force at pt B
w=4 #KN.m #u.d.l
L=5 #m #Length of beam

#Calculations

#Let R_D be the reactions at Pt D
R_D=F_B+F_A+w*L_DC #KN

#Shear Force Calculations

#S.F at Pt A
V_A1=0 #KN
V_A2=F_A #KN

#S.F At Pt B
V_B1=V_A2
V_B2=F_B+F_A

#S.F at Pt C
V_C=F_B+F_A #KN 

#S.F At Pt D
V_D1=V_B2+w*L_DC
V_D2=F_B+F_A+w*L_DC-R_D

#B.M At Pt A
M_A=0

#B.M At Pt B
M_B=F_A*L_BA

#B.M at Pt C
M_C=F_B*L_CB+F_A*(L_BA+L_CB) #KN

#B.M At Pt D
M_D1=F_A*L+F_B*(L_CB+L_DC)+w*L_DC*L_DC*2**-1
M_D2=(F_A*L+F_B*(L_CB+L_DC)+w*L_DC*L_DC*2**-1)-M_D1

#Result
print "The Shear Force and Bending Moment Diagrams are the results"

#Plotting the Shear Force Diagram

X1=[0,0,L_BA,L_BA,L_BA+L_CB,L_BA+L_CB+L_DC,L_BA+L_CB+L_DC]
Y1=[V_A1,V_A2,V_B1,V_B2,V_C,V_D1,V_D2]
Z1=[0,0,0,0,0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in m")
plt.ylabel("Shear Force in kN")
plt.show()

#Plotting the Bendimg Moment Diagram

Y2=[M_A,M_B,M_C,M_D1,M_D2]
X2=[0,L_BA,L_CB+L_BA,L_CB+L_BA+L_DC,L_CB+L_BA+L_DC]
Z2=[0,0,0,0,0]
plt.plot(X2,Y2,X2,Z2)
plt.xlabel("Lenght in m")
plt.ylabel("Bending Moment in kN.m")
plt.show()
The Shear Force and Bending Moment Diagrams are the results

Example 3.3.11,Page No.115

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

#Initilization of Variables

w=20 #KN/m #u.v.l
F_C=40 #KN #Force at Pt C
M_D=40 #KN.m #Moment at pt D
L_AB=3 #m #Length of AB
L_BC=1 #m #Length of BC
L_CD=L_DE=2 #m #Length of CD & DE
L=8 #8 #Length of beam

#Calculations

#Let R_A & R_E be the Reactions at A & E respectively
#R_A+R_E=70

#Taking Moments At Pt A we get,M_A
R_E=(F_C*(L_AB+L_BC)+1*2**-1*L_AB*w*2+40)*L**-1
R_A=70-R_E

#shear Force Calculations

#S.F At Pt E
V_E1=0
V_E2=R_E #KN

#S.F aT pt D
V_D=V_E2

#S.F At PT C
V_C1=V_D
V_C2=V_D-F_C #KN

#S.F At Pt A
V_A1=V_C2-(1*2**-1*w*L_AB)
V_A2=V_A1+R_A

#Bending Moment Calculations

#B.M At Pt E
M_E=0

#B.M At Pt D
M_D1=M_E-R_E*L_DE
M_D2=M_D1+M_D

#B.M At Pt C
M_C=-R_E*(L_DE+L_CD)+M_D

#B.M At Pt B
M_B=-R_E*(L_DE+L_CD+L_BC)+M_D+F_C*L_BC

#B.M At Pt A
M_A=-R_E*L+M_D+(1*2**-1*L_AB*w*2)+F_C*(L_BC+L_AB)

#Result
print "The Shear Force and Bending Moment Diagrams are the results"

#Plotting the Shear Force Diagram

X1=[0,0,L_DE,L_CD+L_DE,L_CD+L_DE,L_CD+L_DE+L_AB,L_CD+L_DE+L_AB]
Y1=[V_E1,V_E2,V_D,V_C1,V_C2,V_A1,V_A2]
Z1=[0,0,0,0,0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in m")
plt.ylabel("Shear Force in kN")
plt.show()

#Plotting the Bendimg Moment Diagram

Y2=[M_E,M_D1,M_D2,M_C,M_B,M_A]
X2=[0,L_DE,L_DE,L_CD+L_DE,L_DE+L_CD+L_BC,L_AB+L_BC+L_CD+L_DE]
Z2=[0,0,0,0,0,0]
plt.plot(X2,Y2)
plt.xlabel("Lenght in m")
plt.ylabel("Bending Moment in kN.m")
plt.show()
The Shear Force and Bending Moment Diagrams are the results

Example 3.3.12,Page No.116

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

#Initilization of Variables

F_G=10 #KN #Force at Pt G
F_B=F_E=15 #KN #Force at Pt B & E
w=20 #KN/m #U.d.L
L_FG=L_EF=L_DE=L_CD=L_BC=L_AB=1 #m #Lengths of FG,EF,DE,CD,BC,AB respectively
L=6 #m #Length of beam

#Calculations

#LEt R_F & R_A be the Reactions at E & A respectively
#R_F+R_A=60

#Taking Moment At Pt A,M_A
R_F=(F_G*L+F_E*(L_AB+L_BC+L_CD+L_DE)+w*L_CD*(L_AB+L_BC+L_CD*2**-1)+F_B*L_AB)*(L_AB+L_BC+L_CD+L_DE+L_EF)**-1
R_A=60-R_F

#Shear Force Calculations

#S.F At G
V_G1=0 #KN 
V_G2=F_G #KN

#S.F At F
V_F1=V_G2 #KN
V_F2=V_F1-R_F

#S.F At E
V_E1=V_F2 #KN
V_E2=V_F2+F_E

#S.F At D
V_D=V_E2

#S.F At C
V_C=V_E2+w*L_CD

#S.F At B
V_B1=V_C
V_B2=V_B1+F_B

#S.F At A
V_A1=V_B2
V_A2=V_B2-R_A

#Bending Moment Calculations

#B.M At Pt G
M_G=0

#B.M At F
M_F=F_G*L_FG 

#B.M At E
M_E=F_G*(L_FG+L_EF)-R_F*L_EF

#B.M At D
M_D=F_G*(L_FG+L_EF+L_DE)-R_F*(L_EF+L_DE)+F_E*L_DE

#B.M At C
M_C=F_G*(L_FG+L_EF+L_DE+L_CD)-R_F*(L_EF+L_DE+L_CD)+F_E*(L_DE+L_CD)+w*L_CD*L_CD*2**-1

#B.M At B
M_B=F_G*(L_FG+L_EF+L_DE+L_CD+L_BC)-R_F*(L_EF+L_DE+L_CD+L_BC)+F_E*(L_DE+L_CD+L_BC)+w*L_CD*(L_CD*2**-1+L_BC)

#B.M At A
M_A=F_G*L-R_F*(L_EF+L_DE+L_CD+L_BC+L_AB)+F_E*(L_DE+L_CD+L_BC+L_AB)+F_B*L_AB+w*L_CD*(L_CD*2**-1+L_BC+L_AB)

#Result
print "The Shear Force and Bending Moment Diagrams are the results"

#Plotting the Shear Force Diagram

X1=[0,0,L_FG,L_FG,L_FG+L_EF,L_FG+L_EF,L_FG+L_EF+L_DE,L_FG+L_EF+L_DE+L_CD,L_FG+L_EF+L_DE+L_CD+L_BC,L_FG+L_EF+L_DE+L_CD+L_BC,L_FG+L_EF+L_DE+L_CD+L_BC+L_AB,L_FG+L_EF+L_DE+L_CD+L_BC+L_AB]
Y1=[V_G1,V_G2,V_F1,V_F2,V_E1,V_E2,V_D,V_C,V_B1,V_B2,V_A1,V_A2]
Z1=[0,0,0,0,0,0,0,0,0,0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in m")
plt.ylabel("Shear Force in kN")
plt.show()

#Plotting the Bendimg Moment Diagram

X2=[0,L_FG,L_EF+L_FG,L_EF+L_FG+L_DE,L_EF+L_FG+L_DE+L_CD,L_EF+L_FG+L_DE+L_CD+L_BC,L_EF+L_FG+L_DE+L_CD+L_BC+L_AB]
Y2=[M_G,M_F,M_E,M_D,M_C,M_B,M_A]
Z2=[0,0,0,0,0,0,0]
plt.plot(X2,Y2)
plt.xlabel("Lenght in m")
plt.ylabel("Bending Moment in kN.m")
plt.show()
The Shear Force and Bending Moment Diagrams are the results

Example 3.3.13,Page No.117

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

#Initilization of Variables
L_AB=L_BC=L_CD=L_DE=L_EF=1 #m #LEngth of AB,BC,CD,DE,EF respectively
M_A=50 #KN/m #Moment at A
w=5 #KN/m #u.v.l
F_D=10 #KN
w2=5 #KN/m #u.d.l

#Calculations

#Let R_B & R_E be the Reactions at B and E respectively
#R_B+R_E=20

#Taking Moment At Pt B,M_B
R_E=(w2*L_EF*(L_EF*2**-1+L_DE+L_CD+L_BC)+w*L_BC*2**-1*2*3**-1+50+F_D*(L_BC+L_CD))*3**-1
R_B=17.5-R_E #KN

#Shear Force Calculations

#S.F At F
V_F=0

#S.F aT E
V_E1=-w2*L_EF #KN
V_E2=V_E1+R_E

#S.F at D
V_D1=R_E-w2*L_EF #KN
V_D2=V_D1-F_D #KN

#S.F At C
V_C=V_D2

#S.F aT B
V_B1=-L_BC*w*2**-1-F_D+R_E-w2*L_EF
V_B2=V_B1+R_B

#Bending Moment Calculations

#B.M at F
M_F=0 #KN.m

#B.M At E
M_E=w2*L_EF*L_EF*2**-1 #KN.m

#B.M at D
M_D=-R_E*L_DE+w2*L_EF*(L_EF*2**-1+L_DE) #KN.m

#B.M At C
M_C=F_D*L_CD*R_E*(L_CD+L_DE)+w2*L_EF*(L_EF*2**-1+L_DE+L_CD) #KN.m

#B.M At B
M_B=F_D*(L_CD+L_BC)-R_E*(L_BC+L_CD+L_DE)+w2*L_EF*(L_EF*2**-1+L_BC+L_CD+L_DE)+1*2**-1*L_BC*w*2*3**-1

#B.M At A
M_A1=w*L_EF*(L_EF*2**-1+L_AB+L_BC+L_CD+L_DE)-R_E*(L_AB+L_BC+L_CD+L_DE)+F_D*(L_AB+L_BC+L_CD)+1*2**-1*L_BC*w*(2*3**-1*L_BC+L_AB)-R_B*L_AB
M_A2=M_A1+M_A

#Result
print "The Shear Force and Bending Moment Diagrams are the results"

#Plotting the Shear Force Diagram

X1=[0,L_EF,L_EF,L_DE+L_EF,L_DE+L_EF,L_CD+L_DE+L_EF,L_CD+L_DE+L_EF+L_BC,L_CD+L_DE+L_EF+L_BC]
Y1=[V_F,V_E1,V_E2,V_D1,V_D2,V_C,V_B1,V_B2]
Z1=[0,0,0,0,0,0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length x in m")
plt.ylabel("Shear Force in kN")
plt.show()

#Plotting the Bendimg Moment Diagram

X2=[0,L_EF,L_DE+L_EF,L_CD+L_DE+L_EF,L_CD+L_DE+L_EF+L_BC,L_CD+L_DE+L_EF+L_BC+L_AB,L_CD+L_DE+L_EF+L_BC+L_AB]
Y2=[M_F,M_E,M_D,M_C,M_B,M_A1,M_A2]
Z2=[0,0,0,0,0,0,0]
plt.plot(X2,Y2,X2,Z2)
plt.xlabel("Length in m")
plt.ylabel("Bending Moment in kN.m")
plt.show()
The Shear Force and Bending Moment Diagrams are the results