spatial discretization ordinate discretization ordinate discretization renumbering discretization

3D optically thick NLTE radiative transfer

by Doris Folini and Rolf Walder

Page contents

Transfer part spacer Rate equation part spacer Visualization
History spacer References spacer Versions


TR3D is part of the A-MAZE code package which provides codes for astrophysical simulations.

TR3D solves the 3D, optically thick, non-relativistic, stationary, frequency decoupled, and unpolarized NLTE radiative transfer problem for moving media for a given density, temperature, and velocity distribution and given radiation sources. In its current form, TR3D is suited for mildly optically thick problems. The optical thickness over one spatial grid cell should not exceed a value of about 0.3 to 0.5. TR3D can be adapted to yet larger optical depths, but so far this has not yet been done.

The solution of the optically thick NLTE radiative transfer problem in 3D generally needs quite a lot of memory. TR3D, in essence, requires you to store

Nnode * ( Nnue + Nlev ) reals, spacer

where Nnode is the number of spatial grid points, Nnue is the number of frequency points, and Nlev is the number of atomic levels. As working memory you need, in addition to that, about another ( 20 * Nnode ) reals.

Transfer part

In TR3D the radiative transfer equation for non-relativistic, stationary, frequency decoupled, and unpolarized radiative transfer is solved by a mean intensity approach.

transfer equation

First, the radiative transfer equation has to be discretized. TR3D uses an equidistant Cartesian mesh and first order upwind finite differences for the advection term.


To account for the direction dependence of the specific intensities the unite sphere in 3D space has to be discretized, discrete ordinates are introduced. This ordinate discretization is equidistant in longitude as well as in latitude, except that some ordinates are omitted towards the poles.

ordinates 1 ordinates 2 mean intensity

Once discretized, we can proceed to the actual heart of TR3D, the mean intensity approach. The basic idea for this approach stems from Turek. The point is to rewrite the discretized transfer equation in such a way that it becomes an equation for the discretized mean intensity J rather than for the directed (or specific) intensities I.


One ends up with a set of linear system of equations, AJ=E, one such set per discrete frequency to be treated. Here J is a vector containing the mean intensity for one particular frequency at each grid point, E is a vector containing, in essence, emission terms with the exception of scattering, and A is a rather full, non-symmetric, definite matrix, which is given only implicitly. This system of equations we solve using a BiCGStab algorithm with diagonal preconditioning.

Note that the above rewriting of the transfer equation requires an inversion of the matrix Thm. Such an inversion is efficiently possible as, for each discrete ordinate direction separately, the spatial grid can be renumbered such that the matrix Thm becomes lower triangular.


Rate equation part

The rate equations or statistical equilibrium equations, along with some conservations laws, describe the level populations of the different atoms and ions. Actually a non-linear system of ordinary differential equations, they are treated in TR3D as a non-linear system of equations only. This corresponds to the assumption that the time scales governing the rate equations are much faster than any flow time scale.

rate equations

With the atomic processes considered within TR3D this system of equations has block structure and is non-linear in the electron density only.

block structure

Usually, the system is badly conditioned and the entries of the solution vector, the atomic level populations, easily differ by ten orders of magnitude.

The system is solved by iteration, using the values of the previous iteration step to get rid of the non-linearities in the present iteration step. For the solution of the then linearized system of equations Housholder transformations are used. Optically thick lines are taken into account using Sobolev coefficients, adapted to 3D.


Visualization of the output of TR3D mainly relies on AVS/Express. Dr. Jean Favre of the Swiss Center of Scientific Computing, CSCS, developed for our purpose some specific modules for use in AVS/Express, which allow the visualization of population numbers and radiation fields. Some rudimentary graphics based on IDL exists as well.


  • 1993: Idea of generalized mean intensities brought up by Turek in the frame of LTE continuum transfer
  • 1998: TR3D developed by Doris Folini in the frame of her PhD thesis
  • 2002: Alexandre Desboeufs and Michael Psarros equip TR3D with an adaptive mesh


R. Walder and D. Folini
A-MAZE: A code package to compute 3D magnetic flows, 3D NLTE radiative transfer, and synthetic spectra
in Thermal and Ionization Aspects of Flows from Hot Stars: Observations and Theory, ASP Conference Series 204, p. 281-284, 2000
(Available as a 47 KB gzipped ps-file)

D. Folini, R. Walder, Michael Psarros, and Alexandre Desboeufs
A new method for 3D radiative transfer with adaptive grids
in Stellar atmosphere modeling, PASP Conference Series, to appear 2003
(Available as a 68 KB gzipped ps-file)

D. Folini and R. Walder
3D radiative transfer under conditions of non local thermodynamic equilibrium: A contribution to the numerical solution
in Hyperbolic Problems: Theory, Numerics, Applications; Editors: M.Fey and R.Jeltsch; p. 305-314, 1999
(Available as a 95 KB gzipped ps-file)

D. Folini Computational approaches to multidimensional radiative transfer and the physics of radiative colliding flows
PhD Thesis, ETH No. 12606, 1998
(Available as a 3.3 MB gzipped ps-file)

Available versions

TR3D: beta-version

Send comments to authors of A-MAZE:
Doris Folini and Rolf Walder
Last Update: October 14, 2002