SlideShare a Scribd company logo
1 of 97
Effective development of a finite-
element solver at the University
Romain BOMAN,
Luc PAPELEUX,
Jean-Philippe PONTHOT
University of Liège
Departement of
Aerospace and Mechanical Engineering
ICSAAM
August 28-31, 2018 – Tarbes, France
2
J.-P. Ponthot
Our lab within the university
• Numerical simulation
• Solid mechanics
• Finite element method
• Software development
Computational Mechanics
hydroforming of a tube
Dept of Aerospace and
Mechanical Engineering
(Faculty of Applied Sciences)
Our main simulation code: Metafor
3
Implicit Finite-Element solver
for the numerical simulation of large deformations of solids
•ALE Formalism, remeshing.
•Thermomechanical time-integration schemes.
•Modelling of cracks,
fracture.
•Contact algorithms.
•Nonlinear constitutive laws.
•Mesh generation from medical
images.
•Fluid finite elements.
•Monolithic schemes.
•Coupling with extenal
solvers.
Metal Forming applications Crash / Impact
Biomechanics Fluid/structure
interaction
Typical simulation
4
Modelling of a roll forming mill
(forming of beams and tubes from steel sheets)
Current team
5
D. Boemer
(PhD student)
R. Boman
(Senior Researcher)
M.L. Cerquaglia
(PhD student)
L. Papeleux
(Senior Researcher)
3 PhD students – 2 senior researchers – 1 visiting academic
P. Flores
(visiting academic)
C. Laruelle
(PhD student)
Former developers
6
http://metafor.ltas.ulg.ac.be/dokuwiki/team
A. Stephany E. Biotteau C. Laurent J. Xhardez L. Vigneron L. Adam
L. Noels L. Ziane M. Mengoni O. Karaseva P. Bussetta P.-P. Jeunechamps
R. Koeune S. Hannay S. Trichon V.Q. Bui V. d’Otreppe W. Guo
25 contributors to the present code – from 2000
C. Canales Y. CarrettaY. Crutzen G. Deliége C. Hennuyer P. JorisG. Wautelet
7
Industrial partners
= owns a Metafor license
Scope
8
1. Practical Management of Simulation Codes
• Metafor… from 1992 to 2018
2. Numerical Applications
• Introduction to ALE formalism
• Thixoforming
• Continuous Roll forming
• Friction Stir Welding
• Additive manufacturing
3. Conclusions
Scope
9
1. Practical Management of Simulation Codes
• Metafor… from 1992 to 2018
2. Numerical Applications
• Introduction to ALE formalism
• Thixoforming
• Continuous Roll forming
• Friction Stir Welding
• Additive manufacturing
3. Conclusions
My PhD project in 1997
10
Metafor
Ponthot’s PhD
doc
1992
Metafor
+powders
Metafor
+contact
Metafor
+optimisation
1997
Metafor
+shells
Metafor
+thermal,
+3D
tests
Metafor
+remeshing
1996
My PhD
project!
Good luck!
PhD supervisor
State of Metafor in 1997
11
Source Code?
• “Spaghetti” code (Fortran 77)
• Several versions of the code
Portability?
• Depends on a library only
available as binaries on
supercomputers.
• Post-processing with a non-free
product.
Regression testing?
• Non-automatic and
incomplete procedure.
Documentation?
• An outdated technical
report from 1992
printed on paper.
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
…and then?
12
During 3 years I did almost no research at all!
In 2000, I seriously considered stopping my PhD research...
FORTUNATELY,
my supervisor gave me the opportunity to solve all these problems and
build a framework that would allow us to avoid the errors from the past.
One unique version
since 2001.
Almost no loss of
development since
then!
TODAY
How?
State of Metafor in 1997
13
Source Code?
• “Spaghetti” code (Fortran 77)
• Several versions of the code
Portability?
• Depends on a library only
available as binaries on
supercomputers.
• Post-processing with a non-free
product.
Regression testing?
• Non-automatic and
incomplete procedure.
Documentation?
• An outdated technical
report from 1992
printed on paper.
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
State of Metafor in 1997
14
Source Code?
• “Spaghetti” code (Fortran 77)
• Manual management of revisions
Portability?
• Depends on a library only
available as binaries on
supercomputers.
• Post-processing with a non-free
product.
Regression testing?
• Non-automatic and
incomplete procedure.
Documentation?
• An outdated technical
report from 1992
printed on paper.
User friendliness?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
All these problems have very elegant solutions
in the “computer science” world
BUT
…we are neither “computer scientists” nor “IT specialists”!
I’m here to
“do science”,
not coding!
Even worse:
• Some of my colleagues do not want to learn
how it works.
• Moreover these things are not taught in class
(in ULiège).
State of Metafor in 1997
15
Source Code?
• “Spaghetti” code (Fortran 77)
• Manual management of revisions
Portability?
• Depends on a library only
available as binaries on
supercomputers.
• Post-processing with a non-free
product.
Regression testing?
• Non-automatic and
incomplete procedure.
Documentation?
• An outdated technical
report from 1992
printed on paper.
User friendliness?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
For each problem, we have tried to find a compromise
between both worlds
Welcome to the
academic world!
Welcome to the
computer science world!
let’s code!let’s publish!
characters from http://geek-and-poke.com/
State of Metafor
16
Source Code?
• “Spaghetti” code (Fortran 77)
• Several versions of the code
Portability?
• Depends on a library only
available as binaries on
supercomputers.
• Post-processing with a non-free
product.
Regression testing?
• Non-automatic and
incomplete procedure.
Documentation?
• An outdated technical
report from 1992
printed on paper.
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
State of Metafor
17
Source Code?
• “Spaghetti” code (Fortran 77)
• Several versions of the code
Portability?
• Depends on a library only
available as binaries on
supercomputers.
• Post-processing with a non-free
product.
Regression testing?
• Non-automatic and
incomplete procedure.
Documentation?
• An outdated technical
report from 1992
printed on paper.
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
Source code
18
Very long tradition of Fortran 77 for implementing the finite element method...
... and a lot of other
computation programs.
(cfr BLAS: http://www.netlib.org/blas/
MUMPS: http://mumps.enseeiht.fr/ , etc.)
Still today, all the
famous older
brothers of Metafor
are written in
Fortran 77!
... also in the industry:
Source code
19
Yes, it is obviously possible to write a
good finite-element solver in Fortran…
BUT
• the language does not help you
produce clean/maintainable code
• the maintenance effort increases
with time!
Example of a subroutine call in Metafor written in Fortran
(2000)
Main problems of Fortran 77
Source code
20
• Memory management?
No dynamic memory allocation:
 any modification is very instrusive
• Modularity?
No easy way to gather similar
variables/ subroutines together
 structures?
• Features?
Necessity to learn another
programming language: (graphics, GUI,
use of libraries, network, etc.)
partially solved with
later versions of Fortran
remaining problem
We finally decided to rewrite Metafor in C++ and
take advantage of Object Oriented Programming
Main problems of Fortran 77
Source code
21
The resulting source code (300k lines) can be split into 33 dynamic libraries
HPC lib
lib GUI
CAD lib
Researchers/projects are
isolated into THEIR OWN
library.
 Limited risk of conflict.
 Bad/duplicated code
remains confined.
 Avoid the use of high-level
objects in low-level code.
Metafor.exe
executable
mtGeo.dll
geometry
mtMath.dll
math tools
mtFEM.dll
FE method
mtMaterials.dll
Constitutive laws
mtViz.dll
visualisationmtKernel.dll
access to data
mtThixo.dll
law from a PhD
Private
(NDA)
mtSabca.dll
Private routines
from a company
Not compiled on
supercomputers
set of tools commonly used
in the IT world
“version control systems”
gmail
set of tools commonly
used in academia
winzip
?
Source Code
22
Our goals
• One single reference version for everybody (4-10 simultaneous researchers).
• Try to gather all the results / code / models from past projects.
• Keep track of the whole history of modifications in the source code.
How to have one single set of source files?
Source Code
23
Repository
checkout:
get any version
as « working copy »
commit:
send changes and
create a new
revision
update:
retrieve and merge
modifications of
others
Version control systems - How does it work?
holds the
complete
history of
modifications
Most basic workflow
Daily usage should be
very easy and
intuitive because my
colleages will not
read the manual…
 No “branches”
Source Code
24
Repository
checkout:
get any version
as « working copy »
commit:
send changes and
create a new
revision
update:
retrieve and merge
modifications of
others
Version control systems - How does it work?
holds the
complete
history of
modifications
Most basic workflow
Additional safeguard:
 A series of tests
(“test suite”) should
succeed before any
commit.
 The latest version
is always stable.
State of Metafor
25
Source Code?
• “Spaghetti” code (Fortran 77)
• Several versions of the code
Portability?
• Depends on a library only
available as binaries on
supercomputers.
• Post-processing with a non-free
product.
Regression testing?
• Non-automatic and
incomplete procedure.
Documentation?
• An outdated technical
report from 1992
printed on paper.
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
State of Metafor
26
Portability?
• Depends on a library only
available as binaries on
supercomputers.
• Post-processing with a non-free
product.
Regression testing?
• Non-automatic and
incomplete procedure.
Documentation?
• An outdated technical
report from 1992
printed on paper.
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
Source Code?
• Modular (C++).
• Source Code Management
with Subversion.
State of Metafor
27
Portability?
• Depends on a library only
available as binaries on
supercomputers.
• Post-processing with a non-free
product.
Regression testing?
• Non-automatic and
incomplete procedure.
Documentation?
• An outdated technical
report from 1992
printed on paper.
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
Source Code?
• Modular (C++).
• Source Code Management
with Subversion.
Regression testing
28
Aims
• Non regression of the algorithms
and the numerical models.
• Avoid conflicts between people.
set of tools commonly
used in academia
manual testing
(when something is already broken)
set of tools commonly used
in the IT world
“continuous integration”
Travis CICTest CDash
shell scripts
?
Regression testing
29
Principles of our “test suite”
• In-house python script.
• Easy procedure – “just run the script!”
• Runs a series of about 3100 FE models, in parallel if the machine allows it.
• Lasts less than 1 night on a classical desktop PC (~75000s CPU = ~5h30 on a 4-
core PC).
• 4 configurations (various OS/compilers):
• Each test extracts “well chosen” results that are compared to the results of the
previous version of the code (these results are committed with the source code.)
1. It is forbidden to commit without a full
success of the test suite.
2. Any untested development can be destroyed
(adding tests becomes mandatory).
2 simple rules
State of Metafor
30
Portability?
• Depends on a library only
available as binaries on
supercomputers.
• Post-processing with a non-free
product.
Regression testing?
• Non-automatic and
incomplete procedure.
Documentation?
• An outdated technical
report from 1992
printed on paper.
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
Source Code?
• Modular (C++).
• Source Code Management
with Subversion.
State of Metafor
31
Portability?
• Depends on a library only
available as binaries on
supercomputers.
• Post-processing with a non-free
product.
Documentation?
• An outdated technical
report from 1992
printed on paper.
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
Source Code?
• Modular (C++).
• Source Code Management
with Subversion.
Regression testing?
• Mandatory.
• In-house script.
State of Metafor
32
Portability?
• Depends on a library only
available as binaries on
supercomputers.
• Post-processing with a non-free
product.
Documentation?
• An outdated technical
report from 1992
printed on paper.
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
Source Code?
• Modular (C++).
• Source Code Management
with Subversion.
Regression testing?
• Mandatory.
• In-house script.
Documentation
33
documentation
of changes
What was modified? When?
By whom? Why?
documentation
of the source
code
user
documentation
Usage of the program
3 types of
documentation
svn log!
Doxygen!
LaTeX!
???
Documentation
34
Wiki system: Dokuwiki
https://www.dokuwiki.org/
Strong points
• Created 14 years ago.
• Very easy installation
(text-based DB).
• Numerous plugins.
• Regular / automatic updates.
• ... and no need to read a long
manual to edit a page.
http://metafor.ltas.ulg.ac.be/
Documentation
35
As any wiki:
• Online editing.
• Keep track of all changes.
• Importation of images,
videos, etc.
javascript rendering engine for equations:
Print
Online view
Online editor
Documentation
36
Documentation of source code changes (“commits”)
Each commit is fully documented
by its author on the wiki.
State of Metafor
37
Portability?
• Depends on a library only
available as binaries on
supercomputers.
• Post-processing with a non-free
product.
Documentation?
• An outdated technical
report from 1992
printed on paper.
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
Source Code?
• Modular (C++).
• Source Code Management
with Subversion.
Regression testing?
• Mandatory.
• In-house script.
State of Metafor
38
Portability?
• Depends on a library only
available as binaries on
supercomputers.
• Post-processing with a non-free
product.
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
Source Code?
• Modular (C++).
• Source Code Management
with Subversion.
Regression testing?
• Mandatory.
• In-house script.
Documentation?
• A wiki system on the
web.
State of Metafor
39
Portability?
• Depends on a library only
available as binaries on
supercomputers.
• Post-processing with a non-free
product.
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
Source Code?
• Modular (C++).
• Source Code Management
with Subversion.
Regression testing?
• Mandatory.
• In-house script.
Documentation?
• A wiki system on the
web.
Portability
40
Windows
Linux
Rule: The code should be easily built/tested on any (recent) platform
macOS
OS of supercomputers
Less user-friendly
Most popular OS
Libraries should be recompiled
Popular OS
Libraries should be recompiled
It is very important to let
developers work in their
preferred environment
(which is rarely Linux), then
build their code on
supercomputers for heavy
calculations.
Main problems
• the build system should be multi-platform (CMake).
• the dependencies should be limited and multi-platform.
Visualisation
41
Initially, 2 aims
• To see what we are doing, anytime.
• To make the software usage easier for
students and the industry.
Features
• 1 thread exclusively dedicated to
graphics running in parallel.
• The state of the memory is continuously
displayed in 3D.
• Nothing is written to disk.
Multi-platform libraries:
windows /
menus / buttons
3D display of the
problem
Example: Real-time visualisation during the simulations
State of Metafor
42
Portability?
• Depends on a library only
available as binaries on
supercomputers.
• Post-processing with a non-free
product.
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
Source Code?
• Modular (C++).
• Source Code Management
with Subversion.
Regression testing?
• Mandatory.
• In-house script.
Documentation?
• A wiki system on the
web.
State of Metafor
43
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
Source Code?
• Modular (C++).
• Source Code Management
with Subversion.
Regression testing?
• Mandatory.
• In-house script.
Documentation?
• A wiki system on the
web.
Portability?
• Runs on any recent desktop
computer and supercomputers.
• Own GUI / post-processor,
State of Metafor
44
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
Source Code?
• Modular (C++).
• Source Code Management
with Subversion.
Regression testing?
• Mandatory.
• In-house script.
Documentation?
• A wiki system on the
web.
Portability?
• Runs on any recent desktop
computer and supercomputers.
• Own GUI / post-processor,
Input files
45
geo = domain.getGeometry()
p1 = geo.add(Point(1, 0.0, 0.0))
p2 = geo.add(Point(2, 1.0, 0.0))
p3 = geo.add(Point(3, 1.0, 1.0))
p4 = geo.add(Point(4, 0.0, 1.0))
c1 = geo.add(Line(1, p1, p2))
c2 = geo.add(Line(2, p2, p3))
c3 = geo.add(Line(3, p3, p4))
c4 = geo.add(Line(4, p4, p1))
• Parsing requires a lot of code.
• Error handling?
• New syntax to learn.
• Almost no source code at all!
• Error handling by python.
• Same syntax as internal C++.
Python scripts as input files
.poi
i 1 x 0.0 y 0.0
i 2 x 1.0 y 0.0
i 3 x 1.0 y 1.0
i 4 x 0.0 y 1.0
.cur
i 1 points 1 2
i 2 points 2 3
i 3 points 3 4
i 4 points 4 1
old home-made syntax python syntax
Input files
46
.poi
i 1 x 0.0 y 0.0
i 2 x 1.0 y 0.0
i 3 x 1.0 y 1.0
i 4 x 0.0 y 1.0
.cur
i 1 points 1 2
i 2 points 2 3
i 3 points 3 4
i 4 points 4 1
geo = domain.getGeometry()
def createCube(no, Lx, Ly, ox=0.0, oy=0.0):
p1 = geo.add(Point(1, ox, 0.0))
p2 = geo.add(Point(2, ox+Lx, 0.0))
p3 = geo.add(Point(3, ox+Lx, oy+Ly))
p4 = geo.add(Point(4, ox, oy+Ly))
c1 = geo.add(Line(1, p1, p2))
c2 = geo.add(Line(2, p2, p3))
c3 = geo.add(Line(3, p3, p4))
c4 = geo.add(Line(4, p4, p1))
for i in range(5):
createSquare(no=i, Lx=1.0, Ly=1.0, ox=i*2)
import myroutines
myroutines.createBeam()
What if I want to add:
• parameters?
• functions?
• branches, loops?
• …
old home-made syntax python syntax
“for” loop
call to a function
parameters
• all these features come at no cost!
Python scripts as input files
call to external
modules
Input files
47
No cost? Really?
Yes! a Python class is automatically created by
SWIG (free tool) for each C++ class.
from materials import *
mat = ElasticMat(E, nu)
model.setMaterial(mat)
model.run()
INPUT FILE
_materials.pyd
materials.py
class ElasticMat
{
double E, nu;
public:
ElasticMat(double, double);
T computeStress(T &strain);
…
};
ElasticMat.h
materials.i
%module materials
%{
#include "ElasticMat.h"
%}
%include "ElasticMat.h"
State of Metafor
48
Input files?
• Home-made input files.
• Error-prone obscure syntax.
Extensibility?
• None.
Source Code?
• Modular (C++).
• Source Code Management
with Subversion.
Regression testing?
• Mandatory.
• In-house script.
Documentation?
• A wiki system on the
web.
Portability?
• Runs on any recent desktop
computer and supercomputers.
• Own GUI / post-processor,
State of Metafor
49
Extensibility?
• None.
Source Code?
• Modular (C++).
• Source Code Management
with Subversion.
Regression testing?
• Mandatory.
• In-house script.
Documentation?
• A wiki system on the
web.
Portability?
• Runs on any recent desktop
computer and supercomputers.
• Own GUI / post-processor,
Input files?
• Python.
State of Metafor
50
Extensibility?
• None.
Source Code?
• Modular (C++).
• Source Code Management
with Subversion.
Regression testing?
• Mandatory.
• In-house script.
Documentation?
• A wiki system on the
web.
Portability?
• Runs on any recent desktop
computer and supercomputers.
• Own GUI / post-processor,
Input files?
• Python.
Extensibility
51
1. Extensibility with “Inheritance” in C++
class ElasticMat
{
double E, nu;
public:
virtual
T computeStress(T &strain);
};
ELASTIC MATERIAL
class ElPlastMat : public ElasticMat
{
double sig_yield, hardening;
public:
virtual
T computeStress(T &strain);
};
ELASTO PLASTIC MATERIAL
• In any object-oriented language, you can extend a class using “inheritance”.
• Example: extension of an elastic material to handle elasto-plasticity:
Purpose?
• The code using the material can be written without any conditional
statements and should never be modified.
 “ if the material is elastic, do this…. else, do that” is avoided.
• But, of course, the new code should be recompiled.
Extensibility
52
2. Inheritance of C++ classes in Python : “user subroutines”
Thanks to SWIG, the derived class can be written in Python!
class ElasticMat
{
double E, nu;
public:
virtual
T computeStress(T &strain);
};
ELASTIC MATERIAL (written in C++)
from materials import *
class ElPlastMat(ElasticMat):
def computeStress(self, strain):
# compute stresses
# from strains
# using python cmds here…
return stress
ELASTO-PLASTIC MATERIAL (derived in Python)
This python code will be called
from C++!
 Very useful for students (FYP)
A new constitutive law is
available without any
compiler!
Extensibility
53
3. Extensibility via “python as a glue language”:
coupling with another solver
David Thomas
Metafor
Solid solver (C++)
fluid –
structure
solver
metafor.py
SU2.py
SU2
Fluid solver (C)
fluid-structure interaction (FSI)
Prof. V. Terrapon’s lab
Prof. J.-P. Ponthot’s lab
Extensibility
54
• Less source code: no need to code a home-made parser,
• Safety: errors are never ignored and can be correctly
handled.
• Complete Language: possibility to use loops, conditional
statements, objects, functions, ... in the input file.
• Extensibility: inheritance of C++ classes.
• Glue language: call to external programs, solvers.
Summary – Advantages of the Python interface
State of Metafor
55
Extensibility?
• None.
Source Code?
• Modular (C++).
• Source Code Management
with Subversion.
Regression testing?
• Mandatory.
• In-house script.
Documentation?
• A wiki system on the
web.
Portability?
• Runs on any recent desktop
computer and supercomputers.
• Own GUI / post-processor,
Input files?
• Python.
State of Metafor
56
Source Code?
• Modular (C++).
• Source Code Management
with Subversion.
Portability?
• Runs on any recent desktop
computer and supercomputers.
• Own GUI / post-processor,
Regression testing?
• Mandatory.
• In-house script.
Documentation?
• A wiki system on the
web.
Input files?
• Python.
Extensibility?
• Python user-subroutines.
• Coupling with external
solvers.
Scope
57
1. Practical Management of Simulation Codes
• Metafor… from 1992 to 2018
2. Numerical Applications
• Introduction to ALE formalism
• Thixoforming
• Continuous Roll forming
• Friction Stir Welding
• Additive manufacturing
3. Conclusions
Introduction to ALE formalism
58
Eulerian formalism
 Undistorted mesh
 Free boundaries are difficult to
track
 History-dependent materials
are difficult to handle
Lagrangian formalism
 The mesh can be rapidly
distorted
 Free boundaries are
automatically computed
 History-dependent materials are
easier to handle
Kinematic description of the motion
Introduction to ALE formalism
59
Kinematic description of the motion
Arbitrary Lagrangian Eulerian
(ALE) formalism
• Extension of both previous
formalisms
• The mesh motion is uncoupled from
material motion
• ALE can be crudely seen as a
continuous remeshing procedure
• Mesh topology does not change
• Remapping of variables is faster than
classical remeshing
2 Families of ALE Problems
60
• Helps us keep well-shaped elements
despite large deformations
• Most often remeshing is completely
avoided
Benefits of ALE vs. Lagrangian models
1. Problems involving excessive mesh distortion
Example: axisymmetric forging
Lagrangian model ALE model
2 Families of ALE Problems
61
2. “Quasi-Eulerian” models
• The size of the model is decreased in the flow direction.
• Loading is easier.
• The element size may be optimised in the flow direction.
• The contact regions do not change.
Benefits of ALE vs. Lagrangian models
Lagrangian model (1755 FEs)
ALE model (954 FEs)
Example: cold rolling fixed
free
Scope
62
1. Practical Management of Simulation Codes
• Metafor… from 1992 to 2018
2. Numerical Applications
• Introduction to ALE formalism
• Thixoforming
• Continuous Roll forming
• Friction Stir Welding
• Additive manufacturing
3. Conclusions
Thixoforming
63
What is thixotropy?
• A thixotropic material behaves...
• … like a solid, at rest (a billet can sustain its own
weight).
• … like a liquid, during shearing (can be cut easily).
• Common examples: clays, muds, paints, tomato ketchup.
• Some alloys (Magnesium, Aluminium, Steels) exhibit a
semi-solid behaviour in a narrow range of T.
What is thixoforming?
• Taking advantage of this semi-solid state.
• The process combines advantages of casting and forging.
Thixoforming
64
Constitutive behaviour
cohesion degree
(microstructural state)
𝑓 = 𝜎 𝑉𝑀 − 𝜎 𝑦 − 𝜂 𝜀
𝑣𝑝
R. Koeune
modified yield stress
𝜎 𝑦 = 𝜎 𝑦( 𝜀
𝑣𝑝
, 𝜀 𝑣𝑝, 𝜆, 𝑓𝑙) 𝜂 = 𝜂 ( 𝜀
𝑣𝑝
, 𝜀 𝑣𝑝
, 𝜆, 𝑓𝑙)
apparent viscosity
𝜆 = 𝜆( 𝜀
𝑣𝑝
, 𝑓𝑙)
Both liquid and solid formalisms are
contained in the proposed models!
liquid fraction
(phase change)
𝑓𝑙 = 𝑓𝑙( 𝑇)
2NEWINTERNAL
VARIABLES
“Extended yield criterion” for thixotropy
Thixoforming
65
Double cup extrusion – process description
• Production of an axisymmetric H-shape part, starting from a cylinder.
• Temperature controlled by induction heating.
• Experiments made in PIMW, Liège in collaboration with ENSAM, Metz.
• Material: 100Cr6 steel alloy.
Example of (half) part
Thixoforming
66
Double cup extrusion – mesh management
cohesion degree l
ALE mesh management
(numerical trick):
 An initial thin squeezed mesh is
added to the top of the billet
Thixoforming
67
Double cup extrusion - results
Tdie = 170 °C
Tdie = 130 °C
Tdie = 180 °C
• Good agreement between
experimental and numerical results.
• The model is able to predict the
residual stresses after unloading and
cooling to room temperature.
Thixoforming
68
A PhD project built from the results of other projects
Modelling
of Thixoforming
Materials &
FE formulations
Visco-plasticity
Contact
algorithms
ALE
formalism
Thermal
problems
Scope
69
1. Practical Management of Simulation Codes
• Metafor… from 1992 to 2018
2. Numerical Applications
• Introduction to ALE formalism
• Thixoforming
• Continuous Roll forming
• Friction Stir Welding
• Additive manufacturing
3. Conclusions
Continuous Roll forming
70
A metal strip is incrementally bent by sets of rolls (called “forming stands”)
until the desired cross section is obtained
Process description
 Key advantage: OK for Advanced High Strength Steels
Industrial roll forming mill
Post-cut-off press system
FE Modelling of roll forming is essential
(roll design, prediction of defects, residual stresses, springback, etc.)
… but very time-consuming!
Continuous Roll forming
71
Forming of a rocker panel (closed section)
Process parameters
• 16 stands - unsymmetrical shape
• Material: DP980 steel
• Inter-stand distance: 350 mm
• Strip: width:167mm - thickness:1.5 mm
• Length of the model: 6.26m
• Sheet velocity: 𝑣 = 200 mm/s
• Coulomb friction 𝜇 = 0.2
cutting machine
welding line
rocker panel
Continuous Roll forming
72
Drawbacks of Lagrangian modelling
• Non-realistic boundary conditions or friction coefficents to make the sheet move.
• The sheet hits the stands and gets sometimes blocked.
 Incremental modifications of the geometry of the tools by trial and error.
• How to model the welding and post-cut operation?
In a Lagrangian model,
the continuous strip is
modelled by a sheet of
limited length.
The setup of the Lagrangian model is very tricky and time-consuming!
Continuous Roll forming
73
Initial ALE mesh: interpolation of the flower diagram
Continuous Roll forming
74
Modelling of inline welding in ALE
• Actual physics in the welding process is heavily simplified.
• The initial mesh is built as a closed mesh.
Initial ALE mesh with
closed edges in the outlet.
Y. Crutzen
Continuous Roll forming
75
• Aims:
• release the final product from the
forming rolls
• Accurate computation of the
springback
• Perfect cut-off is assumed: deactivate
the finite elements located inside the
roll-forming machine.
• Switch from ALE to purely Lagrangian
formalism.
• Implicit dynamic integration scheme
with viscous damping to kill out the
oscillations.
Modelling of the post-cut operation in ALE
Y. Crutzen
Continuous Roll forming
76
View of ALE results from a downstream point of view
Welding line
Continuous Roll forming
77
• ALE and Lagrangian curves are very similar, except in the inlet region.
• Maxima values are close to each other.
Longitudinal strain along the 2 edges
Comparison to Lagrangian results
Continuous Roll forming
78
Shape defects predicted by the model:
• Bending radii in the lower part are much larger than the desired ones.
• Upper part is not perfectly planar.
Without welding
With welding
Final shape of the cross-section extracted at mid-length of the product
Influence of the welding operation and analysis of the final section
not planar
too large radii
Continuous Roll forming
79
Shape defects predicted by the model:
• A slight longitudinal bow defect appears after post-cut.
• No significant twist defect (torsion)
Middle of the web
Analysis of the final shape of the cut-to-length strip
bow
twist
Continuous Roll forming
80
A project built from the results of other projects
Tools import
from CAD files,
Experiments
Enhanced
Assumed Strain
finite elements
Dynamic time-
integration
ALE
formalism,
parallelism
Parallel contact
algorithms
ALE model of
continuous roll
forming
Scope
81
1. Practical Management of Simulation Codes
• Metafor… from 1992 to 2018
2. Numerical Applications
• Introduction to ALE formalism
• Thixoforming
• Continuous Roll forming
• Friction Stir Welding
• Additive manufacturing
3. Conclusions
Friction Stir Welding
82
Process description
• Solid-state joining process  better than classical welding.
• Tprocess < Tmelting.
• Non-consumable tool.
• Mechanical intermixing + friction heating.
• Well suited for alloys with low fusion temp.
FSW of aluminium alloy 2024
• rotation: 500 RPM
• advance: 25 cm/min
• tool angle: 1.5°
Friction Stir Welding
83
FSW modelling with the ALE formalism
Mesh management – 3 zones
1. The mesh moves with the tool – ALE formulation (red)
2. Remeshing (transition zone - white)
3. Fixed mesh – Eulerian formulation (grey)
P Bussetta
Friction Stir Welding
84
FSW (ALE) – Example of mesh motion
Constitutive law:
Norton-Hoff
Friction Stir Welding
85
Comparison between a solid and a fluid approach
collaboration with UPC, Barcelona
Solid approach – Metafor (ULiège) Fluid approach – COMET (UPC)
unknowns: displacements,
temperature
unknowns: pressure,
velocity,
temperature
Friction Stir Welding
86
Comparison between a solid and a fluid approach
• Temperature evolution is similar with
both approaches.
Point 2
Point 1
temperatureatpoint1temperatureatpoint2
Friction Stir Welding
87
Residual stresses with the solid approach
Stresses & temp. during the process
•  = 25
• K = 1.5 MPa sm (viscosity parameter)
• m = 0,12 (strain rate sensitivity parameter)
• Q = 155 kJ/mol (activation energy)
• Young modulus = E(T)
• Poisson ratio = 0.33
Sonne et al (2013) JMPT 213
𝜎 𝑦 = 𝜎0 𝑇 + 𝐴 𝑇 1 − 𝑒 𝜉 𝜀 + 𝐾𝑒
𝑚𝑄
𝑅𝑇 𝜀 𝑚
Plates (AA2024): thermo-elasto-viscoplastic
Friction Stir Welding
88
Residual stresses with the solid approach
Stresses & temp. after the process and cooling
Plates (AA2024): thermo-elasto-viscoplastic
•  = 25
• K = 1.5 MPa sm (viscosity parameter)
• m = 0,12 (strain rate sensitivity parameter)
• Q = 155 kJ/mol (activation energy)
• Young modulus = E(T)
• Poisson ratio = 0.33
Sonne et al (2013) JMPT 213
𝜎 𝑦 = 𝜎0 𝑇 + 𝐴 𝑇 1 − 𝑒 𝜉 𝜀 + 𝐾𝑒
𝑚𝑄
𝑅𝑇 𝜀 𝑚
Friction Stir Welding
89
A project built from the results of other projects
Remeshing
Norton-Hoff
constitutive
law
ALE
formalism,
meshers
Friction Stir
Welding model
Thermal
problems
Materials &
FE formulations
Scope
90
1. Practical Management of Simulation Codes
• Metafor… from 1992 to 2018
2. Numerical Applications
• Introduction to ALE formalism
• Thixoforming
• Continuous Roll forming
• Friction Stir Welding
• Additive manufacturing
3. Conclusions
Additive Manufacturing
91
Context and challenges
• New PhD thesis started a few months ago: Very first model of
an laser solid forming with Metafor.
• The thesis focuses on mesh and geometry management.
• Material law?
• for now: thermal calculations only.
• future: reuse of the constitutive law developed in the
frame of thixoforming.
Thermal study of an AM process using
Laser Solid Forming of Ti-6Al-4V metal powder
C. Laruelle
• Can we extend the “element deletion”
algorithm (developed to compute cracks)
to an “element addition” algorithm?
Reference results from Chiumenti et al.
(UPC, Barcelona)
Additive Manufacturing
92
Mesh management technique
Computation of new active mesh and boundary conditions
Activated
Element
Element to
be activated
Boundary Condition
(e.g. Convection/Radiation)
Heat Flux Laser
Position
Time t Time t + Δt
• Finite elements and boundary conditions are all created and
deactivated at the start of the simulation.
• Activation/Deactivation of finite elements and boundary conditions
based on the current laser position.
1. 2. 3. 4. 5.
Additive Manufacturing
93
Numerical results – Time evolution of the temperature field
Additive Manufacturing
94
Thermal study of an AM process using
Laser Solid Forming of Ti-6Al-4V metal powder
Results – comparison with literature
160 TEMPERATURE 800
Metafor
COMET
METAFOR
Good agreement of the temperature evolution between
COMET, Metafor and experimental measurements.
EXP
COMET
thermocouples on the lower surface
Final temperature distribution [°C]
Additive Manufacturing
95
A project built from the results of other projects
Remeshing
Semi-solid
constitutive
law
X-FEM
Modelling of
Additive
Manufacturing
Thermo
mechanical
models
Crack
propagation
Scope
96
1. Practical Management of Simulation Codes
• Metafor… from 1992 to 2018
2. Numerical Applications
• Introduction to ALE formalism
• Thixoforming
• Continuous Roll forming
• Friction Stir Welding
• Additive manufacturing
3. Conclusions
Conclusions
97
• The development of complex models/algorithms is always
the sum of the work of many researchers.
• Keeping their source code clean, effective, reliable, robust
and easily extensible is a difficult task which is usually
underestimated in the academic world.
• A lot of simulation codes are continuously lost and projects
based on previous work do not reach their goals.
• The presented tools and the resulting methodology have
the advantage to be rather simple and allow the researchers
to spend more time on “science” and less time on
“coding”.

More Related Content

What's hot

o-checker : Malicious document file detection tool - Malicious feature can be...
o-checker : Malicious document file detection tool - Malicious feature can be...o-checker : Malicious document file detection tool - Malicious feature can be...
o-checker : Malicious document file detection tool - Malicious feature can be...CODE BLUE
 
Python 101 for the .NET Developer
Python 101 for the .NET DeveloperPython 101 for the .NET Developer
Python 101 for the .NET DeveloperSarah Dutkiewicz
 
Why Python?
Why Python?Why Python?
Why Python?Adam Pah
 
A peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserA peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserKoan-Sin Tan
 
2009 10-28-peeking-into-pandoras-bochs red-team-pentesting
2009 10-28-peeking-into-pandoras-bochs red-team-pentesting2009 10-28-peeking-into-pandoras-bochs red-team-pentesting
2009 10-28-peeking-into-pandoras-bochs red-team-pentestingSteph Cliche
 
A Peek into Google's Edge TPU
A Peek into Google's Edge TPUA Peek into Google's Edge TPU
A Peek into Google's Edge TPUKoan-Sin Tan
 
introduction of python in data science
introduction of python in data scienceintroduction of python in data science
introduction of python in data sciencebhavesh lande
 
First python project
First python projectFirst python project
First python projectNeetu Jain
 
Py Con 2009 Pumping Iron Into Python
Py Con 2009   Pumping Iron Into PythonPy Con 2009   Pumping Iron Into Python
Py Con 2009 Pumping Iron Into PythonSarah Dutkiewicz
 
Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.Carlos Miguel Ferreira
 
What is Python? (Silicon Valley CodeCamp 2014)
What is Python? (Silicon Valley CodeCamp 2014)What is Python? (Silicon Valley CodeCamp 2014)
What is Python? (Silicon Valley CodeCamp 2014)wesley chun
 
Python tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyPython tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyTIB Academy
 
Number of Computer Languages = 3
Number of Computer Languages = 3Number of Computer Languages = 3
Number of Computer Languages = 3Ram Sekhar
 
Concurrent Programming with Ruby and Tuple Spaces
Concurrent Programming with Ruby and Tuple SpacesConcurrent Programming with Ruby and Tuple Spaces
Concurrent Programming with Ruby and Tuple Spacesluccastera
 

What's hot (20)

Tensorflow 2.0 and Coral Edge TPU
Tensorflow 2.0 and Coral Edge TPU Tensorflow 2.0 and Coral Edge TPU
Tensorflow 2.0 and Coral Edge TPU
 
o-checker : Malicious document file detection tool - Malicious feature can be...
o-checker : Malicious document file detection tool - Malicious feature can be...o-checker : Malicious document file detection tool - Malicious feature can be...
o-checker : Malicious document file detection tool - Malicious feature can be...
 
Python 101 for the .NET Developer
Python 101 for the .NET DeveloperPython 101 for the .NET Developer
Python 101 for the .NET Developer
 
Why Python?
Why Python?Why Python?
Why Python?
 
A peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk UserA peek into Python's Metaclass and Bytecode from a Smalltalk User
A peek into Python's Metaclass and Bytecode from a Smalltalk User
 
A Peek into TFRT
A Peek into TFRTA Peek into TFRT
A Peek into TFRT
 
Interfacing C/C++ and Python with SWIG
Interfacing C/C++ and Python with SWIGInterfacing C/C++ and Python with SWIG
Interfacing C/C++ and Python with SWIG
 
Bioinformatica p1-perl-introduction
Bioinformatica p1-perl-introductionBioinformatica p1-perl-introduction
Bioinformatica p1-perl-introduction
 
2009 10-28-peeking-into-pandoras-bochs red-team-pentesting
2009 10-28-peeking-into-pandoras-bochs red-team-pentesting2009 10-28-peeking-into-pandoras-bochs red-team-pentesting
2009 10-28-peeking-into-pandoras-bochs red-team-pentesting
 
A Peek into Google's Edge TPU
A Peek into Google's Edge TPUA Peek into Google's Edge TPU
A Peek into Google's Edge TPU
 
introduction of python in data science
introduction of python in data scienceintroduction of python in data science
introduction of python in data science
 
First python project
First python projectFirst python project
First python project
 
Py Con 2009 Pumping Iron Into Python
Py Con 2009   Pumping Iron Into PythonPy Con 2009   Pumping Iron Into Python
Py Con 2009 Pumping Iron Into Python
 
Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.
 
P1 2018 python
P1 2018 pythonP1 2018 python
P1 2018 python
 
What is Python? (Silicon Valley CodeCamp 2014)
What is Python? (Silicon Valley CodeCamp 2014)What is Python? (Silicon Valley CodeCamp 2014)
What is Python? (Silicon Valley CodeCamp 2014)
 
Why learn python in 2017?
Why learn python in 2017?Why learn python in 2017?
Why learn python in 2017?
 
Python tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyPython tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academy
 
Number of Computer Languages = 3
Number of Computer Languages = 3Number of Computer Languages = 3
Number of Computer Languages = 3
 
Concurrent Programming with Ruby and Tuple Spaces
Concurrent Programming with Ruby and Tuple SpacesConcurrent Programming with Ruby and Tuple Spaces
Concurrent Programming with Ruby and Tuple Spaces
 

Similar to Effective development of a finite-element solver at the University

Long Life Software
Long Life SoftwareLong Life Software
Long Life SoftwareMike Long
 
Reproducible research concepts and tools
Reproducible research concepts and toolsReproducible research concepts and tools
Reproducible research concepts and toolsC. Tobin Magle
 
Enhancing Developer Productivity with Code Forensics
Enhancing Developer Productivity with Code ForensicsEnhancing Developer Productivity with Code Forensics
Enhancing Developer Productivity with Code ForensicsTechWell
 
2018 ABRF Tools for improving rigor and reproducibility in bioinformatics
2018 ABRF Tools for improving rigor and reproducibility in bioinformatics2018 ABRF Tools for improving rigor and reproducibility in bioinformatics
2018 ABRF Tools for improving rigor and reproducibility in bioinformaticsStephen Turner
 
Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Maven Logix
 
Improving the accuracy and reliability of data analysis code
Improving the accuracy and reliability of data analysis codeImproving the accuracy and reliability of data analysis code
Improving the accuracy and reliability of data analysis codeJohan Carlin
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python ProgrammingAkhil Kaushik
 
Automated static deobfuscation in the context of Reverse Engineering
Automated static deobfuscation in the context of Reverse EngineeringAutomated static deobfuscation in the context of Reverse Engineering
Automated static deobfuscation in the context of Reverse Engineeringzynamics GmbH
 
Reverse Engineering.pptx
Reverse Engineering.pptxReverse Engineering.pptx
Reverse Engineering.pptxSameer Sapra
 
NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET Dmytro Mindra
 
Demystifying Binary Reverse Engineering - Pixels Camp
Demystifying Binary Reverse Engineering - Pixels CampDemystifying Binary Reverse Engineering - Pixels Camp
Demystifying Binary Reverse Engineering - Pixels CampAndré Baptista
 
TypeScript - Javascript done right
TypeScript - Javascript done rightTypeScript - Javascript done right
TypeScript - Javascript done rightWekoslav Stefanovski
 
Open Chemistry: Input Preparation, Data Visualization & Analysis
Open Chemistry: Input Preparation, Data Visualization & AnalysisOpen Chemistry: Input Preparation, Data Visualization & Analysis
Open Chemistry: Input Preparation, Data Visualization & AnalysisMarcus Hanwell
 
Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)lqi
 
