MOCMC: Method of Characteristics Moment Closure, a Numerical Method for Covariant Radiation Magnetohydrodynamics

and

Published 2020 March 12 © 2020. Contribution of Los Alamos National Laboratory; not subject to copyright in the United States.
, , Citation Benjamin R. Ryan and Joshua C. Dolence 2020 ApJ 891 118 DOI 10.3847/1538-4357/ab75e1

Download Article PDF
DownloadArticle ePub

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

0004-637X/891/2/118

Abstract

We present a conservative numerical method for radiation magnetohydrodynamics with frequency-dependent full transport in stationary spacetimes. This method is stable and accurate for both large and small optical depths and radiation pressures. The radiation stress–energy tensor is evolved in flux-conservative form, and closed with a swarm of samples that each transport a multigroup representation of the invariant specific intensity along a null geodesic. In each zone, the enclosed samples are used to efficiently construct a Delaunay triangulation of the unit sphere in the comoving frame, which in turn is used to calculate the Eddington tensor, average source terms, and adaptively refine the sample swarm. Radiation four-forces are evaluated in the moment sector in a semi-implicit fashion. The radiative transfer equation is solved in invariant form deterministically for each sample. Since each sample carries a discrete representation of the full spectrum, the cost of evaluating the transport operator is independent of the number of frequency groups, representing a significant reduction of algorithmic complexity for transport in frequency-dependent problems. The major approximation we make in this work is performing scattering in an angle-averaged way. Local adaptivity in samples also makes this scheme more amenable to nonuniform meshes than a traditional Monte Carlo method. We describe the method and present results on a suite of test problems. We find that Method of Characteristics Moment Closure converges at least as ∼N−1, rather than the canonical Monte Carlo N−1/2, where N is the number of samples per zone.

Export citation and abstract BibTeX RIS

1. Introduction

In astrophysics, radiation often plays an important role in transporting energy and momentum. Accretion disks around neutron stars and black holes are subject to perturbative radiative cooling (Esin et al. 1997; Ryan et al. 2017; Sa̧dowski et al. 2017) at the lowest accretion rates, efficient local radiative losses (Shakura & Sunyaev 1973; Jiang et al. 2019) near the Eddington limit, and significant photon trapping and dominant radiation pressures at super-Eddington rates (Abramowicz et al. 1988; Jiang et al. 2014b; McKinney et al. 2014; Sa̧dowski et al. 2014). At least some core-collapse supernova explosions are probably driven by energy transfer via neutrinos (Burrows et al. 1995; Janka et al. 2007; Vartanyan et al. 2019). The composition of ejecta from merging binary neutron stars, probably crucial for setting the color of kilonovae (Metzger et al. 2010), is affected by neutrino fluxes, as the neutrinos also transport lepton number (Surman et al. 2008; Wanajo et al. 2014; Foucart et al. 2015, 2016; Richers et al. 2015; Miller et al. 2019a, 2019b). The envelopes of high-mass stars can be supported by radiation pressure (Paxton et al. 2013; Jiang et al. 2018).

In such systems, magnetohydrodynamic (MHD) turbulence also often plays an important role. In particular, MHD turbulence may dominate angular momentum transport in black hole accretion disks (Balbus & Hawley 1991; Hawley et al. 1995). Here and in other relativistic flows, the fluid sound speed is approximately the speed of light. Therefore, coupling time-dependent radiative transfer to time-dependent MHD turbulence is required for accurately modeling these systems from first principles.

Solving the equations of radiation hydrodynamics presents significant difficulties. In particular, the specific intensity is in general a function of spatial location, frequency, and direction. This leads to a high dimensional integration (3 space +3 momentum +1 time). For global turbulent flows, where the requirement for resolving the flow locally can impose a large minimum number of grid zones and irregular spatial grids, a lack of computational efficiency can be prohibitive. Additional conceptual difficulties can also arise when considering radiation transport in curvilinear coordinates and/or with large Lorentz factors. Timescales for energy and momentum exchange between fluid and radiation can also be short, compared to global dynamical timescales.

For large optical depths τ, the Eddington approximation along with averaging opacities over the Planck function is a straightforward, effective approach. However, there is not a clear hierarchical process by which this approach can be extended out of the optically thick regime. The M1 family of closures, in which the entire four-momentum rather than just the comoving radiation energy density is used to close the second moment of the radiation, is frequently adopted (Minerbo 1978; Levermore 1984; Scheck et al. 2006; Sa̧dowski et al. 2013; McKinney et al. 2014; Foucart et al. 2015; Roberts et al. 2016; Skinner et al. 2019). However, while it recovers the optically thick isotropic limit, M1 can represent only a specific case of optically thin transport in which the radiation is isotropic in the rest frame of some timelike observer. Truncated moment methods without a separate solution of the radiative transfer equation will in general be forced to make assumptions about the frequency and angular structure of the radiation distribution function, and such a closure that is accurate across problems of interest in astrophysical radiation transport is unknown.

A classic approach to radiation transport is the Monte Carlo method (e.g., Fleck & Cummings 1971; Pozdnyakov et al. 1983; Dolence et al. 2009; Abdikamalov et al. 2012; Schnittman & Krolik 2013; Wollaeger et al. 2013; Roth & Kasen 2015; Ryan et al. 2015; Wollaber 2016). In Monte Carlo methods, the radiation is randomly sampled and these samples undergo transport and interactions as if they were individual particles. Advantages of this method include the unbiased nature of Monte Carlo sampling, simple extension to frequency dependence (even to a continuous energy approach), and the simplicity of interpreting the method as individual physical interactions. However, the method converges with the number of samples N only as N−1/2, although there is no scaling with number of dimensions. This error will be roughly divided by βr, the ratio of gas-to-radiation pressure, before being felt by the fluid; reducing sampling error sufficiently when radiation pressures are large is generally not practical. The requirement of resolving interactions in an unbiased manner is also onerous when optical depths are large.

Monte Carlo methods can be extended in several ways. Implicit Monte Carlo (IMC; Fleck & Cummings 1971; Wollaber 2016 for a review) linearizes the source terms and converts a fraction of emission and absorption events into effective scatterings. To be precise, this method is semi-implicit; the linearization can lead to unphysical behavior like violation of a maximum principle (Larsen & Mercier 1987, although see also, e.g., Cleveland & Wollaber 2018). Inelastic scattering (e.g., Compton scattering) is also not amenable to the effective scattering approach, and poses a particular challenge (Densmore et al. 2010). Additionally, the method can still experience significant slowdowns due to large numbers of effective scatterings in optically thick regions. Random walk methods (Fleck & Canfield 1984) alleviate this by updating particle positions according to a probabilistic solution of a diffusion equation. In a similar vein, Discrete Diffusion Monte Carlo (Densmore et al. 2007) changes the character of optically thick zones and can be combined with IMC (Abdikamalov et al. 2012; Densmore et al. 2012; Wollaeger et al. 2013), but this requires a heuristic choice of interface between optically thin and thick regions. These modifications do little to enhance stability when the radiation pressure is large.

Another standard approach, in which the intensity is discretized into rays on a per-zone basis, is the method of discrete ordinates (e.g., Liebendörfer et al. 2004; Hubeny & Burrows 2007; Ott et al. 2008; Davis et al. 2012; Ohsuga & Takahashi 2016; Nagakura et al. 2017). It is straightforward to make this method stable and efficient for both optically thick and radiation pressure–dominated flows, as the transport equation is solved in a deterministic fashion. However, these methods suffer from ray effects in optically thin regions; the truncation error is highly anisotropic (Castor 2004; Zhu et al. 2015). Additionally, when these methods are made frequency dependent, a separate transport update is required for every frequency element of every angle, producing a scheme that is often prohibitively expensive.

Another approach to transport intended to yield good stability properties in radiation hydrodynamics problems is the variable Eddington tensor (VET) scheme (Takeuchi 1971; Stone et al. 1992; Davis et al. 2012; Jiang et al. 2012). Here, the zeroth and first moments of the radiation are evolved, but the Eddington tensor is evaluated with a separate solution of the full transport equation. Foucart (2018) adopted a similar approach for relativistic systems, using Monte Carlo rather than discrete ordinates to evaluate the Eddington tensor. The VET allows for full transport while evaluating radiation-fluid interactions for only a few degrees of freedom (the four-momentum), which can greatly simplify semi-implicit methods often required for stability.

Here, we introduce a method that we term Method of Characteristics Moment Closure (MOCMC). As in previous VET approaches, we evolve the frequency-integrated (gray) moments of the specific intensity, closed by a solution of the full transport equation. However, instead of using a Monte Carlo or discrete ordinates method to obtain the transport solution, we adopt a Method of Characteristics approach (Askew 1972; Pandya & Adams 2009; Hammer et al. 2019; Park et al. 2019). In our method, the radiation is discretized into samples with different positions and directions, with each sample carrying an array of specific intensities discretized in frequency. These samples move along characteristics, and the radiative transfer equation is solved in a deterministic way. The samples in each zone are used to reconstruct momentum space in that zone (we use the Delaunay triangulation of the unit sphere in the comoving frame). The reconstructed intensity is used to evaluate the pressure tensor and frequency- and angle-average source terms in order to close the moment equations in a VET fashion.

Our approach has several advantages. Specific intensities are integrated directly along geodesics; the transport process itself is essentially free of spatial discretization errors. The deterministic approach to source terms puts a limit on the computational cost of the scheme (unlike, e.g., probabilistic interaction-by-interaction scattering of Monte Carlo particles in optically thick media). Our finite volume interpretation frees us from issues with positivity and oscillations encountered in spectral methods (although see McClarren & Hauck 2010; Radice et al. 2013). No representation of a conserved four-momentum is evaluated from the samples; characteristics crossing zones do not lead to intrinsic noise, and this fact allows for significant freedom in dynamically refining or derefining characteristic resolution. This also frees us from having to reconcile different four-momentum representations in the radiation moments and the samples. Absent plasma dispersion effects, photons of all frequencies share geodesics, so we can efficiently advect multiple frequency bins with a single push along a characteristic i.e., each resolution element carries an array of specific intensities at different frequencies. Relaxing to the asymptotic diffusion limit is straightforward in the moment sector. Finally, our scheme employs relativistic invariants in the samples, leading to conceptual simplicity.

We begin with a description of the governing equations of radiation magnetohydrodynamics (RMHD) in Section 2. We then describe our numerical implementation in Section 3. We present a suite of tests in Section 4, in which we also compare our scheme directly to gray moment methods in several cases. We conclude in Section 5.

2. Equations of RMHD

Throughout this work, we use parentheses to denote indices in an orthonormal tetrad frame. Indices without parentheses indicate the coordinate frame. Greek letters index spacetime (0, 1, 2, 3), while Latin letters index space (1, 2, 3). We adopt units such that c = 1.

We consider the equations of RMHD, including the full transport equation, written in covariant form. Unlike in mixed-frame approaches (Mihalas & Klein 1982; Mihalas & Mihalas 1984; Krumholz et al. 2007; Jiang et al. 2014a; Skinner et al. 2019), here it is not necessary to expand the equations in powers of v/c in order to relate the radiation and fluid. The equations are valid in any frame.

The divergence of the total stress–energy tensor is zero:

Equation (1)

where ${T}^{\mu }{}_{\nu }$ is the stress–energy of the MHD fluid and ${R}^{\mu }{}_{\nu }$ is the stress–energy of the radiation. Rewriting this expression, evidently the fluid and radiation interact via exchange of four-momentum:

Equation (2)

We first separately consider the evolution of fluid and radiation, and then describe the radiation source terms (emission, absorption, and scattering) that lead to four-momentum exchange between these two components.

2.1. MHDs

The governing equations of covariant MHDs, written in conservative form in a coordinate basis, are (Anile 1989; Komissarov 1999; Gammie et al. 2003) conservation of particle number

