An Implicit Finite Volume Scheme to Solve the Time-dependent Radiation Transport Equation Based on Discrete Ordinates

Published 2021 April 1 © 2021. The American Astronomical Society. All rights reserved.
, , Citation Yan-Fei Jiang 2021 ApJS 253 49 DOI 10.3847/1538-4365/abe303

Download Article PDF
DownloadArticle ePub

You need an eReader or compatible software to experience the benefits of the ePub3 file format.

0067-0049/253/2/49

Abstract

We describe a new algorithm to implicitly solve the time-dependent, frequency-integrated radiation transport (RT) equation, which is coupled to an explicit solver for equations of magnetohydrodynamics (MHD) using Athena++. The radiation field is represented by specific intensities along discrete rays, which are evolved using a conservative finite volume approach for both Cartesian and curvilinear coordinate systems. All terms for spatial transport of photons and interactions between gas and radiation are calculated implicitly together. An efficient Jacobi-like iteration scheme is used to solve the implicit equations. This removes any time-step constraint due to the speed of light in RT. We evolve the specific intensities in the lab frame to simplify the transport step. The lab frame specific intensities are transformed to the comoving frame via Lorentz transformation when the source term is calculated. Therefore, the scheme does not need any expansion in terms of v/c. The radiation energy and momentum source terms for the gas are calculated via direct quadrature in the angular space. The time step for the whole scheme is determined by the normal Courant–Friedrichs–Lewy condition in the MHD module. We provide a variety of test problems for this algorithm, including both optically thick and thin regimes, and for both gas and radiation pressure-dominated flows to demonstrate its accuracy and efficiency.

Export citation and abstract BibTeX RIS

1. Introduction

The thermal properties of the gas are determined by emission, absorption, and scattering of photons, as well as transport of the radiation field through the gas. In certain conditions—for example, the flow around compact objects and in massive stars—the intense radiation field can be the dominant source of pressure force via the momentum exchange between photons and gas, which controls the dynamics of the system. Solving the radiation transport (RT) equation together with magnetohydrodynamic (MHD) simulations becomes a very important task in numerical simulations of various astrophysical systems (Teyssier 2015, and references therein).

The RT equation is typically much more expensive to solve compared with the cost of MHD simulations. The specific intensity, which is the fundamental quantity to describe the radiation field, is a function of time, spatial location, propagating direction, and frequency. Even when adopting the gray approximation (frequency-independent), resolving the angular distribution of photons is still harder to do compared with MHD. In addition, photons travel with the speed of light in the optically thin regime, which is much faster than the flow speed of many nonrelativistic systems, while in the very optically thick limit, the photon mean free path can be much smaller than any other length scale of interest. Capturing different limits of the RT equation self-consistently while still evolving the MHD equations efficiently can be challenging. For these reasons, different assumptions have been made to simplify the RT equation. One type of simplified approach is to take the moments of specific intensity and make certain assumptions to close the moment equations. Flux-limited diffusion (FLD) is a widely used method (e.g., Levermore & Pomraning 1981; Turner & Stone 2001; Krumholz et al. 2007; van der Holst et al. 2011) that assumes that the mean radiation energy density follows the diffusion equation with a modified diffusion coefficient to limit the effective photon speed to be smaller than the speed of light. This assumption is well known to have issues in the optically thin regime. But more important, in the regime with intermediate optical depth, when it is unclear whether diffusion approximation can be made or not, simulations adopting the FLD approximation can result in misleading conclusions (Krumholz & Thompson 2013) that will not be known until the results are compared with simulations with more accurate methods (Davis et al. 2014; Tsang & Milosavljević 2018; Smith et al. 2020). Another increasingly popular alternative is the M1 method (Dubroca & Feugeas 1999; Pons et al. 2000; González et al. 2007; Sa̧dowski et al. 2013; Skinner & Ostriker 2013; McKinney et al. 2014; Skinner et al. 2019), which evolves the zeroth and first moments of specific intensity with an assumed closure relation based on local radiation energy density and flux. It is often claimed that the M1 approach is accurate in both optically thin and optically thick regimes because it can handle the shadow cast by one beam of the radiation field. This is definitely incorrect, as the assumed closure relation in M1 can easily fail in other cases. For example, it will merge multiple beams of photons into one, since the radiation field is treated as another fluid in this method.

Other methods have been developed to solve the equation for specific intensities directly without assuming any closure relation. The Monte Carlo–based RT approach has been widely explored (Whitney 2011, and references therein) and is able to handle various radiative processes accurately. Some novel schemes have also been developed to reduce the noise and computational cost of this type of method in different regimes (Densmore et al. 2007; Steinacker et al. 2013; Roth & Kasen 2015; Foucart 2018; Tsang & Milosavljević 2018; Ryan & Dolence 2020; Smith et al. 2020). Another type of widely used method is based on discrete ordinates, or Sn , which solve the transport equation along discrete angles. In particular, the formal solution to the RT equation can be used as a closure to the radiation moment equation so that it can remove the limitations of FLD and M1. This variable Eddington tensor (VET) scheme has been used for a wide range of applications (Asahina et al. 2020; Davis et al. 2012; Gehmeyr & Mihalas 1994; Hayes & Norman 2003; Jiang et al. 2012; Stone et al. 1992). The key to this approach is that the full time-dependent evolution of radiation MHD is handled by the radiation moment equation, while the closure is given by the formal solution to the time-independent transport equation. Even though the RT equation is solved twice in different ways, it is often assumed that it will still be more efficient compared with solving the full time-dependent RT equation directly. In this paper, we show that it is actually possible to efficiently solve the full time-dependent RT equation in a finite volume approach with the computational cost comparable to or even better than VET in some cases. The finite volume approach also makes it much easier to use in curvilinear coordinates, which can be complicated for the VET scheme.

The transport term in the RT equation is easier to solve in the laboratory frame, while the interaction terms between radiation and gas are greatly simplified in the comoving frame of the fluid. For nonrelativistic systems, where the flow velocity v is much smaller than the speed of light c, the RT equation is typically simplified by transforming the source terms from the comoving frame to the laboratory frame only to certain orders of v/c (Mihalas & Klein 1982; Mihalas & Mihalas 1984). However, it has also been pointed out by Lowrie et al. (1999) that expansion only to the first order of v/c is not enough. Some second-order v/c terms are needed to get the correct asymptotic limit in different regimes, particularly the dynamic diffusion regime (Krumholz et al. 2007). We want to point out that these expansions can be avoided completely if the specific intensities are solved directly. We can apply the Lorentz transformation to connect the radiation source terms between different frames. Even for nonrelativistic systems, this approach is simple and accurate for all regimes and does not cause too much additional computational cost or complexity.

When the typical flow speed in the system is close to the speed of light, for example, around compact objects, it is more efficient to solve the transport term of the RT equation explicitly by limiting the time step based on the speed of light (Sa̧dowski et al. 2013; Jiang et al. 2014; McKinney et al. 2014; Anninos & Fragile 2020; Asahina et al. 2020). However, for a wide range of applications with nonrelativistic systems, it is necessary to solve the MHD equation explicitly while the RT equation is solved implicitly so that the time step is not limited by the speed of light. This is the approach adopted by most algorithms when the radiation moment equations are solved. When specific intensities are solved directly, the time-dependent term is typically neglected. There have been several attempts to solve the full time-dependent RT equations implicitly with mixed results (Stone & Mihalas 1992; Sumiyoshi & Yamada 2012). When the time step is much larger than the light-crossing time per cell, the challenge is to keep a good balance between the transport and source terms in all of the asymptotic regimes. This is because the RT equation is a simple advection equation in the optically thin regime, and it becomes a diffusion equation in the optically thick case. Advection will cause additional complexity. In this paper, we propose a fully implicit scheme that can get all of the regimes correctly.

This paper is organized as follows. In Section 2, we describe the equations to solve, particularly on how the Lorentz transformation is used for the velocity-dependent terms. The implicit discretization of the RT equation and detailed steps of the algorithm are described in Section 3. In Section 4, we show a set of test problems for our algorithm. Comparisons between our algorithm and some existing RT schemes, as well as future development, are discussed in Section 5.

2. Equations

The radiation MHD equations we solve are similar to what are used by Jiang et al. (2014). However, we do not expand the source terms in orders of v/c. We will describe the RT equations and how they are coupled to the MHD equations in the following subsections.

2.1. Equations for RT

We describe the radiation field using frequency-integrated specific intensity I in the lab frame, which is a function of time t, spatial location (x, y, z), and angular direction as defined by the unit vector n . The transport term is greatly simplified in the lab frame, while the source terms describing the interactions between radiation and gas are convenient in the comoving frame of the fluid. Therefore, we also adopt this mixed frame approach (Lowrie et al. 1999; Jiang et al. 2012, 2014). The RT equation we solve is (Mihalas & Klein 1982; Mihalas & Mihalas 1984)

Equation (1)

where c is the speed of light. The emissivity η and opacity χ are formally defined in the lab frame in the above equation. But the whole source term is calculated in the comoving frame via the approach below. Traditionally, in order to get the expression for the source term, expansion to the first order of ${ \mathcal O }\left(v/c\right)$ is usually used (Mihalas & Klein 1982), with some additional second-order terms (Lowrie et al. 1999; Krumholz et al. 2007; Jiang et al. 2014). Here we apply the Lorentz transformation to the specific intensities to completely avoid the need for expansion in terms of v/c. Although this may not sound necessary for nonrelativistic systems, this approach does not cause additional computational cost, and it results in a much cleaner calculation of the source terms.

