Title: Inaugurazione del MOX
1A LIFE for Finite Elements
LIFE V An OO Library for Finite Elements
Alessandro Veneziani MOX,Dipartimento di
Matematica Politecnico di Milano
2nd International FE Fair Berlin, June 4-5,2004
http//www.mate.polimi.it
http//mox.polimi.it
MODELLISTICA E CALCOLO SCIENTIFICO
ACKN.A. Quarteroni, C. Prudhomme,M. Prosi
2OUTLINE
- The LIFEV Project who, why, where...
- Some Implementation Details
- Some Applications
- Logistics
Basic Features, Current Status,Developments
C,OO approach, templates
Haemodynamics, Sport
Downloading
3THE LiFE V PROJECT
- WHAT
- LifeV is a C Finite Element Library, with
50000 lines, - 17 Tests (6000 lines), running under
GNU/Linux,Unix,CygWin
LifeV is developed by C. Prudhomme (Coordinator)
EPFL, J.F. Gerbeau, M. Fernandez INRIA (Paris),
L. Formaggia, D. Di Pietro, V. Martin, A.
Veneziani MOX (Italy)
LifeV aims at including most recent methods for
solving engineering problems (CFD,Fluid-Structure
Interaction, Advection-Diffusion-Reaction
problems) with advanced OO Programming
techniques and an effective management of code
development.
4CURRENT STATUS
PRE
POST
CORE
Finite Elements 2D, 3D P1,P2,P1bubble,P2,Q1,Q2,RT
0,DG0,non conform. grids
Time Advancing Finite Differences, BDF up to 3rd
Order
Problems Solver Advect. Diff. React.,
Incompressible NS, Fluid Structure Interaction
Problems (with a linear structure solver), Darcy
Linear Algebra Solver (LAS) AZTEC, from Sandia
Lab.
5CURRENT STATUS
PRE
POST
PRE
POST
PRE
Mesh formats Mesh (MOX), Mesh INRIA,Gambit,
NetGen
POST
Visualization Medit, NetGen, OpenDX, VTK
6OPEN DX VISUALIZATIONS
7STRUCTURE OF THE CODE
LIFE V
life/lifecore
life/lifemesh
life/lifefem
testsuite
8FUTURE FEATURES
- More filters for PRE/POST processing AMIRA,
EnSight - Standard File Format Hierarchical Data
Format (HDF5), - Mesh Partitionning with METIS
- Interface with ITK, MIMICS, to get meshes
from medical data - (Haemodel EU Project)
- Interchange LAS and Preconditioners easily,
match with as many - tools as possible (AZTEC, PETSC, UMFPACK,
ARPACK, in-House) - Improve stabilization techniques (SUPG with
Expression Templates, - Interior Penalty)
Pre/post
core
9FUTURE FEATURES
- Enhance Navier Stokes Solvers and
Preconditioners - Improve Fluid-Structure Interaction Methods
- Domain Decomposition and Parallelization
- Order Reduction Methods
- Grid Adaptivity
- Geometrical Multiscale (for Haemodynamics
and beyond)
- Development and integration of 0D/1D code data
structures, - GUI, Visualization
- Representation and control of multiscale workflow
(MPI,PVM..) - Switch models easily
1D/2D/3D as basic Input/output blackboxes
10SOME IMPLEMENTATION DETAILS
A. Veneziani, Expression Templates implementation
of FE, in preparation
GOAL
To write a code very close to mathematics
mass
stiffness
assemble(mustiffsigmamass,A,)
PROBLEM
C is oriented to generic programming (operator
overloading, etc.)
However, abstraction is gained against
efficiency what seemed to be a natural union
(between OO Programming and Scientific
computing) has historically been more than a
stormy relationship (G. Furnish)
Parsing abstract operators run time reduces the
efficiency !!!
11EXPRESSION TEMPLATES
T. Veldhuizen, G. Furnish
SOLUTION
Operator (or Expression) to be evaluated coded as
a templatized argument of suitable classes,
parsed by the compiler by implicit
type interpretation.
Simple Example
to be carried out componentwise
TASK
Code in such a way that previous expression is
translated into for (i0i y(i)a(i)x(i)x(i)/b by the compiler and
without temporary variables (standard abstract
programming)
scalar core
12Steps
- Define fundamental types involved (Vec and Const)
- Define wrapper classes making homogeneous them
- with respect to their operands (Expr)
- Define operations of interest to be passed for
building - the operator (OpMult, OpDiv, OpAdd)
PARSE TREE
Class implicitely parsed by the compiler
Expr,Expr,OpMult, BinO
p,Expr,OpDiv, OpAdd
13EXPRESSION TEMPLATES IN FEM
Assembling of matrix A
Scalar core
Soper(i,j,k)weight(k)
Remark this approach is readily adapted to the
case of non-constant coefficients
14RESULTS
Parsing performed by the compiler and absence of
temporary variables makes it faster the
assembling of the FE Matrix
15APPLICATIONS(I) Haemodynamics
Haemodynamics in a banded pulmonary artery
- MOTIVATIONS
- Adjustment of pulmonary blood flow for congenital
heart defects by banding of the artery - Common techniques (circular bandings) affect the
arterial tissue at the narrowing - (high reduction of the arterial perimeter) and
downstream the banding intimal thickening - occur
- A new device (FloWatch, EndoArt, S.A., Lausanne,
Switzerland) was created to avoid a - too high reduction of the arterial perimeter
- Different shapes of the narrowing influence the
blood flow patterns correlated to diseases - Computational fluid dynamics is an appropriate
tool for investigating vascular flows and - physiologically relevant quantities
- AIM OF THE STUDY
- Analysis of the in influence of different shapes
of pulmonary artery banding on the local - hemodynamics
16THE COMPUTATIONAL DOMAIN
The banding device is placed in the middle of the
pulmonary artery
Angiogram of the banded artery
FloWatch device image(left) and computational
model (right)
17MESH generated by GAMBIT
Elements 100000 (P1bubble) Velocity Nodes
120000 Pressure Nodes 20000 DOF 380000
Parabolic Inflow Conditions 1.5 l/min ? Re500
Navier-Stokes solver based on a preconditioned
Schur Complement Method. Preconditioner based an
Algebraic Factorizations see A.
Gauthier, F. Saleri, A.V., Comp. Vis. Science
(2004)
18Flow Patterns Flow Watch Banding
19Flow Patterns Circular Banding
20Wall Shear Stress
Pressure
Flow Watch
Circular
21APPLICATIONS(II) SPORT
Numerical Assessment of SWIMSUITS
GOAL Numerical Simulations in the viscous
sublayer around a few fibers for computing the
shear stress and the drag. Basic Idea
roughness could induce a riblets effect.
22(No Transcript)
232) Mesh Generation with NetGen
243) Fluid Dynamics Simulation
u velocity
253) Some preliminar numerical results (PS1)
26More results
27DOWNLOADING LIFEV
http//www.lifev.org
Summary Page
Tracker (Bugs, Feature Requests)
Task Manager
CVS concurrent development
LIFEV is distributed under LGPL Licence