Equation (3)

conservation of four-momentum (note that we are deferring discussion of radiation-matter source terms to Section 2.2.1)

Equation (4)

conservation of magnetic flux

Equation (5)

and the no-monopoles constraint

Equation (6)

The MHD stress–energy tensor is

Equation (7)

Equation (8)

In the above, ρ is the fluid rest-mass density, uμ is the fluid four-velocity, Bi is the magnetic field three-vector, bμ is the magnetic field four-vector, and $\sqrt{-g}$ is the determinant of the metric. These equations require an equation of state; throughout this work, we adopt ${P}_{{\rm{g}}}=(\gamma -1){u}_{{\rm{g}}}$, with ${u}_{{\rm{g}}}$ the gas internal energy density, although introducing more sophisticated equations of state in this framework is conceptually straightforward (e.g., Miller et al. 2019a).

2.2. Radiation

The equation of radiation transport, written in invariant form (each quantity in parentheses is invariant), is (Mihalas & Mihalas 1984)

Equation (9)

where D/ds is the convective derivative in phase space, s is the path length, ${j}_{\nu }^{{\rm{a}}}$ is the specific thermal emissivity, ${\alpha }_{\nu }^{{\rm{a}}}$ is the specific absorption coefficient, ${j}_{\nu }^{{\rm{s}}}$ is the effective specific emission coefficient due to scattering (Mihalas & Mihalas 1984), and ${\alpha }_{\nu }^{{\rm{s}}}$ is the specific absorption coefficient due to scattering. The specific intensity Iν is related to the distribution function f as ${I}_{\nu }={h}^{4}{\nu }^{3}f/{c}^{2}$. We will return to source terms in Section 2.2.1; for now, it is sufficient to note that, absent interaction terms, Equation (9) preserves the invariant intensity Iν/ν3 along characteristics.

Each characteristic is described by a position xμ and a momentum pμ defined such that −pμuμ = , where ν is the frequency measured by an observer with four-velocity uμ. These quantities evolve according to the geodesic equation (note that the coordinate time t = x0):

Equation (10)

Equation (11)

where in the first equation we have implicitly divided out the affine parameter, defined by dxμ/ = pμ.

For Monte Carlo particles, like superphotons in bhlight (Ryan et al. 2015), one would typically evolve the momentum pμ directly. However, we will discretize Iν/ν3 in frequency along each characteristic, so in practice we evolve a direction vector whose normalization has no special meaning. For a particular momentum, the direction vector is nμ = pμ/(). Effectively, we normalize nμ such that n0 = −1; the frequency ν of each bin i according to an observer moving with four-velocity uμ is then

Equation (12)

where p0i is an array of timelike components of covariant four-momenta—or for our purposes, frequencies at asymptotic spatial infinity common to all samples.3 This array defines the range of the frequency discretization. We discretize these frequencies logarithmically; note that ${\rm{\Delta }}\mathrm{log}\nu $ is unaffected by frame transformations. In terms of xμ and nμ, the geodesic equation is then

Equation (13)

Equation (14)

The moments of the radiation field evolve due to advection (i.e., ignoring radiation-matter source terms) in a similar manner to the MHD stress–energy tensor,

Equation (15)

where ${R}^{\mu }{}_{\nu }$ is related to the specific intensity Iν as

Equation (16)

However, unlike in the MHD case where we assumed a thermal, isotropic distribution of particles in the fluid frame, there is no general analytic expression for ${R}_{\,j}^{i}$. In the fluid frame, this uncertainty can be parameterized as (recall that parentheses indicate an orthonormal tetrad, and here the comoving frame of the fluid) ${R}^{(i)}{}_{(j)}=-{R}^{(0)}{}_{(0)}{\pi }^{(i)}{}_{(j)}$, where ${\pi }^{(i)}{}_{(j)}$ is the Eddington tensor, which is calculated from the specific intensity:

Equation (17)

where dΩ is the differential solid angle in an orthonormal tetrad. Given ${\pi }^{(i)}{}_{(j)}$ and ${R}^{0}{}_{\nu }$, we can construct the entire radiation stress–energy tensor in any frame.

For the special case of very optically thick flows, the specific intensity goes to the Planck function ${B}_{\nu }$, and the Eddington tensor becomes

Equation (18)

When optical depths are not very large, ${\pi }^{(i)}{}_{(j)}$ is in general subject to few a priori constraints, and one must be able to evaluate Equation (17); that is, one must have knowledge of ${I}_{\nu }$.

2.2.1. Fluid–Radiation Interactions

Microphysical processes (emission, absorption, and scattering) lead to an exchange of four-momentum between the fluid and the radiation, along with a change in specific intensity along characteristics.

The fluid and radiation stress energy tensors communicate through exchange of four-momentum. We can rewrite the divergence of the radiation stress–energy tensor as a four-force density,

Equation (19)

From Equation (2), we then have the interaction source terms on our fluid and radiation four-momenta:

Equation (20)

Equation (21)

In the fluid frame, the four-force density is (Mihalas & Mihalas 1984)

Equation (22)

We now rewrite this equation to produce something more amenable to stable integration. In particular, we want to use the Iν to average source terms, rather than compute four-forces along individual characteristics as in a Monte Carlo approach, to reduce noise in the fluid. We will also introduce an angle-averaged approach to scattering.

The term involving ${j}_{\nu }^{{\rm{a}}}$ in the integrand does not depend on the intensity; we may integrate this emissivity directly (Ja). In addition, we can without approximation rewrite the absorption terms as frequency- and angle-averaged opacities multiplying the comoving radiation four-momentum:

Equation (23)

Equation (24)

where

Equation (25)

Equation (26)

Equation (27)

We now consider the term involving ${j}_{\nu }^{{\rm{s}}}$ in Equation (23). For any (dΩ, ), ${j}_{\nu }^{{\rm{s}}}$ can in principle depend on every other (dΩ, ); all characteristics can scatter into each other. This is numerically very expensive unless treated in a probabilistic manner (e.g., Dolence et al. 2009; Ryan et al. 2015). Here, we wish to preserve our continuum approach. Therefore, we instead derive a specific scattering emissivity from the evolution of an angle-averaged intensity given by the Kompaneets equation.

We approximate scattering by considering the angle-integrated transfer equation in the comoving frame with only source terms due to scattering:

Equation (28)

where script letters (${ \mathcal I }$, ${ \mathcal J }$, ${ \mathcal A }$) indicate a solid angle integral average. By evaluating $d{{ \mathcal I }}_{\nu }/{ds}$, we can solve for ${{ \mathcal J }}_{\nu }^{{\rm{s}}}$, and then approximate the comoving frame radiation four-force as

Equation (29)

Equation (30)

One obvious consequence of our angle-integrated procedure is that the integral over ${j}_{\nu }^{{\rm{s}}}$ does not contribute to G(i), because ${j}_{\nu }^{{\rm{s}}}$ is isotropic in the fluid frame. The error associated with this procedure depends on the differential cross section; for an isotropic scattering process, this is exact. The approximation we make to scattering is separate from any treatment of emission and absorption; those terms are solved exactly. Our approximate approach to scattering is not a fundamental requirement of MOCMC. We only invoke this approximation here for computational expediency and because this treatment is likely sufficient for some applications of immediate interest.

Here, $d{{ \mathcal I }}_{\nu }/{ds}$ is zero for elastic scattering; in general, however, it depends on the scattering process under consideration. In order to proceed, we now specialize to electron scattering and introduce the Kompaneets equation (e.g., Rybicki & Lightman 1979):

Equation (31)

where ne is the electron number density, σT is the Thomson cross section, Te is the electron temperature, me is the electron rest mass, $x=h\nu /({k}_{{\rm{B}}}{T}_{{\rm{e}}})$, $n={c}^{2}{{ \mathcal I }}_{\nu }/(2h{\nu }^{3})$ is the photon occupation number, and τ is here the proper time in the fluid frame. The Kompaneets equation is an angle-integrated (i.e., consistent with our scattering approximation) expansion of the Compton scattering kernel in the dimensionless energy transferred to photons per scattering event, $h{\rm{\Delta }}\nu /({k}_{{\rm{B}}}{T}_{{\rm{e}}})$. This value is small for nonrelativistic electrons, Te ≲ 108 K, and when small, Compton scattering becomes a diffusive flux in momentum space. At higher temperatures, one must take an integrodifferential approach to Compton scattering (e.g., Jones 1968; Aharonian & Atoyan 1981; Coppi & Blandford 1990; Dolence et al. 2009; Suleimanov et al. 2012; Ryan et al. 2015; Narayan et al. 2017; Kinch et al. 2019).

Up to a multiplicative constant ${ \mathcal C }$, $\partial n/\partial t\sim d{{ \mathcal I }}_{\nu }/{ds}$. We can therefore use the Kompaneets equation to evaluate the change in intensity, and solve Equation (28) for the angle-averaged scattering emissivity:

Equation (32)

Equations (29) and (30) describe the exchange of four-momentum between fluid and radiation, but they do not update specific intensities. These are calculated by solving the transfer equation along each characteristic in invariant form. For each Iν, we solve Equation (9), with ${j}_{\nu }^{{\rm{s}}}$ approximated by ${{ \mathcal J }}_{\nu }^{{\rm{s}}}$.

3. Numerical Method

We now describe our numerical implementation of the equations of radiation MHD.

MOCMC is essentially a VET method. The radiation energy-momentum is evolved in flux-conservative form. This is also the representation used to interact with the fluid, a natural choice given that the fluid is represented solely by a four-momentum.

Standard numerical methods for evaluating advective fluxes in a time-explicit way are straightforward to implement. However, for the zeroth and first moments of the radiation, the pressure tensor in the right-hand side of Equation (15), corresponding to advection, as well as the radiative source terms (Equation (19)) are unknown. To evaluate these quantities, one requires knowledge of the radiation distribution function (equivalently, the specific intensity). In VET methods generally, the specific intensity is provided by a solution of the equation of radiative transfer. In MOCMC specifically, the specific intensity is evaluated by a Method of Characteristics solution of the equation of radiative transfer written in invariant form. The radiation energy and momentum in the advective terms are derived from the conserved moments; while one could evaluate these quantities from the transport solution, they will disagree at the level of truncation error (consistency between energy representations does become an issue in inelastic scattering, which we account for in Section 3.8). We have not seen this disagreement lead to errors in any test problems we have performed with MOCMC.

Our Method of Characteristics approach to radiation transport uses particles (here, "samples") to transport a multigroup representation of the specific intensity along a common direction vector nμ. To evaluate the terms on the right-hand side of the radiation moment equations, we need to perform integrals over these samples, essentially to evaluate the Eddington tensor in the comoving frame of the fluid and to angle- and frequency-average the radiation source terms. For all the samples in a spatial zone, we construct a mesh in momentum space using a convex hull algorithm, and we then adopt a quadrature rule on this mesh.

Even with properly averaged source terms, the interactions between the fluid and the radiation moments can be unstable in explicit methods when optical depths are very large or energy-momentum exchange timescales are short. To enforce stability in MOCMC, we apply source terms in a locally implicit way. We separate energy and momentum exchange in the comoving frame of the fluid in order to avoid anything more numerically complex than a 1D rootfind.

We now discuss individual elements of the MOCMC method in more detail. Again, we divide our discussion into fluid, radiation, and interaction subsections.

3.1. GRMHD Evolution

Our method for integrating the GRMHD equations is harm (Gammie et al. 2003), a flux-conservative shock capturing scheme. All gas and magnetic field variables are zone-centered. Second-order accuracy in time is achieved with a midpoint method. The primitive variables are

Equation (33)

where Bi is the magnetic field three-vector and ${\tilde{u}}^{i}$ is related to the spatial components of the four-velocity, but more amenable to variable inversion (McKinney & Gammie 2004). The conserved variables U are

Equation (34)

