You are on page 1of 6

Valentin Borisavljevic (2140173) MSc advanced mech. eng.

Proposal for a dissertation with as subject: “write an


advanced finite element analysis solver”

Introduction & background


Multiple physical phenomena are relevant in the context of engineering problems. Typical
examples are the heat transfer within/between a fluid and a solid, the stress distribution
within a solid or the formation of a complex velocity profile in a fluid flow over a solid surface.
Each of those phenomena can be described by a specific differential equation (Smith 2021).
The solution of the equation quantifies the phenomenon: how much heat is exchanged, how
much is the stress at certain positions, what is the velocity throughout the fluid, …

The finite element method (FEM) is a technique to numerically solve partial differential
equations (Smith 2021). Numerical solutions are not exact (unlike analytical solutions), and
are found with repetitions of a set of operations (in other words, iterations). Six steps form the
FEM. The first step is the discretization of the domain. The unknown function of the partial
differential equation has one or more parameters (x, y, …), which can take any value in a
certain interval (this is the so-called domain). The discretization consists of restricting the
possible parameter(s) values to a limited number of possibilities (x= x1, x2, …). In that way,
the continuous domain (any parameter combination is possible) is converted into a collection
of possible parameter combinations ((x1, y1), (x2, y2), …), which are referred to as nodes. The
discretized domain is called “grid” or “mesh”. The nature of the grid is defined by the number
of nodes (in other words, the number of possible values for the parameters of the unknown
function), and the shape of the space between nodes. The latter obviously influences the
position of the nodes within the domain, because the nodes delimit the space between them
(for examples, nodes delimiting triangles are positioned differently than nodes delimiting
pentagons). The second step is the choice of an approximating function for the spaces
between the nodes. It is a crucial step, because the principle of FEM is to approximate the
unknown function for each space between the nodes. Each approximation is called
“element”, and the ensemble of all elements results in an approximation of the unknown for
the complete domain. The number of elements depends on the number of nodes, in an
obvious way: a higher number of nodes creates more subsequent spaces between nodes.
The third step is the generation of element equations. After the second step the type of
approximating function is known, but not its coefficients. The goal is to get an optimal
approximation, so the coefficients must be calculated accordingly. The principle of the mean
weighted residuals corresponds to that goal, so it is appropriate to use it for the calculation of
the coefficients. The Galerkin variant of the mean weighted residuals principle leads to an
equation, and its application on each element leads to equations for each of them (which are
called “element equations”). This generates a matrix equation [ k ] ⃗u= ⃗f for each element. The
fourth and fifth steps are the so-called assembly of the elements, wherein all matrix
equations [ k ] ⃗u= ⃗f are aggregated into a global matrix equation [ K ] U
⃗ =⃗
F , and the
⃗ =⃗
application of the boundary conditions, which eventually influence [ K ] U F . The last step is
the solution of the final global matrix equation, which produces a result for all coefficients of
the approximating functions. As a result, all approximating functions (in other words, all
elements) are fully defined, and so is the approximation of the unknown function from the
partial differential equation.

1
Valentin Borisavljevic (2140173) MSc advanced mech. eng.

The finite difference method (FDM) and the finite volume method (FVM) are analogous
techniques, with the same first discretization step as with the FEM. The FDM also produces
⃗ =⃗
a matrix equation [ K ] U F , but using a different approach. The latter is the substitution of
the derivatives of the differential equation by finite differences, which converts the differential
equation to a normal algebraic equation. This equation is then written for each space
between the nodes, and the produced set of equations leads to the global matrix equation.
The unknowns are the values of the unknown function from the partial differential equation at
each node, unlike for FEM where the unknowns are coefficients of approximating functions.
The solution of the global matrix equation thus defines the approximation of the unknown
function from the partial differential equation. The FVM also produces a matrix equation
⃗ =⃗
[ K ]U F , but using another approach again (Zienkiewicz 2014, page 25-26). It is based on
the principle of mean weighted residuals, similarly to the FEM. However, the FVM uses a
different variant of the principle to generate the matrix equations [ k ] ⃗u= ⃗f for each element.

As mentioned above, a typical phenomenon in engineering problems is the formation of a