The frequency-integrated specific intensities in the lab frame I( n ) are related to the comoving frame values ${I}_{0}({{\boldsymbol{n}}}^{{\prime} })$ via the Lorentz transformation as (Mihalas & Mihalas 1984)

Equation (2)

where v is the flow velocity, $\gamma \equiv 1/\sqrt{1-{v}^{2}/{c}^{2}}$ is the corresponding Lorentz factor, and ${{\boldsymbol{n}}}^{{\prime} }$ is the angle in the comoving frame given by

Equation (3)

We have defined ${\rm{\Gamma }}({\boldsymbol{n}},{\boldsymbol{v}})\equiv \gamma \left(1-{\boldsymbol{n}}\cdot {\boldsymbol{v}}/c\right)$ for convenience. We multiply the left-hand sides of the source term with Γ4 to get

Equation (4)

Here the frequency-integrated emissivity (η0) and opacity (χ0) in the comoving frame are related to η, χ as

Equation (5)

Under the assumption of local thermal equilibrium, we can write the frequency-integrated source term in the comoving frame as

Equation (6)

and the corresponding equation for gas internal energy Eg as

Equation (7)

Here ar is the radiation constant, and ρ and T are the gas density and temperature, which should be comoving frame quantities, in principle. When the RT algorithm is coupled to a Newtonian MHD solver, we do not distinguish gas quantities as well as time in the lab and comoving frames. The angular averaged mean intensity in the comoving frame J0 is defined as

Equation (8)

where Ω0 is the angular element in the comoving frame. The specific scattering opacity κs (with units of cm2 g−1) is assumed to be isotropic and does not change the mean photon energy such as electron scattering. The Rosseland mean absorption opacity is κa , and we take κδ P to be the difference between the Planck mean and Rosseland mean opacity. This is designed to ensure that when we integrate the zeroth and first moment of the comoving frame specific intensity over the angular space, we get the energy and momentum source terms $\rho \left({\kappa }_{a}+{\kappa }_{\delta P}\right)\left({a}_{r}{T}^{4}-4\pi {J}_{0}\right)$ and $-\rho \left({\kappa }_{s}+{\kappa }_{a}\right)\left(4\pi {{\boldsymbol{H}}}_{0}\right)$ with ${{\boldsymbol{H}}}_{0}\equiv \int {I}_{0}{{\boldsymbol{n}}}^{{\prime} }d{{\rm{\Omega }}}_{0}/\left(4\pi \right)$. This is consistent with the Rosseland and Planck mean opacities normally used for radiation moment equations. We multiply both sides of Equation (6) with Γ−4 to get the source term for lab frame specific intensities.

2.2. Equations of Radiation MHD

Photons are coupled to the gas via momentum and energy exchange. Since the total energy and momentum are conserved in the lab frame, we integrate the source terms for lab frame specific intensities over the angles to get the full radiation MHD equations as

Equation (9)

Here B is the magnetic field, P * ≡ (P + B2/2)I (with I the unit tensor), and the magnetic permeability μ is taken to be 1 in this unit system. The total gas energy density is

Equation (10)

We assume ideal gas so that the gas internal energy is related to gas pressure via the adiabatic index γg as Eg = P/(γg − 1) for γg ≠ 1. The gas temperature is calculated with $T=P/\left({R}_{\mathrm{ideal}}\rho \right)$, where Rideal is the ideal gas constant.

3. The Implicit Solver for the RT Equation

We will use the normal explicit Godunov scheme with constrained transport in Athena++ to evolve the MHD part of Equation (9). The time step is limited by the Courant–Friedrichs–Lewy (CFL) condition based on the maximum flow velocity, sound speed, and Alfvén speed. For the RT equation, we will solve all terms implicitly to remove the time-step constraint due to the speed of light. We will describe how we discretize and solve the RT equation in this section.

3.1. Spatial and Angular Discretization

The radiation field shares the same spatial grid as used for the gas quantities in Athena++. We label the three coordinates as x, y, z, which can be any orthogonal curvilinear systems such as Cartesian, cylindrical, or spherical polar coordinates. The total number of grid points along the three directions are Nx , Ny , and Nz , respectively. Notice that our finite volume scheme does not need the grid spacing to be uniform. What we need is the volume of each cell Vi,j,k for i ∈ [0, Nx − 1], j ∈ [0, Ny − 1], and k ∈ [0, Nz − 1], as well as surface areas of each cell facing the three directions Ax , Ay , and Az . All of the specific intensities are defined at the volume center of each cell.

We adopt the same angular discretization scheme as used by Davis et al. (2012) and Jiang et al. (2014) to be our default choice. 1 The angular unit vectors n are defined with respect to a global Cartesian coordinate, and they do not change with spatial locations. The three components of each angle ${\boldsymbol{n}}=\left({\mu }_{x},{\mu }_{y},{\mu }_{z}\right)$, as well as the quadrature weight wn , are determined based on the same algorithm developed by Bruls et al. (1999) following the original quadrature principle described in Carlson (1963). This set of angles ensures that the following relations are satisfied numerically:

Equation (11)

where N is the total number of angles.

Notice that these angles are always defined in the lab frame. The angles in the comoving frame are determined based on Equation (3), while the quadrature weight in the comoving frame is ${w}_{n}^{{\prime} }={{\rm{\Gamma }}}^{-2}{w}_{n}$. For an infinite number of angles, it can be shown that ∫Γ−2 dΩ0 = 1 for any flow velocity. However, this relation normally is not satisfied numerically to machine precision due to truncation errors with a finite number of angles. We correct this error by normalizing ${w}_{n}^{{\prime} }$ as

Equation (12)

Therefore, ${\sum }_{0}^{N-1}{w}_{n}^{{\prime} }=1$ is always satisfied. We find it is necessary to correct this angular truncation error to avoid an accumulative energy error when the flow velocity is not zero. The commonly used radiation energy density, radiation flux, and radiation pressure in the lab and comoving frames are just derived quantities from specific intensities as

Equation (13)

3.2. Discretized Equation for RT

The radiation energy source term can be very stiff in the optically thick regions, while the radiation momentum source term is typically not (Sekora & Stone 2010; Jiang et al. 2012). Therefore, when we solve the RT equation, we will assume that the flow velocity and gas density do not change. But we evolve the gas temperature with the radiation variables together to ensure that correct thermal equilibrium state is achieved. As higher-order spatial reconstruction without a flux limiter cannot guarantee total variation diminishing, which is necessary to avoid oscillatory behavior around local maxima or minima, we will only use first-order spatial reconstruction for our algorithm. The commonly used flux limiters will make the transport term nonlinear, which is very hard to solve implicitly. The algorithm will also be first-order accurate in time for RT to avoid oscillatory behavior during the temporal evolution of gas temperature and radiation energy density when the source term is very stiff.

For the given initial conditions ${I}_{n}^{m},{\rho }^{m},{T}^{m},{v}^{m}$ at time step m, the specific intensities ${I}_{n}^{m+1}$ with n ∈ [0, N − 1] at time step m + 1 are calculated based on the following N + 1 equations:

Equation (14)

where

Equation (15)

and Γn is calculated using vm for each angle. The opacities (κs , κa , and κδ P ) can be functions of local gas properties, in principle. But we will assume that they keep the values at time step m in the above equations. This is a set of fully coupled equations for gas temperature and specific intensities at all angles (via the terms with ${J}_{0}^{m+1}$) and spatial locations (via the transport term ${\boldsymbol{n}}\cdot {\boldsymbol{\nabla }}{I}_{n}^{m+1}$). These equations are only linear with respect to ${I}_{n}^{m+1}$ but not for Tm+1 due to the ${({T}^{m+1})}^{4}$ term. All of the transport and source terms are calculated using the variables at time step m + 1 to make the scheme unconditionally stable for any time step Δt. We will use an iterative approach to solve these equations as described below.

3.2.1. The Transport Term

Following Jiang et al. (2014), we can rewrite the transport term in the above equations as $c{\boldsymbol{\nabla }}\cdot \left({\boldsymbol{n}}{I}_{n}^{m+1}\right)$ with our default angular discretization because n does not change with spatial location. Then this term becomes the conservative format and can be calculated with the standard finite volume approach. For the interface at i − 1/2, j, k, we simply take the left and right states for ${I}_{n}^{m+1}$ to be ${I}_{n}^{m+1}(i-1,j,k)$ and ${I}_{n}^{m+1}(i,j,k)$, respectively. The same approach is used for other directions.

