PyCOOL – a Cosmological Object-Oriented Lattice code written in Python

Jani Sainio
Turku School of Economics, University of Turku, FIN-20014 Turku, Finland
arXiv:1201.5029v1 [astro-ph.IM] (24 Jan 2012)


   author={Sainio}, Jani},

   title={"{PyCOOL – a Cosmological Object-Oriented Lattice code written in Python}"},

   journal={ArXiv e-prints},




   keywords={Instrumentation and Methods for Astrophysics, Cosmology and Extragalactic Astrophysics, High Energy Physics – Phenomenology, Computational Physics},




Download Download (PDF)   View View   Source Source   Source codes Source codes




There are a number of different phenomena in the early universe that have to be studied numerically with lattice simulations. This paper presents a graphics processing unit (GPU) accelerated Python program called PyCOOL that solves the evolution of scalar fields in a lattice with very precise symplectic integrators. The program has been written with the intention to hit a sweet spot of speed, accuracy and user friendliness. This has been achieved by using the Python language with the PyCUDA interface to make a program that is easy to adapt to different scalar field models. In this paper we derive the symplectic dynamics that govern the evolution of the system and then present the implementation of the program in Python and PyCUDA. The functionality of the program is tested in a chaotic inflation preheating model, a single field oscillon case and in a supersymmetric curvaton model which leads to Q-ball production. We have also compared the performance of a consumer graphics card to a professional Tesla compute card in these simulations. We find that the program is not only accurate but also very fast. To further increase the usefulness of the program we have equipped it with numerous post-processing functions that provide useful information about the cosmological model. These include various spectra and statistics of the fields. The program can be additionally used to calculate the generated curvature perturbation. The program is publicly available under GNU General Public License at https://github.com/jtksai/PyCOOL. Some additional information can be found from http://www.physics.utu.fi/tiedostot/theory/particlecosmology/pycool/.
No votes yet.
Please wait...

* * *

* * *

HGPU group © 2010-2017 hgpu.org

All rights belong to the respective authors

Contact us: