# Chapter 4:Stresses in Beams¶

## Example 4.4.1,Page no.130¶

In [1]:
import math

#Initilization of Variables

L=5000 #mm #Length of Beam
a=2000 #mm #Length of start of beam to Pt Load
b=3000 #mm #Length of Pt load to end of beam
A=150*250 #m**2 #Area of beam
b=150 #mm #Width of beam
d=250 #mm #Depth of beam
sigma=10#N/mm**2 #stress
l=2000 #m #Load applied from one end

#Calculations

#Moment of Inertia
I=1*12**-1*b*d**3 #m**4

#Distance from N.A to end
y_max=d*2**-1 #m

#Section Modulus
Z=1*6**-1*b*d**2 #mm**3

#Moment Carrying Capacity
M=sigma*Z #N-mm

#Let w be the Intensity of the Load in N/m,then Max moment
#M_max=w*L**2*8**-1 #N-mm
#After substituting values and further simplifying we get
#M_max=w*25*100*8**-1

#EQuating it to moment carrying capacity,we get max intensity load
w=M*(25*1000)**-1*8*10**-3

#Part-2

#Let P be the concentrated load,then max moment occurs under the load and its value
#M1=P*a*b*L**-1 #N-mm

#Equting it to moment carrying capacity we get
P=M*1200**-1*10**-3 #N

#Result
print"Max Intensity of u.d.l it can carry",round(w,3),"KN-m"
print"MAx concentrated Load P apllied at 2 m from one end is",round(P,3),"KN"

Max Intensity of u.d.l it can carry 5.0 KN-m
MAx concentrated Load P apllied at 2 m from one end is 13.021 KN


## Example 4.4.2,Page no.131¶

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

#Initilization of Variables

D=70 #mm #External Diameter
t=8 #mm #Thickness of pipe
L=2500 #mm #span
sigma=150 #N/mm**2 #stress

#Calculations

#Internal Diameter
d=D-2*t #mm

#M.I Of Pipe
I=pi*64**-1*(D**4-d**4) #mm**4

y_max=D*2**-1 #mm
Z=I*(y_max)**-1 #mm**3

#Moment Carrying capacity
M=sigma*Z #N*mm

#Max moment int the beam occurs at the mid-span and is equal to
#m=P*L*4**-1

#Equating Max moment to moment carrying capacity we get,
#M=P*2.5*L*4**-1
#After substituting and simplifying we get
P=4*M*(L)**-1*10**-3 #N

#Result
print"Max concentrated load that can be applied at the centre of span is",round(P,3),"KN"

Max concentrated load that can be applied at the centre of span is 5.22 KN


## Example 4.4.3,Page no.132¶

In [32]:
import math
import numpy as np

#Initilization of Variables

#Plate dimensions
b1=240 #mm
d1=12 #mm

#Flange Dimensions
b2=180 #mm
d2=10 #mm

#web
b3=8 #mm
d3=480 #mm

D=500 #mm
sigma=150 #N/mm**2 #Stress
L=3000 #mm #span

#Calculations

#C.G of plate
y_bar1=(b1*d1*(d1*2**-1+D))*(b1*d1)**-1 #m

#C.G of top flange
y_bar2=(b2*d2*(D-d2*2**-1))*(b2*d2)**-1 #m

#C.G of web
y_bar3=(b3*d3*(d3*2**-1+d2))*(b3*d3)**-1 #m

#C.G of bottom flange
y_bar4=(b2*d2*(d2*2**-1))*(b2*d2)**-1 #m

#C.G of Body
Y=((b1*d1*(d1*2**-1+D))+(b2*d2*(D-d2*2**-1))+(b3*d3*(d3*2**-1+d2))+(b2*d2*(d2*2**-1)))*((b1*d1)+(b2*d2)+(b3*d3)+(b2*d2))**-1

