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.
The Pencil Code or equivalent codes have been used for many different applications in a (more or less) astrophysical context. Examples are
|Turbulence simulations||Outflows from accretion discs||Dynamo experiments|
The code is available under Google Code http://pencil-code.googlecode.com/.
The manual for the Pencil Code is available in PDF (2.3M) or as gzipped PostScript (1.1M). Axel Brandenburg gave a general presentation on the Pencil code in Oslo (2003). The Pencil Code: multi-purpose and multi-user maintained. (html, PowerPoint). Illa Rivero Losada has written a quick-guide for beginners, and Wlad Lyra has written a tutorial for setting up global accretion disk simulations. This tutorial is useful for general information.
See test results from sample applications. For information how to do benchmark tests and timings, see the benchmark page. The code has been used for teaching on a number of occasions. Some online material with exercises is available through the Numerical Experiments page.
For code problems, here an automatically generated excerpt from the manual with FAQs. Some helpful information are available on the Google Code wiki.
Wolfgang Dobler gave a talk on the current config scheme. For additional documentation see the old Nordita wiki. See also the ohloh.net pages for some automatically generated statistics about the Pencil Code project.
We recommend getting the code with svn. If you just want to check out the latest version of the code use:
svn checkout http://pencil-code.googlecode.com/svn/trunk/ pencil-code
If you have a Pencil-Code username NAME at google-code than use:
svn checkout https://pencil-code.googlecode.com/svn/trunk/
pencil-code --username NAME
The Pencil Code can also be obtained from a tar ball (click here for a local copy r18525).