complex velocity profile in a fluid flow over a solid surface. Finding a numerical solution for
the velocity, or more broadly for other flow quantities is referred to as “Computational fluid
dynamics” (CFD). It eventually involves modelling of the flow, beside the use of a numerical
solving technique (Xia 2021). The latter can either be FDM, FVM or FEM. The dissertation
looks into the use of FEM. In this case of finding the velocity profile (given by velocity
components V x =u∧V y =v of the velocity vector ⃗ V ), the set of equations to solve is the
Navier-Stokes equations. For a two-dimensional incompressible flow, assuming that the
pressure only varies with x, it is (Fox et. al. 2016):

∂⃗
V ⃗ ⃗ = −∇ p +⃗g + μ ∇ 2 V

+( V . ∇ ) V
∂t ρ ρ

Expanding it in its 2 components gives

( )
2 2
∂u ∂ ∂ −1 d μ ∂ ∂
+u u+v u= p+ 2
u+ 2 u
∂t ∂x ∂y ρ dx ρ ∂x ∂y

( )
2 2
∂v ∂ ∂ −1 d μ ∂ ∂
+u v+v v= p+ g+ v+ 2 v
∂t ∂x ∂y ρ dx ρ ∂ x2 ∂y

It describes the dynamics of the fluid, and is thus the equation that is used to find a solution
for the velocity in the fluid flow. However, two difficulties require attention. Firstly, the term
( V⃗ . ∇ ) V⃗ of the equation (convection term) is challenging to solve with FEM. Secondly, at
significant velocity, viscosity is negligible everywhere in the flow (so that the second term on
the right-hand side of the Navier-Stokes equations disappears) except in the boundary layer
that arises from the contact between the flow and a solid (Zienkiewicz 2014, page 3 &
Schlichting 2017, page 145). In that region, another set of equations than the Navier-Stokes
equations applies (Schlichting 2017, page 147), the “boundary layer equations” (Schlichting
2017, page 148&153):

( )
2
∂u ∂ ∂ −1 d μ ∂
+u u+v u= p+ u
∂t ∂x ∂y ρ dx ρ ∂ y2

2
Valentin Borisavljevic (2140173) MSc advanced mech. eng.

∂ ∂
u+ v=0
∂x ∂y

It is interesting to look at the history of FEM in the context of fluid dynamics. In the past, FDM
and FVM were the common techniques to solve problems related to fluids (like the
calculation of convective heat flux or velocity field) and solid structures. Later on, the use of
FEM began and increased over time, but at a slower pace for fluids than for solid structures
(Zienkiewicz 2014, page 2). This is due to the mentioned difficulty caused by the convection
term of the Navier-Stokes equation, and another difficulty caused by the continuous nature of
fluid flows (Zienkiewicz 2014, page 2).

As mentioned before, numerical solving methods involve repetitions of operations. Therefore,


the use of a computer is essential, as it allows very fast operations and therefore a high
number of repetitions in a low time interval. The computer realizes the operations on the
basis of a code (or algorithm), which “tells the computer what to do”. Different languages for
codes exist, with Matlab as one of the main options. Codes implementing FEM’s are
composed of four parts, related to the general FEM steps mentioned above. The first part is
the creation of the mesh. It is advisable to allow the code to store information related to the
mesh in the computer memory. Information such as the coupling of nodes to the elements
which they delimit (for example, element 1 is between nodes 10,12 and 13), or the position of
each node within the domain could play a role in the further parts of the code. The second
⃗ =⃗
part is the generation of the global matrix equation [ K ] U F . Depending on the chosen
approximating function and the nature of the grid, certain elements equations apply. The third
⃗ =⃗
part is the application of the boundary conditions, which may modify [ K ] U F . The last part
is the solution of the equation, and the display of the resulting approximate solution of the
differential equation. There are 2 types of FEM codes: implicit codes and explicit codes. Two
well-known FEM codes for fluid dynamics problems are PyF and Nektor++.

Aim & objectives