Special care is needed to determine the surface fluxes for each specific intensity. If we simply take the upwind fluxes as in Stone & Mihalas (1992), although the total energy is conserved, numerical diffusion can overcome the physical diffusion in the very optically thick regime. This can be easily demonstrated with only two angles in one dimension. If we assume the two angles have μx,1 > 0 and μx,2 < 0, the upwind fluxes at i − 1/2 will be c μx,1 I1(i − 1) and c μx,2 I2(i). Similarly, the fluxes at i + 1/2 for the two angles are c μx,1 I1(i) and c μx,2 I2(i + 1). The change of the mean radiation energy density w1 I1 + w2 I2 at cell i is then determined by cw2 μx,2 I2(i + 1) + cw1 μx,1 I1(i) − cw2 μx,2 I2(i) − cw1 μx,1 I1(i − 1). However, the radiation moment equation requires that it should be proportional to Fr (i + 1) − Fr (i − 1) = cw2 μx,2 I2(i + 1) + cw1 μx,1 I1(i + 1) − cw2 μx,2 I2(i − 1) − cw1 μx,1 I1(i − 1). The difference is essentially the truncation error, which is negligible in the optically thin regime. However, in the optically thick regime, when the radiation field is very close to being isotropic, ∣I2(i + 1) − I1(i + 1)∣ can be much smaller than ∣I1(i + 1) − I1(i)∣. This will cause the numerical flux due to the truncation errors to be much larger than the physical flux due to photon diffusion, which results in completely wrong numerical solutions. We have designed a modified HLLE flux to overcome the issue.

The dynamical diffusion regime also needs to be treated carefully, as discussed in Jiang et al. (2014). The numerical truncation error due to finite flow velocity can also overcome the physical diffusion when the optical depth per cell is very large, particularly with first-order spatial reconstruction. In principle, these numerical errors can be minimized with second- or third-order spatial reconstructions. However, it is not an option for our implicit scheme. Instead, we find that a specially designed HLLE-type flux can work very well in all regimes.

We rewrite the transport term as

Equation (16)

Here f is a function of optical depth per cell ${\tau }_{c}\,\equiv {\rho }^{m}\left({\kappa }_{a}+{\kappa }_{s}\right){\rm{\Delta }}L$, with ΔL to be a constant factor times the cell size. The function is chosen as

Equation (17)

This is designed to separate the advection term when the photon mean free path is not resolved (f ≈ 1). This is not necessary when the optical depth per cell is much smaller than 1 (f ≈ 0). Since our time step will satisfy the CFL condition for flow velocity, we can calculate the advective term ${\boldsymbol{\nabla }}\cdot \left(f{{\boldsymbol{v}}}^{m}{I}^{m+1}\right)$ explicitly, which means

Equation (18)

We use second-order spatial reconstruction for ${I}_{n}^{m}$ to get the values at the cell faces and then upwind flux based on f v m to calculate the term ${\boldsymbol{\nabla }}\cdot \left(f{{\boldsymbol{v}}}^{m}{I}_{n}^{m}\right)$.

For the interface at (i − 1/2, j, k), we take the left and right states for each specific intensity to be ${I}_{n,L}={I}_{n}^{m+1}(i-1,j,k)$ and ${I}_{n,R}={I}_{n}^{m+1}(i,j,k)$. Then we calculate the flux Fn (i − 1/2) at the interface for each angle based on a modified HLLE formula (Appendix). The key modification is to make sure the flux is the upwind value in the optically thin case and gets close to the centered value in the optically thick case based on the parameter τc . Similarly, we calculate the flux Fn (i + 1/2) for the interface (i + 1/2, j, k), as well as fluxes along other directions Fn (j − 1/2), Fn (j + 1/2), Fn (k − 1/2), and Fn (k + 1/2). Detailed expressions for the fluxes are given in the Appendix. Then the flux divergence term is calculated as

Equation (19)

Reorganizing all terms results in the following equation that we will apply our iterative solver:

Equation (20)

Expressions for the coefficients g1g7 are given in the Appendix. Notice that their values depend on the local optical depth τc , and they only need to be calculated once for each time step.

3.2.2. The Iterative Solver

We need to solve the N + 1 Equation (20) simultaneously to get the solutions for ${I}_{n}^{m+1}$ (n ∈ [0, N − 1]) and Tm+1. These equations are only linear for ${I}_{n}^{m+1}$. These terms can be rewritten as a sparse matrix with a size of N × Nx × Ny × Nz . If the specific intensities are ordered in a 1D array such that ${I}_{n}^{m+1}(i,j,k)$ is located at kNy Nx N + jNx N + iN + n, the matrix has the special structure that the diagonal direction are blocks with size N × N, which couple all of the angles at the same spatial locations. All other elements are only nonzero at locations corresponding to (n, i ± 1, j, k), (n, i, j ± 1, k), and (n, i, j, k ± 1). The terms related to Tm+1 are nonlinear, but Tm+1 at different spatial locations are completely decoupled.

This motivates us to solve these equations iteratively, similar to the Jacobi approach used for linear systems. For each cell, we take all of the specific intensities at different spatial locations to be the values from the last step. Then we go through each cell and solve the equations for all of the specific intensities at once. We update the off-diagonal terms with the updated specific intensities and continue this process until the changes of the specific intensities between neighboring steps are below a certain threshold.

Specifically, we solve the following equations iteratively:

Equation (21)

where l represents each step during the iterative process. At the beginning, we need an initial guess for specific intensities at the whole grid for all of the angles. This is usually taken to be the solution from the last time step or the initial condition. Then we go through all of the grid points to solve the above equation for all of the angles at each cell together in the following way.

For each step during the iteration, since all of the variables ${I}_{n,l-1}^{m+1}(i-1),{I}_{n,l-1}^{m+1}(i+1)$, ${I}_{n,l-1}^{m+1}(j-1),{I}_{n,l-1}^{m+1}(j+1))$, and ${I}_{n,l-1}^{m+1}(k-1),{I}_{n,l-1}^{m+1}(k+1)$ are already known, we can reorganize all of the equations we need to solve at each cell as

Equation (22)

Equation (23)

where Ic includes all other terms that are already known before step l. We multiply the left and right sides of the equation for each ${I}_{n,l}^{m+1}$ with ${{\rm{\Gamma }}}_{n}^{4}$ to get the equation for comoving frame specific intensities as

Equation (24)

We sum up the equations with the appropriate weight ${w}_{n}^{{\prime} }$ for each angle and get

Equation (25)

The scattering term drops out because it does not change the mean photon energy. Together with Equation (23), we can get the solution for ${J}_{0,l}^{m+1}$ and ${T}_{l}^{m+1}$ by performing a root finding for a fourth-order polynomial. Then the specific intensity for each angle ${I}_{0,n,l}^{m+1}$ can be calculated from Equation (24) independently, which can be converted to ${I}_{n,l}^{m+1}$ directly. In this way, the nonlinearity of the source term, as well as the coupling between different angles, all comes down to a fourth-order polynomial solver, which is trivial and independent of the number of angles. Therefore, the whole cost for each step during the iteration is linearly proportional to the number of angles. We continue the process for each grid and stop the iteration when

Equation (26)

is smaller than a threshold, typically 10−5.

3.2.3. The Radiation Source Terms

Since total energy and momentum are conserved in the lab frame, we use the conservation laws to determine the source terms we need to add to the gas. The radiation energy and momentum at the beginning of the time step are

Equation (27)

At the end of the time step, they can be calculated as

Equation (28)

Part of the change is due to the transport term, which can also be calculated as

Equation (29)

The source terms are then given by

Equation (30)

3.2.4. Additional Terms with Spherical Polar Angular System

The choice of the angular system is not unique. If the angles vary with spatial locations, additional terms will show up when we convert n · I to ${\boldsymbol{\nabla }}\cdot \left({\boldsymbol{n}}I\right)$. The RT equation with general angular systems is described in Davis & Gammie (2020). One special case that is useful for nonrelativistic systems is the angular system in spherical polar coordinates, which allows us to use this scheme in 1D or 2D spherical polar coordinates. Notice that our default angular system as described in Section 3.1 can also be used, in principle. The alternative angular system we describe here can be more convenient and efficient for certain applications.

In spherical polar coordinates, we define a set of angles with respect to the local coordinates (r, θ, ϕ) in each cell. We divide the longitudinal angles ψ uniformly from zero to 2π. For the polar angle ζ, it is uniformly divided in $\cos \zeta $ for ζ ∈ [0, π]. These angles point to different directions at different spatial locations, which introduce additional terms in the transport term as (Davis & Gammie 2020)

Equation (31)

All other terms are unchanged. The numerical scheme described in the previous sections remains the same, except that we need to calculate the change of I due to the new terms.

The new terms represent the transport of specific intensities in the angular space, which we can calculate implicitly as

Equation (32)

Here the variables with subscripts n − 1/2 and n + 1/2 represent the left- and right-hand sides in the angular space. We use first-order upwind values for ${I}_{n-1/2}^{m+1}$ and ${I}_{n+1/2}^{m+1}$. During each iteration, we modify the coefficient g1 in Equation (21) to include additional contributions for ${I}_{n,l}^{m+1}$ from this term. For all other specific intensities with different angles in the above equation, we use values from the last iteration, which are added to the right-hand side of Equation (21). We find it necessary to include all of the terms during the iterative process in order to maintain a balance between all of the transport and source terms.

3.3. Algorithm for the Full Radiation MHD Equation