#Moment of Inertia
I1=(1*12**-1*b1*d1**3+b1*d1*(d1*2**-1-round(Y,3)+D)**2) #mm**4
I2=(1*12**-1*b2*d2**3+b2*d2*(D-d2*2**-1-round(Y,3))**2)  #mm**4
I3=(1*12**-1*b3*d3**3+b3*d3*(d3*2**-1-round(Y,3))**2) #mm**4
I4=(1*12**-1*b2*d2**3+b2*d2*(round(Y,3)-d2*2**-1)**2) #mm**4
I=(I1+I2+I3+I4)*10**-8 #mm*4

#Moment of resistance
MR=sigma*I*Y**-1

#MaX mOMENT PRODUCED after simplifying we get
#MM=4.5*w

#After equating Moment of resistance to max moment we get
w=198.769*4.5**-1 #KN-m

#Result
print"Moment of Resistance is",round(MR,2),"KN-mm"
print"Load the section can carry is",round(w,3),"KN/m"

Moment of Resistance is 2.02 KN-mm
Load the section can carry is 44.171 KN/m


## Example 4.4.4,Page no.134¶

In [5]:
import math

#Initilization of Variables

#Flange (Top)
b1=80 #mm #Width
t1=40 #mm #Thickness

#Flange (Bottom)
b2=160 #mm #width
t2=40 #mm #Thickness

#web
d=120 #mm #Depth
t3=20 #mm #Thickness

D=200 #mm #Overall Depth
sigma1=30 #N/mm**2 #Tensile stress
sigma2=90 #N/mm**2 #Compressive stress
L=6000 #mm #Span

#Calculations

#Distance of centroid from bottom fibre
y_bar=(b1*t1*(D-t1*2**-1)+d*t3*(d*2**-1+t2)+b2*t2*t2*2**-1)*(b1*t1+d*t3+b2*t2)**-1 #mm

#Moment of Inertia
I=1*12**-1*b1*t1**3+b1*t1*(D-t1*2**-1-round(y_bar,2))**2+1*12**-1*t3*d**3+t3*d*(d*2**-1+t2-round(y_bar,2))**2+1*12**-1*b2*t2**3+b2*t2*(t2*2**-1-round(y_bar,2))**2

#Extreme fibre distance of top and bottom fibres are y_t and y_c respectively

y_t=y_bar #mm
y_c=D-y_bar #mm

#Moment carrying capacity considering Tensile strength
M1=sigma1*I*y_t**-1*10**-6  #KN-m

#Moment carrying capacity considering compressive strength
M2=sigma2*I*y_c**-1*10**-6  #KN-m

#Max Bending moment in simply supported beam 6 m due to u.d.l
#M_max=w*L*10**-3*8**-1
#After simplifying further we get
#M_max=4.5*w

#Now Equating it to Moment carrying capacity, we get load carrying capacity
w=M1*4.5**-1 #KN/m

#Result

Max Uniformly Distributed Load is 5.096 KN/m


## Example 4.4.5,Page no.136¶

In [26]:
import math
from scipy.integrate import *

#Initilization of Variables

#Flanges
b=200 #mm #Width
t=25 #mm #Thickness

D1=500 #mm #Overall Depth
t2=20 #mm #Thickness of web

d=450 #mm #Depth of web

#Calculations

#Consider,Element of Thickness "y" at Distance "dy" from N.A
#Let Bending stress "sigma_max"

#Stress on the element
#sigma=y*(D*2**-1)*sigma_max   ..............(1)

#Area of Element
#A=b*dy       .................................(2)

#Force on Element
#F=y*250**-1*sigma_max*b*dy

#Let M be the Moment of resistance
#M=y*250**-1*sigma_max*b*dy*y

#Moment of Resistance of top flange after simplification we gget
#M.R=2258333.3*f

#M.I of I section
I=1*12**-1*(b*D1**3-180*d**3)*10**-8

#Moment acting on section
#After simplifying we get
#M=2865833.3*f

#Percentage moment resistance
M1=2258333.3*2865833.3**-1*100

#Percentage moment resisted by web
M2=100-M1

#Result
print"Percentage Moment resisted by Flanges",round(M1,2),"%"
print"Percentage Moment resisted by web",round(M2,2),"%"

Percentage Moment resisted by Flanges 78.8 %
Percentage Moment resisted by web 21.2 %


## Example 4.4.6,Page no.137¶

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

