Physics:Pencil Code

From HandWiki

The Pencil Code is a high-order finite-difference code for solving partial differential equations, written in Fortran 95. The code is designed for efficient computation with massive parallelization. Due to its modular structure, it can be used for a large variety of physical setups like hydro- and magnetohydrodynamics relevant for, e.g., astrophysics, geophysics, cosmology, turbulence, and combustion. Many such setups are available as ready-to-run samples. Pencil Code is free software released under the GNU GPL v2.[1]

Methods

The computational scheme is finite-difference and non-conservative; the time integration is implemented by an explicit scheme. Due to the usage of the vector potential, the magnetic field is intrinsically divergence free. High-order (4th, 6th, and 10th order, as well as single-sided or upwind) derivatives are available to resolve strong variations on the grid scale. With a set of automated tests, the functionality of the code is validated on a daily basis. MPI is used for parallelization, but the code can also be run non-parallel on a simple PC. There are modules for different time-integration schemes (e.g. three-step Runge–Kutta), treatment of shocks, embedded particle dynamics, chemistry, massive parallel I/O, etc.

Applications

The Pencil Code has mainly been applied to describe compressible turbulence and resistive magnetohydrodynamics. Applications include studies of planet formation,[2] the solar dynamo,[3] mono-chromatic radiative transfer,[4] the coronal heating problem,[5] debris disks,[6] turbulent combustion of solid fuels, and others.

History

The Pencil Code development was started in 2001 by Axel Brandenburg and Wolfgang Dobler during the 'Helmholtz Summer School' at the Helmholtz Research Centre for Geosciences in Potsdam. It was initially used for MHD turbulence simulations.[7] The development was continued by a team of about ten code owners and around 90 additional developers who extended the code for their scientific research. It is used by additional users from various branches of science. The code repository was hosted at NORDITA until 2008 and was then moved to Google Developers. In April 2015 the code was migrated to GitHub. Since June 2018 the Pencil Code supports the HDF5 data format.[8]

References

  1. "pencil-code/pencil-code". 4 May 2022. https://github.com/pencil-code/pencil-code/blob/acdca912dd063103ceb644b82d67550ceba17f53/license/GNU_public_license.txt. 
  2. Johansen, A.; Oishi, Jeffrey S.; Mac Low, M.-M.; Klahr, H.; Henning, Th.; Youdin, A. (2007). "Rapid planetesimal formation in turbulent circumstellar disks". Nature 448 (7157): 1022–1025. doi:10.1038/nature06086. PMID 17728751. Bibcode2007Natur.448.1022J. 
  3. Käpylä, P. J.; Mantere, M. J.; Brandenburg, A. (2012). "Cyclic magnetic activity due to turbulent convection in spherical wedge geometry". Astrophys. J. 755 (1): L22. doi:10.1088/2041-8205/755/1/L22. Bibcode2012ApJ...755L..22K. 
  4. Heinemann T.; Dobler W.; Nordlund Å.; Brandenburg A. (2006). "Radiative transfer in decomposed domains". Astronomy & Astrophysics 448 (2): 731–737. doi:10.1051/0004-6361:20053120. Bibcode2006A&A...448..731H. 
  5. Bourdin Ph.-A.; Bingert S.; Peter H. (2013). "Observationally driven 3D magnetohydrodynamics model of the solar corona above an active region". Astronomy & Astrophysics 555: A123. doi:10.1051/0004-6361/201321185. Bibcode2013A&A...555A.123B. 
  6. Lyra. W.; Kuchner, M. J. (2013). "Formation of sharp eccentric rings in debris disks with gas but without planets". Nature 499 (7457): 184–187. doi:10.1038/nature12281. PMID 23846656. Bibcode2013Natur.499..184L. 
  7. Brandenburg A.; Dobler W. (2002). "Hydromagnetic turbulence in computer simulations". Comput. Phys. Commun. 147 (1–2): 471–475. doi:10.1016/S0010-4655(02)00334-X. Bibcode2002CoPhC.147..471B. 
  8. Bourdin Ph.-A. (2020). "Driving solar coronal MHD simulations on high-performance computers". Geophys. Astrophys. Fluid Dyn. 114 (1–2): 235–260. doi:10.1080/03091929.2019.1643849. Bibcode2020GApFD.114..235B. 

External links