Upload
doannhu
View
226
Download
1
Embed Size (px)
Citation preview
Automatic differentiation of a fluid-structure interaction problemGabriel Balaban, Anders Logg,Marie E. Rognes Simula Research LaboratoryUniversity of Oslo FEniCS Worksop 2013, Cambridge 2013–03–18
March 20, 2013
Examples of Fluid–structure interaction
Modelling Challenges
I model must integrate solid and fluid mechanics
I fluid geometry depends on structure deformation
Solving the FSI problem
Issues:
I Continuum mechanics formulation
I Partitioned vs monolithic
I Fixed-pointed vs Newton
I Approximation of the Jacobian
In this work we:
I derive a Newton’s method with exact Jacobians for FSIproblems using the arbitrary Lagrangian Eulerianformulation
I implement a monolithic solver in Python (using FEniCS)
I investigate various optimizations and simplifications
Setup of the FSI problem
ΩF
ωF (t)
ΩS
ωS(t)
UF
uF
dS
t=
0DS
Mismatch in standard fluid and solid models
ρSD
S−Div Σ
S(D
S) = B
S
ρF
(uF
+ grad uF· u
F) − div σ
F= b
F
div uF
= 0
Mesh smoothing problem
Mesh equationD
M−Div Σ
M(D
M) = 0
Arbitrary Lagrangian-Eulerian framework
u(x(X , t), t)
ALE time derivative:
d
dt(ρu) = ρu + ρ (grad u· (u − D
M))
ALE fluid equation:
ρF
(uF
+ grad uF· (u
F− D
M)) − div σ
F(u
F, p
F) = b
Fin ω
F(t)
div uF
= 0 in ωF
(t)
Interface conditions
ΓFS
γFS
(t)
I Stress continuity:
σS· n = σ
F· n on γ
FS(t)
I Kinematic continuity:
uF
= uS
on γFS
(t)
I Domain continuity:
dM
= dS
on γFS
(t)
Linearization of the FSI problem
Two challenges:
I Derivative of fluid equation with respect to geometry?
ddt (ρu) − div σ
F(u
F, p
F) = b
Fin ω
F(t)
div uF
= 0 in ωF
(t)
I Linearization of essential BCs
uF
= uS
on γFS
(t)
dM
= dS
on γFS
(t)
The reference domain approach
I Map the fluid problem to the reference domain
I Use standard techniques to differentiate
I Straightforward but tedious
I Can be automated!
Navier–Stokes pulled back to reference domain
I Equation:
ρFJM
(UF
+ Grad UF· F−1
M· (U
F− D
M)) −Div Σ
F= B
F
Div (JMF−1
M· U
F) = 0
I Pulled-back fluid stress:
ΣF
= JM
(µ
F(Grad U
F· F−1
M+ F−>
M·Grad U>
F) − P
FI)·F−>
M
Interface conditions: How to linearize?
ΓFS
γFS
(t)
Stress continuity:
ΣS· N = Σ
F· N on Γ
FS
Kinematic continuity:
UF
= US
on ΓFS
Domain continuity:D
M= D
Son Γ
FS
Linearization of essential boundary conditions
Introduce Lagrange multipliers (τF, τ
M) and corresponding trial
functions (χF, χ
M)
Kinematic continuity:
UF− U
SτF Γ
FS+ χ
FvF Γ
FS
Domain continuity:
DM− D
SτM Γ
FS+ χ
MvM Γ
FS
The linearized FSI operator (the Jacobian)
FEniCS implementation
J = derivative(R, U)
An analytic test problem
pdf/pdf/analyticproblem.pdftexPrimary variables:
UF
= y(1 − y) sin t
PF
= 2C sin t(1 − x − Cxy(1 − y)(1 − cos t))
DS
= Cy(1 − y)(1 − cos t)
US
= Cy(1 − y) sin t
DM
= Cxy(1 − y)(1 − cos t)
Convergence for analytic test problem
10-210-1100
mesh size hmin
10-9
10-8
10-7
10-6
10-5
10-4
10-3
10-2L2
err
or
0.99
2.002.67
PF
DS
DF
UF
A two-dimensional blood vessel
Break-down of run-time
Problem Routine Calls Time (s)Analytic problem Jacobian assembly 28 83.9s 90%mesh size = 231 Linear solve 28 1.86s 2%time steps = 10 Residual assembly 38 0.915s 1%
Blood vessel Jacobian assembly 343 2980s 81%mesh size = 1271 Linear solve 343 254s 18%time steps = 140 Residual assembly 483 64.1s 1%
Effect of Jacobian reuse
Problem Routine CallsAnalytic problem Jacobian assembly 1 (-27) -95 %mesh size = 231 Linear solve 51 (+23) -96%time steps = 10 Residual assembly 61 (+23) +54%
Total Runtime: -93 %
Blood vessel Jacobian assembly 25 (-308) -93 %mesh size = 1271 Linear solve 1287 (+944) -92 %time steps = 140 Residual assembly 1427 (+944) +192%
Total -91 %
Effect of Jacobian reuse
0 10 20 30 40 50 60 70time
0
5
10
15
20
25
30
35Nu
mbe
r of I
tera
tions
Newton Iterations per time step
Optimization summary
Jacobian Reuse
Jacobian Simplification
Jacobian Buffering
ReducedQuadratureOrder
Optimization Runtime Memory Robustness
Summary: How to use the automatic derivative to solveFSI problems
I Map the fluid equation to thereference domain
I Impose essential BC’s usingLagrange multipliers
I Let the automatic derivativecompute the Jacobian
Challenges / work in progress:
I Long FFC compilation times
I Preconditioning