and the fluxes Fi are

Equation (35)

Note that we have subtracted the rest mass from the time component of the stress–energy; this allows for greater accuracy in the internal energy of the fluid in certain cases.

We use monotonized central (second-order) or WENO5 (fifth-order; Liu et al. 1994; Tchekhovskoy et al. 2007) methods to reconstruct primitive variables at zone faces. These in turn are used to calculate left and right fluxes FL and FR and conserved variables UL and UR. The local Lax–Friedrichs approximate Riemann solver is then used to compute intercell fluxes of conserved variables,

Equation (36)

where ${c}_{\mathrm{top},{\rm{g}}}$ is the maximum fluid wavespeed in the coordinate frame.

The no-monopoles condition is enforced via flux-CT (Tóth 2000). This method is robust and preserves a numerical discretization of Equation (6) to machine precision, although approaches using upwinded electromotive forces can deliver superior performance on at least certain problems (Gardiner & Stone 2008; White et al. 2016) and can be extended to grids that are not logically Cartesian (Duffell 2016).

3.2. Radiation Moment Evolution

The conserved radiation four-momentum $\sqrt{-g}{R}^{0}{}_{\nu }$ is discretized spatially at zone centers. The samples in each zone will subsequently close the evolution equations for $\sqrt{-g}{R}^{0}{}_{\nu }$ by providing ${R}^{i}{}_{j}$. In this section, we assume that the complete stress tensor is known.

Similarly to the fluid evolution, we reconstruct from zone centers to faces using monotonized central or WENO5, and then calculate fluxes using the local Lax–Friedrichs solver. However, our radiation moment procedure differs from our treatment of advection for MHD in two important ways.

First, we reconstruct conserved variables and fluxes directly, rather than primitive variables. While reconstructing primitive variables is sometimes advantageous for hydrodynamic methods (preventing, for example, negative pressures), we have not found our alternative, more convenient approach to behave pathologically in the problems we have considered. In addition, transforming vector/tensor quantities like radiation fluxes or the Eddington tensor to locally orthonormal frames and then reconstructing them is not a unique process. While some choices of frames are obviously better than others from the standpoint of truncation error, free rotations in neighboring frames reconstructed to faces could introduce errors. Second, for the purposes of numerical diffusion, we assume that the wavespeed is always c. This is accurate for free streaming along one direction, but for nearly isotropic radiation, this will overestimate wavespeeds by a factor $\sqrt{3}$, leading to some additional numerical diffusion.

Our fluxes are then given by (again, using local Lax–Friedrichs):

Equation (37)

This approach can produce unacceptably large numerical diffusion when the optical depth per zone is very large: the diffusion applied by local Lax–Friedrichs overestimates that required for stability in what is essentially a parabolic problem, and Equation (37) fails to recover the asymptotic diffusion limit. Previous authors (Jin & Levermore 1996; Sa̧dowski et al. 2013; Foucart et al. 2015; Skinner et al. 2019) have treated this issue by calculating a separate flux valid in the optically thick limit, ${{ \mathcal F }}_{{\rm{r}},\,\mathrm{diff}}^{i}$, and interpolating between these two based on the local optical depth. Here, we follow the procedure described in Foucart et al. (2015). Essentially, we split the energy and momentum fluxes into terms due to radiation advection and radiation diffusion, upwind the advection term, and average the diffusion term to construct ${{ \mathcal F }}_{{\rm{r}},\,\mathrm{diff}}^{i}$, which we then smoothly interpolate toward from ${{ \mathcal F }}_{{\rm{r}}}^{i}$, based on the intensity-weighted frequency-averaged optical depth in the zone Δτzone.

The lab-frame energy and momentum fluxes in the Eddington closure, ${{ \mathcal F }}_{{\rm{r}},\,\mathrm{diff}}^{i}={R}_{\mu }^{i}$, with ${u}_{{\rm{r}}}\equiv {R}_{(0)}^{(0)}$, is (Farris et al. 2008):

Equation (38)

where Fμ is the radiation flux vector, defined such that Fμuμ = 0. We treat the first term as the advection of radiation energy by the fluid, and the subsequent terms as the diffusion of radiation. We adopt the relativistic expression for the flux (but drop time derivatives and the four-acceleration term),

Equation (39)

and evaluate F0 from the condition ${F}_{\mu }{u}^{\mu }=0$. We then construct a final, stable, asymptotic-preserving flux ${{ \mathcal F }}_{{\rm{r}},\mathrm{asym}}^{i}$ by interpolating based on the optical depth in the zone,

Equation (40)

where

Equation (41)

For the advective term in ${{ \mathcal F }}_{{\rm{r}},\,\mathrm{diff}}^{i}$, we reconstruct the fluid primitive variables and ur to each face. We use the reconstructed fluid primitive variables to evaluate fluid coordinate velocities. The average of the left and right coordinate velocities is used to define both the upwind direction and the advective velocity. The advection term is then evaluated using this average velocity and the reconstructed ur on the upwind side of the face.

For the diffusive terms ${F}^{i}{u}_{\mu }+{u}^{i}{F}_{\mu }$ in a flux ${{ \mathcal F }}_{{\rm{r}},\,\mathrm{diff}}^{j}$, we first approximate ${u}_{{\rm{r}},i}$ along direction j as

Equation (42)

We then evaluate the rest of the diffusive terms using left- and right-state fluid quantities, and take their average.

3.3. Samples and Geodesic Integration

We discretize the invariant specific intensity Iν/ν3 with a swarm of samples. Each sample has a unique position xμ and direction vector nμ, and carries an array of Iν/ν3 discretized logarithmically in p0. In practice, we initialize the positions and direction vectors by sampling uniformly in space and on the unit sphere in momentum space, respectively, but this is not a requirement.

For stationary spacetimes (such as Minkowski space and rotating black holes) p0 is invariant (and is equivalent to the frequency at infinity for asymptotically flat spacetimes). This would not hold in dynamical spacetimes, such as compact object mergers. In a tetrad frame with coordinate four-velocity uμ, the comoving frequency is ∝uμnμ. Due to our logarithmic discretization in k0, when considering frequency bins, we evaluate Δν as $\nu {\rm{\Delta }}\mathrm{log}\nu $, where ${\rm{\Delta }}\mathrm{log}\nu $ is a constant.

We evolve xμ and nμ by directly integrating Equation (14), a set of ordinary differential equations, similarly to Dolence et al. (2009). We use the second-order-accurate Heun's method. We adaptively refine our integration to ensure some tolerance is met in Δnμnμ at each step; for the null geodesics we consider, nμnμ = 0, but this will not generally be conserved by our numerical geodesic integration. For spacetimes symmetric in xμ, the source terms on nμ are zero; these quantities are conserved.

Source terms are applied to characteristics in an operator-split fashion after the geodesic update to xμ and nμ just described; see Section 3.8.

3.4. Frame Transformations

We employ two frames in this work: the coordinate frame, and a set of orthonormal tetrad frames comoving with the fluid. Essentially, the transport operators are evaluated in the coordinate frame, and source terms and the Eddington tensor are evaluated in comoving frames. These tetrads are constructed with Gram–Schmidt orthogonalization (e.g., Dolence et al. 2009), producing transformation matrices between tetrad and coordinate frames:

Equation (43)

Equation (44)

accurate to roundoff error.

Fluid tetrads are constructed at the center of each zone. However, when boosting the samples inside a zone into that fluid frame, we construct a separate tetrad transformation at the spatial coordinate of that sample, and then simply interpret the axes of that tetrad as being "close enough" to the zone-centered fluid frame. This ensures that samples remain normalized in the zone-centered fluid frame; transforming a vector with a tetrad transformation evaluated at a different spatial coordinate will in general affect the normalization of that vector. However, this process is a source of error in sample positions on the unit sphere in the comoving frame. Note that, in curved space, there is no unique way to assign angles between vectors that do not share spatial coordinates.

3.5. Angular Reconstruction

In the comoving frame, we wish to compute integrals of the specific intensity over solid angle. We treat the samples as support points and then define a quadrature rule. A simple approach would be the traditional Monte Carlo method, in which every particle has equal angular "weight" and the sample intensities are simply summed over. Here, we adopt a more accurate approach, although MOCMC is largely agnostic in this respect.

To reconstruct momentum space, we construct a Delaunay triangulation, with the samples in each zone acting as vertices. To do this, we actually construct the convex hull, the smallest-volume region that contains the samples (or the closed surface one gets from "shrinkwrapping" the samples) in $\sim { \mathcal O }({N}_{\mathrm{samp}}\mathrm{log}{N}_{\mathrm{samp}})$ time using the CGAL4 library's implementation (Hert & Schirra 2018) of the quickhull algorithm (Barber et al. 1996). Here, Nsamp is the number of samples in a zone. The facets of this hull, projected onto the unit sphere, are equivalent to the spherical Delaunay triangulation. Figure 1 shows the convex hull of 64 points sampled uniformly on the unit sphere.

Figure 1.

Figure 1. Convex hull of 64 random points lying on the unit sphere. Vertices of triangles correspond to MOCMC samples. Projection of each triangle onto the unit sphere is the Delaunay triangulation of that sphere.

Standard image High-resolution image

For each spherical triangle, we calculate the spherical excess e, or solid angle ${\rm{\Delta }}{\rm{\Omega }}$ subtended by the spherical triangle, with l'Huilier's theorem,

Equation (45)

where $s=\left(\alpha +\beta +\gamma \right)/2$ and α, β, γ are the angles between each pair of vertices measured from the origin. We will use these ΔΩ both to calculate the Eddington tensor and to angle-average intensities and opacities when evaluating fluid-radiation interactions.

For computational efficiency when evaluating angular quadratures over this triangulation, we interpolate the comoving-frame specific intensities for each sample onto a common frequency grid.

In the event that a zone contains fewer than four samples, the convex hull is not defined; instead, we set ${\pi }^{(i)}{}_{(j)}={\delta }^{(i)}{}_{(j)}/3$ and ${\rm{\Delta }}{\rm{\Omega }}=4\pi /{N}_{\mathrm{samp}}$. In practice, this is rare; our adaptive approach to sampling (Section 3.7) generally prevents this for even a modest (∼16) average number of samples per zone.

3.6. Eddington Tensor

The evaluation of ${R}^{i}{}_{j}$ is divided into two parts. First, we calculate the comoving frame ${\pi }^{(i)}{}_{(j)}$ by integrating the frequency-integrated intensities at the vertices of the triangulation over the unit sphere. Second, we calculate the comoving frame four-momentum such that, when we transform the comoving frame radiation stress–energy tensor back to the coordinate frame, we recover the coordinate frame four-momentum we started with. Note that the evaluation of ${R}^{(0)}{}_{(\mu )}$ from ${R}^{0}{}_{\mu }$ depends on ${\pi }^{(i)}{}_{(j)}$, hence the complexity of this second part.

For integrating the Eddington tensor, we adopt a simple quadrature rule. For a spherical triangle with solid angle ΔΩ and vertices with weights (here, frequency-integrated intensities) w1, w2, and w3, the contribution to a component of the Eddington tensor is

Equation (46)

where the n(i), n(j) are evaluated at each vertex in the sum.

To increase accuracy at modest additional cost, we adopt the method of Boal & Sayas (2004), albeit with a different quadrature rule for individual triangles. For each initial triangular face, one may subdivide this triangle into four subfaces and integrate these subfaces individually. The resulting integral of a quantity over the sphere at a refinement level N is then denoted IN. Boal & Sayas (2004) conjecture that these refinement levels may then be combined in a Richardson extrapolation-like manner to produce higher-order results, at least for weights known exactly (we simply average our weights to midpoints, although the n(i), n(j) we use are exact). We use one refinement level, i.e., the coarsest realization of this approach, which is conjectured to behave as:

Equation (47)