#Initilization of Variables

#Flanges
b1=200 #mm #Width
t1=10 #mm #Thickness

#Web
d=380 #mm #Depth
t2=8 #mm #Thickness

D=400 #mm #Overall Depth
sigma=150 #N/mm**2

#Calculations

#Area
A=b1*t1+d*t2+b1*t1 #mm**2

#Moment of Inertia
I=1*12**-1*(b1*D**3-(b1-t2)*d**3)

#Bending Moment
M=sigma*I*(D*2**-1)**-1

#Square Section

#Let 'a' be the side
a=A**0.5

#Moment of Resistance of this section
M1=1*6**-1*a*a**2*sigma

X=M*M1**-1

#Rectangular section
#Let 'a' be the side and depth be 2*a

a=(A*2**-1)**0.5

#Moment of Rectangular secction
M2=1*6**-1*a*(2*a)**2*sigma

X2=M*M2**-1

#Circular section
#A=pi*d1**2*4**-1

d1=(A*4*pi**-1)**0.5

#Moment of circular section
M3=pi*32**-1*d1**3*sigma

X3=M*M3**-1

#Result
print"Moment of resistance of beam section",round(M,2),"mm"
print"Moment of resistance of square section",round(X,2),"mm"
print"Moment of resistance of rectangular section",round(X2,2),"mm"
print"Moment of resistance of circular section",round(X3,2),"mm"

Moment of resistance of beam section 141536000.0 mm
Moment of resistance of square section 9.58 mm
Moment of resistance of rectangular section 6.78 mm
Moment of resistance of circular section 11.33 mm


## Example 4.4.7,Page no.139¶

In [8]:
import math

#Initilization of Variables

F=12 #KN #Force at End of beam
L=2 #m #span

#Square section
b=d=200 #mm #Width and depth of beam

#Rectangular section
b1=150 #mm #Width
d1=300 #mm #Depth

#Calculations

#Max bending Moment
M=F*L*10**6 #N-mm

#M=sigma*b*d**2
sigma=M*6*(b*d**2)**-1 #N/mm**2

#Let W be the central concentrated Load in simply supported beam of span L1=3 m
#MAx Moment
#M1=W*L1*4**-1
#After Further simplifying we get
#M1=0.75*10**6 #N-mm

#The section has  a moment of resistance
M1=sigma*1*6**-1*b1*d1**2

#Equating it to moment of resistance we get max load W
#0.75*10**6*W=M1
#After Further simplifying we get
W=M1*(0.75*10**6)**-1

#Result
print"Minimum Concentrated Load required to brek the beam",round(W,2),"KN"

Minimum Concentrated Load required to brek the beam 54.0 KN


## Example 4.4.8,Page no.140¶

In [9]:
import math

#Initilization of Variables

L=3 #m #span
sigma_t=35 #N/mm**2 #Permissible stress in tension
sigma_c=90 #N/mm**2 #Permissible stress in compression

#Flanges
t=30 #mm #Thickness
d=250 #mm #Depth

#Web
t2=25 #mm #Thickness
b=600 #mm #Width

#Calculations

#Let y_bar be the Distance of N.A from Extreme Fibres
y_bar=(t*d*d*2**-1*2+(b-2*t)*t2*t2*2**-1)*(t*d*2+(b-2*t)*t2)**-1

#Moment of Inertia
I=(1*12**-1*t*d**3+t*d*(d*2**-1-y_bar)**2)*2+1*12**-1*(b-2*t)*t2**3+(b-2*t)*t2*(t2*2**-1-y_bar)**2

#Part-1

#If web is in Tension
y_t=y_bar #mm
y_c=d-y_bar #mm

#Moment carrying caryying capacity From consideration of tensile stress
M=sigma_t*I*(y_bar)**-1 #N-mm

#Moment carrying caryying capacity From consideration of compressive stress
M1=sigma_c*I*(y_c)**-1 #N-mm

#If w KN/m is u.d.l in beam,Max bending moment
#M=wl**2*8**-1
#After further simplifyng we get
#M=1.125*w*10**6 N-mm
w=M*(1.125*10**6)**-1 #KN

