Talk The use of Python in astrophysics for the post-processing and visualization of "star-in-a- box" simulations

Abstract

Authors: Julien Morin (DIAS, Dublin, Ireland), Boris Dintrans (IRAP, Toulouse,
France), Thomas Gastine (MPS, Lindau, Germany)

We present data processing and visualization tools designed for the analysis of
star-in-a-box direct numerical simulations, aimed at studying convection and
magnetic field generation in stellar interiors. These simulations are performed
with the Pencil Code (http://code.google.com/p/pencil-code/) a GPL-licensed
massively parallel code for magnetohydrodynamic simulations widely used in the
astrophysical community.

Global numerical simulations of fluid motion in stellar interiors are generally
carried out in spherical geometries using spectral codes (physical quantities
are decomposed on a spherical harmonics basis in angular directions and on
Chebishev polynomials in the radial direction) providing a high computational
accuracy. The main drawbacks of this approach are the technical difficulty of
code parallelization and the coordinates system singularity that restrain the
computational domain to spherical shells. During the past decade a
complementary approach has emerged, called star-in-a-box, that consists in
running global stellar simulations in Cartesian geometry by embedding the star
in a cubic box. This method is particularly suited to the study of
fully-convective stars for which we want to simulate fluid motion in a full
sphere and not a spherical shell.

Despite their indubitable coding advantages, star-in-a-box simulations require
a heavier post-processing machinery than their spherical counterpart in order
to produce diagnostics based on spherical coordinates (radial profiles,
azimuthal averages and projection on spherical surfaces). Our code makes
extensive use of Python I/O routines provided with the Pencil Code. Python is
used for interactive and batch data processing of 1 and 2-D slices or averages
(azimuthal averages and slices are directly computed by the Pencil Code) and on
low-resolution simulations. We take advantage of the flexibility of Python to
prototype new diagnostics prior to inclusion in the Pencil Code for higher
computational performance. A variety of 1 and 2-D plots is produced using the
matplotlib library and the basemap toolkit, and the use of Mayavi for 3-D plots
is being explored. Data parallelism is also implemented using the pypar module
that interfaces with MPI libraries.

tagged by
no related entity