which is consistent with our limited numerical experiments. On nearly isotropic multizone problems in MOCMC, we have observed reductions in error in gas temperature of up to 30× compared to results based on the single level integration scheme.

Given a set of triangles, the Eddington tensor is then

Equation (48)

where l indexes the triangulation faces, m indexes the vertices of each triangle, Im is the frequency-integrated intensity at the mth vertex, and n(i) is the unit vector for each vertex.

We now have ${R}^{0}{}_{\nu }$ in the coordinate frame and ${\pi }^{(i)}{}_{(j)}$ in the comoving frame; we want to recover a complete radiation stress tensor in the coordinate frame. The coordinate-frame four-momentum is related to the comoving frame stress–energy tensor by transformation matrices

Equation (49)

Here, ${R}^{(i)}{}_{(j)}=-{R}^{(0)}{}_{(0)}{\pi }^{(i)}{}_{(j)}$ and ${R}^{(\nu )}{}_{(i)}=-{R}^{(i)}{}_{(\nu )}$, so we can expand the right-hand side to recover a system of four linear equations for the unknowns ${R}^{(0)}{}_{(\nu )}$. By inverting a 4 × 4 matrix, we recover ${R}^{(0)}{}_{(\nu )}$, which in turn yields ${R}^{(\mu )}{}_{(\nu )}$ through ${\pi }^{(i)}{}_{(j)}$, which can then be transformed back to ${R}^{\mu }{}_{\nu }$.

3.7. Dynamic Sample Resolution

An initial set of samples will stream out of outflow boundary conditions on the light-crossing time of the simulation volume. Evidently, samples must be replenished in such situations. In addition, the number of samples per zone will fluctuate in multizone problems, especially when grids are irregular or gradients in Lorentz factor are appreciable, and we wish to ensure that the number of samples per zone never becomes too high or too low. Such a procedure also allows for dynamically controlling sample resolution: sensitive regions of integrations may require more samples than average.

Our approach to sample refinement and derefinement is simple and not unique. We first impose a desired number of samples per zone, which can in general depend on the local MHD or radiation properties. We then use this number of samples to define maximum and minimum solid angles for triangles on the unit sphere.

If our triangulation results in a triangle with a solid angle above the maximum, we create a sample nearly at the center of this face and randomly positioned inside the zone with a specific intensity that is the average of the triangle's vertices. Samples are not created exactly at the face center, to avoid providing the convex hull routine with two colocated vertices.

If our triangulation results in a triangle with a solid angle below the minimum, we identify the shortest edge of that triangle and randomly mark one of the two samples that form that edge for deletion.

3.8. Emission, Absorption, and Scattering

Radiation interacts with plasma via emission, absorption, and scattering. For samples, these interactions are processed deterministically along characteristics. For the moment sector, we use sample intensities to frequency-average the opacities. Scattering is evaluated by using samples to construct an angle-averaged comoving spectrum, and evolving this spectrum with a scattering kernel. The change in four-momentum in the radiation moments determines the change in four-momentum of the fluid.

At large optical depths and/or small ratios of gas-to-radiation pressure, the characteristic timescale for four-momentum exchange between fluid and radiation can become much shorter than the global simulation time step, and the problem becomes stiff. Strong coupling can be stabilized with implicit methods. For time-dependent radiation transport, implicit methods can be applied on a per-zone or semi-implicit (i.e., the scheme remains explicit in spatial fluxes) basis, a major computational efficiency over global implicit solves. However, for intensities discretized in frequency and solid angle, such a semi-implicit solve could still require inverting a large matrix.

Instead, we adopt the "inner" and "outer" loop approach of Skinner et al. (2019), in which one rootfinds over only one or a few nonlinear equations in an outer loop (indexed by k), and in each step of that rootfind updates intensities in a semi-implicit fashion using the most recent (kth) value for the gas temperature to evaluate emissivities and absorptivities. We initialize this procedure by angle-averaging our sample intensities at time step n, where we have used linear interpolation to shift the comoving sample intensities ${I}_{\nu }^{n}$ onto a common frequency grid in the comoving frame:

Equation (50)

3.8.1. Inner Loop

Our inner loop is composed of two steps. First, we use the Kompaneets equation to evaluate ${{ \mathcal J }}_{\nu }^{{\rm{s}},\,k}$ (Equation (32)) and ${\rm{\Delta }}{u}_{{\rm{r}}}^{{\rm{s}},\,k}$, the change in the comoving radiation energy density due to inelastic scattering, calculated as

Equation (51)

In general, the integral of the ${{ \mathcal I }}_{\nu }$ evaluated from the samples will not correspond to the moment sector's ${u}_{{\rm{r}}}$. Rather than normalizing ${{ \mathcal I }}_{\nu }^{n}$ to recover ${u}_{{\rm{r}}}^{n}$, we normalize ${\rm{\Delta }}{u}_{{\rm{r}}}^{{\rm{s}}}$ by the ratio of the energy density evaluated in the sample sector to that of the moment sector, avoiding issues with maintaining thermal spectra in the samples.

We adopt the numerical method of Chang & Cooper (1970) for solving the Kompaneets equation. Here, we briefly review this method. We discretize the equation for the evolution of photon occupation number n over $x=h\nu /{k}_{{\rm{B}}}{T}_{{\rm{e}}}$ as:

Equation (52)

where Δτ is the elapsed proper time of the fluid from n to n + 1 and

Equation (53)

Equation (54)

Equation (55)

where the $0\leqslant {\delta }_{i}\leqslant 0.5$ are chosen to ensure stability using a quasi-equilibrium distribution neq,

Equation (56)

Equation (57)

Note that ${F}_{i+1/2}^{* }$ contains both ${n}_{i}^{n+1}$ and ${n}_{i}^{n};$ this discretization is not fully implicit, a potential source of instability—especially where n is much greater than unity (for example, scattering of lines with brightness temperatures much greater than the fluid temperature). We enforce ${F}^{* }=0$ at the boundaries, thereby conserving photon number to machine precision. After each update, we enforce a floor such that ${n}_{i}^{n+1}\geqslant {10}^{-100}$.

We solve this tridiagonal system of equations in ${ \mathcal O }({N}_{\mathrm{bin}})$ time, where Nbin is the number of frequency bins. This semi-implicit method can occasionally fail. We identify such situations by measuring the change in photon number density; if this quantity varies fractionally over a step by more than 10−8, we repeat the calculation without the nonlinear terms, yielding a fully implicit solution. One could also use an iterative method to solve the original equation in a fully implicit way; evidently, the nonlinear terms are important when the semi-implicit method fails. However, we adopt our simpler approach to ensure stability and avoid nonlinear multidimensional rootfinding, at the potential cost of approaching Wien rather than Bose–Einstein photon distributions in scattering-dominated media. Other methods for discretizing the Kompaneets equation (e.g., Larsen et al. 1985) may be less susceptible to this issue.

Another numerical difficulty is that calculation of the δi requires evaluation of a quasi-equilibrium solution. Here, we follow Chang & Cooper (1970) and choose a Bose–Einstein distribution:

Equation (58)

where C, related to the photon chemical potential, is evaluated such that neq and n yield the same photon number density. Here, neq is singular at a point x > 0 for C < 1, which occurs when the photon number is greater than that of a blackbody at temperature Te. We avoid this difficulty by enforcing C ≥ 2 (i.e., neq ≤ 1 everywhere) when calculating the δi. We have not found this trick to damage stability or accuracy.

In the second step, we compute angle- and frequency-averaged opacities and integrated emissivities. In the kth iteration of the outer loop, we approximate the updated angle-averaged spectrum via a backward Euler discretization:

Equation (59)

where ${\widetilde{\alpha }}_{\nu }$ is the intensity-weighted, angle-averaged opacity at frequency ν. With these updated intensities in hand, we compute the frequency- and angle-averaged opacities:

Equation (60)

Equation (61)

where the summation is over frequency bins. We also integrate the emissivity in a similar fashion, rather than analytically, so that truncation error in only absorption coefficient integration does not prevent the fluid from thermalizing effectively for finite numbers of frequency bins:

Equation (62)

For clarity, we left these expressions in terms of integrals over solid angle. In practice, we employ the same quadrature rule we described previously.

3.8.2. Outer Loop

In GRRMHD, the four-force update is four coupled equations. Previous authors have evaluated this in a fully nonlinear way with a 4D rootfind (Roedig et al. 2012; Sa̧dowski et al. 2013; McKinney et al. 2014) or a linearized 4D solve (Foucart et al. 2015). Here, we adopt a more efficient approach, performing a 1D nonlinear solve for the gas energy density (e.g., Skinner et al. 2019) in the comoving frame. We then construct an entire four-force G(μ).

For our 1D rootfind, we write the gas energy update implicitly, and solve iteratively for ${u}_{{\rm{g}}}^{n+1}$ with a secant method:

Equation (63)

where ${u}_{{\rm{r}}}={R}^{(0)}{}_{(0)}$. In the ${k}^{\mathrm{th}}$ iteration, we compute ${u}_{{\rm{r}}}^{k+1}$, our newest estimate of ${u}_{{\rm{r}}}^{n+1}$, from Equation (29) as

Equation (64)

Next, we use Equation (63) to evaluate a residual as

Equation (65)

and use the secant formula to compute our next guess for the gas energy, ${u}_{{\rm{g}}}^{k+1}$. Convergence is reached when a sufficiently small residual is computed, at which point we set ${u}_{{\rm{g}}}^{n+1}={u}_{{\rm{g}}}^{k+1}$. This implicit approach maintains stability when energy exchange is significant over a time step ${\rm{\Delta }}\tau $. The secant method occasionally fails. In such cases, we repeat the rootfind using bisection.

Once ${u}_{{\rm{g}}}^{n+1}$ is found, the radiation four-force is then calculated as

Equation (66)

Equation (67)

where ${R}^{(0)}{}_{(i)}$ is updated via backward Euler as

Equation (68)

The four-force is then transformed to the lab frame and applied to ${T}^{0}{}_{\nu }$ and ${R}^{0}{}_{\nu }$ using Equations (20) and (21). We also update the individual sample intensities in a backward Euler manner:

Equation (69)

From our experiments, this approach shows excellent stability. Essentially, we exploit the different forms of G(0) and G(i) in the comoving frame using an operator split; while G(0) is the difference of an emission coefficient and an absorption coefficient, both of which can be large, three-momentum exchange has only one term: ${G}_{(i)}=-\overline{\alpha }{R}^{(0)}{}_{(i)}$. Thus, while we rely on a numerical rootfind to evaluate the energy exchange, we can analytically evaluate the implicit momentum update. Since these interaction terms are typically treated with backward Euler for stability, this simple operator split does not degrade the temporal order of accuracy of the scheme.

3.9. Time Integration

Our method for time integration largely parallels the second-order midpoint scheme in harm (Gammie et al. 2003). While we could process the radiation subsystem separately in a first-order fashion (e.g., Jiang et al. 2014a; Ryan et al. 2015; Foucart 2018), i.e., one source term evaluation per time step, we have found improved performance on transport tests when using a second-order-in-time update to the advective fluxes of the radiation stress–energy tensor. The midpoint method also allows larger CFL numbers than an Euler step, so it is unclear whether we actually increase the cost of our scheme by going to second-order accuracy in time for advective fluxes. However, source term updates are still first-order in time. We typically use CFL = 0.8−0.9, independent of optical depth. Regardless of order of temporal accuracy, it is crucial, as we do here, to process in advance radiation interactions for any radiation moments used to source advective fluxes, in order to correctly recover diffusion speeds in optically thick media.