#Part-2

#If web is in compression
y_t2=178.299 #mm
y_c2=71.71 #mm

#Moment carrying caryying capacity From consideration of tensile stress
M2=sigma_t*I*(y_t2)**-1 #N-mm

#Moment carrying caryying capacity From consideration of compressive stress
M3=sigma_c*I*(y_c2)**-1 #N-mm

#Moment of resistance is M2

#Equating it to bending moment we get
#M2=1.125*10**6*w2
#After further simplifyng we get
w2=M2*(1.125*10**6)**-1

#Result
print"Uniformly Distributed Load carrying capacity if:web is in Tension",round(w,2),"KN"
print"                                               :web is in compression",round(w2,3),"KN"

Uniformly Distributed Load carrying capacity if:web is in Tension 73.21 KN
:web is in compression 29.446 KN


## Example 4.4.9,Page no.141¶

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

#Initilization of Variables

b1=200 #mm #Width at base
b2=100 #mm #Width at top

L=8 #m Length

#Calculations

#Consider a section at y metres from top

#At this section diameter d is
#d=b2+y*L**-1*(b1-b2)
#After Further simplifying we get
#d=b2+12.5*y #mm

#Moment of Inertia
#I=pi*64**-1*d**4

#Section Modulus
#Z=pi*32**-1*(b1+12.5*y)**3

#Moment
#M=5*10**5*y #N-mm

#Let sigma be the fibre stress at this section then
#M=sigma*Z
#After sub values in above equation and further simplifying we get
#sigma=5*10**5*32*pi**-1*y*((b2+12.5*y)**3)**-1

#For sigma to be Max,d(sigma)*(dy)**-1=0
#16*10**6*pi**-1*((b2+12.5*y)**-3+y*(-3)*(b2+12.5*y)**-4*12.5)
#After Further simplifying we get
#b2+12.5*y=37.5*y
#After Further simplifying we get
y=b2*25**-1 #m

#Stress at this section
sigma=5*10**5*32*pi**-1*y*((b2+12.5*y)**3)**-1

#Result
print"Stress at Extreme Fibre is max",round(y,2),"m"
print"Max stress is",round(sigma,2),"N/mm**2"

Stress at Extreme Fibre is max 4.0 m
Max stress is 6.04 N/mm**2


## Example 4.4.10,Page no.143¶

In [11]:
import math

#Initilization of Variables
H=10 #mm #Height
A1=160*160 #mm**2 #area of square section at bottom
L1=160 #mm #Length of square section at bottom
b1=160 #mm #width of square section at bottom
A2=80*80 #mm**2 #area of square section at top
L2=80 #mm #Length of square section at top
b2=80 #mm #Width of square section at top
P=100 #N #Pull

#Calculations

#Consider a section at distance y from top.
#Let the side of square bar be 'a'
#a=L2+y*(H)**-1*(b1-b2)
#After further simplifying we get
#a=L2+8*y

#Moment of Inertia
#I=2*1*12**-1*a*(2)**0.5*(a*((2)**0.5)**-1)**3
#After further simplifying we get
#I=a**4*12**-1

#Section Modulus
#Z=a**4*(12*a*(2)**0.5)**-1
#After further simplifying we get
#Z=2**0.5*a**3*(12)**-1 #mm**3

#Bending moment at this section=100*y N-mm
#M=100*10**3*y #N-mm

#But
#M=sigma*Z
#After sub values in above equation we get
#sigma=M*Z**-1
#After further simplifying we get
#sigma=1200*10**3*(2**0.5)**-1*y*((80+80*y)**3)**-1 .......(1)

#For Max stress df*(dy)**-1=0
#After taking Derivative of above equation we get
#df*(dy)**-1=1200*10**3*(2**0.5)**-1*((80+8*y)**-3+y(-3)*(80+8*y)**-4*8)
#After further simplifying we get
y=80*16**-1 #m

#Max stress at this level is
sigma=1200*10**3*(2**0.5)**-1*y*((80+8*y)**3)**-1

#Result
print"Max Bending stress is Developed at",round(y,3),"m"
print"Value of Max Bending stress is",round(sigma,3),"N/mm**2"

