The marker-in-cell method Core and Mantle Dynamics Gregor J. Golabek What is the marker-in-cell method? 2 Fixed (Eulerian) grid points Mobile (Lagrangian) markers Cell [modified from Gerya, 2010] What are grid points? Temperature T 3 T f x Distance x Discretization of continous 1D function 4 T f x Fixed grid points Increase number of grid points 5 T f x Higher resolution = Higher accuracy 6 T f x [Gerya, 2010] More complex 2D problem 7 f P,T 0 1 T T0 1 P P0 [Gerya, 2010] Discontinous problems on a grid 8 numerical diffusion! [Gerya, 2010] Solution: • Mobile markers transport physical properties (e.g. composition, density, temperature, ...) • Interpolation of marker properties on immobile grid points • Solution of the constitutive equations (e.g. Stokes equation => velocities) • Velocity field is used to advect the markers With marker-in-cell method 9 [Gerya, 2010] Interpolation from markers to nodes 10 N markers e.g. density ‘‘ ‘ [modified from Gerya, 2010] Averaging - Methods 11 N N h N 1 1 1 1 ... Harmonic mean 1 1 2 ... N a i N i1 N Arithmetic mean i1 i 1 2 N N N g N i N 1 2 N i1 Geometric mean Averaging - Results Velocity v 12 Higher grid resolution [modified from Schmeling et al., 2008] Re-interpolation from nodes to markers 13 N markers density ‘‘ ‘ [modified from Gerya, 2010] Marker advection – Euler scheme 14 Application: Corner flow problem y error y(2) y(1) trajectory x(1) x t 1 t x(2) t x t v x y [Press et al., 1997] x(3) t 1 t t y t v y Marker advection – Runge-Kutta 2nd order 15 Application: Corner flow problem y error y(2) y(1) trajectory smaller error x(1) x t 1 trajectory t x t v x(2) 1 t 2 x [Press et al., 1997] x(3) y t 1 t y t v 1 t 2 y Marker advection – Runge-Kutta 4th order 16 A x(t) C B x(t+1) D x t 1 [Press et al., 1997] 1 1 t t 1 t t t 1 2 2 x t v xA 2v xB 2v xC v xD 6 Marker advection – Runge-Kutta 4th order 17 A x(t) C B x(t+1) D x t 1 [Press et al., 1997] 1 1 t t 1 t t t 1 2 2 x t v xA 2v xB 2v xC v xD 6 Marker advection – Runge-Kutta 4th order 18 A x(t) C B x(t+1) D x t 1 [Press et al., 1997] 1 1 t t 1 t t t 1 2 2 x t v xA 2v xB 2v xC v xD 6 Marker advection – Runge-Kutta 4th order 19 A x(t) C B x(t+1) D x t 1 [Press et al., 1997] 1 1 t t 1 t t t 1 2 2 x t v xA 2v xB 2v xC v xD 6 Geodynamical application 20 Geodynamics: More precise Runge-Kutta 4th order scheme used STILL: Accumulation of advection errors after several overturns Formation of holes in marker field Always check your results! 21 Entrainment Holes [Schmeling et al., 2008] Summary 22 • The marker-in-cell method is a powerful tool to advect strongly discontinous fields in numerical models • Mobile markers are advected through an immobile grid • High order Runge-Kutta advection schemes preferred • Non-diffusive markers store physical properties BUT: • Grid resolution has still to be sufficiently high for meaningful solution • Sufficient number of markers in each cell for averaging to minimize interpolation errors • Holes in the marker field can open after several overturns • Marker refilling needed when cells are empty The end Lecture download: http://perso.ens-lyon.fr/gregor.golabek/teaching.html Numerical exercise: Nu-Ra relation 24 Nu ~ Ra [Christensen,1984] Reminder: Nu and Ra number 25 Nusselt number Nu: qtot Nu qcond Rayleigh number: 0Tgb Ra 3 [Turcotte and Schubert, 2002] Numerical exercise: Nu-Ra relation 26 Nu ~ Ra How to do that? [Christensen,1984] 1. Vary the Ra number in your input file 2. Wait until steady-state is reached in the simulation 3. Read out the heat flux qsurf and compute corresponding Nu 4. Plot results and estimate parameters and