HemeLB: vascular modelling and blood flow simulation

Institute: University College London


[quote style=”boxed” float=”right”]HemeLB is an open-source computational suite for fluid dynamics simulations of blood flow in the vasculature of the human body.[/quote]


The HemeLB suite is able to generate 3D models of the vasculature of individual human body parts based on medical images such as an angiogram, MRI or CT scan.

These models are then used to run sophisticated fluid dynamics simulations (using the Lattice Boltzmann method) which can provide accurate haemodynamic estimates for blood vessels; for example, blood pressure, flow rate, and wall shear stress at different locations.

HemeLB has been developed by Professor Peter Coveney’s group at the UCL Centre for Computational Science.

The research software development team provided assistance with programming a key component of HemeLB: the ‘setup tool’ which creates 3D models of the vasculature based on medical images.

To date, HemeLB has primarily been applied to the simulation of blood flow in cerebral aneurysms – balloon-like malformations in the arteries of the brain; a potential cause of stroke. However, HemeLB is just one example of a wide array of models that are being developed as part of the Virtual Physiological Human project.

This project aims to bring together computational models, from the molecular to the organ scale, to simulate larger biological systems and eventually the whole body.

A primary concern for the group working on HemeLB was that, owing to the complexities of computing 3D geometrical operations, the setup tool used to generate the initial models of the vasculature failed in approximately 5% of cases.

This problem was likely to be a major blocker in the path towards deployment of HemeLB in production environments.

The Research Software Development Team (RSDT) was brought in to help identify the reason for these failures and to provide a solution to this problem, enabling the setup tool to work reliably in all cases.

What we did

HemeLB uses a 3D image of the vasculature which is split up into small cubes called voxels (like three dimensional pixels).

The primary job of the setup tool is to construct this representation by defining each voxel as interior (fluid) or exterior (solid) to a blood vessel’s surface.

Starting with a known voxel, the status of nearby voxels is determined by counting the number of intersections with the vessel’s surface when travelling in a straight line from one to the other: an odd number of intersections indicate a change in status from fluid to solid or vice-versa.

The HemeLB team identified the problem of resolving voxels on the surface of blood vessels (i.e. those which are partially inside and outside) as being the point of failure for the setup tool.

The cause was the fact that computers are limited in terms of the accuracy to which they can represent numbers and, in some cases, this made it impossible to tell whether a voxel and a surface intersect.

The chances of this occurring were very small when considering an individual voxel, but the setup tool had to perform millions of these calculations for each model.

The result was that, approximately 5% of the time, the setup tool produced inconsistent results because two assessments of the same voxel taken from different directions disagreed as to whether it was fluid or solid.

The RSDT had the difficult job of identifying all possible types of failures and writing exceptions into the code which could detect and resolve these failures. It was quickly determined that the set of geometrical algorithms initially chosen for the job was unsuitable due to numerical accuracy issues. Replacing those algorithms with a state-of-the-art computational graphics library allowed the identification of different, well separated, modes of failure in the intersection counting.

This wasn’t a case of writing just one exception as there were a lot of special cases to detect and each one needed code writing for it.

Jens Nielsen from the RSDT worked methodically to test the code for many possible points of failure and produce a solution for each one. His background in physics made him the ideal person to carry out this difficult mathematical and computational work.

Results / impact of the work

Remedying the problems with the setup tool is a significant step towards producing a version of HemeLB which can be used as a tool in medicine.

Specifically, aneurysm treatment planning should benefit from the availability of accurate haemodynamic estimates in and around the aneurysm.

Miguel Bernabeu from the Centre for Computational Sciences describes the significance of HemeLB:

“Current medical imaging modalities don’t allow doctors to observe the forces exerted by blood on the vessel’s inner surface to a level of detail that becomes useful for treatment planning. The technological developments carried out at UCL, and elsewhere, are opening a window into cardiovascular physiology and pathology.”

So, in future neurosurgeons could use HemeLB to help decide whether or not to operate.

However, HemeLB will have to obtain conformity certification (e.g. CE marking) if it is going to be used in the routine treatment of patients. To achieve this, Professor Coveney’s group will have to demonstrate that good software development practices have been followed by ensuring that HemeLB is well documented and well tested.

RSDT encourage all software development projects to apply good coding practice from the start and regularly run training courses with UCL researchers to introduce these concepts.
A HemeLB analysis of the pressure exerted on the blood vessel walls in the area surrounding an aneurysm.

A HemeLB analysis of the pressure exerted on the blood vessel walls in the area surrounding an aneurysm.

In the academic environment, HemeLB is being applied in other areas of research: Miguel Bernabeu is now using HemeLB to study the relationship between haemodynamics and vascular remodelling.

His recent work, studying the developing mouse retina, has confirmed that vessels with low wall shear stress go on to be pruned later in development. This is the beginning of a larger project which aims to understand the parameters underlying vascular growth and change.

This work has potential significance for the development of drugs to treat cancer as it may help us to understand the processes underlying the quick and extensive vascularisation that supports tumour growth.

One of the next stages for development of HemeLB is to find a way to couple it with other computational models; for example, to model the relationship between fluid dynamics in blood vessels and mechanobiological responses to these stresses at the cellular level.

[toggle_container keep_open=”false” initial_open=””]

[toggle title=”Links”]


[toggle title=”Other”]Nulla vitae elit libero, a pharetra augue. Nullam id dolor id nibh ultricies vehicula ut id elit.[/toggle]