The implicit solver is coupled to the two-step van Leer MHD solver in Athena++ (Stone et al. 2020). We will not repeat the details of the Godunov scheme with constrained transport for MHD here. Instead, we just outline the steps of the full algorithm.

  • (a)  
    Determine the time step Δt based on the flow speed, sound speed, Alfvén speed, and cell sizes with CFL number 0.4.
  • (b)  
    Update the gas quantities and magnetic field for a half time step Δt/2 with the MHD solver in Athena++.
  • (c)  
    Evolve the radiation field for a half time step Δt/2 as described in the previous section to determine the energy and momentum source terms Sr (E) and S r ( P ) (Equation (30)). Add these terms to the gas momentum and total energy.
  • (d)  
    Apply the MHD solver for a full time step Δt using the partially updated variables at Δt/2.
  • (e)  
    Repeat the implicit solver of the radiation field for a full time step Δt and add the energy, as well as momentum source terms, to the gas.
  • (f)  
    Continue the above steps until the end of the simulation.

4. Tests of the Algorithm

The algorithm we developed here can, in principle, work in a wide range of parameter space in terms of optical depth and ratio between radiation pressure and gas pressure, since no approximation is made when we solve the transport equation. When the time step is made sufficiently small, the algorithm can also be reduced to the explicit scheme as described by Jiang et al. (2014). However, in practice, convergent properties for our iterative scheme can be very problem-dependent. We will repeat most of the tests done by Jiang et al. (2012, 2014) to explore the accuracy and efficiency of our algorithm. Unless otherwise specified, we will assume the temperature, density, and length units to be T0, ρ0, and L0, respectively. The velocity unit v0 is chosen to be the isothermal sound speed corresponding to the temperature T0, and the time unit is given by L0/v0. Radiation energy density is scaled to ${a}_{r}{T}_{0}^{4}$, and radiation flux is scaled to ${{ca}}_{r}{T}_{0}^{4}$. Solutions given in the dimensionless format can be converted to any unit system given the two dimensionless parameters ${\mathbb{C}}\equiv c/{v}_{0}$ and ${\mathbb{P}}={a}_{r}{T}_{0}^{4}/\left({\rho }_{0}{R}_{\mathrm{ideal}}{T}_{0}\right)$ (Jiang et al. 2012).

4.1. Thermal Equilibrium in a Uniform Medium

To test our treatment of the source term, we set up a uniform box in 2D covering the region [0, 1] × [0, 1]. The box is initialized with a uniform density ρ = 1 and gas temperature T = 1. The radiation field is initialized isotropically with the mean energy density Er = 100. We fix the two dimensionless parameters ${\mathbb{P}}$ and ${\mathbb{C}}$ to be 1 and 100, respectively. We use 32 grid points for both directions. A constant absorption opacity ρ κa = 100 is adopted for the test. The typical thermalization timescale is then $1/\left({\mathbb{C}}\rho {\kappa }_{a}\right)={10}^{-4}$, while the time step we use is roughly 0.001. Therefore, in one time step, the system reaches the correct thermal equilibrium state and stays there, as shown in the left panel of Figure 1. The equilibrium state also agrees with the analytical solution very well as constrained by the total energy conservation. During the thermalization process, the algorithm can also keep the sign of Er ar T4 so that there is no oscillatory behavior as a function of time, which can happen for high-order time integrators when the time step is much larger than the thermalization timescale. As another test, we change the initial condition to be T = 100, Er = 1, and ρ κa = 1 so that the gas is much hotter than the equilibrium state in this case. We can still get the correct equilibrium state even though there is a huge difference between ar T4 and Er initially, as shown in the right panel of Figure 1.

Figure 1.

Figure 1. Histories of Er and ar T4 when gas and radiation relax to the thermal equilibrium state from static and uniform initial conditions. The left and right panels show cases with different relative values between ar T4 and Er . The time unit is t0 = 1/(c ρ κa ) in the two plots. The dotted blue lines indicate the analytical solution during the thermal equilibrium state.

Standard image High-resolution image

Our treatment of the source term is very similar to the scheme as described in Jiang et al. (2014), where the flux divergence term is calculated explicitly. However, there are nontrivial differences for the term n · I, even for the case with a uniform spatial distribution. When this term is calculated using the variables from the last time step, it is guaranteed to be zero to the level of the round-off error, as there is no spatial gradient at each step. This is not the case for the fully implicit scheme. During each cycle of the iteration when the gradient is calculated for each cell, variables in the neighboring cells are taken from the last iterative step while we use the values from this step for the current cell. Before the system reaches the equilibrium state, the flux divergence term is actually not zero. After the solution converges, we recover the same solution as given by the explicit scheme with the accuracy set by the tolerance level. The Jacobi-like iterative scheme we adopt also guarantees that all of the cells are treated in the same way during each iteration. Therefore, we do not generate any artificial spatial gradient during the iteration.

We have also tested the velocity-dependent terms by giving the gas a uniform horizontal velocity, vx = 3. Specific intensities are initialized isotropically in the lab frame with the mean energy density Er = 1. The initial gas temperature and density are T = 1 and ρ = 1, respectively. We choose $\rho {\kappa }_{a}=1,{\mathbb{P}}=1$ and ${\mathbb{C}}=100$ for this test and use 12 angles per cell. The system settles down to a steady state with gas velocity reduced to vx = 2.956 as a small fraction of gas momentum is transferred to photons. The horizontal lab frame radiation flux in the steady-state Fr,x is very close to vx (Er + Pr,xx ), which is the value given by the first-order expansion in terms of v/c in radiation moment equations (Lowrie et al. 1999), since ${v}_{x}/{\mathbb{C}}$ is only 3% in this test. During this process, the change of kinetic energy is converted to radiation energy and lab frame Er = 1.13 in the steady state. The specific intensities can also be compared with the analytical values directly, which are shown in Figure 2. In the steady state, the radiation field is isotropic in the comoving frame. Angular distribution of specific intensities in the lab frame is then determined by the Lorentz transformation (Equation (2)). The numerical solution agrees with the analytical values very well.

Figure 2.

Figure 2. Angular distribution of the lab frame specific intensities in the steady state for a moving uniform gas, as described in Section 4.1. The black and blue lines connect the origin and points (4π μx I, 4π μy I) for the 12 angles we have in the numerical solution. All angles represented by the blue lines have μz = 0.333, while the angles represented by the black lines have μz = 0.882. The dashed blue and black circles represent analytical values for all angles (μx , μy ) with the same corresponding μz , respectively.

Standard image High-resolution image

Notice that the radiation field is not isotropic in the lab frame, and the Eddington tensor is Pr,xx /Er = 0.417. This will be different from the Eddington tensor returned by the VET method for this case, since the short characteristic algorithm typically neglects the velocity-dependent terms, and it will return an Eddington tensor 1/3 I in the lab frame.

4.2. Crossing Beams in Vacuum

Our iterative scheme is typically easier to converge when the source term dominates over the transport term, because this means the diagonal coefficients in the resulting matrix of Equation (20) are larger than the off-diagonal one. The most difficult scenario is the transport of photons through a medium with zero opacity, where all of the source terms are zero and we only iterate over the transport term. To show how the algorithm works in this case, we inject two beams of photons from the bottom of a box covering the region [−0.5, 0.5] × [−2, 2]. At x = ±0.1, y = −2, the specific intensities with μx = ±0.577, μy = 0.577 are set to be 0.8, while the specific intensities along the other angles are zero. All of the intensities inside the box are also set to zero initially. The box is periodic along the x-direction and outflow at the top. The opacity coefficients of the gas are set to zero, and the gas does not evolve in this test. The spatial resolution is 64 × 256 for the horizontal and vertical directions, and we use four angles per cell. The time step is 4 × 10−3, which is also the light-crossing time across the vertical direction of the box. During the first step, it takes 100 iterations to reach the relative error of 10−3, which declines very slowly with more iterations. After one step, the two beams have crossed the whole simulation box. In about 10 time steps, the system reaches a steady state, and the spatial distribution of Er is shown in the left panel of Figure 3. Compared with the same test done by Jiang et al. (2014), the solution is very similar to the case with first-order spatial reconstruction but more diffusive compared with the solution using second-order spatial reconstruction. This is expected, as our implicit algorithm only uses first-order spatial reconstruction. The overall cost of the implicit algorithm is also comparable to the cost if the transport equation is solved explicitly for this case, because the number of iterations we need for convergence is now comparable to the ratio between the speed of light and the sound speed. Another reason that this test requires a lot of iterations for convergence is that the initial condition is far away from the steady-state solution. The injected photons at the bottom boundary need to be communicated with the whole simulation box during the iterations. However, a multigrid technique can significantly speed up the convergence in this case because the information at the boundary can propagate to the domain much faster at lower resolution levels.

Figure 3.

Figure 3. Spatial distribution of mean radiation energy density Er after two beams of photons propagate through the 2D box with zero opacity. The two beams are injected from x = ±0.1, y = −2 with angles μx = ±0.577, μy = 0.577. The left and right boundaries are periodic, while the two beams leave the box from the top. The left panel is the case with uniform resolution, while static mesh refinement is used in the right panel as indicated by the overplotted grid lines.

Standard image High-resolution image

Our algorithm is a finite volume scheme, which evolves the specific intensities using fluxes at cell faces as other cell-centered variables such as density in Athena++. Therefore, the existing mesh refinement module in the code (Stone et al. 2020) can be directly used for our RT algorithm. One example is shown in the right panel of Figure 3. The setup is the same as the left panel except that we refine the region [−0.5, 0.5] × [−1, 1] with two levels of refinements. Photons can cross the refinement boundaries smoothly without any numerical artifacts.

