Free Access
Issue
A&A
Volume 548, December 2012
Article Number A67
Number of page(s) 9
Section Numerical methods and codes
DOI https://doi.org/10.1051/0004-6361/201219343
Published online 22 November 2012

© ESO, 2012

1. Introduction

In a series of papers (Hauschildt & Baron 2006, 2008, 2009, 2010; Baron & Hauschildt 2007; Baron et al. 2009b; Seelmann et al. 2010) we have developed a general framework for solving 3D radiative transfer problems in Cartesian, cylindrical, and spherical coordinates for both static and monotonic velocity fields in the comoving frame. We have also developed an Eulerian code for velocities ~<Mathematical equation: \hbox{$\la$}1000 km s-1 (Seelmann et al. 2010). The neglect of relativistic effects and resolution constraints limits the applicability of the Eulerian approach to v/c ≲ 0.01. Our affine method for solving the fully relativistic transfer equation is exact to all orders in v/c (Chen et al. 2007; Baron et al. 2009a). In a parallel series of papers we have introduced methods for solving the fully relativistic transfer equation in 1D spherical coordinates with arbitrary velocity fields (Baron & Hauschildt 2004; Knop et al. 2009a,b).

2. Basic formalism

Using the general formalism developed in Chen et al. (2007) we can derive the transfer equation in flat spacetime with arbitrary flows. We choose to work in spherical coordinates without loss of generality.

The photon’s four-momentum can be written padxadξ=hλ(1,nˆ),Mathematical equation: \begin{equation} p^a\equiv\frac{{\rm d}x^a}{{\rm d}\xi}=\frac{h}{\lambda_\infty}(1,\hat{\vec n}), \end{equation}(1)where h is Planck’s constant, ξ is the affine parameter, λ is the rest frame wavelength, and nˆMathematical equation: \hbox{$\hat{\vec n}$} is the 3D direction of the photon as seen by a distant, stationary, observer. The four-velocity of the comoving observer in an arbitrary flow can be written ua=γ(r,t)[1,β(r,t)],Mathematical equation: \begin{equation} u^a=\gamma({\vec r},t)[1,\,\vec{\beta}({\vec r},t)], \end{equation}(2)and the comoving wavelength λ can be obtained using hλ=(u·p).Mathematical equation: \begin{equation} \frac{h}{\lambda}=-(u\cdot p). \end{equation}(3)Here, β = v/c, and γ = (1 − β2) − 1/2, are the usual quantities of special relativity. The 3D geodesic in the flat spacetime can be parametrized as r(s)=r0+nˆs,Mathematical equation: \begin{equation} \label{3D-geo} {\vec{r}}(s)={\vec{r}}_0+\hat{{\vec{n}}}\, s, \end{equation}(4)where r0 is the starting point of the characteristics, and s is the rest frame physical distance related to the affine parameter ξ by shλξ.Mathematical equation: \begin{equation} \label{sdef} s\equiv \frac{h}{\lambda_\infty}\xi. \end{equation}(5)The radiative transfer equation can be written in terms of the affine parameter ξ as (see Eq. (10) of Chen et al. 2007): Iλ∂ξ|λ+dλdξIλ∂λ=(χλhλ+5λdλdξ)Iλ+ηλhλ,Mathematical equation: \begin{equation} \label{step1} \left.\frac{\partial I_\lambda}{\partial\xi}\right|_\lambda +\frac{{\rm d} \lambda}{{\rm d}\xi}\frac{\partial I_\lambda}{\partial \lambda}=-\left(\chi_\lambda \frac{h}{\lambda}+\frac{5}{\lambda}\frac{{\rm d}\lambda}{{\rm d} \xi}\right)I_\lambda+\eta_\lambda \frac{h}{\lambda}, \end{equation}(6)where Iλ(r,t;nˆ)Mathematical equation: \hbox{$I_\lambda({\vec r}, t;\hat{\vec n})$} is the specific intensity measured by a comoving observer (note that Iλλ5 is observer-independent) at the (global) rest frame space-time point (r,t), toward the rest frame direction nˆMathematical equation: \hbox{$\hat{\vec n}$}, and at the comoving wavelength λ. When expressing the 7D phase-space dependence of the comoving specific intensity, the only comoving variable we used was the wavelength λ, in particular, we did not use angles measured by a comoving observer to specify the direction of the photons. The advantages for this at first sight odd phase-space configuration have been explained in detail in Chen et al. (2007), and we applied this technique in Baron et al. (2009a).

