Using pyFormex as preprocessor - Collegio Nuovo

57
Using pyFormex as preprocessor Benedict Verhegghe

Transcript of Using pyFormex as preprocessor - Collegio Nuovo

Page 1: Using pyFormex as preprocessor - Collegio Nuovo

Using pyFormex as preprocessor

Benedict Verhegghe

Page 2: Using pyFormex as preprocessor - Collegio Nuovo

What is pyFormex

• Free Open Source Software (FOSS): http://www.pyformex.org

• Under development at bioMMeda• Generation and transformation of

complex 3D geometries• Actions executed from a script, with

GUI elements as support• Aiming at minimal user interaction

Page 3: Using pyFormex as preprocessor - Collegio Nuovo

Why pyFormex?

• Traditional CAD or FE preprocessor:– Expensive– Not available to everyone– Closed– Comprehensive– GUI based, scripting as an afterthought– Automation and parameterization are

often cumbersome– Suboptimal FE meshes

Page 4: Using pyFormex as preprocessor - Collegio Nuovo

Why pyFormex?

• pyFormex:– Free (no cost)– Freely distributable– Open: fully customizable, expandable– Small: only what is needed– Script based, supported by GUI elements – Automation, parametrization are natural– FE meshing can be completely guided

Page 5: Using pyFormex as preprocessor - Collegio Nuovo

pyFormex project

Home Page: http://pyformex.org

Open Source: http://developer.berlios.de/projects/pyformex/

GNU General Public License v3 or higher:− Freedom to use, study, modify, distribute

− Source is available to anyone

− Changes, if distributed, available as source

− All components need compatible licenses

Linux (on Windows: BuMPix Linux Live USB)

Page 6: Using pyFormex as preprocessor - Collegio Nuovo

pyFormex Examples

Page 7: Using pyFormex as preprocessor - Collegio Nuovo
Page 8: Using pyFormex as preprocessor - Collegio Nuovo
Page 9: Using pyFormex as preprocessor - Collegio Nuovo

Structural Analysis

pyFormex examples...

Page 10: Using pyFormex as preprocessor - Collegio Nuovo
Page 11: Using pyFormex as preprocessor - Collegio Nuovo

Operations on

surface models

pyFormex examples...

Page 12: Using pyFormex as preprocessor - Collegio Nuovo
Page 13: Using pyFormex as preprocessor - Collegio Nuovo
Page 14: Using pyFormex as preprocessor - Collegio Nuovo
Page 15: Using pyFormex as preprocessor - Collegio Nuovo

pyFormex Examples...

Illustrations

Page 16: Using pyFormex as preprocessor - Collegio Nuovo
Page 17: Using pyFormex as preprocessor - Collegio Nuovo

PythonUniversal Glue

NumPyFast Numerical Arrays

FormexMathematical/Geometrical

Transformations

pyFormex Components

Page 18: Using pyFormex as preprocessor - Collegio Nuovo

PythonUniversal Glue

NumPyFast Numerical Arrays

FormexMathematical/Geometrical

Transformations

Scripting

Fast development

Automation

Reuse

Cooperation

pyFormex Components

Page 19: Using pyFormex as preprocessor - Collegio Nuovo

PythonUniversal Glue

NumPyFast Numerical Arrays

FormexMathematical/Geometrical

Transformations

PyOpenGL

OpenGL3D Drawing/Rendering

Scripting

Fast development

Automation

Reuse

Cooperation

Drawing

Viewing

Manipulation

Selection

pyFormex Components

Page 20: Using pyFormex as preprocessor - Collegio Nuovo

PythonUniversal Glue

NumPyFast Numerical Arrays

FormexMathematical/Geometrical

Transformations

Qt4Graphical

User Interface

PyQt4 PyOpenGL

OpenGL3D Drawing/Rendering

Scripting

Fast development

Automation

Reuse

Cooperation

Drawing

Viewing

Manipulation

Selection

GUI

Menus

Interaction

pyFormex Components

Page 21: Using pyFormex as preprocessor - Collegio Nuovo

PythonUniversal Glue

NumPyFast Numerical Arrays

FormexMathematical/Geometrical

Transformations

Qt4Graphical

User Interface

PyQt4 PyOpenGL

OpenGL3D Drawing/Rendering

Scripting

Fast development

Automation

Reuse

Cooperation

Drawing

Viewing

Manipulation

Selection

Plugins

Formex interactive

Surfaces (STL/GTS)

Lindenmayer

Finite Elements

Interfaces

GUI

Menus

Interaction

pyFormex Components

Page 22: Using pyFormex as preprocessor - Collegio Nuovo

pyFormex in use

• Wirestent preprocessing, simulation, postprocessing, optimization

Page 23: Using pyFormex as preprocessor - Collegio Nuovo

pyFormex in use

(courtesy of FEops)

Page 24: Using pyFormex as preprocessor - Collegio Nuovo

pyFormex in use

Prototyping (Kink)

Page 25: Using pyFormex as preprocessor - Collegio Nuovo

