Free Access
Issue
A&A
Volume 595, November 2016
Article Number A90
Number of page(s) 14
Section Numerical methods and codes
DOI https://doi.org/10.1051/0004-6361/201628578
Published online 03 November 2016

© ESO 2016

1. Introduction

Many stars, such as asymptotic giant branch (AGB) stars, have extended atmospheres, which has important physical and observational implications. In particular, the radiation field at large distances from the inner stellar disk becomes very dilute and is confined primarily to a narrow solid angle around the radial direction (Mihalas 1978). Additionally, planets can also feature extended atmospheres, in which case the use of the usual assumption of a plane-parallel atmosphere is no longer valid, for example, the extended and spherically stratified atmosphere of Pluto (Gladstone et al. 2016). Compared to the radiative transfer equation in the plane-parallel approximation, the transfer equation in spherical symmetry is more complicated and more difficult to handle. This is especially caused by the appearance of a derivative with respect to the polar angle, which is not present in the plane-parallel geometry. Other cases in which the plane-parallel radiative transfer equation becomes much more complicated include systems with a moving medium where photons are subject to the Doppler effect and aberration (Mihalas 1978).

Depending on the transport coefficients, the general radiative transport equation can have a very different mathematical character. As described in Kanschat et al. (2009), it is a hyperbolic wave equation in regions without matter, an elliptic diffusion equation in case of an optically thick medium, or a parabolic equation when the light is strongly peaked in the forward direction. It is, therefore, very difficult to find numerical methods which are capable of dealing with these different (or even mixed) types of behaviour.

The problem of a grey spherical atmosphere in radiative equilibrium was first studied by Kosirev (1934) and Chandrasekhar (1934). An extension of the iterative moment method for plane-parallel atmospheres using variable Eddington factors (Auer & Mihalas 1970) to the problem of a spherically symmetric atmosphere restricted to isotropic scattering was introduced by Hummer & Rybicki (1971). Additionally, solutions based on a generalised Eddington approximation were developed by Lucy (1971) and Unno & Kondo (1976), respectively.

Alternatively, the long (Cannon 1970) or short characteristic methods (Kunasz & Auer 1988) can be used. Combined with, for example, an operator perturbation method to account for the unknown source function – such as the accelerated lamdba iteration (Cannon 1973) – they can be used to solve the radiative transfer equation in multiple dimensions (Olson & Kunasz 1987; Kunasz & Olson 1988). In combination with the work of Hummer & Rybicki (1971), operator splitting methods have also been directly utilised for spherically symmetric atmospheres by Kubat (1994).

Currently, the computationally demanding Monte Carlo techniques can very efficiently solve the radiative transfer problem for a broad variety of applications ranging from stellar atmospheres (e.g. Abbott & Lucy 1985; Lucy & Abbott 1993; Lucy 1999), circumstellar disks (e.g. Pascucci et al. 2004, and the references therein), and supernovae (e.g. Lucy 2005) to dusty objects (e.g. Steinacker et al. 2013, and the references therein). Their advantages are, for example, that they are intrinsically three-dimensional, can handle easily complex geometries and density distributions, and have a low algorithmic complexity. However, in some special cases with very optically thick regions the Monte Carlo approach becomes very slow because the number of photon interactions (i.e. scattering) increases exponentially. In these situations grid-based solution techniques (e.g. a finite difference, finite element, or finite volume method) for the differential equation of radiative transfer are more favourable even if they are algorithmically quite complex. Moreover, grid-based techniques allow for higher order approximations as well as error control, and they can be formulated to be intrinsically flux conserving (Hesthaven & Warburton 2008; Henning 2001).

In this study, we present a numerical method for a direct solution of the radiative transfer equation in spherical symmetry by means of a finite element method. Finite element methods have already been used to solve the radiative transfer equation, most notably in the three-dimensional case by Kanschat (1996) or Richling et al. (2001). In these cases, a continuous Galerkin finite element was used to discretise the transport operator. Such an approach, however, causes problems in cases where the transport equation has a dominant hyperbolic character, which may lead to discontinuities within the solution. It is possible to stabilise the numerical scheme by introducing a streamline diffusion method, for example, which essentially transforms the hyperbolic equation into a parabolic one by adding a small diffusion in the direction of photon transport. While this stabilises the numerical discretisation, it also adds a free parameter to the method, which has to be chosen carefully in such a way that it stabilises the numerical scheme, but does not result in a decreased accuracy of the solution (see e.g. Eriksson et al. 1996; Kanschat 1996). An alternative way to deal with such problems is to soften the requirements for the solution of the finite element method, in particular the requirement of continuity of the solution across element boundaries. One such numerical approach in the context of finite element methods is the discontinuous Galerkin method.

The discontinuous Galerkin finite element method (DG-FEM) was first introduced by Reed & Hill (1973) to study neutron transport problems. Since then, the method has been successfully applied to a broad variety of parabolic, hyperbolic, and elliptic problems (e.g. Hesthaven & Warburton 2008; Cockburn 2003). For three-dimensional internal heat transfer problems, the discretisation with a discontinuous Galerkin method has been studied by Cui & Li (2004). For astrophysical applications, discontinuous Galerkin methods have, for example, been used by Dykema et al. (1996) and Castor et al. (1992).

In this work we use a DG-FEM to directly solve the radiative transfer equation with arbitrarily complex scattering phase functions in spherical symmetry as a two-dimensional problem. In contrast to other solution methods, the scattering integral can thereby be evaluated exactly, independent of the angular mesh resolution. The development of the numerical scheme is outlined for the formulation of the DG approach in Sects. 2 and 3. Its applicability to several test problems is presented in Sect. 4. Remarks on the numerical efficiency are given in Sect. 5, followed by an outlook (Sect. 6) and a summary (Sect. 7).

2. Radiative transfer equation

