# Chapter 6:Analysis Of Perfect Frames¶

## Example 6.1,Page No.124¶

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

#Initilization of Variables

F_A=20 #KN #Force at A
theta=60 #Degrees
alpha=30 #Degrees
L_BC=5 #m

#Calculations

#Length AB
L_AB=L_BC*cos(theta*pi*180**-1) #m

#Distance of line of action
x=1.25 #m

#Reactions
R_C=F_A*x*L_BC**-1 #KN
R_B=F_A-R_C #KN

#Force in AB & BC
F_AB=R_B*(sin(theta*pi*180**-1))**-1 #KN
F_BC=F_AB*cos(theta*pi*180**-1) #KN

#Force in AC & BC
F_AC=R_C*(sin(alpha*pi*180**-1))**-1 #KN

#Result
print"FOrces in members are:F_AB",round(F_AB,2),"KN"
print"                     :F_BC",round(F_BC,2),"KN"
print"                     :F_AC",round(F_AC,2),"KN"
print"                     :F_BC",round(F_BC,2),"KN"

FOrces in members are:F_AB 17.32 KN
:F_BC 8.66 KN
:F_AC 10.0 KN
:F_BC 8.66 KN


## Example 6.2,Page No.125¶

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

#Initilization of Variables

F_D=1 #KN
L_AB=7.5 #m #Length AB
theta=60 #degrees
alpha=30 #Degrees

#Calculations

#REactions
R_A=F_D-R_B #KN

#Forces

F_AC=R_A*(sin(alpha*pi*180**-1))**-1 #KN
F_BC=R_B*(sin(alpha*pi*180**-1))**-1 #KN
F_BD=F_BC*(cos(alpha*pi*180**-1)) #KN
F_CD=1*(sin(theta*pi*180**-1))**-1

#Result
print"forces in members are:F_AC",round(F_AC,2),"KN"
print"                     :F_BC",round(F_BC,2),"KN"
print"                     :F_BD",round(F_BD,2),"KN"
print"                     :F_CD",round(F_CD,2),"KN"

forces in members are:F_AC 0.67 KN
:F_BC 1.33 KN
:F_BD 1.15 KN
:F_CD 1.15 KN


## Example 6.3,Page No.127¶

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

#Initilization of Variables

L_AB=5 #m #Length AB
theta=60 #Degrees
alpha=30 #Degrees
F_D=10 #KN
F_E=12 #KN

#Calculations

#Length

#Distance of line of action
x=1.25 #m

L_BE=L_BC*cos(alpha*pi*180**-1) #m

#line of action
x2=1.875 #m
x3=3.125

#Reactions
R_B=(F_D*x+F_E*x3)*L_AB**-1 #KN
R_A=(F_D+F_E)-R_B #KN

#Forces

F_BE=F_D*(sin(alpha*pi*180**-1))**-1 #KN
F_BC=F_BE*cos(alpha*pi*180**-1) #KN

#After simplifying joint C we get
#F_CD=-F_CE
#after further simplifying
F_CE=20.784*2**-1 #KN
F_CD=F_CE #KN
F_ED=F_BE-(F_E*cos(theta*pi*180**-1)) #KN

#Result
print"forces in members are:F_AC",round(F_AC,2),"KN"
print"                     :F_BC",round(F_BC,2),"KN"
print"                     :F_BE",round(F_BE,2),"KN"
print"                     :F_CD",round(F_CD,2),"KN"
print"                     :F_CE",round(F_CE,2),"KN"
print"                     :F_ED",round(F_ED,2),"KN"

forces in members are:F_AC 6.93 KN
:F_BC 17.32 KN
:F_BE 20.0 KN
:F_CD 10.39 KN
:F_CE 10.39 KN
:F_ED 14.0 KN


## Example 6.4,Page No.129¶

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

#Initilization of Variables

L_GH=L_AG=L_HB=3 #m
L_FB=L_EH=L_DG=L_AC=4 #m
L_AB=9 #m
F_G=9 #KN
F_H=12 #KN

#Calculations

#Reactions
R_B=(F_G*L_AG+F_H*(L_AG+L_GH))*L_AB**-1 #KN
R_A=(F_G+F_H)-R_B #KN