We can rewrite Eq. (6) as d(ct)dξ1cIλ∂t|λ+drdξ·Iλ+dλdξIλ∂λ=(χλhλ+5λdλdξ)Iλ+ηλhλ,Mathematical equation: \begin{eqnarray} \label{step2} \left.\frac{{\rm d}(ct)}{{\rm d}\xi}\frac{1}{c}\frac{\partial I_\lambda}{\partial t}\right|_\lambda + \frac{{\rm d}\vec{r}}{{\rm d}\xi}\cdot\nabla I_\lambda &+&\frac{{\rm d}\lambda}{{\rm d}\xi}\frac{\partial I_\lambda}{\partial \lambda}=\nonumber\\[2.5mm] && -\left(\chi_\lambda \frac{h}{\lambda}+\frac{5}{\lambda}\frac{{\rm d}\lambda}{{\rm d}\xi}\right)I_\lambda+\eta_\lambda \frac{h}{\lambda}, \end{eqnarray}(7)or equivalently d(ct)dξ1cIλ∂t|λ+dsdξdrds·Iλ+dsdξdλdsIλ∂λ=(χλhλ+5λdsdξdλds)Iλ+ηλhλ·Mathematical equation: \begin{eqnarray} \label{step3} \left.\frac{{\rm d}(ct)}{{\rm d}\xi}\frac{1}{c}\frac{\partial I_\lambda}{\partial t}\right|_\lambda &+& \frac{{\rm d}s}{{\rm d}\xi}\frac{{\rm d}\vec{r}}{{\rm d} s}\cdot\nabla I_\lambda +\frac{{\rm d}s}{{\rm d}\xi}\frac{{\rm d}\lambda}{{\rm d}s}\frac{\partial I_\lambda}{\partial \lambda}=\nonumber\\[2.5mm] && -\left(\chi_\lambda \frac{h}{\lambda}+\frac{5}{\lambda}\frac{{\rm d}s}{{\rm d}\xi}\frac{{\rm d}\lambda}{{\rm d}s}\right)I_\lambda+\eta_\lambda \frac{h}{\lambda}\cdot \end{eqnarray}(8)Then using the definition of s from Eq. (5) and the fact that d(ct)dξ=cpt=hλ,Mathematical equation: \begin{equation} \frac{{\rm d}(ct)}{{\rm d}\xi} = c p^t = \frac{h}{\lambda_\infty}, \end{equation}(9)we find 1cIλ∂t|λ+Iλ∂s|λ+dλdsIλ∂λ=(χλλλ+5λdλds)Iλ+ηλλλ·Mathematical equation: \begin{eqnarray} \label{trans} \left.\frac{1}{c}\frac{\partial I_\lambda}{\partial t}\right|_\lambda + \left.\frac{\partial I_\lambda}{\partial s}\right|_\lambda +\frac{{\rm d}\lambda}{{\rm d}s}\frac{\partial I_\lambda}{\partial \lambda}&=&-\left(\chi_\lambda \frac{\lambda_\infty}{\lambda}+\frac{5}{\lambda}\frac{{\rm d}\lambda}{{\rm d}s}\right)I_\lambda+\eta_\lambda \frac{\lambda_\infty}{\lambda}\cdot \end{eqnarray}(10)Equation (10) can be put into our standard form: 1cIλ∂t|λ+Iλ∂s+a(s)∂λ(λIλ)+4a(s)Iλ=χλf(s)Iλ+ηλf(s),Mathematical equation: \begin{equation} \left.\frac{1}{c}\frac{\partial I_\lambda}{\partial t}\right|_\lambda + \frac{\partial I_\lambda}{\partial s} + a(s)\frac{\partial}{\partial\lambda} (\lambda I_\lambda) + 4 a(s)I_{\lambda} = -\chi_\lambda f(s) I_\lambda + \eta_\lambda f(s), \label{eqn:phxform2} \end{equation}(11)where f(s)λλ=γ(r,t)[1nˆ·β(r,t)]Mathematical equation: \begin{equation} \label{fs} f(s)\equiv\frac{\lambda_\infty}{\lambda}=\gamma({\vec r},t)[1-{\hat{\vec n}}\cdot \vec{\beta}({\vec r},t)] \end{equation}(12)is simply the Doppler factor, and a(s)1λdλds·Mathematical equation: \begin{equation} a(s)\equiv\frac{1}{\lambda}\frac{{\rm d}\lambda}{{\rm d}s}\cdot \end{equation}(13)Using Eqs. (4) and (12), a(s) is found to be a(s)=11nˆ·β[dds(nˆ·β)γ2β(1nˆ·β)dβds],Mathematical equation: \begin{equation} a(s)=\frac{1}{1-{\hat{\vec n}}\cdot\vec{\beta}}\left[\frac{{\rm d}}{{\rm d}s}({\hat {\vec n}}\cdot{\vec\beta})-\gamma^2\beta(1-{\hat{\vec n}}\cdot\vec{\beta})\frac{{\rm d}\beta}{{\rm d}s}\right], \end{equation}(14)where β is the magnitude of β, and dds=1c∂t+nˆ·=1c∂t+∂s·Mathematical equation: \begin{equation} \frac{{\rm d}}{{\rm d}s}=\frac{1}{c}\frac{\partial}{\partial t}+{\hat{\vec n}}\cdot \nabla=\frac{1}{c}\frac{\partial}{\partial t}+\frac{\partial}{\partial s}\cdot \end{equation}(15)When we numerically integrate the radiation transfer equation, a(s) can be approximated as a(s)δ(nˆ·β)γ2β(1nˆ·β)δβδs(1nˆ·β),Mathematical equation: \begin{equation} \label{numerical-a(s)} a(s)\approx\frac{\delta({\hat{\vec n}}\cdot{\vec\beta})-\gamma^2\beta(1-{\hat{\vec n}}\cdot\vec{\beta})\,\delta\beta}{\delta s (1-{\hat {\vec n}}\cdot\vec{\beta})}, \end{equation}(16)where δs is the differential step size (physical distance) along the characteristics, δ(nˆ·β)Mathematical equation: \hbox{$\delta({\hat{\vec n}}\cdot{\vec\beta})$} and δβ are the changes of nˆ·βMathematical equation: \hbox{${\hat{\vec n}}\cdot{\vec\beta}$} and β, respectively, when we move one step forward, which includes the changes induced by both time and spatial advances, for instance δβ=β(si+1,ti+1)β(si,ti).Mathematical equation: \begin{equation} \delta \beta=\beta(s_{i+1}, t_{i+1})-\beta(s_i, t_i). \end{equation}(17)Since few numerical schemes will be able to provide the fully implicit derivative, δβ, will often be obtained for example by the backward difference δβ=(β(si,ti)β(si,ti1)+(β(si,ti)β(si1,ti).Mathematical equation: \begin{equation} \delta \beta=(\beta(s_{i}, t_{i})-\beta(s_i, t_{i-1}) + (\beta(s_{i},t_i)-\beta(s_{i-1},t_i). \end{equation}(18)In the stationary case, both β and f(s) are independent of time and specializing Eqs. (4) and (12) to that case, a(s) becomes a(s)=nˆ·(nˆ·β)γ2β(1nˆ·β)(nˆ·β)1nˆ·β=Mathematical equation: \begin{eqnarray} a(s) &=&\frac{{\hat{\vec n}}\cdot\nabla({\hat{\vec n}}\cdot{\vec \beta})-\gamma^2\beta(1-{\hat{\vec n}}\cdot\vec{\beta})({ \hat{\vec n}}\cdot\nabla\beta)}{1-{\hat{\vec n}}\cdot{\vec \beta}} \nonumber \\[2mm] &=&-({\hat{\vec n}}\cdot\nabla) \ln (1-{\hat{\vec n}}\cdot{\vec\beta})-\gamma^2\beta({\hat{\vec n}}\cdot\nabla\beta), \label{eqn:adef} \end{eqnarray}(19)where we have used the fact that along the characteristics, d/ds no longer contains the time derivative and is thus the directional derivative operator, that is, d/ds=nˆ·Mathematical equation: \hbox{$s=\hat{\vec n}\cdot\nabla$}. We recall that in the flat spacetime that we are considering, our characteristics are straight lines for all velocity flows.

In terms of its spherical components, β can be written β=βreˆr+βθeˆθ+βφeˆφ,Mathematical equation: \begin{equation} \vec{\beta}=\beta_r \hat{\vec e}_r +\beta_{\theta} \hat{\vec e}_{\theta}+\beta_{\phi} \hat{\vec e}_{\phi}, \end{equation}(20)where eˆr,eˆθ,eˆφMathematical equation: \hbox{$\hat{\vec e}_r,\hat{\vec e}_\theta, {\hat{\vec e}}_{\phi}$} are the spherical orthonormal basis vectors at point r(r,θ,φ), i.e. eˆr=(sinθcosφ,sinθsinφ,cosθ),eˆθ=(cosθcosφ,cosθsinφ,sinθ),eˆφ=(sinφ,cosφ,0),Mathematical equation: \begin{eqnarray} \label{spherical-base} \hat{\vec e}_r&=&(\sin\theta\cos\phi, \sin\theta\sin\phi, \cos\theta),\nonumber\\[2mm] \hat{\vec e}_\theta&=&(\cos\theta\cos\phi,\cos\theta\sin\phi,-\sin\theta),\nonumber\\[2mm] {\hat{\vec e}}_{\phi}&=&(-\sin\phi,\cos\phi,0), \end{eqnarray}(21)and consequently the nˆ·βMathematical equation: \hbox{$\hat{\vec n}\cdot{\vec\beta}$} in Eq. (16) can be calculated using nˆ·β=βrnˆ·eˆr+βθnˆ·eˆθ+βφnˆ·eˆφβrnr+βθnθ+βφnφMathematical equation: \begin{eqnarray} \hat{\vec n}\cdot{\vec\beta}&=&\beta_r \hat{\vec n}\cdot\hat{\vec e}_r +\beta_{\theta}\hat{\vec n}\cdot \hat{\vec e}_{\theta}+\beta_{\phi} \hat{\vec n}\cdot\hat{\vec e}_{\phi}\nonumber\\[2mm] &\equiv& \beta_r n_r+\beta_{\theta} n_{\theta}+\beta_{\phi} n_{\phi} \end{eqnarray}(22)(note that along the characteristics, nˆMathematical equation: \hbox{$\hat{\vec n}$} has constant Cartesian components, nx, ny, nz, but changing spherical components, nr, nθ, nφ). Writing nˆ=(nx,ny,nz),Mathematical equation: \hbox{$\hat{\vec n}=(n_x, n_y, n_z),$} the spherical components nr, nθ,nφ can be easily computed using Eq. (21).

2.1. Comparison with Mihalas

At first glance, comparing Eq. (11) with Eq. (2.12) of Mihalas (1980) something seems amiss. Like Mihalas (1980), we work in the frame where spatial coordinates and clocks are measured by an observer at rest. However, Mihalas’ time derivative contains a Doppler factor, whereas ours does not. Also, our terms on the right-hand side contain Doppler factors, f(s), whereas those of Mihalas do not. The discrepency has been noted in passing by Chen et al. (2007) and arises because our s is a true distance measured in the observer’s frame, whereas that of Mihalas, sM, contains an extra Doppler factor:

dsM=λλds=f(s)dsMathematical equation: $$ {\rm d}s_{\rm M} = \frac{\lambda_\infty}{\lambda} {\rm d}s = f(s){\rm d}s $$(note that f(s) is not a constant along the characteristics, and therefore sM is not related to the physical distance s by a simple affine transformation). Thus, we can transform from s to sM in Eq. (10) to find λλ1cIλ∂t|λ+IλsM|λ+dλdsMIλ∂λ=(χλ+5λdλdsM)Iλ+ηλ,Mathematical equation: \begin{equation} \label{eqn:mih_s} \left. \frac{\lambda}{\lambda_\infty}\frac{1}{c}\frac{\partial I_\lambda}{\partial t}\right|_\lambda + \left.\frac{\partial I_\lambda}{\partial s_{\rm M}}\right|_\lambda +\frac{{\rm d}\lambda}{{\rm d}s_{\rm M}}\frac{\partial I_\lambda}{\partial \lambda}=-\left(\chi_\lambda +\frac{5}{\lambda}\frac{{\rm d}\lambda}{{\rm d}s_{\rm M}}\right)I_\lambda+\eta_\lambda, \end{equation}(23)which is very similar to the equation of Mihalas, except that the coefficient multiplying the time derivative term is the inverse Doppler factor f(s)-1, since we are working with Iλ instead of Iν, as did Mihalas. Jack et al. (2009) accidentally forgot to convert the time derivative from Iν to Iλ and thus their Eqs. (24), (25) have a coefficient of the time derivative with the Doppler factor in the numerator, rather than in the denominator. Thus, the time derivative terms in their Eqs. (24), (25) should be multiplied by f(s)-2 to give the correct equations.

2.2. Nonmonotonic flows

We are now in a position to tie together the work of Baron & Hauschildt (2004), Knop et al. (2009a) and Baron et al. (2009b). The formal solution in the monotonic case is an initial value problem in wavelength, but in the arbitrary flow case both spatial coordinates and wavelengths are fully coupled. This poses a significant memory cost, since the matrix obtained by finite-differencing the equations now contains every wavelength and not just the spatial points along the characteristic. The computational cost is surprisingly low because the linear system can be solved using the semi-analytic method of Knop et al. (2009a). While the framework that was given in Baron & Hauschildt (2004) and Baron et al. (2009b) was formulated for just one wavelength discretization, we included here the fully implicit discretization developed in Hauschildt & Baron (2004). Furthermore, we used the new formal solution that avoids negative generalized opacities (Knop et al. 2009b).

The stationary equation of radiative transfer in its characteristic form for the specific intensity I along a path s reads dIlds=f(s)ηlf(s)χlIl4alIlal(λIl)∂λ,Mathematical equation: \begin{equation} \label{eq:eqrt} \frac{\mathrm{d} I_l}{\mathrm{d} s} = f(s)\eta_l - f(s)\chi_l I_l - 4 a_l I_l - a_l \frac{\partial(\lambda I_l)}{\partial \lambda} , \end{equation}(24)where η is the emissivity, χ the opacity, and the subscript l indicates dependence on wavelength. The ∂λMathematical equation: \hbox{$\frac{\partial}{\partial \lambda} $}-term is the coupling term between the wavelengths and depends on the structure of the atmosphere and on the mechanism of the coupling (Mihalas 1980).

The wavelength derivative can be discretized in two ways as described in Hauschildt & Baron (2004). The different discretizations can be mixed via a Crank-Nicholson-like scheme with a mixing parameter ξ ∈ [ 0,1 ] . The wavelength discretized equation of radiative transfer can then be written as dIlds=f(s)ηlf(s)χlIlal(4+ξpl|)Ilξal(plIl1+pl+Il+1)[1ξ]al(plIl1+pl|Il+pl+Il+1),Mathematical equation: \begin{eqnarray} \label{eq:eqrt2} \frac{\mathrm{d} I_l}{\mathrm{d} s} &=& f(s)\eta_l - f(s)\chi_l I_l - a_l \left(4 + \xi \; p_l^| \right) I_l \nonumber \\ &{}& \; - \xi \; a_l \left( p_l^- I_{{l-1}} + p_l^+ I_{{l+1}} \right) \nonumber \\ &{}& \; - [1 - \xi] \; a_l \left( p_l^- I_{{l-1}} + p_l^| I_l + p_l^+ I_{{l+1}} \right), \end{eqnarray}(25)where the plMathematical equation: \hbox{$p_l^\bullet$} coefficients in an ordered wavelength grid λl − 1 < λl < λl + 1 are defined as for aλl0for aλl<0.Mathematical equation: \begin{eqnarray} \left. \begin{array}{r c l} \displaystyle p_l^- & = & \displaystyle - \frac{\lambda_{l-1}}{\lambda_l - \lambda_{l-1}} \\ \displaystyle p_l^| & = & \displaystyle \phantom{-} \frac{\lambda_{l}}{\lambda_l - \lambda_{l-1}} \\ \displaystyle p_l^+ & = & \displaystyle \phantom{-} 0 \end{array} \right\} & \mathrm{\>\>\>for~} & a_{\lambda_l} \ge 0 \\ \left. \begin{array}{r c l} \displaystyle p_l^- & = & \displaystyle \phantom{-} 0 \\ \displaystyle p_l^| & = & \displaystyle \phantom{-} \frac{\lambda_{l}}{\lambda_l - \lambda_{l+1}} \\ \displaystyle p_l^+ & = & \displaystyle - \frac{\lambda_{l+1}}{\lambda_l - \lambda_{l+1}} \end{array} \right\} & \mathrm{\>\>\>for~} & a_{\lambda_l} < 0. \end{eqnarray}The dependence on the sign of aλ is introduced to define local upwind schemes (see Baron & Hauschildt 2004).

After introducing a generalized opacity (see Knop et al. 2009a,b) χ̂l=f(s)χl+ξalpl|,Mathematical equation: \begin{equation} \label{eq:chihat} \hat{\chi}_l = f(s) \chi_l + \xi \; a_l p_l^| , \end{equation}(28)defining the source functions Sl=ηlχll=˜Sl=Mathematical equation: \begin{eqnarray} S_l & = & \frac{\eta_l}{\chi_l} \\ \hat{S}_l & = & \frac{\chi_l}{\hat{\chi}_l} \Bigg\{ f(s) S_l - \xi \; \frac{a_l}{\chi_l} \left( p_l^- I_{{l-1}} + p_l^+ I_{{l+1}} \right) \Bigg\} \label{eq:srchat} \\ \tilde{S}_l & = & -\, \frac{a_l}{\hat{\chi}_l} \Bigg\{ [1 - \xi] \; \left( p_l^- I_{{l-1}} + p_l^+ I_{{l+1}}\right) + \left( 4 + [1 - \xi] \; p_l^| \right) I_l \Bigg\}, \label{eq:srctilde} \end{eqnarray}a formal solution of the radiative transfer problem can be formulated. We used a full characteristic method throughout the atmosphere. The spatial position on a characteristic is then discretized on a spatial grid. In the following a pair of subscript indices will mark the position in the spatial grid and in the wavelength grid. Commonly the spatial grid is mapped locally onto an optical depth grid via the relation Mathematical equation: \hbox{$\mathrm{d} \tau_l = \hat{\chi}_l \mathrm{d} s$}. The formal solution of the radiative transfer Eq. (25) between two points si − 1 and si on a spatial grid along the photon path can be written in terms of the optical depth as follows: Ii,l=Ii1,leΔτ+δi,l+δ˜Ii,lδi,l=δ˜Ii,l=Mathematical equation: \begin{eqnarray} \label{eq:frmsl} I_{i,l} & = & I_{i-1,l} {\rm e}^{- \Delta \tau} + \delta \hat{I}_{i,l} + \delta \tilde{I}_{i,l} \\ \delta \hat{I}_{i,l} & = &\int_{\tau_{i-1}}^{\tau_{i}} \! \! \! \hat{S}_l {\rm e}^{\tau - \tau_{i}} \mathrm{d} \tau = \alpha_{i,l} \hat{S}_{i-1,l} + \beta_{i,l} \hat{S}_{i,l} + \gamma_{i,l} \hat{S}_{i+1,l} \label{eq:deltahat}\\ \delta \tilde{I}_{i,l} & = &\int_{\tau_{i-1}}^{\tau_{i}} \! \! \! \tilde{S}_l {\rm e}^{\tau - \tau_{i}} \mathrm{d} \tau = \tilde{\alpha}_{i,l} \tilde{S}_{i-1,l} + \tilde{\beta}_{i,l} \tilde{S}_{i,l}, \label{eq:deltatilde} \end{eqnarray}with Δτ = τi + 1,l − τi,l and τi,l=siχ̂l(s)dsMathematical equation: \hbox{$\tau_{i,l} = \int^{s_i} \hat{\chi}_l(s) \mathrm{d} s$}. The α-β-γ coefficients are described in Olson & Kunasz (1987) and Hauschildt (1992). δ˜IlMathematical equation: \hbox{$\delta \tilde{I}_l$} in Eq. (34) is linearly interpolated and in general different from the coefficients in Eq. (33) and is therefore marked with a tilde.

Equation (32) can be written in matrix notation for any given characteristic: I=A·I+ΔI.Mathematical equation: \begin{equation} \label{eq:frml_sln_matrix} \mathbf{I} = {\vec A} \cdot {\vec I} + {\vec \Delta {I}}. \end{equation}(35)Here I is a vector with all intensities, A is a square matrix that describes the influence of the different intensities upon each other, and ΔI is a vector with the thermal emission and scattering contribution of the source function. For a characteristic with ni spatial points and nl points in the wavelength grid, the intensity vector I has ni × nl entries. In the following a superscript of k will label the characteristic at hand. The components of the matrix A from Eq. (35) at the spatial point i and the wavelength point l are given by Ai,l,k=Bi,l,k=(ξβi,lk+[1ξ]βi,lk˜)ai,lkχ̂ki,lpi,l,kCi,l,k=ξγi,lkai+1,lkχ̂ki+1,lpi+1,l,kAi,l,k=exp(Δτi1,lk)αi,lk˜ai1,lkχ̂ki1,l[4+[1ξ]pi1,l|,k]Bi,l,k=βi,lk˜ai,lkχ̂ki,l[4+[1ξ]pi,l|,k]Ci,l,k=0Ai,l+,k=Bi,l+,k=Ci,l+,k=Mathematical equation: \begin{eqnarray} A^{\mathrm{-},k}_{i,l} & = & - \left( \xi \alpha^k_{i,l} + [1 - \xi] \, \tilde{\alpha}^k_{i,l} \right) \frac{a^k_{i-1,l}}{\hat{\chi}^k_{i-1,l}} p^{-,k}_{i-1,l} \label{eq:matrix_coeff_start} \\ B^{\mathrm{-},k}_{i,l} & = & - \left( \xi \beta^k_{i,l} + [1 - \xi] \, \tilde{\beta}^k_{i,l} \right) \frac{a^k_{i,l }}{\hat{\chi}^k_{i,l }} p^{-,k}_{i,l} \\ C^{\mathrm{-},k}_{i,l} & = &- \xi \gamma^k_{i,l} \frac{a^k_{i+1,l}}{\hat{\chi}^k_{i+1,l}} p^{-,k}_{i+1,l}\\ A^{\mathrm{\diagdown},k}_{i,l} & = & \! \! \exp{(-\Delta \tau^k_{i-1,l})} - \tilde{\alpha}^k_{i,l} \frac{a^k_{i-1,l}}{\hat{\chi}^k_{i-1,l}} \left[ 4 + [1\!-\! \xi] p^{|,k}_{i-1,l} \right] \\ B^{\mathrm{\diagdown},k}_{i,l} & = &- \tilde{\beta}^k_{i,l} \frac{a^k_{i,l}}{\hat{\chi}^k_{i,l}} \left[ 4 + [1 - \xi] \, p^{|,k}_{i,l} \right]\\ C^{\mathrm{\diagdown},k}_{i,l} & = & 0 \\ A^{\mathrm{+},k}_{i,l} & = &- \left( \xi \alpha^k_{i,l} + [1 - \xi] \, \tilde{\alpha}^k_{i,l} \right) \frac{a^k_{i-1,l}}{\hat{\chi}^k_{i-1,l}} p^{+,k}_{i-1,l} \label{eq:matrix_super1} \\ B^{\mathrm{+},k}_{i,l} & = &- \left( \xi \beta^k_{i,l} + [1 - \xi] \, \tilde{\beta}^k_{i,l} \right) \frac{a^k_{i,l }}{\hat{\chi}^k_{i,l }} p^{+,k}_{i,l} \label{eq:matrix_super2} \\ C^{\mathrm{+},k}_{i,l} & = &- \xi \gamma^k_{i,l} \frac{a^k_{i+1,l}}{\hat{\chi}^k_{i+1,l}} p^{+,k}_{i+1,l}. \label{eq:matrix_coeff_end} \end{eqnarray}Following Knop et al. (2009a), the naming scheme of the quantities in Eqs. (36)–(44) indicates with which specific intensity element they are associated. For an index pair i and l a • −  superscript refers to an intensity at wavelength l − 1, a • superscript to the same wavelength, and • +  to the next wavelength point l + 1. The A,B,C terms refer to the spatial points i − 1,i,i + 1, respectively. Equations (25)–(44) are nearly identical to those of Knop et al. (2009a) except for the explicit Doppler factor f(s), which arises because the photon direction is measured by a distant stationary observer here rather than by a comoving observer, as was the case in Knop et al. (2009a). We also clarified a problem with Ci,l,kMathematical equation: \hbox{$C^{\mathrm{\diagdown},k}_{i,l}$} that was confusing in Knop et al. (2009a). The formal solution matrix is therefore identical in form to that shown in Fig. 1 of Knop et al. (2009a).

An element of the source function vector ΔI is given by (Knop et al. 2009a) ΔIi,lk=αi,lkki1,l+βi,lkki,l+γi,lkki+1,l.Mathematical equation: \begin{equation} \Delta {I}^k_{i,l} = {\alpha}^k_{i,l} \hat{S}^k_{i-1,l} + {\beta}^k_{i,l} \hat{S}^k_{i,l} + {\gamma}^k_{i,l} \hat{S}^k_{i+1,l}. \\ \end{equation}(45)Note that all Doppler factors are explicitlyhandled by including them in the opacity as χl ∗ f(s).

From Eq. (35) the solution for the specific intensity for a given spatial point and wavelength reads Ii,lk=(1Bi,ldiag,k)-1·(ΔIi,lk+Bi,lsub,kIi,l1k+Bi,lsuper,kIi,l+1k+Ai,lsub,kIi1,l1k+Ai,ldiag,kIi1,lk+Ai,lsuper,kIi1,l+1kMathematical equation: \begin{eqnarray} I^k_{i,l} & = & \left(1 - B^{\mathrm{diag},k}_{i,l} \right)^{-1} \cdot \Big( \Delta {I}^{k}_{i,l} + B^{\mathrm{sub},k}_{i,l} I^k_{i,l-1} + B^{\mathrm{super},k}_{i,l} I^k_{i,l+1} \nonumber \\ & & \quad + A^{\mathrm{sub},k}_{i,l} I^k_{i-1,l-1} + A^{\mathrm{diag},k}_{i,l} I^k_{i-1,l}+ A^{\mathrm{super},k}_{i,l} I^k_{i-1,l+1} \nonumber \\ & & \quad + C^{\mathrm{sub},k}_{i,l} I^k_{i+1,l-1} + \phantom{C^{\mathrm{diag},k}_{i,l} I^k_{i+1,l}+} C^{\mathrm{super},k}_{i,l} I^k_{i+1,l+1} \Big). \label{eq:explicit_frml_sln0} \end{eqnarray}(46)

2.2.1. The operator splitting method

Now that we have the formal solution, the full scattering problem can be solved by using operator splitting. The mean intensity Jλ is obtained from the source function Sλ by a formal solution of the radiative transfer equation, which is symbolically written using the Λ-operator Λλ as Jλ=ΛλSλ.Mathematical equation: \begin{equation} J_\lambda = \Lambda_\lambda S_\lambda. \label{frmsol} \end{equation}(47)For the transition of a two-level atom, we have =Λ̅S,Mathematical equation: \begin{equation} \Jb = \Lb S, \label{etla} \end{equation}(48)where Mathematical equation: \hbox{$\bar J=\int \phi(\lambda) J_\lambda \,{\rm d}\lambda$}, Mathematical equation: \hbox{$\Lb = \int \phi(\lambda) \Lambda_\lambda \,{\rm d}\lambda$} with the normalized line profile φ(λ).

The Λ-iteration method, i.e. solving Eq. (48) by a fixed-point iteration scheme of the form new=Λ̅Sold,Snew=(1ϵ)new+ϵB,Mathematical equation: \begin{equation} \Jnew = \Lb \Sold , \quad \Snew = (1-\e)\Jnew + \e B ,\label{alisol} \end{equation}(49)fails in the case of high optical depths and small ϵ. This is because the largest eigenvalue of the amplification matrix (for Doppler-profiles) is approximately λmax ≈ (1 − ϵ)(1 − T-1), where T is the optical thickness of the medium (Mihalas et al. 1975). For small ϵ and high T, this is very close to unity and, therefore, the convergence rate of the Λ-iteration is very poor. A physical description of this effect can be found in Mihalas (1980).

Thumbnail: Fig. 1 Refer to the following caption and surrounding text. Fig. 1

Comparison of monotonic flow case with spherical symmetry solved using the full arbitrary velocity field method (red) to the well-tested 1D solution (black). The comoving mean intensity is plotted at each point in the computational volume. The agreement is at the 1% level.

The idea of the ALI or operator splitting method is to reduce the eigenvalues of the amplification matrix in the iteration scheme (Cannon 1973) by introducing an approximate Mathematical equation: \hbox{$\bar\Lambda$}-operator (ALO) Λ and to split Mathematical equation: \hbox{$\bar\Lambda$} according to Λ̅=Λ+(Λ̅Λ)Mathematical equation: \begin{equation} \Lb = \lstar +(\Lb-\lstar) \label{alodef} \end{equation}(50)and rewrite Eq. (48) as new=ΛSnew+(Λ̅Λ)Sold.Mathematical equation: \begin{equation} \Jnew = \lstar \Snew + (\Lb-\lstar)\Sold. \end{equation}(51)This relation can be written as (Hamann 1987) [1Λ(1ϵ)]new=fsΛ(1ϵ)old,Mathematical equation: \begin{equation} \left[1-\lstar(1-\e)\right]\Jnew = \Jfs - \lstar(1-\e)\Jold, \label{alo1} \end{equation}(52)where Mathematical equation: \hbox{$\Jfs=\Lb\Sold$}. Equation (52) is solved to obtain the new values of Mathematical equation: \hbox{$\Jb$}, which are then used to compute the new source function for the next iteration cycle.

Mathematically, the ALI method belongs to the same family of iterative methods as the Jacobi or the Gauss-Seidel methods (Golub & Van Loan 1989). These methods have the general form Mxk+1=Nxk+bMathematical equation: \begin{equation} M x^{k+1} = Nx^{k} + b \end{equation}(53)for the iterative solution of a linear system Ax = b where the system matrix A is split according to A = M − N. For the ALI method we have M = 1 − Λ(1 − ϵ) and, accordingly, Mathematical equation: \hbox{$N=(\Lb-\lstar)(1-\e)$} for the system matrix Mathematical equation: \hbox{$A=1-\Lb(1-\e)$}. The convergence of the iterations depends on the spectral radius, ρ(G), of the iteration matrix G = M-1N. For convergence the condition ρ(G) < 1 must be fulfilled, this puts a restriction on the choice of Λ. In general, the iterations will converge faster for a smaller spectral radius. To achieve a significant improvement compared to the Λ-iteration, the operator Λ is constructed so that the eigenvalues of the iteration matrix G are much less than unity, resulting in swift convergence. Using parts of the exact Mathematical equation: \hbox{$\bar\Lambda$} matrix (e.g., its diagonal or a tri-diagonal form) will optimally reduce the eigenvalues of the G. The calculation and the structure of Λ should be simple to make the construction of the linear system in Eq. (52) fast. For example, the choice Mathematical equation: \hbox{$\lstar=\Lb$} is best in view of the convergence rate (it is equivalent to a direct solution by matrix inversion) but the explicit construction of Mathematical equation: \hbox{$\bar\Lambda$} is more time-consuming than the construction of a simpler Λ.

In the following discussion we use the notation of Hauschildt (1992) and Hauschildt & Baron (2006). The basic framework and the methods used for the formal solution and the solution of the scattering problem via operator splitting are discussed in detail in Hauschildt & Baron (2006) and will therefore not be repeated here. We have extended the framework to solve line transfer problems with a background continuum. The basic approach is similar to that of Hauschildt (1993). In the simple case of a two-level atom with background continuum that we consider here as a test case, we use a wavelength grid that covers the profile of the line including the surrounding continuum. We then use the wavelength-dependent mean intensities Jλ and approximate Λ operators Λ to compute the profile-integrated line mean intensities Mathematical equation: \hbox{$\Jb$} and Λ¯Mathematical equation: \hbox{$\bar\lstar$} via

=φ(λ)JλdλMathematical equation: $$ \Jb = \int \phi(\lambda) J_\lambda\,{\rm d}\lambda $$and

Λ¯=φ(λ)Λdλ.Mathematical equation: $$ \bar\lstar = \int \phi(\lambda) \lstar\,{\rm d}\lambda. $$Mathematical equation: \hbox{$\Jb$} and Λ¯Mathematical equation: \hbox{$\bar\lstar$} are then used to compute an updated value for Mathematical equation: \hbox{$\Jb$} and the line source function

S=(1ϵ)+ϵB,Mathematical equation: $$ S = (1-\epsilon)\Jb+\epsilon B, $$where ϵ is the line thermalization parameter (0 for a purely absorptive line, 1 for a purely scattering line). B is the Planck function, Bλ, profile averaged over the line

B=φ(λ)BλdλMathematical equation: $$ B = \int \phi(\lambda) B_\lambda\,{\rm d}\lambda $$via the standard iteration method [1Λ(1ϵ)]new=fsΛ(1ϵ)old,Mathematical equation: \begin{equation} \left[1-\lstar(1-\e)\right]\Jnew = \Jfs - \lstar(1-\e)\Jold, \label{alo2} \end{equation}(54)where Mathematical equation: \hbox{$\Jfs=\bar{\Lb}\Sold$}. This equation is solved directly to obtain the new values of Mathematical equation: \hbox{$\Jb$}, which are then used to compute the new source function for the next iteration cycle.

We construct the line Mathematical equation: \hbox{$\bar\Lambda$} directly from the wavelength-dependent Λ generated by the solution of the continuum transfer problems.

Given the form of Eq. (46) for the formal solution, the construction of the Λ-operator can proceed exactly as described in Baron & Hauschildt (2004). However, to conserve memory, we have implemented the Λ-operator, retaining the spatial off-diagonal terms, but neglecting the off-diagonal terms in wavelength. We still find good convergence at considerable savings in memory (see below).

3. Test calculations

In this section we present the results of test calculations we performed to test the new algorithm in terms of accuracy by regression testing. We compare these to results of the homologous case (Baron et al. 2009b), and to the spherical nonmonotonic cases (Baron & Hauschildt 2004).

The test calculations were performed on Opteron CPUs running Linux (Franklin and Hopper at NERSC), on Intel CPUs (Carver at NERSC, ICE2 at HLRN, and our own local Xserve clusters), and on IBM CPUs (PWR-4 and PWR-5). The code was compiled with Gfortran/gcc/g++, ifort/icc/icpc (versions 11 and 12), and xlf/xlc/xlC and with NAG f95/gcc/g++. Using the varied compiler suites and CPUs allowed us to find numerous errors.

3.1. Regression with monotonic case

Figure 1 shows the profile of the mean intensity J for homologous flow and spherical symmetry. The test problem is similar to that of Baron et al. (2009b). These are the basic model parameters:

  • 1.

    An inner radius Rin = 1011 cm and an outer radius Rout = 1.01 × 1013 cm.

  • 2.

    A minimum optical depth in the continuum τstdmin=10-4Mathematical equation: \hbox{$\tau_{\mathrm{std}}^{\mathrm{min}} =10^{-4}$} and a maximum optical depth in the continuum τstdmax=104Mathematical equation: \hbox{$\tau_{\mathrm{std}}^{\mathrm{max}} = 10^{4}$}.

  • 3.

    A gray temperature structure with K. That is the temperature solution of the spherical gray atmosphere problem with effective temperature (Mihalas 1978).

  • 4.

    An outer boundary condition Ibc0Mathematical equation: \hbox{$I_{\rm bc}^{-} \equiv 0$} and an inner boundary condition Iλ = Bλ for all wavelengths.

  • 5.

    For the initial wavelength the boundary condition is taken from that given by the 3D homologous calculation for homologous tests and set equal to the Planck function Bλinit for non-homologous tests.

  • 6.

    A continuum extinction χc = C/r2, with the constant C fixed by the radius and optical depth grids.

  • 7.

    A parametrized coherent and isotropic continuum scattering given by

    χc=ϵcκc+(1ϵc)σcMathematical equation: \begin{equation} \chi_{\rm c} = \epsilon_{\rm c} \kappa_{\rm c} + (1-\epsilon_{\rm c}) \sigma_{\rm c} \end{equation}(55)

    with 0 ≤ ϵc ≤ 1. κc and σc are the continuum absorption and scattering coefficients. In this work we have neglected scattering in the continuum.

The line of the simple two-level model atom is parameterized by the ratio of the profile-averaged line opacity χl to the continuum opacity χc and the line thermalization parameter ϵl. For the test cases presented below, we used ϵc = 1 and the line strength is given by Γ ≡ χl/χc = 102 to simulate a strong line, with varying ϵl (see below).

The test model is just an optically thick sphere put into the 3D grid. The velocity at the outer radius was set to be relativistic, vmax = 8 × 104 km s-1. The calculation was performed on a spherical grid with 333 spatial points, 332 solid angle directions, and 22 wavelength points. This and all calculations presented below were parallelized over characteristics and were run on parallel clusters. Ng (Ng 1974; Auer 1987) acceleration was used to significantly speed up the operator splitting iterations for cases with scattering. Figure 2 shows the line profile at the surface, here we compare the 3D monotonic calculation (Baron et al. 2007) to the same calculation using the 3D arbitrary velocity algorithm. Because of the spatial resolution and the way that characteristics end at different points in a voxel (as opposed to always ending on a radial grid point in the 1D case), it is better to compare 3D cases to 3D cases.

Thumbnail: Fig. 2 Refer to the following caption and surrounding text. Fig. 2

Comparison of monotonic flow case with spherical symmetry solved using the full arbitrary velocity field method (green) to the 3D monotonic flow solution (red). The comoving mean intensity is plotted at the surface of the sphere. The test cases are identical, vmax = 8 × 104 km s-1, 129 × 17 × 17 spatial voxels, 114 wavelength points, and 256 × 256 directions. The thermalization parameter in the line is ϵ = 10-3 and the line strength is Γ = 100. The lower panel shows the relative difference, δJλ/Jλ, as a function of wavelength.

Figure 3 shows the convergence rate of a monotonic flow case, with ϵ = 10-4, with and without Ng accleration. Not only does Ng acceleration clearly improve the convergence rate, it gives almost the exact same errors as the same test setup using both the 3D and 1D homologous algorithms.

Thumbnail: Fig. 3 Refer to the following caption and surrounding text. Fig. 3

Comparison of the convergence rate of a monotonic flow case with spherical symmetry with the thermalization parameter ϵ = 10-4 with and without Ng acceleration. The Ng acceleration is identical to that produced by the pure homologous 3D module.

Thumbnail: Fig. 4 Refer to the following caption and surrounding text. Fig. 4

Velocity profile used for the nonmonotonic velocity test with a damped sine wave.

3.2. Sine velocity flow

Here we again consider a spherically symmetric case with the same physical parameters as in Sect. 3.1, but the velocity, while still radial is now given modulated by a damped sine wave. We have also introduced a line into the opacity with thermalization parameter ϵl = 1. The thermalization parameter in the continuum is ϵc = 1. This case was calculated in 1D in Baron & Hauschildt (2004). Figure 4 shows the velocity as a function of radial optical depth in the continuum. The spatial grid was 129 × 65 × 17 and the solid angle resolution was set to 5122. The maximum velocity is v ≈ 10 000 km s-1 and the total number of wavelength points is 226. Figure 5 shows the comoving mean intensity Jλ from each surface voxel as a function of wavelength λ. The 1D result is plotted (the green curve) and the agreement is good to the sub-percent level. The variation in the velocity leads to an asymmetric line profile even in the comoving frame. But since this test has such a high spatial resolution, it requires a significant amount of memory per process. We explored the effects of lower spatial resolution, 129 × 17 × 17, while keeping the high solid angle resolution 512 × 512. Figure 6 shows the mean intensity as a function of wavelength for the outmost part of the sphere. For computational expediency we set the line thermalization parameter ϵl = 1. The spread in the results of 1.5% is indicative of the accuracy of these calculations, whereas the deviation of the envelope of the solution is indicative of the low spatial resolution of this calculation. While modern nodes may have 24 CPUs, but only about 1 GB of RAM per CPU, it is unfortunate that the evelope of the low spatial resolution calculation is offset from the 1D result. This shows that not only solid angle resolution is important, but spatial resolution is quite important as well. Figure 7 shows the same calculation with the spatial grid enhanced to 129 × 65 × 65 and the solid angle grid reduced to 32 × 24 (Hauschildt & Baron 2010). As can be seen in Fig. 7, the reduced solid angle resolution increases the spread by roughly a factor of two, but now the 3D solution envelopes the 1D nonmonotonic result. With this higher spatial resolution, the spread can be further reduced by increasing the solid angle resolution, which shows near-perfect weak scaling, and thus does not increase the wallclock time required for these calculations (although it does require more CPUs).

Thumbnail: Fig. 5 Refer to the following caption and surrounding text. Fig. 5

Line profile for the damped sine-wave velocity case with high spatial nr = 129, nθ = 65, and nφ = 17, and angular resolution nΩ = 512 × 512. The comoving mean intensity Jλ for each voxel on the surface (there are 65 × 17 = 1105 of them) is plotted as a function of λ (red lines). The green curve is the 1D result using the methods of Baron & Hauschildt (2004) and Knop et al. (2009b,a). Here the scattering fraction is ϵ = 10-4 and the line strength is Γ = 100.

Thumbnail: Fig. 6 Refer to the following caption and surrounding text. Fig. 6

Line profile for the damped sine-wave velocity case with lower spatial nr = 129, nθ = 17, and nφ = 17, and higher angular resolution nΩ = 512 × 512 than in Fig. 5. The comoving mean intensity Jλ for each voxel on the surface (there are 65 × 17 = 1105 of them) is plotted as a function of λ (red lines). The green curve is the 1D result using the methods of Baron & Hauschildt (2004) and Knop et al. (2009b,a). Here the scattering fraction is ϵ = 1 for computational expediency, and the line strength is Γ = 100. With the very low spatial resolution, the 3D result no longer envelopes the 1D result (which by assuming spatial spherical symmetry has essentially infinite resolution in nθ, and nφ).

Thumbnail: Fig. 7 Refer to the following caption and surrounding text. Fig. 7

Line profile for the damped sine-wave velocity case with higher spatial resolution, but lower angular resolution than in Fig. 5. The spatial resolution is nr = 129, nθ = 65, and nφ = 65, and the angular resolution is reduced to nΩ = 32 × 24. The comoving mean intensity Jλ for each voxel on the surface (there are 65 × 17 = 1105 of them) is plotted as a function of λ (red lines). The green curve is the 1D result using the methods of Baron & Hauschildt (2004) and Knop et al. (2009b,a). Here the scattering fraction is ϵ = 1 for computational expediency, and the line strength is Γ = 100.

3.3. Example of radial nonhomologous flows

The previous tests were all totally spherically symmetric, with radial variations in the velocity field. We now assume the flow to be radial and azimuthally symmetric, i.e. β(r)=p(θ)q(r)eˆr.Mathematical equation: \begin{equation} \vec{\beta}({\vec r})=p(\theta)q(r) \hat{\vec e}_r. \label{eqn:nrbetdef} \end{equation}(56)For this case, we have nˆ·β=(nˆ·)β=Mathematical equation: \begin{eqnarray} {\hat{\vec n}}\cdot {\vec \beta}&=&pqn_r, \label{eqn:nr_nhatdotbeta} \\ (\hat{\vec n}\cdot\nabla)\beta&=&pn_rq'(r)+\frac{1}{r}p'(\theta)q n_\theta, \label{eqn:nr_nhatdotgradbeta} \end{eqnarray}and nˆ·(nˆ·β)=1r[pqnrnθ+p(qr)nr2+pq(1nr2)],Mathematical equation: \begin{equation} \hat{\vec n}\cdot\nabla(\hat{\vec n}\cdot\vec{\beta})=\frac{1}{r}\left[p'qn_rn_\theta+p\left(q'r\right)n_r^2+pq\left(1-n_r^2\right)\right], \label{eqn:nr_nhatdotgradnhatdotbeta} \end{equation}(59)where we made use of =nr,θ̇=nθr,φ̇=nφrsinθ,Mathematical equation: \begin{equation} \dot{r}=n_r,\>\dot{\theta}=\frac{n_\theta}{r},\>\dot{\phi}=\frac{n_\phi}{r \sin\theta}, \end{equation}(60)and r=nθθ̇+sinθnφφ̇.Mathematical equation: \begin{equation} \dot{n}_r=n_\theta\dot{\theta}+\sin\theta n_\phi\dot{\phi}. \end{equation}(61)Here an over dot implies dds,Mathematical equation: \hbox{$\frac{{\rm d}}{{\rm d}s},$} e.g., drds,Mathematical equation: \hbox{$\dot{r}\equiv\frac{{\rm d}r}{{\rm d}s},$} etc., and a prime denotes differentiation with respect to μ = cosθ.

Inserting Eqs. (57)–(59) into Eq. (19), we find an analytic expression for a(s): a(s)=pqnrnθ+p(qr)nr2+pq(1nr2)r(1pqnr)γ2pq[pnrq(r)+1rp(θ)qnθ],Mathematical equation: \begin{eqnarray} a(s)&=&\frac{p'qn_rn_\theta+p(q'r)n_r^2+pq(1-n_r^2)}{r(1-p q n_r)}\nonumber\\ &&\qquad -\gamma^2 pq \left[pn_rq'(r)+\frac{1}{r}p'(\theta)q n_\theta \right], \end{eqnarray}(62)where the spherical components of the unit vector nˆ=(sinθncosφn,sinθnsinφn,cosθn)Mathematical equation: \hbox{$\hat{\vec n}=(\sin\theta_n \cos\phi_n, \sin\theta_n\sin\phi_n, \cos\theta_n)$} are nr=sinθsinθncos(φφn)+cosθcosθn,nθ=cosθsinθncos(φφn)sinθcosθn,nφ=cosθn.Mathematical equation: \begin{eqnarray} n_r&=&\sin\theta\sin\theta_n\cos(\phi-\phi_n)+\cos\theta\cos\theta_n,\nonumber\\ n_{\theta}&=&\cos\theta\sin\theta_n\cos(\phi-\phi_n)-\sin\theta\cos\theta_n,\nonumber\\ n_\phi &=&\cos\theta_n. \end{eqnarray}(63)For p(θ), we use an expansion in terms of Legendre polynomials (which form a complete and orthonormal basis for axially symmetric spherical functions) p(θ)=n=0kcn𝒫n(θ),Mathematical equation: \begin{equation} p(\theta)=\sum_{n=0}^{k}{c_n{\cal P}_{n}(\theta)}, \end{equation}(64)with Mathematical equation: \hbox{${\cal P}_0(\mu)=1,$}Mathematical equation: \hbox{${\cal P}_1(\mu)=\mu,$} and 𝒫2(μ)=12(3μ21),Mathematical equation: \hbox{${\cal P}_2(\mu)=\frac{1}{2}(3\mu^2-1),$} etc., where μ = cosθ. We consequently obtain p(θ)=n=1kcn𝒫n(θ)Mathematical equation: \begin{equation} p'(\theta)=\sum_{n=1}^{k}{c_n {\cal P}'_{n}(\theta)} \end{equation}(65)with 𝒫1=sinθ,Mathematical equation: \hbox{${\cal P}_1'=-\sin\theta,$} and 𝒫2=32sin2θ,Mathematical equation: \hbox{${\cal P}_2'=-\frac{3}{2}\sin 2\theta,$} etc. (note that the case cn=c0δn0Mathematical equation: \hbox{$c_n=c_0\delta^0_n$} degenerates to homologous flow). We can use this finite expansion in terms of the Legendre polynomial Mathematical equation: \hbox{${\cal P}_{n}(\theta)$} to construct azimuthally symmetric jets.

