FreeFEM Days, 11th Edition
High-Performance Numerical Simulation of Biodegradation Process with Moving Boundaries
Mojtaba Barzegari, Liesbet Geris Biomechanics Section, Department of Mechanical Engineering, KU Leuven December 2019
High-Performance Numerical Simulation of Biodegradation Process with - - PowerPoint PPT Presentation
High-Performance Numerical Simulation of Biodegradation Process with Moving Boundaries FreeFEM Days, 11th Edition Mojtaba Barzegari, Liesbet Geris Biomechanics Section, Department of Mechanical Engineering, KU Leuven December 2019 0 Our
FreeFEM Days, 11th Edition
Mojtaba Barzegari, Liesbet Geris Biomechanics Section, Department of Mechanical Engineering, KU Leuven December 2019
◮ Supervisor: Prof. Ir. Liesbet Geris ◮ Research profile: Computational Tissue Engineering, Computational Biomechanics, Computational Biology, Computational Genomics
1
1 Introduction 2 Mathematical Model 3 Computational Model and Parallelization 4 Simulation Results 5 Performance Analysis
2
◮ Stefan problems ◮ Diffusion-controlled interface ◮ Diffusion and reaction lead to the change of domain geometry ◮ Degradation is an example of such a system
3
◮ Dissolution of the bulk material ◮ Formation of a protective film ◮ Effect of ions in the medium
4
◮ Hip joint replacement implants ◮ Tuning the degradation parameters to the rate of bone growth
5
1 Introduction 2 Mathematical Model 3 Computational Model and Parallelization 4 Simulation Results 5 Performance Analysis
6
Some of the chemical reactions: Mg → Mg2+ + 2e− 2H2O + 2e− → H2 + 2OH− Mg2+ + 2OH− k1 − → Mg(OH)2 Mg(OH)2 + 2Cl− k2 − → Mg2+ + 2Cl− + 2OH−
7
CMg = CMg(x, t), CFilm = CFilm(x, t) x ∈ Ω ⊂ R3 ∂CMg ∂t = ∇ •
Mg • ∇CMg
CFilm [Film]max
∂CFilm ∂t = k1CMg
CFilm [Film]max
De
Mg = DMg
CFilm [Film]max
CFilm [Film]max ǫ τ
Implicit signed distance function φ = φ(x, t) x ∈ Ω ⊂ R3 ∂φ ∂t + − → V • ∇φ
+ v|∇φ|
Normal direction motion
= bκ|∇φ|
9
∂φ ∂t + v|∇φ| = 0 Rankine-Hugoniot: {J(x, t) − (csol − csat) v(x, t)} · n = 0 De
Mg∇nCMg − ([Mg]sol − [Mg]sat) v = 0
∂φ ∂t − De
Mg∇nCMg
[Mg]sol − [Mg]sat |∇φ| = 0
10
1 Introduction 2 Mathematical Model 3 Computational Model and Parallelization 4 Simulation Results 5 Performance Analysis
11
Rewriting the diffusion-reaction PDE: ∂u ∂t = ∇ • (D • ∇u) − k1bu + k2pq2 Defining trial and test function space: St =
∂n = 0 on Γ
∂u ∂t v = ∇ • (D • ∇u)v − k1buv + k2pq2v ∀v ∈ V Integrate over the whole domain:
∂u ∂t vdω =
Integration by part, Green’s divergence theory, Backward Euler scheme:
u − un ∆t vdω =
∂ndγ −
13
By defining a linear functional (f, v) =
(u, v)[1 + ∆tk1b] + ∆t(D∇u, ∇v) = (un, v) + ∆t (f n, v) multiplying to a new coefficient α =
1 1+∆tk1b
(u, v) + α∆t(D∇u, ∇v) = α (un, v) + α∆t (f n, v)
14
Vh = span
Using 1st order Lagrange polynomials as basis functions u =
N
cjψj(x), un =
N
cn
j ψj(x) N
(ψi, ψj) cj + α∆t
N
(∇ψi, D∇ψj) cj =
N
(ψi, ψj) cn
j + ∆t (f n, ψi)
15
A linear system of equations
Ai,jcj = bi Ai,j = (ψi, ψj) + α∆t (∇ψi, D∇ψj) bi =
N
α (ψi, ψj) cn
j + α∆t (f n, ψi)
16
Final form as implemented in FreeFEM (M + α∆tK)c = αMc1 + α∆tf M = {Mi,j} , Mi,j = (ψi, ψj) , i, j ∈ Is K = {Ki,j} , Ki,j = (∇ψi, D∇ψj) , i, j ∈ Is f = {fi} , fi = (f (x, tn) , ψi) , i ∈ Is c = {ci} , i ∈ Is c1 = {cn
i } ,
i ∈ Is
17
◮ Penalization for interface BCs ◮ Computing ∇nCMg correctly ◮ Problem of oscillation ◮ Too flat or too steep gradients ◮ Nightmare of re-distancing
(P. Bajger et al. 2017)
18
◮ Eulerian mesh ◮ Generated using Netgen in SALOME platform ◮ Adaptively refined on the moving interface
19
◮ Message Passing Interface ◮ Distributed numerical integration (assigning a number in the range of [0, MPI Size-1] to each element) ◮ MUMPS multifrontal direct solver
1 Introduction 2 Mathematical Model 3 Computational Model and Parallelization 4 Simulation Results 5 Performance Analysis
21
22
Formation of the protective film on the interface of material-medium
23
Trimmed view of the computational mesh Formation of the protective film
24
Measuring mass loss: ◮ Direct weight reduction ◮ Side products evolution Using level set output for calculating mass loss Mglost =
Ω+(t) = {x : φ(x, t) ≥ 0}
Simulation and experimental setup
25
Film formation and the comparison of predicted and experimental mass loss, measured by the evolved hydrogen gas
26
1 Introduction 2 Mathematical Model 3 Computational Model and Parallelization 4 Simulation Results 5 Performance Analysis
27
◮ Same setup as the model for calibration and validation ◮ DOF: 144k ◮ Elements: 831k (P1)
28
Two different approaches for domain decomposition. Colors show different mesh regions assigned to different MPI cores. Execution time per time step
29
30
Based on Gustafson’s law: Speedup = f + (1 − f) × N Serial proportion = 86%, Parallelizable proportion = 14%
31
Time required to solve each PDE in each time step
32
Based on Amdahl’s law: Speedup = 1 f + 1−f
N
Serial proportion = 52%, Parallelizable proportion = 48%
33
◮ A quantitative mathematical model and its corresponding computational model to assess the degradation behavior of biodegradable materials ◮ Using level set method to track the moving corrosion front during degradation ◮ Once fully validated, the model will be an important tool to find the right design and properties of the metallic biomaterials and implants
34