#Joint C
#After resolving and simplifying we get
#cos(theta)=4*5**-1
#sin(theta)=3*4**-1
#Let cos(theta)=X
X=4*5**-1
Y=3*5**-1

#Forces

F_AC=R_A #KN
F_CG=R_A*X**-1 #KN
F_CD=F_CG*Y #KN
F_GD=-(F_G-F_CG*X)
F_GH=F_CG*Y
F_DH=1*X**-1 #KN
F_DE=F_GH+F_DH*Y
F_EF=F_DE #KN
F_HF=(F_H-F_GD)*X**-1

#Result
print"Forces in members are:F_AC",round(F_AC,2),"KN"
print"                     :F_CG",round(F_CG,2),"KN"
print"                     :F_CD",round(F_CD,2),"KN"
print"                     :F_GD",round(F_GD,2),"KN"
print"                     :F_GH",round(F_GH,2),"KN"
print"                     :F_DH",round(F_DH,2),"KN"
print"                     :F_DE",round(F_DE,2),"KN"
print"                     :F_EF",round(F_EF,2),"KN"
print"                     :F_HF",round(F_HF,2),"KN"

Forces in members are:F_AC 10.0 KN
:F_CG 12.5 KN
:F_CD 7.5 KN
:F_GD 1.0 KN
:F_GH 7.5 KN
:F_DH 1.25 KN
:F_DE 8.25 KN
:F_EF 8.25 KN
:F_HF 13.75 KN


## Example 6.5,Page No.133¶

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

#Initilization of Variables

F_D=1000 #N
L_AE=L_EF=L_FH=L_BH=1 #m
L_CH=2.25 #m
L=4 #m

#Calculations

#Reactions

#Let sin(theta)=0.6
#cos(theta)=0.8
#tan(theta)=0.75
#sin(theta)=X
#Cos(theta)=Y
#tan(theta)=Z
X=0.6
Y=0.8
Z=0.75

R_B=F_D*L**-1 #KN
R_A=F_D-R_B #KN

#Forces

F_EF=F_AE #KN

#After dimplifying And further resolving we get
F_DG=833.34*2**-1 #KN
F_DF=416.66+416.67
F_FG=F_DF*X #KN
F_FH=F_D-F_DF*Y

#Result
print"Forces in the members are:F_DG",round(F_DG,2),"KN"
print"                         :F_DF",round(F_DF,2),"KN"
print"                         :F_FG",round(F_FG,2),"KN"
print"                         :F_FH",round(F_FH,2),"KN"
print"                         :F_AE",round(F_AE,2),"KN"
print"                         :F_EF",round(F_EF,2),"KN"

Forces in the members are:F_DG 416.67 KN
:F_DF 833.33 KN
:F_FG 500.0 KN
:F_FH 333.34 KN
:F_AE 1000.0 KN
:F_EF 1000.0 KN


## Example 6.6,Page No.135¶

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

#Initilization of Variables

theta=60
alpha=30
F_C=1000 #N

#Calculations

#Force CD
F_CD=F_C*(sin(theta*pi*180**-1))**-1 #N

#Force CA
F_CA=F_CD*cos(theta*pi*180**-1) #N

#Force BD

#Result
print"Forces in members are:F_CD",round(F_CD,2),"N"
print"                     :F_CA",round(F_CA,2),"N"
print"                     :F_BD",round(F_BD,2),"N"

Forces in members are:F_CD 1154.7 N
:F_CA 577.35 N
:F_BD 1154.7 N


## Example 6.7,Page No.136¶

In [24]:
import math

#Initilization of Variables

#LEt tan(theta)=X
#cos(theta)=Y
#sin(theta)=Z
L_EC=5
F_B=F_C=1000 #N
X=3*4**-1
Y=0.8
Z=0.6

#Calculations

#Force CD
F_CD=F_B*Z**-1 #N

#Force CB
F_CB=F_CD*Y

#Force BD
F_BD=F_B #N

#Force BA
F_BA=F_CB #N

#in joint D,resolving forces we get
#After further simplifying we get

#Froce ED
F_ED=4999.98*2**-1 #N

#Result
print"Forces in the members are:F_CD",round(F_CD,2),"N"
print"                         :F_CB",round(F_CB,2),"N"
print"                         :F_BD",round(F_BD,2),"N"
print"                         :F_BA",round(F_BA,2),"N"

Forces in the members are:F_CD 1666.67 N
:F_CB 1333.33 N
:F_BD 1000.0 N
:F_BA 1333.33 N


## Example 6.8,Page No.138¶

In [25]:
import math

#Initilization of Variables

F_D=12 #KN #Force at D
F_C=18 #KN
L_AC=2 #m
L_CB=2 #m
L_DC=1.5 #m
L_AB=4 #m

#Calculations

#Reactions

R_B=(F_C*L_AC+F_D*L_DC)*L_AB**-1 #KN
R_A=(F_C)-R_B #KN

#Let cos(theta)=X
#sin(theta)=Y

X=0.8
Y=0.6

#Forces

F_CD=F_AC
F_BC=F_AC #KN
F_BD=R_B*(Y)**-1 #KN

#Result
print"forces in members are:F_AC",round(F_AC,2),"KN"
print"                     :F_BC",round(F_BC,2),"KN"
print"                     :F_BD",round(F_BD,2),"KN"
print"                     :F_CD",round(F_CD,2),"KN"

forces in members are:F_AC 18.0 KN
:F_BC 18.0 KN
:F_BD 22.5 KN
:F_CD 18.0 KN


## Example 6.9,Page No.139¶

In [26]:
import math

#Initilization of Variables

L_AF=L_FG=L_BG=4 #m
L_AB=12 #m
F_F=3 #KN
F_G=6 #KN
F_E=8 #KN
V=1.5 #m #Vertical Distance

#Calculations

#Reactions
R_B=(F_E*V+F_F*L_AF+F_G*(L_AF+L_FG))*L_AB**-1
R_A=(F_F+F_G)-R_B

#Let cos(theta)=X
#Sin(theta)=Y
X=0.8
Y=0.6

#Forces
F_CA=F_F*Y**-1 #KN
F_FA=F_CA*X+F_E #KN
F_CF=F_CA #KN
F_CD=(F_CA+F_CF)*X #KN
F_DF=(-F_CF*Y+F_F)*Y**-1 #KN
F_GF=F_FA+F_CF*X #KN
F_DE=F_CD #KN
F_GE=F_G*Y**-1 #KN
F_GB=F_GF-F_GE*X #KN
F_BE=F_GE #KN

#Result
print"Forces in the members are:F_CA",round(F_CA,2),"KN"
print"                         :F_FA",round(F_FA,2),"KN"
print"                         :F_CF",round(F_CF,2),"KN"
print"                         :F_CD",round(F_CD,2),"KN"
print"                         :F_DF",round(F_DF,2),"KN"
print"                         :F_GF",round(F_GF,2),"KN"
print"                         :F_DE",round(F_DE,2),"KN"
print"                         :F_GE",round(F_GE,2),"KN"
print"                         :F_GB",round(F_GB,2),"KN"
print"                         :F_BE",round(F_BE,2),"KN"

Forces in the members are:F_CA 5.0 KN
:F_FA 12.0 KN
:F_CF 5.0 KN
:F_CD 8.0 KN
:F_DF 0.0 KN
:F_GF 16.0 KN
:F_DE 8.0 KN
:F_GE 10.0 KN
:F_GB 8.0 KN
:F_BE 10.0 KN


## Example 6.10,Page No.142¶

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

#Initilization of Variables

theta=60 #DEgrees
alpha=30 #Degrees
L_AE=L_EF=L_FB=4 #m
L_AB=12  #m
F_A=1 #KN
F_C=2 #KN
F_D=1 #KN

#Calculations

L_AC=L_AE*cos(alpha*pi*180**-1) #m

#Reactions
V=(F_A+F_C+F_D)*sin(theta*pi*180**-1)+1 #KN
H=(F_A+F_C+F_D)*cos(theta*pi*180**-1) #KN
R_A=V-R_B #KN

#Forces
F_AC=(R_A-(F_A*sin(theta*pi*180**-1)))*(sin(alpha*pi*180**-1))**-1
F_AE=F_C+F_AC*cos(alpha*pi*180**-1)-F_A*cos(theta*pi*180**-1) #KN
F_CD=F_AC
F_CE=F_C #KN
F_ED=F_C+(sin(theta*pi*180**-1))**-1 #KN
F_EF=F_AE-F_C*cos(theta*pi*180**-1)-F_ED*cos(theta*pi*180**-1)
F_FB=F_EF #KN
F_BG=R_B*(sin(alpha*pi*180**-1))**-1 #KN
F_GD=F_BG #KN

