Pencil
The Pencil Code is a high-order finite-difference code for compressible hydrodynamic flows with magnetic fields. It is highly modular and can easily be adapted to different types of problems. The code runs efficiently under MPI on massively parallel shared- or distributed-memory computers, like e.g. large Beowulf clusters.
The Pencil Code is primarily designed to deal with weakly compressible turbulent flows,
which is why we use high-order first and second derivatives. To achieve good parallelization,
we use explicit (as opposed to compact) finite differences. Typical scientific targets
include driven MHD turbulence in a periodic box, convection in a slab with non-periodic
upper and lower boundaries, a convective star embedded in a fully nonperiodic box, accretion
disc turbulence in the shearing sheet approximation, etc.
Magnetic fields are implemented in terms of the magnetic vector potential to ensure
that the field remains solenoidal (divergence-free). At the same time, having the magnetic
vector potential readily available is a big advantage if one wants to monitor the
magnetic helicity, for example. The code is therefore particularly well suited for all kinds
of dynamo problems.
|
|
Last Updated ( Friday, 10 August 2007 )
|