As a simple example of nonspherically symmetric flow, we run a test case where β=c0rp(θ)eˆr,Mathematical equation: \begin{equation} \label{beta_axial} \vec{\bf \beta}=c_0rp(\theta)\hat{\vec e}_r, \end{equation}(66)i.e. we take q(r) = c0r (c0 is a constant), which simplifies a(s) to be a(s)=c0[p+pnrnθ1rnrpγ2β(pnr+pnθ)].Mathematical equation: \begin{equation} a(s)=c_0\left[\frac{p+p'n_rn_\theta}{1-rn_rp}-\gamma^2\beta(pn_r+p'n_\theta)\right]. \end{equation}(67)Furthermore, we assume p(θ)=1+12𝒫2(μ)=1+12(32cos2θ12),Mathematical equation: \begin{equation} \label{L2} p(\theta)=1+\frac{1}{2}{\cal P}_2(\mu)=1+\frac{1}{2}\left(\frac{3}{2}\cos^2\theta-\frac{1}{2}\right), \end{equation}(68)i.e., we perturb the homologous flow by adding a second-order Legendre polynomial with perturbation coefficient 0.5. We show the resulting mean intensity plot J(θ,φ) at the boundary R = Rout in Fig. 8. We obtained perfect azimuthal symmetry as expected from the form of β in Eq. (66), although it was not explicitly enforced. Furthermore, we also recovered the symmetry with respect to the north/south pole (i.e., symmetry under a reflection with respect to the equatorial plane, θ → π − θ), which is characteristic for Legendre polynomials of even order, see Eq. (68). Figure 9 shows a longitudinal slice of the comoving intensity, which shows that the comoving mean intensity varies by roughly a factor of ten from the pole to the equator. This is just due to the effect that the continuum level varies with the maximum velocity (Baron et al. 2009b).