4.3. Shadow Test

One widely used test to demonstrate the difference between solving the angular resolved RT and radiation moment equations based on simplified assumptions of the closure relation is to capture the shadow cast by an optically thick cloud with beams of photons (Hayes & Norman 2003; González et al. 2007). Diffusion-like approximation will always send photons to the region where the radiation energy density gradient exists and thus cannot keep the shadow. Other approximations that treat the radiation field as a fluid (such as M1; González et al. 2007; McKinney et al. 2014) have their own caveats, such as artificially merging photons coming from different directions. Our implicit scheme should get the correct shadows, as we still solve the specific intensities along different directions independently.

We used the same setup as in Jiang et al. (2012, 2014) for direct comparison. The simulation domain covers the Cartesian box [−0.5, 0.5] × [−0.3, 0.3] with resolution 512 × 256. We use 40 angles per cell for the 2D simulation. The gas density has the distribution $\rho (x,y)=1+9/\left[1+\exp \left[10\left({\left(x/0.1\right)}^{2}+{\left(y/0.06\right)}^{2}-1\right)\right]\right]$, while the temperature T is set to achieve a constant gas pressure P = 1 for the whole box. We use pure absorption opacity κa = ρ T−3.5 so that the total optical depth across the box in the hot gas around the cloud is only 1, while the optical depth across the cloud is more than 105. For the left boundary, specific intensities along the directions ±15° with respect to the horizontal axis have a fixed value of 103.13, but all others are set to zero. For the right boundary, outgoing specific intensities are just copied from the last activated zones to the ghost zones, while incoming specific intensities are zero. A periodic boundary condition is used for the top and bottom boundaries. We choose the dimensionless speed of light to be ${\mathbb{C}}=1.9\times {10}^{5}$, which does not affect the steady-state solution. All specific intensities are initialized to zero, and we keep the gas quantities fixed for the shadow test. It takes about 1000 iterations to reach a relative error of 10−6 with three time steps, and the radiation quantities are very close to the steady-state values across the whole simulation box. The spatial distributions of the mean radiation energy density Er and the components of the Eddington tensor fxx and fyy are shown in Figure 4. Our implicit algorithm gets the umbra and penumbra correctly, and the results are very similar to the solutions returned by the explicit scheme as shown in Jiang et al. (2014), as well as the VET method as described by Jiang et al. (2012).

Figure 4.

Figure 4. The top panel shows the distribution of radiation energy density Er after two beams of photons pass an optically thick cloud, which is located at the center of the box as described in Section 4.3. The middle and bottom panels show the xx and yy components of Eddington tensors fxx and fyy , respectively.

Standard image High-resolution image

One great advantage of our implicit algorithm is that it can also capture the time-dependent evolution of the radiation field efficiently, even though the speed of light is 1.9 × 105 times the typical sound speed. To demonstrate that our algorithm can also capture the full dynamical evolution of the cloud, we use the same setup as in the shadow test but evolve the hydrodynamic quantities with the radiation field together. We choose the temperature scale such that ${\mathbb{P}}={10}^{-7}$ so that the radiation pressure of the injected photons from the left boundary is about 10−3 of the initial gas pressure. Notice that the static shadow test is independent of this ratio. The parameter is also chosen to match the same experiment done by Jiang et al. (2012). An outflow boundary condition is used for the hydrodynamic variables at the left and right boundaries, while a periodic boundary is used for the top and bottom. The typical sound-crossing timescale across the box is t0 = 1, while the light-crossing time in the low-density gas is ≈ 5.2 × 10−6 t0. The photon diffusion timescale across the cloud is comparable to t0. Since the effective temperature of the incoming radiation field is larger than the temperature of the cold gas by a factor of 30, the gas will be heated up in the timescale of 2 × 10−5 t0. The density distributions of the cloud at three different times t = 0.06t0, 0.1t0, and 0.16t0 are shown in Figure 5. The cloud is initially heated up at the surface of the left side. The heated gas drives shocks into the cloud, and some gas is also evaporated simultaneously. The shock propagates inside the cloud and eventually gets destroyed. The overall evolution is very similar to the results shown by Jiang et al. (2012) and Proga et al. (2014), despite some small differences of the detailed structures. Compared with the VET scheme, there is a subtle difference in the equations that are solved. The VET scheme typically calculates the Eddington tensor at the beginning of each time step, which is then held fixed when the radiation moment equations and hydrodynamic equations are evolved for one time step. The algorithm developed here solves the specific intensities implicitly with the same time evolution as the hydrodynamic variables. If we integrate the specific intensities over the angular space, we effectively evolve the radiation moments using the Eddington tensor determined at the end of each time step, consistent with the implicit update of the radiation field. This will not make any difference for steady-state solutions or if the time step is sufficiently small. However, when the time step is much larger than the light-crossing time for each cell, a change of the Eddington tensor due to time evolution of the radiation field within one time step may not be negligible. Future studies are needed to quantify the difference.

Figure 5.

Figure 5. Density evolution of an optically thick cloud irradiated by two beams of photons from the left boundary. The three snapshots are shown at times 0.06t0, 0.1t0, and 0.16t0 from top to bottom, where t0 is the sound-crossing time across the whole box horizontally in the low-density gas.

Standard image High-resolution image

4.4. Static and Dynamic Diffusion

Photon diffusion in the optically thick regime, which is easy to solve with the classical diffusion approximation by design, turns out to require careful treatment when the full time-dependent transport equation is solved. This is because in the very optically thick regime, the numerical diffusion associated with the standard HLLE solver can be much larger than the physical diffusive flux (see the Appendix of Jiang et al. 2013). To demonstrate that our treatment of the transport term as described in Section 3.2.1 is sufficient to capture the photon diffusion correctly, we set up a radiation field with mean energy density ${E}_{r}(x)=\exp \left(-40{x}^{2}\right)$ in the box $x\in \left(-0.5,0.5\right)$. For ∣x∣ > 0.5, we set ${E}_{r}=\exp \left(-10\right)$. We use 256 grid points for the whole simulation box (−1, 1) and two angles per cell so that the Eddington tensor is always one-third. An outflow boundary condition is used for this test. The gas has a constant scattering opacity ρ κs = 4 × 104, and we do not evolve the gas quantities for this test. We choose the dimensionless speed of light to be ${\mathbb{C}}=10$. The evolution of Er can be described by the solution to the diffusion equation as (Sekora & Stone 2010; Jiang et al. 2014)

Equation (33)

where $D\equiv {\mathbb{C}}/(3\rho {\kappa }_{s})$ is the diffusion coefficient. The specific intensities are initialized isotropically with the mean energy density matching the initial profile of Er . Profiles of Er at three different times from the numerical solution are shown in Figure 6 and match the analytical solution very well. Notice that because we do not set the boundary condition to match the diffusion solution exactly, we can only compare the region roughly $\sqrt{{Dt}}$ away from the boundary. We have also tried cases with larger opacity, and our algorithm can still get the correct solution. However, we need to use a larger value of the parameter τc (Equation (17)) to get the same accuracy with a larger κs .

Figure 6.

Figure 6. Profiles of radiation energy density Er at three different times corresponding to $\sqrt{{Dt}}=0.13,0.18,0.22$ from an initial Gaussian profile, as indicated by the dotted black line. The diffusion coefficient is $D={\mathbb{C}}/\left(3\rho {\kappa }_{s}\right)=8.33\times {10}^{-5}$ for this test. The solid lines are numerical solutions, while the dashed lines are analytical solutions to the diffusion equation.

Standard image High-resolution image

Another important regime is dynamic diffusion, where the photons are advected with the flow while diffusion happens. We use a similar setup as for the static diffusion case but extend the simulation domain to (−10, 10) with 1280 grid points. A periodic boundary condition is used so that the photons are not advected out of the box. We give the flow a constant velocity, v = 1. The dimensionless speed of light is also increased to ${\mathbb{C}}=1000$ for this test so that the typical diffusion speed is not negligible compared with the advection speed. Profiles of the mean radiation energy densities at time t = 4, 8, and 16 are shown as the solid lines in Figure 7. The analytical solutions can also be estimated by replacing the position x in Equation (33) with xvt to the first order of v/c, which is 10−3 in this test. The analytical solutions are shown as the black dashed lines in Figure 7, and they match the numerical solution very well.

Figure 7.

Figure 7. Diffusion of photons in a moving background as described in Section 4.4. The gas has a constant scattering opacity ρ κs = 4 × 104 and velocity v = 1, while the speed of light is 103 in this test. The colored solid lines are numerical solutions at times t = 4, 8, and 16, while the corresponding analytical solutions are indicated by the black dashed lines. The dotted line at x = 0 is the initial profile.

Standard image High-resolution image

4.5. Non-LTE Atmosphere

