Professional Documents
Culture Documents
Stiffness Matrix Method (Finite Elements Approach) of Beam Elements Using Matlab
Stiffness Matrix Method (Finite Elements Approach) of Beam Elements Using Matlab
net/publication/360208225
CITATIONS READS
0 1,859
1 author:
Ayodele Akin-Adamu
Dokuz Eylul University
3 PUBLICATIONS 0 CITATIONS
SEE PROFILE
All content following this page was uploaded by Ayodele Akin-Adamu on 25 May 2022.
Ayodele Akin-Adamu1
Abstract
In this paper a structural beam (3 span continuous beam type) that can resist transverse loading only by
transferring only bending moment and shear force at its start and end nodes is investigated.
Unfuntuanately, the effect of axial loading along the span of the beam is not considered in this paper.
The stiffness matrix method by using the Castigliano approach is used for the derivation of the local
stiffness matrix of beam elements. 1st principle derivation is presented by using the Castigliano’s
approach. The methodology of using the stiffness matrix approach which is very similar to the finite
element approach is explained by using an analysis example. MATLAB software is used in the
computation approach because of the easy of assembly of the global stiffness matrix of the beam
structure and carrying out other matrix manipulation as required. Different types of transverse loading
and support displacement conditions are considered in the analysis example presented in the paper.
These included transverse loading like partial uniformly distributed loading on a beam, point loading
for forces and moments both along the span and at support locations, the vertical settlement of support
and the application of rotation at support node is also considered. Staad.Pro software which is a reliable
structural software is finally used to validate the results of the analysis example in this paper.
Keywords: Beam analysis, Indeterminate beams, Castigliano approach, Stiffness Matrix method,
MATLAB, Staad.Pro.
Introduction
Beam members are found in almost all civil engineering infrastructures today. They are mostly used in
supporting horizontal plate members such as concrete slabs, steel plates etc. They are connected to
columns and these columns helps transmit the structural loads safely to the foundation. The beam
connections to the columns affect the type of support that can be attributed at beam supports. Generally,
at intermediate support of beams, these supports are assumed to be represented by roller supports. In
reinforced building structures made of structural frame, the end support can be reasonably assumed as
fixed support because of its monolithic construction connection. For steel structural frames, the end
support is assumed as either pinned or fixed depending on the stiffness of the steel connection which is
dependent on the thickness of plate and number of bolts at the steel connection.
Beam used in Civil Engineering infrastructural projects can be made with several type of material such
as steel, timber, conventional concrete, ultrahigh performance concrete etc. Two important mechanical
and sectional properties that are needed for beam analysis are the elastic young modulus and the moment
of inertia respectively. The use of MATLAB for beam analysis using the stiffness matrix methodology
greatly simplify the analysis of any statically indeterminate beams.
In this paper, the stiffness matrix method for beam element formula will be proved. The basic steps of
programming the stiffness method will be listed and the corresponding MATLAB code will be written
to compute the global stiffness matrix, deflection and internal axial forces of a beam structural system.
1
Dokuz Eylül Üniversitesi, Fen Bilimleri Enstitüsü, Bornova, 35100, İzmir
3. Virtual work method
4. Potential energy method
5. Galerkin method
In this paper, the Castigliano’s method is used in the derivation of the local stiffness matrix of a beam
element.
Figure 1: shows external actions (𝑀 & 𝑀 ) causing rotation deformations Ø 𝑎𝑛𝑑 Ø at beam node.
Consider a straight beam element i in fig 1b that is subjected to external actions (moments Mj and Mk)
at node j and k respectively. The beam member deformed into the continuous blue line as shown in fig
1a. The rotation angles at node j and k due to the applied moments are Øj and Øj respectively.
According to Castigliano’s theory for beam deformation, the partial derivative of the strain energy with
respect to an applied force (or moment) is equal to the deformation (displacement or rotation) of the
force (or couple) along its line of action.
General strain energy formula for a beam subjected to different type of actions is shown below:
𝑁 𝑇 𝑇 𝑀 𝑀 𝑀
U = + + + + + 𝑑𝑥
𝐴𝐸 𝐴𝐺 𝐴 𝐺 𝐸𝐼 𝐸𝐼 𝐺𝐼
1 𝑀 + 𝑀
U = ∗𝑥− 𝑀 𝑑𝑥
2𝐸𝐼 𝐿
1
U = 𝑀𝑥+ 𝑀 𝑥− 𝑀𝑙 𝑑𝑥
2𝐸𝐼 𝐿𝑖
1 𝑀 𝑙 𝑀 𝑙 𝑀𝑀 𝑙
U = + −
2𝐸𝐼 3 3 3
U is the strain energy stored in the body in terms of external actions 𝑀 and 𝑀 respectively and this
strain energy equation is shown above.
∂U 1 𝑀𝑙 𝑀 𝑙
∅ = = −
∂𝑀 𝐸𝐼 3 6
∂U 1 𝑀𝑙 𝑀 𝑙
∅ = = − +
∂𝑀 𝐸𝐼 6 3
∅ and ∅ are rotation angles at node j and k due to the applied external action. These are shown by the
2 equations above
𝑙 𝑙
⎡ − ⎤
⎢ 3𝐸𝐼 6𝐸𝐼 ⎥ 𝑀 =
∅
⎢ 𝑙 𝑙 ⎥ 𝑀 ∅
⎢− ⎥
⎣ 6𝐸𝐼 3𝐸𝐼 ⎦
𝑙 𝑙
⎡ − ⎤
3𝐸𝐼 6𝐸𝐼 𝑀 ∅
𝐹 = ⎢⎢ ⎥; 𝑃
⎥ = ; ∅ =
𝑙 𝑙 𝑀 ∅
⎢− ⎥
⎣ 6𝐸𝐼 3𝐸𝐼 ⎦
𝐹 𝑃 = ∅
Matrix form of external actions and rotation angles at the beam nodes shown above.
𝐹
𝑘 =
𝐹
Basic rigidity matrix can be written in terms of the flexibility matrix 𝐹 , shown above.
𝑙 𝑙 𝑙
𝐹 = − =
9(𝐸𝐼 ) 36(𝐸𝐼 ) 12(𝐸𝐼 )
𝑙 12(𝐸𝐼 ) 𝑙 12(𝐸𝐼 )
⎡ × − × ⎤
⎢ 3𝐸𝐼 𝑙 6𝐸𝐼 𝑙 ⎥
𝑘 = ⎢ ⎥
𝑙 12(𝐸𝐼 ) 𝑙 12(𝐸𝐼 )
⎢− × × ⎥
⎣ 6𝐸𝐼 𝑙 3𝐸𝐼 𝑙 ⎦
4𝐸𝐼 2𝐸𝐼
⎡ − ⎤
𝑙 𝑙
𝑘 = ⎢ ⎥
⎢− 2𝐸𝐼 4𝐸𝐼 ⎥
⎣ 𝑙 𝑙 ⎦
Relationship between global internal end forces (bending and shear force) and displacements
Figure 2: Relationship between internal forces and deformation at start and end node of beam
element.
P
⎡ ⎤
𝑀
The global end forces of each beam element can be expressed as a force vector [𝑃] = ⎢ ⎥ as shown
⎢P ⎥
⎣𝑀 ⎦
in fig 2b.
M + M −(M + M )
P = ; P = ;𝑀 = 𝑀 ;𝑀 = 𝑀
𝑙 𝑙
Using Fig 2b. [𝑃] matrix elements are defined as shown by the 4 equations above.
1 1
⎡ ⎤ P
⎢ 𝑙 𝑙 ⎥ ⎡ ⎤
⎢ 1 0 ⎥ 𝑀 = ⎢
𝑀
⎥
⎢− 1 1 𝑀
− ⎥ ⎢P ⎥
⎢ 𝑙 𝑙⎥ ⎣𝑀 ⎦
⎣ 0 0 ⎦
[𝐿 ] 𝑃 = 𝑃
[𝐿 ] 𝑘 Ø = 𝑃
[𝐿 ] 𝑘 [𝐿 ] [𝛿 ] = 𝑃
𝑘 = [𝐿 ] 𝑘 [𝐿 ]
⎡ − ⎤
⎢ ⎥
⎢ − ⎥
𝑘 =⎢ ⎥
⎢− − − ⎥
⎢ ⎥
⎣ − ⎦ ×
By carrying out the matrix multiplication shown above, the global stiffness matrix is obtained.
𝑃 = 𝑘 [𝛿 ] + 𝑃
[𝛿 ] = 𝑘 𝑃 − 𝑃
The global deformations at each node (rotations and vertical displacement) are obtained by the
expression above ([𝛿 ]). 𝑃 is the nodal force vector. It is used to input nodal point loading and nodal
moment loading in the equation.
𝑘 [𝛿 ] = 𝑃
𝑃 = 𝑘 [𝛿 ] + 𝑃
The expression above can be used to determine the external actions of each beam element at its nodes.
𝑃 is defined as the external actions when considering the external transverse forces along the span
of the beam and also considering the beam element having fixed support at its ends.
Figure 3: Numerical Example question.
In this paper the 3-span continuous beam structure will be solved using the method described above
using the MATLAB software and the results will be compared with Staad.pro software result for
validation purpose.
The general procedure for structural analysis of beam structure includes the following:
1. Decide on the number of elements in the model. It is important to divide the structure into
element at each salient point. Salient points are defined as points such as start and end nodes,
beginning and end of a uniformly distributed loads, positions of point or moment loading etc.
If the beam element is not defined in this manner, some numerical calculation problem usually
arises after you have computed the global deformation vector matrix. The 3-span beam in fig 3
is divided into 6 elements considering the salient points along the beam structure (fig. 4b)
instead of 3 elements (fig. 4a) as shown in fig. 4 below. Using MATLAB for computation, there
is no need to be worried about the number of elements.
⎡ − ⎤
⎢ ⎥
⎢ − ⎥
𝑘 =⎢ ⎥
⎢− − − ⎥
⎢ ⎥
⎣ − ⎦ ×
These local stiffness matrixes of each element are numbered from the numbering of the
degree of freedom at its start and end nodes. For example, element 1 is numbered 1, 2, 3 and
4.
1 2 3 4
− 1
⎡ ⎤
⎢ ⎥
⎢ − ⎥ 2
[𝑘 ] = ⎢ ⎥
⎢− − − ⎥ 3
⎢ ⎥
⎣ − ⎦4 ×
4. The global stiffness matrix is assembled on MATLAB by combining all the local stiffness
matrixes into a single matrix of matrix size equal to the maximum number of degrees of
freedom. For the numerical example solved in this paper, the global matrix stiffness size is 14
x 14. A zero matrix of size 14 x 14 is created for our numerical example, then each local
stiffness matrix is added to this base matrix. For example, given that the zero matrix is defined
as K on MATLAB, the local stiffness matrix of k1 is added as shown below.
𝐾(1: 4, 1: 4) = 𝐾(1: 4, 1: 4) + 𝑘1
5. The global stiffness matrix has been generated from step 4, now we apply boundary conditions
to the beam structure by adding the value of (inf) to the diagonal elements of the global stiffness
matrix where the support is located using MATLAB. This is evaluated in MATLAB using the
MATLAB coding shown below.
𝐾(1, 1) = 𝐾(1,1) + 𝑖𝑛𝑓
Inf value is added to denote the supports of the beam. However, at support location where there
is vertical settlement of support or a rotational angle imposed, this support is not denoted by
adding inf value to the diagonal element of the global stiffness matrix. A large value which we
can be denoted as C is added to the global stiffness matrix. C can be expressed as the maximum
element value in the global stiffness matrix multiplied by 10000. The MATLAB coding for this
procedure is shown below using our numerical example. Because there is an imposed
deformation at support 3 and 6, element values of the global stiffness matrix at (5,5) and (14,14)
are modified with the value of C.
𝐶 = max 𝐾(: ) × 10000
𝐾(5, 5) = 𝐾(5,5) + 𝐶
𝐾(14, 14) = 𝐾(14,14) + 𝐶
6. A zero global force vector matrix, Pgb is defined for forces applied directly at the start or end
of each element. On MATLAB, Pgb is defined as shown in the MATLAB coding below; Then
the nodal forces are added to the base zero matrix created. For example, in our numerical
example, at node 5 of the beam structure, a positive clockwise moment is applied which is equal
to 15,000Nm. A negative anticlockwise moment value of -15,000N/m is added to the 10th
element of the force vector matrix because of the external load applied.
𝑃 = 𝑧𝑒𝑟𝑜𝑠(14,1)
7. Another zero global force matrix, PgbA is defined for forces applied along the span of each
element. On MATLAB, PgbA is defined as shown in the MATLAB coding below; Then the
equivalent nodal forces due to the span loadings are added to the base zero matrix created. For
example, in our numerical example, the uniform distributed loading on 2nd element is added
as shown.
𝑃 𝐴 = 𝑧𝑒𝑟𝑜𝑠(14,1)
9. After Pgb and PgbA have been evaluated on MATLAB, the displacement vector matrix is
evaluated using the equation shown below and the MATLAB code.
[𝛿 ] = 𝑘 𝑃 − 𝑃
𝑄 = 𝑖𝑛𝑣(𝐾) ∗ 𝑃 − 𝑃 𝐴
10. The displacement values (vector matrixes) can be extracted from the global displacement
matrix 𝑄 in step 8. For example, in the numerical example, the displacement vector matrix of
element 1, 𝑄 is extracted using the MATLAB code shown below.
𝑄 = 𝑄 (1: 4)
11. Finally, the end reactions of each element are computed using the equation shown below and
the MATLAB coding respectively.
[𝑅 ] = 𝑘 [𝛿 ] + 𝑃
𝑅 =𝑘 ∗ 𝑄 + 𝑃 𝐴
Note: 𝑃 𝐴 for element 1 needs to be extracted from 𝑃 𝐴 using the MATLAB code below.
𝑃 𝐴 = 𝑃 𝐴 (1: 4)
T1 = EI * [12/L^3, 6/L^2, -12/L^3, 6/L^2; 6/L^2, 4/L, -6/L^2, 2/L; -12/L^3, -6/L^2, 12/L^3, -6/L^2;
6/L^2, 2/L, -6/L^2, 4/L];
I = moment of inertia in m4
Figure 13: Staad.pro bending moment and shear force value prediction along the span of the beam
elements.
References
[1] Çatal, HH., (2014). Yapı ve Deprem Mühendisliğinde Matris Yöntemler. Publication of Dokuz
Eylul Universisty, Faculty