Articles

AN ALGORITHM FOR RADIATION MAGNETOHYDRODYNAMICS BASED ON SOLVING THE TIME-DEPENDENT TRANSFER EQUATION

, , and

Published 2014 June 18 © 2014. The American Astronomical Society. All rights reserved.
, , Citation Yan-Fei Jiang et al 2014 ApJS 213 7 DOI 10.1088/0067-0049/213/1/7

0067-0049/213/1/7

ABSTRACT

We describe a new algorithm for solving the coupled frequency-integrated transfer equation and the equations of magnetohydrodynamics in the regime that light-crossing time is only marginally shorter than dynamical timescales. The transfer equation is solved in the mixed frame, including velocity-dependent source terms accurate to $\mathcal {O}(v/c)$. An operator split approach is used to compute the specific intensity along discrete rays, with upwind monotonic interpolation used along each ray to update the transport terms, and implicit methods used to compute the scattering and absorption source terms. Conservative differencing is used for the transport terms, which ensures the specific intensity (as well as energy and momentum) are conserved along each ray to round-off error. The use of implicit methods for the source terms ensures the method is stable even if the source terms are very stiff. To couple the solution of the transfer equation to the MHD algorithms in the Athena code, we perform direct quadrature of the specific intensity over angles to compute the energy and momentum source terms. We present the results of a variety of tests of the method, such as calculating the structure of a non-LTE atmosphere, an advective diffusion test, linear wave convergence tests, and the well-known shadow test. We use new semi-analytic solutions for radiation modified shocks to demonstrate the ability of our algorithm to capture the effects of an anisotropic radiation field accurately. Since the method uses explicit differencing of the spatial operators, it shows excellent weak scaling on parallel computers.

Export citation and abstract BibTeX RIS

1. INTRODUCTION

The dynamical effects of radiation are important in a variety of astrophysical systems. For example, in black hole accretion disks, radiation is not only an important cooling mechanism, but also the dominant source of pressure in the radiation-dominated regime. The standard thin disk model (Shakura & Sunyaev 1973), in which heating and radiative cooling are balanced locally, is only applicable when the accretion rate is ∼0.01–0.3 of the Eddington rate. At larger accretion rates, the disk is thought to become geometrically and optically thick (Abramowicz et al. 1988; Abramowicz & Fragile 2013), and radial advection may also become an important cooling mechanism. At both super-Eddington and strongly sub-Eddington accretion rates, strong outflows are likely to be produced (Blandford & Begelman 1999; Ohsuga & Mineshige 2013). While much insight into the structure and dynamics of accretion disks over this broad range of parameters has been made using analytic steady-state models, more realistic calculations require numerical methods.

In addition, since the magneto-rotational instability (MRI; Balbus & Hawley 1991, 1998) is generally believed to be the physical mechanism for angular momentum transport in black hole accretion disks, numerical methods for magnetohydrodynamics (MHD) that include the effect of radiation are crucial to enable study of the saturation and nonlinear regime of the MRI in such disks. Shearing box simulations of the MRI in the local patches of a radiation pressure dominated accretion disk have significantly improved our understanding of the dynamics in this regime (Turner et al. 2003; Turner 2004; Hirose et al. 2006; Krolik et al. 2007; Blaes et al. 2011; Jiang et al. 2013b). For example, in this regime, disks are found to undergo thermal runaway in local shearing box simulations (Shakura & Sunyaev 1976; Jiang et al. 2013a). However, understanding the saturation of thermal runaways and the implications for observations of radiation-pressure-dominated disks require global simulations.

In order to model the thermal properties of accretion disks over a wide range of parameters accurately requires algorithms for radiative transfer (RT) that satisfy several criteria. First, the algorithm must be accurate in both optically thick (e.g., the mid-plane) and optically thin (e.g., the photosphere) regions. Second, it must be accurate over a wide range of ratios of radiation to gas pressures, from very small values (when the accretion rate is small) to very large values (when the accretion rate is high and the disk is radiation pressure dominated). Third, it must handle the non-local and anisotropic transport of photons accurately. For example, the radiation field above the photosphere will be produced by emission from many different (including distant) parts of the disk. This is likely critical to calculate the dynamics of outflows correctly. Finally, the algorithm must be efficient and highly parallelizable in order to enable large-scale global simulations on modern computer systems.

Since in general the RT equation is a function of seven independent variables (time, spatial position, angles, and frequency), it is usually thought that a formal solution to compute the specific intensity is intractable, even in the case of frequency independent opacities such that the gray (frequency independent) transport equation can be used. Thus, most algorithms for radiation MHD adopt a moment formalism, in which a hierarchy of angle-integrated time-dependent moment equations are solved. This reduces the dimensionality of the problem to time and spatial coordinates, as are used for the MHD equations. However, the hierarchy of moment equations require a closure relation. A variety of different closures have been adopted, including the flux-limited diffusion (FLD) approximation (Levermore & Pomraning 1981; Turner & Stone 2001; Krumholz et al. 2007; Zhang et al. 2011; van der Holst et al. 2011; Commerçon et al. 2011) and more recently the M1 method (González et al. 2007; Skinner & Ostriker 2013; Saa¸dowski et al. 2013; McKinney et al. 2013). A variety of recent studies of the global dynamics of black hole accretion disks (Ohsuga & Mineshige 2011; Saa¸dowski et al. 2013; McKinney et al. 2013) have used such approximate closures. However, it is far from clear that such closures will be accurate everywhere in the flow. The angular distribution of the radiation field can be arbitrarily complex, particularly in optically thin regions, but these schemes make the simple assumptions that the Eddington tensor can be uniquely determined by the local radiation energy density and flux. At present, there is no means of improving the approximation in these closures—there is no resolution parameter that can be increased to assess convergence. Thus, it is worthwhile to develop new algorithms that are based on a direct solution of the RT equation. A key message of our work is that modern computer systems have advanced to the point that formal solution of the six dimensional gray RT equation is now feasible at every time step of a MHD simulation, and that approximate closures of unknown accuracy are no longer necessary.

In this vein, we recently have described an algorithm for radiation MHD that is based on the method of short characteristics to solve the time-independent RT equation in multidimensions (Davis et al. 2012), an approach that was also used in earlier work (Stone et al. 1992; Hayes & Norman 2003; Hubeny & Burrows 2007). At every time step, short characteristics are used to compute the specific intensity, from which direct quadrature is used to compute the components of the variable Eddington tensor (VET) which serves as the closure relation in the radiation moment equations (Jiang et al. 2012, thereafter JSD12). This method has been successfully used to study the dynamics of radiation-dominated accretion disks using the local shearing box simulations (Jiang et al. 2013a, 2013b). The primary assumption underlying this method is that the light-crossing time is much shorter than characteristic dynamical times in the flow, so that solutions of the time-independent RT equation can be used to compute the VET. This is an excellent approximation in most flows. However, in the inner regions of black hole accretion disks, dynamical times become comparable to the light crossing time, and solution of the time-dependent RT is required. The goal of this paper is to describe such an algorithm based on ray tracing methods. Although our algorithm is motivated by the study of black hole accretion disks, it is also applicable to any system that has characteristic flow velocity which is not much smaller than the speed of light.

