C Partitioned Methods for Multifield Problems Joachim Rang, 6.7.2016 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 1 C
One-dimensional piston problem fixed wall Fluid flexible piston piston s motion pressure p 0 equilibrium length of the chamber 0 l 0 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 2 C
The one-dimensional piston problem Fluid equations: mass and momentum conservation equations: { ρ t + (ρu) x = 0 (ρu) t + (ρu 2 + p) x = 0 system of conservation laws i. e. hyperbolic system linear dynamic equilibrium of the piston: mq tt + dq t + Kq = p(l 0 + q) p 0 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 3 C
Systems of conservation laws linear advection problem: Burgers equation u t + au x = 0, ( ) u 2 u t + 2 x a R = 0 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 4 C
Linear advection problem initial condition: xxxx u 0 (x) = exp( 10(4x 1) 2 ) periodic boundary condition, a = 1 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 5 C
Linear advection problem initial condition: { 1, 0.2 x 0.3 u 0 (x) = 0, else periodic boundary condition, a = 1 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 6 C
One-dimensional piston problem Fluid (mass and momentum equation conservation equations): ρ t + x (ρu) = 0 t (ρu) + x (ρu2 + p) = 0 ρ... gas density u... flow velocity p... pressure Moreover p ρ = c2 c... sound speed 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 7 C
One-dimensional piston problem linear dynamic equilibrium of the piston: mq tt + dq t + Kq = p(l 0 + q) p 0 m... mass d... damping K... stiffness q... displacement q t... velocity q tt... accelaration 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 8 C
One-dimensional piston problem equilibrium state: uniform pressure p 0, inside and outside the piston chamber, a uniform gas density ρ 0, a zero flow velocity u 0 = 0 and a chamber length equal to l 0 boundary conditions: ρ(t, 0)u(t, 0) = 0, u(t, l 0 + q) = q t initial conditions: u(0, x) = u 0 (x), ρ(0, x) = ρ 0 (x), q(0, x) = q 0 (x), q t (0, x) = r 0 (x) 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 9 C
Discretisation discretisation in space: finite difference scheme with upwinding δẇ j + 1 [ J + 0 h δw j 1 + (J + 0 J 0 )δw j + J 0 δw j+1] = 0. For j = N (interface condition): δẇ N + 1 h [ J + 0 δw N 1 + (J + 0 J 0 )δw ] 1 N h ( ρqt 0 structural equations define Q = (q, q t ). Then ( ) 0 1 0 Q = Q + p(l k/m d/m 0 + q) p 0 }{{} m =:D Moreover we have p(l 0 + q) p 0 = c 2 0 δρ N ) = 0.. 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 10 C
Implementation consider the undamped case, i. e. d = 0. non-dimensional variables: t := c 0 l 0 t, x := x l 0, h := h l 0, q := q l 0, ρ := ρ ρ 0, ρut := ρu ρ 0 c 0, δw := (δρ, δρu). 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 11 C
Implementation Then it follows δw j + 1 [ J + 0 h δw j 1 + (J + 0 J 0 )δw j + J 0 δw j+1] = 0, j N, δw N + 1 [ J + 0 h δw N 1 + (J + 0 J 0 )δw N 1 ( q )] = 0, j = N, k 0 q + ω 2 s q = 1 m (δρ N 1) where f = df dt, J+ 0 = 1 ( 1 1 2 1 1 ω 2 s = kl2 0 mc 2 0 m = m ρ 0 l 0. ) J 0 = 1 2 ( 1 1 1 1 ) 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 12 C
Implementation The system can be written as ( δw Q ) ( A B = C D ) ( δw Q ), ( δw(0) Q(0) ) = (0,..., 0, 1), where A = 1 h J + 0 J 0 J 0 J + 0 J + 0 J 0 J 0 ( ) 0... 0 0 0 C = 1 0... 0 0 m......... J + 0 J + 0 J 0 J 0 J + 0 J + 0 J 0 ( R 2,2m, D = For the simulation we set m = 30.77 and ω 2 s = 3.03e 4. 0 1 ω 2 s 0 0 0, B = 1 h.. 0 0 R2m,2 1 0 ) R 2,2. 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 13 C
Implementation spatial discretisation: h = 1/80 time discretisation: implicit Euler method with τ = 1/20 and τ = 1/10 partitioned approach: Block-Jacobi method 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 14 C
Numerical result: τ = 2/10 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 15 C
Numerical result: τ = 1/10 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 16 C
Differential-algebraic equations Differential algebraic equations consists of ordinary differential equations (ODEs) and algebraic constraints. example in a semi-explicit form: u = f(t, u, v) 0 = g(t, u, v) 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 17 C
Movement of a pendulum Movement of a pendulum: q 1 = v 1 q 2 = v 2 v 1 = λq 1 v 2 = λq 2 g 0 = q1 2 + q2 2 1. q 1, q 2... coordinates of the pendulum v 1, v 2... velocity λ... unknown Lagrangian multiplier g... gravity last equation: length of pendulum should be constant (algebraic constraint) 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 18 C
Heat equation one-dimensional heat equation: u u = f in J Ω with u = g(t) on the boundary Ω and initial condition. semi-discretisation in space: u(t, x i )+ 1 h 2 (2u(t, x i) u(t, x i+1 ) u(t, x i+1 )) = f(t, x i ), i = 1,..., N 1, where x 0 and x N are the nodes on the boundary. 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 19 C
Heat equation Let u h (t) := (u(t, x 1 ),..., u(t, x N 1 )), f h (t) := (f(t, x 1 ),..., f(t, x N 1 )), 2 1 0 A h := 1. 1..... h 2...... 1 RN 1,N 1 1 2 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 20 C
Heat equation The Dirichlet boundary condition can be satisfied by adding two algebraic equations. Then 0 0 0 u(t, x 0 ) 0 I 0 u h 0 0 0 u(t, x N ) where + 1 0 0 v 1 A h v 2 0 0 1 v 1 = ( 1/h 2, 0,..., 0), v 2 = (0,..., 0, 1/h 2 ). u(t, x 0 ) u h u(t, x N ) = g(t, x 0 ) f h g(t, x N ), 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 21 C
Incompressible Navier Stokes equations incompressible Navier Stokes equations: u Re 1 u + (u )u + p = f in (0, T] Ω, u = 0 in [0, T] Ω, u = g on [0, T] Ω, u(0, ) = u 0 in Ω, p dx = 0 in [0, T], u... velocity u 0... initial velocity p... pressure f... body forces on the right-hand side g... Dirichlet boundary conditions Ω R d, d {2, 3}... a domain Re... Reynolds number Ω 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 22 C
Incompressible Navier Stokes equations Assume: homogenous Dirichlet boundary conditions semi-discretisation in space: finite elements. write Navier Stokes equations component-wise: u 1 Re 1 u 1 + u 1 x u 1 + u 2 y u 1 + x p = f 1, u 2 Re 1 u 2 + u 1 x u 2 + u 2 y u 2 + y p = f 2, x u 1 + y u 2 = 0. 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 23 C
Incompressible Navier Stokes equations Multiply each equation with a test function v and integrate over domain. Find (u, p) L 2 (0, T; V) L 2 (0, T; Q) with u = (u 1, u 2 ) such that a.e. in (0, T) ( u 1, v 1 ) + Re 1 ( u 1, v 1 ) + (u 1 x u 1 + u 2 y u 1, v 1 ) + ( x p, v 1 ) = (f 1, v 1 ), ( u 2, v 2 ) + Re 1 ( u 2, v 2 ) + (u 1 x u 2 + u 2 y u 2, v 2 ) + ( y p, v 2 ) = (f 2, v 2 ), for all (v, q) V Q holds. (u 1, x q) + (u 2, y q) = 0 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 24 C
Incompressible Navier Stokes equations The Finite Element method approximates the solution of the weak problem in a Finte-Element space V h V and Q h Q. Let V h = W h W h, {ϕ 1,..., ϕ Nu } be a basis of W h and {ψ 1,..., ψ Np } be a basis of Q h. We define the following matrices and vectors (M) ij = (ϕ j, ϕ i ), i, j = 1,..., N u, (A(u)) ij = Re 1 ( ϕ j, ϕ i ) + (u 1 x ϕ j + u 2 y ϕ j, ϕ i ), i, j = 1,..., N u, (B 1 ) ij = ( x ψ j, ϕ i ), i = 1,..., N u, j = 1,..., N p, (B 2 ) ij = ( y ψ j, ϕ i ), i = 1,..., N u, j = 1,..., N p, (f k ) i = (f k, ϕ i ), i = 1,..., N u, k = 1, 2. 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 25 C
Incompressible Navier Stokes equations Then M 0 0 0 M 0 0 0 0 u 1 u 2 ṗ f 1 = f 2 0 A(u) 0 B 1 0 A(u) B 2 B1 T B2 T 0 u 1 u 2 p or shorter ( M 0 0 0 ) ( uṗ ) = ( f 0 ) ( A(u) B B T 0 ) ( u p ). (1) 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 26 C
Solution of a linear ODE Let f : J R n be a given continuous function and C R n,n. Consider the linear ODE { u + Cu = f(t). (2) u(0) = u 0 The unique solution is given by t u(t) = e C(t t0) u 0 + e C(t τ) f(τ) dτ. t 0 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 27 C
DAEs are not ODEs Consider the DAE u 1 + u 2 = f 1, u 2 + u 3 = f 2, u 1 = f 3. solution depends on derivatives of the right-hand side numerical problems since differentiating is an ill-posed problem. need no initial conditions. DAE has hidden constraints. If we prescribe some initial conditions we may have the problem that they do not fit with our DAE. If the initial conditions satisfy the DAE then the initial conditions are consistent. 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 28 C
Differentiation index Let the DAE F(t, u, u) = 0, be uniquely solvable. If v := u is uniquely determined by (t, u) and F(t, u, v) F t (t, u, v) + F u (t, u, v)v + F v (t, u, v) v F k (t, u, v, w) :=. = 0 d k F(t, u, v) dtk with w = (u (2),..., u (k) ) for all consistent initial values and i d is the least such integer that this holds for, we call i d the differentiation index. 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 29 C
Maximal differentation index Let F be a family of right-hand sides such that, for any δ F, the DAE F(t, û, û) = δ. has only one solution. Then the maximum differentiation index is { i md := max i d is the differentiation index of F(t, û, û) } = δ. δ F 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 30 C
Index-1 systems Consider the semi-explicit DAE u 1 = f(u 1, u 2 ), u 1 (0) = u 10, 0 = g(u 1, u 2 ). Let the function f be Lipschitz continuous Let the Jacobian g u 2 be regular Then the DAE has differentiation index 1. 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 31 C
Index-2 systems Consider the semi-explicit DAE u 1 = f(u 1, u 2 ), u 1 (0) = u 10, 0 = g(u 1 ), Let the functions f and g be Lipschitz continuous Let the matrix product g f u 1 u 2 be regular Then the DAE has differentiation index two. 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 32 C
Dynamic iteration scheme Consider the system ẏ 1 = f 1 (y 1, y 2, z 1 ), y 1 (0) = y 10, 0 = h1 (y 1, y 2, z 1, u) 0 = g(y 1, y 2, z 1, z 2 ) ẏ 2 = f 2 (y 1, y 2, z 2 ), y 2 (0) = y 20, 0 = h2 (y 1, y 2, z 2, u) Assumptions: The system is uniquely solvable. Jacobians h h z u g and 0 z are regular differentiation index 1, hi z i, i = 1, 2 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 33 C
Example Let α > 0 and consider the DAE ẏ 1 = 1, y 1 (0) = 0 0 = (α 1)y 1 + αz 1 αu 0 = z 1 z 2 ẏ 2 = 0, y 2 (0) = 0 0 = αz 2 u Then we have h z = ( α 0 0 α ), ( h α u = 1 ), g z = (1, 1). 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 34 C
Example It follows h z g z h u 0 = α 0 α 0 α 1 1 1 0 This matrix is regular, if α 0. Moreover we have i. e. the DAE has index 1. h z i = α,. 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 35 C
A dynamic iteration scheme Gauß Seidel iteration: ( ) ẏ (k+1) 1 = f 1 y (k+1) 1, y (k) 2, z(k+1) 1 ( ) 0 = h1 y (k+1) 1, y (k) 2, (3) z(k+1) 1, u (k) and ( ) ẏ (k+1) 2 = f 2 y (k+1) 1, y (k+1) 2, z (k+1) 2 ( ) 0 = h2 y (k+1) 1, y (k+1) 2, z (k+1) 2, u (k+1) ( ) 0 = g y (k+1) 1, y (k+1) 2, z (k+1) 1, z (k+1) 2. (4) 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 36 C
Remarks The initial values y (k+1) 1 (t m ) = y 1 (t m ) and y (k+1) 2 (t m ) = y 2 (t m ) guarantee that y 1 and y 2 are continuous numerical solutions. The algebraic components are in general only piecewise continuous. The dynamic iteration scheme (3) forms an index-1 system since the Jacobian h1 is non-singular. Therefore (3) is uniquely z 1 solvable, if y 1 (t m ) is accurate enough. The initial value z (k+1) 1 is determined by h1 = 0 (as usual). The same argumentation is true for system (4). 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 37 C
Remarks The Gauß Seidel iteration is constructed in such a way that z (k) 1 and z (k) 2 do not enter the (k + 1)-st step of the iteration. Therefore only local errors in u and y are propagated during the iteration process. Alternative methods are the Jacobi, the Picard, the SOR iteration and many more. 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 38 C
Convergence Remember, in the case of linear ODEs convergence may always be archieved, if a sufficiently small τ is used. Let with R i (t) := α := max R 1 2 (t)r 1(t) t J [ g z i ( hi z i ) 1 h i u ], i = 1, 2. The contractivity constant α α < 1 guarantees the convergence of the dynamic iteration scheme for k. Proof: see Arnold/Günther (2001). 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 39 C
Example Let α > 0 and consider the DAE ẏ 1 = 1, y 1 (0) = 0 0 = (α 1)y 1 + αz 1 αu 0 = z 1 z 2 ẏ 2 = 0, y 2 (0) = 0 0 = αz 2 u contractivity constant: α time discretisation: implicit Euler method Comparison: monolithical approach and BGS method with 10 and 20 inner iterations 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 40 C
Numerical result 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 41 C
Convergence Remember: The contractivity constant α α < 1 with α < 1 guarantees the convergence of the dynamic iteration scheme for k. The numbering of the subsystems is significant since it determines their order in the Gauß Seidel method and therefore the contractivity constant. Example: ẏ 1 = 0, y 1 (0) = 0 0 = αz 1 u 0 = z 1 z 2 ẏ 2 = 1, y 2 (0) = 0 0 = (α 1)y 2 + αz 2 αu with the contractivity constant 1/α 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 42 C
Numerical result 6.7.2016 Joachim Rang Partitioned Methods for Multifield Problems Seite 43 C