#Result
print"Forces in the members are:F_AC",round(F_AC,2),"KN"
print"                         :F_AE",round(F_AE,2),"KN"
print"                         :F_CD",round(F_CD,2),"KN"
print"                         :F_CE",round(F_CE,2),"KN"
print"                         :F_ED",round(F_ED,2),"KN"
print"                         :F_EF",round(F_EF,2),"KN"
print"                         :F_FB",round(F_FB,2),"KN"
print"                         :F_BG",round(F_BG,2),"KN"
print"                         :F_GD",round(F_GD,2),"KN"

Forces in the members are:F_AC 4.22 KN
:F_AE 5.15 KN
:F_CD 4.22 KN
:F_CE 2.0 KN
:F_ED 3.15 KN
:F_EF 2.58 KN
:F_FB 2.58 KN
:F_BG 2.98 KN
:F_GD 2.98 KN


## Example 6.11,Page No.145¶

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

#Initilization of Variables

theta=60 #degrees
alpha=30 #degrees
beta=90 #degrees
L_AB=2.5 #m
L_BC=5 #m
F_A=20 #KN

#Calculations

#Reactions
R_C=(F_A*L_AB*cos(theta*pi*180**-1))*L_BC**-1 #kn
R_B=F_A-R_C

#Forces

F_AB=(R_B*L_BC)*(R_C*cos(alpha*pi*180**-1))**-1 #KN
F_BC=(L_AB*sin(theta*pi*180**-1))**-1*(R_B*L_AB*cos(theta*pi*180**-1))

#Result
print"Force in Members are:F_BA",round(F_AB,2),"KN"
print"                    :F_BC",round(F_BC,2),"KN"

Force in Members are:F_BA 17.32 KN
:F_BC 8.66 KN


## Example 6.12,Page No.146¶

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

#Initilization of Variables

L_BC=2.5 #m
L_AB=5 #m
theta=30 #Degrees
alpha=60 #degrees
F_D=10 #KN
F_E=12 #KN

#Calculations

L_BE=L_BC*cos(theta*pi*180**-1) #m

#Distance of Line of action of load 12 KN
x=L_AB-1.875 #m

#Reactions
R_B=(F_D*L_AC*2**-1+F_E*x)*L_AB**-1 #KN
R_A=(F_D+F_E)-R_B #KN

#Forces
F_BC=(R_B*L_BE*cos(theta*pi*180**-1))*(L_BE*sin(theta*pi*180**-1))**-1
F_EC=F_E*cos(theta*pi*180**-1) #KN
F_DE=-((F_E*(L_AC-L_BE*cos(theta*pi*180**-1)))-R_B*L_BC)*(L_AC*sin(theta*pi*180**-1))**-1

#Result
print"Reactions are:R_A",round(R_A,2),"KN"
print"             :R_B",round(R_B,2),"KN"
print"Forces in the members are:F_BC",round(F_BC,2),"KN"
print"                         :F_EC",round(F_EC,2),"KN"
print"                         :F_DE",round(F_DE,2),"KN"

Reactions are:R_A 12.0 KN
:R_B 10.0 KN
Forces in the members are:F_BC 17.32 KN
:F_EC 10.39 KN
:F_DE 14.0 KN


## Example 6.13,Page No.148¶

In [30]:
import math

#Initilization of Variables

#Lengths
L_AG=L_GH=L_HB=3
L_AB=9 #m
L_FB=L_EH=L_DG=L_AC=4 #m

#Forces
F_G=9 #KN
F_H=12 #KN

#Calculations

#Reactions
R_B=(F_G*L_AG+F_H*(L_AG+L_GH))*L_AB**-1
R_A=(F_G+F_H)-R_B #KN

#Forces
F_3=(R_A*L_AG)*L_AC**-1 #KN
F_1=(R_A*L_AG)*L_AC**-1 #KN
F_2=(F_3*L_AC-F_G*L_AG)*L_AG**-1

