Chapter 5 : Analysis and Design of Beams for Bending

SAMPLE PROBLEM 5.1, Page number 322

In [1]:
import math
from sympy import symbols

#Variable declaration
# Reactions
Rb=40                                                                             # Reaction at B(kN)
Rd=14                                                                             # Reaction at D(kN)

# Calculations
# Shear and Bending-Moment Diagrams
V1=-20                                                                            # Force(kN) 
M1=0                                                                              # Moment(kN.m)
V2=-20                                                                            # Force(kN) 
M2=-50                                                                            # Moment(kN.m) 
V3=26                                                                             # Force(kN) 
M3=-50                                                                            # Moment(kN.m)
V4=26                                                                             # Force(kN)
M4=28                                                                             # Moment(kN.m)
V5=-14                                                                            # Force(kN)  
M5=28                                                                             # Moment(kN.m)
V6=-14                                                                            # Force(kN)
M6=0                                                                              # Moment(kN.m)  
# Maximum Normal Stress
S=(1/6.0)*(0.080)*(pow(0.250,2))                                                    # Section modulus of the beam(m**3)
Mb=(50*pow(10,3))                                                                 # Moment(N.m)
sM=(Mb/S)/((pow(10,6)))                                                                         # Stress(Pa)

# Result
print ('Maximum normal stress in the beam = %lf MPa' %sM)
Maximum normal stress in the beam = 60.000000 MPa

SAMPLE PROBLEM 5.2, Page number 323

In [1]:
import math
from sympy import symbols

#Variable declaration
x=symbols('x')
V=symbols('V')
n=-1

# Calculation
#Equivalent Loading of Beam
#Case(a) Shear and Bending-Moment Diagrams
#From A to C
V=n*(3*x)                                                                   # Force(kips) 
M=n*3*(1/2)*x*x                                                             # Moment(kip.ft)
#From C to D
V=-24                                                                       # Force(kips) 
M=96-(24*x)                                                                 # Moment(kip.ft)
#From D to B
V=-34                                                                       # Force(kips)  
M=226-(34*x)                                                                # Moment(kip.ft)
#Case(b) Maximum Normal Stress to the Left and Right of Point D
#To the left of D
S=126                                                                       # Volume(in**3)  
M=2016                                                                      # Moment(kip.in)
Sm=(M)/S                                                                    # Stress(ksi)
#To the right of D
M=1776                                                                      # Moment(kip.in)
Sm2=(M/S)                                                                   # Stress(ksi)

# Result
print ('Maximum normal stress to the left of point D = %lf ksi' %Sm)
print ('Maximum normal stress to the right of point D = %lf ksi' %Sm2)
Maximum normal stress to the left of point D = 16.000000 ksi
Maximum normal stress to the right of point D = 14.095238 ksi

Example 5.03, Page number 331

In [5]:
import math
from sympy import symbols,integrate

#Variable declaration
Ra=symbols('Ra')                                                       # Variable declaration
Rb=symbols('Rb')                                                       # Variable declaration
w=symbols('w')                                                         # Variable declaration
l=symbols('l')                                                         # Variable declaration
x=symbols('x')                                                         # Variable declaration
Ma=0                                                                   # Bending moment 
n=-1

#Calculation         
Ra=(1/2.0)*(w)*(l)                                                       # Reaction at A
V=Ra+ n*integrate(w, (x, 0, x))                                        # Shear
M=Ma + integrate(V, (x, 0, x))                                         # Bending moment

# Result
print ('Maximum value of the bending moment :-')
print (M)
Maximum value of the bending moment :-
0.5*l*w*x - 0.5*w*x**2

SAMPLE PROBLEM 5.3, Page number 333

In [6]:
import math
from sympy import symbols,solve

#Variable declaration
Mb=symbols('Mb')                                                       # Variable declaration
Mc=symbols('Mc')                                                       # Variable declaration
Md=symbols('Md')                                                       # Variable declaration
Me=symbols('Me')                                                       # Variable declaration
#Reactions
D=((12)*(28) + (12)*(14) + (20)*(6))/24.0                                # Force(kips)
Ay=20+12-26+12                                                         # Force(kips)
Ax=0                                                                   # Force(kips)
#Shear Diagram
V=18-20                                                                # Force(kips)
#Bending-Moment Diagram
Ma=0                                                                   # Moment(kip.ft)
Mb=solve(Mb-108,Mb)                                                    # Moment(kip.ft)
Mc=solve(Mc-Mb[0]+16,Mc)                                               # Moment(kip.ft) 
Md=solve(Md-Mc[0]+16,Md)                                               # Moment(kip.ft)
Me=solve(Me-Md[0]+16,Me)                                               # Moment(kip.ft)
Vmax=18                                                                # Force(kips)
Mmax=108                                                               # Moment(kip.ft)

