an xfem toolbox for fenics - uni bremen · an xfem toolbox for fenics mischa jahn, andreas...

1
An XFEM toolbox for FEniCS Mischa Jahn, Andreas Luttmann, Timo Klock The Center for Industrial Mathematics (ZeTeM), University of Bremen Introduction to miXFEM (multiple interfaces XFEM) Idea: Automated code generation for problems with arbitrary discontinuities by using an extended FEniCS form compiler and a C++ library. Design principle: Modular structure consisting of (independent) toolboxes. Implementation of a level set toolbox (including reinitialization and mass correction techniques) which can be used for describing a discontinuity. Implementation of a exible XFEM framework, partly based on the PUM library [3], to solve stationary and instationary problems with strong and weak discontinuities. Fig. 1: Implementation design: Extended FFC and toolboxes for XFEM and level set. Mathematical background Level set toolbox [1] A discontinuity Γ(t) is described by the zero level set of a (continuous and scalar) func- tion ϕ : Ω × [t 0 ,t f ] R , separating Ω into Ω(t)= Ω + (t) Ω (t) Γ(t), cf. Fig. 2. Maintaining algorithms like reinitialization and mass correction techniques are included. eXtended nite elements [2] Fig. 2: Ω + (t) and Ω (t) separated by Γ(t). A standard function space V FEM h with basis functions v i , i N , is (only) enriched strongly, weak discontinuities are handled by enforcing continuity with Nitsche’s approach. The discrete approximation of Γ(t), which is considered for enriching a function space V FEM h , is given by Γ h (t) := {x Ω h | I lin ϕ h (x,t)=0}. Enriched DOFs are ˜ N := {i N| meas d1 (Γ h supp(v i )) > 0,v i V FEM h } so that a function u XFEM h V XFEM h reads u XFEM h = iN u i v i + j ˜ N ˜ u j Hv j , where u i are the coecients and H denotes the Heaviside function. Fig. 3: Enriched DOFs ˜ N for P 1 elements Fig. 4: Standard basis functions v i and enriched basis functions Hv i for P 1 elements For intersected elements, a local mesh consisting of sub-elements is cre- ated and the quadrature rule is modied to consider each sub-element’s contribution. Fig. 5: Creating sub-elements of a cell in 2D. Fig. 6: Creating sub-elements of a cell for time-dependent problems in 2D. The L 2 -projection is used to interpolate an arbitrary function f onto V XFEM h Ω (P XFEM h f )vdx = Ω fvdx, v V XFEM h . Stefan problem (model problem) On Ω R 2 , dene u(·,t 0 ) and ϕ(·,t 0 ) and consider the problem t u −∇ · (κu)= f in Ω + (t) Ω (t),t (t 0 ,t f ), t ϕ + V · ϕ =0 in Ω × [t 0 ,t f ], with u(·,t)= u Γ on Γ(t) and [[κu · n]] = L V · n on Γ(t) and suitable (Dirichlet/Neumann) boundary conditions. Fig. 7: Parts of the corresponding UFL le using Nitsche’s approach Exemplary convergence plots for xed Δt resp. h using P 1 elements Scenario 1, the interface is a-priori known and prescribed, see Fig. 8. Scenario 2, the interface is unknown and part of the solution, see Fig. 9. Fig. 8: Convergence plots scenario 1, interface is a-priori known Fig. 9: Convergence plots scenario 2, interface is part of the solution Outlook: Keyhole-based laser welding (real world application) On Ω R 3 consider a welding process described by the heat equation with an a-priori given discontinuity (keyhole) as an internal boundary. Acknowledgement The authors gratefully acknowledge the nancial support by the DFG (German Research Foundation) for the subproject A3 within the Collaborative Research Center SFB 747 “Mikrokaltumformen - Prozesse, Charakterisierung, Optimierung”. References 1 M. Jahn and T. Klock. A level set toolbox including reinitialization and mass correction algorithms for FEniCS. Technical Report 16-01, ZeTeM, Bremen, 2016. 2 M. Jahn and A. Luttmann. Solving the Stefan problem with prescribed interface using an XFEM toolbox for FEniCS. Technical Report 16-03, ZeTeM, Bremen, 2016. 3 M. Nikbakht. Automated Solution of Partial Dierential Equations with Discontinuities using the Partition of Unity Method. PhD thesis, 2012.

Upload: trankiet

Post on 20-Apr-2018

370 views

Category:

Documents


9 download

TRANSCRIPT

Page 1: An XFEM toolbox for FEniCS - Uni Bremen · An XFEM toolbox for FEniCS Mischa Jahn, Andreas Luttmann, Timo Klock The Center for Industrial Mathematics (ZeTeM), University of Bremen