The dissertation looks into the case of an incompressible fluid flow around an aerofoil. It
represents a certain cross-sectional shape, so the case is two-dimensional. That specific
shape is typical for objects whose purpose is to experience a significant lift during a relative
movement with respect to a gas, like the wings of an aircraft or the blades of a wind turbine.
The direction of the movement should be mainly parallel to the length axis of the aerofoil.
This gives a drag force in the opposite direction, and a lift force in the upright perpendicular
direction. Figure 1 shows a standard aerofoil, the forces acting on it and its movement. The
aim of the dissertation is to create a FEM code that gives an accurate result for the flow
velocity (components V x =u∧V y =v ) for the described aerofoil case in air.

3
Valentin Borisavljevic (2140173) MSc advanced mech. eng.

The reach of the main goal is not obvious. In an attempt to come within a close range of the
goal, four “subgoals” (objectives) are defined. The first objective is to create a code with a
mesh of identical and symmetrical triangular elements, and then evaluate the convergence of
the result when increasing the number of elements (so the code must give the ability to set
the number of elements without any change in the code lines). The convergence points out
to the correctness of the solution. Furthermore, the comparison with the result from a code
using a more advanced mesh (for example, triangular elements of variable sizes and
orientations) seems interesting, so the second objective is to create such a code and
compare its result with the one from the first code. The third and fourth objectives are the
comparison with the results from an available FEM code (from literature) and from a
commercial CFD software (like ANSYS Fluent), because that also allows to evaluate the
solution. Matlab is used to write the two codes.

Methodology
A considerable amount of work is needed to reach the main goal. It seems advisable to
structure it with the use of a defined method.

Two codes will be written, according to objectives 1 and 2. The start of the general method to
write a code is the conceptual plan: what main operations will the code use (for example, use
of coupling of the node numbers to certain element numbers versus the use of coordinates
within the domain for each node number, which are the preferred commandos, …).

Thereafter, the actual writing of the code takes place. Both codes will require a number of
tasks. As mentioned at the end of the first paragraph, there are four parts of the FEM code:
the creation of the mesh, the generation of the global matrix equation [ K ] U ⃗ =⃗F , the
application of the boundary conditions, and the solution of the equation with the display of the
resulting approximate solution of the differential equation. Regular checks of the functioning
of the code via control of the Workspace content (computer memory) after defined code lines
(via breakpoints) increase the chances of a correct code. Furthermore, as mentioned in the
first paragraph, two difficulties require attention. Firstly, the convection term of the Navier-
stokes equation is challenging to solve with FEM, so it may be needed to use an external
code (from literature) to solve it. Secondly, a different set of equations applies inside or
outside the boundary layer: the Navier-Stokes equation apply on the outside, while the
boundary-layer equations apply on the inside. As a result, each code must solve two different
sets of equations in order to obtain a solution for the entire domain.

4
Valentin Borisavljevic (2140173) MSc advanced mech. eng.

Lastly, the comparison of the different results (according to objectives 3 and 4 from previous
paragraph, from the different codes or CFD software) allows to evaluate their correctness. A
failed evaluation would require to return to the last step (code writing), or even the first step
(conceptual plan).

Gantt chart
Different steps to reach the main goal of the dissertation were defined in previous paragraph.
Due to the considerable amount of work needed, the question of time management arises. A
Gantt chart provides an estimation of the time to allocate for each step, by situating the steps
within the time interval between the start and the end of the dissertation.

5
Valentin Borisavljevic (2140173) MSc advanced mech. eng.

References
- Zienkiewicz, O 2014, The finite element method for fluid dynamics, Butterworth-
Heinemann, Oxford
- Smith, E 2021, ME5542 Lecture notes for Advanced modelling and design. Brunel
University, London (United Kingdom).
- Xia, J 2021, ME5535 Lecture notes for Advanced thermofluids. Brunel University,
London (United Kingdom).
- Fox, R W, McDonald, A T, Pritchard P J & Mitchell J W 2016, Fluid mechanics, 9th
edition SI version, Wiley, New York
- Schlichting, H 2017, Boundary-layer theory, Springer, Berlin
- Liu, W K, Li, S & Park, H S 2021, ‘Eighty Years of the Finite Element Method: Birth,
Evolution, and Future’, viewed 28 02 2022,
<https://arxiv.org/ftp/arxiv/papers/2107/2107.04960.pdf>

You might also like