# Result
print ('Bending moment at A = %lf kip.ft' %Ma)
print ('Bending moment at B = %lf kip.ft' %Mb[0])
print ('Bending moment at C = %lf kip.ft' %Mc[0])
print ('Bending moment at D = %lf kip.ft' %Md[0])
print ('Bending moment at E = %lf kip.ft' %Me[0])
Bending moment at A = 0.000000 kip.ft
Bending moment at B = 108.000000 kip.ft
Bending moment at C = 92.000000 kip.ft
Bending moment at D = 76.000000 kip.ft
Bending moment at E = 60.000000 kip.ft

SAMPLE PROBLEM 5.4, Page number 334

In [7]:
import math
from sympy import symbols,solve

#Variable declaration
x=symbols('x')                                                           # Variable declaration
Ra=80                                                                    # Reaction at A(kN)
Rc=40                                                                    # Reaction at C(kN)
Va=80                                                                    # Force at A(kN)
Ma=0                                                                     # Moment at A                                                                     
S=1270

#Calculation         
#Case(a)
Vb=-120+80                                                               # Force at B(kN)
Vc=Vb                                                                    # Force at C(kN)   
x=solve(0-80+(20*x),x)                                                   
Md=Ma+160                                                                # Bending moment at point D(kN.m)
Mb=Md-40                                                                 # Bending moment at point B(kN.m)  
Mc=Mb-120                                                                # Bending moment at point C(kN.m)
sm=((Md*pow(10,3))/(S*pow(10,-6)*pow(10,6)*(1.0)))                                       # Maximum normal stress(Pa)

# Result
print ('Location of maximum normal stress = %lf kip.ft' %x[0])
print ('Magnitude of maximum normal stress = %lf kip.ft' %sm)
Location of maximum normal stress = 4.000000 kip.ft
Magnitude of maximum normal stress = 125.984252 kip.ft

SAMPLE PROBLEM 5.7, Page number 342

In [8]:
import math
from sympy import symbols

#Variable declaration
x=symbols('x')                                                        # Variable declaration 
Ra=80                                                                 
Rc=40                             
sall=1.75                                                             # Allowable stress(ksi)

#Calculation         
#Reactions.
B=((4.5*12)+(3.2*4))/8.0                                                # Reaction at B(kips)
Ay=7.7-8.35                                                           # Reaction at A(kips)
A=-Ay
#Shear Diagram
Va=Ay                                                                 # Force at A(kips) 
Vb=Va-((400*8)/1000.0)                                                  # Force at B(kips)   
#Determination of |M| max
Ma=Mc=0                                                               # Moment at C
Mmax=18                                                               # Maximum moment(kip.ft)

#Minimum Allowable Section Modulus
Smin=((Mmax*12)/sall)                                                 # Minimum allowable section modulus(in**3)


#Minimum Required Depth of Beam
h=math.sqrt((123.43*6)/3.5)                                           # Minimum required depth of the beam

# Result
print ('Minimum required depth of the beam = %lf in' %h)
Minimum required depth of the beam = 14.546281 in

SAMPLE PROBLEM 5.8, Page number 343

In [9]:
import math
from sympy import symbols

#Variable declaration
x=symbols('x')                                                          # Variable declaration
Ra=80                                                                   # Force on rod AC(lb)
Rc=40                                                                   # Diameter at the upper junction of rod ABC(in)
sall=160                                                                # Normal stress for the grade of steel(MPa) 
V=0

#Calculation         
#Reactions.
D=((50*4)+(60*1.5))/5.0                                                   # Reaction(kN)
Ay=60+50-58                                                             # Reaction(kN)  

#Shear Diagram
Va=Ay=52                                                                # Force at A(kN)
Vb=52-60                                                                # Force at B(kN)
x=(52/20.0)                                                               # Distance(m)

#Determination of |M| max
Mmax=Me=67.6                                                            # Maximum bending moment(kN.m)

#Minimum Allowable Section Modulus
Smin=(Mmax/sall)*(pow(10,-6))*(pow(10,9))                               # Minimum Allowable Section Modulus(mm**3) 

#Selection of Wide-Flange Shape
#W410*38.8   629
#W360*32.9   475
#W310*38.7   547
#W250*44.8   531
#W200*46.1   451

#Result
print('We select the lightest shape available, namely W360*32.9')
We select the lightest shape available, namely W360*32.9

Example 5.07, Page number 362

In [12]:
import math
from sympy import symbols,integrate