Stent modelling

Page 26: Using pyFormex as preprocessor - Collegio Nuovo
Page 27: Using pyFormex as preprocessor - Collegio Nuovo
Page 28: Using pyFormex as preprocessor - Collegio Nuovo

Basic ingredients of a computer simulation

Accurate geometrical models Stent Folded balloon

microCT model microCT model

Page 29: Using pyFormex as preprocessor - Collegio Nuovo

Model with folded balloon corresponds well with data provided by the manufacturer

0,0 0,4 0,8 1,2 1,60,0

0,5

1,0

1,5

2,0

2,5

3,0

3,5

Pressure [Mpa]D

iam

ete

r [m

m]

Experimental data

Simulation

Page 30: Using pyFormex as preprocessor - Collegio Nuovo

Equivalent diameter

Assess maximal cell size

Page 31: Using pyFormex as preprocessor - Collegio Nuovo
Page 32: Using pyFormex as preprocessor - Collegio Nuovo
Page 33: Using pyFormex as preprocessor - Collegio Nuovo
Page 34: Using pyFormex as preprocessor - Collegio Nuovo
Page 35: Using pyFormex as preprocessor - Collegio Nuovo
Page 36: Using pyFormex as preprocessor - Collegio Nuovo
Page 37: Using pyFormex as preprocessor - Collegio Nuovo
Page 38: Using pyFormex as preprocessor - Collegio Nuovo
Page 39: Using pyFormex as preprocessor - Collegio Nuovo
Page 40: Using pyFormex as preprocessor - Collegio Nuovo
Page 41: Using pyFormex as preprocessor - Collegio Nuovo

as HEX mesherfor image-based CFD/FEA

Gianluca De Santis

Benedict Verhegghe

Page 42: Using pyFormex as preprocessor - Collegio Nuovo

Hexahedrons

Tetrahedrons+

Prismatic Layers

mesh-dependent ?

Page 43: Using pyFormex as preprocessor - Collegio Nuovo

same LCA different meshes

50,000 - 3,000,000 HEX cells

150,000 - 6,000,000 TET cells (including prismatic layers)

Page 44: Using pyFormex as preprocessor - Collegio Nuovo

WSS magnitude

•mean WSS

(Area-Averaged WSS on entire lumen surface)

•regional WSS

(Area-Averaged WSS on a small surface inside a bifurcation)

•local WSS

(nodal values of WSS along a line)

31 mm2

6 mm

same post processing (with journal file)

0 >10WSS [Pa]

Page 45: Using pyFormex as preprocessor - Collegio Nuovo

area-averaged WSS on entire lumen surface

MEAN WSS

10,000 100,000 1 M 10 M

WSS [Pa]

HEXTET

# Cells

2.5

2.0

6 millions50,000

TET: after 1 m cells, error ~ 7 %, with oscillatations

Page 46: Using pyFormex as preprocessor - Collegio Nuovo

area-averaged WSS in a bifurcation

3.0

0.010,000 100,000 1 M 10 M

WSS [Pa]

# Cells

REGIONAL WSS

HEXTET

31 mm2

TET: after 1 m cells, error ~ 20 %.

Up to 300,000 does not approximate

Page 47: Using pyFormex as preprocessor - Collegio Nuovo

WSS along a line

LOCAL WSS

WSS [Pa]

0 6

mm 0 6mm

3.0

0.0

6 mm

HEX TET

Page 48: Using pyFormex as preprocessor - Collegio Nuovo

CPU time

• similar CPU time with similar number of cells (but Hex have ~ 3 times more nodes)

• same accuracy of the WSS (~ 5-10 %),

TET require 5x more cells = 14x longer CPU time

• TET mesh > 2 millions did not reduce the WSS error(WSS oscillates) but strongly increased the CPU time

Page 49: Using pyFormex as preprocessor - Collegio Nuovo

structured hex mesh needs decomposition

bottom-up

e.g. CAD, manufacturing industry

top-down

e.g. image-based,from CT, MRI, US, µCT

Page 50: Using pyFormex as preprocessor - Collegio Nuovo

Single bifurcation

Page 51: Using pyFormex as preprocessor - Collegio Nuovo

registered blocksaround the vessel surfance

Page 52: Using pyFormex as preprocessor - Collegio Nuovo

mapping after projection

Page 53: Using pyFormex as preprocessor - Collegio Nuovo
Page 54: Using pyFormex as preprocessor - Collegio Nuovo

stent deployment FEA

Page 55: Using pyFormex as preprocessor - Collegio Nuovo

mesh of a AAA thrombus

accurate computation of stress state due to arterial pressure for rupture prediction

Page 56: Using pyFormex as preprocessor - Collegio Nuovo

pyFormex Future

Interactive Tools

Surface and volume meshing

Postprocessing

Distribution and installation

Page 57: Using pyFormex as preprocessor - Collegio Nuovo

pyFormex Future

Welcome http://www.pyformex.org

Developers

Testers

Users