Modelling coronary artery bypass grafts
The below case study shares some of the technical details and outcomes of the scientific and HPC-focused programming support provided to a research project through NeSI’s Consultancy Service.
This service supports projects across a range of domains, with an aim to lift researchers’ productivity, efficiency, and skills in research computing. If you are interested to learn more or apply for Consultancy support, visit our Consultancy Service page.
Heart disease is one of the three leading causes of mortality in New Zealand and many other parts of the world. Researcher Krish Chaudhuri is developing a Python code (comcab) for modelling blood flow in artery networks. His aim is to optimise bypass graft placement during heart surgery so as to maximise blood flow.
At the onset of the consultancy, comcab took about 16 hours to solve a model with 20 vessel segments. A more realistic model, which contains 109 vessel segments, would have taken about 40 days. But ideally, 300+ vessels are required and hence there is a strong need to improve the performance of the code. Moreover, parameter studies where each topology is run with different sets of parameters will further increase computational resource demands.
What was done
- Introduced the researcher to source version control. All code changes are tracked and older versions of the code can be retrieved.
- Adding code improvements. The original code came with different drivers for each network topology. Now there is only one driver and the topology is specified in the configuration file. This simplifies maintenance.
- Accelerated the flux and source computation. This was achieved by using ``numba'', which automatically translates Python code to compiled C (i.e. without requiring additional maintenance). Resulting speedup is between 1.2-2 times.
- Reduced number of calls to the boundary condition solvers. The number of junction boundary condition objects was reduced from the total number of vessels to 2. For a 109 vessel case this means a 55 times speedup.
- Developed a tool to visualise the network and time dependent flow/area/pressure fields.
- Added a test suite making it straightforward to verify code changes.
"I am extremely grateful for NeSI’s assistance with my research involving computer modelling of coronary artery bypass grafts to aid in cardiac surgeon decision-making for patients with coronary artery disease. Prior to their involvement I was spending a large amount of time waiting for the computer to solve even the smallest, most basic networks of blood vessels. This hindered my progress significantly. With NeSI’s help, the more sophisticated vessel networks were being solved in several hours, whereas on prior estimates they would have taken a few months. This significant speed-up allowed me to investigate various aspects of the vessel network models and gain greater understanding in a timely fashion.
I am also very thankful to the NeSI consultancy process for teaching me more about high performance computing and code optimization. The team had a positive attitude and were helpful with a quick turnaround time for helping solve any issues that arose. Their input has set a nice platform for making further refinements to the coronary artery bypass graft models to allow the research to progress more rapidly. I applaud the team from NeSI and hopefully I will be able to work with them again in the future."
- Krish Chaudhuri, Doctoral Candidate, Engineering Science, University of Auckland
Do you have an example of how NeSI support or platforms have supported your work? We’re always looking for projects to feature as a case study. Get in touch by emailing firstname.lastname@example.org.