#Variable declaration
x=symbols('x')                                                            # Variable declaration
w=symbols('w')                                                            # Variable declaration 
b=symbols('b')                                                            # Variable declaration
Sall=symbols('Sall')                                                      # Variable declaration 
h=symbols('h')                                                            # Variable declaration
n=-1

#Calculation         
# Bending Moment
Vx=n*integrate(w,x)                                                       # Force 
Mx=n*integrate(w*x,x)                                                     # Moment


#Case(a) Shape Of Plate
h=(n*(6*(Mx))/(b*(Sall)))**(1/2.0)                                             # Relation between h and x

#Case(b) Shape Of Plate
h0=(((3*135)/(0.040*1000.0*72.0))**(1/2.0))*(800)                               # Maximum depth h0(mm)

#Result
print('The plate providing the most economical design is of triangular shape.')
print('Maximum depth h0  = %lf in' %h0)
The plate providing the most economical design is of triangular shape.
Maximum depth h0  = 300.000000 in

SAMPLE PROBLEM 5.11, Page number 363

In [15]:
import math
from sympy import symbols
#Variable declaration
x=symbols('x')                                                      # Variable declaration
M=symbols('M')                                                      # Variable declaration
b=symbols('b')                                                      # Variable declaration 
h=symbols('h')                                                      # Variable declaration
sall=symbols('sall')                                                # Variable declaration
Mab=4.80*x                                                          # Moment AB(kip.in) 
Mbc=4.80*x-(4.80)*(x-48)                                            # Moment BC(kip.in)


#Calculation         
#Number of Pairs of Planks
h=((6*M)/(b*sall))**(1/2.0)                                         # Eq 1
h=((6*230.4)/(4*2.40))**(1/2.0)                                     # Height(in)
No_Pl=3                                                             # Since the original beam has a depth of 4.50 in., the planks must provide an additional depth of 7.50 in. Recalling that each pair of planks is 2.50 in. thick

#Length of Planks
h=symbols('h')                                                      # Variable declaration
x=(((4)*(2.40))/(6.0*4.80))*(h**2)                                    # from Eq 1
x1=round(x.subs(h,4.50),2)                                          # Distance(in)
x2=round(x.subs(h,7.00),2)                                          # Distance(in)
x3=round(x.subs(h,9.50),2)                                          # Distance(in)
l1=144-2*x1                                                         # Length(in)
l2=round((144-2*x2),1)                                              # Length(in)
l3=round((144-2*x3),1)                                              # Length(in)

#Result
print('The required number of pair of planks = %lf' %No_Pl)
print('Length of plank 1  = %lf in' %l1)
print('Length of plank 2  = %lf in' %l2)
print('Length of plank 3  = %lf in' %l3)
The required number of pair of planks = 3.000000
Length of plank 1  = 130.500000 in
Length of plank 2  = 111.300000 in
Length of plank 3  = 83.800000 in

SAMPLE PROBLEM 5.12, Page number 364

In [17]:
import math
from sympy import symbols,solve,Function

#Variable declaration
#Bending Moment
x=symbols('x')                                                  # Variable declaration 
M=symbols('M')                                                  # Variable declaration
I=symbols('I')                                                  # Variable declaration
Ip=Function('Ip')                                               # Variable declaration
M=250*x                                                         # Bending moment   
S=(3.49*pow(10,-3))                                             # Section modulus(m**3)
sall=160*(pow(10,3))                                            # Stress all(kN/(m**2)) 
Ib=1190*(pow(10,6))                                             # the moment of inertia Ib of the two plates with respect to the neutral axis
d=678                                                           # Depth(mm)
t=16                                                            # Thickness(mm)

#Calculation         
#Case(a) Required Length of Plates
M=round(S*sall,1)                                               # Moment(kN.m)
x=solve(M-250*x,x)                                              # Distance(m)
x=round(x[0],3)                                                 # Rounding
l=round(8-(2*x),2)                                              # Length of plates(m) 


#Case(b) Required Width of Plates
M=250*4                                                         # Maximum bending moment(kN.m)
Ip=(((1/6.0)*b*(t**3)) + 2*b*t*(((1/2.0)*d)+((1/2)*t))**2)*(pow(10,3))# Moment of inertia
I=Ib+Ip                                                         # Moment of inertia of beam and plates 
c=(1/2.0)*d + t                                                   # Distance from neutral axis to surface(mm)
I=round((M*c)/(sall),3)                                         # Moment of inertia(mm**4)
I=I*(pow(10,9))                                                 # Conversion
b=round((I-Ib)/(3.854*(pow(10,6))),0)                           # Distance(mm)

#Result
print('Length of plates = %lf m' %l)
print('Width of plates = %lf mm' %b)
Length of plates = 3.530000 m
Width of plates = 267.000000 mm