A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our...

21
A goal-oriented error-controlled solver for biomedical flows Harish Narayanan Anders Logg Simula Research Laboratory June 17 th , 2009 Cambridge, MA

Transcript of A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our...

Page 1: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

A goal-oriented error-controlled solver for biomedical flows

Harish NarayananAnders Logg

Simula ResearchLaboratory

June 17th, 2009

Cambridge, MA

Page 2: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

This talk will examine how quantities related to the growthof aneurysms can be accurately computed

What are aneurysms? What are the quantitiesimplicated in their growth?

How do we control the error in thecomputation of these quantities?

What does this mean forcomputational domains?

Page 3: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

Accurate computation of the fluid shear stress andcircumferential stress is of principal importance

• Shear stress drives apoptotic behaviour of muscle cells

• Cells remodel arterial walls under constant tension

[Chien, 2007]

Page 4: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

Accurate computation of the fluid shear stress andcircumferential stress is of principal importance

• Shear stress drives apoptotic behaviour of muscle cells

• Cells remodel arterial walls under constant tension

[Chien, 2007]

Page 5: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

We introduce our quantity of interest as a goal functionalthrough an auxiliary problem

• Abstract (linear) primal problem in weak form:

Find u ∈ V : a(u, v) = L(v) ∀ v ∈ V

• Finite element discretisation:

Find uh ∈ Vh : a(uh, v) = L(v) ∀ v ∈ Vh

• Let M(u) be the goal functional we are interested in, e.g.,◦ Shear stress on the aneurysm surface◦ Point value of the fluid pressure◦ Outward normal flow across a given area

We want M(u) −M(uh) ≤ TOL

• We introduce the goal functional through the dual problem:

Find z ∈ V : a∗(z, v) = M(v) ∀ v ∈ V − Vh

[Eriksson and Johnson, 1988 & 1991]

Page 6: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

Solution of the dual problem provides information aboutthe error in the goal functional

The error in the goal functional,

M(uh) −M(u) = M(uh − u)= a∗(z, uh − u)= a(uh − u, z)= a(uh, z) − a(u, z)= a(uh, z) − L(z)= r(z)

is the residual of the dual solution! Furthermore,

r(z) = r(z − Πhz)= (z − Πhz, r)≤ ||Dz|| ||h r||

[Becker and Rannacher, 2001]

Page 7: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

Applying the theory to the steady-state Stokes equationsprovides estimates of the error

The Stokes equations for fluid flow:

div (σ(u, p)) + f = 0; div (u) = 0,

where σ(u, p) = 2 μ grads(u) − p 1

Rewritten in weak form, find (u, p) ∈ Vu × Vp:

a((u, p), (v, q)) = L((v, q)) ∀ (v, q) ∈ Vu × Vp,

where L = (v, f) and

a = (2 μ grad(v), grad(u)) − (div(v), p) + (q, div(u))

Introduce the goal functional, e.g.,shear component of the traction:

M((u, p)) =

(σ(u, p) n) · tds

The dual problem: Find (w, r) ∈ Vu × Vp :

a∗((w, r), (v, q)) = M((v, q)) ∀ (v, q) ∈ Vu × Vp

The resulting error indicators:

