# Example 3.1 Resultant of Forces in a Plane¶

In :
import math
#Initilization of variables
W=1000 #N
Lab=1 #m
Lac=0.6 #m
theta=60 #degree #angle made by the beam with the horizontal
#Calculations
Q=(W*Lac*math.cos(theta*180/math.pi))/(Lab*math.cos(theta*180/math.pi)) #N # from eq'n 2
P=W-Q #N # from eq'n 1
#Results
print('The load taken by man P is %d N'%P)
print('The load taken by man Q is %d N'%Q)

The load taken by man P is 400 N
The load taken by man Q is 600 N


# Example 3.2 Resultant of forces in a Plane¶

In :
from __future__ import division
import math
#Initilization of variables
F=1000 #N
Lab=1 #m
Lbc=0.25 #m
Lac=1.25 #m
#Calculations
Rb=(F*Lac)/Lab #N # from eq'n 2
Ra=Rb-F #N # fom eq'n 1
#Results
print('The reaction (downwards)at support A is %d N'%Ra)
print('The reaction (upwards)at support B is %d N'%Rb)

The reaction (downwards)at support A is 250 N
The reaction (upwards)at support B is 1250 N


# Example 3.3 Resultant of Forces in a Plane¶

In :
from __future__ import division
import math
#Inilitization of variables
Lab=12 #m
Mc=40 #kN-m
Md=10 #kN-m
Me=20 #kN-m
Fe=20 #kN #force acting at point E
#Calculations
Xa=-(Fe) #kN #take sum Fx=0
Rb=(Md+Me-Mc)/Lab #N #take moment at A
Ya=-Rb #N #take sum Fy=0
#Results
print('The vertical reaction (upwards) at A is %f kN'%Ya)
print('The horizontal reaction (towards A) is %d kN'%Xa)
print('The reaction (downwards) at B is %f kN'%Rb)

The vertical reaction (upwards) at A is 0.833333 kN
The horizontal reaction (towards A) is -20.000000 kN
The reaction (downwards) at B is -0.833333 kN


# Example 3.5 Resultant of Forces in a Plane¶

In :
import numpy
#Initilization of variables
W=1000 #N
Lae=1.5 #m
La1=3.75 #m #distance of 1st 1000N load from pt A
La2=5 #m #distance of 2nd 1000N load from pt A
La3=6 #m # distance of 3rd 1000N load from pt A
# Calculations (part1)
#using matrix to solve the given eqn's 1 & 2
A=numpy.matrix('1 -2.5;3.5 -5')
B=numpy.matrix('1000;7250')
C=numpy.linalg.inv(A)*B
#Calculations (part 2)
#Consider combined F.B.D of beams AB,BC &CD. Take moment at A
Ra=C-Re-C+(3*W) #N #Taking sum of forces in Y direction
#Results
print('The reaction at F i.e Rf is %f N'%C)
print('The reaction at D i.e Rd is %f N'%C)
print('The reaction at pt E i.e Re is %f N'%Re)
print('The reaction at pt A i.e Ra is %f N'%Ra)

The reaction at F i.e Rf is 3500.000000 N
The reaction at D i.e Rd is 1000.000000 N
The reaction at pt E i.e Re is 833.333333 N
The reaction at pt A i.e Ra is -333.333333 N


# Example 3.6 Resultant of forces in a plane¶

In :
from __future__ import division
import math
# Initilization of variables
W=100 # N #force acting at D
AB=50 # N # weight of bar ab
CD=50 # N # weight of bar cd
# Calculations
# From  the derived expression the value of the angle is given as,
theta=math.degrees(math.atan(5/17.5)) #degrees
# Results
print('The angle theta is %f degrees'%theta)

The angle theta is 15.945396 degrees


# Example 3.7 Resultant of forces in a plane¶

In :
from __future__ import division
import math
#Initilization of variables
Ws=2 #kN #weight of scooter
Wd=0.5 #kN #weight of driver
Lab=1 #m
Led=0.8 #m
Leg=0.1 #m
#Calculations
Rc=((2*Leg)+(Wd*Led))/Lab #kN #take moment at E
Ra=(2+Wd-Rc)/2 # kN # as Ra=Rb,(Ra+Rb=2*Ra)
Rb=Ra # kN
#Results
print('The reaction at wheel A is %f kN'%Ra)
print('The reaction at wheel B is %f kN'%Rb)
print('The reaction at wheel C is %f kN'%Rc)

The reaction at wheel A is 0.950000 kN
The reaction at wheel B is 0.950000 kN
The reaction at wheel C is 0.600000 kN


# Example 3.8 Resultant of Forces in a Plane¶

In :
from __future__ import division
import math
#Initilization of variables
W1=15 #N #up
W2=60 #N #down
W3=10 #N #up
W4=25 #N #down
Lab=1.2 #m
Lac=0.4 #m
Lcd=0.3 #m
Ldb=0.5 #m
Leb=0.417 #m #Leb=Lab-x
#Calculations
#(a) A single force
Ry=W1-W2+W3-W4 #N #take sum Fy=0
# (b) Single force moment at A
Ma=(Ry*x) #N-m
# Single force moment at B
Mb=W2*Leb #N-m
#Results
print('The reaction for single force is %d N'%Ry)
print('The distance of Ry from A is %f m'%x)
print('The moment at A is %d N-m'%Ma)
print('The moment at B is %f N-m'%Mb)

The reaction for single force is -60 N
The distance of Ry from A is 0.783333 m
The moment at A is -47 N-m
The moment at B is 25.020000 N-m


# Example 3.9 Resultant of Forces in a Plane¶