Here, we enumerate a complete time step from n to n + 1. Tildes denote which quantities have been updated by radiation interactions at their current n.

  • 1.  
    Advect MHD conserved variables, ${\widetilde{U}}_{{\rm{g}}}^{n}\to {U}_{{\rm{g}}}^{n+1/2}$ sourced by ${\widetilde{U}}_{{\rm{g}}}^{n}$ (Section 3.1), and apply boundary conditions.
  • 2.  
    Advect radiation moments, ${\left({\widetilde{R}}^{0}{}_{\nu }\right)}^{n}\to {\left({R}^{0}{}_{\nu }\right)}^{n+1/2}$ sourced by ${\left({\widetilde{R}}^{\mu }{}_{\nu }\right)}^{n}$ (Section 3.2), and apply boundary conditions.
  • 3.  
    Calculate angle-averaged comoving intensity ${{ \mathcal I }}_{\nu }^{n}$ (Equation (50)), to be used for scattering in both Steps 7 and 14.
  • 4.  
    Push samples along geodesics, ${({x}^{i},{n}_{\mu })}^{n}\to {({x}^{i},{n}_{\mu })}^{n+1/2}$ and ${\left({\widetilde{I}}_{\nu }/{\nu }^{3}\right)}^{n}\to {\left({I}_{\nu }/{\nu }^{3}\right)}^{n+1/2}$ (Section 3.3), and apply boundary conditions.
  • 5.  
    Boost samples to the fluid frame (Section 3.4) and construct triangulations in each zone (Section 3.5).
  • 6.  
    Integrate sample intensities over frequency and solid angle using triangles to evaluate ${\left({\pi }^{(i)}{}_{(j)}\right)}^{n+1/2}$ and then ${\left({R}^{i}{}_{j}\right)}^{n+1/2}$ (Section 3.6).
  • 7.  
    Calculate radiation four-force at n+1/2, apply to conserved MHD and radiation quantities, ${U}_{{\rm{g}}}^{n+1/2}\to {\widetilde{U}}_{{\rm{g}}}^{n+1/2}$ and ${\left({R}^{0}{}_{\mu }\right)}^{n+1/2}\to {\left({\widetilde{R}}^{0}{}_{\mu }\right)}^{n+1/2}$, and sample intensities ${\left({I}_{\nu }/{\nu }^{3}\right)}^{n+1/2}\to {\left({\widetilde{I}}_{\nu }/{\nu }^{3}\right)}^{n+1/2}$ (Section 3.8).
  • 8.  
    Recalculate ${\left({\widetilde{\pi }}^{(i)}{}_{(j)}\right)}^{n+1/2}$ with the ${\widetilde{I}}_{\nu }^{n+1/2}$ using the same triangulation, and use to evaluate ${\left({\widetilde{R}}^{i}{}_{j}\right)}^{n+1/2}$
  • 9.  
    Advect MHD conserved variables, ${\widetilde{U}}_{{\rm{g}}}^{n}\to {U}_{{\rm{g}}}^{n+1}$ sourced by ${\widetilde{U}}_{{\rm{g}}}^{n+1/2}$ (Section 3.1), and apply sources to sample boundary conditions.
  • 10.  
    Advect radiation moments, ${\left({\widetilde{R}}^{0}{}_{\nu }\right)}^{n}\to {\left({R}^{0}{}_{\nu }\right)}^{n+1}$ sourced by ${\left({\widetilde{R}}^{\mu }{}_{\nu }\right)}^{n+1/2}$ (Section 3.2), and apply boundary conditions.
  • 11.  
    Push samples along geodesics, ${({x}^{i},{n}_{\mu })}^{n+1/2}\,\to {({x}^{i},{n}_{\mu })}^{n+1}$ and ${\left({\widetilde{I}}_{\nu }/{\nu }^{3}\right)}^{n+1/2}\to {\left({I}_{\nu }/{\nu }^{3}\right)}^{n}$ (Section 3.3), and apply boundary conditions.
  • 12.  
    Boost samples to the fluid frame (Section 3.4) and construct triangulations in each zone (Section 3.5).
  • 13.  
    Integrate sample intensities over frequency and solid angle using triangles to evaluate Eddington tensor ${\left({\pi }^{(i)}{}_{(j)}\right)}^{n+1}$ and ${\left({R}^{i}{}_{j}\right)}^{n+1}$ (Section 3.6).
  • 14.  
    Calculate radiation four-force at n + 1, apply to conserved MHD and radiation quantities, ${U}_{{\rm{g}}}^{n+1}\to {\widetilde{U}}_{{\rm{g}}}^{n+1}$ and ${\left({R}^{0}{}_{\mu }\right)}^{n+1}\to {\left({\widetilde{R}}^{0}{}_{\mu }\right)}^{n+1}$, and apply sources to sample intensities ${\left({I}_{\nu }/{\nu }^{3}\right)}^{n+1}\to {\left({\widetilde{I}}_{\nu }/{\nu }^{3}\right)}^{n+1}$ (Section 3.8).
  • 15.  
    Recalculate ${\left({\widetilde{\pi }}^{(i)}{}_{(j)}\right)}^{n+1}$ with the ${\widetilde{I}}_{\nu }^{n+1}$ using the same triangulation, and use to evaluate ${\left({\widetilde{R}}^{i}{}_{j}\right)}^{n+1}$

4. Tests

We now consider a suite of tests including large and small optical depths, large and small ratios of radiation to gas pressures, relativistic motion, and curved spacetime. Apart from testing convergence, we focus on resolutions (∼64 samples per zone) that are realistic for global simulations.

For tests without periodic boundaries, we adopt the resampling procedure described in Section 3.7 such that we add or remove samples in order to preserve approximately the same number of samples per zone for the duration of each simulation.

In several places, we will compare MOCMC's performance on these tests to Eddington and M1 closures, as well as frequency-integrated ("gray") source terms. In doing so, we focus on aspects in which discrepancies arise between angle- or frequency-averaged methods and transport solutions like MOCMC. Because MOCMC evolves the radiation four-momentum in order to conserve total four-momentum, and the MOCMC samples act largely as a closure on the moment evolution equations, implementation of Eddington and M1 closures—along with gray opacities—into our method is straightforward. However, we restrict our moment implementation to emission, absorption, and isotropic elastic scattering; inelastic scattering (e.g., Sa̧dowski & Narayan 2015) is neglected. We use the Planck mean opacity for the source terms G(μ), either with a gray opacity or the expression for bremsstrahlung emissivity given in Rybicki & Lightman (1979).5

Briefly, we review here Eddington and M1 closures. These closures specify the spatial part ${R}_{(j)}^{(i)}$ of the radiation stress tensor. The Eddington closure assumes that the radiation is isotropic in the frame of the fluid; this is well-motivated at large optical depths because ${I}_{\nu }\to {B}_{\nu }$ as $\tau \to \infty $, and Bν has no angular structure. This leads to

Equation (70)

The M1 closure, as often adopted, assumes that the radiation is isotropic in a frame not necessarily comoving with the fluid; see Levermore (1984) for an example, but cf. Minerbo (1978) for an alternative. The specific flux ${f}^{i}\equiv {R}^{0i}/{R}^{00}$ is used to calculate the frame of isotropy. In flat space, this yields

Equation (71)

where

Equation (72)

For f(i) = 0, this expression for ${R}^{(i)}{}_{(j)}$ recovers the Eddington closure. For pure streaming along a coordinate axis, e.g., f(x) = 1, ${R}^{(i)}{}_{(j)}=-{\delta }^{(i)}{}_{(x)}{\delta }^{(x)}{}_{(j)}{R}^{(0)}{}_{(0)}$. The closure transitions smoothly between these limits. Note that this closure uses all the information available locally from the first moment (the conserved four-momentum, expressed here as ${R}^{(0)}{}_{(0)}$ and f(i)).

Our method for evaluating ${R}^{i}{}_{j}$ given ${R}^{0}{}_{\mu }$ and ${\pi }^{(i)}{}_{(j)}$ (Section 3.6) does not generalize to the M1 closure, which depends on ${R}^{(0)}{}_{(\mu )}$. Instead, we use the approach of Sa̧dowski et al. (2013) to first recover ur and the radiation four-velocity ${u}_{{\rm{r}}}^{\mu }$ from ${R}^{0}{}_{\mu }$. We then use their covariant expression for the radiation stress–energy tensor using the M1 closure,

Equation (73)

to evaluate ${R}^{\mu }{}_{\nu }$ in the coordinate frame. We then transform this quantity to the fluid frame with the tetrad transformations employed elsewhere in the code, where we recover ${\pi }^{(i)}{}_{(j)}={R}^{(i)}{}_{(j)}/{R}^{(0)}{}_{(0)}$.

When considering convergence, we disable adaptive sample refinement in order to more finely control the sample resolution.

4.1. Hohlraum Streaming

Consider a hohlraum boundary condition at x = 0 and temperature T such that Iν = Bν(T), and a vacuum for x > 0. The radiation energy density at the boundary is ${u}_{{\rm{r}},0}={a}_{{\rm{r}}}{T}^{4}$. Radiation will propagate in the positive x direction.

The time-dependent analytic solution is evaluated by sending characteristics backward in time over all θ from position x ($\theta =0$ corresponds to the $+x$ direction) and determining whether they reach the hohlraum boundary by t = 0. The specific intensity is then

Equation (74)

where ${\theta }_{\max }={\cos }^{-1}\left(x/{ct}\right)$, the radiation energy density is

Equation (75)

and the Eddington factor is

Equation (76)

At late time, ${\theta }_{\max }\to \pi /2;$ while the intensity is far from thermal, the Eddington factor ${f}^{(x)}{}_{(x)}=1/3$, exactly the value for Iν = Bν. Although simple, this problem is analogous to physical situations encountered in radiation transport, in which a thermal object radiates into a tenuous atmosphere or ambient medium in nearly plane-parallel symmetry.

The hohlraum boundary condition in our simulation is enforced by setting the radiation moments to the value for a blackbody at temperature T. For MOCMC, we randomly distribute samples in the boundary zone at each time step, with Iν = Bν for these samples. However, because we are studying convergence on this problem, we want to avoid the discontinuity in radiation energy density at x = 0. Instead, we consider the boundary condition slightly away from x = 0, where only characteristics moving in the +x direction are thermal. Hence, our boundary condition is

Equation (77)

Equation (78)

at x = 0. Note that Eddington and M1 produce similar results for this and an isotropic thermal boundary with Iν = Bν and the corresponding ${R}^{\mu }{}_{\nu }$. The right boundary condition is placed at large enough x to be causally disconnected from the simulation region shown.

Figure 2 compares Eddington, M1, and MOCMC closures on this test at t = 0.75 and t = 5. The assumption in M1, that there is a frame in which the radiation is isotropic, is not satisfied here. Additionally, ${f}^{(x)}{}_{(x)}=1/3$ at late time while f(x) > 0, which is inconsistent with Equations (71) and (72). Even in a time-independent sense, M1 leads to an order unity error in the radiation energy density, unlike the Eddington closure.6 MOCMC accurately matches the analytic solution for both ur and ${f}^{(x)}{}_{(x)}$.

Figure 2.

Figure 2. Comparison for the hohlraum streaming test showing radiation energy density ur and Eddington factor ${f}^{(x)}{}_{(x)}$ for Eddington, M1, and MOCMC methods at t = 0.75 for 128 zones between x = 0 and x = 1. Analytic solutions at times t = 0.75 and t = 5 are shown as black dashed and dotted lines; simulation results are shown as red and blue lines. The Eddington closure propagates as a pure wavefront moving at $v\sim c/\sqrt{3}$. M1 significantly overestimates ${f}^{(x)}{}_{(x)}$, because there is no frame in which the radiation is isotropic in this problem. MOCMC (here with 60–80 samples per zone) agrees with the solution in both ur and ${f}^{(x)}{}_{(x)}$, although it introduces noise. The bias in ${f}^{(x)}{}_{(x)}$ in the MOCMC solution is introduced by the interpolation of weights used when calculating ${\pi }^{(i)}{}_{(j)}$. For the MOCMC solution, at t = 0.75, no radiation from the hohlraum boundary has propagated beyond x = 0.75; samples at x > 0.75 have vanishingly small, uniform intensities, and the Eddington tensor integration produces nearly (1/3).