Of course, within a few gravitational radii of the black hole, the flow will be fully relativistic, and both general relativistic MHD and RT are required to describe the dynamics. While GRMHD flows including radiation using FLD or the M1 closure have recently been reported (Fragile et al. 2012; Saa¸dowski et al. 2013; McKinney et al. 2013), developing algorithms based on the formal solution of the RT equation in general relativity (GR) is a formidable challenge. Instead, in this paper we describe an intermediate step. That is, we develop ray tracing methods for the formal solution of the time-dependent RT equation, but restrict ourselves to non-relativistic flows. Thus, there is a relatively narrow window of velocities where our method is applicable; since when vc the time step in our algorithm is too small for it to be efficient, while for vc the flow is relativistic. Nonetheless, there is an interesting range of radii in black hole accretion disks where our method is applicable. We report results of simulations studying this region elsewhere. Moreover, we are now extending the method described in this paper to full GR.

Another popular approach to solving the time-dependent RT equation is Monte Carlo methods (Whitney 2011 and references therein). These methods are accurate, flexible, and have almost perfect parallel scaling, and therefore are a very attractive direction for the future. However, the intrinsic noise associated with Monte Carlo makes the method very expensive to model radiation-pressure-dominated flows accurately (Davis et al. 2012). While it may be possible to reduce the noise and computational cost in Monte Carlo using novel approaches (Yusef-Zadeh et al. 1984; Densmore et al. 2007; Steinacker et al. 2013), in this work, we instead adopt ray tracing methods. Although ray tracing methods are more complex to implement, they do not suffer from noise.

This paper is organized as follows. The equations we solve are given in Section 2. The basic angular discretization scheme is described in Section 3. A complete description of the algorithm are given in Section 4 and we show test results in Section 5 to demonstrate the capability of the method. In Section 6, we test the speed and parallel performance of the code. Finally, we summarize in Section 7.

2. EQUATIONS

Following Lowrie et al. (1999) and JSD12, we solve the RT equation in the mixed frame: the specific intensity is measured in an Eulerian frame while the radiation–material interaction terms are computed in the co-moving frame of the fluid. This requires a Lorentz transformation of variables between frames. For non-relativistic flows, keeping only terms to $\mathcal {O}(v/c)$ (Mihalas & Klein 1982), where v is the magnitude of flow velocity ${{\boldsymbol v}}$ and c is the speed of light, the RT equation is

Equation (1)

Note that as discussed by Lowrie et al. (1999), in order to keep the RT equation self-consistent in a moving medium, some $\mathcal {O}(v/c)^2$ terms need to be kept compared to Equation (2.28) of Mihalas & Klein (1982). These are the last two in Equation (1). Here the frequency integrated specific intensity I is a function of time, spatial positions, and angles with unit vector ${{\boldsymbol n}}$. Moments of the angular quadrature over all the solid angles Ω are defined as

Equation (2)

They are related to the commonly used radiation energy density Er, radiation flux ${{\boldsymbol F}}_r$ and radiation pressure ${\sf P_r}$ via Er = 4πJ, ${{\boldsymbol F}}_r=4\pi c{{\boldsymbol H}}$, and ${\sf P_r}=4\pi {\sf K}$.5 Absorption and scattering opacities (attenuation coefficients) are σa and σs respectively, ar is the radiation constant, and T is the gas temperature. The time- and velocity-dependent terms in Equation (1) change significantly the algorithm for solving the RT equation compared with the short characteristic method described in Davis et al. (2012).

In order to couple the radiation field to the gas, we need to take the angular moments of Equation (1) to get the radiation energy (Sr(E)) and momentum ($\boldsymbol { S_r}({{\boldsymbol P}})$) source terms (these are easily confirmed to be exactly the same as in Lowrie et al. (1999) and JSD12). The zeroth and first moments of the right-hand side of equation (1) multiplied by 4π/c are

Equation (3)

Then the ideal MHD equations with radiation energy and momentum source terms are (Stone et al. 2008; JSD12)

Equation (4)

In the above equations, ρ is density, ${\sf P}^{\ast }\equiv (P+B^2/2){\sf I}$ (with ${\sf I}$ the unit tensor), and the magnetic permeability μ = 1. The total gas energy density is

Equation (5)

where Eg is the internal gas energy density. We adopt an equation of state for an ideal gas with adiabatic index γ, thus Eg = P/(γ − 1) for γ ≠ 1 and T = P/Ridealρ, where Rideal is the ideal gas constant.

In order to get a better insight on the relative importance of different terms in the radiation MHD equations, following Lowrie et al. (1999) and JSD12, we convert the above equations into dimensionless form by adopting two ratios ${\mathbb {C}}=c/a_0$ and ${\mathbb {P}}=a_rT_0^4/P_0$, where a0, T0 and P0 are the characteristic values of velocity, temperature, and gas pressure, respectively. Therefore, ${\mathbb {C}}$ is the dimensionless speed of light while ${\mathbb {P}}$ is a measure of relative importance between radiation pressure and gas pressure when gas temperature is around T0. Units for Er, $ {\sf P_r}$, I, ${{\boldsymbol H}}$ and $ {\sf K}$ are $a_rT_0^4$ while ${{\boldsymbol F}}_r$ has units of $ca_rT_0^4$. Then the full dimensionless radiation MHD equations are

Equation (6)

Equation (7)

The dimensionless source terms are

Equation (8)

The dimensionless form of the equations will be used in the remainder of the paper.

Unlike the radiation moment equations, which require a closure (for example the VET), this set of equations is closed. However, in order to compare with previous results based on solution of the radiation moment equations, we can still calculate the Eddington tensor as

Equation (9)

3. ANGULAR DISCRETIZATION

The same angular discretization scheme for the specific intensity as adopted by Davis et al. (2012) is used here. This is based on the original algorithm developed by Bruls et al. (1999), which itself is based on the quadrature principle described in Carlson (1963). We only introduce the necessary definitions here, which will be used in the rest of the paper.

Each angle ${{\boldsymbol n}}$ is uniquely specified by its direction cosines with respect to the three axes ${{\boldsymbol n}}=(\mu _x,\ \mu _y,\ \mu _z)$, where $\mu _x^2+\mu _y^2+\mu _z^2=1$. The number of polar angle nμ is chosen by the user and the total number of rays in three dimensions (3D) is na = nμ(nμ + 2). In all the tests shown in this paper, nμ = 8 unless otherwise specified. A quadrature weight W is assigned to each angle ${{\boldsymbol n}}$, which represents the solid angle extended by the ray along direction ${{\boldsymbol n}}$. Therefore, Equation (2) for the angular quadrature can be calculated as

Equation (10)

where i, j, and l represent three directions and all the angles in each cell, respectively. The most important feature of this angular discretization scheme for our algorithm is that for an isotropic distribution of specific intensity, this scheme guarantees Kii/J = 1/3 for any number of angles. This is necessary to avoid significant discretization errors when we calculate the radiation source terms (Equation (8)) from the RT Equation (6). For two-dimensional (2D) problems, a special angular discretization scheme can be chosen to increase the effective angular resolution significantly, while still keep the Eddington tensor to be 1/3 for isotropic radiation field. Direction cosines with respect to the third axis (μz) can be chosen to be $1/\sqrt{3}$ and all the angles are uniformly distributed in the 2D plane of the problem.