We consider the radiative transfer equation in spherical symmetry, cf. Mihalas (1978), i.e. μIν(r,μ)∂r+1μ2rIν(r,μ)∂μ=κν(r)Iν(r,μ)sν(r)Iν(r,μ)+ηνind(r)Iν(r,μ)+ηνsp(r)+14π-1+102πIν(r,μ)sν(r,μ,μ;φ,φ)dμdφ\begin{eqnarray} \label{eq:rte_1} \mu \,\frac{\partial I_\nu(r,\mu)}{\partial r} + \frac{1-\mu^2}{r} \,\frac{\partial I_\nu(r,\mu)}{\partial \mu} = -\kappa_\nu(r)\, I_\nu(r,\mu) - \overline{s}_\nu(r) \,I_\nu(r,\mu)\nonumber\\ \shoveright{+ \eta_\nu^{\text{ind}}(r)\, I_\nu(r,\mu) + \eta_\nu^{\text{sp}}(r)}\nonumber\\ + \frac{1}{4\pi} \int_{-1}^{+1} \int_0^{2\pi} I_\nu(r,\mu') \,s_\nu(r,\mu, \mu'; \phi, \phi') \,{\rm d}\mu' \, {\rm d}\phi' \end{eqnarray}(1)with the specific intensity Iν, radius coordinate r, the cosine of the polar angle μ, the azimuth angle φ, absorption coefficient κν, total (sν\hbox{$\overline{s}_\nu$}) and differential (sν(r,μ,μ′;φ,φ′)) scattering coefficients, and induced and spontaneous emission coefficients ηνind,ηνsp\hbox{$\eta_\nu^{\text{ind}}, \eta_\nu^{\text{sp}}$}.

The differential scattering coefficient can be decomposed in an averaged angle-independent part, the total scattering coefficient sν(r)\hbox{$\overline{s}_\nu(r)$}, and the phase function p(r,μ,μ′;φ,φ′). This yields sν(r,μ,μ;φ,φ)=14π-1+102πsν(r,μ,μ;φ,φ)dμdφ·p(r,μ,μ;φ,φ)=sν(r)·p(r,μ,μ;φ,φ).\begin{eqnarray} s_\nu && (r,\mu,\mu';\phi,\phi')=\nonumber\\ && \frac{1}{4\pi} \int_{-1}^{+1} \int_0^{2\pi} s_\nu(r,\mu,\mu';\phi,\phi')\, {\rm d}\mu' \,{\rm d}\phi' \cdot p(r,\mu,\mu';\phi,\phi')\nonumber\\ && = \overline{s}_\nu(r) \cdot p(r,\mu,\mu';\phi,\phi'). \end{eqnarray}(2)The phase function describes the probability of photon scattering of incident directions μ and φ into the directions μ and φ. Since in spherical symmetry the radiation field is independent of the azimuth angle φ, the phase function p(r,μ,μ′;φ,φ′) can formally be integrated with respect to the azimuth angle to obtain the azimuthally averaged phase function p(0)(μ):=12π02πp(μ;φ,φ)dφ,\begin{equation} p^{(0)} (\mu',\mu) := \frac{1}{2\pi} \int_0^{2\pi} p(\mu',\mu;\phi,\phi')\, {\rm d}\phi', \end{equation}(3)which is then used in the transfer equation. To guarantee the conservation of energy, the phase function is normalised to unity, i.e. 12-1+1p(0)(μ,μ)dμ=1.\begin{equation} \frac{1}{2} \int_{-1}^{+1} p^{(0)}(\mu,\mu') \, {\rm d}\mu' = 1. \end{equation}(4)The extinction coefficient χν=κν+sν\hbox{$\chi_\nu = \kappa_\nu + \overline{s}_\nu$} can be combined with the induced emission into χ̂ν=χνηνind.\begin{equation} \hat{\chi}_\nu = \chi_\nu - \eta_\nu^{\text{ind}} . \end{equation}(5)In this work we only consider cases with χν>ηνind\hbox{$\chi_\nu > \eta_\nu^{\text{ind}}$} and therefore \hbox{$\hat{\chi}_\nu > 0$}, i.e. we do not consider systems which are dominated by induced emission (such as maser). Equation (1)is therefore simplified to μIν∂r+1μ2rIν∂μ=χ̂νIν+ηνsp+sν2-1+1Iν(μ)p(0)(μ,μ)dμ,\begin{equation} \label{eq:rte_2} \mu\, \frac{\partial I_\nu}{\partial r} + \frac{1-\mu^2}{r} \,\frac{\partial I_\nu}{\partial \mu} = -\hat{\chi}_\nu \,I_\nu + \eta_\nu^{\text{sp}} + \frac{\overline{s}_\nu}{2} \int_{-1}^{+1} I_\nu(\mu') \,p^{(0)}(\mu,\mu') \,{\rm d}\mu', \end{equation}(6)where all direct dependences on r and μ have been omitted to simplify the presentation. Instead of the usual form of the radiative transfer equation in spherical symmetry given by Eq. (6), we use the mathematically equivalent form ∂r(μIν)+∂μ(1μ2rIν)+2μrIν=χ̂νIν+ηνsp+sν2-1+1Iν(μ)p(0)(μ,μ)dμ.\begin{eqnarray} \label{eq:rte_3} \frac{\partial}{\partial r}\left( \mu \,I_\nu \right) + \frac{\partial}{\partial \mu} \left( \frac{1-\mu^2}{r}\, I_\nu \right) + \frac{2\,\mu}{r} I_\nu=\nonumber\\ -\hat{\chi}_\nu \,I_\nu + \eta_\nu^{\text{sp}} + \frac{\overline{s}_\nu}{2} \int_{-1}^{+1} I_\nu(\mu') \,p^{(0)}(\mu,\mu') \,{\rm d}\mu'. \end{eqnarray}(7)To simplify the notation we drop the explicit frequency dependence in the transfer equation and its corresponding coefficients in the following. We do not introduce the usual (radial) optical depth in the transfer equation. Doing so – by moving the extinction coefficient \hbox{$\hat{\chi}$} to the left-hand side – would introduce additional terms of the form \hbox{$1/\hat{\chi}$}, which can be numerically destabilising since the extinction coefficient can vary over several orders of magnitude.

thumbnail Fig. 1

Computational domain Ω. The boundaries of the domain between the inner radius rin and outer radius rout, as well as μ between + 1 and −1, are denoted by the respective Γ.

The Eq. (7)is solved on the two-dimensional domain Ω ⊂ R2 with Ω ∋ x = (r,μ) ∈ (rin,rout) × (−1,1) as displayed in Fig. 1. The inner (outer) radius of Ω is given by rin (rout).

At the inner boundary Γin of the domain boundary conditions need to be imposed for positive values of μ, i.e. I(x)=IinforxΓin+\begin{equation} I(\x) = I_{\text{in}}\quad \text{for } \x \in \Gamma_{\text{in}}^+ \end{equation}(8)given by the radiation field, for example, of the stellar interior. Likewise, at the outer boundary Γout an incident external radiation field has to be prescribed for negative values of μ, i.e. I(x)=IoutforxΓout.\begin{equation} I(\x) = I_{\text{out}}\quad \text{for } \x \in \Gamma_{\text{out}}^-. \end{equation}(9)We note that since the differential with respect to μ in Eq. (7)vanishes on the boundary Γ, no explicit boundary conditions need to be imposed on Γμ±. Therefore, the boundary value problem considered in this work is given by ∂r(μI)+∂μ(1μ2rI)=2μrIχ̂I+ηsp+s2-1+1I(μ)p(0)(μ,μ)dμinΩ,∂I∂r=2rIχ̂I±ηsp±s2-1+1I(μ)p(0)(±1,μ)dμonΓμ±,I=IinonΓin+,I=IoutonΓout.\begin{equation} \label{eq:rt_problem} \begin{aligned} \frac{\partial}{\partial r}&\left( \mu \, I \right) + \frac{\partial}{\partial \mu} \left( \frac{1-\mu^2}{r} \, I \right) =\\ & - \frac{2\, \mu}{r} \, I -\hat{\chi}\, I + \eta^{\text{sp}} + \frac{\overline{s}}{2} \int_{-1}^{+1} I(\mu') \, p^{(0)}(\mu,\mu') \, {\rm d}\mu'&& \text{in } \Omega,\\ \frac{\partial I}{\partial r} & = -\frac{2}{r} \, I \mp \hat{\chi}\, I \pm \eta^{\text{sp}} \pm \frac{\overline{s}}{2} \int_{-1}^{+1} I(\mu') \, p^{(0)}(\pm 1,\mu') \, {\rm d}\mu'&& \text{on } \Gamma_{\mu^\pm},\\ I & = I_{\text{in}} &&\text{on } \Gamma_{\text{in}}^+,\\ I & = I_{\text{out}} &&\text{on } \Gamma_{\text{out}}^-. \end{aligned} \end{equation}(10)

3. Formulation of the discontinuous Galerkin method

For the formulation of the discontinuous Galerkin method we follow the notation of Hesthaven & Warburton (2008). The domain Ω is described by K non-overlapping elements Dk, i.e. int(Dk)int(Dn)=forkn,\begin{equation} {\rm int}(\D^k) \cap {\rm int}(\D^n) = \emptyset \quad \text{for } k\neq n, \end{equation}(11)such that the continuous domain Ω is approximated by the finite domain Ωh with ΩΩh=􏽛k=1KDk=Ω\begin{equation} \Omega \backsimeq \Omega_h = \bigcup_{k=1}^{K} \D^k = \overline{\Omega} \end{equation}(12)with a local element size hk: = diam(Dk).

Definition 1. For any open set Ω in Rn let Pq(Ω) and Qq(Ω) denote the set of algebraic polynomials of total and partial degree q, respectively. For n = 2 Table 1 shows the monomial basis functions of Pq and Qq for q = 0,1,2,3 and Fig. 2 displays their Lagrangian elements.

Table 1

Monomial basis of polynomial spaces Pq and Qq of total and partial degree q, respectively, for n = 2, and q = 0,1,2,3.

thumbnail Fig. 2

Lagrangian reference elements for dimension n = 2, and polynomial degrees q = 0,1,2,3. The degrees of freedom (see Table 1) are marked with . Top: Pq elements, bottom: Qq elements.

In this work we use the nodal representation of the solution I h k : = I h | D k \hbox{$I_h^k:=I_h|_{\D^k}$} on each element. For each element Dk a suitable set of local grid points xikDk\hbox{$\x_i^k \in \D^k$} is chosen and the local continuous solution of Ihk\hbox{$I_h^k$} is expressed using the interpolating Lagrange polynomials, such that Ihk(x):=i=1NpIhk(xik)ik(x)forallxDk\begin{equation} I_h^k(\x) := \sum_{i=1}^{N_p} I_h^k(\x_i^k) \,\ell_i^k(\x)\quad \text{for all } \x \in \D^k \label{eq:sol_exp_local} \end{equation}(13)is a polynomial of order q on each element. Here the so called trial functions ik\hbox{$\ell_i^k$} are the interpolating two-dimensional Lagrange polynomials through the grid points xik\hbox{$\x_i^k$}, i.e. ik(x):=ik(x)ik(y)=􏽙j=1jiNp(xxj)(xixj)􏽙j=1jiNp(yyj)(yiyj)·\begin{equation} \ell_i^k(\x) :=\ell_i^k(x) \,\ell_i^k(y) = \prod_{\substack{j=1\\j\neq i}}^{N_p} \frac{(x-x_j)}{(x_i-x_j)} \, \prod_{\substack{j=1\\j\neq i}}^{N_p} \frac{(y-y_j)}{(y_i-y_j)} \cdot \end{equation}(14)For a given order q the number of local grid points Np is given by Nq=(q+1)(q+2)2\begin{equation} N_q = \frac{(q+1)\,(q+2)}{2} \end{equation}(15)for Pq elements and by Nq=(q+1)2\begin{equation} N_q = (q+1)^2 \end{equation}(16)for Qq elements, respectively. In principle the polynomial order q and thus Np can vary from element to element. However, for simplicity of notation we assume here that all elements have the same order q. Subsequently, the set \hbox{$\mathcal N^k$} of the local grid point indices within each element k is denoted by 𝒩k={1,...,Np}.\begin{equation} \mathcal N^k = \lbrace 1, \dotsc, N_p \rbrace. \label{eq:set_local_ind} \end{equation}(17)The global piecewise continuous solution can then be written as the direct sum of all K solutions I(x)Ih(x)=􏽍k=1KIhk(x).\begin{equation} I(\x) \backsimeq I_h(\x) = \bigoplus_{k=1}^{K} I_h^k(\x). \label{eq:sol_exp_glob} \end{equation}(18)The trial functions ik(x)\hbox{$\ell_i^k(\x)$} introduced in Eq. (13)form a basis of the finite vector space Vh. This vector space is locally defined by V h k = spann { i k ( D k ) } i = 1 N p \hbox{$V_h^k = {\rm spann}\lbrace \ell_i^k({\rm D}^k) \rbrace_{i=1}^{N_p}$} and globally given by Vh=􏽌k=1KVhk\hbox{$\V_h=\bigoplus_{k=1}^{K} \V_h^k$}. Unlike the case of the continuous Galerkin finite element method (Eriksson et al. 1996), we note that no continuity of the trial functions (and therefore also of the solution I) is assumed or required across inter–element boundaries.

We define the residual of Eq. (10)by h(Ih(x))=∂r(μIh)+∂μ(1μ2rIh)+2μrIh+χ̂Ihηsps2-1+1Ih(μ)p(0)(μ,μ)dμ\begin{eqnarray} \mathcal R_h (I_h(\x)) = \, &&\frac{\partial}{\partial r}\left( \mu\, I_h \right) + \frac{\partial}{\partial \mu} \left( \frac{1-\mu^2}{r}\, I_h \right)\nonumber\\ &&+ \frac{2\, \mu}{r}\, I_h +\hat{\chi} \, I_h - \eta^{\text{sp}} - \frac{\overline{s}}{2} \int_{-1}^{+1} I_h(\mu') \, p^{(0)}(\mu,\mu') \, {\rm d}\mu' \end{eqnarray}(19)with IhVh. In the context of finite element methods this residual is minimised with respect to all test functions φhkCc(Dk)\hbox{$\phi_h^k \in C_\text{c}^\infty(\D^k)$} in each element. This gives the weak formulation of Eq. (10), which represents the physical principle of virtual work. Thus, it is required that Dkh(x)φhk(x)dx=0forallφhkCc(Dk)andk=1,...,K.\begin{equation} \int_{\D^k} \mathcal R_h(\x) \,\phi_h^k(\x) \, {\rm d}\x = 0 \quad \text{for all } \phi_h^k \in C_\text{c}^\infty(\D^k) \ \text{and } k=1,\dotsc,K. \end{equation}(20)For this study we consider only test functions, which are members of the same finite vector space as the trial functions, i.e. φhkVhkCc(Dk)\hbox{$\phi^k_h \in \V^k_h \subset C_\text{c}^\infty(\D^k)$}. This corresponds to a Ritz-Galerkin method (Hesthaven & Warburton 2008). We note that in principle φhk\hbox{$\phi^k_h$} may also be defined as a member of vector spaces other than Vhk\hbox{$\V^k_h$} (e.g. δ-distributions). The choice of different trial and test vector spaces leads to Petrov-Galerkin finite element schemes (Hesthaven & Warburton 2008) which are, however, not considered here.

For this particular choice of test functions we require for each element DkDkh(x)φhk(x)dx=0forallφhkVhkandk=1,...,K,\begin{equation} \label{eq:element_res1} \int_{\D^k} \mathcal R_h(\x)\, \phi_h^k(\x)\, {\rm d}\x = 0 \quad \text{for all } \phi_h^k \in \V^k_h \ \text{and } k=1,\dotsc,K, \end{equation}(21)i.e. the residual is required to be orthogonal to all test functions φhkVhk\hbox{$\phi_h^k \in \V_h^k$}. Since the test functions are given by a linear combination of the Lagrange polynomials, i.e. φhk=i=1Npφ̂kiik(x)\begin{equation} \phi_h^k = \sum_{i=1}^{N_p} \hat{\phi}_i^k \, \ell_i^k (\x) \end{equation}(22)with the expansion coefficients φ̂khR\hbox{$\hat{\phi}_h^k \in \mathbb{R}$}, Eq. (21)results in the Np equations Dkh(x)i(x)dx=0fori=1,...,Np\begin{equation} \label{eq:element_res2} \int_{\D^k} \mathcal R_h(\x)\, \ell_i(\x) \, {\rm d}\x = 0 \quad \text{for } i=1,\dotsc,N_p \end{equation}(23)on each element Dk.

In summary, we consider in this work the following DG(q)-method: Seek IhVh such that Dk{∂r(μIhk)+∂μ(1μ2rIhk)+2μrIhk+χ̂Ihkηsps2-1+1Ihk(μ)p(0)(μ,μ)dμ}ik(x)dx=0inΩ,Ih∂r=2rIhχ̂Ih±ηsp±s2-1+1Ih(μ)p(0)(±1,μ)dμonΓμ±,Ih=IinonΓin+,Ih=IoutonΓout\begin{equation} \label{eq:dg_method} \begin{aligned} \int_{\D^k} & \bigg\{ \frac{\partial}{\partial r}\left( \mu \, I_h^k \right) + \frac{\partial}{\partial \mu} \left( \frac{1-\mu^2}{r} \, I_h^k \right) + \frac{2\, \mu}{r} \, I_h^k + \hat{\chi}\, I_h^k - \eta^{\text{sp}} \\ & - \frac{\overline{s}}{2} \int_{-1}^{+1} I_h^k(\mu') \, p^{(0)}(\mu,\mu') \, {\rm d}\mu' \bigg\} \,\ell_i^k(\x)\, {\rm d}\x = 0 && \text{in } \Omega,\\ \frac{\partial I_h}{\partial r} = &-\frac{2}{r} \, I_h \mp \hat{\chi}\, I_h \pm \eta^{\text{sp}} \\ &\pm \frac{\overline{s}}{2} \int_{-1}^{+1} I_h(\mu') \, p^{(0)}(\pm 1,\mu') \, {\rm d}\mu'&& \text{on } \Gamma_{\mu^\pm},\\ I_h = & ~I_{\text{in}} &&\text{on } \Gamma_{\text{in}}^+,\\ I_h = & ~I_{\text{out}} &&\text{on } \Gamma_{\text{out}}^- \end{aligned} \end{equation}(24)for i = 1,...,Np and k = 1,...,K.

3.1. Elementwise calculations

Let us first consider the two terms 2μrIhk+χ̂Ihk\hbox{$\frac{2\,\mu}{r}\, I_h^k +\hat{\chi}\, I_h^k$} under the integral in Eq. (24). Using the expansion of the solution Ihk\hbox{$I_h^k$} within one element k (see Eq. (13)) yields Dk(2μr+χ̂)Ihkikdx=j=1NpIhk(xjk)Dk(2μr+χ̂)jkikdxforalli,j𝒩k.\begin{eqnarray} \int_{\D^k} \left( \frac{2\,\mu}{r} + \hat{\chi} \right) \, I_h^k \, \ell_i^k \,{\rm d}\x = \sum_{j=1}^{N_p} I_h^k (\x_j^k) \int_{\D^k} && \left( \frac{2\,\mu}{r} + \hat{\chi} \right) \,\ell^k_j \,\ell^k_i \,{\rm d}\x \nonumber\\ && \text{for all } i,j \in \mathcal N^k. \end{eqnarray}(25)This defines the local symmetric mass matrix k=(ijk)\hbox{$\mathcal M^k=(\mathcal M_{ij}^k)$} with ijk:=Dk(2μr+χ̂)jkikdxforalli,j𝒩k.\begin{equation} \mathcal M_{ij}^k := \int_{\D^k} \left( \frac{2\, \mu}{r} + \hat{\chi} \right)\, \ell^k_j \, \ell^k_i {\rm d}\x \quad \text{for all } i,j \in \mathcal N^k. \label{eq:mass_matrix} \end{equation}(26)The term ηsp in Eq. (24)simply yields the local load vector k=(ik)\hbox{$\mathcal B^k=(\mathcal B_{i}^k)$}, with ik:=Dkηspikdxforalli𝒩k.\begin{equation} \label{eq:local_load_vector} \mathcal B^k_i := \int_{\D^k} \eta^{\text{sp}} \,\ell_i^k {\rm d}\x \quad \text{for all } i \in \mathcal N^k. \end{equation}(27)Next we consider the differential with respect to r in Eq. (24). An integration by parts shifts the differential from the unknown quantity Ihk\hbox{$I_h^k$} to the test function ik\hbox{$\ell^k_i$} introducing an additional integral over the boundary of the element Dk, i.e. Dk∂r(μIhk)ikdx=DkμIhkik∂rdx+Dknˆr·μIhikdsforalli𝒩k,\begin{eqnarray} \int_{\D^k} \frac{\partial}{\partial r} \left( \mu \,I_h^k \right) \,\ell^k_i {\rm d}\x = - \int_{\D^k} \mu \, I_h^k \, \frac{\partial \ell^k_i}{\partial r} {\rm d}\x + \int_{\partial \D^k} && \hat{\boldsymbol n}_r \cdot \mu \, I_h \ell^k_i {\rm d}\s \nonumber\\ &&\hspace*{-5mm} \text{for all } i \in \mathcal N^k , \end{eqnarray}(28)where nˆr\hbox{$\hat{\boldsymbol n}_r$} denotes the outward facing normal vector in r direction (see Fig. 3).

Because it is allowed to be discontinuous across element boundaries, the solution Ih is not uniquely defined at the boundary. Therefore, a numerical flux (f) is introduced which describes the flow of information from one element to another, yielding Dknˆr·μIhikds=Dknˆr·(f)(Ihk,Ihn)ikds.\begin{equation} \int_{\partial \D^k} \hat{\boldsymbol n}_r \cdot \mu\, I_h \, \ell^k_i {\rm d}\s = \int_{\partial \D^k} \hat{\boldsymbol n}_r \cdot (f)^*(I_h^k,I_h^n) \, \ell_i^k {\rm d}\s. \end{equation}(29)The numerical flux depends in general on the solutions of the local element Ihk\hbox{$I_h^k$} and the adjacent element Ihn\hbox{$I_h^n$} and is directly related to the dynamics of the considered differential equation. For a particular choice of the flux a matrix kn can be defined which contains the contributions due to the jump at the inter-element boundaries between the elements k and n. The exact contribution depends on the details of the numerical flux used, as discussed in Sect. 3.2.

Using again the expansion of Eq. (13)for the solution in the element k, the local stiffness matrix 𝒮rk=(𝒮ij,rk)\hbox{$\mathcal S^k_{r}=(\mathcal S_{ij,r}^k)$} can be introduced as 𝒮ij,rk:=Dkμjkik∂rdxforalli,j𝒩k.\begin{equation} \mathcal S^k_{ij,r} := - \int_{\D^k} \mu\, \ell^k_j \,\frac{\partial \ell^k_i}{\partial r} \, {\rm d}\x \quad \text{for all } i,j \in \mathcal N^k. \label{eq:stiffness_matrix_r} \end{equation}(30)For the differential with respect to μ in Eq. (24)integration by parts yields Dk∂μ(1μ2rIhk)ikdx=Dk1μ2rIhkik∂μdx+Dknˆμ·1μ2rIhikds=Dk1μ2rIhkik∂μdx+Dknˆμ·(f)ikds\begin{eqnarray} \int_{\D^k} \frac{\partial}{\partial \mu} \, &&\left(\frac{1-\mu^2}{r} \, I_h^k \right) \, \ell^k_i \,{\rm d}\x=\nonumber\\ && - \int_{\D^k} \frac{1-\mu^2}{r} \, I_h^k \frac{\partial \ell^k_i}{\partial \mu} \, {\rm d}\x + \int_{\partial \D^k} \hat{\boldsymbol n}_\mu \cdot \frac{1-\mu^2}{r} \, I_h \ell^k_i \,{\rm d}\s\nonumber\\ =&& - \int_{\D^k} \frac{1-\mu^2}{r}\, I_h^k \,\frac{\partial \ell^k_i}{\partial \mu} \,{\rm d}\x + \int_{\partial \D^k} \hat{\boldsymbol n}_\mu \cdot (f)^* \ell^k_i \,{\rm d}\s \end{eqnarray}(31)for all \hbox{$i \in \mathcal N^k$} and the respective outward facing normal vector in μ direction (see Fig. 3).

thumbnail Fig. 3

Jump in the numerical solution along the normal nˆ\hbox{$\hat{\boldsymbol n}$} between P2 elements. The normals in the directions of r and μ are denoted by nˆr\hbox{$\hat{\boldsymbol n}_r$} and nˆμ\hbox{$\hat{\boldsymbol n}_\mu$}, respectively.

The corresponding stiffness matrix is given by 𝒮ij,μk:=Dk1μ2rjkik∂μdxforalli,j𝒩k.\begin{equation} \mathcal S^k_{ij,\mu} := - \int_{\D^k} \frac{1-\mu^2}{r} \, \ell_j^k \frac{\partial \ell_i^k}{\partial \mu}\, {\rm d}\x \quad \text{for all } i,j \in \mathcal N^k. \label{eq:stiffness_matrix_mu} \end{equation}(32)The total local stiffness matrix Sk=(𝒮jik)\hbox{$S^k=(\mathcal S_{ji}^k)$} for the element k can then be obtained by the sum of Sij,μk\hbox{$S^k_{ij,\mu}$} and Sij,rk\hbox{$S^k_{ij,r}$}, i.e. 𝒮ijk:=𝒮ij,rk+𝒮ij,μk.\begin{equation} \mathcal S^k_{ij} := \mathcal S^k_{ij,r} + \mathcal S^k_{ij,\mu}. \end{equation}(33)

3.2. Numerical flux

The numerical flux considered here is the known as the upwind flux (e.g. Cockburn 2003; Hesthaven & Warburton 2008), given by (f)=(aI)={{aI}}+12|a|˜I¨\begin{equation} (f)^*=(a I)^* = \lbrace \lbrace a I \rbrace \rbrace + \tfrac{1}{2} \left| a \right| \llbracket I \rrbracket \end{equation}(34)with {{I}}=I+I+2\begin{equation} \lbrace \lbrace I \rbrace \rbrace = \frac{I^- + I^+}{2} \end{equation}(35)as the average of the solutions and ˜I¨=nˆI+nˆ+I+\begin{equation} \llbracket I \rrbracket = \hat{\boldsymbol n}^- I^- + \hat{\boldsymbol n}^+ I^+ \end{equation}(36)as the jump of the solution along the normal. The situation is shown in Fig. 3, where the jump between two P2 elements is illustrated. The parameter a is here either given by a=μ\begin{equation} a = \mu \end{equation}(37)for the differential with respect to r, or by a=1μ2r\begin{equation} a = \frac{1-\mu^2}{r} \end{equation}(38)for the differential with respect to μ. This particular flux was chosen because for the radiative transfer problem considered here information propagates only in the direction of photon travel. The upwind flux for radiative transfer problems has already been considered by e.g. Li (2006). We note, however, that the choice of this flux is not unique. Other fluxes with different properties may be used (see Cockburn 2003, for a review on DG fluxes). The connection between the test and trial functions of the adjacent elements can be written as a matrix ijkn:=Dknˆr·(f)(Ihk(ik),Ihn(jn))ikdx\begin{eqnarray} \mathcal F^{kn}_{ij} := \int_{\partial \D^k} \hat{\boldsymbol n}_r \cdot (f)^*\!\left(I_h^k(\ell_i^k),I_h^n(\ell_j^n)\right)&& \, \ell_i^k {\rm d}\x \nonumber\\ && \text{for all } i \in \mathcal N^k \text{ and } j \in \mathcal N^n. \label{eq:dg_jump} \end{eqnarray}(39)Unlike the other matrices (such as k), which are only defined over a single element, the matrix kn connects a local element k with adjacent elements n. If the scattering integral considered below is not taken into account, this would be the only connection between different elements.

3.3. Scattering matrix

The contribution due to scattering in Eq. (24)is given by the integral Dk(s2-1+1Ihk(r,μ)p(0)(r,μ,μ)dμ)ik(x)dxforalli𝒩k.\begin{equation} \int_{\D^k} \left(\frac{\overline{s}}{2} \int_{-1}^{+1} I_h^k(r,\mu') \,p^{(0)}(r,\mu,\mu')\, {\rm d}\mu' \right)\, \ell_i^k(\x) \, {\rm d}\x \quad \text{for all } i \in \mathcal N^k. \end{equation}(40)Using the expansions from Eqs. (13)and (18)results in Dk(s2-1+1Ihk(r,μ)p(0)(r,μ,μ)dμ)ik(x)dx=n=1Kj=1NpIhk(rjn,μjn)×Dk(s(r)-1+1jn(r,μ)p(0)(r,μ,μ)dμ)ik(x)dx\begin{eqnarray} \int_{\D^k} \left(\frac{\overline{s}}{2} \int_{-1}^{+1} I_h^k(r,\mu') \, p^{(0)}(r,\mu,\mu')\, {\rm d}\mu' \right) \, \ell_i^k(\x)\, {\rm d}\x=\nonumber\\ \sum_{n=1}^{K} \sum_{j=1}^{N_p} I_h^k(r_j^n,\mu_j^n)\nonumber\\ \times \int_{\D^k} \left( \overline{s}(r) \, \int_{-1}^{+1} \ell_j^n(r,\mu') \, p^{(0)}(r,\mu,\mu') \, {\rm d}\mu' \right) \, \ell_i^k(\x) \, {\rm d}\x \end{eqnarray}(41)for all \hbox{$i \in \mathcal N^k$} and \hbox{$\ j \in \mathcal N^n$}. This defines a matrix \hbox{$\mathcal J^{kn}$} containing the contributions due to scattering 𝒥ijkn=Dk(s2-1+1jn(r,μ)p(0)(r,μ,μ)dμ)ik(x)dxforalli𝒩kandj𝒩n.\begin{eqnarray} \mathcal J^{kn}_{ij} = \int_{\D^k} \left( \frac{\overline{s}}{2} \int_{-1}^{+1} \ell_j^n(r,\mu') \, p^{(0)}(r,\mu,\mu')\, {\rm d}\mu' \right) \, \ell_i^k(\x)\, {\rm d}\x\nonumber\\ \quad \text{for all } i \in \mathcal N^k \text{ and } j \in \mathcal N^n. \label{eq:scattering_integral} \end{eqnarray}(42)We note that the scattering integral in Eq. (42)only contains known quantities, namely the scattering phase function p(0) and the Lagrange polynomials j. Thus, the integral can be evaluated exactly for any arbitrary complex phase function, independent of the mesh resolution. This is a direct advantage over other radiative transfer methods, for example the discrete ordinate methods (Thomas & Stamnes 2002) where the evaluation of the scattering integral is directly coupled to the resolution of the angular mesh (Chandrasekhar 1960).

3.4. Transformation matrix

To assemble a global matrix for the solution of the resulting system of equations, the matrixes and tensors with the local indices i and j must be mapped onto a matrix with global indices. This is done via a transformation matrix \hbox{$\mathcal T$}. Let g be a linear bijective mapping, which maps the set \hbox{$\mathcal N^k$} of local indices i within each element k onto a set \hbox{$\mathcal N$} of global coordinates 𝒩={1,...,k·Np}\begin{equation} \mathcal N = \lbrace 1, ..., k \cdot N_p \rbrace \end{equation}(43)with g:𝒩k𝒩,g(i,k)=α𝒩.\begin{equation} g: \mathcal N^k \rightarrow \mathcal N , \quad g(i,k) = \alpha \in \mathcal N. \end{equation}(44)The linear mapping can be written as a transformation matrix \hbox{$\mathcal T^k$}. The matrix 𝒯αik\hbox{$\mathcal T_{\alpha i}^{k}$} then maps, for example, the scattering matrix \hbox{$\mathcal J^{kn}$} onto the global scattering matrix \hbox{$\mathcal J$} with the global indices α and β, which yields 𝒥αβ=k=1Kn=1Ki=1Npj=1Np𝒯βjn𝒯αik𝒥ijkn.\begin{equation} \mathcal J_{\alpha \beta} = \sum_{k=1}^{K} \sum_{n=1}^{K} \sum_{i=1}^{N_p} \sum_{j=1}^{N_p} \mathcal T_{\beta j}^{n}\, \mathcal T_{\alpha i}^{k} \, \mathcal J^{kn}_{ij}. \end{equation}(45)The global mass matrix , stiffness matrix \hbox{$\mathcal S$}, and jump matrix can be obtained via the same process. The total left-hand side matrix \hbox{$\mathcal A$} of the linear system of equations can be expressed by

𝒜αβ=𝒥αβ+αβ+𝒮αβ+αβ.\begin{equation} \mathcal A_{\alpha \beta} = \mathcal J_{\alpha \beta} + \mathcal M_{\alpha \beta} + \mathcal S_{\alpha \beta} + \mathcal F_{\alpha \beta} \, . \end{equation}(46)The resulting linear system of equations is then 𝒜·I=\begin{equation} \mathcal A \cdot \mathbf I = \mathcal B \label{eq:problem_lse} \end{equation}(47)with Iα:=k=1Ki=1Np𝒯αikIhk(xik)\hbox{$\mathbf I_\alpha := \sum_{k=1}^{K} \sum_{i=1}^{N_p} \mathcal T_{\alpha i}^{k} \, I_h^k(\x_i^k)$} and the global load vector (cf. Eq. (27)). Since \hbox{$\mathcal A$} is a sparse matrix, the system can be efficiently solved by an iterative method (such as GMRES) and an appropriate pre-conditioner in many cases (Hackbusch 1994).

However, as mentioned by Kanschat & Meinköhn (2004) the matrix \hbox{$\mathcal A$} is sometimes badly conditioned, especially in cases with high opacity and single scattering albedos. The usual pre-conditioners (such as ILU, Hackbusch 1994) in combination with GMRES then fail to yield a converged solution. In this case a more adapted pre-conditioner is required to solve the system of Eq. (47). An example of such a pre-conditioner based on the Eddington approximation but limited to a plane-parallel situation is given by Kanschat & Meinköhn (2004). Nonetheless such a pre-conditioner should also be adaptable to spherically symmetric atmospheres which will be the subject of a forthcoming publication.

4. Test problems

In this section, we test our previously described numerical solution of the radiative transfer equation with a discontinuous Galerkin method. Due to the lack of exact solutions, we need to rely on test problems for comparison, where the resulting radiation field is known a priori, or to make a comparison with results of previously published calculations.

The first two tests evaluate the numerical stability and flux conservation in an empty atmosphere. In this case, the photons follow the characteristic paths of the transfer Eq. (1). These scenarios also feature discontinuities in their solutions, which will serve as a test for the numerical stability of our DG formulation.

For the third scenario, we refer to the radiative transfer calculations for an isotropically scattering, spherical atmosphere with a power-law extinction coefficient (Hummer & Rybicki 1971). We compare our results with their published values and also verify that the energy is also conserved in this case as required. We note that the intention of these calculations is to validate and verify the numerical approach and its capabilities to cope with discontinuities or highly scattering atmospheres, for example.

4.1. Computational details

We implemented the numerical algorithms described in the previous section by using the general finite element library GetFEM++1. In principle, the element-wise calculations can also be performed in the sense of Alberty et al. (1999). Details of our numerical implementation are given in the Appendix.

A DG(1) method on a structured grid with rectangular Q1 elements is used for the first two test problems. For both cases, the grid contains a total of 100 grid points in the radial direction and 80 grid points in the angular direction. The radius grid points are distributed equidistantly, while the angular mesh is constructed by using a Gaussian quadrature rule. The relatively high resolution is required to capture the discontinuous solutions properly. In principle, a much lower resolution could be used in these cases if an unstructured grid is constructed where the elements are directly aligned to capture the (previously) known discontinuities in the solution.

For the third test problem, we use a DG(2) method on a structured Q2 grid with 25 radial points and 10 angular values. The radial nodes are placed in logarithmic equidistant steps, while for the angular grid a Gaussian quadrature rule is again employed.

The resulting linear system of equations is solved by an iterative GMRES solver with a restart value of 10 in each case. The iteration matrix is preconditioned by an incomplete LU factorisation.

4.2. Empty atmospheres with an isotropically emitting inner surface

thumbnail Fig. 4

Radiation field I(μ,r) as a function of radius r and angular variable μ for an empty, extended atmosphere with an isotropically emitting inner surface.

As a very first test we study the following simple radiative transfer problem rin=1.0,rout=3.0,κ(r)=ηsp(r)=ηind(r)=s(r)=0\begin{equation} \begin{aligned} &r_\mathrm{in} = 1.0,\\ &r_\mathrm{out} = 3.0,\\ &\kappa(r) = \eta^{\text{sp}}(r) = \eta^{\text{ind}}(r) = \overline{s}(r) = 0 \end{aligned} \end{equation}(48)with boundary conditions Iin=4,Iout=0,\begin{equation} \begin{aligned} &I_{\text{in}} = 4,\\ &I_{\text{out}} = 0, \end{aligned} \end{equation}(49)which represents an empty, extended atmosphere with an isotropically emitting inner surface.

thumbnail Fig. 5

Radiation field I(μ,r) as a function of the angular variable μ and three chosen radii r. The vertical dotted line denotes μc, the limiting value of μ under which the inner emitting surface is seen at the outer boundary r = 3. The discontinuity is accurately captured (i.e. the solution shows no oscillations).

The resulting radiation field I(μ,r) is shown in Fig. 4. Additionally, several cuts through the parameter space are given in Fig. 5, where the intensity I is shown as a function of μ for three different values of r. We note that in this radiative transfer problem a real discontinuity is present in the solution which separates the region of constant intensity originating from the inner surface and the regions where the intensity is zero. The characteristic separating these two regions is given by μc=1rin2r2·\begin{equation} \mu_\text{c} = \sqrt{1-\frac{r_\text{in}^2}{r^2}} \cdot \label{eq:characteristic_inner_boundary} \end{equation}(50)The results in Figs. 4 and 5 clearly show the spherical dilution of the outward directed intensity. With increasing radius r the angle μc, under which the central emitting surface can be seen, decreases strongly. This is illustrated in greater detail in Fig. 5, where the intensity I is shown as a function of μ and for three different values of r. The vertical dotted line marks the limiting value of μc(rout) under which the emitting inner surface is seen at the outer boundary. As suggested by Fig. 5, the DG method presented here accurately reproduces this spherical dilution of the radiation field without introducing numerical oscillations.

Consequently, the DG method is capable of capturing this discontinuity quite well without introducing numerical oscillations which would occur in case of a continuous Galerkin method. In practice, the discontinuity is smeared out over one element. In order to limit the errors introduced by this out-smearing it is possible to use either high mesh resolution in general or adaptive mesh refinement along the discontinuous boundaries of the intensity given by Eq. (50).

Because there are no interactions of the atmosphere with the radiation field in this test example, the radiative transfer problem should be automatically energy conserving. For a spherically symmetric atmosphere this means that the flux (r2H(r)) is constant throughout the atmosphere, where H is the first angular moment (Eddington flux) of the intensity H(r)=12-1+1I(r,μ)μdμ.\begin{equation} H(r) = \frac{1}{2} \int_{-1}^{+1} I(r,\mu) \, \mu \, {\rm d} \mu . \end{equation}(51)In this first test calculation, the flux is conserved better than 0.01% everywhere in the computational domain, indicating that the DG method is stable and accurate for such a problem.

4.3. Empty atmospheres illuminated by an exterior light source

This test case differs from the previous one only by choosing different boundary conditions Iin=0,Iout=4μ.\begin{equation} \begin{aligned} &I_{\text{in}} = 0 ,\\ &I_{\text{out}} = 4 \mu . \end{aligned} \end{equation}(52)This problem then represents an empty, extended atmosphere illuminated by an exterior light source. The particular form of the outer boundary condition has been chosen to highlight the photons’ characteristics, i.e. the geometric pathways of photons travelling through the atmosphere. The resulting radiation field is shown in Figs. 6 and 7.

thumbnail Fig. 6

Radiation field I(μ,r) as a function of radius r and angular variable μ for an empty, extended atmosphere illuminated by an exterior light source. The curved black lines illustrate a number of selected characteristics of this radiative transfer problem, i.e. the pathways of photons through the atmosphere. The vertical white line separates ingoing and outgoing directions.

thumbnail Fig. 7

Radiation field I(μ,r) as a function of the angular variable μ and three chosen radii r. The discontinuity is accurately captured (i.e. there are no oscillations in the solution).

As can be clearly be seen in Fig. 6, only a small fraction of the incident radiation eventually reaches the inner surface. The remaining radiation is transmitted through the atmosphere and leaves the computational domain at the outer boundary with the same intensity and under the same angle as the incident radiation field. The curved black lines in Fig. 6 illustrate some of the characteristics of this radiative transfer problem, i.e. the pathways of photons through the atmosphere. This behaviour is very different to problems with plane-parallel geometry where the incident light under any angle would eventually reach the surface.

Like the previous test case, this radiative transfer problem also has a discontinuous solution in a part of its computational domain. This discontinuity is also captured accurately by the DG formulation introduced in this work (see Fig. 7). Again, the flux is conserved better than 0.01% everywhere in the computational domain.

4.4. Isotropically scattering atmosphere

To prove that our DG radiative transfer method can handle non-local scattering problems, we compare our results with calculations published in Hummer & Rybicki (1971) resembling a purely scattering, spherical atmosphere with a power-law opacity in this section. In contrast to our work, Hummer & Rybicki (1971) used an iterative moment method to obtain the solution of the radiative transfer equation, although owing to the limitation of this method, only isotropic scattering was taken into account. The radiative transfer problem considered here for comparison is therefore specified by rin=0.01,rout=0.1,κ(r)=ηsp(r)=ηind(r)=0,s(r)=r3/2.\begin{equation} \begin{aligned} &r_\mathrm{in} = 0.01,\\ &r_\mathrm{out} = 0.1,\\ &\kappa(r) = \eta^{\text{sp}}(r) = \eta^{\text{ind}}(r) = 0,\\ &\overline{s}(r) = r^{-3/2} . \end{aligned} \end{equation}(53)Following Hummer & Rybicki (1971), scattering is assumed to be isotropic, i.e. the scattering phase function is given by p(0)(μ,μ)=1.\begin{equation} p^{(0)}(\mu,\mu') = 1 . \end{equation}(54)Boundary conditions are chosen to resemble those introduced in Hummer & Rybicki (1971). The moment method employed by Hummer & Rybicki (1971) allowed for a direct prescription of the radiation flux at the inner boundary, which was set to rin2H(rin)=1\hbox{$r_\text{in}^{2} H(r_\text{in}) = 1$}. At the outer boundary, no incident radiation was assumed. To replicate these constant flux boundary conditions, we employed the following conditions on the specific intensity at the domain boundaries Iin=4rin-22-10μI(μ,rin)dμIout=0.\begin{equation} \begin{aligned} &I_{\text{in}} = 4 \, r_\text{in}^{-2} - 2 \int_{-1}^{0} \mu \, I(\mu,r_\text{in}) \, {\rm d}\mu\\ &I_{\text{out}} = 0. \end{aligned} \end{equation}(55)This inner boundary condition is obtained from the requirement that rin2H(rin)=rin212-1+1μI(μ,rin)dμ=rin212-10μI(μ,rin)dμ+rin2120+1μI(μ,rin)dμ=rin212-10μI(μ,rin)dμ+rin214I(+μ,rin)=1,\begin{eqnarray} r_\text{in}^{2} H(r_\text{in}) &=& r_\text{in}^{2} \frac{1}{2} \int_{-1}^{+1} \mu \, I(\mu,r_\text{in}) \, {\rm d}\mu\nonumber\\ &=& r_\text{in}^{2} \frac{1}{2} \int_{-1}^{0} \mu \, I(\mu,r_\text{in}) \, {\rm d}\mu + r_\text{in}^{2} \frac{1}{2} \int_{0}^{+1} \mu \, I(\mu,r_\text{in}) \, {\rm d}\mu\nonumber\\ &=& r_\text{in}^{2} \frac{1}{2} \int_{-1}^{0} \mu \, I(\mu,r_\text{in}) \, {\rm d}\mu + r_\text{in}^{2} \, \frac{1}{4} \, I(+\mu,r_\text{in}) \nonumber\\ & =& 1 , \end{eqnarray}(56)assuming an isotropic distribution of I( + μ,rin).

thumbnail Fig. 8

Radiation field I(μ,r) as a function of radius r and angular variable μ. The vertical black line separates ingoing and outgoing directions.

Because of the purely scattering atmosphere, the radiation flux r2H(r) needs to be conserved throughout the atmosphere. The resulting values of r2H(r) differ from the assumed constant flux at the inner boundary rin2H(rin)=1\hbox{$r_\text{in}^2 H(r_\text{in}) = 1$} by less than 0.5% everywhere in the computational domain. In the inner part of the atmosphere, the highest deviations are below 0.001% indicating again the capability of the DG method.

The resulting radiation field I(μ,r) is shown in Fig. 8. In contrast to the previous two test problems, no discontinuity occurs in this case. Owing to the many multiple scattering events, the radiation field exhibits a smooth behaviour in angle and radius. At the inner boundary, the radiation field is isotropic, resulting in an Eddington factor of 0.3 as expected.

Mean intensity.

Figure 9 shows the resulting values of the mean intensity r2J(r) in comparison to the corresponding tabulated values taken from Table II in Hummer & Rybicki (1971). Agreement with the results of Hummer & Rybicki (1971) are excellent in all parts of the isotropically scattering atmosphere. It should be noted that the grid resolution used in the present calculation is much lower than that employed by Hummer & Rybicki (1971) (200 r-points, 100 angles). We use a factor of eight fewer radius grid points and a factor of ten fewer angular values. The radiation field as a function of radius and angle is rather smooth and so does not require a high resolution – especially since the intensity here is assumed to be a second-order polynomial within each element.

thumbnail Fig. 9

Mean intensity r2J as a function of the radius for an isotropically scattering atmosphere. The dots mark the corresponding results published by Hummer & Rybicki (1971).

Limb-darkening.

The limb-darkening curves \hbox{$I(\mathcal P)/I(0)$} are shown in Fig. 10 as a function of the impact parameter \hbox{$\mathcal P$}, given by 𝒫=rout1μ2.\begin{equation} \mathcal P = r_{\text{out}} \sqrt{1 - \mu^2} . \end{equation}(57)The curve shows an excellent agreement with the results of Hummer & Rybicki (1971; their Fig. 6). The calculated disk centre intensity I(0) is 816.4, which deviates by less than 0.5% from the value of 820 given in Hummer & Rybicki (1971). We note, however, that their solution was stated to have a flux conservation error of a few percent at the outer boundary, while our flux is conserved better than 0.5% everywhere, which can explain the slight deviations in the disk centre intensity.

thumbnail Fig. 10

Limb-darkening curve I(p) /I(0) as a function of the impact parameter \hbox{$\mathcal P$}. The dots mark the corresponding results from Hummer & Rybicki (1971), which have been directly read off their Fig. 6.

5. Numerical efficiency

In this section we study the development of the computational time as a function of the total number of degrees of freedom N by using the previous, third test example for the DG(2) method (isotropic scattering atmosphere). We test separately the dependence on the number of angular and on radius points. Successively increasing the resolution in either grid direction, we track the development of the computational effort. For a grid composed of Qq elements with Nq local degrees of freedom N is given by N=(Nr1)·(Nμ1)·Nq,\begin{equation} N = (N_r - 1) \cdot (N_\mu - 1) \cdot N_q , \end{equation}(58)where Nr and Nμ are the number of radial and angular grid points. According to Nq=(q+1)2,\begin{equation} N_q = (q+1)^2 , \end{equation}(59)the number of local degrees of freedom for the Q2 elements used here is nine (see Fig. 2). We note that the computational time includes every single step to solve the problem, from the construction of the grid and finding the corresponding elements throughout the grid that need to be connected by the scattering integral to calculating the element-wise contributions to the matrix \hbox{$\mathcal A$} and solving the linear system of equations. In reality, many of these tasks need to be done only once – such as the element connections – and their results can be re-used at different iteration steps or for other frequencies.

The corresponding results are shown in Fig. 11, which also depicts the corresponding linear fits through the obtained data points to determine the order of dependence on the grid point number. The results in Fig. 11 suggest that the computing time increases linearly with the number of radius points. For a smaller number of angles, the computational time increases with N1.5. For numbers of N larger than about 10 000, this dependency changes to N2.5 (see Fig. 11). For comparison, the iterative method using variable Eddington factors as employed by Hummer & Rybicki (1971) typically scales cubic in the number of radius grid points for one iteration step Mihalas (1978), if for each radius point a corresponding tangent ray (equal to two angular directions) is used. Several iterations, however, are needed to obtain a converged solution, which means that the overall computational cost is larger than this estimate.

It should be noted that with increasing numbers of degrees of freedom, most of the time is spent solving the linear system of equations. This is, in fact, the main reason for the increase in the computational time for the angular points. The scattering integral (Eq. (42)) is responsible for connecting elements in the final matrix \hbox{$\mathcal A$} which are, however, not direct neighbours in the grid. Depending on the actual implementation of the element numbering scheme (and, thus their position in \hbox{$\mathcal A$}), the contributions to the integral Eq. (42)by those elements can be scattered throughout the matrix \hbox{$\mathcal A$}. This makes an efficient solution of the linear system of equations quite hard for an iterative solver. A considerable decrease in computing time could, therefore, be obtained when the element numbering scheme would take the elements’ connections due to the scattering integral into account, such that the contributions of these elements would be located closer to the main diagonal of the matrix \hbox{$\mathcal A$} (see e.g. Cuthill & McKee 1969). For a purely scattering atmosphere, we were able to obtain converged solutions up to optical depths of around 100. Beyond that, the matrix \hbox{$\mathcal A$} becomes too badly conditioned to be solved by a standard GMRES scheme with an ILU preconditioner. As mentioned in Sect. 3.4, a more sophisticated preconditioner needs to be developed for such cases.

thumbnail Fig. 11

Development of the normalised computational time as a function of the number of degrees of freedom. Both variables are depicted in logarithmic scale. The black dots mark the results for increasing the number of radius grid points from 40 to 500, while the number of angles is kept constant at 10. The red crosses indicate the results for increasing the angular resolution from 10 to 82, using a constant radial grid point number of 40. The corresponding solid lines depict the linear fits through the respective data points. For the angular nodes, two different fits are used.

6. Outlook

The implementation of the DG-FEM presented in this work can be greatly extended in the future in view of its numerical efficiency. One improvement which can be addressed is adaptive grid refinement in combination with error estimation. To this end, the residual in Eq. (23)provides the opportunity of obtaining an a posteriori error estimate. The pointwise error of the calculated solution can be estimated by expressing this equation in a suitable norm. In regions where the error is above a certain threshold, a local grid refinement or a local increase of the polynomial order can then be used to increase the numerical accuracy. Using this adaptive grid refinement ensures that the exact solution is calculated accurately on the entire grid. Adaptive mesh refinement can become important when the solution features a non-monotonous intensity distribution. This can occur within circumstellar dust shells, for example, where the dust forming region somewhere in the atmosphere creates a local maximum in the angular intensity distribution (Gail & Sedlmayr 2014). Such a non-monotonous behaviour can easily be traced by local grid refinement without increasing the resolution in other parts of the grid.

Another option for improving the numerical efficiency of the presented DG-FEM is to parallelise the numerical work. In principle, since the DG-FEM formulation does not enforce continuity across element boundaries, all element-wise calculations presented in Sect. 3.1 can be computed independently from each other. Thus, such independent computations can be parallelised very easily by using MPI or OpenMP schemes, for example. Furthermore, the calculations within each element – unless pushed to very high orders – are always a comparatively small numerical problem. Such small problems are ideal for running on GPU clusters, i.e. graphic card processors with thousands of cores, which could increase the computational speed by at least one order of magnitude.

Finally, the solution of the final linear system of equations can also be parallised. Special libraries, such as PETSc, are available to distribute the computational task across several CPUs or GPUs. This would be especially helpful in cases where most of the time is spent by the iterative solver.

7. Summary

In this work we presented a numerical method to directly solve the radiative transfer equation in spherical symmetry. We used a discontinuous Galerkin finite element method to discretise the transport equation as a two-dimensional boundary value problem. Arbitrary complex scattering phase function can, in particular, be integrated exactly using this approach. The discretisation yields a sparse system of equations which can be solved by standard iterative methods with suitable preconditioners.

The applicability of the DG-FEM is verified on a set of different test problems. The discontinuous Galerkin method is able to directly describe the spherical dilution of the radiation field in an extended atmosphere. We show that the DG-FEM is able to accurately capture discontinuities which might appear in the solution of the transfer equation for special test problems. We also compared our method with previously published radiative transfer calculations for a spherical, isotropically scattering atmosphere. The agreement between the different approaches was found to be excellent. Consequently, the discontinuous Galerkin method is perfectly suitable for treating accurately the radiative transfer in a spherical atmosphere even with, for example, discontinuities in the radiation field or complex scattering behaviour, which might cause severe numerical problems for other radiative transfer solution methods.


Acknowledgments

D.K. gratefully acknowledges the support of the Center for Space and Habitability of the University of Bern and the MERAC Foundation for partial financial assistance. This work has been carried out within the frame of the National Centre for Competence in Research PlanetS supported by the Swiss National Science Foundation. D.K. acknowledges the financial support of the SNSF. The authors thank the anonymous referee for the very constructive and helpful comments that greatly improved the manuscript.

References

  1. Abbott, D. C., & Lucy, L. B. 1985, ApJ, 288, 679 [NASA ADS] [CrossRef] [Google Scholar]
  2. Alberty, J., Carstensen, C., & Funken, S. 1999, Numerical Algorithms, 20, 117 [NASA ADS] [CrossRef] [MathSciNet] [Google Scholar]
  3. Auer, L. H., & Mihalas, D. 1970, MNRAS, 149, 65 [NASA ADS] [Google Scholar]
  4. Cannon, C. J. 1970, ApJ, 161, 255 [NASA ADS] [CrossRef] [Google Scholar]
  5. Cannon, C. J. 1973, J. Quant. Spec. Radiat. Transf., 13, 627 [NASA ADS] [CrossRef] [Google Scholar]
  6. Castor, J. I., Dykema, P. G., & Klein, R. I. 1992, ApJ, 387, 561 [NASA ADS] [CrossRef] [Google Scholar]
  7. Chandrasekhar, S. 1934, MNRAS, 94, 444 [NASA ADS] [CrossRef] [Google Scholar]
  8. Chandrasekhar, S. 1960, Radiative transfer (New York: Dover) [Google Scholar]
  9. Cockburn, B. 2003, Z. Angew. Math. Mech., 83, 731 [CrossRef] [MathSciNet] [Google Scholar]
  10. Cui, X., & Li, B. 2004, Num. Heat Transfer Part B – Fundamentals, 46, 399 [NASA ADS] [CrossRef] [Google Scholar]
  11. Cuthill, E., & McKee, J. 1969, in Proc. 24th National Conference, ACM ’69 (New York, NY, USA: ACM), 157 [Google Scholar]
  12. Dykema, P. G., Klein, R. I., & Castor, J. I. 1996, ApJ, 457, 892 [NASA ADS] [CrossRef] [Google Scholar]
  13. Eriksson, K., Estep, D., Hansbo, P., & Johnson, C. 1996, Computational Differential Equations (Cambridge University Press) [Google Scholar]
  14. Gail, H.-P., & Sedlmayr, E. 2014, Physics and Chemistry of Circumstellar Dust Shells (Cambridge University Press) [Google Scholar]
  15. Gladstone, G. R., Stern, S. A., Ennico, K., et al. 2016, Science, 351, 8866 [Google Scholar]
  16. Hackbusch, W. 1994, Iterative solution of large sparse systems of equations, Applied mathematical sciences (Berlin: Springer) [Google Scholar]
  17. Henning, T. 2001, in The Formation of Binary Stars, eds. H. Zinnecker, & R. Mathieu, IAU Symp., 200, 567 [Google Scholar]
  18. Hesthaven, J. S., & Warburton, T. 2008, Nodal Discontinuous Galerkin Methods: Algorithms, Analysis, and Applications, Texts in Applied Mathematics (Springer) [Google Scholar]
  19. Hummer, D. G., & Rybicki, G. B. 1971, MNRAS, 152, 1 [NASA ADS] [CrossRef] [Google Scholar]
  20. Kanschat, G. 1996, Ph.D. Thesis, University of Heidelberg and preprint 96−29, IWR Heidelberg [Google Scholar]
  21. Kanschat, G., & Meinköhn, E. 2004, SFB359 Preprints (University of Heidelberg) [Google Scholar]
  22. Kanschat, G., Meinköhn, E., Rannacher, R., & Wehrse, R. 2009, Numerical Methods in Multidimensional Radiative Transfer (Berlin: Springer) [Google Scholar]
  23. Kosirev, N. A. 1934, MNRAS, 94, 430 [NASA ADS] [CrossRef] [Google Scholar]
  24. Kubat, J. 1994, A&A, 287, 179 [NASA ADS] [Google Scholar]
  25. Kunasz, P., & Auer, L. H. 1988, J. Quant. Spec. Radiat. Transf., 39, 67 [NASA ADS] [CrossRef] [Google Scholar]
  26. Kunasz, P. B., & Olson, G. L. 1988, J. Quant. Spec. Radiat. Transf., 39, 1 [NASA ADS] [CrossRef] [Google Scholar]
  27. Li, B. 2006, Discontinuous Finite Elements in Fluid Dynamics and Heat Transfer (London: Springer) [Google Scholar]
  28. Lucy, L. B. 1971, ApJ, 163, 95 [NASA ADS] [CrossRef] [Google Scholar]
  29. Lucy, L. B. 1999, A&A, 344, 282 [NASA ADS] [Google Scholar]
  30. Lucy, L. B. 2005, A&A, 429, 19 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  31. Lucy, L. B., & Abbott, D. C. 1993, ApJ, 405, 738 [NASA ADS] [CrossRef] [Google Scholar]
  32. Mihalas, D. 1978, Stellar atmospheres, 2nd edn. (San Francisco: W. H. Freeman & Co.) [Google Scholar]
  33. Olson, G. L., & Kunasz, P. B. 1987, J. Quant. Spec. Radiat. Transf., 38, 325 [NASA ADS] [CrossRef] [Google Scholar]
  34. Pascucci, I., Wolf, S., Steinacker, J., et al. 2004, A&A, 417, 793 [Google Scholar]
  35. Reed, W. H., & Hill, T. R. 1973, Triangular mesh methods for the neutron transport equation, Tech. Rep. LA-UR-73-479 (Los Alamos Scientific Laboratory) [Google Scholar]
  36. Richling, S., Meinköhn, E., Kryzhevoi, N., & Kanschat, G. 2001, A&A, 380, 776 [NASA ADS] [CrossRef] [EDP Sciences] [Google Scholar]
  37. Steinacker, J., Baes, M., & Gordon, K. D. 2013, ARA&A, 51, 63 [NASA ADS] [CrossRef] [Google Scholar]
  38. Thomas, G. E., & Stamnes, K. 2002, Radiative Transfer in the Atmosphere and Ocean (Cambridge University Press) [Google Scholar]
  39. Unno, W., & Kondo, M. 1976, PASJ, 28, 347 [Google Scholar]

Appendix A: Implementation details

We briefly give details of our implementation of the DG-FEM in a numerical code as one example. As previously mentioned, we use the general finite element library GetFEM++. This library provides a large set of high-level functions and tools which can assist in easily setting up a finite element method. A complete description of the library can be found in its user documentation2. In this appendix we only include the basic set of necessary steps. We refer the reader to the GetFem++ documentation for much more detailed descriptions and explanations on the contents and implementations of the library.

If, alternatively, one is interested in building a finite element from scratch, we refer to e.g. Hesthaven & Warburton (2008), Eriksson et al. (1996), or Alberty et al. (1999) for more details.

Appendix A.1: Grid and element generation

The first step in setting up a finite element method is the generation of the grid and the definition of the elements. Within GetFEM++, the mesh generation can be done via different approaches. One possibility is to construct a grid outside of GetFEM++ (for example by using the mesh generator Gmsh) and to import it. It is also possible to use GetFEM++ itself for grid generation; however, the built-in mesh generation tools cover only very simple grids. A third possibility is to construct a special grid by defining all vertices of the mesh elements. We use this last option since, for example, we want to distribute the angular vertices according to a Gaussian quadrature rule which is not covered by the mesh tools provided by GetFEM++.

A single point is added to a mesh cell with

pts[i] = bgeot::base_node(radius_point,angular_point); ,

followed by

mesh.add_parallelepiped_by_points(2, pts.begin());

to create, e.g., a square mesh cell.

For a given mesh, GetFEM++ will then automatically create the elements. It offers a wide choice of different element definitions (see the user documentation for a complete overview). For our DG-FEM code, we use Lagrangian elements (see Fig. 2), which are created via

mesh_fem.set_finite_element(getfem::fem_descriptor("FEM_QK_DISCONTINUOUS(2,2)"));

for a second-order method on a two-dimensional grid. This has to be coupled with a suitable quadrature method, e.g.

mesh_integration.set_integration_method(getfem::int_method_descriptor ("IM_GAUSS_PARALLELEPIPED(2,4)"));

GetFem++ also offers other quadrature methods which are extensively described in the library’s documentation.

Given a mesh and the definition of the corresponding elements of a chosen polynomial degree, GetFEM++ automatically produces the transformation matrix 𝒯αik\hbox{$\mathcal T_{\alpha i}^{k}$} to map the local coordinates i within the kth element to global coordinates α. GetFEM++ also provides tools to perform calculations of base functions and their derivatives, and to do computations on the faces of elements and providing the corresponding normal vectors at the elements’ faces.

Appendix A.2: Mass matrix

Within GetFEM++, all computations are usually defined on a reference element. The library provides high-level methods for the assembly of the mass and stiffness matrices. For example, the computation of the mass matrix on a single element (cf. Eq. (26)) ijk:=Dk(2μr+χ̂)jkikdx\appendix \setcounter{section}{1} \begin{equation} \mathcal M_{ij}^k := \int_{\D^k} \left( \frac{2\, \mu}{r} + \hat{\chi} \right)\, \ell^k_j \, \ell^k_i {\rm d}\x \label{eq:appendix_mass_matrix} \end{equation}(A.1)is simply defined by

"a=data(#1);" "M(#1,#1) += a(i).comp(Base(#1).Base(#1).Base(#1))(i,:,:)",

where Base(#1) are the base functions k and a contains the function a=2μr+χ̂b,\appendix \setcounter{section}{1} \begin{equation} a = \frac{2\, \mu}{r} + \hat{\chi} b , \end{equation}(A.2)which, following Eq. (13), is expanded into a(x)=i=1Npa(xik)ik(x).\appendix \setcounter{section}{1} \begin{equation} a(\x) = \sum_{i=1}^{N_p} a(\x_i^k) \,\ell_i^k(\x) . \end{equation}(A.3)This summation is denoted i in the definition (i,:,:). The two remaining free indices (denoted by :) are the corresponding matrix indices.

The global mass matrix is defined according to

mass_matrix.set("a=data(#1);" "M(#1,#1) += a(i).comp(Base(#1).Base(#1).Base(#1))(i,:,:)");mass_matrix.assembly(); ,

where the local contributions of each element are calculated and then automatically mapped to the real elements by means of a Jacobian matrix.

Appendix A.3: Stiffness matrix

By analogy, the local stiffness matrix (cf. Eq. (30)) 𝒮ij,rk:=Dkμjkik∂rdx\appendix \setcounter{section}{1} \begin{equation} \mathcal S^k_{ij,r} := - \int_{\D^k} \mu\, \ell^k_j \,\frac{\partial \ell^k_i}{\partial r} \, {\rm d}\x \label{eq:appendix_stiffness_matrix} \end{equation}(A.4)is defined by

"M(#1,#1) -= comp(Base(#2).Base(#1).Grad(#1))(1,:,:,1);".

The parameter Base(#2) describes the μ factor in Eq. (A.4), which in the context of GetFem++ is expressed by a global function. This function returns the μ value for any given point x. The derivative of the base function with respect to r is denoted Grad(#1). The 1 in the last entry in the definition (1,:,:,1) signifies that the derivative has to be performed with respect to the first dimension of the two-dimensional grid, which in our case is the radius coordinate. The global stiffness matrix is then assembled with

stiffness_matrix.set("M(#1,#1) -= comp(Base(#2).Base(#1).Grad(#1))(1,:,:,1);");stiffness_matrix.assembly(); . Of course, the second stiffness matrix (Eq. (32)) is calculated analogously.

Appendix A.4: Numerical flux

The numerical flux (Eq. (39)) is evaluated by integrating along the faces of each element, taking into account the contributions of adjacent elements: ijkn:=Dknˆr·(f)(Ihk(ik),Ihn(jn))ikdx.\appendix \setcounter{section}{1} \begin{equation} \mathcal F^{kn}_{ij} := \int_{\partial \D^k} \hat{\boldsymbol n}_r \cdot (f)^*\!\left(I_h^k(\ell_i^k),I_h^n(\ell_j^n)\right) \, \ell_i^k {\rm d}\x . \end{equation}(A.5)Since the high-level methods from the previous section only operate on one local element, it is necessary to use the special getfem::compute_on_inter_element class which also includes information on the properties of elements sharing a common face. The class method compute_on_gauss_point has to be carefully adapted to calculate the contribution to the integral of Eq. (39)at each of the integral’s quadrature nodes. Within this special object class, GetFEM++ provides all necessary information to evaluate the integral, such as the normal vectors, quadrature nodes, and weights along the face, as well as the entries of the Jacobian matrix to map the computations on the reference element back to the real one. More details on the implementation of this class can be found in the official documentation and the corresponding code examples published together with the source code of the library.

Appendix A.5: Scattering matrix

The scattering matrix is given by (cf. Eq. (42)) 𝒥ijkn=Dk(s2-1+1jn(r,μ)p(0)(r,μ,μ)dμ)ik(x)dx.\appendix \setcounter{section}{1} \begin{equation} \mathcal J^{kn}_{ij} = \int_{\D^k} \left( \frac{\overline{s}}{2} \int_{-1}^{+1} \ell_j^n(r,\mu') \, p^{(0)}(r,\mu,\mu')\, {\rm d}\mu' \right) \, \ell_i^k(\x)\, {\rm d}\x . \end{equation}(A.6)It contains two integrals, the outer one for the integration over a local element and the inner one which integrates the scattering phase function over multiple different elements. For this more complicated term GetFEM++ also provides no direct high-level method.

We use a Gaussian quadrature rule for the discretisation of the inner integral, with an order high enough to ensure an exact integration of the phase function. At each of the Gaussian quadrature nodes from this scattering integral μ, the value of the base function jn(r,μ)\hbox{$\ell_j^n(r,\mu')$} is needed; this point usually lies outside of the considered, local element k. Unless a degree of freedom is directly located at the coordinates (r,μ′), the base function jn(r,μ)\hbox{$\ell_j^n(r,\mu')$} contains contributions from several different degrees of freedom within the element n.

GetFEM++ provides interpolation routines to find the corresponding values of jn\hbox{$\ell_j^n$} for a given radius r and angle μ, as well as the set of degrees of freedom which contribute to this specific base function. Given the mapping from the local coordinates of the ith degree of freedom in the kth element to the global coordinate α and the corresponding mappings of all degrees of freedom connected by the scattering integral with global indices β, it is possible to directly add their contributions to the global matrix \hbox{$\mathcal A_{\alpha \beta}$}.

Appendix A.6: Boundary conditions

The boundary conditions from Eq. (24)can be implemented in two different ways. They can either be introduced in analogy to the integral of the numerical jump from Eq. (39), where the intensity from the adjacent element is replaced by the boundary condition. For example, the outer boundary condition Iout can then be written as ijk=Dknˆr·(f)(Ihk(ik),Iout)ikdxxΓout.\appendix \setcounter{section}{1} \begin{equation} \mathcal F^{k}_{ij} = \int_{\partial \D^k} \hat{\boldsymbol n}_r \cdot (f)^*\!\left(I_h^k(\ell_i^k),I_{\text{out}}\right) \, \ell_i^k {\rm d}\x \quad \x \in \Gamma_{\text{out}}^- . \end{equation}(A.7)This, however, means that the boundary condition is only satisfied in an average sense because it is introduced as a variational formulation.

The second possibility is to directly manipulate the global matrix \hbox{$\mathcal A$} and the load vector . For any degree of freedom α located at an element’s face where a boundary condition needs to be applied, all entries \hbox{$\mathcal A_{\alpha \beta, \alpha \neq \beta}$} are set to zero, while \hbox{$\mathcal A_{\alpha \alpha}$} is set to unity. The αth component of the load vector is then set to the respective boundary condition. This ensures that the boundary conditions are always met exactly. For our implementation, we chose this second variant.

Appendix A.7: Solving the system of equations

GetFEM++ itself provides some basic iterative, numerical methods to solve the system of Eq. (47)optimised for sparse matrices, including a small set of preconditioners. In this study, we use the GMRES method with an ILU preconditioner.

However, if required, the sparse matrix \hbox{$\mathcal A$} and the load vector can also be forwarded to an external solver, such as PETSc or MUMPS, a parallel sparse direct solver library, for example.

All Tables

Table 1

Monomial basis of polynomial spaces Pq and Qq of total and partial degree q, respectively, for n = 2, and q = 0,1,2,3.

All Figures

thumbnail Fig. 1

Computational domain Ω. The boundaries of the domain between the inner radius rin and outer radius rout, as well as μ between + 1 and −1, are denoted by the respective Γ.

In the text
thumbnail Fig. 2

Lagrangian reference elements for dimension n = 2, and polynomial degrees q = 0,1,2,3. The degrees of freedom (see Table 1) are marked with . Top: Pq elements, bottom: Qq elements.

In the text
thumbnail Fig. 3

Jump in the numerical solution along the normal nˆ\hbox{$\hat{\boldsymbol n}$} between P2 elements. The normals in the directions of r and μ are denoted by nˆr\hbox{$\hat{\boldsymbol n}_r$} and nˆμ\hbox{$\hat{\boldsymbol n}_\mu$}, respectively.

In the text
thumbnail Fig. 4

Radiation field I(μ,r) as a function of radius r and angular variable μ for an empty, extended atmosphere with an isotropically emitting inner surface.

In the text
thumbnail Fig. 5

Radiation field I(μ,r) as a function of the angular variable μ and three chosen radii r. The vertical dotted line denotes μc, the limiting value of μ under which the inner emitting surface is seen at the outer boundary r = 3. The discontinuity is accurately captured (i.e. the solution shows no oscillations).

In the text
thumbnail Fig. 6

Radiation field I(μ,r) as a function of radius r and angular variable μ for an empty, extended atmosphere illuminated by an exterior light source. The curved black lines illustrate a number of selected characteristics of this radiative transfer problem, i.e. the pathways of photons through the atmosphere. The vertical white line separates ingoing and outgoing directions.

In the text
thumbnail Fig. 7

Radiation field I(μ,r) as a function of the angular variable μ and three chosen radii r. The discontinuity is accurately captured (i.e. there are no oscillations in the solution).

In the text
thumbnail Fig. 8

Radiation field I(μ,r) as a function of radius r and angular variable μ. The vertical black line separates ingoing and outgoing directions.

In the text
thumbnail Fig. 9

Mean intensity r2J as a function of the radius for an isotropically scattering atmosphere. The dots mark the corresponding results published by Hummer & Rybicki (1971).

In the text
thumbnail Fig. 10

Limb-darkening curve I(p) /I(0) as a function of the impact parameter \hbox{$\mathcal P$}. The dots mark the corresponding results from Hummer & Rybicki (1971), which have been directly read off their Fig. 6.

In the text
thumbnail Fig. 11

Development of the normalised computational time as a function of the number of degrees of freedom. Both variables are depicted in logarithmic scale. The black dots mark the results for increasing the number of radius grid points from 40 to 500, while the number of angles is kept constant at 10. The red crosses indicate the results for increasing the angular resolution from 10 to 82, using a constant radial grid point number of 40. The corresponding solid lines depict the linear fits through the respective data points. For the angular nodes, two different fits are used.

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.