The A-MAZE code package

by Doris Folini and Rolf Walder

Page contents

AMRCART spacer TR3D spacer D3NEBEL spacer Visualization spacer Scripts
Access spacer References spacer Acknowledgments


This page contains a brief survey of the A-MAZE code package. For details on each of its parts use the links in the appropriate sections below.

The A-MAZE code package comprises three sets of codes:
  • AMRCART, adaptive mesh codes for 1D-3D hydrodynamics and MHD
  • TR3D, a 3D optically thick NLTE radiative transfer code
  • D3NEBEL, 1D/3D optically thin NLTE radiative transfer codes
Additional software includes: Access to the code package is free for use in research.

Some instructions on how to run the codes comes with the codes themselves. A brief documentation of AMRCART is also available online. Some general information and documentation exists in the form of a series of talks we have given at an 'atélier numérique' at Observatoire Paris Meudon, and some published articles.

Finally, we would like to acknowledge the essential contributions of many other people, friends, collaborators, and students, to the development of A-MAZE.


AMRCART consists of a set of highly flexible codes to compute magnetic and radiative flows from one up to three space dimensions. It makes use of high-resolution finite volume integrators (either Riemann-solver based or using a stabilized Lax-Friedrichs method). We have implemented the adaptive mesh refinement algorithm of Berger, which automatically adjusts the spatial and temporal discretization where a higher resolution is needed. MHD-fluxes are treated as suggested by Powell, ensuring the magnetic field to be divergence-free up to numerical truncation errors. The code was developed by Walder on the basis of a 2D adaptive hydro-code provided by Berger and LeVeque. It is user friendly in the sense that a new problem requires adapting three subroutines only. Want some more information on AMRCART?

AMRCART has been extensively used by the Zürich stellar astrophysics group as well as by some other people. Links to some results and publications: Symbiotic binaries, WR+O binaries, Shock bound slabs, and Molecular clouds.


TR3D solves the 3D, optically thick, non-relativistic, stationary, frequency decoupled, and unpolarized NLTE radiative transfer problem for moving media. The code computes the NLTE level populations and the mean intensity at each grid point.

The transfer part and the rate equation part of the problem are iteratively coupled. For the solution of the transfer part, a generalized mean intensity approach is used, which follows the idea of Turek. Its advantages are the independence of the convergence properties on the grid spacing and the moderate memory requirements. In the use of this approach lies the main difference to other existing solution methods. For the solution of the rate equation part standard techniques are used. For the treatment of optically thick lines Sobolev coefficients, adapted to three dimensions, are used. The input data consist of a 3D density, velocity, and temperature distribution, one or several radiation sources, and atomic data. Want some more information on TR3D? Links to some first applications and publications: wind-wind collision in gamma Velorum.

Note that TR3D is a newly developed code which, although working, is still in a somewhat experimental phase. Its use, therefore, requires some effort and experience with regard to simulations, codes, and numerics.


D3NEBEL solves the 3D, optically thin (nebular conditions), stationary NLTE radiative transfer problem for moving media. The code computes the ionization structures and Doppler broadened line profiles as seen by different observers.

In D3NEBEL 3D is achieved through a set of 1D rays, all emerging from the same source of radiation. Along each 1D ray the transfer part and the rate equation part are coupled iteratively. Automatic adaptation of the spatial step size guarantees the capturing of ionization fronts. A variety of atomic processes are taken into account. The input data consist of a 3D density and velocity distribution, a radiation source, and atomic data. Matter temperatures are either computed consistently or given as input data. Want some more information on D3NEBEL?

Over decades, the progenitor codes of D3NEBEL have been developed and applied by the Zürich stellar astrophysics. Although less used so far, D3NEBEL greatly benefits from these experiences. Links to some results and publications: Symbiotic binaries.


In close collaboration with the authors of A-MAZE, Dr. Jean Favre from CSCS has developed tools for fast visualization of time-dependent, hierarchical, multi-block data as well as for the generation of movies.
These tools are on top of the free-ware graphics package ParaView and the commercial package AVS/Express. More information on these tools can be taken from our graphics page.
Additional graphics software was developed by the authors on top of the NCAR and IDL
graphics packages.
Consult the pages for the individual codes for details on the available graphics software for each code.


A variety of Unix scripts (perl, csh, tcsh) have been developed to facilitate the administration of the numerical simulations. This includes scripts for the adaptation of input files, the annotation and storage of output files, and various issues related to graphics. Small Fortran programs provide the intersection between the different codes with their different input and output data.


The A-MAZE code package is freely available for use in research. Please read the details on how to get it.


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 and R. Walder
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)

J. Favre R. Walder, and D. Folini
Visualization of Astrophysical Data with AVS/Express
CRAY User Conference, Stuttgart, 1998
(Available as a 65 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)

R. Walder
Some Aspects of the Computational Dynamics of Astrophysical Nebulae
PhD Thesis, ETH No. 10302, 1994
(Available upon request)


The development of the A-MAZE code package greatly benefited from the collaboration with Marsha Berger, Jean Favre, Randy LeVeque, Keh-Ming Shyue, Klaus Jürgen Ressel, and Eric de Sturler. We are indebted to the Seminar of Applied Mathematics of ETHZ and its Professors Rolf Jeltsch, Jürg Marti, and Christoph Schwab for steady scientific support and for providing positions. We thank Harry Nussbaumer for devoting positions to code development. We thank Alexandre Desboeufs, Jean Heyvaerts, Guido Kanschat, Bruno Loepfe, Timur Linde, Daniel Megert, Simin Motamen, Rho Shin Myong, Ronny Peickert, Michael Psarros, Phil Roe, and Peter Steiner for their contribution.

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