A complete methodology for the implementation of XFEM
models
Team: - Carlos Hernán Villanueva
- Kai Yu
WHAT IS XFEM?
It stands for the eXtended finite element method
WHY XFEM?
Why do we need to extend the classical FEM?
A discontinuity is a rapid
change in a field variable
(a) Cracks, (b) Shear bands, (c) Interface
of two fluids
Discontinuity in our element
QUAD4 DISCONTINUITY
WHY NOT A RE-MESHING TOOL?
Re-meshing is computationally more expensive that XFEM
HOW DOES XFEM WORK?
The eXtended finite element method adds enrichment degrees of freedom to interpolate sub-
domains of discontinuity
Regular FE temperature element
QUAD4
Node 4: TEMP
Node 1: TEMP
Node 3: TEMP
Node 2: TEMP
eXtended FE temperature element
QUAD4
Node 4: TEMP
TEMP enriched
Node 1: TEMP
TEMP enriched
Node 3: TEMP TEMP enriched
Node 2: TEMP TEMP enriched
Material Phase II Material Phase I
To summarize: WHAT IS AND WHY DO WE NEED XFEM?
Traditional FEM
• Mesh generates discrete representation of potentially complex geometry
Why XFEM?
Changes in topology or
shape • Require new
mesh • Discontinuities
must align with element edges
Why XFEM?
The solution: eXtended Finite Element Method
Numerical technique
Provides local enrichment
For solutions to differential equations with discontinuous functions
Avoids need to re-mesh
Solve shortcomings of FEM
What is XFEM?
HOW DO WE MODEL DISCONTINUITIES?
A level-set function can model discontinuities in a fixed mesh
Positive phase
Negative phase
Zero level-set
Discontinuity of interest is represented as the zero level-set function
Numerical Scheme XFEM places
discontinuity at the boundary layer dividing the grid into negative and positive phases
XFEM
Background: Level-set function
FEM
XFEM
Background: XFEM and LSM
LSM
XFEM
LSM: - Model
discontinuity XFEM:
- Solves the problem
Natural coupling XFEM and LSM
+ - + + + -
+
+
- + - + - +
-
+ -
+
+ -
- - -
-
How do level-set functions work? Compute nodal level-set values based on
desired topology
HOW ARE ENRICHMENTS APPLIED?
Enrichment functions are applied to interpolate discontinuities
• n-dimensional domain: Ω ϵ R • nel elements, numbered from 1 to nel. • I is the set of all nodes in the domain • Iel
k are the nodes of element k ϵ {1,…, nel}.
How does XFEM provide local enrichment?
• Standard extended finite element method approximation of u(x)
• uh(x): approximated function • Ni(x): standard FE function of node i • ui: unknown of the standard FE part at node i • Mi(x): local enrichment function of node i • ai: unknown of the enrichment at node i • I*: nodal subset of the enrichment, built by the nodes of all
elements that are cut by the discontinuity
How does XFEM provide local enrichment?
• The local enrichment functions have the form:
• Where Ni*(x) are the partition of unity functions and Ψ(x) are the global enrichment functions
• These Ni*(x) build a partition of unity in elements whose nodes are all in the nodal subset I*
How does XFEM provide local enrichment?
HOW DO WE IMPLEMENT XFEM?
Let’s begin by the triangulation of our element for integration
Sub-division of geometric objects into integrable domains such as triangles and tetrahedra
Circumcircle of any triangle does not contain the vertices of other triangle
Delaunay triangulation
• Straightforward for 2D • Only 6 cases
+ - + + + -
+
+
- + - + - +
-
+ -
+
+ -
- - -
-
Delaunay triangulation – 2D
• More complicated for 3D • Multiple tetrahedra per interface • Needed a tool to triangulate the intersections for us
Phase 1
Combined
Phase 2
Delaunay triangulation – 3D
• Fortran90 Library for Computational Geometry in 2D, 3D, ND • Delaunay triangulation in 3D routine (dtris3)
Geompack3
Phase 1
Combined
Phase 2
Delaunay triangulation – 3D • A wrapper was used to interface with code in
C++
WHICH DEGREES OF FREEDOM TO USE?
Enrichment functions needs to continuous across nodal clusters
• A level-set function is used to represent a discontinuity
• Initially we don’t know how many enrichment functions we will need –We can estimate a number, not 100% accurate
• We can assign a maximum: Regular degree of freedom + 27 enrichment levels –First 14 number correspond to degrees of freedom of
material phase I –Second half corresponds to degrees of freedom of
material phase II
How to apply enrichments
• Consider the following 6 element model:
I
I
I
I
I
I
II II
II II
II II
How to apply enrichments
• Important to obtain enrichment values when using XFEM.
I
I
I
I
I
I
II II
II II
II II This node will affect the behavior of 4 elements.
This node will affect the behavior of 2 elements.
How to apply enrichments
• Important to obtain enrichment values when using XFEM.
I
I
I
I II II
II II
All the phase 1 components will receive the same enrichment
value because they are all connected.
I I II II
This two elements will receive different enrichments values
because they do not share an interface.
How to apply enrichments
METHODOLOGY OVERVIEW
Test example
Methodology: Setup
4-element 2D mesh. Red areas: phase 2, positive level-set value; blue areas: phase 1 negative level-set value at the node
Methodology: Discretization
4-element 2D mesh. Red numbers represent the Global Element Id, blue numbers represent the Global Node Id.
Methodology: Edges
Edge representation in a QUAD4 element. Green edges represent the local edge index at the element.
Methodology: Intersection points
Mapping of intersection point to element.
Phase 1
Combined
Phase 2
Delaunay triangulation
Enrichment algorithm
Sub-phase (element level)
Enrichment (nodal level)
Assign degrees of freedom (nodal level)
Sub-phase algorithm
Sub-phase algorithm
Triangle number
Main Phase Sub-Phase
1 1 0
2 1 0
3 1 0
4 1 0
5 2 14
6 2 15
• With 27 enrichment levels
Methodology: Enrichment algorithm
4-element 2D mesh. Red areas: phase 2, positive level-set value; blue areas: phase 1 negative level-set value at the node
Enrichment algorithm
Nodes/Elements
1 2 3 4
1 14 2 “C” 0 0 3 “C” 15 14 14 15 4 “C” 0 0 5 15 6 “C” 0 0 7 15 8 “C” 0 0 9 14
Enrichment algorithm
Nodes/Elements
1 2 3 4
1 “U” 15 2 “C” 0 0 3 “C” 14 14 14 14 4 “C” 0 0 5 “U” 16 6 “C” 0 0 7 “U” 17 8 “C” 0 0 9 “U” 18
Results: Gauss points
Gauss points on volume: Phase 1,
tetrahedron 1
Results: Gauss points on interface and Normal vector
Gauss points on interface and
normal vector to surface: Phase 1, tetrahedron 1
Pre-conditioner
• Calculate the integral of the shape functions for each
enrichment level • Clip degrees of freedom that have a high integral • Apply pre-conditioner matrix with integral values to Jacobian
and solution vector • 4 pre-conditioner types implemented:
• Maximum value of integrals of shape functions per enrichment level
• Sum of values of integrals of shape functions per enrichment level
• Maximum value of integrals of the derivatives of the shape functions per enrichment level
• Sum of values of integrals of the derivatives of the shape functions per enrichment level
Corroborate results
• By using a combination of different mesh
refinements, constraint parameters and property ratios
• Check how variation of these methods and values affect the results of XFEM
Thermal Tests • Mesh size: 20x20,30x30,40x40,50x50
• Conductivity ratios: 0.01,0.1,1,10,100,1000
• Stabilization factor: 1,10,100,1000
Nominal values are in bold face Vary values of one parameter (mesh size, conductivity ratio, etc)
while setting the other parameters to the nominal values Sweep radius of circular inclusion between 2 and 6 using 500
increments
Results – Mesh refinement sweep • Mesh size: variable • Conductivity ratios: k2/k1=10 • Stabilization factor: 10 • Interface formulation: stabilized Lagrange • Solver: UMFPACK • Pre-conditioner: No scaling
Mean Interface and L-2 Errors over Mesh-Refinement Levels Refinement 50 40 30 20 Mean Error 0.0113027 0.0001866 0.0177428 0.0002690 0.0314534 0.0004533 0.0713550 0.0011360 Maximum 0.0229412 0.0027586 0.0350934 0.0017806 0.0598878 0.0017406 0.1756957 0.0045631 Minimum 0.0072671 0.0001382 0.0110625 0.0002151 0.0195454 0.0003847 0.0361082 0.0008666 Std. Dev. 0.0030040 0.0002624 0.0050765 0.0002105 0.0092470 0.0001821 0.0261411 0.0006217
Results – Conductivity ratio sweep
Mean Interface and L-2 Errors of Temperature over Conductivity Ratio Levels Refinement 0.1 1 10 100 1000
Mean Error 2.749304722E-02 1.237790051E-14 3.145337711E-02 4.246747531E-04 3.916329049E-02 2.865812389E-03 4.029740022E-02 5.008780772E-04
Maximum 5.994371110E-02 2.073944120E-14 5.988784790E-02 5.352580837E-04 7.514461690E-02 6.970382421E-03 7.912210350E-02 5.848057930E-04
Minimum 1.257535240E-02 8.022076050E-15 1.954542120E-02 3.844238522E-04 2.502952140E-02 1.113303684E-03 2.570895700E-02 4.485954533E-04
Std. Dev. 1.164141257E-02 2.028024133E-15 9.247029226E-03 2.833694953E-05 1.108102236E-02 1.299709537E-03 1.154149447E-02 2.455657070E-05
• Mesh size: 30x30 • Conductivity ratios: k2/k1=variable • Stabilization factor: 10 • Interface formulation: stabilized Lagrange • Solver: UMFPACK • Pre-conditioner: Spatial Derivatives Shape Functions Maximum
• Mesh size: 30x30 • Conductivity ratios: k2/k1 = 10 • Stabilization factor: 10 • Interface formulation: stabilized Lagrange • Solver: variable • Pre-conditioner: Spatial Derivatives Shape Functions Maximum
• NOTE: UMFPACK and GMRES yielded same condition number results. GMRES
pre-conditioner not dumped to Matlab
Results – UMFPACK/GMRES sweep
Time
UMPFACK, no T scaling
UMFPACK, T scaling GMRES, ILU, no T
scaling GMRES, ILU, T scaling
Condition # Condition # Enrichment Condition # Condition # Enrichment
Mean Error 3.965580161E+15 1.304228344E+04 1.203674188E+05 3.965580161E+15 1.304228344E+04 1.203674188E+05
Maximum 1.952676140E+18 1.391935730E+04 3.868249460E+07 1.952676140E+18 1.391935730E+04 3.868249460E+07
Minimum 1.050431090E+04 1.213103390E+04 9.472486604E+00 1.050431090E+04 1.213103390E+04 9.472486604E+00
Std. Dev. 8.724494218E+16 3.112311742E+02 1.787898160E+06 8.724494218E+16 3.112311742E+02 1.787898160E+06
• Mesh size: 30x30 • Conductivity ratios: k2/k1 = 10 • Stabilization factor: 10 • Interface formulation: stabilized Lagrange • Solver: variable • Pre-conditioner: Spatial Derivatives Shape Functions Maximum
CONDITION NUMBER
Results – UMFPACK/GMRES sweep
• Mesh size: 30x30 • Conductivity ratios: k2/k1 = 10 • Stabilization factor: 10 • Interface formulation: stabilized Lagrange • Solver: GMRES Aztec with ILU pre-conditioner • Pre-conditioner: No pre-conditioner
Results – 2.5D Cylindrical inclusion
• Mesh size: 30x30 • Conductivity ratios: k2/k1 = 10 • Stabilization factor: 10 • Interface formulation: stabilized Lagrange • Solver: GMRES Aztec with ILU pre-conditioner • Pre-conditioner: No pre-conditioner
Results – 2.5D Cylindrical inclusion
• Mesh size: 50x50 • Conductivity ratios: k2/k1 = 10 • Stabilization factor: 10 • Interface formulation: stabilized Lagrange • Solver: GMRES Aztec with ILU pre-conditioner • Pre-conditioner: No pre-conditioner
Results – 3D Cylindrical inclusion
• Mesh size: 50x50 • Conductivity ratios: k2/k1 = 10 • Stabilization factor: 10 • Interface formulation: stabilized Lagrange • Solver: GMRES Aztec with ILU pre-conditioner • Pre-conditioner: No pre-conditioner
Results – 3D Cylindrical inclusion
• Mesh size: 50x50 • Conductivity ratios: k2/k1 = 10 • Stabilization factor: 10 • Interface formulation: stabilized Lagrange • Solver: GMRES Aztec with ILU pre-conditioner • Pre-conditioner: No pre-conditioner
Results – 3D Cylindrical inclusion
Results: 2D niv50 thermal
Results: 2D niv50 thermal
Results: 2D niv50 thermal
Results: 2D niv50 thermal • Symmetry in interface errors • EXTREME VALUES (these extremes appeared in the old enrichment algorithm
also): • At iterations ~194 and ~305 (194 and 305 are identical) • Location of double intersections
Results: 2D niv50 thermal • Due to the method for computing double intersections and their main phase, the
following case occurs: • Small phase 1 diamond in center of intersections
Results
Results
Results: 3D niv50 thermal
FUTURE WORK
Parallelization Different interface formulations
Questions?
Bibliography • [1] Zienkiewicz, O.C.; Taylor, R.L.; Zhu, J.Z., “Finite Element Method - Its Basis and Fundamentals (6th
Edition).” • [2] Abdelaziz, Y., Hamouine, A., A survey of the extended finite element, Computers & Structures, Volume
86, Issues 11-12, Pages 1141-1151, 2008. • [3] Fries, T.P., “The eXtended Finite Element Method.” <http://www.xfem.rwth-aachen.de/index.php>
Accessed on September 21st, 2011. • [4] Stolarska M., Chopp D.L., Moës N., Belytschko T., Modeling crack growth by level sets in the
extended finite element method, International Journal for Numerical Methods in Engineering, Volume 51, Issue 8, Pages 943-960, 2001.
• [5] Lee, D.T., Schachter, B.J., Two Algorithms for Constructing a Delaunay Triangulation, International Journal of Computer & Information Sciences, Volume 9, Issue 3, Pages 219-42, 1980.
• [6] Hansbo, P., Hansbo, A., A finite element method for the simulation of strong and weak discontinuities in solid mechanics, Computer Methods in Applied Mechanics and Engineering, Volume 193, Issue 33-35, Pages 3523-3540, 2004.
• [7] Joe, B., “GEOMPACK3 Computational Geometry in 2D, 3D, ND.” <http://people.sc.fsu.edu/~jburkardt/f_src/geompack3/geompack3.html> Accessed on November 10th, 2011.
• [8] Joe, B., “Geompack3_prb.f90, a sample problem.” <http://people.sc.fsu.edu/~jburkardt/f_src/geompack3/geompack3_prb.f90> Accessed on November 10th, 2011.
• [9] Flood Fill. Wikipedia, the free encyclopedia. <http://en.wikipedia.org/wiki/Flood_fill> Accessed on November 29th, 2011.
• Images used in this presentation: – http://www.xfem.rwth-aachen.de/Background/Introduction/Figures/Fig4.png – http://upload.wikimedia.org/wikipedia/commons/8/80/Example_of_2D_mesh.png – http://www.mathresources.com/products/mathresource/dictionary/maple_images/volterras_integral_equation_1.png – http://www.sigma.ms/stream/images/trommeln/fem_trommel_stage_b_prop.jpg – http://image.tutorvista.com/content/feed/u364/discontin.GIF
htt // l d iki di / iki di / / / 9/D l i i l