The test of a uniform temperature, scattering-dominated atmosphere done by Davis et al. (2012) is useful to show how our iterative scheme performs when there is a large dynamical range of radiation energy density with both optically thin and optically thick regions. In particular, we can check the performance of our iterative scheme for problems that can be solved efficiently with the classical short characteristic method. We use 1280 grid points covering a simulation domain x ∈ [−10, 10] in 1D. The gas density follows the exponential profile $\rho ={10}^{-3}\exp (10-x)$, and the gas temperature is fixed to be Ti = 1. The ratio between absorption and total opacity is epsilon, which is taken to be a constant in the whole simulation domain. Therefore, the scattering and absorption opacity are κa = epsilon and κs = 1 − epsilon. The gas quantities are fixed to be the initial conditions with zero velocity and do not evolve. Since our algorithm always solves the gas internal energy and radiation field together, we simply reset the gas quantities to be the initial profiles at the end of each step. We use one angle per octant for this test so that the Eddington tensor is always one-third. At the bottom boundary, we set the specific intensities to be the isotropic value ${a}_{r}{T}_{i}^{4}/(4\pi )$. At the top boundary, the incoming specific intensity is set to zero, while the outgoing specific intensity is copied from the last active zone to the ghost zone. Specific intensities inside the simulation domain are initialized to be ${a}_{r}{T}_{i}^{4}/(4\pi )$.

The steady-state profile of radiation energy density for this atmosphere setup is

Equation (34)

where $\tau \equiv {\int }_{x}^{10}\rho {dx}$ is the total optical depth integrated from x = 10. Upward and downward specific intensities are given by ${I}_{+}=(1/4\pi )\left[{E}_{r}+(1/3{\mu }_{x})\partial {E}_{r}/\partial \tau \right]$ and ${I}_{-}=(1/4\pi )\left[{E}_{r}-(1/3{\mu }_{x})\partial {E}_{r}/\partial \tau \right]$, respectively. The steady-state numerical solutions for epsilon varying from 0.1 to 10−8 are shown as the solid lines in Figure 8, which agree with the analytical solutions very well. Our algorithm requires more iterations to reach the same level of accuracy when epsilon decreases. The relative error is also larger in the optically thin surface, and the error increases with reduced epsilon for a fixed spatial resolution. All of these properties are very similar to the results given by the short characteristic method for this test problem (Davis et al. 2012). We have also tried the test in a 3D domain with the atmosphere profile aligned with the x-axis. We use a periodic boundary condition for the y- and z-directions in this case. The steady-state solutions are identical to the 1D case, and the rate of convergence is also the same. The overall cost is just proportional to the total number of grid points.

Figure 8.

Figure 8. Profiles of radiation energy density as a function of optical depth for the atmosphere test as described in Section 4.5. The solid lines are numerical solutions, while the dashed black lines are the corresponding analytical solutions. The ratio between absorption and total opacity epsilon varies from 0.1 to 10−8 as indicated for each group of lines in the plot.

Standard image High-resolution image

To quantify the rate of convergence for our algorithm and compare with the short characteristic method, we pick the epsilon = 10−6 case and measure the relative error ΔI/I of the specific intensities at x = 10 after each iteration. Here we calculate ΔI as the difference between the solution at each iterative step and the analytical solution. We only focus on the location at x = 10 because the difference between the initial condition and the analytical solution is the largest there. It is also the most optically thin region and takes more iterations to converge. The criterion is different from what Davis et al. (2012) used because we do not iterate over the source term. But both criteria serve the same purpose. Notice that the steady-state solution does not depend on the speed of light. However, our algorithm always solves the time-dependent transport equation and relaxes to the steady-state solution with the time step Δt fixed by the gas sound speed v0. We have tried three different values of c/v0, and the changes of ΔI/I with the number of iterations are shown in Figure 9. When c/v0 is small, although the implicit scheme is easier to converge per time step, it actually takes a larger total number of iterations to get the steady-state solution. When c/v0 is larger than 104 so that cΔt is larger than the length of the simulation box, the convergence rate is independent of c/v0. Our implicit algorithm also takes more iterations to converge with this initial condition compared with the short characteristic method. This test demonstrates that the implicit scheme is not optimal just to find the steady-state solution, as we are solving the full time-dependent RT, although we can still get the correct answer.

Figure 9.

Figure 9. Change of the relative error for specific intensities at x = 10 of the atmosphere test described in Section 4.5 as a function of the total number of iterations. This is measured for the case with a destruction fraction epsilon = 10−6. Different lines represent the cases with three different values of the speed of light we used compared with the fiducial sound speed as indicated in the legend.

Standard image High-resolution image

4.6. Homogeneous Sphere

Solving the RT equations in 1D spherical polar coordinates can be useful for many systems that are close to spherically symmetric (such as stars), particularly with the future development of multiple frequency groups. Spherical polar angular systems as described in Section 3.2.4 need to be used in this case because of the assumed symmetry. One useful test for this case is the homogeneous sphere problem, which is widely used to test the numerical scheme for radiation and neutrino transport (Abdikamalov et al. 2012; Radice et al. 2013). For this test, we set up the gas with a constant density ρ0 = 1 and temperature T0 = 1 from radius R0 = 0.05 to 1. Between R0 = 1 and the outer boundary, which is chosen to be 7, the density is 10−7, and the temperature is 10−3. We assume an absorption opacity ρ0 κa = 10 for R0 smaller than 1, and the opacity is zero in other regions. The gas is held with zero velocity and does not evolve. The units can be chosen to match any system and do not affect the solution to the transport equation. We set the specific intensity to be isotropic, with the value ${a}_{r}{T}_{0}^{4}/(4\pi )$ at the inner boundary. For the outer boundary, we require the outgoing specific intensities to be continuous and the incoming specific intensities to be zero. We use 1000 uniformly distributed grid points for the spatial resolution and 40 angles per cell for the specific intensities. This setup covers both the optically thick and a sharp transition to the optically thin region, which can be challenging if the transport equation is not solved accurately. The specific intensities are initialized to be the isotropic value ${a}_{r}{T}_{0}^{4}/(4\pi )$ in the whole grid. We choose the speed of light to be 100 times the gas sound speed, and the code finds the steady-state solution in roughly 20 iterations. Notice that the steady-state solution does not depend on the speed of light.

This setup also has an analytical solution, which we can compare with. The specific intensities as a function of radius r and angles n are (Smit et al. 1997)

Equation (35)

where nr is the radial component of the unit vector n and the function s(r, nr ) is defined as

Equation (36)

with the function g(r, nr ) to be

Equation (37)

Moments of the radiation field (Er , Fr , Pr ) can be calculated directly via angular quadrature of I(r, n ).

Radial profiles of Er , Fr , and Pr /Er from the numerical solution are shown as the solid lines in Figure 10 and agree with the analytical solutions very well. In particular, our numerical algorithm can capture the sharp transition at r = 1 without showing any artificial numerical effect. The Eddington tensor Pr /Er is one-third deep in the sphere. It is slightly smaller than one-third around r = 1. At a large distance, the sphere effectively becomes a point source, and only outgoing specific intensities pointing radially are nonzero. Therefore, the Eddington tensor approaches 1. The slight difference between the numerical and analytical solutions for Pr /Er is due to the finite angular resolution to resolve the angular domain $\sqrt{1-{\left({R}_{0}/r\right)}^{2}}\leqslant {n}_{r}\leqslant 1$ at large r.

Figure 10.

Figure 10. Profiles of radiation energy density Er , Eddington tensor Pr /Er (top panel), and radiation flux Fr (bottom panel) from the test of the homogeneous sphere as described in Section 4.6. The solid lines are from the numerical solution, while the analytical solutions are given by the dashed lines.

Standard image High-resolution image

4.7. Convergence of Linear Waves

Properties of convergence for the full radiation MHD algorithm can be checked with linear wave tests. The linearized equations we solve here are identical to what were evolved by Jiang et al. (2014). In order to compare directly, we adopt the same setup here. The background gas has a uniform density ρ = 1 and temperature T = 1 with adiabatic index γ = 5/3. We use one angle per octant with a mean radiation energy density Er = 1 so that the Eddington tensor is always 1/3 I , as used in the analytical solutions. We fix the dimensionless speed of light to be ${\mathbb{C}}=10$ and only use a constant pure absorption opacity. We use a 2D simulation box with size Lx = 1, Ly = 1 and change the spatial resolution from 32 × 32 to 512 × 512. Periodic boundary conditions are used for both directions. We measure the L1 error epsilon between the numerical and analytical solutions over the whole simulation box for each resolution and check how the errors change with resolution. We have also tried the same test in 3D and get the same results, although these 3D tests are more expensive to run. We initialize the calculation with the eigenmodes of the radiation-modified sound waves as given by Appendix B of Jiang et al. (2012) and stop the calculation after the waves propagate one period along the x-direction.

The two key dimensionless parameters that control the properties of radiation-modified sound waves are optical depth per wavelength length τa and the ratio between radiation pressure and gas pressure ${\mathbb{P}}$ in the background state after ${\mathbb{C}}$ is fixed. Figure 11 shows the change of epsilon with resolution N for three different values of τa and two different values of ${\mathbb{P}}$. When the error is dominated by the hydrodynamic part, as in the optically thin regime, small radiation pressure, or low resolution, the error decreases with increasing resolution as N2. When the error is dominated by the RT module, it only shows first-order convergence, as expected. Part of the truncation error in RT is due to different upwind directions for specific intensities propagating along opposite directions, as explained in Section 3.2.1. For the case with the highest resolution, N = 512, we find that increasing τc (Equation (17)) in the HLLE flux by a factor of 2 from our default value can help decrease the L1 error.

Figure 11.

Figure 11. Convergence of the L1 error epsilon for the linear wave tests as a function of spatial resolution N. The dots with different colors are for different optical depths per wavelength, as labeled in the plot. The left and right panels are for background states with ${\mathbb{P}}=0.01$ and 10, respectively.

Standard image High-resolution image

We can also measure the numerically calculated propagation speed and damping rate of the linear waves with the resolution N = 256, which are shown in Figure 12 for τa varying from 10−2 to 102 with three different values of ${\mathbb{P}}$ in each case. When the optical depth is small, our algorithm is able to capture both the adiabatic sound wave with ${\mathbb{P}}=0.01$ and the isothermal sound wave with ${\mathbb{P}}=10$. When τa is larger than 10 so that radiation and gas are tightly coupled, we are also able to capture the radiation-driven acoustic modes correctly. The results are the same as shown in Figure 10 of Jiang et al. (2014), as the same parameters are used. But the time step in this algorithm is a factor of 10 larger compared with the case when the time step is limited by the speed of light.

Figure 12.

Figure 12. Comparison of the propagation speed (top panel) and damping rate (bottom panel) for the radiation-modified linear waves between the numerical calculated values (stars) and analytical solutions (solid lines). The lines in black, blue, and red are for background states with ${\mathbb{P}}=0.01,1$, and 10, respectively.

Standard image High-resolution image

4.8. Radiation Shocks

Another challenging test for the full algorithm is the radiation-modified shocks, which check the numerical scheme in the nonlinear regime. In particular, we can see how well the source terms balance the transport terms for both the RT and hydrodynamic parts, which is crucial to get the structures of the shock correct, even though the time step is much larger than the light-crossing time per cell. Since our algorithm has the full angular distribution of the radiation field, we will compare with the semianalytical solutions provided by Ferguson et al. (2017), which gets the radiation shock solutions by solving the time-independent RT and hydrodynamic equations numerically without making any assumption on the closure relation. These are the same radiation shock solutions that are used to test the explicit RT algorithm in Jiang et al. (2014).

We choose a unit system such that the upstream adiabatic sound speed is 1 and the dimensionless speed of light ${\mathbb{C}}=1.73\times {10}^{3}$. The upstream gas has density and temperature ρ0 = 1 and T0 = 0.6 with adiabatic index γ = 5/3. We change the upstream flow velocity for cases with different Mach numbers. The dimensionless parameter ${\mathbb{P}}$ is 7.72 × 10−4, which is roughly the ratio between the radiation pressure and gas pressure in the upstream. We choose a constant absorption opacity ρ κa = 577.4 for the whole simulation domain. We initialize the 1D simulation domain with the semianalytical solutions given by Ferguson et al. (2017) and see how well the code can keep the shock structures. We use 4096 grid points for all of the tests. For the left boundary, all of the gas quantities are fixed to be the upstream values, while the specific intensities are isotropic in the comoving frame with a mean energy density fixed to be ${a}_{r}{T}_{0}^{4}$. For the right boundary, we simply copy the gas quantities from the last active zone to the ghost zones, but we find that it is necessary to keep the gradients of specific intensities continuous across the boundary.

Profiles of various quantities after the numerical solution reaches a steady state are shown in Figure 13 for the case with upstream flow velocity v = 2. This is the case with a subcritical shock (Mihalas & Mihalas 1984; Sincell et al. 1999; Lowrie & Edwards 2008), where the gas temperature has a Zel'dovich spike (Zel'Dovich & Raizer 1967) while the radiation temperature is continuous. For the subcritical case, the gas temperature before the spike is smaller than the downstream temperature. Particularly, the Eddington tensor is smaller than one-third on the right-hand side of the spike and larger than one-third on the left-hand side of the spike. Our numerical solution in the steady state is identical to the semianalytical solution, shown as the dashed red lines. Notice that our time step is set by the flow speed, and we only need roughly 20 iterations per time step. The numerical cost is significantly smaller than the explicit scheme in Jiang et al. (2014) for the same test, and it is also more efficient than the VET scheme for a similar test done by Jiang et al. (2012). The steady-state numerical solution with upstream flow velocity increased to v = 3 is shown in Figure 14. This is the case with a supercritical shock, which means the gas temperature at the upstream side of the spike is the same as the downstream temperature. The downstream gas is hotter, with an increased ratio between radiation pressure and gas pressure. Our algorithm is still able to keep the shock structures very well, as demonstrated in Figure 14, by comparing our numerical solution with the semianalytical solution.

Figure 13.

Figure 13. Structures of the subcritical radiation-modified shock with upstream Mach number ${ \mathcal M }=2$. The panels show steady-state profiles of radiation temperature Tr , gas temperature T, radiation flux Fr , density ρ, horizontal component of Eddington tensor fxx , and flow velocity v. The black lines are from our numerical solution in the steady state, while the dashed red lines are semianalytical solutions as described in Section 4.8.

Standard image High-resolution image
Figure 14.

Figure 14. Same as Figure 13 but for the case of supercritical shock with Mach number ${ \mathcal M }=3$.

Standard image High-resolution image

4.9. Radiation-driven Wind

The simulation of radiation-driven dusty wind mentioned in the Introduction is a useful test to demonstrate the difference between different approaches to solve the RT equation. This is a test that requires solving the full radiation hydrodynamic equations, and the simulation results can be significantly different if the RT equation is not solved accurately. In order to compare with the results based on the VET method directly, we use the same setup as in the run T3_F0.5 done by Davis et al. (2014). The simulation box is a 2D Cartesian domain covering the region [−256, 256]L0 × [0, 1024]L0, where the length scale L0 = 2.01 × 1015 cm is the fiducial scale height. The spatial resolution is 512 × 1024, and we use 40 angles per cell. The fiducial temperature is chosen to be T0 = 82 K, with a corresponding fiducial velocity v0 = 5.4 × 104 cm s−1 and fiducial timescale t0 = 3.72 × 1010 s. We adopt the same Rosseland and Planck mean dust opacities as in Davis et al. (2014):

Equation (38)

Notice that κδ P = κaP κa is what we need in Equation (6). We initialize the gas with a constant density ρ0 = 7.02 × 10−16 g cm−3 for 9 < y/L0 < 10 and density floor 10−8 ρ0 for all other regions. The gas has a uniform temperature T = T0 and a constant gravitational acceleration g = 1.45 × 10−6 cm s−2 along the −y direction. The radiation field is initialized to give ${E}_{r}={a}_{r}{T}_{0}^{4}$ and Fr = 0.5c2 g/κa (T0) through the whole simulation box. We assume that upward specific intensities have the same value at each cell, and the same assumption is made for downward specific intensities. The same approach is used to set the bottom boundary condition with the same Fr but ${E}_{r}=9.26{a}_{r}{T}_{0}^{4}$. This is designed to maintain a constant vertical radiation flux Fr with an initial total optical depth τ0 = 3. At the top boundary, we set incoming specific intensities to zero and just copy the outgoing specific intensities from the last active zones to the ghost zones. For gas quantities, we use a reflecting boundary condition at the bottom and an outflow boundary condition at the top. We use a random perturbation on density with amplitude 12.5% to seed the instability. The ratio between the speed of light and the fiducial sound speed is ${\mathbb{C}}=5.54\times {10}^{5}$ for this test.

Density distribution at two snapshots t = 35t0 and 80t0 are shown in Figure 15. The gas shell is initially pushed away by the radiation force, and Rayleigh–Taylor instability has developed at t = 35t0. The high-density filaments fall back temporarily, but they get accelerated again later on. At time t = 80t0, the majority of the gas is still flowing outward. At each snapshot, we calculate the box-averaged Eddington ratio fE , volume (τV ), and flux-weighted (τF ) optical depths as

Equation (39)

where 〈 · 〉 represents the volume average over the whole simulation box. Histories of fE , τV , and τF /τV are shown in Figure 16. The Eddington ratio dips below 1 around 30t0 due to the Rayleigh–Taylor instability but returns to 1 quickly. The timescale when the dip shows up and the evolution history are basically the same as in Figure 6 of Davis et al. (2014), despite some small difference at the early phase, which is likely due to slightly different initial conditions. This demonstrates that the two completely different algorithms capture the same growth rate and nonlinear structure of the radiation-driven Rayleigh–Taylor instability. The Eddington ratio in our simulation eventually becomes larger than 1, and the gas is blown away from the top boundary. The 2D density structures shown in Figure 15 can also be directly compared with Figure 4 in Davis et al. (2014), and they share very similar structures.

Figure 15.

Figure 15. Density distribution for two snapshots from the test of radiation-driven dusty wind as described in Section 4.9. The left panel shows the development of radiation-driven Rayleigh–Taylor instability at time t = 35t0, while the right panel shows the fully nonlinear stage at time t = 80t0. Here t0 is the typical sound-crossing time across one scale height.

Standard image High-resolution image
Figure 16.

Figure 16. Histories of various volume-averaged quantities from the test of radiation-driven dusty wind (Section 4.9). The top panel is the volume-averaged Eddington ratio fE , while the Rosseland mean optical depth across the horizontal direction of the simulation box is shown in the middle panel. The bottom panel shows the ratio between the flux-weighted (τF ) and volume-averaged (τV ) optical depth.