In :
from __future__ import division
import math
#Initilization of variables
Ra=5000 #N
Ma=10000 #Nm
alpha=60 #degree #angle made by T1 with the pole
beta=45 #degree #angle made by T2 with the pole
theta=30 #degree #angle made by T3 with the pole
Lab=6 #m
Lac=1.5 #m
Lcb=4.5 #m
#Calculations
T3=Ma/(4.5*math.sin(theta*math.pi/180)) #N #take moment at B
# Now we use matrix to solve eqn's 1 & 2 simultaneously,
A=numpy.matrix('-0.707 0.8666;0.707 0.5')
B=numpy.matrix('2222.2;8848.8')
C=numpy.linalg.inv(A)*B
#Results
print('Tension in wire 1 i.e T1 is %f N \n'%C)
print('Tension in wire 2 i.e T2 is %f N \n'%C)
print('Tension in wire 3 i.e T3 is %f N \n'%T3)

Tension in wire 1 i.e T1 is 8101.126884 N

Tension in wire 2 i.e T2 is 6786.756093 N

Tension in wire 3 i.e T3 is 4444.444444 N



# Example 3.10 Distributed Force in a Plane¶

In :
from __future__ import division
import math
#Initilization of variables
w=2000 #N/m
Lab=3 #m
#Calculations
W=w*Lab/2 #N# Area under the curve
Lac=(2/3)*Lab #m#centroid of the triangular load system
Rb=(W*Lac)/Lab #N #sum of moment at A
Ra=W-Rb #N
#Results
print('The resultant of the distibuted load lies at %d m'%Lac)
print('The reaction at support A is %d N'%Ra)
print('The reaction at support B is %d N'%Rb)

The resultant of the distibuted load lies at 2 m
The reaction at support A is 1000 N
The reaction at support B is 2000 N


# Example 3.11 Distributed force in a plane¶

In :
from __future__ import division
import math
#Initiization of variables
w=1500 #N/m
x=4 #m
L=4 #m
#Calculations
k=x**2/w #m**3/N
#Solving the intergral we get
W=L**3/(3*k) #N
x_bar=L**4/(4*k*W) #m
#Result
print("The resultant is %d N and the line of action of the force is %d m"%(W,x_bar))

The resultant is 2000 N and the line of action of the force is 3 m


# Example 3.12 Distributed force in a plane¶

In :
from __future__ import division
import math
# Initilization of variables
w1=1.5 #kN/m # intensity of varying load at the starting point of the beam
w2=4.5 #kN/m # intensity of varying load at the end of the beam
l=6 #m # ength of the beam
# Calculations
# The varying load distribution is divided into a rectangle and a right angled triangle
W1=w1*l #kN # where W1 is the area of the load diagram(rectangle ABED)
x1=l/2 #m # centroid of the rectangular load system
W2=(w2-w1)*l/2 #kN # where W1 is the area of the load diagram(triangle DCE)
x2=2*l/3 #m # centroid of the triangular load system
W=W1+W2 #kN # W is the resultant
x=((W1*x1)+(W2*x2))/W #m # where x is the distance where the resultant lies
#Results
print('The resultant of the distributed load system is %d kN'%W)
print('The line of action of the resulting load is %f m'%x)

The resultant of the distributed load system is 18 kN
The line of action of the resulting load is 3.500000 m


# Example 3.13 Distributed forces in a plane¶

In :
from __future__ import division
import math
# Initiization of variables
W1=10 #kN #point load acting at D
W2=20 #kN # point load acting at C at an angle of 30 degree
W3=5 #kN/m # intensity of udl acting on span EB of 4m
W4=10 #kN/m # intensity of varying load acting on span BC of 3m
M=25 #kN-m # moment acting at E
theta=30 #degree # angle made by 20 kN load with the beam
Leb=4 #m
Laf=6 #m #distance between the resultant of W3 & point A
Lac=11 #m
Lag=9 #m #distance between the resultant of W4 and point A
Lbc=3 #m
Lab=8 #m
# Calculations
Xa=20*math.cos(theta*math.pi/180) #kN # sum Fx=0
Rb=((W1*Lad)+(-M)+(W3*Leb*Laf)+(W2*math.sin(theta*math.pi/180)*Lac)+((W4*Lbc*Lag)/2))/Lab #kN # taking moment at A
Ya=W1+(W2*math.sin(theta*math.pi/180))+(W3*Leb)+(W4*Lbc/2)-Rb #kN # sum Fy=0
Ra=math.sqrt(Xa**2+Ya**2) #kN # resultant at A
#Results
print('The horizontal reaction at A i.e Xa is %f kN'%Xa)
print('The vertical reaction at A i.e Ya is %d kN'%Ya)
print('The reaction at A i.e Ra is %d kN'%Ra)
print('The reaction at B i.e Rb is %d kN'%Rb)

The horizontal reaction at A i.e Xa is 17.320508 kN
The vertical reaction at A i.e Ya is 10 kN
The reaction at A i.e Ra is 20 kN
The reaction at B i.e Rb is 45 kN


# Example 3.14 Distributed forces in a plane¶

In :
from __future__ import division
import math
# Initilization of variables
h=4 #m #height of the dam wall
rho_w=1000 # kg/m**3 # density of water
rho_c=2400 # kg/m**3 # density of concrete
g=9.81 # m/s**2
# Calculations
P=(rho_w*g*h**2)/2 # The resultant force due to water pressure per unit length of the dam
x=(2/3)*h #m # distance at which the resutant of the triangular load acts
b=math.sqrt((2*P*h)/(3*h*rho_c*g)) # m # eq'n required to find the minimum width of the dam
# Results
print('The minimum width which is to be provided to the dam to prevent overturning about point B is %f m'%b)

The minimum width which is to be provided to the dam to prevent overturning about point B is 1.490712 m