Max Bending stress is Developed at 5.0 m
Value of Max Bending stress is 2.455 N/mm**2


## Example 4.4.12,Page no.147¶

In [12]:
import math

#Initilization of Variables

b=200 #mm #Width of timber
d=400 #mm #Depth of timber
t=6 #mm #Thickness
b2=200 #mm #width of steel plate
t2=20 #mm #Thickness of steel plate
M=40*10**6 #KN-mm #Moment
#Let E_s*E_t**-1=X
X=20 #Ratio of Modulus of steel to timber

#Calculations

#let y_bar be the Distance of centroidfrom bottom most fibre
y_bar=(b*d*(b+t)+t2*b2*t*t*2**-1)*(b*d+t2*b2*t)**-1 #mm

#Moment of Inertia
I=1*12**-1*b*d**3+b*d*(b+t-round(y_bar,3))**2+1*12**-1*t2*b2*t**3+b2*t2*t*(round(y_bar,3)-t*2**-1)**2

#distance of the top fibre from N-A
y_1=d+t-y_bar #mm

#Distance of the junction of timber and steel From N-A
y_2=y_bar-t #mm

#Stress in Timber at the top
Y=M*I**-1*y_1 #N/mm**2

#Stress in the Timber at the junction point
Z=M*I**-1*y_2

#Coressponding stress in steel at the junction point
Z2=X*Z #N/mm**2

#The stress in Extreme steel fibre
Z3=X*M*I**-1*y_bar

#Result
print"Stress in Extreme steel Fibre",round(Z3,2),"N/mm**2"

Stress in Extreme steel Fibre 69.67 N/mm**2


## Example 4.4.13,Page no.149¶

In [13]:
import math

#Initilization of Variables

#Timber size
b=150 #mm #Width
d=300 #mm #Depth

t=6 #mm #Thickness of steel plate
l=6 #m #Span

#E_s*E_t**-1=20
#m=E_s*E_t**-1
m=20
sigma_timber=8 #N/mm**2  #Stress in timber
sigma_steel=150 #N/mm**2 #Stress in steel plate

#Let m*t=Y
Y=m*t #mm
L=(2*t+b)*m #mm #Width of flitched beam

#Calculations

#Due to  synnetry cenroid,the neutral axis is half the depth
I=(1*12**-1*L*t**3+L*t*(b+t*2**-1)**2)*2+1*12**-1*(Y+b+Y)*d**3 #mm**4

y_max1=150 #mm #For timber
y_max2=156 #mm #For steel

#stress in steel
f_t1=1*m**-1*sigma_steel #N/mm**2

#Moment of resistance
M=f_t1*(I*y_max2**-1)

w=8*M*(l**2)**-1*10**-6 #KN/m

#Result

Load beam can carry is 19.1 KN/m


## Example 4.4.14,Page no.151¶

In [14]:
import math

#Initilization of Variables

L=6000 #mm #Span of beam
sigma=8 #N/mm**2 #Stress
b=200 #mm #Width of section
d=300 #mm #Depth of section

#Calculations

#let x be the distance from left side of beam

#Bending moment
#M=W*2**-1*x #Nmm   .......(1)

#But M=sigma*Z   ..........(2)

#Equating equation 1 and 2 we get
#W*2**-1*x=sigma*Z    ............(3)

#Section Modulus
#Z=1*6*b*d**2   ...............(4)

#Equating equation 3 and 4 we get
#b*d**2=3*W*x*sigma**-1 .............(5)

#Beam of uniform strength of constant depth
#b=3*W*x*(sigma*d**2)

#When x=0
b=0

#When x=L*2**-1
b2=3*W*L*(2*sigma*d**2)**-1 #mm

#Beam with constant width of 200 mm

#We have
#d=(3*W*x*(sigma*d)**-1)**0.5
#thus depth varies as (x)**0.5

#when x=0
d1=0

#when x=L*2**-1
d2=(3*W*L*(2*sigma*200)**-1)**0.5 #mm

#Result
print"Cross section of rectangular beam is:",round(b2,2),"mm"
print"                                    :",round(d2,2),"mm"

