Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite...

40
Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart MATTHIAS AECHTNER Master of Science Thesis Stockholm, Sweden 2009

Transcript of Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite...

Page 1: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart

M A T T H I A S A E C H T N E R

Master of Science Thesis Stockholm, Sweden 2009

Page 2: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart

M A T T H I A S A E C H T N E R

Master’s Thesis in Numerical Analysis (30 ECTS credits) at the Scientific Computing International Master Program Royal Institute of Technology year 2009 Supervisor at CSC was Johan Hoffman Examiner was Michael Hanke TRITA-CSC-E 2009:022 ISRN-KTH/CSC/E--09/022--SE ISSN-1653-5715 Royal Institute of Technology School of Computer Science and Communication KTH CSC SE-100 44 Stockholm, Sweden URL: www.csc.kth.se

Page 3: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Abstract

The Unicorn solver package, which bases on the FEM library Dol�n, contains support forthe Arbitrary Lagrangian-Eulerian method. This method is used in the present thesis tosimulate the blood �ow in a human heart. Basis for the simulation are measured datafor the movement of the heart wall including in�ow and out�ow positions, provided byLarson et al from Umeå Medical University [8].

The main part of the present work deals with the issues that arose within the sim-ulations: The available data had to be converted into a suitable format and scaled toproper dimensions. On the other hand the Unicorn solver had to be modi�ed to provide asuitable interface. Interpolation was necessary to obtain the position and velocity of thewall for every point in time. Boundary conditions were implemented, taking into accountthat each of two openings of the heart chamber allows �ow only in one direction.

In the end of the present thesis post processing is discussed and results are visualized.

Page 4: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Sammanfattning

Arbitrary Lagrangian-Eulerian �nita elementmodellering avdet mänskliga hjärtat

Unicorn paketet, som bygger på FEM biblioteket Dol�n, är en lösare som har support förArbitrary Lagrangian-Eulerian metoden. Metoden används i detta arbete för att simulerablod�ödet i ett mänskligt hjärta. Lösningen bygger på uppmätt data som beskriverhjärtväggarnas rörelse, inklusive in�ödes och ut�ödes ränder, som tillhandahållits av Lar-son et al på Umeå Universitet [8].

Till störst del har arbetet gått ut på att lösa problem som uppstått vid simuler-ing: Tillgänglig data behövde konverteras till ett passande format och skalas till rättdimensioner. Unicorn-lösaren behövde ändras för att få ett bättre anpassat gränssnitt.Interpolering var nödvändigt för att få position och hastighet vid väggen för varje tid-spunkt. Randvillkor sattes med hänsyn till �ödet, så att vardera av de två öppningarnai hjärtkammaren endast �ck �öde i en riktning.

In slutet av arbetet post-processing discuteras och resultater visualiseras.

Page 5: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Contents

1 Introduction 1

1.1 Heart Modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Overview of the Present Work . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Formulation of the Mathematical Model 3

2.1 The Structure of the Human Heart . . . . . . . . . . . . . . . . . . . . . . 32.2 The Cardiac Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.3 Simplifying assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.4 Boundary and Initial Conditions . . . . . . . . . . . . . . . . . . . . . . . 6

3 FEniCS and the FSI Solver 7

3.1 FEniCS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73.2 FSI-solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4 The discrete Problem: Grid and Interpolation 11

4.1 Computation Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.2 Time Discretisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.3 Interpolation of the boundary movement . . . . . . . . . . . . . . . . . . . 13

5 The ALE Solver: Modi�cation and Additions to the FEniCS software 15

5.1 ALE_Solver interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165.2 Moving wall no-slip boundary condition . . . . . . . . . . . . . . . . . . . 165.3 Heart_Solver class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165.4 Mesh_Deformer class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165.5 Common header �le heart.h . . . . . . . . . . . . . . . . . . . . . . . . . . 165.6 main.cpp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

6 Results: Post-processing and visualisation 17

6.1 Point of reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176.2 Figures (Paraview) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186.3 Calculation of path lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226.4 Calculation of volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

7 Conclusions and outlook 30

7.1 Improvements and Extensions . . . . . . . . . . . . . . . . . . . . . . . . . 30

Bibliography 32

Page 6: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...
Page 7: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Chapter 1

Introduction

Numerical simulations play an increasing role in many scienti�c branches. They comple-ment results gained from the traditional disciplines of theory and experiment (measuring).The last decades also medicine discovered the advantages of mathematical modelling andcomputer simulations. Simulating parts of the human body has been hoped to give med-ical insight that cannot be obtained in a traditional way.

1.1 Heart Modelling

Modelling the human body on all scales from a cell level to modelling of whole organs issubject to the Physiome Project [6]. An example of a Physiome Project organ model isthe model of the heart based on a �nite-element model of the geometry and �brous-sheetstructure of myocardial tissue [9].

Another simulation of the human heart was conducted by Peskin and McQueen [10].Their model, like the Physiome Project model, includes the entire heart with all itschambers and the muscle tissue.

Literature about modern heart models is mostly concerned about modelling the be-haviour of the heart muscle. Therefore the muscle is seen as an organ which is built up oftissue, which again consists of cells. A summary what has been done in heart modellinggives [11] which outlines the basic ideas on which modern heart models are built on.

Work on computational medicine has also been conducted at KTH before. Stöckli [15]modelled the interaction between elastic arteries and the blood that is pumped throughthem. This work is also to be mentioned because the present work builds on the solverdeveloped withing Stöckli's graduation work.

Motivation An important justi�cation for modelling the cardiovascular system is thatit may suggest ways to improve the treatment of illness. Every part of the heart can bea�ected, either by congenital defects or disease (see [1]).

Measurements have the drawback that they can lead to ethical con�icts; what can bedone to a living human in order to serve science? Computer simulation makes it possibleto compute quantities that can not be measured.

1

Page 8: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

1.2 Overview of the Present Work

The present thesis which deals with modelling of the human heart as well, does not includemodelling of the heart muscle. Further the model involves only one of the four chambersof the heart (see next chapter). In other words not the actual heart but the blood �owinside a heart chamber is simulated while the movement of the heart is predetermined.