4. NUMERICAL ALGORITHM

The existence of the time-dependent terms makes the RT equations become an initial value problem, instead of a boundary value problem as in the case of the time-independent equations solved in Davis et al. (2012). Therefore, the short characteristic method adopted by Davis et al. (2012) cannot be used here and a new numerical algorithm is required. We first give an overview of the steps in the method, and then describe each step in detail subsequently.

4.1. Basic Steps in the Algorithm

  •   
    Step 1. Calculate time step Δ t based on cell size and speed of light with Courant–Friedrichs–Lewy number 0.4.
  •   
    Step 2. Calculate the change of specific intensity along each direction ${{\boldsymbol n}}_l$ due to divergence of transport flux along three directions ΔFl, according to Section 4.2. Depending on whether the scattering opacity is larger or smaller than the absorption opacity in each cell, ΔFl is added to the right-hand side of the matrix either in Step 5 or Step 4. This is necessary to keep the balance between the transport term and source terms.
  •   
    Step 3. Estimate flow velocity for half time step according to Section 4.5.
  •   
    Step 4. Update all the specific intensities with the absorption opacity related terms according to Section 4.3. Calculate the corresponding radiation energy and momentum source terms.
  •   
    Step 5. Repeat Step 4 but for the scattering opacity related terms.
  •   
    Step 6. Update gas quantities using the usual Athena algorithm described in Stone et al. (2008).
  •   
    Step 7. Add the radiation energy and momentum source terms calculated in Step 4 and Step 5 to the gas quantities.

4.2. The Transport Step

The left-hand side of Equation (6) represents the advection of specific intensity at the speed of light along the direction specified by ${{\boldsymbol n}}$ when the source term vanishes. Based on this idea, Stone & Mihalas (1992) applied upwind monotonic interpolation methods to solve the transport step in one dimension. In this way, each I is advected across the grid using fluxes calculated at the cell interface, which guarantees conservation of radiation energy and momentum to roundoff error. A similar technique can be used in multi-dimensions with appropriate extensions.

In the non-relativistic case, the direction of the specific intensity can be assumed to be constant during the transport step. Therefore, the transport part of Equation (6) can be rewritten in conservative form

Equation (11)

This equation suggests that we can decompose the transport of I along direction ${{\boldsymbol n}}$ into three transport steps along each axis and each of them can be calculated with similar method as proposed by Stone & Mihalas (1992).

The original algorithm developed by Stone & Mihalas (1992) needs to be modified for the velocity dependent source terms in optically thick regime to reduce numerical diffusion, especially for the case with pure scattering opacity. In the Eulerian frame, the transport term ${\mathbb {C}}{{\boldsymbol \nabla}}\cdot ({{\boldsymbol n}}I)$ includes both the diffusive part and advective part caused by the flow velocity. The diffusion and advection speed can be much smaller than the speed of light. Therefore, if we always use the speed of light as the transport speed as originally adopted by Stone & Mihalas (1992), the amount of numerical diffusion can significantly overwhelm the physical flux. A similar issue also exists when the two radiation moment equations are solved in the mixed frame as discussed in the Appendix of Jiang et al. (2013b). Therefore, it is necessary to separate the diffusion and advection parts so that we can treat them accurately.

The velocity dependent source term that needs special treatment is

Equation (12)

We split the transport term as

Equation (13)

where $\tilde{I}\equiv I-IV/{\mathbb {C}}$. Mathematically, the equation is unchanged. However, the numerical treatments of the two terms are different to significantly reduce numerical diffusion. The transport velocity for the first term is chosen to be $\alpha {\mathbb {C}}$ (Jiang et al. 2013b) instead of ${\mathbb {C}}$, where

Equation (14)

Here Δl is the cell size. When optical depth per cell is larger than 1, α ∼ 1/[10Δla + σs)] and the transport speed is reduced by a factor of α. When the cell is optically thin, α ∼ 1 and the transport speed is unchanged. As discussed in Jiang et al. (2013b), the numerical factor 10 in the above equation is chosen so that the numerical diffusion does not affect the physical solution over a wide range of optical depth per cell in our tests, while still keeping the algorithm stable.

The speed of light is no longer the characteristic speed for the second term ${{\boldsymbol n}}\cdot {{\boldsymbol \nabla}}(IV)$ in Equation (13). This term represents the advection of specific intensity along direction ${{\boldsymbol n}}$ due to motion of the flow. Therefore, the transport speed for this term is flow velocity ${{\boldsymbol v}}$.

The two transport terms can both be decomposed along the three axes independently as

Equation (15)

Equation (16)

Although the above two equations are no longer the simple advection equation solved by Stone & Mihalas (1992), similar techniques can still be used to calculate the transport flux, as they represent the same advection process with advection velocity $\alpha {\mathbb {C}}$ and $|{{\boldsymbol v}}|$ respectively, which are assumed to be constants during this step. The second-order van Leer scheme as Equation (4) of Stone & Mihalas (1992) is adopted to calculate the flux.

4.3. Absorption Opacity

The absorption opacity related terms change the specific intensity according to the following equation

Equation (17)

The zeroth and first angular moments of the above equation multiplied by 4π give the following equations for the change of radiation energy density and flux as

Equation (18)

The corresponding changes of gas temperature and momentum are

Equation (19)

Notice that the change of kinetic energy density due to the work done by radiation force is

Equation (20)

Therefore, the change of total energy $\partial [{\mathbb {P}}E_r+\rho R_{{\rm ideal}}T/(\gamma -1)+\rho v^2/2]/\partial t=0$ as the source terms we add to the gas and radiation have exactly the same value but opposite signs. As the thermalization time scale ${\sim }1/({\mathbb {P}}{\mathbb {C}}\sigma _a)$ can be very short even compared with light crossing time per cell when the optical depth per cell is much larger than 1, Equation (17) must be solved implicitly to make the algorithm stable. When the flow velocity is not too small compared with speed of light 6 and radiation energy density is much larger than the gas pressure, the radiation work term is not negligible and should be solved simultaneously with other terms to get the correct equilibrium state. To avoid extra non-linear terms caused by the velocity-dependent terms, flow velocity is fixed during this step (see Section 4.5). The absorption opacity is also fixed during this step. To get the correct equilibrium state, change of the gas temperature also needs to be calculated simultaneously with Equation (17). Therefore, the specific intensity along each direction ${{\boldsymbol n}}_m$ ($I^{n+1}_m$) and gas temperature (Tn + 1) at time step n + 1 can be calculated based on their values at current time step n and time step Δt as

Equation (21)

