Jump to content

Pencil Code

From Wikipedia, the free encyclopedia

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

[edit]

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

[edit]

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

[edit]

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

[edit]
  1. ^ "pencil-code/pencil-code". GitHub.com. 4 May 2022. Retrieved 26 May 2022.
  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. arXiv:0708.3890. Bibcode:2007Natur.448.1022J. doi:10.1038/nature06086. PMID 17728751. S2CID 4417583.
  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. arXiv:1205.4719. Bibcode:2012ApJ...755L..22K. doi:10.1088/2041-8205/755/1/L22. S2CID 8254781.
  4. ^ Heinemann T.; Dobler W.; Nordlund Å.; Brandenburg A. (2006). "Radiative transfer in decomposed domains". Astronomy & Astrophysics. 448 (2): 731–737. arXiv:astro-ph/0503510. Bibcode:2006A&A...448..731H. doi:10.1051/0004-6361:20053120. S2CID 13930792.
  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. arXiv:1305.5693. Bibcode:2013A&A...555A.123B. doi:10.1051/0004-6361/201321185. S2CID 56246517.
  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. arXiv:1307.5916. Bibcode:2013Natur.499..184L. doi:10.1038/nature12281. PMID 23846656. S2CID 659529.
  7. ^ Brandenburg A.; Dobler W. (2002). "Hydromagnetic turbulence in computer simulations". Comput. Phys. Commun. 147 (1–2): 471–475. arXiv:astro-ph/0111569. Bibcode:2002CoPhC.147..471B. doi:10.1016/S0010-4655(02)00334-X. S2CID 14808329.
  8. ^ Bourdin Ph.-A. (2020). "Driving solar coronal MHD simulations on high-performance computers". Geophys. Astrophys. Fluid Dyn. 114 (1–2): 235–260. arXiv:1908.08557. Bibcode:2020GApFD.114..235B. doi:10.1080/03091929.2019.1643849. S2CID 201253269.
[edit]