M (σ(u, p)) −M `σ(uh, ph)

´ ≤ PK C1 hK ||Dw||K || div

“σ(uh, ph) + f

”| {z }

R1

||K

+P

K C2 hK ||Dr||K || div(uh)| {z }R2

||K

+P

K C3√

hK ||Dw||ωK ||[∂nuh]||∂K

+P

K C4√

hK ||Dw||ωK ||[phn]||∂K

Page 8: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

The finite element scheme is implemented in FEniCS andthe error indicators are used to suitably refine the mesh

# Define function spaces

V = VectorFunctionSpace(mesh, "CG", 2)

Q = FunctionSpace(mesh, "CG", 1)

W = V + Q

# Define boundary conditions

# bcs = ...

# Define variational problem

(v, q) = TestFunctions(W)

(u, p) = TrialFunctions(W)

f = Constant(mesh, (0, 0, 0))

a = 2*mu*inner(grad(v), grad(u))*dx

- div(v)*p*dx + q*div(u)*dx

L = inner(v, f)*dx

# Compute solution

problem = VariationalProblem(a, L, bcs)

(u, p) = problem.solve().split()

# Plot solution

plot(u)

plot(p)

while ||E|| ≥ TOL :

compute primal solution

compute dual solution

compute cell-wise errorestimators

refine mesh where thelocal error is high

[www.fenics.org]

Page 9: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

We return to our aneurysm problem to see whatcomputational meshes our implementation suggests

p = 1 p = 0

u = 0

u = 0 u = 0

u = 0Sn

SSt

Initial mesh and boundary conditions

Page 10: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

We return to our aneurysm problem to see whatcomputational meshes our implementation suggests

Flow velocity magnitude and shear stresses

Page 11: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

We return to our aneurysm problem to see whatcomputational meshes our implementation suggests

The dual “velocity” field driven by the shear stress

Page 12: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

When optimising for the shear component of the stress,the mesh is dense near the aneurysm surface

After refining 5% of the cells with the highest local error-indicators 10 times

Page 13: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

When optimising for the normal component of the stress,the mesh is dense near the pressure boundaries

After refining 5% of the cells with the highest local error-indicators 10 times

Page 14: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

The a posteriori error analysis can be extended to generalnon-linear and time-dependent PDEs

• Approximate primal problem in weak form:

Find uh ∈ Vh : a(uh; v) = L(v) ∀ v ∈ Vh

• M(u) is the goal functional we are interested in.

Recall, we want M(u) −M(uh) ≤ TOL

• The linearised dual problem in weak form:

Find z ∈ V : a′∗[u, uh](z, v) = M′[u, uh](v) ∀ v ∈ V − Vh

• As before, the error in the goal functional:

M(uh) −M(u) = r(z − Πhz) ≤ ||Dz|| ||h r||

[Verfurth, 1993, 1994 & 1991]

Page 15: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

Applying the theory to the incompressible Navier-Stokesequations provides insight on controlling the error

The strong form of the Navier-Stokes equations:

∂u

∂t+

∇p

ρ− ν∇2u + (∇u)u = f ; ∇ · u = 0

A consistent splitting scheme (CSS) in weak form:

Find (uk+1, pk+1) ∈ Vu × Vp such that

(Duk+1

Δt,v

)+ν(∇uk+1,∇v) −

(p�,k+1

ρ,∇ · v

)= (gk+1,v) ∀v ∈ Vu

where gk+1 = fk+1 − ((∇u) u)�,k+1

(∇φ, ∇ψk+1

ρ) = (∇φ, Duk+1

Δt) ∀φ ∈ Vφ

(pk+1

ρ, q) = (

p�,k+1

ρ+ψk+1

ρ− ν∇ · uk+1, q) ∀q ∈ Vp

[Guermond and Shen, 2003]

Page 16: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

Applying the theory to the incompressible Navier-Stokesequations provides insight on controlling the error

The linearised dual problem for Navier-Stokes: Find (w, r) ∈ Vu × Vp :

(v(T ),Ψ) +

Z T

0((v, q),Φ) dt =

Z T

0

„∂v

∂t, w

«dt +

Z T

0(grad(uh)v + grad(v)uh, w) dt

−Z T

0(ν grads(v)n, w)N dt +

Z T

0(σ(v, q), grads(w)) dt

+

Z T

0(div(v), r) dt, ∀ (v, q) ∈ Vu × Vp

Note here that: Z T

0

„∂v

∂t, w

«dt = −

Z T

0

„v,

∂w

∂t

«dt + (v(T ),����Ψ

w(T )),

which results in a dual problem in t = [T, 0].

The global error estimate now becomes:Z T

0(e,Φ) dt =

Z T

0(R1, w) dt +

Z T

0(R2, r) dt

≤ T max[0,T ]

||h R1|| ||Dw|| +Z T

0k ||R1|| ||w|| dt +

Z T

0||R2|| ||r|| dt

Page 17: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

The primal equations describe the flow field

Flow velocity magnitude and direction

Page 18: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

The dual equations describe the propagation of information

The dual “velocity” field driven by the shear stress on the top surface

Page 19: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

Information from the primal and dual problems are used todetermine optimal computational meshes and time steps

Optimal mesh refinement at the initial time

Page 20: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

In conclusion, error control schemes can be used toaccurately and efficiently compute quantities of interest

• We have the tools for a posteriori error control for generalNavier-Stokes solution schemes (and CSS in particular)

• Optimising for different goals results in significantly differentmeshes

• For some kinds of flow, inexpensive Stokes calculations canserve as predictors for useful meshes

Page 21: A goal-oriented error-controlled solver for biomedical flows · 2019. 8. 21. · We introduce our quantity of interest as a goal functional through an auxiliary problem • Abstract

In conclusion, error control schemes can be used toaccurately and efficiently compute quantities of interest

• We are continuing the error analysis to better adapt the meshand time step sizes

• The implementation is being extended to incorporate allcontributions to the error indicators, including jump terms

• We are also working on extensions to flow in realistic 3Ddomains