Swiftest is a software packaged designed to model the long-term dynamical dynamics of n-body systems with a dominant central body, like the solar system.
This is a major update with a number of important improvements, bug fixes, and new features.
New Features
The collision module has been updated to include a new model for small impacts based on Hyodo and Genda (2020). The new model is activated when the ratio of the projectile to the target body is less than 1/500. GH53
The core compiled library now stores angular quantities in degrees, just as the Python API does. This will help to prevent floating point errors from accumulating when passing values back and forth between the Python and Fortran code. GH53
Added a deep cleaning option that removes the simdir directory completely, which can be called with the swiftest.Simulation.clean method by passing deep=True as an argument.
Added a new argument to swiftest.Simulation called clean that, when set to True, will perform a deep cleaning of the simdir directory before starting a new run. This is useful for ensuring that the simdir is completely clean before starting a new run.
Bug Fixes
Fixed several issues related to repeatability with restarted runs. A new suite of tests was added to ensure that restarted runs create output that is bit-identical with the original run. GH53
Changed the defaults and behaviors of read_data and read_init_cond to prevent an issue where bodies get added multiple times when running scripts from the same simdir without doing a deep clean in between.
Fixed problems where parameters like unit conversion factors were not being set properly when reading in a parameter file. Parameter input files are now processed the same way as arguments passed to the swiftest.Simulation.set_parameter method. GH53
Fixed issue where the inner radius limit was not being set based on the central body radius.
Fixed issues getting initial conditions files built correctly when using an old data file as a source.
Fixed problem where the energy and momentum values were computed after the dump step, causing the values to be out of sync.
Breaking Changes
Switched to using np.longdouble for the unit conversion attributes, which includes swiftest.Simulation.MU2KG, swiftest.Simulation.KG2MU, swiftest.Simulation.TU2S, swiftest.Simulation.S2TU, swiftest.Simulation.DU2M, swiftest.Simulation.M2DU, and swiftest.Simulation.GU. This was done to ensure that the precise value is passed back and forth to the compiled core library, otherwise floating point conversion errors can accumulate and cause the simulation to diverge on restarts. Be aware when making use of these values, and their equivalents in swiftest.Simulation.param, that not all external libraries support np.longdouble, and so you may need to cast it as float. GH53
Changed the default display style to progress and renamed the standard display style to classic.
Changed the default collision model to Fraggle instead of Merge.
Internal Changes
Switched to an automated versioning system based on git tags. This will allow us to automatically increment the version number with each new release. GH53
Updated methods for extracting and saving initial conditions from old files, including a major overhaul of the modify_body method that is more robust.
Improved handling of initial conditions retrieval and saving from specific frames.
This is a major update with a number of important improvements, bug fixes, and new features.
New Features
swiftest.Simulation.clean
method by passingdeep=True
as an argument.swiftest.Simulation
calledclean
that, when set toTrue
, will perform a deep cleaning of the simdir directory before starting a new run. This is useful for ensuring that the simdir is completely clean before starting a new run.Bug Fixes
swiftest.Simulation.set_parameter
method. GH53Breaking Changes
np.longdouble
for the unit conversion attributes, which includesswiftest.Simulation.MU2KG
,swiftest.Simulation.KG2MU
,swiftest.Simulation.TU2S
,swiftest.Simulation.S2TU
,swiftest.Simulation.DU2M
,swiftest.Simulation.M2DU
, andswiftest.Simulation.GU
. This was done to ensure that the precise value is passed back and forth to the compiled core library, otherwise floating point conversion errors can accumulate and cause the simulation to diverge on restarts. Be aware when making use of these values, and their equivalents inswiftest.Simulation.param
, that not all external libraries supportnp.longdouble
, and so you may need to cast it asfloat
. GH53progress
and renamed thestandard
display style toclassic
.Fraggle
instead ofMerge
.Internal Changes