Standard image High-resolution image

It is also interesting to compare the performance of our algorithm for this test with the performance of the VET scheme. The time step for our algorithm is 6 × 10−3 t0, and we use 50 iterations per time step to achieve a relative accuracy of 10−6, except for the first few time steps, where 200 iterations are used per time step to pass the initial transient. With 256 MPI ranks using Skylake nodes, we are able to run roughly 2 × 104 steps to reach 120t0 within about 4 hr of wall-clock time. The cost per time step is comparable to the cost of the VET method used by Davis et al. (2014). However, Davis et al. (2014) used a time step that was a factor of 10 smaller to enable convergence, which made the overall cost significantly larger than the cost of our new scheme developed here. Our implicit scheme also reduces the cost by a factor of ≈104 if we solve the problem using an explicit scheme by limiting the time step with the speed of light.

5. Discussions and Conclusions

We have developed a novel finite volume algorithm that solves the full time-dependent radiation MHD equations based on the discrete ordinates approach. The hydrodynamic equations are solved using the explicit MHD integrator in Athena++, while the RT equation is solved fully implicitly. The gas and radiation are coupled via both energy and momentum exchange. The velocity-dependent terms in the RT equation are handled via Lorentz transformation so that no expansion in terms of v/c is needed. The time step of the whole algorithm is only determined by the normal CFL condition for the MHD module. We have carried out an extensive set of tests to demonstrate the accuracy and efficiency of the algorithm for both gas pressure- and radiation pressure-dominated flows with a wide range of optical depth. The finite volume approach also allows the algorithm to be easily used in both Cartesian and spherical polar coordinate systems, as demonstrated in our tests.

The difference between the algorithm developed here and radiation hydrodynamic schemes that adopt a simplified assumption of closure relations for the radiation moment equations (such as FLD and M1) are clear. We do not make any assumptions on the closure relation, as we do not need it. Therefore, we do not have the well-known artifacts of FLD and M1, although our algorithm is generally more expensive. Our algorithm does have the same ray effects as many other methods that are based on discrete ordinates (Castor 2004). The algorithm is also different from the classical short characteristic method, as well as the VET approach. We are solving the full time-dependent transport equation for specific intensities directly, instead of the time-independent transport equation, which is normally adopted for the short characteristic method. It is often argued that for nonrelativistic systems, the light-crossing time is much shorter than the local dynamical timescale, and therefore it is reasonable to drop the time-dependent term for the radiation field. This is widely used to estimate the heating and cooling rate of the gas for the modeling of stellar atmosphere. This is true for the low optical depth regime with negligible radiation pressure. However, when the thermalization timescale is reduced with increasing optical depth, this approach can be numerically unstable, even for the gas pressure-dominated regime (Davis et al. 2012). There are also systems where the typical sound speed is much smaller than the speed of light while the radiation pressure is still larger than the gas pressure, such as the envelope of massive stars. Our algorithm can overcome the limitations of the short characteristic method, and it can be suitable for all of these regimes. The VET method can also be used, in principle, where a short characteristic module is only used to provide a closure relation. As discussed in Section 4.3, there is still a subtle difference compared with the algorithm developed here in that the VET approach calculates the Eddington tensor at the lab frame but neglecting the flow velocity. The Eddington tensor is also calculated at the beginning of each time step assuming that the radiation field has reached a steady state with the gas. Future studies will be needed to investigate the consequences of these differences for applications. Another advantage of our algorithm compared with VET is that the radiation field is entirely described by one set of variables (the specific intensities), while VET- and Monte Carlo–based closure schemes typically need to evolve two completely different sets of radiation variables to get the Eddington tensor and determine the time evolution of the radiation moments. It can be an issue to keep the two sets of variables consistent with each other (Park et al. 2012), which we do not need to worry about. The algorithm we have developed here shares many common features with the neutrino transport scheme developed by Sumiyoshi & Yamada (2012) and Nagakura et al. (2014). The main differences are the modified HLLE solver we have developed here and the approach to solving the radiation source terms, where we do not linearize the equations.

The computational cost of this algorithm can be very problem-dependent, because the convergent properties can change dramatically depending on the opacity and how quickly the radiation field is changing within one time step. The cost to perform one iteration is smaller than the cost of one step for the explicit scheme. The overall cost is roughly proportional to the number of iterations we need for convergence. The algorithm also shows very good parallel scaling with domain decomposition because, unlike the short characteristic module, there is no requirement to perform the iteration in any particular order. This means that each domain can perform the iterations independently, and they only need to exchange the boundary condition after each iteration. However, MPI communications can take a larger fraction of the total computational cost compared with the explicit scheme. Because the equations for iteration in our scheme are nonlinear, many preconditioners and more efficient matrix inversion algorithms that are designed for linear systems cannot be used here. However, a multigrid can be easily compatible with our algorithm and has been shown to be able to significantly speed up the convergence of iterations, even for nonlinear equations (Fabiani Bendicho et al. 1997; Bjørgen & Leenaarts 2017). Incorporating the multigrid solver in Athena++ with our RT module is our immediate next step.

The current algorithm solves the frequency-integrated transport equation as the first step. It can be easily extended to the frequency-dependent case using the multigroup approach (Vaytet et al. 2011), which has been widely used to study neutrino transport (Just et al. 2015; Skinner et al. 2019). The key for this extension is to choose appropriate frequency bins, which can be in the lab frame, the fluid rest frame, or both (Nagakura et al. 2014). All of these options will be explored with future development.

The author thanks James Stone, Shane Davis, Zhaohuan Zhu, and the anonymous referee for valuable comments that have improved the draft. The Center for Computational Astrophysics at the Flatiron Institute is supported by the Simons Foundation.

Appendix: Coefficients of the Discretized RT Equation

In our algorithm, the RT equation is solved fully implicitly as (Equation (14) and Section 3.2.1)

Equation (A1)

At each cell (i, j, k), the left-hand side is calculated as

Equation (A2)

where Ax , Ay , and Az are the cell areas at the corresponding surfaces, while Vi,j,k is the cell volume. The surface flux is calculated via the modified HLLE solver (taking Fn (i − 1/2) as an example):

Equation (A3)

Here the maximum (${S}_{i-1/2}^{+}$) and minimum (${S}_{i-1/2}^{-}$) signal speeds are defined as

Equation (A4)

Equation (A5)

The optical depth per cell is defined as ${\tau }_{c}\equiv \alpha {\rho }^{m}(i-1)+{\rho }^{m}(i)\left[{\kappa }_{a}(i-1)+{\kappa }_{a}(i)\right.$ + $\left.{\kappa }_{s}(i-1)+{\kappa }_{s}(i)\right]{\rm{\Delta }}x$, where Δx is the local cell size and α is a free parameter with the default value chosen to be 5. The value of α is chosen to minimize numerical diffusion while still keep the numerical scheme stable. For all of the test problems we have shown, the solution is independent of α as long as it is large enough. The signal speeds, as well as the HLLE flux, are chosen to preserve the asymptotic limit such that when τc ,${S}_{i-1/2}^{+}\to c| {\mu }_{x}| /{\tau }_{c}$, ${S}_{i-1/2}^{-}\to -c| {\mu }_{x}| /{\tau }_{c}$, and

Equation (A6)

In the optically thin limit such that τc → 0, Fn (i − 1/2) is reduced to the simple upwind flux. Similarly, surface fluxes from other directions, as well as the signal speeds ${S}_{j-1/2}^{+},{S}_{j-1/2}^{-},{S}_{j+1/2}^{+}$, ${S}_{j+1/2}^{-},{S}_{k-1/2}^{+},{S}_{k-1/2}^{-}$, and ${S}_{k+1/2}^{+},{S}_{k+1/2}^{-}$, can be calculated.

Replacing the expressions for the fluxes at cell faces, we get the discretized equation

Equation (A7)

where the coefficients are given by

Equation (A8)

The convergent properties for our iterative scheme depend strongly on the values of g1. If g1 is large and positive for all ${I}_{n}^{m+1}$, the diagonal term will dominate over the off-diagonal terms, and the iteration can converge quickly. Otherwise, the convergence may be slow, and it can even diverge sometimes. To improve the robustness of our iterative scheme, we have an alternative procedure to perform the iteration compared with Equation (21). The expression for g1 includes terms that can be positive or negative depending on the sign of μx , μy , and μz . For each angle, we separate g1 into two parts, ${g}_{1}={g}_{1}^{{\prime} }+{g}_{1}^{{\prime\prime} }$, where ${g}_{1}^{{\prime} }$ includes all terms that are positive, while all negative terms are included in ${g}_{1}^{{\prime\prime} }$. At each iterative step l, we replace ${g}_{1}{I}_{n,l}^{m+1}$ in Equation (21) with ${g}_{1}^{{\prime} }{I}_{n,l}^{m+1}+{g}_{1}^{{\prime\prime} }{I}_{n,l-1}^{m+1}$. All other terms are unchanged. This iterative scheme is much more robust over the wide range of parameters we have explored. However, when both schemes can converge, the convergent rate for this procedure is typically slower compared with iteration using Equation (21).

Footnotes

  • 1  

    Other angular discretization approaches can also be used for specific applications, as shown in Section 3.2.4.

Please wait… references are loading.
10.3847/1538-4365/abe303