The computational work has been carried out at the School of Computer Science andCommunication, KTH, using the software platform FEniCS which is developed there. Thedata for the simulation have been provided by Larson et al [8]. They base on ultrasonicmeasurements which were conducted on a human patient, and a subdivision routine hasbeen used to construct a �ne mesh of surface of the heart chamber.

The structure of the remainder of the present work is described in the following.Starting from the physics of the heart, chapter two works its way to a mathematicalformulation of the problem. In chapter three the free software FEniCS [4] is explained,focusing on the parts that are used for the present work. Chapter four explains whyand how interpolation has been implemented for the boundary of the simulation domain.Changes and additions have been made to the FEniCS software and they are treatedin chapter �ve. Chapter six visualizes the results, which are the velocity and pressure�eld, obtained by the computations. Besides representing the velocity �eld as glyphesthe blood �ow is also visualized using pathlines. Further, the change of the volume overone heart cycle is shown. Chapter seven contains conclusions and points out posibilitiesto continue on the present work.

2

Page 9: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Chapter 2

Formulation of the Mathematical

Model

2.1 The Structure of the Human Heart

The human heart (�gure 2.1) is a muscle of the size of a �st that encloses four blood-�lled voids, called heart chambers. It is not controllable at will but controlled by nerveimpulses, the rate of which is controlled by the autonomic nervous system. By contractingand expanding periodically the function of the heart is to pump blood through the bodycirculation system. The pumping capacity is around �ve litres per minute for an averageadult human and can go up to 35 litres per minute for an athlete.

Figure 2.1: Human heart (from Wikipedia)

3

Page 10: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

The heart is divided into a left an a right side (from the perspective of the patient).Each side contains two chambers, an atrium and a ventricle, giving a total of four heartchambers. On both sides, the lower ventricles are thicker and stronger than the upperatria. The muscle wall surrounding the left ventricle is thicker than the wall surroundingthe right ventricle.

As indicated in �gure 2.1 the blood (on both sides) �rst �ows into the atrium andfrom there into the ventricle. The right side collects de-oxygenated blood from the bodyand pumps it into the lungs, where carbon dioxide is dropped o� and oxygen is pickedup. The oxygenated blood from the lungs is collected into the left side. From there it ispumped out into the body.

On each side of the heart there is one valve that connects the atrium with the ventricle,called atrioventricular valve, and one that connects the ventricle with artery. As theirname indicates the valves allow �ow only in one direction. The atrioventricular valve,which is called tricuspid valve on the right side and mitral valve on the left side, allowsblood only entering the ventricle. The valve between right ventricle and pulmonary arteryis called pulmonary valve and the one between left ventricle and aorta is called aortic valve.These two valves allow blood only to leaving the ventricle.

2.2 The Cardiac Cycle

During one heart cycle (HC) the ventricles contract and expand. The duration of one HCis of the order of one second. In the present work the duration T of one cycle will be 1.124seconds, and the starting point of the cycle (t = 0s) is set to shortly before the momentwhen the volume of the left ventricle is maximal. One cycle comprises two phases: Duringthe systole the heart muscles are tense and during the diastole they are passive. Thesetwo phases are again subdivided into several parts. The �rst two, Isovolumic contractionand Ejection, belong to the systole, while the other four, isovolumic relaxation, rapidin�ow, diastasis and atrial systole, make up the diastole. The following description whathappens during the single parts is partly taken from [2]:

• Isovolumic contraction (3-5% of HC) As soon as ventricular pressure rises fraction-ally above atrial pressure, the atrioventricular valves are forced shut by the reversedpressure gradient. Back �ow during closure is minimal because the cusps are al-ready approximated by vortices behind them in the late �lling phase. The ventricleis now a closed chamber, and the growing wall tension causes a steep rise in thepressure of the trapped blood.

• Ejection (33% of HC) When ventricular pressure exceeds arterial pressure, the out-�ow valves are forced open and ejection begins. Three quarters of the stroke volumeare ejected in the �rst half of the ejection phase and at �rst blood is ejected fasterthan it can escape from the big arteries connected to the ventricles into the body.As a result, much of it has to be accommodated by distension of the large elasticarteries, and this drives arterial pressure up to its maximum level.

As systole weakens and the rate of ejection slows down, the rate at which blood �owsaway through the arterial system begins to exceed the ejection rate and pressurebegin to fall. Active ventricular contraction actually ceases about two-third of theway through the ejection phase, but a slow out�ow continues for a while owing to the

4

Page 11: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

momentum of the blood. As the ventricle begins to relax, ventricular pressure fallsbelow arterial pressure but outward momentum of the blood prevents immediatevalve closure. Finally a brief back �ow closes the out�ow valves.

The ventricle does not empty completely; the average ejection fraction on man is0.67.

• Isovolumic relaxation (3-5% of HC) With closure of the aortic and pulmonary valves,each ventricle once again becomes a closed chamber. The heart muscle relaxes andventricular pressure falls very rapidly.

• Rapid in�ow When the ventricular pressure has fallen just below atrial pressure,the atrioventricular valves open. The blood pressure which has slowly built up inthe atrium during systole causes blood to quickly �ow into the ventricle.

• Diastasis Diastasis is the middle stage of diastole, where the initial passive �llingof the hearts ventricles has slowed down, but before the atria contract to completethe �lling.

• Atrial systole The heart muscles (myocardia) of the left and right atria contract. Theblood pressure in each atrium increases, forcing additional blood into the ventricles.This additional �ow of blood is called atrial kick.

2.3 Simplifying assumptions

Distinguishing between all six part of the cardiac cycle can become necessary for moreadvanced heart models which were mentioned in the introduction. As the present workis only concerned with modelling the blood �ow in the left ventricle and not the cardiacmuscle or any of the other heart chambers, it will be su�cient at this place to onlydistinguish between the phases systole and diastole. The subdivision into more parts (asabove) can become important when extending the model.

As mentioned above only the blood �ow in one of the chambers of the heart will besimulated. This will be the left ventricle. Therewith the simulation concerns the bloodinside the heart as well as the boundaries which are the ventricle's wall and the mitraland aortic valve.