#Result
print"Reactions are:R_A",round(R_A,2),"KN"
print"             :R_B",round(R_B,2),"KN"
print"Forces in Members are:F_1",round(F_1,2),"KN"
print"                     :F_2",round(F_2,2),"KN"
print"                     :F_3",round(F_3,2),"KN"

Reactions are:R_A 10.0 KN
:R_B 11.0 KN
Forces in Members are:F_1 7.5 KN
:F_2 1.0 KN
:F_3 7.5 KN


## Example 6.14,Page No.149¶

In [31]:
import math
from math import sin, cos, tan, radians, pi
import numpy as np

#Initilization of Variables

L_CH=5 #m
L_DE=4.5 #m
L_AE=L_EC=L_FB=4 #m
L_AB=16 #m
F=80 #KN
v=0.5 #m

#Calculations

#Reactions
R_B=F*(L_AE+L_EC+L_FB)*L_AB**-1 #m
R_A=F-R_B #KN

#Forces
F1=R_A*L_AE*L_DE**-1 #KN

theta=np.arctan(L_DE*L_EC**-1)*(180*pi**-1)
alpha=np.arctan(v*L_AE**-1)*(180*pi**-1) #Degrees
beta=alpha+theta #Degrees

L_CD=(L_DE**2+L_EC**2)**0.5 #m
L_CL=L_CD*sin(beta*pi*180**-1) #m

F3=R_A*(L_AE+L_EC)*L_CL**-1 #KN
F2=-(F3*sin(alpha*pi*180**-1)-R_A)*(sin(theta*pi*180**-1))**-1

#Result
print"Forces in Members are:F1",round(F1,2),"KN"
print"                     :F2",round(F2,2),"KN"
print"                     :F3",round(F3,2),"KN"

Forces in Members are:F1 17.78 KN
:F2 21.41 KN
:F3 32.25 KN


## Example 6.15,Page No.151¶

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

#Initilization of Variables

L_EC=L_FD=L_BD=L_AC=L_OH=2 #m
L_AB=L_CD=L_EF=4 #m
F=20 #KN
H=20 #KN
theta=90
alpha=45

#Calculations

#Reactios
R_B=(H*L_EC+F*(L_FD+L_BD)+F*(L_AC+L_EC+L_OH))*L_AB**-1
R_A=0-R_B #KN
H_A=3*F #All horizontal Forces

#Forces
F_BD=(F*L_FD+F*(L_FD+L_BD))*L_AB**-1 #KN
F_AC=(F*L_FD+H*(L_OH+L_EC))*L_AB**-1
F_BG=(R_B-F_BD)*(cos(alpha*pi*180**-1))**-1 #KN
F_BA=F_BG*sin(alpha*pi*180**-1)
F_AG=(H_A-F_BA)*(cos(alpha*pi*180**-1))**-1

#Result
print"Forces in the Members are:F_BD",round(F_BD,2),"KN"
print"                         :F_AC",round(F_AC,2),"KN"
print"                         :F_BG",round(F_BG,2),"KN"
print"                         :F_BA",round(F_BA,2),"KN"
print"                         :F_AG",round(F_AG,2),"KN"

Forces in the Members are:F_BD 30.0 KN
:F_AC 30.0 KN
:F_BG 42.43 KN
:F_BA 30.0 KN
:F_AG 42.43 KN


## Example 6.16,Page No.153¶

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

#Initilization of Variables

F_E=F_A=F_D=1 #KN
F_C=2 #KN
L_AE=L_EF=L_FB=4 #m
L_AB=12 #m
theta=60
alpha=30 #degrees

#Calculations

L_AC=L_AE*cos(alpha*pi*180**-1)

#Reactions

#Forces
F_DG=(R_B*L_AE)*(L_FB*sin(alpha*pi*180**-1))**-1
F_FE=R_B*cos(alpha*pi*180**-1)*(sin(alpha*pi*180**-1))**-1
F_DF=0 #KN

#Result
print"Force in members:DG",round(F_DG,2),"KN"
print"                :FE",round(F_FE,2),"KN"
print"                :DF",round(F_DF,2),"KN"

Force in members:DG 2.98 KN
:FE 2.58 KN
:DF 0.0 KN