On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist...

38
On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei Komissarov School of Mathematics University of Leeds UK

Transcript of On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist...

Page 1: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

On Some Recent Developments in Numerical Methods for Relativistic MHD

as seen by an astrophysicist with some experience in computer simulations

Serguei Komissarov

School of MathematicsUniversity of Leeds

UK

Page 2: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

Recent reviews in Living Reviews in Relativity (www.livingreviews.org):

(i) Marti & Muller, 2003, “Numerical HD in Special Relativity (ii) Font, 2003, “Numerical HD in General Relativity”;

Page 3: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

Optimistic plan of the talk

1. Conservation laws and hyperbolic waves.2. Non-conservative (orthodox) and conservative (main stream) schools.3. Causal and central numerical fluxes in conservative schemes.4. Going higher order and adaptive.5. Going multi-dimensional.6. Keeping B divergence free. 7. Going General Relativistic. 8. Stiffness of magnetically-dominated MHD.9. Intermediate (trans-Alfvenic) shocks.

Page 4: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

II. CONSERVATION LAWS AND HYPERBOLIC WAVES

• Single conservation lawU - conserved quantity, F- flux of U, S - source of U

• System of conservation laws

Page 5: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

• 1D system of conservation laws with no source terms

In many cases F is known as only an implicit function of U, f(U,F)=0 .In relativistic MHD the conversion of U into F involves solving a system of complex nonlinear algebraic equations numerically; computationally expensive !

where

• Non-conservative form of conservation laws

Usually there exist auxiliary (primitive) variables, P, such that U and F are simple explicit functions of P.

Page 6: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

• Continuous hyperbolic waves

- Jacobean matrix

Eigenvalue problem:

- wavespeed of k-th mode - transported information

Fast, Slow, Alfven, and Entropy modes in MHD

Page 7: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

• Shock waves

- shock equations

s – shock speed

continuous hyperbolic wave

hyperbolic shock

• Hyperbolic shocks:

As Ur Ul one has (i) (Ur -Ul) r ; (ii) s k.

e.g. Fast, Slow, Alfven, and Entropy discontinuities in MHD

There exist other, non-hyperbolic shock solutions !

Page 8: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

III. NON-CONSERVATIVE AND CONSERVATIVE SCHEMES

(a) Non-conservative school (orthodox)

• Artificial viscosity (physically motivated dissipation) is utilised to construct stable schemes; • (i) poor representation of shocks; (ii) only low Lorentz factors “Why Ultra-Relativistic Numerical Hydrodynamics is Difficult” by Norman & Winkler(1986);

• Anninos et al.,(2005) : Go conservative!

• Wilson (1972) De Villiers & Hawley (2003), Anninos et al.(2005);

• Finite-difference version of

Page 9: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

(b) Conservative school

- exchange by the same amount of U between the neighbouring cells

where

Page 10: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

IV. CAUSAL AND CENTRAL NUMERICAL FLUXES

(a) Causal (upwind) fluxes

Initial discontinuity Its resolution

Utilize exact or approximate solutions for the evolution of the initial discontinuity at the cells interfaces (Riemann problems) to evaluate fluxes.

Implemented in the Relativistic MHD schemes by Komissarov (1999,2002,2004); Anton et al.(2005).

Page 11: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

• Linear Riemann Solver due to Roe (1980,1981)

linearization

Riemann problem:

Wave strengths:

Constant flux through the interface x = xi+1/2 :

transported information

- a system of linear equations for the wave strengths, (k)

wave strengthswave speeds

at t = tn

Page 12: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

(b) Non-causal (central) fluxes

Why not to try something simpler, like

Well, this leads to instability.

Why not to dump it with indiscriminate diffusion?! The modified equation

?

where

This leads to the following numerical flux artificial diffusion

• Lax: , where is the highest wavespeed on the grid. Very high diffusion!

Page 13: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

• Kurganov-Tadmor (KT):

where (k) are the local wavespeeds (Local Lax flux)

• Harten, Lax & van Leer (HLL) :

where

artificial diffusion

This makes some use of causality:

i+1

Page 14: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

Implemented in the Relativistic MHD schemes by: * HLL: Del Zanna & Bucciantini (2003), Gammie et al. (2003); Duez et al.(2005), Anton et al. (2005). * KT: Anton et al. (2005), Anninos et al.(2005) + Koide et al.(1996,1999)

The central schemes are claimed to be as good as the causal ones ! Are they really?

Page 15: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

• 1D test simulations (i) Stationary fast shock

LRS – linear Riemann solver HLL

Page 16: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

(ii) Stationary tangent discontinuity

LRS HLL

Page 17: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

(iii) Stationary slow shock

LRS HLL

Page 18: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

(iv). Fast moving slow shock

LRS HLL

Page 19: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

IV. GOING HIGHER ORDER AND ADAPTIVE

• Fully causal fluxes provide better numerical representation of stationary and slow moving shocks/discontinuities ( see also Mignone & Bodo, 2005) • However for fast moving moving shocks/discontinuities they give similar results to central fluxes. (Lucas-Serrano et al. 2004, Anton et al. 2005).

How to improve the representation of shocks moving rapidly across the grid ?

(i) Use adaptive grids to increase resolution near shocks. Falle & Komissarov (1996), Anninos et al. (2005);

(ii) Use sub-cell resolution to reduce numerical diffusion.

Page 20: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

• The nature of numerical diffusion

Page 21: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

first order scheme second order scheme

Page 22: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

• first order accurate - piece-wise constant reconstruction;

• second order accurate - piece-wise linear reconstruction; Komissarov (1999,2002,2004), Gammie et al.(2003), Anton et al. (2005). • third order accurate - piece-wise parabolic reconstruction; Del Zanna & Bucciantini (2003), Duez et al. (2005).

In astrophysical simulations Del Zanna & Buucciantini are forced to reduce their scheme to second order (oscillations at shocks) !?

THERE IS THE OPTIMUM?

Page 23: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

V. GOING MULTI-DIMENSIONAL.

Ui,j

F

F

F

F

Page 24: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

VI. KEEPING B DIVERGENCE FREE.

- the evolution equation can keep B divergence free !

• Differential equations

• Difference equations may not have such a nice property.

What do we do about this ?

(i) Absolutely nothing. Treat the induction equation as all other conservation laws

magnetic monopoleswith charge density -“magnetostatic force”

( Koide et al. 1996,1999).

Such schemes crash all too often!

Page 25: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

(ii) Toth’s constrained transport.

Use the “modified flux” F that is such a linear combination of normal fluxes at neighbouring interfaces that the “corner--centred” numerical representation of divB is kept invariant during integration.

Implemented in Gammie et al.(2003), and Duez et al.(2005)

Page 26: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

(iii) Constrained Transport of Evans & Hawley.

Implemented in Komissarov (1999,2002,2004), de Villiers & Hawley (2003), Del Zanna et al.(2003), and Anton et al.(2005)

Use staggered grid (with B defined at the cell interfaces) and evolve magnetic fluxes through the cell interfaces using the electric field evaluated at the cell edges.

This keeps the following “cell-centred” numerical representation of divB invariant

Page 27: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

(iv) Diffusive cleaning

Integrate this modified induction equation (not a conservation law )

- diffusion of div B

Implemented in Anninos et al (2005)

Page 28: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

(v) Telegraph cleaning by Dedner et al.(2002)

Introduce new scalar variable, , additional evolution equation (for , and modify the induction equation as follows:

-the “telegraph equation” for div B

conservation laws

Page 29: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

VII. GOING GENERAL RELATIVISTIC

• GRMHD equations can also be written as conservation laws;

- covariant continuity equation

- continuity equation in partial derivatives

- conservative form of the continuity equation. t=x0/c and t=const defines a space-like hyper-surface of space-time (absolute space)

-determinant of the metric tensor

U F i

Utilization of central fluxes is straightforward.

Page 30: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

• Riemann problems can be solved in the frame of the local Fiducial Observer (FIDO) using Special Relativistic Riemann solvers. A FIDO is at rest in the absolute space but generally is not at rest relative to the coordinate grid (Papadopoulos & Font 1998)

--representation of the metric form. Vector is the grid velocity in FIDO’s frame

Here we have got aRiemann problem with moving interface

coordinate gridFIDO’s frame

Implemented inKomissarov (2001,2004),Anton et al. (2005)

Page 31: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

VIII. “STIFFNESS” OF MAGNETICALLY-DOMINATED MHD

Magnetohydrodynamics Magnetodynamics

This has 4 independent components. This has only 2 !

Page 32: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

What to do if such magnetically-dominated regions do develop ?

• Solve the equations of Magnetodynamics (e.g. Komissarov 2001,2004);

• “Pump” new plasma in order to avoid running into the “danger zone”.

Page 33: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

compound wave

fast rarefaction

fast rarefaction

slow shock

intermediateshock

slow rarefaction

VIII. INTERMEDIATE SHOCKSThis numerical solution of the relativistic Brio & Wu test problem is corrupted by the presence of non-physical compound wave which involves a non-evolutionary intermediate shock.

Such shocks are known to pop up in non-relativistic MHD simulations.Brio & Wu (1988);Falle & Komissarov (2001);de Sterk & Poedts (2001);Torrilhon & Balsara (2004);

Almost nothing is known about the relativistic intermediate shocks.

How to avoid them? Use very high resolution. Torrilhon & Balsara (2004)

Page 34: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

Yes! This is finally over !

Thank you!

Page 35: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

Stationary Contact

LRS HLL

Page 36: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

Slowly Moving Contact

LRS HLL

Page 37: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

Stationary Current Sheet

LRS HLL

Page 38: On Some Recent Developments in Numerical Methods for Relativistic MHD as seen by an astrophysicist with some experience in computer simulations Serguei.

Fast Rarefaction Wave (LRS)

1st order; no diffusion. 1st order; LLF-type diffusion

rarefaction shock 1st order

2nd order