
Chapter 5
Numerical model
The numerical work presented in this thesis is based on the Finite Element Method (FEM)
numerical scheme. The equations are implemented and solved in the commercially available
FEM software Comsol Multiphysics (version 4.2a-4.4b). This work presents no improvements
of numerical solvers, but focuses on how to use existing numerical tools to enlighten
and solve physics problems. The quality control of our numerical work is based on the following
two principles. Firstly, we check the converge of the numerical solution with respect
to parameters such as spatial and temporal resolution, which can be considered an internal
consistency check of the numerical model. Secondly, we compare the numerical results to
analytical results and experimental measurements, to test the physical assumptions of both
analytics and numerics. Awareness of the limitation of the physical assumptions that goes
into the theoretical models are the key to developing models that can accurately predict
the outcome of associated experiments, which requires a great deal of both theoretical and
experimental insight.
In this chapter a very brief introduction to the FEM scheme is given, along with a practical
example of how an equation is rewritten and implemented in Comsol. Furthermore,
examples of spatial and temporal convergence analysis are given. For a more thorough
introduction to FEM the reader is referred to Refs. 45, 46.
5.1 The Finite Element Method
The basic principle of the Finite Element Method is to expand the physical elds on a
set of basis function, also referred to as test functions, similar to Fourier analysis where a
signal is expanded in terms of harmonic functions. In FEM the spatial domain is divided
by a grid (mesh), and each basis function is associated to a node point, where it takes the
value of one, while it is zero at neighboring nodes.
We now consider a stationary inhomogeneous boundary value problem dened by a set
of boundary condition and a bulk partial dierential equation (PDE),
Lfg(r)g = F(r); (5.1)
where L is a dierential operator, g is a physical eld, r is the spatial coordinate, and F
43