Standard image High-resolution image

Convergence is shown in Figure 3. Evidently, we recover approximately first-order convergence in Nsamp, unlike the ${N}_{\mathrm{samp}}^{-1/2}$ for a Monte Carlo method. This is a result of using the Delaunay triangulation to calculate ${\pi }^{(i)}{}_{(j)};$ essentially, the triangulation provides a more accurate estimate of the solid angle owned by each sample. We do not expect convergence better than first order on this test, which contains a discontinuity in momentum space.

Figure 3.

Figure 3. Convergence of the hohlraum streaming test for MOCMC at t = 0.75 with mean number of samples per zone Nsamp. Convergence is nearly ${N}_{\mathrm{samp}}^{-1}$, rather than the Monte Carlo ${N}_{\mathrm{samp}}^{-1/2}$. Note that there is stochastic sampling error in this test; samples are initially distributed randomly on the unit sphere, and are randomly distributed at the thermal boundary.

Standard image High-resolution image
Figure 4.

Figure 4. Comparison for the 2D hohlraum streaming test with 64 × 64 zones showing radiation energy density at t = 0.75. Contours are spaced 0.1 apart. Moment closures differ qualitatively from the true solution. The Eddington closure generates a hot spot of radiation along the diagonal. M1 creates an even more dramatic jet of radiation along the diagonal. MOCMC recovers the semianalytic transport solution, although it introduces noise. The MOCMC solution used ∼64 samples per zone. At finite time, Eddington and M1 closures produce much stronger gradients in radiation energy density. Note that, unlike a Newtonian diffusion equation, the Eddington closure to the radiation moments produces self-interaction like M1. At this resolution in samples, the MOCMC solution shows some radiation self-interaction as well, due to truncation error; however, this decreases with increasing sample resolution.

Standard image High-resolution image

4.2. Two-dimensional Hohlraum

Now consider a 2D box with hohlraum boundary conditions on both the x = 0 and y = 0 boundaries.

We construct a solution for comparison via a simple Monte Carlo method. On a grid of positions (x, y) and time t, we sample characteristics uniformly on the sphere, propagate them back to t = 0, and ask whether they intersect a hohlraum boundary. Summing intensities over a solid angle in each zone gives ur.

Unlike in the 1D hohlraum test, the modified boundaries with nonzero fluxes are no longer valid, so we set the boundary conditions to simply be thermal at x = 0 and y = 0. The results for Eddington, M1, and MOCMC compared to the semianalytic solution are shown in Figure 4.

This test shows that multidimensional effects are important to monitor when discriminating between transport algorithms. In particular, both moment methods exhibit significant interactions between the wavefronts from the two boundary conditions. These interactions lead to much larger radiation energy densities in the moment methods than are encountered in either MOCMC or the semianalytic solution. The MOCMC solution at 64 samples per zone also exhibits some radiation self-interaction due to truncation error in the Eddington tensor evaluation, but this self-interaction decreases with the number of samples and is already much lower than that seen in the moment methods.

Figure 5 shows the change in the MOCMC solution with increasing sample resolution from 16 to 128 samples per zone. While the boundary prescription we adopt in this multidimensional test makes formal convergence testing difficult, the MOCMC solution appears to approach the semianalytic solution in most of the domain as the sample resolution is increased.

Figure 5.

Figure 5. Change in the MOCMC solution for the 2D hohlraum test for numbers of samples per zone 16, 32, 64, and 128. With increasing sample resolution, the MOCMC solution transitions from something resembling the Eddington tensor solution in Figure 4 to the semianalytic transport solution in the same figure. Shot noise also decreases with increasing sample resolution.

Standard image High-resolution image

4.3. Thermalization

Thermalization provides a useful test of the code's ability to recover a basic feature of radiation hydrodynamics—equilibration between material and radiation temperatures. We repeat the bremsstrahlung thermalization test from Ryan et al. (2015) on a 3 × 3 grid of spatial zones, with a much larger initial gas temperature ${T}_{{\rm{g}},0}={10}^{9}\,{\rm{K}}$ and electron number density ${n}_{{\rm{e}}}=6\times {10}^{16}\,{\mathrm{cm}}^{-3}$. There is no radiation initially. The gas and radiation are allowed to proceed toward equilibrium. We compare to a frequency-dependent semianalytic solution in Figure 6.

Figure 6.

Figure 6. Thermalization via bremsstrahlung, comparing a gray approach and the multigroup MOCMC method to the frequency-dependent semianalytic solution. The shifting $\exp \left(-h\nu /{k}_{{\rm{B}}}T\right)$ factor in the emissivity causes an undershoot in the gas temperature at intermediate times, as the initially emitted radiation is not easily reabsorbed by the gas, which is now much colder. Gray methods that evolve only the radiation four-momentum, and so do not know about the frequency distribution, do not capture this effect, leading in this case to an order unity error in the gas temperature. Note that there is no error related to angular discretization in this isotropic problem.

Standard image High-resolution image

We also compare to frequency-integrated source terms i.e., we use a Planck mean opacity rather than an opacity averaged over the samples. Because the exponential cutoff in the emissivity shifts dramatically downward in frequency, the timescale to thermalize radiation that is emitted initially is very long, resulting in an undershoot of the gas temperature. This is not captured by a gray method, which cannot know the frequency distribution of radiation. Figure 7 shows the frequency distribution of radiation at different times during this test.

Figure 7.

Figure 7. Evolution of specific intensity for bremsstrahlung thermalization test, for the MOCMC and semianalytic solutions, which show good agreement. At all times, the specific intensity is highly nonthermal.

Standard image High-resolution image

4.4. Spiegel Linear Mode

The time evolution of a temperature perturbation in an otherwise uniform medium in radiative equilibrium with gray absorption coefficient α permits an exact solution under the assumption that the time-dependent terms in the radiative transfer equation are small (Spiegel 1957; Mihalas & Mihalas 1984). Note that this test assumes that light is transported much faster than the mode decay time; attempting to recreate this test in a slow-light code like ours will generally introduce some numerical diffusion through the Riemann solver in the radiation sector.

Unlike Ryan et al. (2015), here we hold α0, T0, and ${{ct}}_{\mathrm{RR}}/L$ constant. This problem requires that the relaxation rate be slow compared to the light-crossing time for the perturbation wavelength. We use 32 grid zones to simulate one wavelength.

We measure the relaxation rate by fitting the form of the linear solution to the numerical result after one e-folding time. We compare to the gas temperature only, because the perturbed radiation energy density is not trivial when the optical depth is finite. We show the performance across optical depth by comparing measured dispersion rates for Eddington, M1, and MOCMC to the analytic solutions, both for transport and for the Eddington closure, in Figure 8.

Figure 8.

Figure 8. Dispersion relation, and fractional error, as a function of optical depth per wavelength τ for the Spiegel linear mode test. Analytic solutions are shown, both for full transport and using the Eddington approximation. M1 and Eddington are essentially identical in this test; the anisotropy in the intensity is only perturbative, so ${f}^{(x)}\ll 1$ always, and for the full transport solution, the Eddington factor ${f}^{(x)}{}_{(x)}$ of the perturbation varies between 0 and 1/3, whereas for M1, ${f}^{(x)}{}_{(x)}\in [1/3,1]$. MOCMC shows good agreement with the full transport solution.

Standard image High-resolution image

We also show the analytic solution for the Eddington approximation. For the moderately optically thick limit, these closures produce similar errors, ≲20%. M1 does not distinguish between isotropic and anisotropic components, and the isotropic component dominates the four-momentum used to compute ${f}^{(x)}{}_{(x)}$.

The Eddington factor for the perturbation is

Equation (79)

for $\tau \to \infty $, ${f}^{(x)}{}_{(x)}\to 1/3;$ as expected, the Eddington approximation is appropriate. For $\tau \to 0$, however, ${f}^{(x)}{}_{(x)}\to 0$, whereas Eddington and M1 closure both assume ${f}^{(x)}{}_{(x)}\geqslant 1/3;$ the perturbation in the radiation field becomes oblate along the x axis. Eddington factors less than 1/3 also appear in radiative shocks (Jiang et al. 2014a). Clearly, standard moment closure models are invalid here, and yet such closures recover the correct dispersion relation at small τ. Mihalas & Mihalas (1984) point out that this is because, for $\tau \to 0$, relaxation is determined entirely by emission.

4.5. Comptonization

We repeat the setup from Ryan et al. (2015) of thermalization of soft photons due to Compton upscattering in a one-zone box. For this test, we use 32 samples per zone, although there is no angular structure, so there is no truncation error due to solid angle discretization (note the absence of noise in the solution). We use 100 frequency bins, logarithmically spaced from ${10}^{8}$ to ${10}^{20}\,\mathrm{Hz}$. We initialize the gas with electron and proton number densities ${n}_{{\rm{e}}}=2.5\times {10}^{17}\,{\mathrm{cm}}^{-3}$ and temperature ${T}_{{\rm{g}},0}=5\times {10}^{7}\,{\rm{K}}$. The radiation is initially monochromatic at frequency ${\nu }_{0}=3\times {10}^{16}\,\mathrm{Hz}$ and photon number density ${n}_{\gamma }=2.38\times {10}^{18}\,{\mathrm{cm}}^{-3}$.

The characteristic timescales in this problem are the mean time between scattering events, ${t}_{{\rm{s}}}=1/({n}_{{\rm{e}}}{\sigma }_{{\rm{T}}}c)\approx 2\,\times \,{10}^{-4}\,{\rm{s}}$, and the Comptonization time, i.e., the time between scatterings divided by the fractional energy transfer per scattering event, ${t}_{{\rm{C}}}={t}_{{\rm{s}}}{m}_{{\rm{e}}}{c}^{2}/({k}_{{\rm{B}}}{T}_{{\rm{e}}})\approx 2.4\,\times \,{10}^{-2}\,{\rm{s}}$.

We calculate the equilibrium temperature with conservation of energy and photon number. Unlike Ryan et al. (2015), here we assume that the final photon distribution is Bose–Einstein rather than Wien; the final temperature Tf is found by solving

Equation (80)

where μ is the chemical potential of the photons and ${\mathrm{Li}}_{s}\left(z\right)$ is the polylogarithm. For this test, the photon occupation number remains much less than one, and Tf closely agrees with the value calculated assuming a final Wien distribution for the photons.

We perform this test both with an initially isotropic distribution of radiation, and with an anisotropic distribution in photon number, ${n}_{\gamma ,\mathrm{aniso}}={n}_{\gamma }(1+{n}^{(x)}),$ with 64 samples. The gas and radiation temperature (the radiation temperature is evaluated assuming a Boltzmann distribution) evolutions for both cases are shown in Figure 9. The gas and radiation approach thermal equilibrium on a timescale $\approx {t}_{{\rm{C}}}$, as expected. A similar result was obtained for the same parameters with the bhlight code (Ryan et al. 2015). The evolution of the intensity in angle is shown in Figure 10. Because the fractional energy change of each scattering event is small, the radiation isotropizes rapidly compared to the timescale for thermalization.

Figure 9.

Figure 9. Comptonization of soft monochromatic photons for both isotropic and anisotropic initial radiation distributions. The equilibrium temperature is shown as the black dashed line. The angular structure of the seed photons has little effect on the temperature evolution in this problem. MOCMC equilibrates to the correct temperature on approximately the Comptonization time ${t}_{{\rm{C}}}$.

Standard image High-resolution image
Figure 10.