Here ranges for the lower scripts m and l are from 1 to the total number of angles in each cell. For total N angles for each cell, Equation (21) represents N + 1 equations, which we have to solve simultaneously. This set of equations are non-linear because of the (Tn + 1)4 term. They are linear with respect to $I^{n+1}_m$. We use Newton–Raphson iteration to solve this set of equations with the initial guess chosen to be $I^n_m$ and Tn. Because the non-linear terms are only fourth order polynomial, we usually find the iteration converges very quickly.

Newton–Raphson iteration requires inversion of the Jacobi matrix during each step, which can be simplified analytically to significantly reduce the computational cost. We first subtract the line of $I^{n+1}_N$ from all the lines for $I^{n+1}_m (m\ne N)$. Each $I^{n+1}_m (m\ne N)$ can now be expressed as a function of $I^{n+1}_N$ and Tn + 1 easily. Therefore we only need to invert a 2 × 2 matrix for $I^{n+1}_N$ and Tn + 1 numerically, after which all the $I^{n+1}_m (m\ne N)$ can be calculated directly. The total cost to invert the Jacobi matrix is only $\mathcal {O}(N)$.

With the updated solution $I^{n+1}_m$ and Tn + 1, the changes of the gas internal energy density ΔET and gas momentum $\Delta (\rho {{\boldsymbol v}})$ due to the absorption opacity terms are

Equation (22)

Equation (23)

The related change of kinetic energy density is

Equation (24)

We calculate the gas momentum source term $\Delta (\rho {{\boldsymbol v}})$ according to the conservation of gas and radiation momentum at time step n and n + 1, instead of calculating the momentum source term directly according to Equation (18). This not only guarantees momentum conservation to roundoff error but also avoids difficulties when absorption opacity σa is very large while ${{\boldsymbol F}}_r$ is very small. However, the sum of ΔET and ΔEK differs from the change of radiation energy density on the order of $\mathcal {O}(\Delta t^2)$. In principle, this energy error can be reduced when we go to second-order accuracy in time, which requires solving Equation (21) twice. Our approach to calculate ΔET and ΔEK assures that gas temperature is evolved exactly as Equation (21) describes and it will not be affected by the truncation error of the kinetic energy density. As we will show in the tests, the energy error is usually smaller than 0.01% and it will not accumulate.

4.4. Scattering Opacity

The scattering opacity does not change the gas temperature. It only changes the flow velocity and thus the kinetic energy density. The equations we need to solve for the scattering opacity related terms are

Equation (25)

Taking the zeroth and first moments of above equation and multiplying by 4π, we get the equations describing the evolution of radiation energy density and momentum as

Equation (26)

The change of gas momentum due to scattering opacity is

Equation (27)

The velocity-dependent terms in Equation (25) also needs to be calculated simultaneously with the other term in Equation (25) in order to get the correct equilibrium state, especially when the velocity dependent terms become significant. In order to make the code stable for the regime when the scattering optical depth per cell is larger than 1, the scattering opacity source terms also need to be added implicitly.

Following the approach used in Section 4.3 for the absorption opacity case, we fix flow velocity during this step to avoid the nonlinear terms. Then each specific intensity Im is updated using backward Euler implicitly as

Equation (28)

These N equations are linear with respect to the unknowns $I^{n+1}_m$ for given $I^{n}_m$, velocity and opacity. We find it is actually easier to use $I^{n+1}_mW_m$ as unknowns and the N × N matrix we need to invert has the following format

Equation (29)

The matrix elements am, bm and cm are

Equation (30)

LU decomposition is used to invert the matrix. Because of the special pattern of the matrix, the LU decomposition can be worked out analytically. The L and U matrix after the decomposition only have two lines that are non-zero. Therefore, the final cost to invert this matrix is still only $\mathcal {O}(N)$. After we get the updated solution $I^{n+1}_m$, we calculate the change of gas momentum and kinetic energy density according to Equations (23) and (24).

4.5. Estimating the Velocity

When source terms are added as described in Sections 4.3 and 4.4, the flow velocity is fixed to avoid the highly non-linear terms during the matrix inversions. When photon momentum is significant compared with gas momentum, this is no longer a good approximation. To improve the accuracy, instead of using the flow velocity at time step n, we first estimate the flow velocity at time step n + 1/2 based on the following equations:

Equation (31)

where Pr is the diagonal components of the radiation pressure tensor ${\sf P_r}$. We keep Er and Pr fixed in this step and solve ${{\boldsymbol v}}$ and ${{\boldsymbol F}}_r$ from the above two equations. For given values of ${{\boldsymbol v}}^{n}$ and ${{\boldsymbol F}}_r^{n}$, we estimate the velocity $\tilde{{{\boldsymbol v}}}$ according to

Equation (32)

The estimated flow velocity $\tilde{{{\boldsymbol v}}}$ is used when the absorption and scattering source terms are added.

5. VERIFICATION TESTS

5.1. Thermal Equilibrium in a Uniform Static Medium

To demonstrate that our treatment of absorption opacity as described in Section 4.3 can give the correct solution for radiation energy density Er and gas temperature T, we first study the evolution of Er and T toward an equilibrium state in a static medium. It is important to show that even when the time step is much larger than the thermalization time, the method is still stable and accurate.

We setup a uniform 2D domain, periodic in x and y, with Lx = Ly = 1 and Nx = Ny = 32. Density is chosen to be 1 and flow velocity is zero. The dimensionless parameters are ${\mathbb {P}}=1, {\mathbb {C}}=10, R_{{\rm ideal}}=1$, and γ = 5/3. The typical sound speed is chosen to be only 10% of speed of light in order to speed up the calculation. We choose initial conditions with ErT4 and follow it as it relaxes to a state with Er = T4, subject to energy conservation. Figure 1 shows initial conditions Er = 100, T4 = 1 for the left panel and T4 = 108, Er = 1 for the right panel. Evolution of Er and T for the two different initial conditions with two different opacities σa are shown in Figure 1. The equilibrium solutions from the code agree with the analytical solutions (the blue lines) very well. The total energy error in this test is smaller than 10−10, which is set by the accuracy of the Newton–Raphson iterations as discussed in Section 4.3.

Figure 1.

Figure 1. Evolution of the radiation energy density and gas temperature to an equilibrium state in a static medium. Different initial conditions are used for the left and right panels. For each initial condition, we show results with two different opacities as labeled in the figure. The red (black) lines are for Er (T4) while the blue lines are the analytic solution at the equilibrium state. The black squares and red circles indicate the values at each time step.

Standard image High-resolution image

When σa = 100, the time step, which is set by the speed of light, is much larger than the thermalization time. In this case, the correct equilibrium state is achieved within about one time step. When the time step is comparable to the thermalization time as in the case σa = 1, our algorithm automatically resolves the thermalization process. Unlike the predict and correct scheme shown in Figures 1 and 2 of JSD12, this algorithm can always keep the relative values of Er and T4 even for extreme parameters during the thermalization process, as our algorithm solves the gas temperature and radiation energy density simultaneously.

5.2. Equilibrium State in a Moving Medium

To test our treatment of the velocity-dependent terms, we give the fluid a uniform initial velocity vx along the x direction based on the setup used in the last section and let the system evolve. As the RT equations are not Galilean invariant (Lowrie et al. 1999, JSD12), specific intensity will be beamed along the direction of flow velocity and a net radiation flux is produced along the opposite direction. As the co-moving flux is non-zero initially, the flow experiences a drag by the photons and is decelerated until the co-moving flux becomes zero in the equilibrium state. We use $v_x=0.3{\mathbb {C}}$ in this test so that the velocity-dependent terms are significant. For this test, we set T = 1 and Er = 1 initially. Three angles for each octant are used.

Histories of the flux, momentum, and energy for the case with absorption opacity σa = 100 are shown in Figure 2. The advective flux is defined to be $F_v\equiv v_x(E_r+ P_{r,xx})/{\mathbb {C}}$. When the system reaches the equilibrium state, Fv = Fr and the co-moving flux becomes zero, as it should be. The total momentum of the system is the sum of the gas momentum ρvx and photon momentum ${\mathbb {P}}F_r/{\mathbb {C}}$, which is conserved as shown in the middle panel of Figure 2. The gas momentum is decreased due to the radiation drag and converted to photon momentum. During this process, the kinetic energy of the gas is transformed to the radiation energy density and gas internal energy through the thermal coupling. As shown in the bottom panel of Figure 2, the total energy is also almost conserved. The relative energy error is only 10−4. For the case with scattering opacity σs = 100, we find very similar behavior and accuracy. The only exception is that the gas temperature is unchanged and all the kinetic energy density is converted to the radiation energy density, as expected. Therefore, solutions from our transfer equation are consistent with the radiation moment equations. Notice that the last two terms in Equation (6), which we added in comparison to Mihalas & Klein (1982), are crucial to get the correct equilibrium state in a moving medium.

Figure 2.

Figure 2. Top: history of the radiation flux Fr, x (red line) and advective flux Fv (black line) along x direction for the test discussed in Section 5.2 for the case with absorption opacity. Middle: history of the gas momentum (solid line) and total momentum (dashed line). Bottom: history of the gas (solid line) and total energy densities (dashed line).

Standard image High-resolution image

Specific intensities not only allow calculation of the radiation energy density and flux, but also encode information about the angular distribution of the photons. An initially isotropic distribution of the specific intensity is shown in the left panel of Figure 3. After the equilibrium state is reached, the middle and right panels of Figure 3 show the spatial distributions of the specific intensities projected to the xy plane for the cases with absorption opacity σa = 100 and scattering opacity σs = 100 respectively. The right-going intensities are increased while the left-going intensities are decreased. In other words, the specific intensities are beamed as expected.

Figure 3.

Figure 3. Spatial distributions of the specific intensity projected in the xy plane for the tests described in Section 5.2. The black rays have μz = 0.333 while for the blue rays μz = 0.882. Left: initial isotropic distribution. Middle: distribution of the specific intensities at the equilibrium state with absorption opacity. Right: the same as the middle panel but for the case with only scattering opacity. The black and blue ellipses are the analytical solutions for all the angles.

Standard image High-resolution image

To check that the angular distribution of specific intensities agree with the Equations (17) and (25) quantitatively in the steady state, we set the left-hand side of the two equations to be zero and solve the two integral equations of the right-hand sides for all angles, which are shown as the black and blue ellipses in Figure 3. As this figure shows, the agreement is perfect.

The angular distribution of the photons can also be quantified by two components of the Eddington tensor fxxPr, xx/Er and fyyPr, yy/Er in this test. Figure 4 shows the evolution of fxx and fyy for the case with pure absorption opacity. They are 1/3 initially when the specific intensities are isotropic. In the equilibrium state, fxx is increased to ∼0.37 while fyy drops to ∼0.315, although the gas temperature is spatially isotropic. Consistent with Figure 3, the difference between fxx and fyy in the Eulerian frame is caused by the beaming of the fluid velocity. The degree of anisotropy is $\sim \mathcal {O}(v/{\mathbb {C}})^2$ in this thermal equilibrium case (Mihalas & Mihalas 1984).

Figure 4.

Figure 4. Histories of the xx and yy components of the Eddington tensor for the test described in Section 5.2 with pure absorption opacity.

Standard image High-resolution image

5.3. Non-LTE Atmosphere

The steady state solution in a scattering opacity-dominated atmosphere is used to test the short characteristic module described in Davis et al. (2012), which solves the time-independent transfer equation and finds the solutions via iterations. This test is useful as it covers the transition from optically thick LTE to optically thin non-LTE regimes within the atmosphere. It also demonstrates that steady state solution can be achieved by solving the time-dependent RT equations.

The simulation domain is a cubic box with x × y × z ∈ (− 0.5, 0.5) × (− 0.5, 0.5) × (− 10, 10). The spatial resolution is fixed to be 16 × 16 × 1280 for the x, y, and z directions, respectively. Density of the atmosphere is chosen to be an exponential profile along vertical direction ρ(x, y, z) = 10−3exp (− z + 10). Gas temperature is fixed to be 1 everywhere and flow velocity is zero everywhere. Absorption opacity is σa = epsilonρ while the scattering opacity is σs = (1 − epsilon)ρ. The parameter epsilon is the destruction parameter used in Davis et al. (2012), which is a constant here. If the Eddington tensor is fixed to be $1/3{\sf I}$, then the analytic solution for the radiation energy density is (Equation (30) of Davis et al. 2012)

Equation (33)

where τ is the optical depth measured from the top z = 10. In order to be close to the Eddington approximation, we use one angle per octant. Periodic boundary conditions are used along the x and y directions. At the bottom of the simulation box, we copy the specific intensities along all angles from the last active zones to the ghost zones. At the top, only outgoing specific intensities are copied from the last active zones to the ghost zones while the incoming specific intensity is set to be zero in the ghost zones. The initial specific intensities are set to be 1/(4π) for all angles everywhere. The hydrodynamical equations are not evolved in this test. Because of the vacuum boundary condition at the top, the radiation energy density will decrease until cooling is balanced by the thermal emission in the equilibrium state. The smaller epsilon is, the smaller Er is at the top. The solutions from our code at the equilibrium state for three different values of epsilon are shown as the solid black lines in Figure 5. Compared with the analytical solutions shown as the dashed red lines, they agree very well when epsilon changes from 0.1 to 10−4.

Figure 5.

Figure 5. Comparison of the profiles of the radiation energy density between the numerical (black solid lines) and analytical solutions (red dashed lines) for the non-LTE atmosphere test described in Section 5.3. The value of epsilon is labeled above each line.

Standard image High-resolution image

5.4. Crossing Beams in Vacuum

Unlike the short characteristic module used in Davis et al. (2012), specific intensities are decomposed along each axis for the transport step. By propagating two beams of photons in vacuum, we demonstrate that this approach still allows accurate propagation of photons in a direction oblique to the grid.

We setup a 2D domain with box size Lx = 1, Ly = 4. Periodic boundary conditions are used along the x direction. Both absorption and scattering opacity are zero everywhere. We inject two beams from the bottom at 45 degrees with respect to the +x and −x axes, respectively. Because of the periodic boundary conditions, the two beams will cross each other and finally escape from the top. The distributions of Er after the two beams have escaped for two different spatial resolutions are shown in Figure 6. Compared with Figure 6 of Davis et al. (2012), our approach gives similar results to the short characteristic method with quadratic interpolation. There is a small amount of numerical diffusion in the beam, although total flux remains conserved. The numerical diffusion is reduced with increasing resolution, which reflects convergence of the solution.