Thumbnail: Fig. 8 Refer to the following caption and surrounding text. Fig. 8

Comoving mean intensity J(θ,φ) plotted at the surface R = Rout for case where β=c0rp(θ)eˆr,Mathematical equation: \hbox{$\vec{\bf \beta}=c_0rp(\theta)\hat{\vec e}_r,$} and p(θ)=1+12𝒫2(μ)=1+Mathematical equation: \hbox{$p(\theta)=1+\frac{1}{2}{\cal P}_2(\mu)=1\;+$}12(32cos2θ12)Mathematical equation: \hbox{$\frac{1}{2}(\frac{3}{2}\cos^2\theta-\frac{1}{2})$}. The velocity flow is radial, but not spherically symmetric to approximate a jet-like flow in the ± z direction.

Thumbnail: Fig. 9 Refer to the following caption and surrounding text. Fig. 9

Comoving mean intensity J(θ,φ0) plotted at the surface R = Rout for a fixed (arbitrarily chosen) value of φ = φ0. The variation of nearly an order of magnitude from the pole to the equator is due to the fact the the continuum level is a function of the velocity.

3.4. Checkpointing

We implemented a checkpointing scheme that allows for restarts and new starts with higher resolution in solid angle. We simply write out (using stream I/O) the Λ operator once it has been calculated, and the value of J at each voxel after each ALO iteration. Since these calculations require significant numbers of processors, which may go down, or calculations may run out of time, this allows us to perform perfect restarts. We checked that restarting from the checkpoint files works perfectly and that the calculations are converged in a single iteration when restarting from a converged checkpoint file. We write Λ and J to separate files, since that allows us to read just J, and then recalculate Λ if we restart with a higher resolution. We checked this, and it allows us to use a low-resolution calculation (performed on fewer processors, for example) and then converge the higher resolution calculation with roughly half as many iterations for each resolution increase. Table 1 shows the rate of convergence for a test with homologous velocity fields (chosen for computational expedience), vmax = 105 km s-1 and ϵ = 10-5. While the restart result still requires several iterations, this scheme allows for some speedup. The small ϵ and high maximum velocity make this test particularly demanding. The calculations were all restarted such that Ng acceleration cannot begin until the fourth iteration, and thus the restart calculations converge more slowly than they could. The scheme could indeed possibly be made more efficient by keeping the previous three values of Mathematical equation: \hbox{$\Jb$}, so that the restart iteration could immediately use Ng accleration.

