Phantom setup
phantom-setup: generate initial conditions for Phantom simulations
Install
Install via conda.
conda install phantomsetup --channel dmentipl
Install via pip.
pip install phantomsetup
Usage
To generate initial conditions for a Phantom simulation via a Python script with phantom-setup:
- Instantiate a
phantomsetup.Setup
object. - Add particles, set arrays, units, equation of state, sinks, dust, and other parameters.
- Write a Phantom HDF5 dump file containing the particle arrays.
- Write a Phantom in file containing the run time parameters.
- Compile Phantom with the correct Makefile variables.
Then run Phantom.
Examples
The examples
folder contains examples that you can run as a Python script or Jupyter notebook.