Figure 6.

Figure 6. Distribution of radiation energy density for two beams of photons crossing vacuum, as described in Section 5.4. The left panel is the result for a resolution of Nx = 128, Ny = 512 while this resolution is doubled for both directions in the right panel.

Standard image High-resolution image

As an aside, we note that M1 methods fail this test as the two beams of radiation merge into one at the point where they cross.

5.5. Dynamic Diffusion

As described in the Appendix of Jiang et al. (2013b), the most useful test for our treatment of the transport step described in Section 4.2 is the dynamic diffusion test in an optically thick medium with pure scattering opacity. We setup a one-dimensional domain with Lx = 2. The density, temperature and flow velocity are all set to be 1. All the hydro quantities are uniform over the whole simulation domain and they do not evolve in the test. The dimensionless speed of light is ${\mathbb {C}}=10$. The value of ${\mathbb {P}}$ does not affect the test. The scattering opacity σs is a parameter that controls the diffusion coefficient $D\equiv {\mathbb {C}}/(3\sigma _s)$. We use 128 grid points and periodic boundary conditions.

The initial profiles of radiation energy density and flux for the region x ∈ (− 0.5, 0.5) are

Equation (34)

For other positions, Er and Fr are fixed to be exp (− 10) and $4vE_r/(3{\mathbb {C}})$. We will only focus on the evolution of the region $x\in (-0.5+\sqrt{Dt}, 0.5-\sqrt{Dt})$, as this part will not be affected by the finite domain of the simulation box. In order to be consistent with the Eddington approximation, so that analytical solutions can be used for comparison, we only use one angle per octant. Therefore the specific intensities are uniquely determined by Er and Fr.

In the diffusion limit in the Eddington approximation, the profile of Er at time t should be (Sekora & Stone 2010; Jiang et al. 2013b)

Equation (35)

Comparisons between the numerical and analytical solutions at three different times for two different values of opacity σs are shown in Figure 7. This figure shows that our algorithm can calculate the diffusion and advection processes accurately for a wide range of opacity. In order to show the necessity of separating the diffusive and advective terms as described in Section 4.2, we repeat the test with optical depth per cell τs = 625 and use the original transport scheme described by Stone & Mihalas (1992). The result is shown in Figure 8. Compared with the left panel of Figure 7, the numerical diffusion rate is clearly dominant over the physical diffusion rate and our treatment shows significant improvement.

Figure 7.

Figure 7. Profiles of radiation energy density Er for the dynamic diffusion tests described in Section 5.5. Left: results when optical depth per cell is τs = 625. The black, red, and green points are simulation results at times t = 1, 2, 3, respectively. Right: results when optical depth per cell is reduced to τs = 6.25. The time for the black, red, and green dots are 0.4, 0.8, 1.6, respectively. The corresponding lines in the two panels are analytical solutions given by Equation (35).

Standard image High-resolution image
Figure 8.

Figure 8. Same as the left panel of Figure 7 but for the case when the original transport scheme given by Stone & Mihalas (1992) is used.

Standard image High-resolution image

5.6. Linear Wave Convergence Test

In order to test the full radiation hydrodynamic algorithm, we carry out the linear wave test in a 2D domain based on the dispersion relation given by Jiang et al. (2012). We setup a uniform medium with background state ρ = T = P = 1 and γ = 5/3. Radiation energy density Er = 1 and radiation flux is zero in the background state. In order to be consistent with the Eddington approximation used to calculate the dispersion relation, we use one angle per octant. The specific intensity in the background state is I = 1/(4π). We fix the dimensionless speed of light to be ${\mathbb {C}}=10$. The box size is Lx = 1 and Ly = 1 and the wave vector is aligned with x axis in order to calculate the propagation speed and damping rate more easily. As the hydrodynamics algorithm is second-order accurate, while the RT module is only first-order accurate due to operator splitting, we expect that the overall convergence rate for the whole code will depend on the parameter regime. For gas pressure dominated or optically thin regimes it will be second-order accurate, while for optically thick radiation pressure dominated regimes it will be first-order accurate. This is confirmed in Figure 9. We show the change of L1 error with spatial resolution for two sets of parameters $\tau _a=0.01, {\mathbb {P}}=1$ and $\tau _a=10, {\mathbb {P}}=10$. When the optical depth per wavelength is only 0.01, the code is second-order accurate. When the optical depth per wavelength is increased to 10 and radiation pressure is larger than gas pressure, the code is first-order accurate.

Figure 9.

Figure 9. Convergence of L1 error with resolution in the linear wave tests for two different set of parameters as labeled in the figure. The solid and dashed blue lines are indications of first-order and second-order convergence for the optically thick and optically thin cases respectively.

Standard image High-resolution image

In Figure 10, we compare the wave propagation speed and damping rate from our code with the analytical solutions as given in the Appendix B of Jiang et al. (2012) for optical depth per wavelength from 0.01 to 100 and ratio between radiation pressure and gas pressure from 0.01 to 100. In order to calculate the phase velocity and damping rate from our code, we evolve the linear wave for one period and calculate the Fourier transform of the density profile at the end of the simulation with background state subtracted. This is compared with the Fourier transform of the initial density profile with background state subtracted. We identify the positions of the component with maximum power in the phase space to be ϕ0 and ϕt for the initial and final solutions. The values of maximum power are A0 and At, respectively. Therefore, the difference between the phase velocity from the code and the analytical solution is δv = (ϕt − ϕ0)/(kT), where k = 1/(2π) is the wave number and T is the period. The damping rate in the code can be calculated as ln (A0/At)/T. The numerical values shown in Figure 10 are calculated with 512 grid points per wavelength. With this spatial resolution, our code can get the phase velocity and damping rate accurately over all the parameters we have explored. As ${\mathbb {C}}$ is only 10, which is the regime that the algorithm will be most useful, we can easily be in the regime where photons are well-coupled to the gas, and radiation pressure contributes a significant fraction of the restoring force for radiative acoustic modes. This is the case when τa > 10 with ${\mathbb {P}}=1$ and ${\mathbb {P}}=10$ in Figure 10, as the phase velocity is larger than the adiabatic sound speed for these cases. Again, our code captures these modes accurately.

Figure 10.

Figure 10. Comparison of the numerically calculated phase velocity (top panel) and damping rate (lower panel) of linear acoustic waves with the analytical solution for a wide range of optical depth per wavelength and three different values of ${\mathbb {P}}$. The phase velocity is scaled to the isothermal sound speed and ${\mathbb {C}}=10$ for all the tests. The stars represent quantities measured from simulations as described in Section 5.6 while the lines are analytical solutions based on the dispersion relation given by Jiang et al. (2012). The code gets the phase velocity and damping rate accurately for all the parameters we have explored.

Standard image High-resolution image

5.7. Radiation Shock Test