Table 1

Convergence rate for homologous test with vmax = 105 km s-1 and ϵ = 10-5, starting from the previous test.

4. Conclusion

We presented algorithm strategies and details for the solution of the radiative transfer problem in 3D atmospheres with arbitrary wavelength couplings.

Future possible applications are the velocity profiles of cool stellar winds, treating partial redistribution, calculating radiative transfer in shock fronts like in accretion shocks, calculating quasar jets, and general relativistic situations such as a rotating black hole.

Acknowledgments

This work was supported in part by SFB 676, GRK 1354 from the DFG, NSF grant AST-0707704, and US DOE Grant DE-FG02-07ER41517. Support for Program number HST-GO-12298.05-A was provided by NASA through a grant from the Space Telescope Science Institute, which is operated by the Association of Universities for Research in Astronomy, Incorporated, under NASA contract NAS5-26555. B.C. thanks the University of Okalahoma Foundation for a fellowship. This research used resources of the National Energy Research Scientific Computing Center (NERSC), which is supported by the Office of Science of the US Department of Energy under Contract No. DE-AC02-05CH11231; and the Höchstleistungs Rechenzentrum Nord (HLRN). We thank both these institutions for a generous allocation of computer time.

References

  1. Auer, L. H. 1987, in Numerical Radiative Transfer, ed. W. Kalkofen (Cambridge: Cambridge Univ. Press), 101 [Google Scholar]
  2. Baron, E., & Hauschildt, P. H. 2004, A&A, 427, 987 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  3. Baron, E., & Hauschildt, P. H. 2007, A&A, 468, 255 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  4. Baron, E., Branch, D., & Hauschildt, P. H. 2007, ApJ, 662, 1148 [NASA ADS] [CrossRef] [Google Scholar]
  5. Baron, E., Chen, B., & Hauschildt, P. H. 2009a, in Recent Directions In Astrophysical Quantitative Spectroscopy And Radiation Hydrodynamics, eds. I. Hubeny, J. M. Stone, K. MacGregor, & K. Werner (New York: AIP), 148 [Google Scholar]
  6. Baron, E., Hauschildt, P. H., & Chen, B. 2009b, A&A, 498, 987 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  7. Cannon, C. J. 1973, JQSRT, 13, 627 [Google Scholar]
  8. Chen, B., Kantowski, R., Baron, E., Knop, S., & Hauschildt, P. 2007, MNRAS, 380, 104 [NASA ADS] [CrossRef] [Google Scholar]
  9. Golub, G. H., & Van Loan, C. F. 1989, Matrix computations (Baltimore: Johns Hopkins University Press) [Google Scholar]
  10. Hamann, W.-R. 1987, in Numerical Radiative Transfer, ed. W. Kalkofen (Cambridge: Cambridge Univ. Press), 35 [Google Scholar]
  11. Hauschildt, P. H. 1992, JQSRT, 47, 433 [Google Scholar]
  12. Hauschildt, P. H. 1993, JQSRT, 50, 301 [Google Scholar]
  13. Hauschildt, P. H., & Baron, E. 2004, A&A, 417, 317 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  14. Hauschildt, P. H., & Baron, E. 2006, A&A, 451, 273 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  15. Hauschildt, P. H., & Baron, E. 2008, A&A, 490, 873 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  16. Hauschildt, P. H., & Baron, E. 2009, A&A, 498, 981 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  17. Hauschildt, P. H., & Baron, E. 2010, A&A, 509, A36 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  18. Jack, D., Hauschildt, P. H., & Baron, E. 2009, A&A, 502, 1043 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  19. Kalkofen, W., ed. 1987, Numerical Radiative Transfer (Cambridge: Cambridge Univ. Press) [Google Scholar]
  20. Knop, S., Hauschildt, P. H., & Baron, E. 2009a, A&A, 501, 813 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  21. Knop, S., Hauschildt, P. H., & Baron, E. 2009b, A&A, 496, 295 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  22. Mihalas, D. 1978, Stellar Atmospheres (New York: W. H. Freeman) [Google Scholar]
  23. Mihalas, D. 1980, ApJ, 237, 574 [NASA ADS] [CrossRef] [Google Scholar]
  24. Mihalas, D., Kunasz, P., & Hummer, D. 1975, ApJ, 202, 465 [NASA ADS] [CrossRef] [Google Scholar]
  25. Ng, K. C. 1974, J. Chem. Phys., 61, 2680 [NASA ADS] [CrossRef] [Google Scholar]
  26. Olson, G. L., & Kunasz, P. B. 1987, JQSRT, 38, 325 [Google Scholar]
  27. Seelmann, A., Hauschildt, P. H., & Baron, E. 2010, A&A, 522, A102 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]