The heart wall has a �ne structure which in�uences the �ow of blood; within the scopeof the present work however it was not possible to model this �ne structure and a �atwall that does not allow slip was assumed.

Since the elasticity of the heart wall is stronger than the compressibility of blood theblood inside the heart could be modelled as an incompressible �uid.

Blood which consists of plasma and a suspension of red blood cells generally showsnon-Newtonian behaviour. This is because red cells tend to coagulate when the �ow shearrates are low, while increasing shear rates break these formations apart, thus reducingblood viscosity. This e�ect however mainly appears in smaller blood vessels, and insidethe heart, blood can be assumed to behave like a Newtonian �uid.

Hence incompressible Navier-Stokes equations with constant viscosity could be used.

5

Page 12: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Physical parameter: viscosity and density of blood There exist two di�erenttypes of viscosity: dynamic viscosity µ and kinematic viscosity ν. Since both of them areoften simply called viscosity, they are easily confused. They are related with each otherby ν = µ/ρ where ρ is the density. Dynamic viscosity has the dimension [µ] = kg

m·s and

kinematic viscosity [ν] = m2

s . The dimension of density is [ρ] = kgm3 .

A typical value of the dynamic viscosity of blood is around µ = 0.0027 kgms and the

density of blood is similar to the one of water, a value of ρ = 1060 kgm3 is chosen. The two

values together give a kinematic viscosity of ν = 0.00271060

kgms

m3

kg = 2.547 · 10−6 m2

s .

2.4 Boundary and Initial Conditions

Boundary Conditions The (moving) geometry of the heart wall, i.e. of the domainboundary, is given (see chapter 4) as well as the positions of the valves. The boundaryconditions at the valves change during the heart cycle. During the systole the aortic valveis open and the mitral valve is closed and during the diastole the mitral valve is openand the aortic valve is closed. There are only two di�erent boundary conditions usedfor the model: no-slip wall boundary condition for the closed valve(s) and the heart walland zero-pressure boundary condition for the open valve. At the no-slip boundary the�uid velocity is set equal to the wall velocity which can be calculated from the given wallmovement and the pressure is not set. At the zero-pressure boundary the pressure is setto zero and the velocity is not set.

u− uwall = 0}on no-slip boundary (2.1)

p = 0}on zero-pressure boundary (2.2)

Initial Conditions Since the equations contain no time-derivative of p, only the veloc-ity at initial time needs to be speci�ed. The initial velocity is set to zero

u(t = 0) = 0

This is an acceptable approximation because the simulation starts when the expansionis maximum and thus there are no strong in�ows or out�ows at the valves. Further thesimulation is run an initial cycle and only the results from the second cycle are used.

6

Page 13: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Chapter 3

FEniCS and the FSI Solver

This chapter gives an overview of the software used in the present work as far as it wasalready available. Modi�cations and additions are described in chapter 5.

3.1 FEniCS

The computations have been carried out using the software provided by the open sourceproject FEniCS. FEniCS is a platform for the creation and maintenance of tools used forthe solution of di�erential equations using the �nite element method.

DOLFIN At the heart of FEniCS is DOLFIN which is a set of libraries that enable theprogrammer to create fast and reliable code in a consistent problem solving environmentfor solving problems in the realm of scienti�c computing. The software package relieson well-used algebraic back-end software such as LAPACK and PETSC for calculations.DOLFIN itself provides an interface between the back-end and the programmer. Inaddition it provides important classes for mesh generation, i/o, matrix/vector assemblyand various �nite element functions and operations.

Unicorn Recently added to the FEniCS project Unicorn aims at developing a uni�edcontinuum mechanics solver. In its current state as of summer 2008 it mainly consistsof four solvers: Incompressible Navier-Stokes equations, Compressible Euler equations,ALE �uid-structure interaction and Lagrange elasticity solver. The solvers are writtenin C++ and build on the Dol�n libraries (and also use the FEniCS projects FFC andFIAT). In order to guide the user how to use Unicorn, the solvers are accompanied bysome example applications that demonstrate Unicorn's capabilities.

Unicorn is used by writing a C++ main function that creates an instance of a Unicornsolver class and then calls methods of the solver class to do the computations and savethe result for postprocessing.

3.2 FSI-solver

In an attempt to model blood �ow in elastic arteries, Stöckli [15] implemented a Fluid-

Structure Interaction (FSI) solver that uses �nite elements. This solver has since become

7

Page 14: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

a part of Unicorn. While in the present work no FSI is modelled, the FSI solver imple-mentation contains Arbitrary Lagrangian-Eulerian (ALE) support which is particularlyuseful to model the moving wall of the heart. ALE makes it possible to do calculations us-ing both Lagrangian and Eulerian descriptions with the use of a third coordinate system.This allows it to move the domain at a di�erent velocity compared to the �uid withoutskewing the solution. For a more detailed description see [15].

Eulerian vs. Lagrangian description The di�erence between the Eulerian and theLagrangian description is mainly the position of the observer. In the Lagrangian world,the observer can be though of as attached to a particle and moves with the material. Herecords the changes of just this particle. The Lagrangian description is suitable if thematerial is solid.

For the Eulerian description the point of observation is no longer �xed to the materialbut �xed in space. Now the properties of not only one particle but of the whole mate-rial are recorded. The Eulerian description is generally favourable to be used for �owproblems.

For the Lagrangian material description a domain RX ∈ Rd is given where d is thespatial dimension made up of material particles X. For the Eulerian con�guration, Rx

is the spatial domain consisting of spatial points x. When deformation of the continuumoccurs, the changes can be mapped to the spatial coordinates, written as a function ϕwhich takes into account time t.

