Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

dmentipl/phantom-setup

Repository files navigation

Phantom setup

⚠️ Warning: phantom-setup is experimental, and currently unmaintained. If you're interested in continuing development please raise an issue.⚠️

phantom-setup: generate initial conditions for Phantom simulations in pure Python!

Build Status Coverage Status Documentation Status PyPI

Install

Install via pip.

pip install phantomsetup

Requirements

Python 3.7+ with h5py, numba, numpy, phantomconfig, scipy, and tomlkit.

Usage

To generate initial conditions for a Phantom simulation via a Python script with phantom-setup:

  1. Instantiate a phantomsetup.Setup object.
  2. Add particles, set arrays, units, equation of state, sinks, dust, and other parameters.
  3. Write a Phantom HDF5 dump file containing the particle arrays.
  4. Write a Phantom in file containing the run time parameters.
  5. Compile Phantom with the correct Makefile variables.

Then run Phantom.

Examples

The examples folder contains examples in the form of Jupyter notebooks.

See also

phantom-build

phantom-build is a Python package designed to make it easy to generate reproducible Phantom builds for writing reproducible papers. You can generate .in and .setup files with phantom-config and then, with phantom-build, you can compile Phantom and set up multiple runs, and schedule them via, for example, the Slurm job scheduler.

phantom-config

phantom-config is a Python package designed to parse, convert, modify, and generate Phantom config files. It also facilitates generating multiple files from dictionaries for parameter sweeps.

About

phantom-setup: generate initial conditions for Phantom simulations

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages