3D GRMHD code: RAISHIN Yosuke Mizuno Institute for Theoretical Physics Goethe University Frankfurt...
-
Upload
benjamin-jacobs -
Category
Documents
-
view
228 -
download
0
Transcript of 3D GRMHD code: RAISHIN Yosuke Mizuno Institute for Theoretical Physics Goethe University Frankfurt...
3D GRMHD code: RAISHIN
Yosuke MizunoInstitute for Theoretical Physics
Goethe University Frankfurt am Main
BH Cam code-comparison workshop, January 20-21, 2015
Code General Information• RAISHIN utilizes conservative, high-resolution shock capturing
schemes (Godunov-type scheme) to solve the 3D ideal GRMHD equations (metric is static)
• Program Language: Fortran 90• Multi-dimension (1D, 2D, 3D)• Special & General relativity (static metric), three different code package• Different coordinates (RMHD: Cartesian, Cylindrical, Spherical and GRMHD:
Boyer-Lindquist coordinates and Kerr-Schild coordinates)• Different schemes of numerical accuracy for numerical model (spatial
reconstruction, approximate Riemann solver, constrained transport schemes, time advance, & inversion)
• Using constant -law, polytropic, and approximate Equation of State (Synge-type)
• Uniform & non-uniform grid• Parallel computing (based on MPI)
Mizuno et al. 2006a, 2011c, & progress
Basic Equations (SRMHD)Conserved Form
Primitive variables Conserved variables Flux
Magnetic field 4-vector (Magnetic field measured in comoving frame)
Energy-momentum tensor
Basic Equations (GRMHD)Conserved Form
Primitive variables Conserved variables Flux
Source term
Metric
Magnetic field 4-vector
: lapse function, i: shift vector
Flow Chart for Calculation
Primitive Variables: P
Conserved Variables: U
Flux: F
Pi Pi+1Pi-1
Fi-1/2 Fi+1/2Ui
1. Reconstruction (Pn : cell-center to cell-surface)2. Calculation of Flux at cell-surface
3. Integrate hyperbolic equations => Un+1
4. Convert from Un+1 to Pn+1
Source: S
Si
ReconstructionCell-centered variables (Pi)→ right and left side of Cell-interface variables(PL
i+1/2, PRi+1/2)
PLi+1/2 PR
i+1/2
Piecewise linear interpolation
• Minmod & MC Flux-limiter (Piecewise linear Method)
• 2nd order at smooth region• Convex ENO (Liu & Osher 1998)
• 3rd order at smooth region• Piecewise Parabolic Method (Marti & Muller 1996)
• 4th order at smooth region• Weighted ENO, WENO-Z, WENO-M (Jiang & Shu 1996; Borges et al. 2008)
• 5th order at smooth region• Monotonicity Preserving (Suresh & Huynh 1997)
• 5th order at smooth region• MPWENO5 (Balsara & Shu 2000)• Logarithmic 3rd order limiter (Cada & Torrilhon 2009)
Pni
Pni+1
Pni-1
Approximate Riemann Solver
Pi Pi+1Pi-1
Fi-1/2 Fi+1/2Ui
x
t
HLL flux
RL: fastest characteristic speed
RL
If L >0 FHLL=FL
L < 0 < R , FHLL=FM
R < 0 FHLL=FR
L R
M
• Calculate numerical flux at cell-inteface from reconstructed cell-interface variables based on Riemann problem• We use HLL approximate Riemann solver
• Need only the maximum left- and right- going wave speeds (in MHD case, fast magnetosonic mode)
Approximate Riemann Solver• HLL Approximate Riemann solver: single state in Riemann fan• HLLC Approximate Riemann solver: two-state in Riemann fan (Mignone & Bodo 2006, Honkkila & Janhunen 2007) (for SRMHD only)• HLLD Approximate Riemann solver: six-state in Riemann fan (Mignone et al. 2009) (for SRMHD only)• Roe-type full wave decomposition Riemann solver (Anton et al. 2010)
Wave speed• To calculate numerical flux at each cell-boundary via Riemann
solver, we need to know wave speed in each directions
E=vi, entropy wave
Alfven waves
Magneto-acoustic waves are found from the quartic equation
• Some simple estimation for fast magnetosonic wave=> Leismann et al. (2005), no numerical iteration
Constrained Transport- The evolution equation can keep divergence free magnetic field
• If treat the induction equation as all other conservation laws, it can not maintain divergence free magnetic field→ We need spatial treatment for magnetic field evolution
Constrained transport scheme• Evans & Hawley’s Constrained Transport (need staggered mesh)• Toth’s constrained transport (flux-CT) (Toth 2000) for SRMHD & GRMHD• Fixed Flux-CT, Upwind Flux-CT (Gardiner & Stone 2005, 2007), for SRMHD only
Other method • Diffusive cleaning (GLM formulation) for RRMHD only
Differential Equations
Time evolution System of Conservation Equations
We use multistep TVD Runge-Kutta method for time advance of conservation equations (RK2: 2nd-order, RK3: 3rd-order in time)
RK2, RK3: first step
RK2: second step (=2, =1)
RK3: second and third step (=4, =3)
Recovery step• The GRMHD code require a calculation of primitive variables
from conservative variables.
• The forward transformation (primitive → conserved) has a close-form solution, but the inverse transformation (conserved → primitive) requires the solution of a set of five nonlinear equations
Method• Noble’s 2D method (Noble et al. 2005)
• Mignone & McKinney’s method (Mignone & McKinney 2007)
General (Approximate) EoS• In the theory of relativistic perfect single gases, specific enthalpy is a function of temperature alone (Synge 1957)
temperature p/K2, K3: the order 2 and 3 of modified Bessel functions
• Constant -law EoS (ideal EoS) :• : constant specific heat ratio
• Taub’s fundamental inequality(Taub 1948)
→ 0, eq → 5/3, → ∞, eq → 4/3
• TM EoS (approximate Synge’s EoS) (Mignone et al. 2005)
Mignone & McKinney 2007
Solid: Synge EoSDotted: ideal + =5/3Dashed: ideal+ =4/3Dash-dotted: TM EoS
c/sqrt(3)
Numerical Tests
L1 norm errors of magnetic field vy shows almost 2nd order accuracy
Code Accuracy (L1 norm)1D CP Alfven wave propagation test
Code Accuracy (grid number vs computer time)
1D shock-tube (Balsara Test 1) with 1 CPU calculated to t=0.4
Number of grid
tsim N∝ x2
Parallelization Accuracy
90%
98%
99%
1D shock-tube (Balsara Test 1) in 3D Cartesian box, calculated to t=0.4
Number of CPU
T(1) / T(N)
1D Relativistic MHD Shock-TubeBalsara Test1 (Balsara 2001)
Black: exact solution, Blue: MC-limiter, Light blue: minmod-limiter, Orange: CENO, red: PPM
• The results show good agreement of the exact solution calculated by Giacommazo & Rezzolla (2006). • Minmod slope-limiter and CENO reconstructions are more diffusive than the MC slope-limiter and PPM reconstructions.• Although MC slope limiter and PPM reconstructions can resolve the discontinuities sharply, some small oscillations are seen at the discontinuities.
400 computational zones
FR
FR
SR
CD
SS
Mizuno et al. 2006
Advection of Magnetic Field Loop• Advection of a weak magnetic field
loop in an uniform velocity field• 2D: (vx, vy)=(0.6,0.3)
• 3D: (vx,vy,vz)=(0.3,0.3,0.6)• Periodic boundary in all direction• Run until return to initial position in
advection case
No advection
Advection
No advection Advection
2D
3D
B2
B2
Volume-averaged magnetic energy density (2D)
Nx=512
256
128
1D Bondi Accretion1D Bondi flow with radial B-field (=1)=4/3, rc=8rg
ur
r/rg
r/rg r/rg
vr
Results follow initial Bondi flow structure
2D torus (Hydro)• 2D geometrically thick torus (Fishbone & Moncrief 1976) with no magnetic field.• a/M=0, Kerr-Schild coordinates
Resistive Relativistic MHD
Ideal / Resistive RMHD EqsIdeal RMHD Resistive RMHD
Solve 11 equations (8 in ideal MHD)Need a closure relation between J and E => Ohm’s law
Ohm’s law• Relativistic Ohm’s law (Blackman & Field 1993 etc.)
isotropic diffusion in comoving frame (most simple one)
Lorentz transformation in lab frame
Relativistic Ohm’s law with istoropic diffusion
• ideal MHD limit (conductivity: => infinity)
Charge current disappear in the Ohm’s law(degeneracy of equations, EM wave is decupled)
Numerical Integration Resistive RMHD
Hyperbolic equations
Source term
Stiff term
Constraint
Solve Relativistic Resistive MHD equations by taking care of 1. stiff equations appeared in Ampere’s law2. constraints ( no monopole, Gauss’s law)3. Courant conditions (the largest characteristic wave speed is always light speed.)
Difficulty of RRMHD1. Constraint
should be satisfied both
constraint numerically
2. Ampere’s law
Equation becomes stiff at high conductivity
ConstraintsApproaching Divergence cleaning method (Dedner et al. 2002, Komissarov 2007)
Introduce additional field & (for numerical noise)advect & decay in time
Stiff Equation
Problem comes from difference between dynamical time scale and diffusive time scale => analytical solution
Ampere’s lawdiffusion (stiff) term
Komissarov (2007)
Analytical solution
Operator splitting method
Hyperbolic + source termSolve by HLL method
source term (stiff part)Solve (ordinary differential) eqaution
Flow Chart for Calculation (RRMHD)
Step1: integrate diffusion term in half-time step
Step2: integrate advection term in half-time step
Step3: integrate advection term in full-time step
Step4: integrate diffusion term in full-time step
Un=(En+1/2, Bn)
(En+1, Bn+1)=Un+1
Strang Splitting Method
1D Shock-Tube Test (Brio & Wu)• Aim: Check the effect of resistivity (conductivity)
• Simple MHD version of Brio & Wu test
• (L, pL, ByL) = (1, 1, 0.5), (R, pR, By
R)=(0.125, 0.1, -0.5)
• Ideal EoS with =2Orange solid: =0Green dash-two-dotted: =10Red dash-dotted: =102
Purple dashed: =103
Blue dotted: =105
Black solid: exact solution in ideal RMHD
Smooth change from a wave-like solution (=0) to ideal-MHD solution (=105)
Relativistic Magnetic
ReconnectionAssumption• Consider Pestchek-type magnetic reconnection
Initial condition• Harris-type model ( anti-parallel magnetic field )• Anomalous resistivity for triggering magnetic reconnection ( r<0.8 )
Results• B-filed : typical X-type topology• Density : Plasmoid• Reconnection outflow: ~0.8c
Summary of RAISHIN code• RAISHIN utilizes conservative, high-resolution shock
capturing schemes (Godunov-type scheme) to solve the 3D ideal GRMHD equations (metric is static)
• Program Language: Fortran 90• Multi-dimension (1D, 2D, 3D)• Special & General relativity (static metric), three different code
package (SRMHD, GRMHD, RRMHD)• Different coordinates (SRMHD: Cartesian, Cylindrical, Spherical
and GRMHD: Boyer-Lindquist coordinates and Kerr-Schild coordinates)
• Different schemes is applied in each steps• Using constant -law, polytropic, and approximate Equation of
State (Synge-type)• Parallel computing (based on MPI)