ϕ : RX × [t0, t�nal[ → Rx × [t0, t�nal[

Arbitrary Lagrangian Eulerian ALE, as its name suggests, is a culmination betweenthe Lagrangian and Eulerian descriptions. It provides a means to do calculations usingboth descriptions with the use of a third coordinate system, the reference coordinate sys-tem denoted Rχ with reference points χ. This allows it to move the domain at a di�erentvelocity compared to the observed material without skewing the solution, because themovement of the domain can be compensated. Much like a mapping ϕ was used to getfrom the material con�guration to the spatial con�guration, there are two additional map-pings Φ and Ψ which map from the referential con�guration to the spatial and materialcon�gurations, respectively. Together there are three mappings

ϕ : (X, t) 7→ (x, t)Φ : (χ, t) 7→ (x, t)

Ψ−1 : (X, t) 7→ (χ, t)

while it holds that ϕ = Φ ◦Ψ−1.The three mappings have the following gradients

∂ϕ

∂(X, t)=

(∂x∂X v0T 1

), v(X, t) =

∂x

∂t

∣∣∣∣X

(3.1)

∂Φ∂(χ, t)

=( ∂x

∂χ v̂

0T 1

), v̂(χ, t) =

∂x

∂t

∣∣∣∣χ

(3.2)

∂Ψ−1

∂(X, t)=

(∂χ∂X w0T 1

), w(X, t) =

∂χ

∂t

∣∣∣∣X

(3.3)

8

Page 15: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

where v is the given velocity, v̂ the reference point velocity and w the velocity with respectto the reference system.

Using the matrix forms of the various gradients from (3.1), (3.2) and (3.3)(∂x∂X v0T 1

)=

( ∂x∂χ v̂

0T 1

) (∂χ∂X w0T 1

)(3.4)

the di�erent velocities can be related:

c = v − v̂ =∂x

∂χw

where c is the particle velocity relative to the mesh as seen from the spatial domain Rx,i.e. the actual velocity of a �uid after compensating for the movement of the mesh.

Determination of domain movement - Smoothing While ALE allows a movingmesh, the velocity of the mesh still has to be determined. In the case of FSI, in thestructure part the mesh velocity was known because it was just the calculated velocityof the material, i.e. the Lagrangian description was used. For the rest of the domain,i.e. the �uid part, the movement of the mesh was determined by some mesh smoothingcriterion: The mesh at the interface between the solid and the �uid becomes deformedby the mesh movement. Therefore the vertices of the mesh belonging to the �uid domainmust be redistributed. This is done by the following Laplace mesh smoothing technique:each internal vertex is moved to the centre of all vertices that are connected to it by anedge (its neighbours)

vi =

∑j 6=i

vj

/n

where vi is an internal vertex vj is a neighbouring vertex and n the number of neighbours.For the present work the movement of the domain can also be obtained by smoothing,

just that there is no FSI and instead the boundary movement gives some forced movementof the domain. (If there was no forced movement of a part of the domain, the smoothingcondition would still work, but as soon as it is ful�lled once the mesh would not moveany more).

Navier-Stokes in ALE The Navier-Stokes equations for incompressible �ow

u̇ + (u · ∇) u− ν∆u +∇p = f (3.5)

∇ · u = 0 (3.6)

are used as a model for the FSI solver as well as for the present work. In order to implementALE with Navier-Stokes equations the convective term (u · ∇) u had to be modi�ed: themesh movement velocity v̂ is taken into account alongside the existing velocity v fromabove, in this case u. To illustrate this small change, the new ALE friendly incompressibleNavier-Stokes equations read

u̇ + ((u− v̂) · ∇) u− ν∆u +∇p = f (3.7)

∇ · u = 0 (3.8)

9

Page 16: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Stabilized FEM: G2 method In order to deal with convection dominated problemsthe �nite element method (FEM) which is used in the FSI solver and for the present work,requires stabilization. This is achieved by using the Generalized Galerkin method (G2)which can also be used to compute turbulent �ow, see [5].

10

Page 17: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Chapter 4

The discrete Problem: Grid and

Interpolation

4.1 Computation Grid

For the computations a set of surface meshes, provided by [8], was available. Each meshcontains 2946 nodes that are topologically connected by triangles. Figure 4.1 shows the��rst� mesh, i.e. the one which corresponds to the time that is de�ned as t = 0. Fromthis surface mesh the computational grid, consisting of nodes (geometry) and tetrahedra(topology) has been generated. For this purpose TetGen [14] was used.

Figure 4.1: Surface mesh at t = 0

Tetgen TetGen is a quality tetrahedral mesh generator and three-dimensional Delaunaytriangulator which is free for research and non-commercial uses. It allows to give a boundon the radius-edge ratio by the switch -q. Further the -a switch applies a maximumtetrahedron volume constraint.

Tetgen was executed with the following command line:

$ tetgen -pgYq1.2 -a5.0 -NEF heart3.001.poly

11

Page 18: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Here the above mentioned switches -q and -a were used which lead to a �ner discretisationin the inside of the heart. The switches -p, -g, -N, -E, and -F set the in and output �letypes and format(s); -Y suppresses boundary facets splitting.

The resulting computational grid contains 9586 nodes (including boundary) and 51556tetrahedra. Figure 4.2 shows a cut through the obtained grid.

Figure 4.2: Computational grid

Computational Grid: Conversion and Scaling The geometry data was given ina millimetre scale. For the computations the decimeter scale has been chosen since itwas closest to a normalization with peak velocity U and heart diameter L around one.This way the numerical method was e�cient without taking into consideration variousscalings of U and L. Thus the geometry data had to be converted from milimeter todecimeter scale. Since the �le format of the computational grid had to be converted toDol�n format anyway, the best way to do the scaling turned out to be modifying theDol�n mesh converter to multiply all geometry data by a scale factor (in this case 10).

The physical parameters viscosity and density in the literature typically were given inSI units. Therefore they have been converted into the decimeter scale as well: The solverwhich is used, uses the dynamic viscosity, which is calculated to be

µ = 2.7 · 10−3 kg

ms= 2.7 · 10−3 kg

10dm s= 2.7 · 10−4 kg

dm s

The analogue procedure for the density gives:

ρ = 1.060 · 103 kg

m3= 1.060 · 100 kg

dm3

Surface Meshes: Conversion and Scaling The surface meshes also had to be con-verted to a Dol�n format that can be read in later so that the grid can be moved accord-ingly. A reasonable choice seem to be to have the surface meshes as Dol�n mesh functions

12

Page 19: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

of type double (class MeshFunction<double>). This class can store one double value foreach node of the mesh.

The surface data consist of boundary nodes (geometry) and triangles (topology)whereas the latter was not needed for the computations. The boundary nodes eachde�ne a point in three-dimensional space. As the mesh function can only save one realnumber per node, three mesh functions had to be created for each surface mesh - one foreach coordinate.

A converter has been written that takes the surface meshes as an input, as well asa scale factor, and outputs the Dol�n mesh functions containing the scaled geometryinformation as XML �les. (It can be found in directory conv).

4.2 Time Discretisation

A �xed time step size of∆t = 0.002s

has been used for the computations (the simulation has also been run with ∆t = 0.001swith no signi�cant di�erence). In order to avoid instability a time-step that is smallenough to ful�l the CFL-condition

∆t

∆xvmax < C

is important. The maximum velocity is vmax < 8dms

and the height of the smallest cells(without regarding deformation) around 0.01dm.

4.3 Interpolation of the boundary movement

The position of the wall of the ventricle, or, speaking in terms of the computational model,the position of the nodes on the boundary, is only known at discrete points in time. Theprovided surface mesh data were generated from measurements at the following times:

ti[ms] = 65, 175, 285, 393, 440, 544, 651, 744, 850, 941, 1033, 1124 i = 1 · · · 12

The data at t0 = 0 are available as well, because the movement is periodic and the positionof the boundary is the same at t0 = 0 and t12 = 1124.

Since during the computation the positions of the boundary nodes must be availableat any time, it is necessary to obtain the position of each node at time t by interpolationfrom the available data (which is the position of the node at the times above).

Linear Interpolation A simple approach which has been tested is linear interpolation.First an α is calculated which is the distance of the current time t to the last time at

which data is available, tm, scaled so that α = 1 if t = tm+1:

α = (t− tm)/(tm+1 − tm)

Then the position of the node, n, can be obtained as

n = (1− α)nm + αnm+1

13

Page 20: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

With this kind of interpolation the problem showed up that the velocity of the wallwas piecewise constant in time. Therewith, the velocity of the wall jumped at the timesti. Especially since the �uid velocity at the wall is equal to the wall velocity, this lead toan unsatisfactory result.

Hermite Interpolation The problem in the last section has been resolved by usingHermite interpolation. The splines are de�ned by the value and the derivative at both,start and end point. Here the value is the node position and the derivative the velocity.Therewith is made sure that the velocity of the wall is continuous.

The Hermite interpolation makes use of the Hermite basis functions

h00(t) = 2t3 − 3t2 + 1h10(t) = t3 − 2t2 + t

h01(t) = −2t3 + 3t2

h11(t) = t3 − t2

First the velocity is calculated as time derivative of the position of the boundary nodeat the m-th sample time:

vm =12

((1

∆tm−1− 1

∆tm

)nm +

(− 1

∆tm−1

)nm−1 +

(1

∆tm

)nm+1

)with

∆tm = tm+1 − tm

Then the node position n can be calculated from the node positions nm and nm+1,and velocities vm and vm+1:

n = h00(α)nm + h01(α)nm+1 + h10(α)vm∆tm + h11(α)vm+1∆tm

The di�erence between the two di�erent interpolation methods can be seen in �gure6.36. It shows the change of the volume over time which is just as smooth as the movementof the wall.

14

Page 21: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Chapter 5

The ALE Solver: Modi�cation and

Additions to the FEniCS software

This chapter describes how the implementation within the present work is organized intoclasses. Figure 5.1 gives an overview. The orange colour marks all classes that where notalready existing. The arrows mean �is base class for�. Round edges stand for �les andsharp edges represent classes, which usually consist of a header �le and a �le with ending�.cpp� for the implementation.

TimeDependentPDE

ALE_SolverICNSPDE

Heart_Solver

Mesh_Deformer

Heart_Deformer

main.cpp

heart.h

Figure 5.1: Files and Classes

15

Page 22: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

5.1 ALE_Solver interface

Since the FSI solver was not particularly designed to allow �uid only problems, it turnedout to be reasonable to implement an ALE solver. This has been done by deriving a classALE_Solver from the Unicorn class TimeDependentPDE, analogously to the class ICNSPDE[7].

The ALE solver allows only (incompressible, Newtonian) �uid, no solid. Instead of thesolid computations, it is possible to set a subset of the grid's nodes (e.g. the boundary)by a user-written class (called Mesh_Deformer) in every time step. Thereafter the solversmooths the grid using the Dol�n standard smoother.

5.2 Moving wall no-slip boundary condition

At the moving boundary it is not correct to set a zero velocity, what could easily be set byusing the DirichletBC class. Instead a new class has been created that sets the velocityof the moving wall at the wall boundary.

5.3 Heart_Solver class

The class Heart_Solver is derived from ALE_Solver. It implements the change of theboundary conditions when the phase changes. Further the class does add post-processingfunctionality: change of frame of reference for output, and calculation of volume (seechapter 6). It also takes care of initialising the moving wall no-slip boundary condition.This is the class that is actually used as a solver.

5.4 Mesh_Deformer class

In the present work the class Mesh_Deformer, which could be used in a more general wayin future, is used for the following purposes: reading in the mesh functions that containthe boundary node positions in the constructor, and implementing the interpolation (seechapter 4) in the method update().

To be correct from an object oriented programming point of view Mesh_Deformer

is abstract and goes together with ALE_Solver . Further a class Heart_deformer wasderived from the mesh deformer. It implements the method update() and a constructor.

5.5 Common header �le heart.h

The �le heart.h contains constants and enums: number of dimensions, number of cyclesthat simulation lasts, di�erent boundary types (in�ow, out�ow, wall), phases (start-up,contraction, expansion), physical parameters density and viscosity, sample times, andname of the directory where input data �les are.

5.6 main.cpp

The �le main.cpp connection everything together and contains the main function whichis executed by the operating system. The �le further sets the time step length.

16

Page 23: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Chapter 6

Results: Post-processing and

visualisation

In order to get some inside from the computations and not just raw data, this chapter isdedicated to post-processing and visualisation.

6.1 Point of reference

When the ventricle is contracting or expanding its bottom keeps in place and the top,where the in�ow and out�ow takes place, moves up and down. This means for the velocity�eld that the absolute velocity at the out�ow boundary points inwards while the velocityrelative to the out�ow boundary (which moves) correctly points outwards (�gure 6.1).

Thus, in order to get a nicer visualisation the observer moves with the out�ow bound-ary (which moves roughly like the in�ow boundary), resulting in the picture in �gure6.2.

Figure 6.1: OriginalFigure 6.2: Point of reference at out�owboundary

Implementation Before the time stepping starts, the position of the observer is cho-sen. That means a node of the computational grid is selected with which the observer

17

Page 24: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

moves. This node will appear stationary in the visualization. Since the out�ow and in�owboundary are supposed to not move, a node that lies on the out�ow boundary has beenchosen. As the in�ow boundary globally moves with the out�ow boundary, the in�owboundary will also appear stationary.

During the computation in every time step the velocity �eld and the geometry ofthe grid (i.e. the position of nodes) will be modi�ed according to the movement of thenode which the observer �sits on�. This modi�cation is done in the method save()

of Heart_Solver. After the modi�cation, velocity and pressure are saved by a callto ALE_Solver::save() and then the original values are restored (also in the methodHeart_Solver::save()).

6.2 Figures (Paraview)

The velocity and pressure distribution has been saved during the calculations in VTK [13]format. Thereby it has been possible to visualise the results with paraview. (Paraview isa GUI expansion to VTK.)

Velocity The visualisation of the velocity is done using glyphs (arrows) and a cutthrough the heart in one picture (�gures 6.3 to 6.18). While the glyphs show relativemagnitude and direction, the cut shows the magnitude, of the velocity. The 16 �guresare taken at the times (in milliseconds)

0, 48, 144, 240, 288, 384, 416, 464, 496, 608, 672, 720, 816, 1008, 1040, 1088

or expressed in fractions of the time of one heart cycle T = 1124ms,

0%, 4.3%, 12.8%, 21.4%, 25.6%, 34.2%, 37.0%, 41.3%,44.1%, 54.1%, 59.8%, 64.1%, 72.6%, 89.7%, 92.5%, 96.8%

and show the behaviour of the �ow at the di�erent phases during one heart cycle.Figure 6.3 shows the initial velocity which has been obtain by calculating one heart

cycle �rst. So the �gure actually shows the velocity after one cycle if a zero velocity istaken. There can be observed a slight in�ow, which is because the start of the cycle is setto the end of the expansion phase. Figure 6.4 shows the velocity during the isovolumiccontraction of the heart muscle. The lower end of the heart bends slightly, the velocitiesare low and some weak circulation occurs near the in�ow boundary. The valve at theout�ow boundary is about to open.

The ejection phase is shown in �gures 6.5 to 6.7. It reaches its peak in �gure 6.6.From these pictures can also be observed the deformation of the heart which turns froma round into a more acute shape.

During isovolumic relaxation (�gure 6.9) the blood hardly moves. Then the in�owvalve opens and shortly later one can observe rapid in�ow. This phase is shown in �gures6.10 to 6.12. In �gure 6.10 the in�ow is increasing until it reaches its peak in �gure 6.11.

During the rapid in�ow phase, a recirculation region evolves. While in �gure 6.11 thein�owing blood is straightly going into all parts of the ventricle, �gure 6.12 already showsa very weak recirculation next to the in�owing blood. This recirculation grows in picture6.13 and 6.14.

18

Page 25: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Figure 6.3: Velocity �eld at t−T = 0ms =0.0T

Figure 6.4: Velocity �eld at t−T = 48ms =0.043T

Figure 6.5: Velocity �eld at t − T =144ms = 0.128T

Figure 6.6: Velocity �eld at t − T =240ms = 0.214T

19

Page 26: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Figure 6.7: Velocity �eld at t − T =288ms = 0.256T

Figure 6.8: Velocity �eld at t − T =384ms = 0.342T

Figure 6.9: Velocity �eld at t = 416ms =0.57T

Figure 6.10: Velocity �eld at t = 464ms =0.73T

20

Page 27: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Figure 6.11: Velocity �eld at t = 496ms =0.441T

Figure 6.12: Velocity �eld at t = 608ms =0.541T

Figure 6.13: Velocity �eld at t = 672ms =0.598T

Figure 6.14: Velocity �eld at t = 720ms =0.641T

21

Page 28: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

In picture 6.13 in�ow weakens and the phase of diastasis starts in �gure 6.14. Thisphase lasts over pictures 6.15 and 6.16. Figures 6.17 and 6.18 show the atrial systole.In�ow starts again. At that point the heart cycle starts over again.

Pressure The �gures 6.19 to 6.34 show the pressure at the heart wall. The samesample times as for the velocity visualization have been taken except �gure 6.22 which is16ms = 0.014T earlier than 6.6.

In �gures 6.19 to 6.23 the out�ow boundary always has the same blue-green colour,which corresponds to zero. The same holds for the in�ow boundary in �gures 6.24 to6.34. This is because of the boundary condition of zero pressure at the open valve.

The relative pressure inside the ventricle is negative during expansion and positiveduring contraction phase. The highest pressure is in �gure 6.22 and the lowest pressurein �gures 6.26 (t− T = 464s) and 6.27 (t− T = 496s). Since �gure 6.22 is taken shortlybefore the highest out�ow and since the in�ow is building up between t−T = 464ms andt− T = 496ms while the pressure is already at the minimum at t− T = 646ms, it can bededuced that the pressure change precedes the change of the velocity �eld.

6.3 Calculation of path lines

Besides using glyphs like in the last section, there are other possibilities to visualizevelocity. As in the present case the �ow is time-dependent, pathlines, streamlines, andstreak-lines do not coincide like they do in steady �ow. Paraview seems to support streamlines. These show the velocity at a certain time, like also glyphs do. For the visualisationof the blood �ow in the heart it is more interesting to have pathlines, which show themovement of one (or several) particles in the blood.

Implementation of Pathline calculation Since there had not been functionality thatwould have helped much the integration and especially the interpolation of the velocityto an arbitrary point with the necessary cell search has been implemented. A simpleforward Euler integration scheme has been used: starting from a initial point, in everytime step the velocity u(xi) at the last point xi is multiplied with the time step length ki

and the result is added to xi in order to obtain the next point xi+1. The velocity u(xi)is obtained by linear interpolation between the vertices of the cell xi lies in. In order to�nd this cell all cells are checked in a loop if xi is inside. This check is performed in thefollowing way (and taken from [3]):

Given the vertices of the tetrahedron cell to be tested as

v1 = (x1, y1, z1), v2 = (x2, y2, z2), v3 = (x3, y3, z3), v4 = (x4, y4, z4)

and the point xi asxi = (x, y, z).

Then, the following determinants are calculated (using Laplace's formula to expand alongthe last column)

D0 =

∣∣∣∣∣∣∣∣x1 y1 z1 1x2 y2 z2 1x3 y3 z3 1x4 y4 z4 1

∣∣∣∣∣∣∣∣ , D1 =

∣∣∣∣∣∣∣∣x y z 1x2 y2 z2 1x3 y3 z3 1x4 y4 z4 1

∣∣∣∣∣∣∣∣ , D2 =

∣∣∣∣∣∣∣∣x1 y1 z1 1x y z 1x3 y3 z3 1x4 y4 z4 1

∣∣∣∣∣∣∣∣ ,

22

Page 29: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Figure 6.15: Velocity �eld at t = 816ms =0.726T

Figure 6.16: Velocity �eld at t = 1008ms =0.897

Figure 6.17: Velocity �eld at t − T =1040ms = 0.925T

Figure 6.18: Velocity �eld at t − T =1088ms = 0.968T

23

Page 30: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Figure 6.19: Pressure �eld at t −T = 0ms = 0.0T

Figure 6.20: Pressure �eld at t =48ms = 0.043T

Figure 6.21: Pressure �eld at t −T = 144ms = 0.128T

Figure 6.22: Pressure �eld at t −T = 224ms = 0.199T

Figure 6.23: Pressure �eld at t −T = 288ms = 0.256T

Figure 6.24: Pressure �eld at t −T = 384ms = 0.342T

24

Page 31: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Figure 6.25: Pressure �eld at t −T = 416ms = 0.57T

Figure 6.26: Pressure �eld at t −T = 464ms = 0.73

Figure 6.27: Pressure �eld at t =496ms = 0.441T

Figure 6.28: Pressure �eld at t =608ms = 0.541T

Figure 6.29: Pressure �eld at t =672ms = 0.598T

Figure 6.30: Pressure �eld at t =720ms = 0.641T

25

Page 32: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Figure 6.31: Pressure �eld at t =816ms = 0.726T

Figure 6.32: Pressure �eld at t =1008ms = 0.897

Figure 6.33: Pressure �eld at t −T = 1040ms = 0.925T

Figure 6.34: Pressure �eld at t −T = 1088ms = 0.968T

26

Page 33: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

D3 =

∣∣∣∣∣∣∣∣x1 y2 z3 1x2 y2 z2 1x y z 1x4 y4 z4 1

∣∣∣∣∣∣∣∣ , D4 =

∣∣∣∣∣∣∣∣x1 y1 z1 1x2 y2 z2 1x3 y3 z3 1x y z 1

∣∣∣∣∣∣∣∣The point P is in the tetrahedron if the �ve determinants all have the same sign:

inside = (D0*D1>=0) && (D0*D2>=0) && (D0*D3>=0) && (D0*D4>=0);

The determinants can then also be used to interpolate the velocity in case xi wasinside.

u(xi) =4∑

i=1

u(vi)Di/D0

−0.15 −0.1 −0.05 0 0.05 0.1 0.15 0.2 0.25 0.3−0.10

0.1

0.4

0.5

0.6

0.7

0.8

0.9

1

1.1

[dm]

Figure 6.35: Pathlines starting at the in�ow at t = 1546ms

Results The implementation from the last paragraph has been added to the Heart_Solverclass. The pathline calculation is started when the �rst expansion phase occurs and con-tinues over one expansion and contraction phase until the simulation is stopped after thecontraction phase in the second cycle (tstart = 0.416s, tend = 1.546s = T + 0.422s). Start-ing points at the in�ow have been chosen so that the movement of particles that enter theventricle when the in�ow valve opens can be tracked during one heart cycle. The exactstarting points are given in table 6.1. Since these points are nodes of the boundary mesh,the table also contains their indices in the input data.

27

Page 34: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

index x1 x2 x3

31 -0.081861 -0.0007219 0.98136342 -0.027046 -0.0003610 0.98842943 -0.048000 0.0950201 0.99307244 -0.106322 0.0926933 0.98486245 -0.154437 -0.0007162 0.97314346 -0.107161 -0.0948699 0.97150247 -0.048205 -0.0960973 0.977173

Table 6.1: Starting points of pathlines

The resulting pathlines are plotted with Matlab together with the in�ow and out�owboundaries in �gure 6.35. In the �gure the x2 axis is given to show how far the particlesmove down into the heart. It can be seen that four out of the seven particles that enteredat the beginning of the in�ow leave the ventricle again within one cycle. The �gure alsoshows that the incoming particles move down to z = 0.4 while the bottom of the chamberis at around z = 0.1. For a healthy heart it is important that there is no blood that staysat the bottom of the chamber without ever leaving the heart. As all path lines start fromthe in�ow valve there is still hope that the simulated chamber exchanges also the bloodat its bottom and the pathlines of these blood particles are just not shown.

6.4 Calculation of volume

An interesting output variable is the volume of the ventricle and how it changes duringthe heart cycle. The volume can easily be computed by iterating over all cells (usingthe CellIterator class) and adding up all cell volumes. Those can be obtained by themember function volume() of the class Cell.

The result is shown in �gure 6.36 which also shows the volume as obtained by usinglinear interpolation (see chapter 4).

From this �gure one can see that the minimum of the volume is somewhat bigger than60ml while the maximum is around 120ml. That means that in every cycle roughly 60mlblood are pumped through the heart. It also means that half of the blood stays in theventricle.

28

Page 35: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.10.05

0.06

0.07

0.08

0.09

0.1

0.11

0.12

0.13

time in seconds

volu

me

in li

ters

Change of volume of left ventricle during one heart cycle

spline interpolationlinear interpolation

Figure 6.36: Volume over time (2 di�erent interpolation methods)

29

Page 36: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Chapter 7

Conclusions and outlook

The velocity visualization in section 6.2 shows that results of the simulation nicely matchwith the phases as described in the theoretical part (section 2.2). Therewith the mainconclusion is that the Unicorn solver has been able to successfully simulate blood �ow in acontracting chamber of the human heart. This is not supposed to mean that quantitativecorrectness is expected since the human heart is a very complex organ and its simulationa challenging topic in modern science.

Ejection Fraction It was expected that as much blood as possible would be exchangedduring one heart cycle. The calculation of the volume showed that the heart volumeshrinks only to half of its maximum size. Because of the way the opening and closing ofthe valves occurs during one heart cycle, the ratio of the volume of the contracted heartto the volume of the expanded heart gives a maximum to the ratio of the blood that isexchanged. This ration should be around 0.67. As the volume of the heart in the presentcase does not depend on the �uid computations, the too low ejection fraction indicatesthat already the input geometries are quantitatively not precise.

7.1 Improvements and Extensions

Extension of geometry Since this simulation contains only one chamber out of fourheart chambers it would be a natural approach to extend the geometry to include e.g.the left atrium which directly connects to the left ventricle.

Re�ning of geometry If a better geometry becomes available the interface and toolsdeveloped within this thesis can be used to obtain better results.

Boundary Conditions Concerning the boundary conditions there are three issues.The �rst is that the velocity at the open valves is lower than the velocity of the bloodstreaming towards the boundary. This is unphysical and should be examined.

Secondly the impact of changing the in�ow during the atrial systole would be aninteresting topic. That would mean to force the in�ow to have a di�erent shape or angle,since in the real heart, this phase distinguishes from the rapid in�ow phase by the factthat the in�ow is now forced by the compression of the atrium.

30

Page 37: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

A third improvement concerning the boundary could be to change the wall boundarycondition. In the real heart the wall has a �ne structure which should have an impact onthe �ow behaviour.

Check stability The simulation has been conducted with the geometry data in decime-ter and a corresponding viscosity of µ = 2.7 · 10−4 kg

dm s. Varying the viscosity or changing

to centimeters or meters (while adjusting viscosity and density) led to stability prob-lems. In order to improve the solver (and therewith the FSI solver which is at that pointidentical with the ALE solver) this stability issue should be further investigated.

Run on more powerful hardware Since more powerfully hardware will be available,the mesh could be re�ned together with the time stepping. The discretisation as describedabove was chosen to have a reasonable run-time on the authors home computer.

Mesh smoothing At present the mesh smoothing provided by Dol�n is used. Thismesh smoother might be insu�cient for the contracting heart chamber; it could evenconnect to the stability problem above. Johan Janson is developing a mesh smoothingalgorithm which seems a good idea to combine with the present work.

31

Page 38: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

Bibliography

[1] R. H. Anderson and A. E. Becker. The Heart. Structure in Health and Disease. GowerMedical Publishing, London, 1992.

[2] C. W. Cryer and P. P. Lunkenheimer. Mathematical modelling of the cardio-vascular system. WWU Münster, 1995. http://wwwmath.uni-muenster.de/num/

Vorlesungen/Herz_WS95/Problem_description.ps.gz.

[3] G. Herron. Newsgroups: comp.graphics, comp.graphics.algorithms. http://steve.hollasch.net/cgindex/geometry/ptintet.html.

[4] J. Ho�man, J. Jansson, A. Logg, and G. N. Wells. FEniCS. http://www.fenics.org.

[5] J. Ho�man and C. Johnson. Comtutational Turbulent Incompressible Flow. Springer-Verlag, 2007.

[6] P. J. Hunter and T. K. Borg. Integration from proteins to organs: the physiomeproject. Nature Reviews Molecular Cell Biology, pages 237�243, March 2003.

[7] J. Janson. Mercurial Repository. http://www.nada.kth.se/cgi-bin/jjan/

hgwebdir.cgi/fsi-ode.

[8] M. Larsson and P. Vesterlund. Umeå Medical University, private communication,2008.

[9] I. LeGrice, P. Hunter, A. Young, and B. Smaill. The architecture of the heart: adata-based model. Phil. Trans. R. Soc. B, pages 1217�1232, 2001.

[10] D. M. McQueen and C. S. Peskin. Heart simulation by an immersed boundarymethod with formal second-order accuracy and reduced numerical viscosity. In Me-

chanics for a New Millennium. Springer, 2000.

[11] D. Noble. Modeling the heart. Physiology, pages 191�197, 2004.

[12] C. S. Peskin. Mathematical aspects of heart physiology. Lecture Notes, CourantInstitute of Mathematical Sciences, 1975.

[13] W. Schroeder, K. Martin, and B. Lorensen. The Visualization Toolkit: An Object-

Oriented Approach To 3D Graphics. Kitware, 2002.

[14] H. Si. A quality tetrahedral mesh generator and three-dimensional delaunay trian-gulator. http://tetgen.berlios.de.

32

Page 39: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

[15] M. Stoeckli. A uni�ed continuum �uid-structure interaction solver using an ale �niteelement method. Master's thesis, KTH Computer Science and Comunication, 2007.

[16] B. Stroustrup. The C++ Programming Language. Addison Wesley, 2000.

33

Page 40: Arbitrary Lagrangian-Eulerian Finite Element Modelling … · Arbitrary Lagrangian-Eulerian Finite ... Arbitrary Lagrangian-Eulerian Finite Element Modelling of the Human Heart ...

TRITA-CSC-E 2009:022 ISRN-KTH/CSC/E--09/022--SE

ISSN-1653-5715

www.kth.se