![Page 1: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/1.jpg)
Using pyFormex as preprocessor
Benedict Verhegghe
![Page 2: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/2.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/3.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/4.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/5.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/6.jpg)
pyFormex Examples
![Page 7: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/7.jpg)
![Page 8: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/8.jpg)
![Page 9: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/9.jpg)
Structural Analysis
pyFormex examples...
![Page 10: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/10.jpg)
![Page 11: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/11.jpg)
Operations on
surface models
pyFormex examples...
![Page 12: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/12.jpg)
![Page 13: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/13.jpg)
![Page 14: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/14.jpg)
![Page 15: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/15.jpg)
pyFormex Examples...
Illustrations
![Page 16: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/16.jpg)
![Page 17: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/17.jpg)
PythonUniversal Glue
NumPyFast Numerical Arrays
FormexMathematical/Geometrical
Transformations
pyFormex Components
![Page 18: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/18.jpg)
PythonUniversal Glue
NumPyFast Numerical Arrays
FormexMathematical/Geometrical
Transformations
Scripting
Fast development
Automation
Reuse
Cooperation
pyFormex Components
![Page 19: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/19.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/20.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/21.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/22.jpg)
pyFormex in use
• Wirestent preprocessing, simulation, postprocessing, optimization
![Page 23: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/23.jpg)
pyFormex in use
(courtesy of FEops)
![Page 24: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/24.jpg)
pyFormex in use
Prototyping (Kink)
![Page 25: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/25.jpg)
Stent modelling
![Page 26: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/26.jpg)
![Page 27: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/27.jpg)
![Page 28: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/28.jpg)
Basic ingredients of a computer simulation
Accurate geometrical models Stent Folded balloon
microCT model microCT model
![Page 29: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/29.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/30.jpg)
Equivalent diameter
Assess maximal cell size
![Page 31: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/31.jpg)
![Page 32: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/32.jpg)
![Page 33: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/33.jpg)
![Page 34: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/34.jpg)
![Page 35: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/35.jpg)
![Page 36: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/36.jpg)
![Page 37: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/37.jpg)
![Page 38: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/38.jpg)
![Page 39: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/39.jpg)
![Page 40: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/40.jpg)
![Page 41: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/41.jpg)
as HEX mesherfor image-based CFD/FEA
Gianluca De Santis
Benedict Verhegghe
![Page 42: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/42.jpg)
Hexahedrons
Tetrahedrons+
Prismatic Layers
mesh-dependent ?
![Page 43: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/43.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/44.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/45.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/46.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/47.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/48.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/49.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/50.jpg)
Single bifurcation
![Page 51: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/51.jpg)
registered blocksaround the vessel surfance
![Page 52: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/52.jpg)
mapping after projection
![Page 53: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/53.jpg)
![Page 54: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/54.jpg)
stent deployment FEA
![Page 55: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/55.jpg)
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](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/56.jpg)
pyFormex Future
Interactive Tools
Surface and volume meshing
Postprocessing
Distribution and installation
![Page 57: Using pyFormex as preprocessor - Collegio Nuovo](https://reader035.vdocuments.mx/reader035/viewer/2022062918/62ba7a4e5b95050f6a4c2f86/html5/thumbnails/57.jpg)
pyFormex Future
Welcome http://www.pyformex.org
Developers
Testers
Users