MA557/MA578/CS557 Lecture 36 Spring 2003 Prof. Tim Warburton timwar@math.unm.edu 1 Time Integration for PDEs with Terms of Mixed Stiffness • Consider a generic PDE with the following form: C f C g C t • Examples: 2C 2C C C 1 C D 2 2 t y x • Or: • Or: 2C 2C C C C x y D 2 2 t x y y x C t C 2 x 2C 2C D 2 2 y x 2 Split Scheme • If we split C into a stiff component Cs and a non-stiff component Cns then we can solve the related system: C NS f C t CS g C t C CS C NS • We then use two compatible Runge-Kutta schemes to integrate the equations in lock step. • The conditions to ensure that the explicit and implicit schemes advance at the same time in each substage have been determined and satisfied for matched implicit and explicit (imex) RK schemes which are both fourth order, six stage. “Additive Runge–Kutta schemes for convection–diffusion–reaction equations”, Christopher A. Kennedy, Mark H. Carpenter, Applied Numerical Mathematics 44 (2003) 139–181. 3 Non-Stiff Component • Note this is an explicit RK scheme: f 1 f C n C1 C n C1NS C1NS CNS f C t for i=2:s C i NS C n NS j i 1 j dt aˆij f j 1 f i : f C i end C n 1 NS C n 1 NS j s ˆ j dt b j f j 1 4 Stiff Component • Note this is an implicit RK scheme: C1 C n CS1 CSn for i=2:s CS g C t C C dt aii g C i S n S i j i 1 j dt aij g j 1 g i : g C i end C n 1 S j s j C dt b j g j 1 n S 5 Adding The Schemes Together f 1 f C n C1 C n for i=2:s C C dt aii g C i n : f C i j i 1 j i 1 j j dt aij g dt aˆij f j 1 j 1 g i : g C i fi i end j s j s n 1 n j j ˆ C C dt b j g dt b j f j 1 j 1 6 Kennedy-Carpenter 6 Stage ARK4 f 1 f C n C1 C n dt a g dt aˆ f g C , f f C C dt a g C dt a g a g dt aˆ g C , f f C C 2 C n dt a22 g C 2 g2 C3 g3 2 1 21 2 n 1 33 ... 31 3 21 2 3 3 1 2 32 1 2 ˆ f a f 31 32 3 C 6 C n dt a66 g C 6 dt a61 g 1 a62 g 2 ... a65 g 5 dt aˆ61 f 1 aˆ62 f 2 ... aˆ65 f 5 g6 g C6 , C n 1 f 6 f C6 j 6 j 6 ˆ j j C dt b j g dt b j f j 1 j 1 n 7 6 Stages f 1 f C n C1 C n C dt a g dt aˆ f dt a g C C dt a g a g dt aˆ C 2 dt a22 g C 2 n C3 n ... 3 33 C C 1 n 21 1 31 C 6 dt a66 g C 6 n 1 1 21 2 32 31 f 1 aˆ32 f 2 dt a61 g 1 a62 g 2 ... a65 g 5 dt aˆ61 f 1 aˆ62 f 2 ... aˆ65 f 5 j 6 j 6 ˆ j j C dt b j g dt b j f j 1 j 1 n We now see that there is a sequence of solves. Each stage 2-6 requires the solution of a system (as before in the ESDIRK4 scheme). 8 Linear g – discretized as g f 1 f C n C1 C n I dta22g C 2 C n dtg a21C1 dt aˆ21 f 1 I dta33g C 3 C n dtg a31C1 a32C 2 dt aˆ31 f 1 aˆ32 f 2 ... I dta66g C 6 C n dtg a61C1 a62C 2 ... a65C 5 dt aˆ61 f 1 aˆ62 f 2 ... aˆ65 f 5 C n 1 j 6 j 6 ˆ j j C dtg b j C dt b j f j 1 j 1 n We now see that there is a sequence of solves. Each stage 2-6 requires the solution of a system (as before in the ESDIRK4 scheme). 9 Incorporating the Mass Matrix M for Symmetry (specific to our DG formulations) f 1 f C n C1 C n M dta22g C 2 MC n dtg a21C1 dt aˆ21 f 1 M dta33g C 3 MC n dtg a31C1 a32C 2 dt aˆ31 f 1 aˆ32 f 2 .. . M dta66g C 6 MC n dtg a61C1 a62C 2 ... a65C 5 dt aˆ61 f 1 aˆ62 f 2 ... aˆ65 f 5 MC n 1 j 6 j 6 ˆ j j MC dtg b j C dt b j f j 1 j 1 n Cn1 M 1 MC n1 Where for example g is the diffusion operator g DM D Dx D Nx D Dy D Ny 10 Kennedy-Carpenter Additive RK Schemes f 1 f C n C1 C n M dt g C 2 MC n dtg a21C1 dt aˆ21 f 1 M dt g C 3 MC n dtg a31C1 a32C 2 dt aˆ31 f 1 aˆ32 f 2 ... M dt g C 6 MC n dtg a61C1 a62C 2 ... a65C 5 dt aˆ61 f 1 aˆ62 f 2 ... aˆ65 f 5 MC n 1 j 6 j 6 ˆ j j MC dtg b j C dt b j f j 1 j 1 n Cn1 M 1 MC n1 • K-C set up the imex schemes so that the Butcher block diagonal entries • a22=a33=a44=a55=a66=gamma • Thus the same matrix needs to be inverted at stages 2-5 11 Mixed Implicit Explicit Runge Kutta Scheme (IMEX RK) • Many papers. Example: • http://citeseer.nj.nec.com/cache/papers/cs/484/http:z SzzSzwww.cs.ubc.cazSzspiderzSzascherzSzpapersz Szars.pdf/ascher97implicitexplicit.pdf -- or -- • “Additive Runge–Kutta schemes for convection– diffusion–reaction equations”, Christopher A. Kennedy, Mark H. Carpenter, Applied Numerical Mathematics 44 (2003) 139–181. 12 Fourth Order, 6 Stage Notes: 1) bhat = b 2) See p 176 of Kennedy/Carpenter 13 K-C ARK4 IMEX Scheme • 87-91 sum up stiff terms • 93-96 sum up non-stiff terms • 98-102 invert system • 104 evaluate f(Ctilde_j) • 107-119 piece together C^{n+1} • Dr Day will discuss the use of umPERM stages. 14 Project Lab Time • Start working on your projects. 15