Tese FEM
Tese FEM
Tese FEM
Engenharia
iii
iv
Acknowledgement
I want to thank my parents for supporting me during these last years and for never having
doubts about my capabilities. I also want to thank Professor Pedro Vieira Gamboa for having
supervising me during this work and for the knowledge that he passed to me. And thank to my
other professors during this course. Finally I want to thank my friends and a special thanks to
Pedro Albuquerque that helped me to improve some important soft skills.
v
vi
Resumo
Actualmente há uma grande exigência para que as análises estruturais sejam o mais realistas
possiveis e altamente fiáveis. Na indústria aeronáutica isto é traduzido numa redução de peso
das aeronaves mantendo os factores de segurança desejados. Porém este tipo de análises são um
processo demorado e trabalhoso e por vezes é necessário apresentar uma solução mais rápida,
embora menos fiável, que possa ser utilizada como ponto de partida no projecto preliminar.
Existem diversos métodos para resolver os diferentes problemas estruturais. Quando os casos
são simples é possivel chegar a uma solução analítica, porém estes casos são muito reduzidos e
envolvem a resolução de equações diferenciais. Assim é necessário recorrer a métodos numéri-
cos de interpolação ou de aproximação. Um destes métodos é o método dos elementos finitos.
Este método consiste em dividir o domínio do problema em pequenas fracções, chamadas de
elementos, e aplicar aproximações em cada uma dessas fracções tendo em consideração os re-
sultados das fracções envolventes. No caso desta dissertação este método é aplicado do ponto
de vista unidimensional (1D), ou seja, as estruturas são do tipo: viga, barra de tracçao e barra
de torção e os elementos são representados por segmentos de recta. Os pontos inicias e fi-
nais destes segmentos são chamados de nós e permitem a continuidade da estrutura estando
conectados aos elementos adjacentes.
Duas grandes tarefas foram executadas neste trabalho. Inicialmente o método matemático dos
elementos finitos foi ajustado para uma análise estrutural, mais concretamente em estruturas
que possam ser consideradas em uma dimensão, e para determinar a deformação da estrutura
sob determinados carregamentos e condições de fronteira. É ainda possivel calcular os modos
de vibração livre da estrutura. Depois este método foi aplicado num algoritmo de forma a poder
ser programado e aplicado a diversos casos.
De modo a verificar a fiabilidade do código desenvolvido foram estudados alguns casos com
diferentes dados iniciais. Estes dados iniciais referem-se: ao tamanho e perfil da estrutura,
material, cargas aplicadas e condições de fronteira, sendo os resultados comparados com pro-
gramas já existentes no mercado, verificando assim se são plausíveis.
Palavras-chave
Análise Estrutural, Método dos Elementos Finitos, Viga, Condições de Fronteira, Equações Difer-
enciais
vii
viii
Abstract
At present there is a great demand for structural analysis to be as realistic as possible and highly
reliable. In the aeronautical industry this is translated into a reduction of the aircrafts weight
and maintaining the desired safety factors. However, this type of analysis is a time-consuming
and labor-intensive process and sometimes it is necessary to have a faster, but less reliable,
solution that can be used as a starting point in the preliminary design.
There are several methods for solving the different structural problems. When the cases are
simple it is possible to have an analytical solution, however these cases are reduced and in-
volves the resolution of differential equations. Thus it is necessary to use numerical methods
of interpolation or approximation. One of these methods is the finite element method. This
method consists in dividing the problem domain into small fractions, called elements, and apply-
ing approximations in each of these fractions taking into account the results of the surrounding
fractions. In the case of this dissertation this method is applied from a one-dimensional (1D)
point of view, ie, the structures are of the type: beam, bar and rod and the elements are rep-
resented by straight line segments. The start and end points of these segments are called nodes
and allow the continuity of the structure and they are connected to the adjacent elements.
Two major tasks were performed in this work. Initially the mathematical method of the fi-
nite elements was adjusted for a structural analysis, more concretely in structures that can be
considered in one dimension, and to determine the deformation of the structure under certain
loads and boundary conditions. It is still possible to calculate the free vibration modes of the
structure. Then this method was applied to an algorithm so that it could be programmed and
applied to several cases.
In order to verify the reliability of the developed code some cases with different initial data
were studied. These initial data refers to: the size and cross-section of the structure, material,
loads and boundary conditions. The results are compared with programs that already exist in
the market, thus verifying if they are plausible.
Keywords
Structural Analysis, Finite Element Method, Beam, Boundary Conditions, Differential Equations
ix
x
Contents
1 Introduction 1
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3 Code Development 39
3.3 Cross-Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4 Code Validation 47
4.2.1 Case 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.2.2 Case 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.2.3 Case 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.2.4 Case 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
xi
6 Conclusion 63
6.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Bibliography 65
xii
List of Figures
2.11 Beam 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
xiii
3.12 Skin Section. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
xiv
List of Tables
5.3 Volume and Mass comparison using code and CATIA V5. . . . . . . . . . . . . . . 56
5.4 Number of Elements and Nodes for Ansys and code mesh. . . . . . . . . . . . . 58
xv
xvi
List of Acronyms
BC Boundary Conditions
CAD Computer Aided Design
DE Differential Equation
DOF Degrees of Freedom
EO Equation of Motion
FDM Finite Differences Method
FEA Finite Element Analysis
FEM Finite Element Method
ID Identification Number
IE Integral Equation
PVW Principle of Virtual Work
1D One Dimension
3D Three Dimension
xvii
xviii
List of Symbols
xix
Wint Internal Work
Wx Distributed torsion momentum
Wy Distributed bending momentum
Wz Distributed bending momentum
X Space coordinates vector
x x-axis coordinate
y y-axis coordinate
z z-axis coordinate
xx
List of Greek Symbols
γ Shear strain
ε Normal strain
ε Strain matrix
εb Strain vector
θx Angular displacement along x direction
θy Angular displacement along y direction
θz Angular displacement along z direction
ν Eigenvector
ν Poisson’s ratio
ξ Local variable
ρ Density
σ Normal Stress
σ Stress matrix
b
σ Stress vector
τ Shear stress
ϕhe Horizontal rotation angle
ϕve Vertical rotation angle
ϕ xe x-axis rotation angle
ψ Warping function
ω Eigenvalue
xxi
xxii
Chapter 1
Introduction
1.1 Motivation
One of the most important objectives in aircraft design and other engineering activities is to
achieve the most reliable product with the lowest possible costs. So, it is very important to per-
form accurate calculations using the minimum computational resources possible. In structural
analysis, this accurate calculation can result in a weight reduction and in aerospace engineering
this means that the aircraft can be more efficient and have lower manufacturing and operational
costs. The use of less resources is also important to preserve the planet environment.
In the present day there are some computer software packages that perform finite element
analysis (FEA) such as ANSYS [ANS18], Dassault Systèmes ABAQUS [Das18] and MSPATRAN [MSC18].
These software packages have years, or even decades, of development and perform multiple
types of analyses. However, to legally use those commercially available software packages a
paid license is required. Another disadvantage is that the user must have some knowledge and
experience to use these software because they have a large number of available models and
tools.
Considering this disadvantages it would be very useful a simple and user friendly tool, that allows
a simple and fast structural analysis to calculate structures displacements. This tool aims to be
used in structures that could be assumed with just one dimension (1D) and allow all the six space
degrees of freedom (DOF).
Analysing propellers and wing spars to check if them resist and deform to flight loads are some
applications that motivate the development of the present work. This applications should also
have analysing-time benefits because this tool should perform quick analysis. Other motivation
for the development of a structural analysis code is that it could be incorporated in an optimiza-
tion problem. For example, in propeller structural analysis there is the possibility of coupling
this code to an aerodynamics analysis code where the loads that result from this last code can
be applied in the structural one and the result is a new shaped propeller that can be again
subjected to the aerodynamics code. This are commonly known as aerostructural analysis. As
a low-fidelity method it prove to be superior over their high-fidelity counterparts when a high
number of model evaluations are required as for instance when performing a design optimization
since high-fidelity analyses are often very time-consuming, like [JS14] explained.
There are several applications of the finite element method (FEM) using 1D elements in civil,
naval and aeronautical structures. In naval structures [EC16] uses 1D beam models claiming
that those are much simpler compared to three dimensions (3D) solid FEM. Also, [EC13] uses
1D models, for the same reason presented before, when the objective is to analyse slender
bodies, such as columns, rotor-blades, aircraft wings, towers and bridges. The both use 1D
1
elements formulated with Euler–Bernoulli and Timoshenko beam models to determine structures
deformations and free vibration modes. Although one limitation with the Euler–Bernoulli beam
models is that they ignore the transverse shear stresses or, in a best option, it is assumed as
constant over the beam cross-section. The 1D element theories do not capture cross-section
warping.
1.2 Objectives
The main objective of this thesis is to develop a simple and user-friendly tool to perform FEA in
one dimension so that a preliminary study of the stiffness characteristics of a beam-like slender
structure can be performed in an efficient and accurate way. This FEA is applied to structural
engineering and in this case, it calculates the six displacements in a cartesian reference frame:
three axial displacements and three angular displacements. It also aims to allow the computa-
tion of the structure free vibration modes. The meaning of 1D analysis is that the code should
be able to recognise structures of beam type, in order words, one of the structure dimensions is
relatively larger than the other two. This tool consists in a Fortran [Wik18] code that reads the
required inputs from a text file. It also needs to be tested in order to satisfy the mechanical
requirements of the propellers analysed in [Mor16] and guarantee its reliability.
Furthermore, a validation of the tool should be performed, through the comparison with a
mature software that have years of development like Ansys.
To accomplish the objectives, the first task is to study the mathematical model of the finite
element method for the problem described. After studying this model, it is possible to check
the required analysis variables that produce the desired results. Then it is fundamental to apply
a coherent algorithm that translates the results of the mathematical model. After these two
steps, some simple cases are selected to verify if the results are plausible and compare them
with other available software solutions. Finally, a case study can be performed to complete the
code validation.
Chapter 2 features a brief history of finite element analysis background. This chapter allows the
understanding of the power of this method and provides a brief theoretical explanation of how
it is applied in this context. It also explains the mathematical model that supports the method.
The results of this model are the code algorithm and inputs. It also provides a bridge between
the structures physical properties and its deformations when subjected to certain loads.
Chapter 3 describes the computational code and the details about the cross-section properties,
that are important to study beam type structures.
Chapter 4 presents the work done to validate the code. To validate the code some structures
are selected and then are applied to the developed code, those structures are also analysed
in ANSYS software. Then both results are compared, calculating the deviation between both,
2
after that the differences and similarities are discussed.
Chapter 5, similarly to chapter 4, describes a case study to validate the code. In this case study
the code inputs are five blades, designed in [Mor16], with different geometries, materials and
loads. The results from those analysis are compared with the ones obtained in CATIA V5 software
by [Mor16] and Ansys.
Chapter 6 presents the general discussion and conclusions of the work developed during the
current dissertation and some possible future works to achieve better results.
3
4
Chapter 2
This chapter show the maths that formulates the finite element method. As explained in the
previous chapter, this method can be used in various fields of physics, maths and engineering.
So it is necessary adapt the method to this thesis case: displacements of 1D structures. In order
to do that it is first necessary to establish the relations between this displacements and the
extensions and tensions that the structure can experience. Then, three different 1D structures
are considered: rod, bar and beam, the last one is also divided in two. This is required to
study the different displacements, once each one has different behaviours for the different
loads directions. The 1D elements for the different types are formed by two tip nodes and the
displacements variations along the elements is linear.
In physics and engineering there are a lot of problems that are mathematically expressed using
differential equations (DE) and integral equations (IE). Problems such as fluid flows, heat trans-
fer, mass transfer, vibrations of structures, electromagnetic interactions and stress and strain
of structures [Bat14] are represented by complex equations and require different methods to
be solved. Some simple equations have an exact solution and are solvable by explicit formulas.
However, most DE, and the ones presented in this dissertation, require numerical methods to
be solved. Figure 2.1 resumes some methods to solve analytic and numeric DE.
One of the first methodologies to solve DE was the finite differences method (FDM). This repre-
sents a group of numerical methods to solve the DE that uses approximations in the derivatives
of the differential equations. Other techniques like various weighted residual procedures or
approximate techniques for determining the stationary of a properly defined functional were
also developed by mathematicians, as Figure 2.2 shows. All these discretization methods use
approximations to represent a continuum solution but, they were not intuitively enough for
some problems. So, engineers found a more intuitive way to solve them by creating an analogy
between real discrete elements and finite portions of a continuum domain [OCZ00]. This was
called finite element method.
A vast number of engineers, physicists and mathematicians had contributed for the development
and evolution of this methodology. According to [Bat14], the original contributions appeared
in the papers by J. H. Argyris and S. Kelsey; M. J. Turner, R. W. Clough, H. C. Martin, and
L. J. Topp, and R. W. Clough in 1950s. The first and perhaps the simplest definition of the
5
Figure 2.1: Differential Equations Analysis Methods.
finite element process states that: “the continuum is divided into a finite number of parts
(elements), the behaviour of which is specified by a finite number of parameters, and the
solution of the complete system as an assembly of its elements follows precisely the same rules
as those applicable to standard discrete problems”.
This methodology was being developed side by side with the digital computer and they comple-
ment each other. This means that to achieve better results with FEM the number of elements
should be studied and refined and the use of computers reduces the calculation time. Otherwise
6
the most precise analysis would take so much time that it would be impractical to solve cer-
tain problems. One of the first companies that developed software which used finite element
analysis (FEA) was ANSYS in 1970.
In the present days FEA is strongly related with computer aided design (CAD) and because of
that one other step can be added to this methodology that is the graphical representation of the
results. This helps the user to check if the process was done correctly because he has a clear
image of the entire process.
7
2.2 Constitutive model
In structural mechanics the constitutive model is no more than an equation that establishes the
relation between stresses and strains. The strains are linear and angular displacements in a
deformable body [Meg07]. They are the quotient between the deformation suffered and the
initial length of a small element within the structure. So, it is first required to define a vector
2.1 that represent the spacial displacement that can occur.
u(x, y, z, t)
s(x, y, z, t) = v(x, y, z, t) (2.1)
w(x, y, z, t)
This vector is filled with the displacements u, v and w in the three space directions x, y and z
respectively. These displacements are time dependent, once they can vary in time depending
on the loads applied. However, the work developed in this thesis ignores the time dependence
of the displacements. In other words, this is a static analysis where just the space variables are
required 2.2.
x
X = y (2.2)
z
It is also necessary to define a unit vector that is associated with the orientation of each axis
and those are defined by the letters i, j and k for the x-, y- and z-axis respectively. It is then
possible to calculate the strains 2.3 along each axis and in the different planes.
( )
1 ∂si ∂sj
εij = + (2.3)
2 ∂Xj ∂Xi
As it is possible to check in 2.4 in the main diagonal of the matrix there are represented the
strains along each axis - normal strain - detonated by ε (sub axis) and the strains in the planes -
shear strain - detonated by γ (sub plane). This is a symmetric matrix therefore it is equivalent
to the final column matrix of 2.5.
∂u 1 ∂u ∂v 1 ∂u ∂w
εxx γxy γxz ∂x 2 ( ∂y + ∂x ) 2 ( ∂z + ∂x )
1 ∂v ∂w
ε = γyx εyy γyz = 2 ( ∂x + ∂u
∂y )
∂v
∂y
1 ∂v
2 ( ∂z + ∂y )
(2.4)
1 ∂w ∂u 1 ∂w ∂v ∂w
γzx γzy εzz 2 ( ∂x + ∂z ) 2 ( ∂y + ∂z ) ∂z
8
εxx
εyy
ε
zz
εb = (2.5)
2γxy
2γ
xz
2γyz
So, to have coherence in the constitutive model, the constitutive matrix 2.6 is a six by six matrix.
Its content is provided by studying the material and its properties, so it is entirely dependent
of the material that is being analysed and strongly affects the final results of the structural
analysis.
C11 C12 C13 C14 C15 C16
C21 C22 C23 C24 C25 C26
C
31 C32 C33 C34 C35 C36
C= (2.6)
C41 C42 C43 C44 C45 C46
C
51 C52 C53 C54 C55 C56
C61 C62 C63 C64 C65 C66
Finally, it is possible to determine the stress vector using Hooke’s law 2.8. This law states
b tensor 2.9 is the result of the product of stiffness tensor (constitutive
that the Cauchy stress σ
matrix) and strain tensor (assumed as strain vector for simplicity purposes). The normal stress
is detonated by σ (sub axis) and the shear stress by τ (sub plane).
σxx τxy τxz
σ = τyx σyy τyz (2.7)
τzx τzy σzz
b = C εb (2.8)
σ
σxx
σyy
σ
zz
b=
σ (2.9)
τxy
τ
xz
τyz
In this work, it is assumed that the material is isotropic, so the constitutive matrix is a diagonal
9
matrix 2.10. In this matrix the three first diagonal terms are the Young’s modulus (E) and are
related with the normal strains and the other three are shear modulus (G) that are related with
the shear strains. The relationship between those two constants is given by Equation 2.11 using
the Poisson’s ratio (ν).
E 0 0 0 0 0
0 E 0 0 0 0
0
0 E 0 0 0
C= (2.10)
0 0 0 G 0 0
0
0 0 0 G 0
0 0 0 0 0 G
E
G= (2.11)
2(1 + ν)
As already enunciated above, the structure is studied taking into account three different sub
problems that are divided accordingly the loads and displacements orientation. This three prob-
lems are described in the following chapter’s sub-sections.
The first case is the bar element which withstands only axial loads, represented in Figure 2.4,
and undergoes only axial displacements. Those loads can be concentrated on any of the two
extremities of the bar element, Px , or may be distributed along its length, Qx .
The first step is to reduce the space displacements vector just to the axial displacement along
x-axis 2.12. Then the strain 2.13 and stress 2.14 vectors are obtained from equations 2.5 and
2.9 respectively.
10
∂u
ε = εxx = εx = (2.13)
∂x
∂u
σ = σxx = σx = C11 εx = E (2.14)
∂x
The next step is to determine the dynamic equilibrium equations. There are several ways to
achieve this:
2. D’Alembert’s principle;
3. Energetic formulation;
6. Lagrange equation.
For this thesis the principle chosen was the principle of virtual work because it easily enables to
introduce the virtual variations that will be hereafter replaced by the approximation functions.
So, the variation of the internal work δWint is determined by Equation 2.15 and it is equal to
the variation on the stress within the body volume dV .
∫
δWint = δεx σx dV (2.15)
V
Replacing θx and σx by 2.13 and 2.14 the variation of internal work is now represented by
Equation 2.16.
∫
∂u ∂u
δWint = δ E dV (2.16)
V ∂x ∂x
This volume integral is then decomposed in an area integral where the cross-section properties
of the structure are present and a length variation that gives us the 1D shape for the FEM. It
is assumed that the material properties do not change across the cross-section area, so it is
possible to assume EA as the rod axial stiffness and obtain 2.17.
∫
∂u ∂u
δWint = δ EA dx (2.17)
l ∂x ∂x
11
On the other side of the principle of virtual work is the variation of the external work δWext . The
variation work of inertia forces δWextinertia and the variation work of the applied loads δWextloads
are here represented 2.18.
Analysing the loads applied to the bar element (Figure 2.4) the variation of the external work is
determined using Equation 2.19. The inertia load is the product of the displacement s and the
bar density ρ.
∫ ∫
δWext = − δsρs̈dV + δsQx dx + δu(0, t)Px0 + δu(l, t)Pxl (2.19)
V l
In Equation 2.19 the general displacement vector s can be replaced by the respective displace-
ment for this case as Equation 2.12 shows. And once again, the volume integral is decomposed
to obtain a length integral where it is possible to apply the FEM. It is also assumed that the
material properties do not change across the section’s area it is possible to assume m as the
rod’s mass per unit of length (= ρ A). The final Equation 2.20 for the variation of the external
work is then obtained.
∫ ∫
δWext = − δumüdx + δuQx dx + δu(0, t)Px0 + δu(l, t)Pxl (2.20)
l l
The next required step is to obtain the approximation functions for the displacement that will
be applied in the PVW. Let us assume the discretization of the position domain looking for a
single element with two nodes 2.5.
Let us introduce some variables that are illustrated in the Figure 2.5:
12
uj (t) - displacement of the element right node
uj−1 is at ξ = 0 and uj is at ξ = 1
Now it is required to have the relation between ξ and x 2.21 because the FEM approximation
considers a local displacement instead of global one. So, ξ is the local space variable for each
element and it is dependent on the global position and the element length. It is also necessary
to have the relation between this new local variable and the variation of the global position x
of the element 2.22.
x − (j − 1)le
ξ= (2.21)
le
dx = le dξ (2.22)
u(ξ, t) = a + bξ (2.23)
And with the boundary conditions 2.24 it is possible to determine the constants a 2.25.
u(0, t) = u1
(2.24)
u(1, t) = u2
a = u1
(2.25)
b = u2 − u1
The final approximation function for de displacement u 2.26 is obtain by replacing the constants
a and b in 2.23 with 2.25.
Equation 2.26 can be written in a vector form 2.27 assuming a vector for the nodes displacement
2.28 and one for the local position variable 2.29.
13
u(ξ, t) = N (ξ)de (t) (2.27)
[ ]
u1 (t)
de (t) = (2.28)
u2 (t)
[ ]
N (ξ) = 1 − ξ ξ (2.29)
dN [ ]
= −1 1 (2.30)
dξ
And lastly, analysing the PVW equations, the variation of this approximation function 2.31 it is
also required.
Going back to the PVW the internal and external work must be equal 2.32 and 2.33.
∫ ∫ ∫
∂u ∂u
δ EA dx = − δumüdx + δuQx dx + δu(0, t)Px0 + δu(l, t)Pxl (2.33)
l ∂x ∂x l l
Since vectors and matrices in Equation 2.33 require some algebraic multiplication it is necessary
to transpose the first displacement in each equation’s term. This will lead to Equation 2.34.
∫ ∫ ∫
∂u T ∂u
δ EA =− T
δu müdx + δuT Qx dx + δuT (0, t)Px0 + δuT (l, t)Pxl (2.34)
l ∂x ∂x l l
Finally, it is possible to perform the coordinate change 2.35 and insert the approximation func-
tion and starting by consider just one element the final FEM equation for this problem is achieved
2.37.
14
∫ 1
∂(N de )T ∂(N de )
δ EAe le dξ =
0 ∂ξle ∂ξle
∫ 1 ∫ 1
(2.35)
− (N δde ) me N d¨e le dξ +
T T
(N δde ) Qxe le dξ + (N (0)δde ) Px1 + (N (1)δde ) Px2 T T
0 0
∫ 1
1 ∂N T ∂N
δdTe EAe dξde =
le 0 ∂ξ ∂ξ
∫ 1 ∫ 1
(2.36)
−δdTe le N me N dξ d¨e + δ(de )T le
T T
N Qxe dξ + δdTe N (0)T Px1 + δdTe N (1)T Px2
0 0
In these final equations Ke represents the stiffness matrix 2.38, Me represents the mass matrix
2.39, Fe represents the load vector 2.40 and de the displacements vector 2.44 for one element.
∫ 1
1 ∂N T ∂N
Ke = EAe dξ (2.38)
le 0 ∂ξ ∂ξ
∫ 1
Me = le N T me N dξ (2.39)
0
∫ 1
Fe = le N T Qxe dξ + N T (0)Px1 + N T (1)Px2 (2.40)
0
Replacing in this last three equations the vector N and its variation by the Equations 2.29 and
2.30 the final matrices for the elements are:
[ ]
EAe 1 −1
Ke = (2.41)
le −1 1
[ ]
le me 2 1
Me (2.42)
6 1 2
15
[ ] [ ] [ ]
le Qxe 1 1 0
Fe = + Px1 + Px2 (2.43)
2 1 0 1
[ ]
u1
de = (2.44)
u2
Up to this point it was considered just one element, although the finite element method is the
assembly of several elements so it is required to perform the sum of the PVW of each element
2.45, where N is the number of elements and now the properties and loads are functions of the
local coordinate ξ.
N ∫
∑ jle
∂uT ∂u
δ EAej (ξ) dx =
j=1 (j−1)le ∂x ∂x
(2.45)
N ∫
∑ jle N ∫
∑ jle
− δuT mej (ξ)üdx + δuT Qxej (ξ)dx + δuT (0, t)Px1 + δuT (l, t)Px2
j=1 (j−1)le j=1 (j−1)le
A summation of Equation 2.37 is required for all elements that leads to Equation 2.46 in which
Kej , Mej , Fej , dej are the stiffness and mass matrices and loads and displacements vector,
respectively, of element j.
∑
N ∑
N ∑
N
δdTej Kej dej =− δdTej Mej d¨ej + δdTej Fej (2.46)
j=1 j=1 j=1
The formulation of the finite element method for a rod is similar to the bar, therefore the
different steps are here demonstrated.
In Figure 2.7 it is possible to see the loads present in the rod formulation. This loads are a
distributed torsion moment Wx and two concentrated torsion moments Mx one at each rod’s
tip.
16
Figure 2.6: Bar Matrices
The displacement in this case is the torsion along the x axis θx and the displacements vector
is now represented as shown in Equation 2.47. The ψ function is the contribution of the cross-
section warping.
ψ(y, z) ∂θ
∂x
x
s(x, y, z, t) = −zθx (2.47)
yθx
17
The strain and stress vectors are obtained by substituting the displacement in Equation 2.3.
0
0
0
ε = ∂ψ (2.48)
( ∂y − z) ∂θ x
∂x
( ∂ψ + y) ∂θx
∂z ∂x
0
0
0
0
σ = ∂ψ (2.49)
G( ∂y − z) ∂θx
∂x
G( ∂ψ + y) ∂θx
∂z ∂x
0
The variation of the internal work δWint is given by equation 2.50 and replacing ε and θ by the
values in Equations 2.48 and 2.49 it is possible to obtain Equation 2.51.
∫
δWint = δεσdV (2.50)
V
∫ (( ) ) ( ) (( ) ) ( )
∂ψ ∂θx ∂ψ ∂θx ∂ψ ∂θx ∂ψ ∂θx
δWint = δ −z G −z +δ +y G +y dV (2.51)
V ∂y ∂x ∂y ∂x ∂z ∂x ∂z ∂x
The volume integral is then separated into two other integrals for the area and length and
assuming that the material properties do not change across the cross-section area it is possible
to assume GJ as the bar torsional stiffness and the variation of the internal work is now:
∫
∂θx ∂θx
δWint = δ GJ dx (2.52)
l ∂x ∂x
Once again the variation of the external work δWext is the sum of the inertia and loads works
as represented in the following equation:
The last two works can be replaced by its terms and Equation 2.54 is achieved.
18
∫ ∫
δWext = − δsρs̈dV + δsWx dx + δθx (0, t)Mx0 + δθx (l, t)Mxl (2.54)
V l
Replacing in Equation 2.54 the displacement by 2.47 and after performing some algebra calcula-
tions the variation of the external work for this case is given by Equation 2.55. In this equation
Ip represents the inertial polar moment. Other constant Iψ related to the warping of the cross-
section was derived in this step, but it was neglected because its dimension is very small when
compared with the polar moment of inertia.
∫ ∫
δWext = − δθx Ip θ¨x dx + δθx Wx dx + δθx (0, t)Mx0 + δθx (l, t)Mxl (2.55)
l l
Then it is required to obtain the approximation function for the displacement θx . This step is
the same as the bar.
[ ]
θx1 (t)
de (t) = (2.56)
θx2 (t)
[ ]
N (ξ) = 1 − ξ ξ (2.57)
19
dN [ ]
= −1 1 (2.58)
dξ
Going back to the PVW and replacing in Equation 2.63 by the values on the Equations 2.52 and
2.55 and transposing the matrices to allow the algebraic computations the Equation 2.61 is
obtained.
∫ ∫ ∫
∂θx T ∂θx
δ GJ =− δθxT Ip θ¨x dx + δθxT Wx dx + δθxT (0, t)Mx0 + δθxT (l, t)Mxl (2.61)
l ∂x ∂x l l
After performing the coordinate change to the local coordinate ξ and applying the approximation
function 2.59 in the motion equation 2.61 it is possible to have the FEM equation for the rod
2.62, where it is assumed that GJ and Ip do not change along the element.
∫ 1
1 ∂N T ∂N
δdTe GJe dξde =
le 0 ∂ξ ∂ξ
∫ 1 ∫ 1
(2.62)
−δdTe le N Ipe N dξ d¨e + δ(de ) le
T T T
N Wxe dξ + δdTe N (0)T Mx1 + δdTe N (1)T Mx2
0 0
In which Ke , Me , Fe and de represent the stiffness 2.64 and mass 2.65 matrices and loads 2.66
and displacements 2.67 vectors respectively.
[ ]
GJe 1 −1
Ke = (2.64)
le −1 1
20
[ ]
le Ipe 2 1
Me = (2.65)
6 1 2
[ ] [ ] [ ]
le Wxe 1 1 0
Fe = + Mx1 + Mx2 (2.66)
2 1 0 1
[ ]
θ x1
de = (2.67)
θ x2
The general formulation of the beam problem is equal to the previous ones, the only main
difference is that in this problem there are two displacements to take into account. This two
displacements are a linear displacement w and a rotation θx .
To simplify this case it is possible to assume a decoupled Euler-Bernoulli beam theory so the
displacements vector is represented by equation 2.68.
∂w
−z ∂x
s(x, t) = 0 (2.68)
0
21
∂w
θy = (2.69)
∂x
Assuming the relation of the previous equation 2.69 and using Equation 2.3 it is possible to
achieve the strain vector 2.70 for the beam.
∂2w
−z ∂x2
ε = 0 (2.70)
0
Once having the strain vector, using the constitutive relation the stress vector is equal to 2.71.
∂2w
−z ∂x2
σ =E 0 (2.71)
0
After this first step, the second one is to calculate motion equation for the beam. To perform
this step the PVW is used and the variation of the internal work δWint is given by the following
equation:
∫
δWint = δεσdV (2.72)
V
Using the Equations 2.70 and 2.71 in Equation 2.72, Equation 2.73 is obtained.
∫
∂2w 2 ∂2w
δWint = δ z E 2 dV (2.73)
V ∂x2 ∂x
In the last equation the volume integral is transformed into an area and a length integrals and
assuming that the material properties do not change across the cross-section area it is possible
to assume EIyy as the beam bending stiffness. After integrate the equation by parts twice and
assuming EIyy constant along x-axis the variation of the internal work for this beam is given by
Equation 2.74.
[ ]l [ ]l ∫
∂w ∂2w ∂3w ∂4w
δWint = δ EIyy 2 − δwEIyy 3 + δwEIyy 4 dx (2.74)
∂x ∂x 0 ∂x 0 l ∂x
Then it is required to have the variation of the external work δWext . This is the sum 2.75 of the
22
work done by the beam inertia and the external loads applied as Figure 2.9 shows. The inertial
loads are related with the displacement s and the beam density ρ.
∫ ∫ ∫
∂w
δWext = − δsρs̈dV + δwQz dx δ Wy dx + δw(0, t)Pz0 + δw(l, t)Pzl +
V l l ∂x
(2.76)
∂w ∂w
δ (0, t)My0 + δ (l, t)Myl
∂x ∂x
Once again it is assumed that the material properties do not change across the cross-section
area and remember the Equation 2.69 the variation of the external work is:
∫ ∫ ∫
δWext = − δwmẅdx + δwQz dx + δθy Wy dx + δw(0, t)Pz0 + δw(l, t)Pzl +
l l l (2.77)
δθy (0, t)My0 + δθy (l, t)Myl
Then it is necessary to have the approximation function for the displacements. Like the previous
cases lets start by assuming a variable change. It is assumed the discretization of the position
domain looking for a single element with two nodes, as represented in 2.10.
23
θyj (t) - displacement of the element right node
wj−1 is at ξ = 0 and wj is at ξ = 1
The first step is to calculate the relation between ξ and x, that is given by Equation 2.78 and
the variation by 2.79.
x − (j − 1)le
ξ= (2.78)
le
dx = le dξ (2.79)
Similar to the bar and rod cases a linear interpolation is used in order to interpolate the el-
ement displacement between the two nodes. Although, for the beam problem there are four
displacements to take into account, so a fourth order polynomial function is used 2.80.
w(ξ, t) = a + bξ + cξ 2 + dξ 3 (2.80)
And using the boundary conditions w(0, t) and w(1, t) it is possible to have the relations 2.81 and
2.82.
w1 = a (2.81)
w2 = a + b + c + d (2.82)
dw
= b + 2cξ + 3dξ 2 (2.83)
dξ
Remember the relation between the vertical displacement w and the θy for the first node, where
the local coordinate ξ is zero:
24
dw
(0) = θy1 (2.84)
dx
And using the equation 2.79 it is possible to have the derivative of the displacement w in function
of the local coordinate ξ 2.85.
dw dw
(0) = le (0) (2.85)
dξ dx
dw
(0) = le θy1 (2.86)
dξ
And finally applying Equation 2.83 for the first node where the local coordinate is zero it is
possible to have the relation 2.87.
le θy1 = b (2.87)
Using the same explanation as above for the second node it is possible to have the relation 2.88.
le θy1 = b + 2c + 3d (2.88)
It is now possible to combine the Equations: 2.81, 2.82 2.87 and 2.88 to have an equation system
2.89.
w1 = a
l θ = b
e y1
(2.89)
w2 = a + b + c + d
l θ = b + 2c + 3d
e y2
25
a = w1
b = l θ
e y1
(2.90)
c = w2 − w1 − le θy1 − d
3d = l θ − l θ − 2(w − w − l θ − d)
e y2 e y1 2 1 e y1
a = w1
b = l θ
e y1
(2.91)
c = w2 − w1 − le θy1 − d
d = l θ − l θ − 2w + 2w + 2l θ
e y2 e y1 2 1 e y1
a = w1
b = l θ
e y1
(2.92)
c = −3w1 − 2le θy1 + 3w2 − le θy2
d = 2w + l θ − 2w + l θ
1 e y1 2 e y2
After solving the equation system it is possible to have the constants 2.92 of the approximation
equation 2.80 and rewrite it as Equation 2.93.
The last equation can be compacted in a matrix form where N is the local coordinate matrix
2.96 and de the displacement matrix 2.95 for the two nodes of the element.
w1 (t)
θy1 (t)
de (t) = (2.95)
w2 (t)
θy2 (t)
[ ]
N (ξ) = 1 − 3ξ 2 + 2ξ 3 le (ξ − 2ξ 2 + ξ 3 ) 3ξ 2 − 2ξ 3 le (−ξ 2 + ξ 3 ) (2.96)
26
Analysing the equations of the internal 2.74 and external 2.77 work it is required to have the
first and second derivatives of the displacement function w in function of ξ. So these derivatives
are represented in Equations 2.97 and 2.98.
dN [ ]
= −6ξ + 6ξ 2 le (1 − 4ξ + 3ξ 2 ) 6ξ − 6ξ 2 le (−2ξ + 3ξ 2 ) (2.97)
dξ
d2 N [ ]
2
= −6 + 12ξ le (−4 + 6ξ) 6 − 12ξ le (−2 + 6ξ) (2.98)
dξ
Matching the equation of the variation of internal work 2.74 with the equation of the variation
of external work 2.77 it is possible to have Equation 2.100.
∫
∂2w ∂2w
δ EI yy dx =
∂x2 ∂x2
∫ ∫ ∫ l
∂w
− δwmẅdx + δwQz dx + δ Wy dx + δw(0, t)Pz0 + δw(l, t)Pzl + (2.100)
l l l ∂x
∂w ∂w
δ (0, t)My0 + δ (l, t)Myl
∂x ∂x
Once again this equation uses matrices to perform the algebraic calculations correctly it is
required to transpose the first matrix of each term.
∫ T
∂2w ∂2w
δ 2
EIyy 2 dx =
l ∂x ∂x
∫ ∫ ∫ T
∂w
− δwT mẅdx + δwT Qz dx + δ Wy dx + δwT (0, t)Pz0 + δwT (l, t)Pzl + (2.101)
l l l ∂x
∂w T ∂w T
δ (0, t)My0 + δ (l, t)Myl
∂x ∂x
The finite element method is a sum of the PVW of each element so:
27
N ∫
∑ jle T
∂2w ∂2w
δ EJ y ej (ξ) dx =
j=1 (j−1)le ∂x2 ∂x2
N ∫
∑ N ∫
∑ N ∫
∑
jle jle jle
∂w T (2.102)
− T
δw mej ẅdx + T
δw Qzej (ξ)dx + δ Wyej (ξ)dx
j=1 (j−1)le j=1 (j−1)le j=1 (j−1)le ∂x
T
∂w ∂w T
+δwT (0, t)Pz1 + δwT (l, t)Pz2 + δ (0, t)My1 + δ (l, t)My2
∂x ∂x
Considering just one element, the last step to formulate the FEM for a beam is to use the
approximation Function 2.94 and its derivatives and variation in the PVW 2.101 and obtain the
FEM Equation 2.103.
∫ 1 T
∂2N 1 ∂2N
δdTe EIyye dξde =
0 ∂ξ
2 le3 ∂ξ 2
∫ 1 ∫ 1 ∫
1 1 ∂N T
−δdTe le N T me N dξ d¨e + δdTe le N T Qze dξ + δdTe Wye dξ (2.103)
0 0 le 0 ∂ξ
∂N T ∂N T
+δdTe N (0)T Pz1 + δdTe N (1)T Pz2 + δdTe (0)My1 + δdTe (1)My2
∂ξle ∂ξle
In this compact form Ke 2.106, Me 2.108, Fe 2.110 and de 2.111 are the stiffness and mass
matrices and loads and displacements vectors respectively. This matrices are obtained after
substituting the vector N 2.96 and its derivatives in Equations 2.105, 2.107 and 2.109.
∫ 1 T
1 ∂2N ∂2N
Ke = EIyye dξ (2.105)
le3 0 ∂ξ 2 ∂ξ 2
12 6le −12 6le
∫
EIyye 1 6le 4le2 −6le 2le2
Ke = (2.106)
le3 −12 −6le −6le
0 12
6le 2le2 −6le 4le2
28
∫ 1
Me = le N T me N dξ (2.107)
0
156 22lej 54 −13lej
le me
22lej
2
4lej 13lej 2
−3lej (2.108)
Me =
420 54 13lej 156 −22lej
−13lej −3lej
2
−22lej 2
4lej
∫ 1
Fe = l e N T Qze dξ + N T (0)Pz1 + N T (1)Pz2 +
0
∫ T
(2.109)
1 1
∂N ∂N T ∂N T
Wye dξ + (0)My1 + (1)My2
le 0 ∂ξ ∂ξle ∂ξle
1 1 0 −1 0 0
le
le Qze 6 0 0 Wye 0 My1 1 My2 0
Fe = + + (2.110)
2 1 + Pz1 0 + Pz2 1 + le 1 le 0 le 0
− l6e 0 0 0 0 1
w1
θy1
de =
w (2.111)
2
θy2
This beam is similar to the previous one, but the displacement that are implicit here are v and
θz . Once the formulation is equal only the initial displacements 2.112, strain2.115 and stress
vectors2.116 and the final matrices are displayed.
29
Figure 2.11: Beam 2
yθz (x, t)
s(x, t) = v(x, t) (2.112)
0
It is considered that: γxy = γxz = 0 the cross section is small when compared with the length
so:
∂v
θz = − (2.113)
∂x
∂v
−y ∂x
s(x, t) = 0 (2.114)
0
∂2v
−y ∂x2
ε= 0 (2.115)
0
∂2v
−y ∂x2
σ = Cεx = E 0 (2.116)
0
Assuming the discretization of the position domain and looking for a single element with two
nodes 2.12 it is possible to obtain the approximation function.
30
Figure 2.12: Beam 2 Displacements
vj−1 is at ξ = 0 and vj is at ξ = 1
v1 (t)
θz1 (t)
de (t) =
v (t) (2.118)
2
θz2 (t)
[ ]
N (ξ) = 1 − 3ξ 2 + 2ξ 3 le (ξ − 2ξ 2 + ξ 3 ) 3ξ 2 − 2ξ 3 le (−ξ 2 + ξ 3 ) (2.119)
dN [ ]
= −6ξ + 6ξ 2 le (1 − 4ξ + 3ξ 2 ) 6ξ − 6ξ 2 le (−2ξ + 3ξ 2 ) (2.120)
dξ
d2 N [ ]
= −6 + 12ξ le (−4 + 6ξ) 6 − 12ξ le (−2 + 6ξ) (2.121)
dξ 2
And finally:
31
δv(ξ, t) = N (ξ)δdej (t) (2.122)
∫ 1 T
∂2N 1 ∂2N
δdTe EIzze dξde =
0 ∂ξ
2 le3 ∂ξ 2
∫ 1 ∫ 1 ∫ 1
¨ T 1 ∂N T
−δde le
T T T
N me N dξ de + δde le T
N Qye dξ + δde Wze dξ (2.123)
0 0 le 0 ∂ξ
∂N T ∂N T
+δdTe N (0)T Py1 + δdTe N (1)T Py2 + δdTe Mz1 + δdTe Mz2
∂ξle ∂ξle
12 6le −12 6le
EIzze 6le 4le2 −6le 2le2
Ke = (2.125)
le3 −12 −6le −6le
12
6le 2le2 −6le 4le2
156 22lej 54 −13lej
le me
22lej
2
4lej 13lej 2
−3lej (2.126)
Me =
420 54 13lej 156 −22lej
−13lej −3lej
2
−22lej 2
4lej
1 1 0 −1 0 0
le
le Qye 6 0 0 Wze 0 M z1 1 Mz2 0
Fe = + + (2.127)
2 1 + Py1 0 + Py2 1 + le 1 le 0 le 0
−6le
0 0 0 0 1
v1
θz1
de =
v
(2.128)
2
θz2
32
2.7 General Problem
The last step is to join the four resultant matrices in one and it is possible to obtain the general
matrices for one element with two tip nodes. The main requirement to do this matrix summation
is to select an order for the displacements and then respect that order for the displacements,
rigidity and loads matrices. The order chosen for this case is: beam 1, beam 2, rod and bar. That
translates in terms of displacements as: w, v, u, θy , θz and θx for node one and two respectively.
w1
v1
u
1
θy1
θ
z1
θx1
de =
w
(2.129)
2
v2
u
2
θy2
θ
z2
θ x2
le Q z W
2
e
+ Pz1 − leye
le Q y e W
2 + Py1 − leze
l Q
e xe
+ Px1
2
le2 Qze My1
12 + le
le2 Qye + Mz1
le W 12 le
xe
+ M
Fe = 2 x1 (2.130)
le Qze + P + Wye
2 z2
le Q y e le
2 + Py2 + Wl ze
e
le Qxe
+ Px2
2
− le Qze + My2
2
12 le
l2 Q M
− e 12ye + lez2
le Wxe
2 + Mx2
33
34
EIyye EIyye EIyye EIyye
12 le3 0 0 6 le2 0 0 −12 le3 0 0 6 le2 0 0
EIzze EIzze EIzze EIzze
0 12 0 0 6 0 0 −12 0 0 6 0
le3 le2 le3 le2
EAe e
0 0 le 0 0 0 0 0 − EA
le 0 0 0
EIyy EI e EI e EIyye
6 2e
le 0 0 4 lyy
e
0 0 2
−6 lyy 0 0 2 le 0 0
e
EIzze EIzze EIzze EIzze
0 6 le2 0 0 4 le 0 0 −6 le2 0 0 2 le 0
GJe e
0 0 0 0 0 le 0 0 0 0 0 − GJ
le
Ke = e EI e EI e EI e
3
−12 EIlyy 0 0 2
−6 lyy 0 0 3
12 lyy 0 0 2
−6 lyy 0 0
e e e e
EI e EI e EIzze EIzze
0 3
−12 lzz 0 0 2
−6 lzz 0 0 12 0 0 −6 0
e e le3 le2
e EAe
0 0 − EA
le 0 0 0 0 0 le 0 0 0
EIyye EI e EI e EI e
6 l2 0 0 2 lyy
e
0 0 2
−6 lyy 0 0 4 lyy
e
0 0
e e
EI e EI e EI e EIzze
0 2
6 lzz 0 0 2 lzz
e
0 0 2
−6 lzz 0 0 4 le 0
e e
e GJe
0 0 0 0 0 − GJ
le 0 0 0 0 0 le
(2.131)
156le me 22le2 me 54le me −13le2 me
420 0 0 420 0 0 420 0 0 420 0 0
0 e me 22le2 me 54le me −13le2 me
12 156l
420 0 0 420 0 0 420 0 0 420 0
2le me le m e
0 0 6 0 0 0 0 0 6 0 0 0
22l2 m 4le3 me 13le2 me −3le3 me
e e 0 0 0 0 0 0 0 0
420 420 420 420
22le2 me 4le3 me 13le2 me −3le3 me
0
420 0 0 420 0 0 420 0 0 420 0
0 2le Ipe le Ipe
0 0 0 0 6 0 0 0 0 0 6
Me = 54l m 13le2 me 156le me −22le2 me
e e 0 0 0 0 0 0 0 0
420 420 420 420
54le me 13le2 me 156le me −22le2 me
0 420 0 0 420 0 0 420 0 0 420 0
0 le m e 2le me
0 6 0 0 0 0 0 6 0 0 0
−13le2 me −3le3 me −22le2 me 4le3 me
420
0 0 420 0 0 420 0 0 420 0 0
0 −13le2 me −3le3 me −22le2 me 4le3 me
420 0 0 420 0 0 420 0 0 420 0
le Ipe 2le Ipe
0 0 0 0 0 6 0 0 0 0 0 6
(2.132)
35
The general problem allows the computation in a 3D space of structures that may not be aligned
with the x-axis as the FEM formulation was developed. So, it is first required to perform a space
rotation to ensure that the general reference axes are coherent. This rotation is done using the
matrix 2.133 where A represents the matrix with the transformation using the three possible
rotation angles: ϕhe , ϕve and ϕxe for each element as Figure 2.13 shows, and B is a zeros matrix.
A B B B
B A B B
rote =
B
(2.133)
B A B
B B B A
cos ϕhe × cos ϕve cos ϕxe × sin ϕhe sin ϕhe × sin ϕxe
− cos ϕhe × sin ϕve × sin ϕxe + cos ϕhe × cos ϕxe × sin ϕve
A = − cos ϕve × sin ϕhe cos ϕhe × cos ϕxe cos ϕhe × sin ϕxe (2.134)
+ sin ϕhe × sin ϕve × sin ϕxe − cos ϕxe × sin ϕhe × sin ϕve
− sin ϕve − cos ϕve × sin ϕxe cos ϕve × cos ϕxe
0 0 0
B = 0 0 0 (2.135)
0 0 0
This rotation is done by multiplying the stiffness 2.136, mass 2.137 and loads matrices with the
36
rotation matrix 2.133. The loads matrix does not require this step because the loads are initially
inserted assuming the general reference axis.
Fe = rotTe × Fe (2.138)
The last step before the computation of the displacements is to assemble the general matrices
for the structure, those matrices contain now all the mesh elements. After assuming an order
for the global nodes in the final matrices the principle is to sum, in the correct position of this
matrix, the equal degrees of freedom of the nodes of each individual element matrix. If there
is not any global node in more than two elements and the nodes are ordered consecutively this
step can be done as Figure 2.14 shows, in which each X represents the six DOF of one node.
Once having those matrices, the structural displacements problem 2.139 can be solved using
methods like: elimination of variables, Cramer’s rule or row reduction (also known as Gaussian
elimination). In this code the Gauss elimination method is used. The natural frequency free
vibrations are calculated using by calculating the eigenvalues ω of the equation 2.140 and the
eigenvectors ν. Linear Algebra Package (LAPACK) is a software library that is applied in the code
37
to solve the two solutions.
K ×d=F (2.139)
K × ν = ω2 × M × ν (2.140)
38
Chapter 3
Code Development
This chapter shows how to apply the mathematical model to a computer code. The code should
have a simple and clear structure, like Figure 3.1, to avoid errors and allow future developments.
So, the current code is divided into the following items:
1. Input data:
2. Section geometry:
3. Generate mesh;
9. Apply the problem boundary conditions to the loads and displacements vectors;
As it is possible to see in Figure 3.1 the tasks above follow an order that the code must respect
to be able to perform a correct analysis.
39
Figure 3.1: Code Flow Chart.
The first part is to load the inputs (see section 3.2) then calculate the cross-section properties
and determine the mesh for the analysis. Once having this it is possible to generate the required
matrices and vectors that take part of FEM, as stiffness and mass matrices. It is then possible to
perform the two analyses and obtain the final results that will be shown in the analysis windows
and saved to a file to allow a future comparison between different analysis results. More details
about the outputs are explained in section 3.2.
To generate the mesh, the user provides different cross-section shapes and coordinates for its
space position and then makes sections with those cross-sections, like in Figure 3.2. Then these
sections are divided into small pieces called elements. The number of elements in each section is
defined by the fraction of the section length by the total structure length. The nodes coordinates
can now be computed assuming that each element has two nodes, one in each extremity, and
that the second node of one element is the same of the first node of the following element. It is
also assumed that the nodes connect each shear centre of each cross-section. The cross-section
properties can now be applied to the correspondent elements.
To generate the stiffness, mass and load matrices the first step is to build matrices 2.131, 2.132
and 2.130 for each element and also the rotation matrix 2.133. These matrices are later reduced
to just the current analysis degrees of freedom and the rotation is applied to the element. Then
those matrices need to get the full problem size, that is the number of nodes times the number
of DOF for the analysis. To achieve that dimensions, the matrices are fulfilled with zeros in
the positions of the nodes and DOF that are not taken into account for the respective element.
Finally, all the elements expanded matrices are combined into one to form the final matrices.
A practical way to program the above items is to create a main program, like Figure 3.3 shows,
40
Figure 3.2: Mesh Generation.
from which different subroutine are called. Inside the mesh subroutine other subroutine is called
to perform the computation of the cross-section properties that can be different between the
elements along the structure. It was also created other Fortran file that stores all the variables.
These variables are divided in modules, listed in Figure 3.4, to be easier to identify them.
41
3.2 Inputs and Outputs
The inputs for the code are few and quite simple allowing an intuitive understanding of this tool.
They are inserted in a proper .txt file called ’inputs’ that is read by the code. It is possible to
divide the inputs into three different groups: general data (Figure 3.5), structure data (Figure
3.6) and boundary conditions (Figure 3.7) and loads data. A fourth group can be considered,
where the cross-section and material properties data bases lists are described, like Figure 3.8
shows, and these are linked with the structure.
The general data indicates the DOF that the user wants to calculate. As already explained, this
code allows the computation of six displacements, each displacement is considered as one DOF.
Firstly, it is required the number of DOF that will take part in the analysis. Then the user should
indicate the numbers of the DOF according to the information provided. It is not necessary to
introduce them by ascending order, because the code will organize them that way.
This is a structural analysis code, so the structure properties are required. First the user must
define the number of cross-sections that makes the structure and then provide the coordinates
x, y and z of its position in space. It is also fundamental to know the material and the shape
of the cross-sections, so the user must provide an identification number (ID) to the desired
selections from the corresponding lists bellow, represented in Figure 3.8. Then the number of
sections should be provided and after that the ID number of the initial and final cross-sections
of each structure section.
Not least important is the loads input data. These inputs are divided in boundary conditions,
concentrated loads and distributed loads. The user enters the BC position coordinates and then
the conditions are based in a binary code, where one means that the the DOF is free and zero
42
Figure 3.7: BC and loads inputs.
means it is fixed. To input the concentrated loads it is required to know the desired application
position coordinates and the load magnitude in each direction, this load can be a force or a
moment. For the distributed loads the principles are the same as the concentrated ones, but it
is required to input the initial and final points where the loads are being applied.
Once the calculations are done it is necessary to show the results. Some of these results are
instantly displayed in the code running windows but these are just the final results from each
code section. A .txt file is generated in the code section ’outputs’ and it is here that the user
can check and confirm all the data generated in the code.
43
Other four .DAT files are generated to allow the graphical view of the structure. This files are
named as: ′ out_nodes_initial′ , ′ out_nodes_f inal′ , ′ out_section_initial′ and ′ out_section_f inal′
and as the names indicate their content is related with the nodes that generate the analysis
FEM mesh and the cross-sections coordinates. These files are in Tecplot format so that they can
be easily uploaded to this software and the result graphically displayed, as Figure 3.10 shows.
3.3 Cross-Section
For this program there have been chosen two different groups of cross section to perform the
analysis. The first group is the standard cross-section as: C, T, L, U, I channels and solid and
tubular square and circular sections. The second group is the airfoil, that can be solid, as Figure
3.11 shows, or just the skin, like in Figure 3.12. In a future work it will be included airfoil skin
section with spars.
For this cross-sections the inputs, listed in Figure 3.8 are: chord, incidence angle and its position
along the chord and the thickness. It is also required a .txt file with the coordinates of the airfoil.
If the desired cross-section is one of the standard, the reference letter in the inputs file, on the
44
cross-section list, in Figure 3.8, matches with a bunch of figures provided, for example in the
case of a cross-section C shaped represented in Figure 3.13.
After studying the mathematical model, it was possible to conclude that to achieve the desired
result it is required to have some information about the structure cross-section. This information
includes the following items:
1. Area;
5. Torsion constant.
Other inputs to fulfil the FEM initial conditions are the material properties, as already explained
in the constitutive model they take an important role in this method. In the cross-section inputs
the user must enter one ID for the material, this ID should be coherent with the list of materials,
in Figure 3.8. This list has the following items:
45
Besides the properties required for FEM the material density is used to calculate the structure
mass and the tensile and compressive strengths are not used in this code, although they can be
useful for future works, for example, to calculate limit loads or the cross-sections properties
in a limit loading case. All these properties should be provided in the pre-established unit of
measure and magnitude because the present code does not perform any conversion to these
units.
46
Chapter 4
Code Validation
After understanding the FEA mathematical model and developing an algorithm to apply the
methodology it is necessary to test the code to see if it is reliable and provides valid results.
In order to validate the code, it is required to run some analyses and compare the results to
the ones given by some previously validated software. The first step is to choose some cases
that are simple to understand and to confirm the results. Then these cases are applied to the
developed code and to the Ansys software. After running the solution the results are compared
and discussed.
The first three cases are a 3m length steel (see material properties in Table 4.1) beam, with
a built-in tip and a 3000N vertical (parallel to z-axis) concentrated load at the free tip. In
the code 20 linear elements are selected an therefore the analysis has 21 nodes. In Ansys the
mesh generated has 21 quadratic beam elements (BEAM189 Ansys elements) that have 3 node
each and that makes a total of 43 nodes. Only the cross-section is different and this difference
is enough to change significantly the stiffness matrix values and therefore the results. The
principal result in this analysis is the tip displacement and the free vibration modes. Other
concern are the cross-section properties values that the code calculates, so this results should
also be checked.
Firstly, it is necessary to define the material that will be used for the different analysis. It is
very important that the material properties are correct because, as it was seen above in the
stiffness matrix, they influence directly the final results. So in Table 4.1 it is possible to see the
values for different materials. All of them are considered as isotropic because the code only
takes into account this type of materials.
Property Value
Name steel aluminium pine wood Rohacell 110 A
Density ρ [kg/m3 ] 7850 2710 500 110
Young’s Modulus E [P a] 200e+009 70e+009 17e+009 0.16e+009
Shear Modulus G [P a] 76.9e+009 26e+009 5.9e+009 0.05e+009
Poisson’s Ratio ν [adm] 0.30 0.34 0.44 0.6
47
The following tables show a comparison between the code results and an analysis performed with
the FEA software Ansys. Several cross-section and structure parameters and the displacement
at the structure tip and the six first free vibration frequencies where compared. The difference
between the two analysis results is quantified by the deviation (in percentage), where the Ansys
results are assumed as the reference values.
4.2.1 Case 1
For the first case the cross-section chosen is a circular shape with 0.04m diameter.
Figure 4.1 helps the user to understand the dimensions of the cross-section that will be analysed.
From Table 4.2 it is possible to conclude that the code is reliable to compute the cross-section
48
properties of a circular shaped cross-section. The worst result is an error of about 1.5% and it
occurs for the torsion constant. Similar error occurs in the computation of the area moments,
this happens because Ansys software uses finite elements to approximate the cross-section prop-
erties and the code calculates them using analytic equations. The code final results for the tip
displacement and for the free vibration frequencies are also very close to the ones from Ansys.
It is then plausible to assume that the code is a useful tool for this simple case.
4.2.2 Case 2
With the help of Figure 4.2 it is possible to fill the input file with the correct dimensions. The
sides a, b and c are 0.05m length and the thicknesses d, e and f are equal to 0.005m.
49
Once again, looking at Table 4.3, it is viable to use the code to compute the cross-section
properties for this case. Almost all the code values have zero difference face to Ansys values,
including structure mass and volume. The torsion constant has the largest error, although the
order of magnitude is the same, so it is a plausible value for this property. The difference in
the torsion constant is explained taking into account that Ansys uses a finite element model of
the cross-section to approximate the properties and the code uses a more simple approximation
equation that is described in [Bea10]. The tip displacements has a deviation of more than five
percent that is a relatively high value.
The free vibration modes shapes for the Ansys and code analysis are, respectively, represented in
Figures 4.3 and 4.4. In an ascending order of the vibration frequencies, the respective displayed
colours, in the Figures, are: yellow, dark green, blue, orange, grey and light green. To guarantee
a mesh convergence and better values for the frequencies the number of elements in Ansys
was increased to 64 elements (129 nodes). The number of elements in the code analysis was
also increased, but the values not change significantly. The free vibration frequencies have an
acceptable deviation for the three first modes, although for the higher frequencies modes the
deviation between the two values increases to 10% in the sixth mode. These six frequencies are
for the vertical displacement DOF, in a future work the respective frequencies for all DOF will
also be developed. A plausible explanation for the increasing deviation value lies in the fact
that the beam elements used by Ansys (BEAM 189 element) that have a quadratic interpolation
and includes shear deformation effects in the stiffness matrix.
50
Figure 4.5: Square Tube cross-section.
4.2.3 Case 3
The third case is very similar to the other two. The main difference is the cross-section, that in
this case is a square tube with an external side length of 0.05m and 0.005m thickness, as Figure
4.5 shows.
The result in this case, displayed in Table 4.4, are very favourable, the tip displacement error is
less than 0.1% and the five first vibration frequencies have errors less than 3%. Once again the
worst value is related with the torsion constant. The order of magnitude of the torsion constant
for this third case is different and that motivates to reconsider a better way to calculate this
property. This difference is due to the approximation formula, presented in [Bea10], that the
code uses.
51
4.2.4 Case 4
It is required to perform one more analysis to check if it is possible to compare the code results
to the result from an analysis using 3D elements. A structure with 1m length and a circular
cross-section with 0.08m diameter is selected for this analysis. The beam material is steel and
the boundary conditions are a built-in tip and a free tip and a 2000N vertical distributed force
along the beam length. Similar to the previous cases the degree of freedom taken into account
is the vertical displacement. In this case 40 elements, therefore 41 nodes, are selected to run
the code analysis and the automatic mesh generator in Ansys created 120 SOLID186 (see Figure
5.6) elements that correspond to 725 nodes.
In Figure 4.6 it is possible to see the mesh generated by Ansys and check that in this software
the elements used are defined in 3D. Looking to the code mesh, in Figure 4.7, it is possible to
see that the structure is assumed as a line composed by 1D elements. The green line represents
the nodes initial positions and the red line represents the nodes final position after the load has
been applied. The code analysis is initially done using only 20 elements, but then this number
was increased to 40 to ensure that the results converged.
To compare the two analysis, the beam displacements along its length are summarized in a chart
displayed on Figure 4.8.
It is possible to see that the two plot lines are almost coincident. In conclusion, there is no
significant deviation between a structural analysis computed using 1D elements and a more
complex one with 3D elements, for these simple structures. In fact the displacement error at
the free beam tip is 0.016%.
52
Figure 4.8: Case 4 Results.
53
54
Chapter 5
A final code validation is done using the propellers described in [Mor16]. Table 5.1 summarizes
the shapes and materials of the different blades that will be analysed.
Once uploaded the blade airfoils, dimensions, structure concepts and materials to the code input
file it is possible to obtain the first results. The cross-section properties are initially calculated
and compared with the results determined by [Mor16] from CATIA V5 software. The airfoils used
and the respective chords are:
Table 5.2: Cross-section properties comparison using code and CATIA V5.
55
Similar to the last chapter the comparison between the two results is done by calculating the
error. Looking at Table 5.2 it is possible conclude that the cross-section properties values are in
good agreement with CATIA, because the deviations are less than one percent. This had already
been concluded in chapter 3.3. Only some second area moments have high errors and this is
due to the approximations made by the calculation method of this property.
Other important properties that are fundamental to check are the blade volume and mass. This
two parameters are important to define the blades geometries and are summarized in Table 5.3.
Table 5.3: Volume and Mass comparison using code and CATIA V5.
Looking at Table 5.3 the errors for the mass and volume of blades 1 and 2 is less than 1% so it is
viable to assume that the code can represent structures with a solid airfoil shape cross-section
and without taper. Although if the goal is to calculate a skin airfoil shape cross-section, like
blade 3, the error is significantly high and this leads to big errors in the analysis displacements.
For an airfoil with skin and a core the code does not take into account the core, so the results
for the blade 4 are equal to blade 3. This error occured because the code assumes that the
airfoil coordinates given by the user are the midpoint of the skin thickness, as in Figure 5.2,
when it should be interior to the coordinates, as CATIA V5 does, as represented in Figure 5.1.
The last blade has an error for both mass and volume of 1% so the code can represent a tapered
blade with different airfoils for the root and tip with a good accuracy.
The next step is to analyse the blades with the code and the FEM software Ansys and compare
both results. The blades are assumed as built-in and have a free-tip and a 2000N distributed
vertical force is applied.
To perform an analysis in Ansys it is first required to draw the different blades in CATIA V5 and
56
then save them as .igs file format. Then a “Static Structural” Analysis should be selected in
Ansys and follow the required steps as Figure 5.3 shows.
In the “Engineering Data” field, the material properties are loaded. Then in “Geometry” the
blades are created, in this case it is just necessary to upload the .igs files that were previously
generated. Then in the field “Model” the mesh is generated automatically by the software
automatic mesher. The fourth step is to apply the boundary conditions and loads in “Setup”.
In Ansys the force is distributed along all the blade surface. Then it is required to choose the
desired analysis outputs and this is performed in “Solution”. Here the vertical displacement is
chosen. Finally the software can solve the problem and display the results.
To perform an analysis in the developed code, the main step that the user needs to do is to
fill the inputs file with the required parameters. To analyse different structures, where the
main differences are the cross-section and the material, the user can first input all the desired
cross-sections 5.5 and materials and then just select them on the cross-section properties area
as seen in Figure 5.4.
The information about the mesh generated by Ansys is summarized in Table 5.4. It is possible to
see the number of nodes and elements for each blade. Ansys automatic mesh generation uses
two types of elements: a solid type named SOLID186, represented in Figure 5.6, and a surface
57
Table 5.4: Number of Elements and Nodes for Ansys and code mesh.
type named SURF154, represented in Figure 5.7. The solid element is a higher order 3-D 20-node
solid element that exhibits quadratic displacement behaviour and has three degrees of freedom
per node: translations in the nodal x, y, and z directions [ANS18]. The surface element is used
for various load and surface effect applications in 3-D structural analyses and is defined by four
to eight nodes and also uses a quadratic interpolation. In the code analysis the user can define
the number of linear elements, so each element has two nodes and the number of nodes is equal
to the number of elements plus one.
After having performed the analysis, it is then possible to compare the results, that are sum-
marized in the following Figures.
58
Figure 5.8: Comparison of Bending for Blade 1.
As it can be seen in Figure 5.8, that represents the blade 1 displacement, the two curves are
almost identical so, for a structure with two similar solid cross-sections, at each tip, with no
tapering and for a distributed load, the code gives valid results. This final result was already
expected once the properties also have a low deviation. The deviation between the two dis-
placement at the free tip is 1.27% that is an acceptible value.
For blade 2 the two analyses results are once again very similar as Figure 5.9 shows. In this case
there is no taper and the root and tip airfoils are the same. As it is possible to see in Table 5.3 the
blade volume error is higher for this blade than for the previous one, and the same happens with
the displacement error. So, once again the difference between the results from Ansys and from
59
the code can be explained taking into account the initial error in the cross-section properties.
Other problem, with the results obtained, is that the values from the code should be lower than
the values from Ansys, because this code does not consider the shear deformation that occurs.
The displacement’s deviation at the tip is 5.81%. This value is in the limit of an acceptable
error, so the method should be revised to improve the results from the code’s analysis.
If the user wants to analyse a blade with just a skin the error for the vertical displacement will
be very large. At the blade tip the deviation has a maximum value of 47.66% (see Figure 5.10)
that is not an acceptable error for a structural analysis. The explanation for this error is, once
again, due to the large error obtained previously on the cross-section properties calculation,
particularly Ixx . In the stiffness matrix these properties have exponents of two and three, so if
they are wrong the error will increase significantly.
Looking at Figures 5.10 and 5.11 the result are almost the same because the only difference
between these two blades are the foam core. This foam core is not taken into account for the
60
code analysis, so the results are equal for the two blades, and its contribution for the structures
stiffness is almost zero so the Ansys results are very similar. The blade displacement deviation
for this case is 47.46% and the explanation for this big difference between the two analysis
results is the same as for the previous blade.
In Ansys the load is being applied over the blade surface, like in the previous cases, that is
tapered, so at the blade root the loads are higher than at the blade tip. Contrarily, in the code
the load is divided in 10 portions where the load is distributed assuming that the 2000N load is
distributed over the surface area and then multiplied by the blade mean chord of each section.
This is represented by equation 5.1, where w is the distributed load applied to the code, F0 is
the 2000N load, cr , ct and c(r) are the chords at the blade root, tip and at the required blade
radial position, r, respectively and R is the blade radius.
F
w(r) = × c(r) (5.1)
0.5(cr + ct )R
As it is possible to see in Figure 5.12, the two curves are almost identical for the first half of
the blade radius. For the second half the code results are higher than the Ansys and this can
be explained because of an error in the distribution of the load in the code. The code results
can be improved if the load is divided into an increased number of portions. At the blade tip
the deviation is 5.26%, that is an acceptable value for the structural analysis.
In Figure 5.13 it is possible to see a graphical representation of the initial (green mesh) and final
(red mesh) shapes for blade 5. The axis are not in the same scale, otherwise the displacement
would not be easy to see.
61
Figure 5.13: Code Graphical Results Display for Blade 5.
62
Chapter 6
Conclusion
6.1 Conclusions
During this work, a mathematical model for structural 1D finite elements with six, 3D spacial,
degrees of freedom was developed. This six DOF are three displacements along and three ro-
tation about each axis x-, y- and z-. This model is divided in three different problems: bar,
rod and beam and the combination of them provides the general solution for the structural
problem. The result of this task was the stiffness and mass matrices and loads vector and the
formulation to calculate the displacements vector and therefore the structure displacements.
After this first task, a programming code was created with the mathematical formulation de-
scribed. This code allows to compute the displacement of a beam structure when subjected
to different types of loads and also the free vibration modes. The last step was to check the
viability of the code for different structures.
After performing the various analysis the results obtained for the first simple cases are very
favourable. The cross-section properties calculated have the expected values, with deviations
less than one percent in relation to Ansys software, and therefore the structures displacements
and free vibration modes have values that are coherent with the expected values. When the
code runs with a cross-section that has an airfoil shape, the results are not good, because there
are large deviations in the cross-section properties like the shear centre position, scx and scy .
It is possible to conclude that the code works very well for simple cases where the cross-section
properties are simple to calculate using equations. For cross-section with complex shapes, like
airfoils, the methods to calculate the cross-section properties are not viable and this leads to
errors for the final displacements values. A negative point is that the numerical outputs of
the displacements require a graphical display. And for that case it is necessary to use a third
party software like Tecplot. With this work it was possible to confirm the power of the finite
element method to analyse complex structures and see the importance of the stiffness matrix
in a structural analysis.
Future works include increasing the number of cross-sections available and allow the study of
trusses. Improve the calculation methods for the cross-section properties. Implement a mesh
convergence analysis to improve the final results that are dependent of the mesh size. It is also
fundamental to add more degrees of freedom to the modal analysis, to have the free vibration
frequencies and shapes in 3D space. A graphical users interface to improve the user view of
63
the inputs and outputs can also be implemented.
64
Bibliography
[Bat14] Klaus-Jurgen Bather. Finite Element Procedures, Second Edition. ISBN: 978-0-9790049-
5-7. Prentice Hall, Pearson Education, Inc., 2014. xiii, 5, 7
[Bea10] Roy Beardmore. Torsion constant calculation [online]. 2010. Available from: http://
www.roymech.co.uk/Useful_Tables/Torsion/Torsion.html [cited 29 October 2010].
50, 51
[Das18] Dassault Systemes. Abaqus web-page [online]. 2018. Available from: https://www.
3ds.com/products-services/simulia/products/abaqus/ [cited 20 June 2018]. 1
[EC16] Rehan Jamshed Erasmo Carrera, Alfonso Pagani. Refined beam finite elements for
static and dynamic analysis of hull structures. Computers and Structures, 167:37–49,
2016. 1
[Mor16] João Paulo Salgueiro Morgado. Development of an Open Source Software Tool for
Propeller Design in the MAAT Project. UBI, 2016. 2, 3, 55
[MSC18] MSC Software. Patran web-page [online]. 2018. Available from: http://www.
mscsoftware.com/product/patran [cited 20 June 2018]. 1
[OCZ00] R. L. Taylor O. C. Zienkiewicz. The Finite Element Method - Volume 1. ISBN: 0-7506-
5049-4. Butterworth Heinemann, 2000. xiii, 5, 6
[Wik18] Wikipedia. Fortran wikipedia meaning [online]. 2018. Available from: https://en.
wikipedia.org/wiki/Fortran [cited 1 March 2018]. 2
65
66