The effects of radiation on the structure of strong shocks have been used as standard tests for many radiation hydrodynamic codes (González et al. 2007; Sekora & Stone 2010; Zhang et al. 2011; Jiang et al. 2012). However, because of the complexity of the shock solutions, the numerical solutions are either compared with simple analytical estimates (Vaytet et al. 2013), or semi-analytical solutions based on the Eddington approximation in more quantitative tests (Lowrie & Edwards 2008; Jiang et al. 2012). Recently, McClarren & Drake (2010) have pointed out that the radiation field near the Zel'dovich spike in subcritical shocks can be very anisotropic, which invalidates the use of the Eddington approximation, and may provides a good diagnostic to test the accuracy of more advanced RT algorithms.

Recently, the steady-state structure of radiation modified shocks at a variety of Mach numbers has been worked out without any assumption regarding the Eddington tensor by Ferguson (2014). We adopt these new solutions to test our full RT and hydrodynamics algorithms.7

We initialize the shock solutions in one dimension with dimensionless pre-shock parameters ρ0 = T0 = Er, 0 = 1 and $v_0=\mathcal {M}$, where the Mach number $\mathcal {M}$ controls the relative importance of radiation to gas pressure. The other dimensionless numbers are ${\mathbb {C}}=1.73\times 10^3$, ${\mathbb {P}}=10^{-4}$, and σa = 577.4. These values are the same as in Section 6.2 of JSD12, so that the radiation shock solutions can be directly compared. Gas temperature T is calculated as T = P/(0.6ρ) and γ = 5/3. We use 4096 grid points and 10 angles per octant for all the solutions. All quantities on the left boundary are fixed to the pre-shock parameters, while on the right boundary all quantities in the ghost zones are copied from the last active zone. The steady state numerical solutions can be compared with the initial conditions to see how well the code can hold the semi-analytical solutions. Our numerical solutions after three flow crossing times for $\mathcal {M}=1.2,\ 2,\ {\rm and}\ 3$ are shown as black dots in Figures 1112, and 13 while the semi-analytical solutions are shown as dashed red lines in each figure. The numerical solutions agree with the semi-analytical solutions very well for the three cases.

Figure 11.

Figure 11. Structure of a radiation-modified shock for Mach number $\mathcal {M}=1.2$. The dashed red lines are the semi-analytical solution by solving the time-independent radiation hydrodynamic equations while the black dots are the numerical results when the flow reaches steady state.

Standard image High-resolution image
Figure 12.

Figure 12. Same as Figure 11 but for Mach number $\mathcal {M}=2$.

Standard image High-resolution image
Figure 13.

Figure 13. Same as Figure 11 but for Mach number $\mathcal {M}=3$.

Standard image High-resolution image

In the case with $\mathcal {M}=1.2$, gas temperature increases monotonically from upstream to downstream. The fxx component of the Eddington tensor is close to 1/3 near the shock front, although it can be seen that fxx can be smaller than 1/3 in the immediate post-shock flow, as found by Sincell et al. (1999) and JSD12. When the Mach number is increased to 2 and then 3, radiation pressure downstream becomes significantly stronger and the Zel'dovich spike (Zel'Dovich & Raizer 1967) emerges. In Figure 13 with $\mathcal {M}=3$, not only does the gas temperature T form a spike near the shock front, but also the radiation temperature Tr. At the same time, the radiation field becomes very anisotropic as the peak of fxx differs from 1/3 by 50%. A similar spike in radiation temperature is evident in Figure 15 of JSD12 when the angular distributions of photons are calculated self-consistently with the VET approach. This feature is called "anti-diffusion" in McClarren & Drake (2010) because the direction of radiation flux at the shock front is along the same direction as the radiation energy density gradient. This is the opposite behavior to what is assumed in the diffusion approximation. It occurs because the RT equation requires ${{\boldsymbol F}}_r\propto -{{\boldsymbol \nabla}}\cdot {\sf P_r}=-{{\boldsymbol \nabla}}\cdot ({\sf f}E_r)$ in steady state. When the Eddington tensor has a strong spatial gradient as in the shock front, ${{\boldsymbol F}}_r$ is not necessarily in the same direction of $-{{\boldsymbol \nabla}}E_r$, as assumed in the diffusion approximation. These results point out that it is crucial to adopt algorithms that can treat the anisotropic nature of the radiation field accurately.

The anisotropic radiation field in our solution can also be demonstrated directly by plotting the specific intensities along different directions. Profiles of specific intensity along four different angles for the case with Mach number $\mathcal {M}=3$ are shown in Figure 14. The intensity along rays pointing in the −x direction is much larger than intensities in other directions in the upstream region. This is responsible for the pre-heating of the gas. The intensity along rays in the direction of the flow actually increase monotonically from upstream to downstream, which is quite different from the profile of Tr shown in Figure 13. The spike in radiation energy density near the shock front is dominated by the rays perpendicular to the flow direction. This is because just in front of the hot downstream gas, rays perpendicular to the flow direction have a longer path length through the narrow shell of hot gas, and therefore have proportionally more emitted photons than directions with shorter path lengths through the emission region. This is consistent with the fact that fxx < 1/3 in Figure 13 near the shock front.

Figure 14.

Figure 14. Spatial profiles of the specific intensities at four different angles for a radiation modified shock with Mach number $\mathcal {M}=3$. The angles labeled in each panel are with respect to +x axis. Note the radiation field is highly anisotropic.

Standard image High-resolution image

5.8. Shadow Test

The ability to capture shadows cast by an optically thick object in an optically thin environment requires propagating photons along different directions correctly. This test has been widely used to demonstrate the differences between FLD, M1, and RT algorithms based on short characteristics (Hayes & Norman 2003; González et al. 2007; McKinney et al. 2013, JSD12). Although the M1 method is able to capture the shadow formed by one beam, therefore demonstrating an advantage of M1 over FLD (González et al. 2007), it cannot propagate two beams correctly (McKinney et al. 2013). As our method directly solves for the specific intensity along different directions, it should be able to capture the shadow from multiple beams accurately, as was the case with the VET method in JSD12.

