automatic differentiation of a fluid structure
play

Automatic differentiation of a fluid-structure interaction problem - PowerPoint PPT Presentation

Automatic differentiation of a fluid-structure interaction problem Gabriel Balaban, Anders Logg, Marie E. Rognes Simula Research Laboratory University of Oslo FEniCS Worksop 2013, Cambridge 20130318 March 20, 2013 Examples of


  1. Automatic differentiation of a fluid-structure interaction problem Gabriel Balaban, Anders Logg, Marie E. Rognes Simula Research Laboratory University of Oslo FEniCS Worksop 2013, Cambridge 2013–03–18 March 20, 2013

  2. Examples of Fluid–structure interaction Modelling Challenges ◮ model must integrate solid and fluid mechanics ◮ fluid geometry depends on structure deformation

  3. Solving the FSI problem Issues: ◮ Continuum mechanics formulation ◮ Partitioned vs monolithic ◮ Fixed-pointed vs Newton ◮ Approximation of the Jacobian In this work we: ◮ derive a Newton’s method with exact Jacobians for FSI problems using the arbitrary Lagrangian Eulerian formulation ◮ implement a monolithic solver in Python (using FEniCS) ◮ investigate various optimizations and simplifications

  4. Setup of the FSI problem Ω S D S t = 0 Ω F U F ω S ( t ) d S u F ω F ( t )

  5. Mismatch in standard fluid and solid models ρ S ¨ D S − Div Σ S ( D S ) = B S ρ F (˙ u F + grad u F · u F ) − div σ F = b F div u F = 0

  6. Mesh smoothing problem Mesh equation ˙ D M − Div Σ M ( D M ) = 0

  7. Arbitrary Lagrangian-Eulerian framework u ( x ( X , t ) , t ) ALE time derivative: d ρ u + ρ ( grad u · ( u − ˙ dt ( ρ u ) = ˙ D M )) ALE fluid equation: u F + grad u F · ( u F − ˙ ρ F (˙ D M )) − div σ F ( u F , p F ) = b F in ω F ( t ) div u F = 0 in ω F ( t )

  8. Interface conditions Γ FS γ FS ( t ) ◮ Stress continuity: σ S · n = σ F · n on γ FS ( t ) ◮ Kinematic continuity: u F = u S on γ FS ( t ) ◮ Domain continuity: d M = d S on γ FS ( t )

  9. Linearization of the FSI problem Two challenges: ◮ Derivative of fluid equation with respect to geometry? d dt ( ρ u ) − div σ F ( u F , p F ) = b F in ω F ( t ) div u F = 0 in ω F ( t ) ◮ Linearization of essential BCs u F = u S on γ FS ( t ) d M = d S on γ FS ( t )

  10. The reference domain approach ◮ Map the fluid problem to the reference domain ◮ Use standard techniques to differentiate ◮ Straightforward but tedious ◮ Can be automated!

  11. Navier–Stokes pulled back to reference domain ◮ Equation: ρ F J M ( ˙ · ( U F − ˙ U F + Grad U F · F − 1 D M )) − Div Σ F = B F M Div ( J M F − 1 · U F ) = 0 M ◮ Pulled-back fluid stress: � � µ F ( Grad U F · F − 1 + F −⊤ · Grad U ⊤ · F −⊤ Σ F = J M F ) − P F I M M M

  12. Interface conditions: How to linearize? Γ FS γ FS ( t ) Stress continuity: Σ S · N = Σ F · N on Γ FS Kinematic continuity: U F = U S on Γ FS Domain continuity: D M = D S on Γ FS

  13. Linearization of essential boundary conditions Introduce Lagrange multipliers ( τ F , τ M ) and corresponding trial functions ( χ F , χ M ) Kinematic continuity: U F − U S τ F Γ FS + χ F v F Γ FS Domain continuity: D M − D S τ M Γ FS + χ M v M Γ FS

  14. The linearized FSI operator (the Jacobian)

  15. FEniCS implementation J = derivative(R, U)

  16. An analytic test problem pdf/pdf/analyticproblem.pdf t ex Primary variables: U F = y (1 − y ) sin t P F = 2 C sin t (1 − x − Cxy (1 − y )(1 − cos t )) D S = Cy (1 − y )(1 − cos t ) U S = Cy (1 − y ) sin t D M = Cxy (1 − y )(1 − cos t )

  17. Convergence for analytic test problem -2 10 P F D S -3 10 D F U F -4 10 0.99 -5 10 L2 error -6 10 -7 10 -8 10 2.67 2.00 -9 10 -1 0 -2 10 10 10 mesh size hmin

  18. A two-dimensional blood vessel

  19. 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%

  20. Effect of Jacobian reuse Problem Routine Calls Analytic 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 %

  21. Effect of Jacobian reuse Newton Iterations per time step 35 30 25 Number of Iterations 20 15 10 5 0 0 10 20 30 40 50 60 70 time

  22. Optimization summary Optimization Runtime Memory Robustness Jacobian Reuse Jacobian Simplification Jacobian Buffering Reduced Quadrature Order

  23. Summary: How to use the automatic derivative to solve FSI problems ◮ Map the fluid equation to the reference domain ◮ Impose essential BC’s using Lagrange multipliers ◮ Let the automatic derivative compute the Jacobian Challenges / work in progress: ◮ Long FFC compilation times ◮ Preconditioning

Recommend


More recommend