An XFEM toolbox for FEniCSMischa Jahn, Andreas Luttmann, Timo Klock

The Center for Industrial Mathematics (ZeTeM), University of Bremen

Introduction to miXFEM (multiple interfaces XFEM)

Idea: Automated code generation for problems with arbitrary discontinuitiesby using an extended FEniCS form compiler and a C++ library.

Design principle:Modular structure consisting of (independent) toolboxes.

• Implementation of a level set toolbox (including reinitialization and masscorrection techniques) which can be used for describing a discontinuity.

• Implementation of a flexible XFEM framework, partly based on the PUM

library [3], to solve stationary and instationary problems with strong andweak discontinuities.

Fig. 1: Implementation design: Extended FFC and toolboxes for XFEM and level set.

Mathematical background

Level set toolbox [1]• A discontinuity Γ(t) is described by the zerolevel set of a (continuous and scalar) func-tion ϕ : Ω × [t0, tf ] → R , separating Ω intoΩ(t) = Ω+(t) ∪ Ω−(t) ∪ Γ(t), cf. Fig. 2.

• Maintaining algorithms like reinitializationand mass correction techniques are included.

eXtended finite elements [2]

Fig. 2: Ω+(t) and Ω−(t)separated by Γ(t).

A standard function space V FEMh with basis functions vi, i ∈ N , is (only)

enriched strongly, weak discontinuities are handled by enforcing continuitywith Nitsche’s approach.

• The discrete approximation of Γ(t), which is considered for enriching afunction space V FEM

h , is given by Γh(t) := {x ∈ Ωh | Ilinϕh(x, t) = 0}.• Enriched DOFs are N := {i ∈ N |measd−1(Γh∩supp(vi)) > 0, vi ∈ V FEM

h }so that a function uXFEM

h ∈ V XFEMh reads

uXFEMh =

i∈Nuivi +

j∈N

ujHvj,

where ui are the coefficients and H denotes the Heaviside function.

Fig. 3: Enriched DOFs Nfor P1 elements

Fig. 4: Standard basis functions vi and enrichedbasis functions Hvi for P1 elements

• For intersected elements, a local mesh consisting of sub-elements is cre-ated and the quadrature rule is modified to consider each sub-element’scontribution.

Fig. 5: Creating sub-elements of a cellin 2D.

Fig. 6: Creating sub-elements of a cellfor time-dependent problems in 2D.

• The L2-projection is used to interpolate an arbitrary function f ontoV XFEMh �

Ω

(PXFEMh f)vdx =

Ω

fvdx, ∀v ∈ V XFEMh .

Stefan problem (model problem)

On Ω ⊂ R2, define u(·, t0) and ϕ(·, t0) and consider the problem

∂tu−∇ · (κ∇u) = f in Ω+(t) ∪ Ω−(t), t ∈ (t0, tf ),

∂tϕ+ �V ·∇ϕ = 0 in Ω× [t0, tf ],

with u(·, t) = uΓ on Γ(t) and [[κ∇u · �n]] = L�V · �n on Γ(t)

and suitable (Dirichlet/Neumann) boundary conditions.

Fig. 7: Parts of the corresponding UFL file using Nitsche’s approach

Exemplary convergence plots for fixed Δt resp. h using P1 elements

• Scenario 1, the interface is a-priori known and prescribed, see Fig. 8.

• Scenario 2, the interface is unknown and part of the solution, see Fig. 9.

Fig. 8: Convergence plots scenario 1, interface is a-priori known

Fig. 9: Convergence plots scenario 2, interface is part of the solution

Outlook: Keyhole-based laser welding (real world application)

On Ω ⊂ R3 consider a welding process described by the heat equation withan a-priori given discontinuity (keyhole) as an internal boundary.

AcknowledgementThe authors gratefully acknowledge the financial support by the DFG (German Research Foundation) for the subproject A3 within the Collaborative Research Center SFB 747“Mikrokaltumformen - Prozesse, Charakterisierung, Optimierung”.

References1 M. Jahn and T. Klock. A level set toolbox including reinitialization and mass correction algorithms for FEniCS. Technical Report 16-01, ZeTeM, Bremen, 2016.2 M. Jahn and A. Luttmann. Solving the Stefan problem with prescribed interface using an XFEM toolbox for FEniCS. Technical Report 16-03, ZeTeM, Bremen, 2016.3 M. Nikbakht. Automated Solution of Partial Differential Equations with Discontinuities using the Partition of Unity Method. PhD thesis, 2012.