All Tables

Table 1

Convergence rate for homologous test with vmax = 105 km s-1 and ϵ = 10-5, starting from the previous test.

All Figures

Thumbnail: Fig. 1 Refer to the following caption and surrounding text. Fig. 1

Comparison of monotonic flow case with spherical symmetry solved using the full arbitrary velocity field method (red) to the well-tested 1D solution (black). The comoving mean intensity is plotted at each point in the computational volume. The agreement is at the 1% level.

In the text
Thumbnail: Fig. 2 Refer to the following caption and surrounding text. Fig. 2

Comparison of monotonic flow case with spherical symmetry solved using the full arbitrary velocity field method (green) to the 3D monotonic flow solution (red). The comoving mean intensity is plotted at the surface of the sphere. The test cases are identical, vmax = 8 × 104 km s-1, 129 × 17 × 17 spatial voxels, 114 wavelength points, and 256 × 256 directions. The thermalization parameter in the line is ϵ = 10-3 and the line strength is Γ = 100. The lower panel shows the relative difference, δJλ/Jλ, as a function of wavelength.

In the text
Thumbnail: Fig. 3 Refer to the following caption and surrounding text. Fig. 3

Comparison of the convergence rate of a monotonic flow case with spherical symmetry with the thermalization parameter ϵ = 10-4 with and without Ng acceleration. The Ng acceleration is identical to that produced by the pure homologous 3D module.