Figure 10. Frequency-integrated intensity I in momentum space as a function of angle from an initially anisotropic distribution in the Comptonization test. For each facet, color is evaluated as the average of I at each constituent vertex. Because the intensity evolves through many scatterings, each of which leads to only a small change in photon frequency, the radiation isotropizes rapidly, compared to the timescale for thermalization with the fluid, and is barely visible at three scattering times ${t}_{{\rm{s}}}\approx 0.025{t}_{{\rm{C}}}$.

Standard image High-resolution image

4.6. Static Diffusion

To test the performance of our scattering treatment, as well as the behavior of MOCMC in the diffusion regime, we consider diffusion of a Gaussian pulse in a static medium optically thick to Thomson scattering in 1D on a domain $x\in \left[-L/2,L/2\right]$. Starting at t0, the analytic solution for the radiation energy density (with a 0.01% background) in the diffusion regime is

Equation (81)

where the diffusion coefficient $D=1/(3{\sigma }_{{\rm{T}}}{n}_{{\rm{e}}})$ and ${u}_{{\rm{r}},0}$ is the maximum radiation energy density at the initial time t = t0. We set ne such that the optical depth over the domain is τ = 104. We evolve this system to t = 50L/c; the MOCMC solution is shown in Figure 11. The solution shows good agreement; in particular, the pulse diffuses much more slowly than the rate at which samples traverse zones.

Figure 11.

Figure 11. Static diffusion of a Gaussian pulse in a uniform medium optically thick to Thomson scattering ($\tau ={10}^{4}$) in MOCMC with 256 zones and 64 samples per zone. Top panel shows the initial and final analytic solutions relative to the maximum initial radiation energy density ${u}_{{\rm{r}},0}$, along with the MOCMC solution, and the bottom panel shows the residuals, at the few % level where ${u}_{{\rm{r}}}/{u}_{{\rm{r}},0}$ is significant, in the radiation energy density at the final time.

Standard image High-resolution image

4.7. Dynamic Diffusion

To study dynamic diffusion, we add a lab-frame velocity to the fluid such that the radiation is advected with the flow more rapidly than it diffuses. This is a powerful test of accuracy for a radiation hydrodynamics method. In particular, this test can be a challenge for ${ \mathcal O }\left(v/c\right)$ methods when care is not taken in truncating the equations in a way appropriate for all regimes (Krumholz et al. 2007). This is captured naturally by covariant methods like MOCMC.

We adopt the domain and initial conditions from the previous test, except that the pulse is now initially centered at x/L = −0.25. We set the fluid speed to βv/c = 0.1, and we evolve the system to tf = 5L/c. As in the previous test, we set τ = 104; at tf, there is some diffusion of the pulse. Figure 12 shows the MOCMC solution, along with initial and final analytic solutions.

Figure 12.

Figure 12. Diffusing pulse due to Thomson scattering with MOCMC. The fluid is moving with speed 0.1c. Top panel shows radiation energy density in red at the final time, along with the initial conditions (black dotted line) and analytic solution at the final time (black dashed line). Bottom panel shows the fractional error in the Eddington and MOCMC solutions. The optical depth across the domain is 104. Two hundred and fifty-six zones were used, with 64 samples per zone. The particle noise in constructing the Eddington tensor is negligible, compared to other errors in this problem; the Eddington and MOCMC solutions are nearly indistinguishable in this plot.

Standard image High-resolution image

4.8. Noisy Equilibrium

We consider a 1D box of length L with gas and radiation initially in thermal equilibrium at temperature T0 = 107 K. The gas and radiation interact through a gray absorption opacity. As this system evolves, noise in the Eddington tensor will lead to noise in the radiation four-momentum, which in turn will couple to the gas energy density. We use this test to measure the noise in the fluid when varying the optical depth across the box τ and the gas-to-radiation pressure ratio βr. Note that noise-free methods like analytic moment closures satisfy this test trivially.

We parameterize the stability by $\langle | {T}_{{\rm{g}}}-{T}_{0}| \rangle /{T}_{0}$, where Tg is the gas temperature and $\langle \cdot \rangle $ is the average over the domain. We set βr and τ by setting the gas density and the gray opacity κ. We run each realization for t = 10L/c, which appears to lead to saturated gas temperature errors. We consider a range of optical depths and gas-to-radiation pressures, $\tau \in [{10}^{-2},{10}^{2}]$, and ${\beta }_{{\rm{r}}}\in [{10}^{-5},{10}^{2}]$. The mean error at final time for each of these realizations is shown in Figure 13. Evidently, our method is stable for every combination of parameters we consider, and mean gas temperature errors remain good $(\lesssim 0.5 \% )$ even in the most extreme cases.

Figure 13.

