• No results found

Solution stability and error estimates as function of mesh

The numerical error of the Finite Element solution depends on the node density of the mesh and on the polynomial order of the shape function. We can calculate an error estimate assuming piecewise linear basis functions and triangular elements. Let O'* g U'* be the piecewise linear interpolant of solution O, so that =0 (A^,), i= l—>P, for the

nodes If we assume O g H^(A) (see also Chapter 10), where H^(0) is the Sobolev space given by

H \ Q ) - {/ : \ D J \ ^dr < W

o l a l - O

(5.50)

where D ''0 denotes all partial derivatives of O of order v, then we get [Johnson87]

IKK-0*11^,,, < (5.51)

for each element i= \^ D , where = diam (%,), and C is a constant. II* 11^ is the norm defined by

r 1 / 2 (5.52)

for all square integrable O functions on x, i.e. JoM r < ©o. defined by

II0II^.(T) - jlD 'C P d /''

Iviâfc

is the Sobolev norm

(5.53)

From this a global error estimate can be derived:

where h = max(/î^). Note that % depends on the element shape in the form % = %7a, where constant a is given by

a = m a x fl (5.55)

\<i^

is the diameter of the circle inscribed into element T. a therefore is a measure for the smallest angle in any element T.

Minimisation of the numerical error therefore requires maximisation of a and minimisation of h. The mesh generation program provides angles < 90°, thus a >

1/(2+v ^ ) . The influence of mesh resolution h on the solution stability will be investigated in Chapter 8.

5.13 Summary

In this chapter we introduced the finite element method as a tool to solve the time- dependent diffusion equation in media with inhomogeneous absorption and scattering distributions. We employ the Galerkin approach to derive the weak formulation of the original problem. We seek a piecewise linear and continuous approximation to the true solution, given by the linear interpolation of discrete solutions on nodal points of the domain. The time-independent problem can be solved immediately by a simple matrix inversion. The temporal photon density can be obtained by a finite difference scheme in the time dimension. While this is computationally time-consuming, there exist methods for the direct calculation of the mean time of flight and higher moments of the TPSF, which are the measures of interest in the reconstruction considered here.

In addition, the implementation of various boundary and source conditions discussed in Chapter 4 has been addressed.

In the following chapter we will look into the software implementation of this finite element model, concentrating on the mesh generation for various 2D and 3D geometries.

Chapter 6

Implementation and Finite Element Mesh Generation

In the course of the project a finite element library in C++ was developed which provides the FEM specific modules used by the forward and inverse model implementations. The library is based on the Numerical Algorithms Group (NAG) FEM Library in FORTRAN [GreenoughSl]. The NAG FEM library consists of a collection of subroutines for standard matrix operations and FEM specific functions, such as calculation of shape functions, integration over elements, and system matrix assembly. The conversion to C++ allows to take advantage of an object-oriented approach, resulting in a clearer program structure and ease of expansion, e.g. by adding new element types and shape functions of higher order. Data types like vectors, matrices, points, elements and nodes are embedded in a class hierarchy. An overview of the contents of these classes is given in Appendix 1, and Appendix 2 lists some of the software tools developed during this project.

In the following, the tools used for constructing meshes for the FEM forward model for two and three dimensions are described. Although there are commercial packages available for FEM preprocessing it was decided to develop these tools so that they can be adapted to the special needs of the problem addressed. An example is the possibility to create meshes based on MRl images.

The NAG finite element library does not contain support for mesh generation, so the C++ version of the FEM library developed during this project was extended to handle mesh creating tasks. In the context of the data structure of the C++ library, a mesh is represented by a list of elements and an associated list of nodes. Both node and element lists as well as single nodes and elements are implemented as C++ classes. In addition to the pure geometric information the mesh also holds data about the absorption and scattering parameters associated with each element. The same data structure used for the mesh generation tools is employed in the FEM solvers.

The preparation of meshes for use in an FEM solver is done in three steps:

(UNIX/SunView application) for 2D meshes. Some non-interactive mesh generators have been developed for generating spherical and cyhndrical 3D meshes.

b) Mesh optimisation by reordering the node list to minimise the node number difference within a single element throughout the mesh.

c) Mesh modification. Filters for scaling meshes, changing absorption and scattering coefficients, and modifying source and detector specifications allow the adaption of an existing mesh to a specific task without having to create a new one. This is helpful in batch processes for multiple FEM runs with different parameters.

Related documents