In the text
Thumbnail: Fig. 4 Refer to the following caption and surrounding text. Fig. 4

Velocity profile used for the nonmonotonic velocity test with a damped sine wave.

In the text
Thumbnail: Fig. 5 Refer to the following caption and surrounding text. Fig. 5

Line profile for the damped sine-wave velocity case with high spatial nr = 129, nθ = 65, and nφ = 17, and angular resolution nΩ = 512 × 512. The comoving mean intensity Jλ for each voxel on the surface (there are 65 × 17 = 1105 of them) is plotted as a function of λ (red lines). The green curve is the 1D result using the methods of Baron & Hauschildt (2004) and Knop et al. (2009b,a). Here the scattering fraction is ϵ = 10-4 and the line strength is Γ = 100.

In the text
Thumbnail: Fig. 6 Refer to the following caption and surrounding text. Fig. 6

Line profile for the damped sine-wave velocity case with lower spatial nr = 129, nθ = 17, and nφ = 17, and higher angular resolution nΩ = 512 × 512 than in Fig. 5. The comoving mean intensity Jλ for each voxel on the surface (there are 65 × 17 = 1105 of them) is plotted as a function of λ (red lines). The green curve is the 1D result using the methods of Baron & Hauschildt (2004) and Knop et al. (2009b,a). Here the scattering fraction is ϵ = 1 for computational expediency, and the line strength is Γ = 100. With the very low spatial resolution, the 3D result no longer envelopes the 1D result (which by assuming spatial spherical symmetry has essentially infinite resolution in nθ, and nφ).