Figure 13. Average relative error in gas temperature for an initially uniform medium with gas and radiation in thermal equilibrium as a function of optical depth τ and gas-to-radiation pressure ratio βr. We used 64 zones in 1D and 64 samples per zone. Noise is generated from our method for calculating the radiation pressure tensor. Noise in the gas temperature grows only slowly once βr ≲ 1, rather than rapidly going unbounded as in a traditional explicit Monte Carlo method. This is due to our semi-implicit update that drives the gas and radiation toward thermal equilibrium. Additionally, in thermal equilibrium ${u}_{{\rm{r}}}\sim {T}_{{\rm{r}}}^{4}$, and noise in ${\pi }^{(i)}{}_{(j)}$ directly affects ${u}_{{\rm{r}}}$ rather than ${T}_{{\rm{r}}}$. Note that even with only 64 samples, maximum noise in the gas temperature is on the order of 0.5% (noise in the radiation temperature is generally $\sim {10}^{-4}$.

Standard image High-resolution image

Nonetheless, noise in the gas temperature does increase with optical depth and radiation to gas pressure. This test already considers large optical depths and very large radiation to gas pressure ratios, but even more extreme parameter regimes may obtain in problems of astrophysical relevance. One option would be to interpolate toward the (noise-free) Eddington closure in very optically thick regions, although this could cause issues if there also exists some radiation at frequencies that are optically thin.

4.9. RMHD Linear Modes

We revisit relativistic radiation MHD linear modes (Jiang et al. 2012; Sa̧dowski et al. 2014; Ryan et al. 2015). These are derived assuming the Eddington closure, and so we focus on the optically thick regime here. Solutions are generated with a symbolic linear modes package (Chandra et al. 2017). We specialize to optically thick radiation-modified fast magnetosonic modes at different gas-to-radiation pressures βr. We do not refine or derefine samples for this test. We construct eigenmodes of the form $\delta \sim \exp \left(\omega t+{ikx}\right)$ for variation in ${\boldsymbol{P}}=({\rho }_{0}+\delta \rho $, ${u}_{{\rm{g}},0}+\delta {u}_{{\rm{g}}}$, $\delta {u}^{1}$, δu2, ${B}_{0}^{1}$, ${B}_{0}^{2}+\delta {B}^{2}$, ${u}_{{\rm{r}},0}+\delta {u}_{{\rm{r}}}$, $\delta {F}^{1}$, $\delta {F}^{2})$. Optical depth per wavelength $\tau =20$, divided evenly between gray absorption opacity ${\kappa }^{{\rm{a}}}$ and gray scattering opacity ${\kappa }^{{\rm{s}}}$, for wavenumber $k=2\pi $. Modes are simulated with an amplitude $\delta ={10}^{-4}$. The background equilibrium is ${\rho }_{0}=1$, ${u}_{0}^{1}={u}_{0}^{2}={F}_{0}^{1}={F}_{0}^{2}=0$, ${E}_{0}={a}_{{\rm{r}}}{({P}_{0}/{\rho }_{0})}^{4}$, and ${u}_{{\rm{g}},0}$ and ${B}_{0}^{1}={B}_{0}^{2}$ are determined by plasma ${\beta }_{{\rm{m}}}=1$ and gas-to-radiation pressure ${\beta }_{{\rm{r}}}=(10,1,0.1)$. The adiabatic index $\gamma =5/3$. Units are such that ${k}_{{\rm{B}}}=c={a}_{{\rm{r}}}=1$. The three modes we consider are given in Table 1.

Table 1.  Radiation-modified Fast Magnetosonic Modes

  βr = 10 βr = 1 βr = 0.1
ω −0.0244360 + 0.896566i −0.0932061−0.983571i −0.163372−1.79706i
δρ/δ 0.981029 0.980516 0.926746
δug/δ 0.0146350 + 0.00156849i 0.0127094 − 0.00173903i 0.0122892 − 0.000860716i
δu1/δ −0.139986 − 0.00381533i 0.153490 − 0.0145452i 0.265060 − 0.0240967i
δu2/δ 0.0640717 − 0.00344325i −0.0508806 − 0.00831436i −0.0162519 − 0.00161307i
δB2/δ 0.116682 − 0.00296728i 0.105954 + 0.00679059i 0.0802285 + 0.000875043i
δur/δ 0.00372334 + 0.00109715i 0.0230965 − 0.0135388i 0.241633 − 0.0682760i
δF1/δ 9.71549 × 10−5 − 0.000378002i −0.00127282 − 0.00229245i −0.00427347 − 0.0195488i
δF2/δ −5.46703 × 10−7 − 7.65533 × 10−6i 7.94614 × 10−6 − 6.76842 × 10−5i 3.88462 × 10−5 − 0.000392639i

Note. Eigenmodes of the form $\delta \sim \exp \left(\omega t+{ikx}\right)$ for the equations of covariant radiation hydrodynamics in Minkowski space with the Eddington closure. Optical depth per wavelength τ = 20 and plasma βm = 1. Our simulations use an amplitude δ = 10−4.

Download table as:  ASCIITypeset image

Each mode is simulated for one wave crossing time, $2\pi /| \mathrm{Imag}\left(\omega \right)| $. We study convergence. However, we have two resolution parameters: number of zones N1, and number of samples per zone ${N}_{\mathrm{samp}}$, which introduce similar errors. We therefore approach convergence in two steps. First, we study convergence of the MOCMC code with the Eddington closure relative to the analytic solution with increasing N1 (this subsystem has no ${N}_{\mathrm{samp}}$ dependence). Figure 14 shows the expected ${({N}^{1})}^{-1}$ convergence in all variables at large N1 (these modes are optically thick, and our source term evaluations are first-order accurate in time. Next, we fix ${N}^{1}=256$, and reintroduce samples for computing the pressure tensor. We then study convergence of the full MOCMC solution with increasing ${N}_{\mathrm{samp}}$ relative to the analytic solution. When the truncation error is dominated by the integration of the Eddington tensor, MOCMC converges as $\sim {N}_{\mathrm{samp}}^{-2}$.

Figure 14.

Figure 14. Convergence of radiation-modified fast magnetosonic modes for, from top to bottom, $\beta {\text{}}r=(10,1,0.1)$. Due to the two independent resolution parameters in MOCMC, we first study convergence in number of grid zones N1 of the numerical solution using the Eddington closure with respect to the analytic solution, and then convergence in number of samples per zone Nsamp of the numerical MOCMC solution at fixed N1 = 256 with respect to the same analytic solution. Different gas-to-radiation pressure ratios βr are shown; the plasma βm = 1. All modes shown are optically thick, τ = 20. Here, the L1 norm corresponds to the fractional error relative to mode amplitude in each zone. For the Eddington closure, when advection errors dominate, we expect second-order convergence in N1; when coupling dominates, we expect first-order convergence in N1. The MOCMC solution converges as ${N}_{\mathrm{samp}}^{-2}$, indicating a second-order-accurate integration of the Eddington tensor, and negligible truncation error in the sample updates themselves.

Standard image High-resolution image

4.10. Relativistic Nonlinear Waves

Farris et al. (2008) introduced a method for calculating 1D relativistic radiation hydrodynamic waves in flat spacetime with an assumed Eddington closure and a gray absorption opacity, along with four example solutions that have frequently been reproduced with relativistic radiation hydrodynamics codes (Fragile et al. 2012; Roedig et al. 2012; Sa̧dowski et al. 2013; McKinney et al. 2014; Ryan et al. 2015). These four example solutions are: (Case 1) a gas pressure–dominated nonrelativistic strong shock, (Case 2) a gas pressure–dominated mildly relativistic strong shock, (Case 3) a gas pressure–dominated highly relativistic wave, and (Case 4) a radiation pressure–dominated, mildly relativistic wave. We adopt the parameters from Farris et al. (2008). Ryan et al. (2015) simulated Cases 1–3 with full transport. See also Ohsuga & Takahashi (2016) for another full transport method applied to this problem.

We initialize these problems as shocktubes and allow them to evolve to equilibrium inside the code. We perform these simulations with both the Eddington closure and the full MOCMC machinery. The Eddington closure provides the reference solution and tests part of our numerical framework against the analytic solution (Farris et al. 2008); the MOCMC solution, being full-transport, will not agree with the analytic solution on scales of an optical depth, which in all cases is approximately the scale of the interface structure.

For all cases, we use 800 spatial zones, and for the MOCMC solution, approximately 64 samples per zone after refinement. Each sample carries 50 frequency bins. The left and right initial interface states are enforced at the boundary in the fluid and radiation moment variables, while the pressure tensor is taken to be Eddington and the samples are thermal and uniformly distributed in solid angle in the comoving frame. The four waves are shown, respectively, in Figures 1518. The particle noise in the MOCMC representation of the Eddington tensor is mostly small and does not prevent the code from being stable or accurate in any case, even when radiation pressure is dominant. The most significant pathology is when the Lorentz factor changes dramatically across the wave (Case 3); the resulting beaming of samples leads to poor sampling of solid angle in the comoving frame. The code then relies on the resampling procedure for resolving the pressure tensor.

Figure 15.

Figure 15. Nonrelativistic, gas pressured–dominated, weak shock initialized as a shock tube and evolved for t = 40. The radiation has little effect on the fluid; this is largely a test of radiation transport over finite optical depth in a nonuniform medium.

Standard image High-resolution image
Figure 16.

Figure 16. Mildly relativistic, gas pressure–dominated, strong shock at t = 400. The transport solution is qualitatively dissimilar from the Eddington approximation, which produces large discontinuities in the comoving radiation energy density and flux. Note the good agreement between MOCMC and the solution given by the explicit Monte Carlo method bhlight in Ryan et al. (2015).

Standard image High-resolution image
Figure 17.

Figure 17. Highly relativistic relativistic gas pressure–dominated wave at t = 80. This test exposes a significant pathology in MOCMC due to our sampling method. Initially, samples are distributed uniformly in the comoving frame of the fluid in each zone. However, in this test, these samples quickly pass from a γ ∼ 10 region to a γ ∼ 1 region. As a result, most of the samples downstream of the interface will be almost colinear in the fluid frame, leading to a challenging reconstruction operation, and requiring in situ resampling.

Standard image High-resolution image
Figure 18.

Figure 18. Radiation pressure–dominated, mildly relativistic wave at t = 150. Despite ${\beta }_{R}\sim 0.03\ll 1$, our semi-implicit MOCMC method is stable despite solving the transport equation using particles. The sharp features in the comoving radiation energy density and radiation flux in the Eddington approximation are not present in the transport solution. The explicit Monte Carlo method bhlight (Ryan et al. 2015) was not able to stably evolve this configuration.

Standard image High-resolution image

4.11. Novikov–Thorne Hohlraum

We now consider radiation transport in curved spacetime. We essentially repeat the 2D flat space hohlraum test in the Kerr geometry for a $1\,{M}_{\odot }$ black hole with spin a = 0.9375, now with the radiating boundary condition a thin disk at the midplane from $6\,{GM}/{c}^{2}$ to $10\,{GM}/{c}^{2}$. The disk has the temperature profile of a thin disk (Novikov & Thorne 1973) with anomalous viscosity $\alpha =0.05$. The disk and atmosphere are static in the normal observer frame. This disk radiates into vacuum; at finite time, we measure the radiation energy density in the normal observer frame.

To construct a time-dependent solution to the equation of radiative transfer, we extend the procedure from 4.2 to a geometrically thin, optically thick disk in the Kerr geometry. The procedure is essentially unchanged—except now, instead of propagating rays backward in time along straight lines in flat space, we sample geodesics uniformly in the normal observer frame (e.g., Bardeen et al. 1972) and propagate them along geodesics until they either exit the outer radial boundary, cross the event horizon, or intersect with the thin disk. For geodesics that intersect the disk, we set their invariant intensity to the Planck function at the disk temperature, and integrate this over frequency in the originating normal observer frame to get the contribution to radiation energy density ${u}_{{\rm{r}},\mathrm{normal}}$ in that frame.

Figure 19 shows the results of this test, both for the full MOCMC code as well as Eddington and M1 closures, alongside the semianalytic solution. For the simulations, we adopt axisymmetry in modified Kerr–Schild (Gammie et al. 2003) coordinates with refinement parameter h = 0.3 and use 128 × 129 zones in X1 and X2, the odd number of zones in X2 for symmetry about the midplane. The lower hemisphere is not shown. We set the outer radius at $20{GM}/{c}^{2}$. The thermal radiating disk boundary (we adopt a hemispheric approach similar to the 2D hohlraum test in Section 4.2) is enforced at the midplane every substep, both in the radiation moments and in the samples (i.e., the radiating disk is infinitely optically thick in our implementation).

Figure 19.

Figure 19. Time-dependent transport test in the Kerr spacetime for a radiating disk at t = 5M. Radiation energy density in the normal observer frame is shown. The radiating disk is at the midplane from r = 6GM/c2 to r = 10GM/c2, and the black circles denotes the event horizon of the black hole. Eddington, M1, and MOCMC (with 64 samples per zone) closures are shown against the semianalytic solution. The Eddington and M1 closures produce similar results, with large radiation energy densities far from the disk at finite time, and particularly in the case of M1, a sharp boundary to a vacuum region in the midplane inside the innermost stable circular orbit. As in flat spacetime, at finite time the MOCMC solution corresponds much more closely to the semianalytic solution than either of the analytic moment closures.

Standard image High-resolution image

4.12. Isothermal Schwarzschild Atmosphere

We repeat the isothermal pressure-supported atmosphere test in the Schwarzschild geometry close to the event horizon from Ryan et al. (2015). Reflecting spherical shells are placed at inner and outer radii ${r}_{\mathrm{in}}=3.5{GM}/{c}^{2}$ and ${r}_{\mathrm{out}}=20{GM}/{c}^{2}$, and gas between these shells is allowed to reach radiative equilibrium through a gray opacity κ. The radiation acts like a heat conduction, leading to a temperature profile that is isothermal modulo a redshift factor,

Equation (82)

where T is the temperature at large radius. The solution is determined by this temperature profile and mechanical equilibrium, ${T}^{\mu r}{}_{;\mu }=0$. For a γ-law equation of state, the solution is evaluated by solving

Equation (83)

Because all rays propagate back to $t=-\infty $, ${I}_{\nu }/{\nu }^{3}={B}_{\nu }/{\nu }^{3}$ everywhere in the domain, and this is an exact solution of the equations of radiation hydrodynamics with full transport in curved spacetime. This problem can be cast in terms of three dimensionless parameters: (1) the ratio of the inner atmospheric scale height H to rin, $H/{r}_{\mathrm{in}}={k}_{{\rm{B}}}{T}_{\mathrm{in}}{r}_{\mathrm{in}}/(\mu {m}_{{\rm{p}}}{GM})$ where μ is the mean molecular weight; (2) the ratio of gas-to-radiation pressure at the inner boundary, ${\beta }_{{\rm{r}}}=\mu {m}_{{\rm{p}}}{a}_{{\rm{r}}}{T}_{\mathrm{in}}^{3}/(3{\rho }_{\mathrm{in}}{k}_{{\rm{B}}})$; and (3) the optical depth across the domain $\tau =\kappa {\rho }_{\mathrm{in}}({r}_{\mathrm{out}}-{r}_{\mathrm{in}})$. We set the black hole mass M = M, $H/{r}_{\mathrm{in}}=1.60$, ${\beta }_{{\rm{r}}}=43.5$, and τ = 5. We set up the simulation in 1D, with 128 grid zones. The exact solution is enforced at the boundaries. We run for $t=500{GM}/{c}^{3}$. The result is shown in Figure 20.

Figure 20.

Figure 20. Redshifted isothermal Schwarzschild atmosphere at $t=500{GM}/{c}^{3}$. The temperature profiles of both the radiation and the gas are shown, as well as the residuals relative to the semianalytic solution. ${I}_{\nu }/{\nu }^{3}={B}_{\nu }/{\nu }^{3}=\mathrm{const}$ everywhere in the domain. The solution is enforced in the ghost zones at both radial boundaries. At least some of the structure in the residuals may be due to our treatment of the boundary conditions.

Standard image High-resolution image

5. Conclusions

We have presented a numerical method for covariant RMHD with frequency-dependent transport that is stable, accurate, and efficient for a wide range of optical depths and radiation pressures relevant to the black hole accretion problem. The essential novelty is the discretization of the radiation field. Specific intensities are transported along characteristics, and the radiation distribution function in fluid zones is reconstructed by the set of samples in each zone at each time step. Source terms are evaluated in a deterministic, fully nonlinear, and implicit fashion, avoiding difficulties encountered by Monte Carlo methods for large optical depths and/or short interaction timescales. This solution to the transport equation is used to close a set of moment equations, providing a numerical solution to the full transport equation. The continuous nature of our method also means that the radiation field—and radiation interactions—are generally less noisy than in Monte Carlo; in particular, errors decrease with number of samples at least as ${N}_{\mathrm{samp}}^{-1}$, rather than the canonical Monte Carlo ${N}_{\mathrm{samp}}^{-1/2}$. By transporting an array of intensities at different frequencies along a common geodesic, we significantly reduce the algorithmic complexity of the transport operator in multigroup problems. Our treatment, in which specific intensity samples can be readily resampled locally, is also advantageous for large dynamic spatial ranges (such as logarithmic grids in simulations of thick disks). This should lead to improved load balancing, and could also be a benefit in future numerical methods with adaptive mesh refinement.

The method we have presented is a particular realization of a class of methods, in which integrations in solid angle over long characteristics are used to evaluate unknowns in the continuum evolution of the radiation four-momentum. In particular, one could adopt different integration methods, like a simple sum (which would lead to Monte Carlo-like ${N}_{\mathrm{samp}}^{-1/2}$ errors) or fitting spherical harmonics to the set of samples, which could lead to higher angular and spatial accuracy.

It is a pleasure to thank C. F. Gammie, Y.-F. Jiang, J. Miller, D. Radice, M. Chandra, C. White, F. Foucart, J. Stone, R. Wollaeger, and the members of the horizon collaboration7 for valuable discussions. This work was supported by the US Department of Energy through the Los Alamos National Laboratory. Los Alamos National Laboratory is operated by Triad National Security, LLC, for the National Nuclear Security Administration of U.S. Department of Energy (Contract No. 89233218CNA000001). This work was also supported by the Laboratory Directed Research and Development program of Los Alamos National Laboratory under project numbers 20170527ECR and 20180716PRD2. This work has been assigned a document release number LA-UR-19-24802.

Footnotes

  • Such p0i would not be available in time-dependent spacetimes, such as near merging compact objects.

  • CGAL, Computational Geometry Algorithms Library, https://www.cgal.org.

  • As an example of an approach intermediate to a gray method—like the one we adopt here—and a frequency-dependent treatment, Sa̧dowski & Narayan (2015) and Foucart et al. (2016) also evolve a radiation particle number density, which can provide a characteristic radiation temperature.

  • In fact, at $t=\infty $, Eddington outperforms both M1 and MOCMC (by virtue of the lack of noise) on this problem.

Please wait… references are loading.
10.3847/1538-4357/ab75e1