PHANTOM: A smoothed particle hydrodynamics and magnetohydrodynamics code for astrophysics
Phantom is a fast, parallel, modular and low-memory smoothed particle hydrodynamics and magnetohydrodynamics code developed over the last decade for astrophysical applications in three dimensions. The code has been developed with a focus on stellar, galactic, planetary and high energy astrophysics and has already been used widely for studies of accretion discs and turbulence, from the birth of planets to how black holes accrete.
2nd European Phantom users workshop — IPAG, Grenoble, France, 2nd-6th June 2025
1st North American Phantom users workshop — Memorial University, Newfoundland, Canada, 8th-12th Jul 2024
5th Franco-Australian Phantom+MCFOST users workshop 2024 — Monash University, Melbourne, Australia, 12th-16th Feb 2024
4th Phantom users workshop 2023 — Monash University, Melbourne, Australia, 13th-17th Feb 2023
3rd Phantom+MCFOST users workshop — Monash University, Melbourne, Australia, 24th-28th Feb 2020
1st Phantom European users workshop — University of Milan, Italy, 18th-20th June 2018
1st Phantom users workshop — Monash University, Melbourne, Australia, 19th-23rd Feb 2018
In 2023 we implemented a new prize talk to recognise and encourage contributions from early career researchers
The 3rd prize talk will be given by Claudia Toci from ESO at the workshop in Grenoble, France
The 2nd prize talk was given by Anna Childs from Northwestern University at the workshop in Newfoundland, Canada
The 1st prize talk was given by Rebecca Nealon from Warwick University, at the 5th users workshop in Melbourne.
Phantom is free to use, download and redistribute under the terms of the GPLv3 license. We also welcome contributions to the code via the GitHub repo. Just get in touch!
Phantom is built in small, re-usable modules, making it easy to add new physics to the code.
All modules are written in modern Fortran and we enforce strict adherence to the very latest Fortran standards.
We strive for a low memory, high performance code with as few options as possible. It should "just work". Phantom is not a code for testing algorithms, it is a "take the best and make it run fast" production code for astrophysical simulations.
Phantom contains a comprehensive testsuite that runs on every pull request before it is merged to master. We strive to continually increase the scope of the tests to cover every aspect of the code.
We aim to never repeat code.
Phantom is free and open source, and may be obtained from the git repo. All we ask is that you cite the Phantom paper and other relevant methods papers in scientific publications and keep the name "Phantom" in derivative works so as not to misrepresent the code as your own. We also welcome and encourage contributions to the main code rather than ending up with many divergent copies.
The recommended way to download the latest stable code is to clone the main branch:
git clone https://github.com/danieljprice/phantom
Stable code releases are also available at https://github.com/danieljprice/phantom/releases/
Although the tagged versions are listed as 'Stable', the main branch on the git repo should always be stable since pull requests are only accepted into the main branch once they have passed an extensive testsuite and been proven to not break the code.
Documentation is maintained at phantomsph.readthedocs.org
The easiest way to keep up with Phantom developments, get in touch with the developers or get help on newbie issues is to join the phantom slack channel. This channel is run on a volunteer basis, and relies on users helping each other. If your email is not already allowed to join by default, we will issue an invite as soon as you subscribe to one of the mailing lists:
Phantom-announce is a low traffic read-only list for release announcements:
Subscribe to Phantom announcements |
Visit this group |
Phantom-users is the user forum (you can also email directly, but in general responses will be cc'd to the users list for posterity):
Subscribe to Phantom users list |
Visit this group |
We welcome and encourage contributions to Phantom development. Here are some ways you can get involved:
See below for phantom logos to use in your talks (phantomojis thanks to Arnaud Vericel). We can also post stickers!
Phantom council
Phantom developers/contributors