In the text
Thumbnail: Fig. 7 Refer to the following caption and surrounding text. Fig. 7

Line profile for the damped sine-wave velocity case with higher spatial resolution, but lower angular resolution than in Fig. 5. The spatial resolution is nr = 129, nθ = 65, and nφ = 65, and the angular resolution is reduced to nΩ = 32 × 24. The comoving mean intensity Jλ for each voxel on the surface (there are 65 × 17 = 1105 of them) is plotted as a function of λ (red lines). The green curve is the 1D result using the methods of Baron & Hauschildt (2004) and Knop et al. (2009b,a). Here the scattering fraction is ϵ = 1 for computational expediency, and the line strength is Γ = 100.

In the text
Thumbnail: Fig. 8 Refer to the following caption and surrounding text. Fig. 8

Comoving mean intensity J(θ,φ) plotted at the surface R = Rout for case where β=c0rp(θ)eˆr,Mathematical equation: \hbox{$\vec{\bf \beta}=c_0rp(\theta)\hat{\vec e}_r,$} and p(θ)=1+12𝒫2(μ)=1+Mathematical equation: \hbox{$p(\theta)=1+\frac{1}{2}{\cal P}_2(\mu)=1\;+$}12(32cos2θ12)Mathematical equation: \hbox{$\frac{1}{2}(\frac{3}{2}\cos^2\theta-\frac{1}{2})$}. The velocity flow is radial, but not spherically symmetric to approximate a jet-like flow in the ± z direction.

In the text
Thumbnail: Fig. 9 Refer to the following caption and surrounding text. Fig. 9

Comoving mean intensity J(θ,φ0) plotted at the surface R = Rout for a fixed (arbitrarily chosen) value of φ = φ0. The variation of nearly an order of magnitude from the pole to the equator is due to the fact the the continuum level is a function of the velocity.

In the text

Current usage metrics show cumulative count of Article Views (full-text article views including HTML views, PDF and ePub downloads, according to the available data) and Abstracts Views on Vision4Press platform.

Data correspond to usage on the plateform after 2015. The current usage metrics is available 48-96 hours after online publication and is updated daily on week days.

Initial download of the metrics may take a while.