Building cloud-enabled genomics workflows with Luigi and Docker
Building cloud-enabled genomics workflows with Luigi and DockerBuilding cloud-enabled genomics workflows with Luigi and Docker
Building cloud-enabled genomics workflows with Luigi and DockerJacob Feala
 
What is (not) Pharo 8?
What is (not) Pharo 8?What is (not) Pharo 8?
What is (not) Pharo 8?FAST
 
Introduction to License Compliance and My research (D. German)
Introduction to License Compliance and My research (D. German)Introduction to License Compliance and My research (D. German)
Introduction to License Compliance and My research (D. German)dmgerman
 

Similar to Effective development of a finite-element solver at the University (20)

Introduction to multicore .ppt
Introduction to multicore .pptIntroduction to multicore .ppt
Introduction to multicore .ppt
 
Long Life Software
Long Life SoftwareLong Life Software
Long Life Software
 
Reproducible research concepts and tools
Reproducible research concepts and toolsReproducible research concepts and tools
Reproducible research concepts and tools
 
Enhancing Developer Productivity with Code Forensics
Enhancing Developer Productivity with Code ForensicsEnhancing Developer Productivity with Code Forensics
Enhancing Developer Productivity with Code Forensics
 
2018 ABRF Tools for improving rigor and reproducibility in bioinformatics
2018 ABRF Tools for improving rigor and reproducibility in bioinformatics2018 ABRF Tools for improving rigor and reproducibility in bioinformatics
2018 ABRF Tools for improving rigor and reproducibility in bioinformatics
 
Monorepo at Pinterest
Monorepo at PinterestMonorepo at Pinterest
Monorepo at Pinterest
 
Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening
 
US23_Daniels.pptx
US23_Daniels.pptxUS23_Daniels.pptx
US23_Daniels.pptx
 
Improving the accuracy and reliability of data analysis code
Improving the accuracy and reliability of data analysis codeImproving the accuracy and reliability of data analysis code
Improving the accuracy and reliability of data analysis code
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
 
Automated static deobfuscation in the context of Reverse Engineering
Automated static deobfuscation in the context of Reverse EngineeringAutomated static deobfuscation in the context of Reverse Engineering
Automated static deobfuscation in the context of Reverse Engineering
 
Reverse Engineering.pptx
Reverse Engineering.pptxReverse Engineering.pptx
Reverse Engineering.pptx
 
NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET
 
Demystifying Binary Reverse Engineering - Pixels Camp
Demystifying Binary Reverse Engineering - Pixels CampDemystifying Binary Reverse Engineering - Pixels Camp
Demystifying Binary Reverse Engineering - Pixels Camp
 
TypeScript - Javascript done right
TypeScript - Javascript done rightTypeScript - Javascript done right
TypeScript - Javascript done right
 
Open Chemistry: Input Preparation, Data Visualization & Analysis
Open Chemistry: Input Preparation, Data Visualization & AnalysisOpen Chemistry: Input Preparation, Data Visualization & Analysis
Open Chemistry: Input Preparation, Data Visualization & Analysis
 
Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)
 