For this test, we set up a rectangular box of size (− 0.5, 0.5) × (− 0.3, 0.3) with dimensionless parameter ${\mathbb {C}}$ chosen to be 10 to speed up the calculation. The background medium has density ρ0 = 1 and temperature T0 = 1. Density inside the elliptical region r = x2/a2 + y2/b2 ⩽ 1 with a = 0.1 and b = 0.06 is ρ(r) = ρ0 + (ρ1 − ρ0)/[1  +  exp  (10(r − 1))], where ρ1 = 10ρ0. Gas temperature is set to be 1/ρ. Absorption opacity σa = T−3.5ρ2 is used in this test. Beamed photons with intensity I = 103.13 are injected from the left x boundary at angles ±15° with respect to the x-axis. One beam at −15° and another beam at 15° with the same intensity are injected along the top and bottom y boundaries respectively. The injected beam angles are chosen to directly correspond to rays in our angular grid. We use na = 12 with all the angles uniformly distributed in the 2D plane as described at the end of Section 3. The intensities in the ghost zones along the right x boundaries are copied from the last active zones. We use a resolution of 512 × 256 cells for this test. The hydrodynamical equations are not evolved (although see Proga et al. (2014) for the hydrodynamical evolution of an irradiated cloud computed using our VET method). Although we use different values of ${\mathbb {C}}$ compared with the shadow test shown in Section 6.5 of JSD12, all the other important dimensionless numbers and angles of the incoming intensities are the same. For example, the photon mean free path inside the cloud is only 3.2 × 10−6 of the horizontal size of the simulation box due to the low temperature and high density, while it is the same as the box size outside the cloud. Therefore, results from the two different RT algorithms can be directly compared. Radiation energy density, xx and yy components of the Eddington tensor after the photons have propagated through the simulation box are shown in Figure 15. Compared with Figure 19 of JSD12, the umbra and penumbra calculated by the two codes are indeed very similar. Note also the results differ significantly from those shown by McKinney et al. (2013) computed using the M1 method. In order to see the effects of angular resolution, we have also done another test with the total number of angles increased to na = 36 while the angles of incoming beams remain the same. The result is almost identical. This is not surprising as the radiation field is dominated by the two incoming beams. However, the reradiated emission from the cloud, which is three orders of magnitude smaller than the incoming radiation field, is better resolved with more angles.

Figure 15.

Figure 15. Shadows created by an optically thick cloud from radiation beamed in two directions ±15° with respect to the horizontal axis. From top to bottom, the three panels show radiation energy density Er, xx, and yy components of Eddington tensor. The umbra and penumbra behind the cloud are clearly visible.

Standard image High-resolution image

6. PERFORMANCE

The cost to solve the RT equations in our algorithm is linearly proportional to the total number of angles in each cell. The time spent in Step 2, Step 4, and Step 5 is roughly the same, when both absorption and scattering opacities are non-zero and the non-linear matrix in Step 4 can converge quickly. To test the performance of the code, we setup a 3D box with dimensionless density, pressure, radiation energy density all set to 1. We use 80 angles per cell, which are usually enough for the 3D applications we have studied. The initial intensities are isotropic while the flow velocity is zero initially. The other dimensionless parameters are ${\mathbb {P}}=1, \ {\mathbb {C}}=10$. The uniform medium is seeded with 10% random perturbations in density. The test is run on Stampede, which has Intel Xeon E5 (Sandy Bridge) nodes with core frequency 2.7 GHz and 2 GB memory per core. With 323 cells per core, the code is able to update N0 = 2.4 × 104 zones per second per core. With multiple cores, we define the efficiency to be the ratio between the average zones updated by one core per second and N0. The efficiencies of the code with total number of cores we use in Stampede for two different cases are shown in Figure 16. With the number of zones per core fixed to be 323, the parallel efficiency is more than 90% up to 4096 cores. As a comparison, Athena without RT can update ∼1 × 105 grid cells per second per core for 3D MHD simulations with an efficiency 90% up to 105 processors. Therefore, our RT algorithm slows down the code by a factor of ∼4 for 80 angles per cell but keeps a very similar parallel efficiency. This is because our explicit RT algorithm does not require iterations in the global domain. The memory requirement in our algorithm is also linearly proportional to the total number of angles. A core with 4 GB memory can fit ∼1000 angles per cell with double precision before reaching the memory limit.

Figure 16.

Figure 16. Weak scaling of the code measured on Stampede, for 323 zones per core (red line) and 163 zones per core (black line).

Standard image High-resolution image

7. SUMMARY

We have developed a new algorithm for radiation MHD based on solving the time-dependent RT equation to compute the specific intensity along discrete rays. Integration of the specific intensity over angles then yields the radiation energy and momentum source terms, which are coupled to the ideal MHD equations. We have tested the code extensively based on the suite of test problems used by JSD12.

Compared with commonly used methods for solving the radiation moment equations, such as FLD and M1, the most significant advantage of our algorithm is that we calculate the angular distribution of photons self-consistently. Therefore, we do not need any ad hoc closure relation as required in FLD and M1 methods. We expect our methods to be superior in regions where the photon mean free path becomes comparable to or larger than the characteristic scales of the fluid. Then the disparate contributions of multiple, non-local sources can give rise to complexity in the angular distribution of the photons that cannot be encapsulated using only a few of lowest order moments of the radiation field (Er, ${{\boldsymbol F}}_r$). We have shown results for a variety of tests that demonstrate the importance of the non-local and anisotropic properties of the radiation for the correct dynamics, for example, the structure of radiation-modified shocks, and the shadows cast by multiple sources of radiation.

The method described here can be considered an extension of previous algorithms that use the method of short characteristics to solve the time-independent RT equation (Hayes & Norman 2003; Davis et al. 2012), which is then used to calculate a VET to close the radiation moment equations (Stone et al. 1992, JSD12). The full angular distribution of the specific intensity is captured in both algorithms. However, the main advantages of the algorithm described here is that it can be used for dynamical problems where the dynamical time is not negligibly small compared to the light crossing time, and when the velocity dependent terms play an important role. Moreover, since the method developed here uses explicit differencing of spatial operators, it avoids the inversion of large matrices every time step, and therefore is much more efficient on modern parallel systems. As specific intensities in this algorithm are treated in a similar way as the hydrodynamic variables, it is straightforward to extend this algorithm to the curvilinear coordinate systems with non-uniform grids. Results using this algorithm on a cylindrical grid (Skinner & Ostriker 2010) will be presented in a future paper (Y.-F. Jiang et al. 2014, in preparation).

The algorithm developed in this paper is only applicable to non-relativistic flows. As GR is believed to be the correct description of the gravitational field near the event horizon of black holes, extending our algorithms to GR is the next step, and indeed is already underway. There are several aspects of the algorithm developed here that we expect will be crucial for the method in full GR. This includes the implicit treatment of source terms, including scattering, and the use of upwind monotonic interpolation methods that guarantee conservation of radiation energy and momentum to roundoff error.

The time step for stability with our algorithm is based on the light crossing time of each cell. This is very inefficient for systems in which the typical sound speed or flow velocity is much smaller than the speed of light. In the regime where the reduced speed of light approximation applies (Skinner & Ostriker 2013), it can be combined with our algorithm to increase efficiency. We have used our code to study the global structure of black hole accretion disks for different accretion rates at intermediate distances from the event horizon. Results from these simulations will be reported elsewhere.

We thank the anonymous referee for helpful comments that improved the paper. Support for this work was provided by NASA through Einstein Postdoctoral Fellowship grant number PF-140109 awarded by the Chandra X-ray Center, which is operated by the Smithsonian Astrophysical Observatory for NASA under contract NAS8-03060, and by NASA grant NNX11AF49G and NSF grant AST-1333612.

Footnotes

  • The definitions here differ from Equations (13)–(15) of Davis et al. (2012) by a factor of c.

  • For example, when $v/{\mathbb {C}}\sim 0.1$, the Lorentz factor is only 1.005 and relativistic effect is still negligible.

  • We thank Jim Ferguson for providing us his radiation shock solutions.

Please wait… references are loading.
10.1088/0067-0049/213/1/7