swiftest.Simulation.set_feature#
- Simulation.set_feature(close_encounter_check=None, general_relativity=None, collision_model=None, minimum_fragment_gmass=None, minimum_fragment_mass=None, nfrag_reduction=None, rotation=None, compute_conservation_values=None, extra_force=None, big_discard=None, rhill_present=None, tides=None, interaction_loops=None, encounter_check_loops=None, encounter_save=None, coarray=None, simdir=None, seed=None, **kwargs)[source]#
Turns on or off various features of a simulation.
- Parameters:
close_encounter_check (bool, optional) – Check for close encounters between bodies. If set to True, then the radii of massive bodies must be included in initial conditions.
encounter_save ({“NONE”,”TRAJECTORY”,”CLOSEST”,”BOTH”}, default “NONE”) – Indicate if and how encounter data should be saved. If set to “TRAJECTORY”, the position and velocity vectors of all bodies undergoing close encounter are saved at each intermediate step to the encounter files. If set to “CLOSEST”, the position and velocities at the point of closest approach between pairs of bodies are computed and stored to the encounter files. If set to “BOTH”, then this stores the values that would be computed in “TRAJECTORY” and “CLOSEST”. If set to “NONE” no trajectory information is saved. WARNING - Enabling this feature could lead to very large files.
general_relativity (bool, optional) – Include the post-Newtonian correction in acceleration calculations.
collision_model ({“MERGE”,”BOUNCE”,”FRAGGLE”}, default “MERGE”) – This is used to set the collision/fragmentation model. This argument only applies to Swiftest-SyMBA simulations. It will be ignored otherwise. Parameter input file equivalent is COLLISION_MODEL
minimum_fragment_gmass (float, optional) – If fragmentation is turned on, this sets the mimimum G*mass of a collisional fragment that can be generated if a fragmentation model is enabled. Ignored otherwise. Only set one of minimum_fragment_gmass or minimum_fragment_mass Parameter input file equivalent is None
minimum_fragment_mass (float, optional) – If fragmentation is turned on, this sets the mimimum mass of a collisional fragment that can be generated. if a fragmentation model is enabled. Ignored otherwise Only set one of minimum_fragment_gmass or minimum_fragment_mass Parameter input file equivalent is MIN_GMFRAG
nfrag_reduction (float, optional) – If fragmentation is turned on, this is a reduction factor used to limit the number of fragments generated in a collision. For instance, if the SFD of the collision would generated 300 fragments above the minimum_fragment_mass, then a value of nfrag_reduction = 30.0 would reduce it to 10. Currently only used by the Fraggle collision model.
rotation (bool, optional) – If set to True, this turns on rotation tracking and radius, rotation vector, and moments of inertia values must be included in the initial conditions. This argument only applies to Swiftest-SyMBA simulations. It will be ignored otherwise.
compute_conservation_values (bool, optional) – Turns on the computation of energy, angular momentum, and mass conservation and reports the values every output step of a running simulation.
extra_force (bool, optional) – Turns on user-defined force function.
big_discard (bool, optional) – Includes big bodies when performing a discard (Swifter only)
rhill_present (bool, optional) – Include the Hill’s radius with the input files.
interaction_loops ({“TRIANGULAR”,”FLAT”}, default “TRIANGULAR”) – Swiftest Experimental feature Specifies which algorithm to use for the computation of body-body gravitational forces.
“TRIANGULAR” : Upper-triangular double-loops .
“FLAT” : Body-body interation pairs are flattened into a 1-D array.
encounter_check_loops ({“TRIANGULAR”,”SORTSWEEP”}, default “TRIANGULAR”) – Swiftest Experimental feature Specifies which algorithm to use for checking whether bodies are in a close encounter state or not.
“TRIANGULAR” : Upper-triangular double-loops.
“SORTSWEEP” : A Sort-Sweep algorithm is used to reduce the population of potential close encounter bodies. This algorithm is still in development, and does not necessarily speed up the encounter checking. Use with caution.
coarray (bool, default False) – If true, will employ Coarrays on test particle structures to run in single program/multiple data parallel mode. In order to use this capability, Swiftest must be compiled for Coarray support. Only certain integrators can use Coarrays: RMVS, WHM, Helio are all compatible, but SyMBA is not, due to the way tp-pl close encounters are handeled.
tides (bool, optional) – Turns on tidal model (IN DEVELOPMENT - IGNORED)
Yarkovsky (bool, optional) – Turns on Yarkovsky model (IN DEVELOPMENT - IGNORED)
YORP (bool, optional) – Turns on YORP model (IN DEVELOPMENT - IGNORED)
simdir (PathLike, optional) – Directory where simulation data will be stored, including the parameter file, initial conditions file, output file, dump files, and log files.
seed (ArrayLike of int, optional) – Seed for the random number generator. If not set, then a random seed is generated. Parameter input file equivalent is SEED
**kwargs (Any) – A dictionary of additional keyword argument. This allows this method to be called by the more general set_parameter method, which takes all possible Simulation parameters as arguments, so these are ignored.
- Returns:
feature_dict (dict) – A dictionary containing the requested features.