Cross section of rectangular beam is: 250.0 mm
: 335.41 mm


## Example 4.4.15,Page no.154¶

In [15]:
import math

#Initilization of Variables

L=800 #mm #Span
n=5 #number of leaves
b=60 #mm #Width
t=10 #mm #thickness
sigma=250 #N/mm**2 #Stress

#Calculations

#section Modulus
Z=n*6**-1*b*t**2 #mm**3

#from the relation
#sigma*Z=M   ...................(1)
#M=P*L*4**-1
#sub values of M in equation 1 we get

#Length of Leaves
L1=0.2*L #mm
L2=0.4*L #mm
L3=0.6*L #mm
L4=0.8*L #mm
L5=L #mm

#Result
print"Max Load it can take is",round(P,2),"KN"
print"Length of leaves:L1",round(L1,2),"mm"
print"                :L2",round(L2,2),"mm"

Max Load it can take is 6.25 KN
Length of leaves:L1 160.0 mm
:L2 320.0 mm


## Example 4.4.16,Page no.161¶

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

#Initilization of Variables

F=20*10**3 #N #Shear Force

#Tee section

#Flange
b=100 #mm #Width
t=12 #mm #Thickness

#Web
d=88 #mm #Depth
t2=12 #mm #Thicknes

D=100 #mm #Overall Depth

#Calculations

#Distance of C.G from Top Fibre
y=(b*t*t*2**-1+t2*d*(d*2**-1+t))*(b*t+d*t2)**-1 #mm

#Moment Of Inertia
I=1*12**-1*b*t**3+b*t*(y-t*2**-1)**2+1*12**-1*t2*d**3+t2*d*(t+d*2**-1-y)**2 #mm**4

#shear stress at bottom Flange

#Area above this level
A=b*t #mm**2

#C.G of this area from N-A
y2=y-t*2**-1

#Stress at bottom of flange
sigma=F*A*y2*(b*I)**-1 #N/mm**2

#sigma2 at same level but in web where width is 12 mm
sigma2=F*A*y2*(t2*I)**-1 #N/mm**2

#To find shear stress at N-A
X=t*b*(y-t*2**-1)+t2*(y-t2)*(y-t2)*2**-1 #mm**3

sigma3=F*X*(t2*I)**-1 #N/mm**2

#Shear stress at top and bottom fibre is zero
#sigma4 and sigma5 are top and bottom fibre shear stress
sigma4=sigma5=0

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

#Plotting the Shear Force Diagram

