Fast patient-specific blood flow modelling on GPUs Dr. Gbor - - PowerPoint PPT Presentation

fast patient specific blood flow modelling on gpus
SMART_READER_LITE
LIVE PREVIEW

Fast patient-specific blood flow modelling on GPUs Dr. Gbor - - PowerPoint PPT Presentation

Fast patient-specific blood flow modelling on GPUs Dr. Gbor Zvodszky Budapest University of Technology and Economics Department of Hydrodynamic Systems 21 May, 2015. HDR Introduction - Cerebral aneurysms Treatment methods Coiling Flow


slide-1
SLIDE 1

Fast patient-specific blood flow modelling on GPUs

  • Dr. Gábor Závodszky

HDR

Budapest University of Technology and Economics Department of Hydrodynamic Systems

21 May, 2015.

slide-2
SLIDE 2

Introduction - Cerebral aneurysms

Treatment methods

  • Clipping

Coiling Flow diverting

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 1/22

1/22

slide-3
SLIDE 3

Introduction - Cerebral aneurysms

Treatment methods

  • Clipping
  • Coiling

Flow diverting

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 1/22

1/22

slide-4
SLIDE 4

Introduction - Cerebral aneurysms

Treatment methods

  • Clipping
  • Coiling
  • Flow diverting
  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 1/22

1/22

slide-5
SLIDE 5

Simulation toolsuite overview

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 2/22

2/22

slide-6
SLIDE 6

CFD simulation

  • Based on the lattice

Boltzmann method.

  • Highly parallel, explicit

numerical scheme.

  • Non-local steps are

linear.

  • Non-linear steps are

local.

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 3/22

3/22

slide-7
SLIDE 7

Calculation of derived quantities - PostProcess

  • Residence times for

particles by tracing.

  • Surface normals.
  • Wall Shear Stress.
  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 4/22

4/22

slide-8
SLIDE 8

Virtual stenting

  • Mass-Spring-Damper
  • The dynamics is

computed on the GPU

  • The resulting surface is

modelled as a porous layer in the CFD step.

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 5/22

5/22

slide-9
SLIDE 9

CFD - in more details

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 6/22

6/22

slide-10
SLIDE 10

CFD - in more details II.

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 7/22

7/22

slide-11
SLIDE 11

CFD - Python, Sailfish

Technologies

  • (Python)

(Mako) (Sympy) pyCUDA, pyOpenCL Sailfish: Metaprogramming on GPUs! https://github.com/sailfish-team/sailfish

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 8/22

8/22

slide-12
SLIDE 12

CFD - Python, Sailfish

Technologies

  • (Python)
  • (Mako)

(Sympy) pyCUDA, pyOpenCL Sailfish: Metaprogramming on GPUs! https://github.com/sailfish-team/sailfish

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 8/22

8/22

slide-13
SLIDE 13

CFD - Python, Sailfish

Technologies

  • (Python)
  • (Mako)
  • (Sympy)

pyCUDA, pyOpenCL Sailfish: Metaprogramming on GPUs! https://github.com/sailfish-team/sailfish

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 8/22

8/22

slide-14
SLIDE 14

CFD - Python, Sailfish

Technologies

  • (Python)
  • (Mako)
  • (Sympy)
  • pyCUDA, pyOpenCL

Sailfish: Metaprogramming on GPUs! https://github.com/sailfish-team/sailfish

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 8/22

8/22

slide-15
SLIDE 15

CFD - Python, Sailfish

Technologies

  • (Python)
  • (Mako)
  • (Sympy)
  • pyCUDA, pyOpenCL
  • Sailfish: Metaprogramming on GPUs!

https://github.com/sailfish-team/sailfish

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 8/22

8/22

slide-16
SLIDE 16

Bounce-back rule

  • No-slip wall boundary
  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 9/22

9/22

slide-17
SLIDE 17

Bounce-back rule - Template

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 10/22

10/22

slide-18
SLIDE 18

Bounce-back rule - D2Q9

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 11/22

11/22

slide-19
SLIDE 19

Bounce-back rule - D2Q13

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 12/22

12/22

slide-20
SLIDE 20

Can we take it further?

Symbolic algebra!

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 13/22

13/22

slide-21
SLIDE 21

Equilibrium function - Symbolic formalism

f eq

i (⃗

x, t) = wiρ[1 + 3(⃗ ei · ⃗ u) + 9

2(⃗

ei · ⃗ u)2 − 3

2⃗

u2]

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 14/22

14/22

slide-22
SLIDE 22

Equilibrium function - D3Q13

f eq

i (⃗

x, t) = wiρ[1 + 3(⃗ ei · ⃗ u) + 9

2(⃗

ei · ⃗ u)2 − 3

2⃗

u2]

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 15/22

15/22

slide-23
SLIDE 23

Equilibrium function - D3Q13

f eq

i (⃗

x, t) = wiρ[1 + 3(⃗ ei · ⃗ u) + 9

2(⃗

ei · ⃗ u)2 − 3

2⃗

u2]

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 16/22

16/22

slide-24
SLIDE 24

Equilibrium function - D3Q13

f eq

i (⃗

x, t) = wiρ[1 + 3(⃗ ei · ⃗ u) + 9

2(⃗

ei · ⃗ u)2 − 3

2⃗

u2]

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 17/22

17/22

slide-25
SLIDE 25

Equilibrium function - D3Q13

f eq

i (⃗

x, t) = wiρ[1 + 3(⃗ ei · ⃗ u) + 9

2(⃗

ei · ⃗ u)2 − 3

2⃗

u2]

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 18/22

18/22

slide-26
SLIDE 26

Equilibrium function - D3Q13

f eq

i (⃗

x, t) = wiρ[1 + 3(⃗ ei · ⃗ u) + 9

2(⃗

ei · ⃗ u)2 − 3

2⃗

u2] The generated code:

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 19/22

19/22

slide-27
SLIDE 27

Advantages

  • Closer to the mathematical formalism.
  • Easier to read and modify.
  • Encourages experimentation.
  • Virtually no performance cost (apart from a small start-up
  • verhead).
  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 20/22

20/22

slide-28
SLIDE 28

Scaling - CPU vs. GPU

  • CPU - 768 cores
  • GPU - 4 Tesla 2070
  • Near-linear scaling
  • Approximately one
  • rder of magnitude

performance gain.

  • (The fallback at the third

point is due to primitive space partition).

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 21/22

21/22

slide-29
SLIDE 29

Typical runtimes

Number of GPUs ∼ 3M ∼ 6M ∼ 20M 1 00:15:36 00:45:14

  • 2

00:09:11 00:27:03

  • 3

00:06:21 00:18:31

  • 4

00:05:03 00:15:01 01:34: 22

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 22/22

22/22

slide-30
SLIDE 30

Thank you for your attention!

  • Dr. Gábor Závodszky

Fast patient-specific blood flow modelling on GPUs 23/22

23/22