Building cloud-enabled genomics workflows with Luigi and Docker
Building cloud-enabled genomics workflows with Luigi and DockerBuilding cloud-enabled genomics workflows with Luigi and Docker
Building cloud-enabled genomics workflows with Luigi and Docker
 
What is (not) Pharo 8?
What is (not) Pharo 8?What is (not) Pharo 8?
What is (not) Pharo 8?
 
Introduction to License Compliance and My research (D. German)
Introduction to License Compliance and My research (D. German)Introduction to License Compliance and My research (D. German)
Introduction to License Compliance and My research (D. German)
 

Recently uploaded

An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxPurva Nikam
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 

Recently uploaded (20)

An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptx
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 

Effective development of a finite-element solver at the University

  • 1. Effective development of a finite- element solver at the University Romain BOMAN, Luc PAPELEUX, Jean-Philippe PONTHOT University of Liège Departement of Aerospace and Mechanical Engineering ICSAAM August 28-31, 2018 – Tarbes, France
  • 2. 2 J.-P. Ponthot Our lab within the university • Numerical simulation • Solid mechanics • Finite element method • Software development Computational Mechanics hydroforming of a tube Dept of Aerospace and Mechanical Engineering (Faculty of Applied Sciences)
  • 3. Our main simulation code: Metafor 3 Implicit Finite-Element solver for the numerical simulation of large deformations of solids •ALE Formalism, remeshing. •Thermomechanical time-integration schemes. •Modelling of cracks, fracture. •Contact algorithms. •Nonlinear constitutive laws. •Mesh generation from medical images. •Fluid finite elements. •Monolithic schemes. •Coupling with extenal solvers. Metal Forming applications Crash / Impact Biomechanics Fluid/structure interaction
  • 4. Typical simulation 4 Modelling of a roll forming mill (forming of beams and tubes from steel sheets)
  • 5. Current team 5 D. Boemer (PhD student) R. Boman (Senior Researcher) M.L. Cerquaglia (PhD student) L. Papeleux (Senior Researcher) 3 PhD students – 2 senior researchers – 1 visiting academic P. Flores (visiting academic) C. Laruelle (PhD student)
  • 6. Former developers 6 http://metafor.ltas.ulg.ac.be/dokuwiki/team A. Stephany E. Biotteau C. Laurent J. Xhardez L. Vigneron L. Adam L. Noels L. Ziane M. Mengoni O. Karaseva P. Bussetta P.-P. Jeunechamps R. Koeune S. Hannay S. Trichon V.Q. Bui V. d’Otreppe W. Guo 25 contributors to the present code – from 2000 C. Canales Y. CarrettaY. Crutzen G. Deliége C. Hennuyer P. JorisG. Wautelet
  • 7. 7 Industrial partners = owns a Metafor license
  • 8. Scope 8 1. Practical Management of Simulation Codes • Metafor… from 1992 to 2018 2. Numerical Applications • Introduction to ALE formalism • Thixoforming • Continuous Roll forming • Friction Stir Welding • Additive manufacturing 3. Conclusions
  • 9. Scope 9 1. Practical Management of Simulation Codes • Metafor… from 1992 to 2018 2. Numerical Applications • Introduction to ALE formalism • Thixoforming • Continuous Roll forming • Friction Stir Welding • Additive manufacturing 3. Conclusions
  • 10. My PhD project in 1997 10 Metafor Ponthot’s PhD doc 1992 Metafor +powders Metafor +contact Metafor +optimisation 1997 Metafor +shells Metafor +thermal, +3D tests Metafor +remeshing 1996 My PhD project! Good luck! PhD supervisor
  • 11. State of Metafor in 1997 11 Source Code? • “Spaghetti” code (Fortran 77) • Several versions of the code Portability? • Depends on a library only available as binaries on supercomputers. • Post-processing with a non-free product. Regression testing? • Non-automatic and incomplete procedure. Documentation? • An outdated technical report from 1992 printed on paper. Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None.
  • 12. …and then? 12 During 3 years I did almost no research at all! In 2000, I seriously considered stopping my PhD research... FORTUNATELY, my supervisor gave me the opportunity to solve all these problems and build a framework that would allow us to avoid the errors from the past. One unique version since 2001. Almost no loss of development since then! TODAY How?
  • 13. State of Metafor in 1997 13 Source Code? • “Spaghetti” code (Fortran 77) • Several versions of the code Portability? • Depends on a library only available as binaries on supercomputers. • Post-processing with a non-free product. Regression testing? • Non-automatic and incomplete procedure. Documentation? • An outdated technical report from 1992 printed on paper. Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None.
  • 14. State of Metafor in 1997 14 Source Code? • “Spaghetti” code (Fortran 77) • Manual management of revisions Portability? • Depends on a library only available as binaries on supercomputers. • Post-processing with a non-free product. Regression testing? • Non-automatic and incomplete procedure. Documentation? • An outdated technical report from 1992 printed on paper. User friendliness? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None. All these problems have very elegant solutions in the “computer science” world BUT …we are neither “computer scientists” nor “IT specialists”! I’m here to “do science”, not coding! Even worse: • Some of my colleagues do not want to learn how it works. • Moreover these things are not taught in class (in ULiège).
  • 15. State of Metafor in 1997 15 Source Code? • “Spaghetti” code (Fortran 77) • Manual management of revisions Portability? • Depends on a library only available as binaries on supercomputers. • Post-processing with a non-free product. Regression testing? • Non-automatic and incomplete procedure. Documentation? • An outdated technical report from 1992 printed on paper. User friendliness? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None. For each problem, we have tried to find a compromise between both worlds Welcome to the academic world! Welcome to the computer science world! let’s code!let’s publish! characters from http://geek-and-poke.com/
  • 16. State of Metafor 16 Source Code? • “Spaghetti” code (Fortran 77) • Several versions of the code Portability? • Depends on a library only available as binaries on supercomputers. • Post-processing with a non-free product. Regression testing? • Non-automatic and incomplete procedure. Documentation? • An outdated technical report from 1992 printed on paper. Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None.
  • 17. State of Metafor 17 Source Code? • “Spaghetti” code (Fortran 77) • Several versions of the code Portability? • Depends on a library only available as binaries on supercomputers. • Post-processing with a non-free product. Regression testing? • Non-automatic and incomplete procedure. Documentation? • An outdated technical report from 1992 printed on paper. Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None.
  • 18. Source code 18 Very long tradition of Fortran 77 for implementing the finite element method... ... and a lot of other computation programs. (cfr BLAS: http://www.netlib.org/blas/ MUMPS: http://mumps.enseeiht.fr/ , etc.) Still today, all the famous older brothers of Metafor are written in Fortran 77! ... also in the industry:
  • 19. Source code 19 Yes, it is obviously possible to write a good finite-element solver in Fortran… BUT • the language does not help you produce clean/maintainable code • the maintenance effort increases with time! Example of a subroutine call in Metafor written in Fortran (2000) Main problems of Fortran 77
  • 20. Source code 20 • Memory management? No dynamic memory allocation:  any modification is very instrusive • Modularity? No easy way to gather similar variables/ subroutines together  structures? • Features? Necessity to learn another programming language: (graphics, GUI, use of libraries, network, etc.) partially solved with later versions of Fortran remaining problem We finally decided to rewrite Metafor in C++ and take advantage of Object Oriented Programming Main problems of Fortran 77
  • 21. Source code 21 The resulting source code (300k lines) can be split into 33 dynamic libraries HPC lib lib GUI CAD lib Researchers/projects are isolated into THEIR OWN library.  Limited risk of conflict.  Bad/duplicated code remains confined.  Avoid the use of high-level objects in low-level code. Metafor.exe executable mtGeo.dll geometry mtMath.dll math tools mtFEM.dll FE method mtMaterials.dll Constitutive laws mtViz.dll visualisationmtKernel.dll access to data mtThixo.dll law from a PhD Private (NDA) mtSabca.dll Private routines from a company Not compiled on supercomputers
  • 22. set of tools commonly used in the IT world “version control systems” gmail set of tools commonly used in academia winzip ? Source Code 22 Our goals • One single reference version for everybody (4-10 simultaneous researchers). • Try to gather all the results / code / models from past projects. • Keep track of the whole history of modifications in the source code. How to have one single set of source files?
  • 23. Source Code 23 Repository checkout: get any version as « working copy » commit: send changes and create a new revision update: retrieve and merge modifications of others Version control systems - How does it work? holds the complete history of modifications Most basic workflow Daily usage should be very easy and intuitive because my colleages will not read the manual…  No “branches”
  • 24. Source Code 24 Repository checkout: get any version as « working copy » commit: send changes and create a new revision update: retrieve and merge modifications of others Version control systems - How does it work? holds the complete history of modifications Most basic workflow Additional safeguard:  A series of tests (“test suite”) should succeed before any commit.  The latest version is always stable.
  • 25. State of Metafor 25 Source Code? • “Spaghetti” code (Fortran 77) • Several versions of the code Portability? • Depends on a library only available as binaries on supercomputers. • Post-processing with a non-free product. Regression testing? • Non-automatic and incomplete procedure. Documentation? • An outdated technical report from 1992 printed on paper. Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None.
  • 26. State of Metafor 26 Portability? • Depends on a library only available as binaries on supercomputers. • Post-processing with a non-free product. Regression testing? • Non-automatic and incomplete procedure. Documentation? • An outdated technical report from 1992 printed on paper. Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None. Source Code? • Modular (C++). • Source Code Management with Subversion.
  • 27. State of Metafor 27 Portability? • Depends on a library only available as binaries on supercomputers. • Post-processing with a non-free product. Regression testing? • Non-automatic and incomplete procedure. Documentation? • An outdated technical report from 1992 printed on paper. Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None. Source Code? • Modular (C++). • Source Code Management with Subversion.
  • 28. Regression testing 28 Aims • Non regression of the algorithms and the numerical models. • Avoid conflicts between people. set of tools commonly used in academia manual testing (when something is already broken) set of tools commonly used in the IT world “continuous integration” Travis CICTest CDash shell scripts ?
  • 29. Regression testing 29 Principles of our “test suite” • In-house python script. • Easy procedure – “just run the script!” • Runs a series of about 3100 FE models, in parallel if the machine allows it. • Lasts less than 1 night on a classical desktop PC (~75000s CPU = ~5h30 on a 4- core PC). • 4 configurations (various OS/compilers): • Each test extracts “well chosen” results that are compared to the results of the previous version of the code (these results are committed with the source code.) 1. It is forbidden to commit without a full success of the test suite. 2. Any untested development can be destroyed (adding tests becomes mandatory). 2 simple rules
  • 30. State of Metafor 30 Portability? • Depends on a library only available as binaries on supercomputers. • Post-processing with a non-free product. Regression testing? • Non-automatic and incomplete procedure. Documentation? • An outdated technical report from 1992 printed on paper. Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None. Source Code? • Modular (C++). • Source Code Management with Subversion.
  • 31. State of Metafor 31 Portability? • Depends on a library only available as binaries on supercomputers. • Post-processing with a non-free product. Documentation? • An outdated technical report from 1992 printed on paper. Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None. Source Code? • Modular (C++). • Source Code Management with Subversion. Regression testing? • Mandatory. • In-house script.
  • 32. State of Metafor 32 Portability? • Depends on a library only available as binaries on supercomputers. • Post-processing with a non-free product. Documentation? • An outdated technical report from 1992 printed on paper. Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None. Source Code? • Modular (C++). • Source Code Management with Subversion. Regression testing? • Mandatory. • In-house script.
  • 33. Documentation 33 documentation of changes What was modified? When? By whom? Why? documentation of the source code user documentation Usage of the program 3 types of documentation svn log! Doxygen! LaTeX! ???
  • 34. Documentation 34 Wiki system: Dokuwiki https://www.dokuwiki.org/ Strong points • Created 14 years ago. • Very easy installation (text-based DB). • Numerous plugins. • Regular / automatic updates. • ... and no need to read a long manual to edit a page. http://metafor.ltas.ulg.ac.be/
  • 35. Documentation 35 As any wiki: • Online editing. • Keep track of all changes. • Importation of images, videos, etc. javascript rendering engine for equations: Print Online view Online editor
  • 36. Documentation 36 Documentation of source code changes (“commits”) Each commit is fully documented by its author on the wiki.
  • 37. State of Metafor 37 Portability? • Depends on a library only available as binaries on supercomputers. • Post-processing with a non-free product. Documentation? • An outdated technical report from 1992 printed on paper. Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None. Source Code? • Modular (C++). • Source Code Management with Subversion. Regression testing? • Mandatory. • In-house script.
  • 38. State of Metafor 38 Portability? • Depends on a library only available as binaries on supercomputers. • Post-processing with a non-free product. Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None. Source Code? • Modular (C++). • Source Code Management with Subversion. Regression testing? • Mandatory. • In-house script. Documentation? • A wiki system on the web.
  • 39. State of Metafor 39 Portability? • Depends on a library only available as binaries on supercomputers. • Post-processing with a non-free product. Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None. Source Code? • Modular (C++). • Source Code Management with Subversion. Regression testing? • Mandatory. • In-house script. Documentation? • A wiki system on the web.
  • 40. Portability 40 Windows Linux Rule: The code should be easily built/tested on any (recent) platform macOS OS of supercomputers Less user-friendly Most popular OS Libraries should be recompiled Popular OS Libraries should be recompiled It is very important to let developers work in their preferred environment (which is rarely Linux), then build their code on supercomputers for heavy calculations. Main problems • the build system should be multi-platform (CMake). • the dependencies should be limited and multi-platform.
  • 41. Visualisation 41 Initially, 2 aims • To see what we are doing, anytime. • To make the software usage easier for students and the industry. Features • 1 thread exclusively dedicated to graphics running in parallel. • The state of the memory is continuously displayed in 3D. • Nothing is written to disk. Multi-platform libraries: windows / menus / buttons 3D display of the problem Example: Real-time visualisation during the simulations
  • 42. State of Metafor 42 Portability? • Depends on a library only available as binaries on supercomputers. • Post-processing with a non-free product. Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None. Source Code? • Modular (C++). • Source Code Management with Subversion. Regression testing? • Mandatory. • In-house script. Documentation? • A wiki system on the web.
  • 43. State of Metafor 43 Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None. Source Code? • Modular (C++). • Source Code Management with Subversion. Regression testing? • Mandatory. • In-house script. Documentation? • A wiki system on the web. Portability? • Runs on any recent desktop computer and supercomputers. • Own GUI / post-processor,
  • 44. State of Metafor 44 Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None. Source Code? • Modular (C++). • Source Code Management with Subversion. Regression testing? • Mandatory. • In-house script. Documentation? • A wiki system on the web. Portability? • Runs on any recent desktop computer and supercomputers. • Own GUI / post-processor,
  • 45. Input files 45 geo = domain.getGeometry() p1 = geo.add(Point(1, 0.0, 0.0)) p2 = geo.add(Point(2, 1.0, 0.0)) p3 = geo.add(Point(3, 1.0, 1.0)) p4 = geo.add(Point(4, 0.0, 1.0)) c1 = geo.add(Line(1, p1, p2)) c2 = geo.add(Line(2, p2, p3)) c3 = geo.add(Line(3, p3, p4)) c4 = geo.add(Line(4, p4, p1)) • Parsing requires a lot of code. • Error handling? • New syntax to learn. • Almost no source code at all! • Error handling by python. • Same syntax as internal C++. Python scripts as input files .poi i 1 x 0.0 y 0.0 i 2 x 1.0 y 0.0 i 3 x 1.0 y 1.0 i 4 x 0.0 y 1.0 .cur i 1 points 1 2 i 2 points 2 3 i 3 points 3 4 i 4 points 4 1 old home-made syntax python syntax
  • 46. Input files 46 .poi i 1 x 0.0 y 0.0 i 2 x 1.0 y 0.0 i 3 x 1.0 y 1.0 i 4 x 0.0 y 1.0 .cur i 1 points 1 2 i 2 points 2 3 i 3 points 3 4 i 4 points 4 1 geo = domain.getGeometry() def createCube(no, Lx, Ly, ox=0.0, oy=0.0): p1 = geo.add(Point(1, ox, 0.0)) p2 = geo.add(Point(2, ox+Lx, 0.0)) p3 = geo.add(Point(3, ox+Lx, oy+Ly)) p4 = geo.add(Point(4, ox, oy+Ly)) c1 = geo.add(Line(1, p1, p2)) c2 = geo.add(Line(2, p2, p3)) c3 = geo.add(Line(3, p3, p4)) c4 = geo.add(Line(4, p4, p1)) for i in range(5): createSquare(no=i, Lx=1.0, Ly=1.0, ox=i*2) import myroutines myroutines.createBeam() What if I want to add: • parameters? • functions? • branches, loops? • … old home-made syntax python syntax “for” loop call to a function parameters • all these features come at no cost! Python scripts as input files call to external modules
  • 47. Input files 47 No cost? Really? Yes! a Python class is automatically created by SWIG (free tool) for each C++ class. from materials import * mat = ElasticMat(E, nu) model.setMaterial(mat) model.run() INPUT FILE _materials.pyd materials.py class ElasticMat { double E, nu; public: ElasticMat(double, double); T computeStress(T &strain); … }; ElasticMat.h materials.i %module materials %{ #include "ElasticMat.h" %} %include "ElasticMat.h"
  • 48. State of Metafor 48 Input files? • Home-made input files. • Error-prone obscure syntax. Extensibility? • None. Source Code? • Modular (C++). • Source Code Management with Subversion. Regression testing? • Mandatory. • In-house script. Documentation? • A wiki system on the web. Portability? • Runs on any recent desktop computer and supercomputers. • Own GUI / post-processor,
  • 49. State of Metafor 49 Extensibility? • None. Source Code? • Modular (C++). • Source Code Management with Subversion. Regression testing? • Mandatory. • In-house script. Documentation? • A wiki system on the web. Portability? • Runs on any recent desktop computer and supercomputers. • Own GUI / post-processor, Input files? • Python.
  • 50. State of Metafor 50 Extensibility? • None. Source Code? • Modular (C++). • Source Code Management with Subversion. Regression testing? • Mandatory. • In-house script. Documentation? • A wiki system on the web. Portability? • Runs on any recent desktop computer and supercomputers. • Own GUI / post-processor, Input files? • Python.
  • 51. Extensibility 51 1. Extensibility with “Inheritance” in C++ class ElasticMat { double E, nu; public: virtual T computeStress(T &strain); }; ELASTIC MATERIAL class ElPlastMat : public ElasticMat { double sig_yield, hardening; public: virtual T computeStress(T &strain); }; ELASTO PLASTIC MATERIAL • In any object-oriented language, you can extend a class using “inheritance”. • Example: extension of an elastic material to handle elasto-plasticity: Purpose? • The code using the material can be written without any conditional statements and should never be modified.  “ if the material is elastic, do this…. else, do that” is avoided. • But, of course, the new code should be recompiled.
  • 52. Extensibility 52 2. Inheritance of C++ classes in Python : “user subroutines” Thanks to SWIG, the derived class can be written in Python! class ElasticMat { double E, nu; public: virtual T computeStress(T &strain); }; ELASTIC MATERIAL (written in C++) from materials import * class ElPlastMat(ElasticMat): def computeStress(self, strain): # compute stresses # from strains # using python cmds here… return stress ELASTO-PLASTIC MATERIAL (derived in Python) This python code will be called from C++!  Very useful for students (FYP) A new constitutive law is available without any compiler!
  • 53. Extensibility 53 3. Extensibility via “python as a glue language”: coupling with another solver David Thomas Metafor Solid solver (C++) fluid – structure solver metafor.py SU2.py SU2 Fluid solver (C) fluid-structure interaction (FSI) Prof. V. Terrapon’s lab Prof. J.-P. Ponthot’s lab
  • 54. Extensibility 54 • Less source code: no need to code a home-made parser, • Safety: errors are never ignored and can be correctly handled. • Complete Language: possibility to use loops, conditional statements, objects, functions, ... in the input file. • Extensibility: inheritance of C++ classes. • Glue language: call to external programs, solvers. Summary – Advantages of the Python interface
  • 55. State of Metafor 55 Extensibility? • None. Source Code? • Modular (C++). • Source Code Management with Subversion. Regression testing? • Mandatory. • In-house script. Documentation? • A wiki system on the web. Portability? • Runs on any recent desktop computer and supercomputers. • Own GUI / post-processor, Input files? • Python.
  • 56. State of Metafor 56 Source Code? • Modular (C++). • Source Code Management with Subversion. Portability? • Runs on any recent desktop computer and supercomputers. • Own GUI / post-processor, Regression testing? • Mandatory. • In-house script. Documentation? • A wiki system on the web. Input files? • Python. Extensibility? • Python user-subroutines. • Coupling with external solvers.
  • 57. Scope 57 1. Practical Management of Simulation Codes • Metafor… from 1992 to 2018 2. Numerical Applications • Introduction to ALE formalism • Thixoforming • Continuous Roll forming • Friction Stir Welding • Additive manufacturing 3. Conclusions
  • 58. Introduction to ALE formalism 58 Eulerian formalism  Undistorted mesh  Free boundaries are difficult to track  History-dependent materials are difficult to handle Lagrangian formalism  The mesh can be rapidly distorted  Free boundaries are automatically computed  History-dependent materials are easier to handle Kinematic description of the motion
  • 59. Introduction to ALE formalism 59 Kinematic description of the motion Arbitrary Lagrangian Eulerian (ALE) formalism • Extension of both previous formalisms • The mesh motion is uncoupled from material motion • ALE can be crudely seen as a continuous remeshing procedure • Mesh topology does not change • Remapping of variables is faster than classical remeshing
  • 60. 2 Families of ALE Problems 60 • Helps us keep well-shaped elements despite large deformations • Most often remeshing is completely avoided Benefits of ALE vs. Lagrangian models 1. Problems involving excessive mesh distortion Example: axisymmetric forging Lagrangian model ALE model
  • 61. 2 Families of ALE Problems 61 2. “Quasi-Eulerian” models • The size of the model is decreased in the flow direction. • Loading is easier. • The element size may be optimised in the flow direction. • The contact regions do not change. Benefits of ALE vs. Lagrangian models Lagrangian model (1755 FEs) ALE model (954 FEs) Example: cold rolling fixed free
  • 62. Scope 62 1. Practical Management of Simulation Codes • Metafor… from 1992 to 2018 2. Numerical Applications • Introduction to ALE formalism • Thixoforming • Continuous Roll forming • Friction Stir Welding • Additive manufacturing 3. Conclusions
  • 63. Thixoforming 63 What is thixotropy? • A thixotropic material behaves... • … like a solid, at rest (a billet can sustain its own weight). • … like a liquid, during shearing (can be cut easily). • Common examples: clays, muds, paints, tomato ketchup. • Some alloys (Magnesium, Aluminium, Steels) exhibit a semi-solid behaviour in a narrow range of T. What is thixoforming? • Taking advantage of this semi-solid state. • The process combines advantages of casting and forging.
  • 64. Thixoforming 64 Constitutive behaviour cohesion degree (microstructural state) 𝑓 = 𝜎 𝑉𝑀 − 𝜎 𝑦 − 𝜂 𝜀 𝑣𝑝 R. Koeune modified yield stress 𝜎 𝑦 = 𝜎 𝑦( 𝜀 𝑣𝑝 , 𝜀 𝑣𝑝, 𝜆, 𝑓𝑙) 𝜂 = 𝜂 ( 𝜀 𝑣𝑝 , 𝜀 𝑣𝑝 , 𝜆, 𝑓𝑙) apparent viscosity 𝜆 = 𝜆( 𝜀 𝑣𝑝 , 𝑓𝑙) Both liquid and solid formalisms are contained in the proposed models! liquid fraction (phase change) 𝑓𝑙 = 𝑓𝑙( 𝑇) 2NEWINTERNAL VARIABLES “Extended yield criterion” for thixotropy
  • 65. Thixoforming 65 Double cup extrusion – process description • Production of an axisymmetric H-shape part, starting from a cylinder. • Temperature controlled by induction heating. • Experiments made in PIMW, Liège in collaboration with ENSAM, Metz. • Material: 100Cr6 steel alloy. Example of (half) part
  • 66. Thixoforming 66 Double cup extrusion – mesh management cohesion degree l ALE mesh management (numerical trick):  An initial thin squeezed mesh is added to the top of the billet
  • 67. Thixoforming 67 Double cup extrusion - results Tdie = 170 °C Tdie = 130 °C Tdie = 180 °C • Good agreement between experimental and numerical results. • The model is able to predict the residual stresses after unloading and cooling to room temperature.
  • 68. Thixoforming 68 A PhD project built from the results of other projects Modelling of Thixoforming Materials & FE formulations Visco-plasticity Contact algorithms ALE formalism Thermal problems
  • 69. Scope 69 1. Practical Management of Simulation Codes • Metafor… from 1992 to 2018 2. Numerical Applications • Introduction to ALE formalism • Thixoforming • Continuous Roll forming • Friction Stir Welding • Additive manufacturing 3. Conclusions
  • 70. Continuous Roll forming 70 A metal strip is incrementally bent by sets of rolls (called “forming stands”) until the desired cross section is obtained Process description  Key advantage: OK for Advanced High Strength Steels Industrial roll forming mill Post-cut-off press system FE Modelling of roll forming is essential (roll design, prediction of defects, residual stresses, springback, etc.) … but very time-consuming!
  • 71. Continuous Roll forming 71 Forming of a rocker panel (closed section) Process parameters • 16 stands - unsymmetrical shape • Material: DP980 steel • Inter-stand distance: 350 mm • Strip: width:167mm - thickness:1.5 mm • Length of the model: 6.26m • Sheet velocity: 𝑣 = 200 mm/s • Coulomb friction 𝜇 = 0.2 cutting machine welding line rocker panel
  • 72. Continuous Roll forming 72 Drawbacks of Lagrangian modelling • Non-realistic boundary conditions or friction coefficents to make the sheet move. • The sheet hits the stands and gets sometimes blocked.  Incremental modifications of the geometry of the tools by trial and error. • How to model the welding and post-cut operation? In a Lagrangian model, the continuous strip is modelled by a sheet of limited length. The setup of the Lagrangian model is very tricky and time-consuming!
  • 73. Continuous Roll forming 73 Initial ALE mesh: interpolation of the flower diagram
  • 74. Continuous Roll forming 74 Modelling of inline welding in ALE • Actual physics in the welding process is heavily simplified. • The initial mesh is built as a closed mesh. Initial ALE mesh with closed edges in the outlet. Y. Crutzen
  • 75. Continuous Roll forming 75 • Aims: • release the final product from the forming rolls • Accurate computation of the springback • Perfect cut-off is assumed: deactivate the finite elements located inside the roll-forming machine. • Switch from ALE to purely Lagrangian formalism. • Implicit dynamic integration scheme with viscous damping to kill out the oscillations. Modelling of the post-cut operation in ALE Y. Crutzen
  • 76. Continuous Roll forming 76 View of ALE results from a downstream point of view Welding line
  • 77. Continuous Roll forming 77 • ALE and Lagrangian curves are very similar, except in the inlet region. • Maxima values are close to each other. Longitudinal strain along the 2 edges Comparison to Lagrangian results
  • 78. Continuous Roll forming 78 Shape defects predicted by the model: • Bending radii in the lower part are much larger than the desired ones. • Upper part is not perfectly planar. Without welding With welding Final shape of the cross-section extracted at mid-length of the product Influence of the welding operation and analysis of the final section not planar too large radii
  • 79. Continuous Roll forming 79 Shape defects predicted by the model: • A slight longitudinal bow defect appears after post-cut. • No significant twist defect (torsion) Middle of the web Analysis of the final shape of the cut-to-length strip bow twist
  • 80. Continuous Roll forming 80 A project built from the results of other projects Tools import from CAD files, Experiments Enhanced Assumed Strain finite elements Dynamic time- integration ALE formalism, parallelism Parallel contact algorithms ALE model of continuous roll forming
  • 81. Scope 81 1. Practical Management of Simulation Codes • Metafor… from 1992 to 2018 2. Numerical Applications • Introduction to ALE formalism • Thixoforming • Continuous Roll forming • Friction Stir Welding • Additive manufacturing 3. Conclusions
  • 82. Friction Stir Welding 82 Process description • Solid-state joining process  better than classical welding. • Tprocess < Tmelting. • Non-consumable tool. • Mechanical intermixing + friction heating. • Well suited for alloys with low fusion temp. FSW of aluminium alloy 2024 • rotation: 500 RPM • advance: 25 cm/min • tool angle: 1.5°
  • 83. Friction Stir Welding 83 FSW modelling with the ALE formalism Mesh management – 3 zones 1. The mesh moves with the tool – ALE formulation (red) 2. Remeshing (transition zone - white) 3. Fixed mesh – Eulerian formulation (grey) P Bussetta
  • 84. Friction Stir Welding 84 FSW (ALE) – Example of mesh motion Constitutive law: Norton-Hoff
  • 85. Friction Stir Welding 85 Comparison between a solid and a fluid approach collaboration with UPC, Barcelona Solid approach – Metafor (ULiège) Fluid approach – COMET (UPC) unknowns: displacements, temperature unknowns: pressure, velocity, temperature
  • 86. Friction Stir Welding 86 Comparison between a solid and a fluid approach • Temperature evolution is similar with both approaches. Point 2 Point 1 temperatureatpoint1temperatureatpoint2
  • 87. Friction Stir Welding 87 Residual stresses with the solid approach Stresses & temp. during the process •  = 25 • K = 1.5 MPa sm (viscosity parameter) • m = 0,12 (strain rate sensitivity parameter) • Q = 155 kJ/mol (activation energy) • Young modulus = E(T) • Poisson ratio = 0.33 Sonne et al (2013) JMPT 213 𝜎 𝑦 = 𝜎0 𝑇 + 𝐴 𝑇 1 − 𝑒 𝜉 𝜀 + 𝐾𝑒 𝑚𝑄 𝑅𝑇 𝜀 𝑚 Plates (AA2024): thermo-elasto-viscoplastic
  • 88. Friction Stir Welding 88 Residual stresses with the solid approach Stresses & temp. after the process and cooling Plates (AA2024): thermo-elasto-viscoplastic •  = 25 • K = 1.5 MPa sm (viscosity parameter) • m = 0,12 (strain rate sensitivity parameter) • Q = 155 kJ/mol (activation energy) • Young modulus = E(T) • Poisson ratio = 0.33 Sonne et al (2013) JMPT 213 𝜎 𝑦 = 𝜎0 𝑇 + 𝐴 𝑇 1 − 𝑒 𝜉 𝜀 + 𝐾𝑒 𝑚𝑄 𝑅𝑇 𝜀 𝑚
  • 89. Friction Stir Welding 89 A project built from the results of other projects Remeshing Norton-Hoff constitutive law ALE formalism, meshers Friction Stir Welding model Thermal problems Materials & FE formulations
  • 90. Scope 90 1. Practical Management of Simulation Codes • Metafor… from 1992 to 2018 2. Numerical Applications • Introduction to ALE formalism • Thixoforming • Continuous Roll forming • Friction Stir Welding • Additive manufacturing 3. Conclusions
  • 91. Additive Manufacturing 91 Context and challenges • New PhD thesis started a few months ago: Very first model of an laser solid forming with Metafor. • The thesis focuses on mesh and geometry management. • Material law? • for now: thermal calculations only. • future: reuse of the constitutive law developed in the frame of thixoforming. Thermal study of an AM process using Laser Solid Forming of Ti-6Al-4V metal powder C. Laruelle • Can we extend the “element deletion” algorithm (developed to compute cracks) to an “element addition” algorithm? Reference results from Chiumenti et al. (UPC, Barcelona)
  • 92. Additive Manufacturing 92 Mesh management technique Computation of new active mesh and boundary conditions Activated Element Element to be activated Boundary Condition (e.g. Convection/Radiation) Heat Flux Laser Position Time t Time t + Δt • Finite elements and boundary conditions are all created and deactivated at the start of the simulation. • Activation/Deactivation of finite elements and boundary conditions based on the current laser position. 1. 2. 3. 4. 5.
  • 93. Additive Manufacturing 93 Numerical results – Time evolution of the temperature field
  • 94. Additive Manufacturing 94 Thermal study of an AM process using Laser Solid Forming of Ti-6Al-4V metal powder Results – comparison with literature 160 TEMPERATURE 800 Metafor COMET METAFOR Good agreement of the temperature evolution between COMET, Metafor and experimental measurements. EXP COMET thermocouples on the lower surface Final temperature distribution [°C]
  • 95. Additive Manufacturing 95 A project built from the results of other projects Remeshing Semi-solid constitutive law X-FEM Modelling of Additive Manufacturing Thermo mechanical models Crack propagation
  • 96. Scope 96 1. Practical Management of Simulation Codes • Metafor… from 1992 to 2018 2. Numerical Applications • Introduction to ALE formalism • Thixoforming • Continuous Roll forming • Friction Stir Welding • Additive manufacturing 3. Conclusions
  • 97. Conclusions 97 • The development of complex models/algorithms is always the sum of the work of many researchers. • Keeping their source code clean, effective, reliable, robust and easily extensible is a difficult task which is usually underestimated in the academic world. • A lot of simulation codes are continuously lost and projects based on previous work do not reach their goals. • The presented tools and the resulting methodology have the advantage to be rather simple and allow the researchers to spend more time on “science” and less time on “coding”.