X1=[0,t,t,y,D]
Y1=[sigma4,sigma,sigma2,sigma3,sigma5]
Z1=[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()

The Shear Force and Bending Moment Diagrams are the results


## Example 4.4.17,Page no.163¶

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

#Initilization of Variables

F=40*10**3 #N #shear Force

#I-section

#Flanges
b=80 #mm #Width of flange
t=20 #mm #Thickness

#Web
d=200 #mm #Depth
t2=20 #mm #Thickness

#Flange-2
b2=160 #mm #Width
t3=20 #mm #Thickness

D=240 #mm #Overall Depth

#Calculations

#Distance of N-A from Top Fibre
y=(b*t*t*2**-1+d*t2*(t+d*2**-1)+b2*t3*(t+d+t3*2**-1))*(b*t+d*t2+b2*t3)**-1 #mm

#Moment of Inertia
I=1*12**-1*b*t**3+b*t*(y-(t*2**-1))**2+1*12**-1*t2*d**3+t2*d*(y-(t+d*2**-1))**2+1*12**-1*b2*t3**3+t3*b2*((d+t+t3*2**-1)-y)**2 #mm**4

#Shear stress bottom of flange
sigma=F*b*t*(y-t*2**-1)*(b*I)**-1 #N/mm**2

#At same Level but in web
sigma2=F*b*t*(y-t*2**-1)*(t2*I)**-1 #N/mm**2

#for shear stress at N.A
X=b*t*(y-t*2**-1)+t2*(y-t)*(y-t)*2**-1 #mm**3
sigma3=F*X*(t2*I)**-1 #N/mm**2

#Shear stress at bottom of web

X=b2*t3*((D-y)-t3*2**-1) #mm**3

#Stress at bottom of web
sigma4=F*X*(t2*I)**-1 #N/mm**2

#Stress at Lower flange
sigma5=F*X*(b2*I)**-1 #N/mm**2

#Result
print "The Shear Force Diagram is the result"

#Plotting the Shear Force Diagram

X1=[0,20,20,140,220,220,240]
Y1=[0,sigma,sigma2,sigma3,sigma4,sigma5,0]
Z1=[0,0,0,0,0,0,0]
plt.plot(X1,Y1,X1,Z1)
plt.xlabel("Length in mm")
plt.ylabel("Shear Force in N")
plt.show()

The Shear Force Diagram is the result


## Example 4.4.18,Page no.164¶

In [18]:
import math

#Initilization of Variables

F=30*10**3 #N #Shear Force

#Channel Section
d=400 #mm #Depth of web
t=10 #mm #THickness of web
t2=15 #mm #Thickness of flange
b=100 #mm #Width of flange

#Rectangular Welded section
b2=80 #mm #Width
d2=60 #mm #Depth

#Calculations

#Distance of Centroid From Top Fibre
y=(d*t*t*2**-1+2*t2*(b-t)*((b-t)*2**-1+10)+d2*b2*(d2*2**-1+t))*(d*t+2*t2*(b-t)+d2*b2)**-1 #mm

#Moment Of Inertia of the section about N-A
I=1*12**-1*d*t**3+d*t*(y-t*2**-1)**2+2*(1*12**-1*t2*(b-t)**3+t2*(b-t)*(((b-t)*2**-1+t)-y)**2)+1*12**-1*d2**3*b2+d2*b2*(d2*2**-1+t-y)**2

#Shear stress at level of weld
sigma=F*d*t*(y-t*2**-1)*((b2+t2+t2)*I)**-1 #N/mm**2

#Max Shear Stress occurs at Neutral Axis
X=d*t*(y-t*2**-1)+2*t2*(y-t)*(y-t)*2**-1+b2*(y-t)*(y-t)*2**-1

sigma_max=F*X*((b+t)*I)**-1

#Result
print"Shear stress in the weld is",round(sigma,2),"N/mm**2"
print"Max shear stress is",round(sigma_max,2),"N/mm**2"

Shear stress in the weld is 3.62 N/mm**2
Max shear stress is 4.48 N/mm**2


## Example 4.4.19,Page no.165¶

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

#Initilization of Variables

#Wooden Section
b=300 #mm #Width
d=300 #mm #Depth

D=100 #mm #Diameter of Bore
F=10*10**3 #N #Shear Force

#Calculations

#Moment Of Inertia Of Section
I=1*12**-1*b*d**3-pi*64**-1*D**4

#Shear stress at crown of circle
sigma=F*b*D*(d*2**-1-D*2**-1)*(b*I)**-1

#Let a*y_bar=X
X=b*d*2**-1*d*4**-1-pi*8**-1*D**2*4*D*2**-1*(3*pi)**-1 #mm**3

#Shear Stress at Neutral Axis
sigma2=F*X*((b-D)*I)**-1 #N/mm**2

#Result
print"Shearing Stress at Crown of Bore",round(sigma,3),"N/mm**2"
print"Shear Stress at Neutral Axis",round(sigma2,3),"N/mm**2"

Shearing Stress at Crown of Bore 0.149 N/mm**2
Shear Stress at Neutral Axis 0.246 N/mm**2


## Example 4.4.20,Page no.166¶

In [20]:
import math

#Initilization of Variables

#flanges
b=200 #mm #width
t1=25 #mm #Thickness

#web
d=450 #mm #Depth
t2=20 #mm #thickness

D=500 #mm #Total Depth of section

#Calculations

#Moment Of Inertia of the section about N-A
I=1*12**-1*b*D**3-1*12**-1*(b-t2)*d**3 #mm**4

#Consider an element in the web at distance y from y from N-A
#Depth of web section=225-y

#C.G From N-A
#y2=y+(((D*2**-1-t)-y)*2**-1)

#ay_bar for section at y
#Let ay_bar be X
#X=X1 be of Flange + X2 be of web above y
#X=b*t1*(D*2**-1-t1*2**-1)+t2*(d-t1)*(d-t1+y)*2**-1
#After Sub values and Further simplifying we get
#X=1187500+10*(225**2-y**2)

#Shear stress at y
#sigma_y=F*(X)*(t2*I)**-1

#Shear Force resisted by the Element
#F1=F*X*t2*dy*(t2*I)**-1

#Shear stress resisted by web
#sigma=2*F*I**-1*(X)*dy

#After Integrating above equation and further simplifying we get
#sigma=0.9578*F

sigma=0.9578*100

#Result
print"Shear Resisted by web",round(sigma,2),"%"

Shear Resisted by web 95.78 %


## Example 4.4.21,Page no.167¶

In [21]:
import math

#Initilization of Variables

#Wooden Beam

b=150 #mm #width
d=250 #mm #Depth

L=5000 #mm #span
m=11.2 #N/mm**2 #Max Bending stress
sigma=0.7 #N/mm**2 #Max shear stress

#Calculations

#Let 'a' be the distance from left support
#Max shear force
#F=R_A=W*(L-a)*L**-1

#Max Moment
#M=W*(L-a)*a*L**-1

#But M=sigma*Z
#W*(L-a)*a*L**-1=m*1*6**-1*b*d**2   .....................(1)

#In Rectangular Section MAx stress is 1.5 times Avg shear stress
F=sigma*b*d*1.5**-1

#W*(L-a)*L**-1=F                     .....................(2)

#Dividing Equation 1 nad 2 we get
a=m*6**-1*b*d**2*1.5*(sigma*b*d)**-1

#Sub above value in equation 2 we get
W=(L-a)**-1*L*F*10**-3 #KN

#Result
print"Distance from Left support is",round(a,2),"mm"

Load is 21.87 KN
Distance from Left support is 1000.0 mm


## Example 4.4.22,Page no.168¶

In [22]:
import math

#Initilization of Variables

L=1000 #mm #span

#Rectangular Section

b=200 #mm #width
d=400 #mm #depth

sigma=1.5 #N/mm**2 #Shear stress

#Calculations

#Let AB be the cantilever beam subjected to load W KN at free end

#MAx shear Force
#F=W*10**3 #KN

#Since Max shear stress in Rectangular section
#sigma_max=1.5*F*A**-1
#After sub values and further simplifyng we get
W=1.5*b*d*(1.5*1000)**-1 #KN

#Moment at fixwed end
M=W*1 #KN-m
y_max=d*2**-1 #mm

#M.I
I=1*12**-1*b*d**3 #mm**3

#MAx Stress
sigma_max=M*10**6*I**-1*y_max

#Result

Concentrated Load is 15.0 N/mm**2


## Example 4.4.24,Page no.170¶

In [23]:
import math

#Initilization of Variables

L=4000 #mm #span

#Rectangular Cross-section
b=100 #mm #Width
d=200 #mm #Thickness

F_per=10 #N/mm**2 #Max Bending stress
q_max=0.6 #N/mm**2 #Shear stress

#Calculations

#If the Load W is in KN/m

#Max shear Force
#F=w*l*2**-1 #KN
#After substituting values and further simplifying we get
#M=2*w #KN-m

#Max Load from Consideration of moment
#M=1*6**-1*b*d**2*F_per
#After substituting values and further simplifying we get
w=(1*6**-1*b*d**2*F_per)*(2*10**6)**-1 #KN/m

#Max Load from Consideration of shear stress
#q_max=1.5*F*(b*d)**-1 #N
#After substituting values and further simplifying we get
F=q_max*(1.5)*b*d #N

#If w is Max Load in KN/m,then
#2*w*1000=8000
#After Rearranging and Further simplifying we get
w2=8000*(2*1000)**-1 #KN/m

#Result
print"Uniformly Distributed Load Beam can carry is",round(w,2),"KN/m"

Uniformly Distributed Load Beam can carry is 3.33 KN/m