1.3. Piernik MHD CODE

Abstract In this lecture we describe a new multi–fluid, grid MHD code PIERNIK, which is based on the Relaxing TVD scheme. The original scheme is extended by consideration of multiple dynamically independent, but interacting fluids: neutral gas, ionized gas, and dust described within the fluid approximation, with an option to add other fluids in an easy way. The code is equipped with shearing–box boundary conditions, selfgravity module based on FFT, Ohmic resistivity module, as well as other facilities which are useful in astrophysical fluid–dynamical simulations. The code is parallelized by means of the MPI library.

1 Introduction

PIERNIK is an MHD code (see Hanasz et al. [4, 5, 6, 7]) created at Centre for Astronomy, Nicolaus Copernicus University in Toruń, Poland. Current version of the code uses a simple, conservative numerical scheme, which is known as Relaxing TVD scheme (RTVD). General mathematical context of the relaxation and relaxing systems of hyperbolic conservation laws, and related numerical schemes, was presented by Jin & Xin [11]. A particular realization of the Relaxing TVD was developed by Trac & Pen [26] and Pen et al. [20], who presented the numerical method in a pedagogical way, and provided short, publicly available HD and MHD codes. These codes rely on a dimensionally split, second order algorithm in space and time. The Relaxing TVD scheme is easily extendible to account for additional fluid components: multiple fluids, dust, cosmic rays, and additional physical processes, such as fluid interactions and ohmic resistivity effects. The simplicity and a small number of floating point operations of the basic algorithm is reflected in a performance of 10 5 zone–cycles/s (on single–core 2 GHz processors). Public version of PIERNIK code is available via the web-page: http: //piernik.astri.uni.torun.pl. The web–page informs how to access the source code, which is maintained in an SVN repository, together with on–line documentation describing details of code utilization.

2 The Relaxing TVD scheme for MHD simulations

Numerical algorithm of PIERNIK code is based on the conservative form of the MHD system equations begin{equation}label{basiceq} partial _t vec{u} + partial_x vec{F}{(vec{u},vec{B})} + partial_y vec{G}{(vec{u},vec{B})} + partial_z vec{H}{(vec{u},vec{B})} = vec{S}(vec{u}). end{equation} where $vec{u} = left( rho, m_x, m_y, m_z, e right)^T$