diff --git a/examples/.gitignore b/examples/.gitignore index 151c4c774..226807ea0 100644 --- a/examples/.gitignore +++ b/examples/.gitignore @@ -5,4 +5,5 @@ !helio_gr_test !whm_gr_test !Chambers2013 -!solar_impact \ No newline at end of file +!solar_impact +!Swifter_Swiftest diff --git a/examples/Basic_Simulation/.gitignore b/examples/Basic_Simulation/.gitignore index 0a4af3872..728fe8873 100644 --- a/examples/Basic_Simulation/.gitignore +++ b/examples/Basic_Simulation/.gitignore @@ -2,5 +2,4 @@ !.gitignore !initial_conditions.py !output_reader.py -!run_from_file.py -!read_old_run.py +!README.txt diff --git a/examples/Basic_Simulation/README.txt b/examples/Basic_Simulation/README.txt new file mode 100644 index 000000000..9db2d5f54 --- /dev/null +++ b/examples/Basic_Simulation/README.txt @@ -0,0 +1,23 @@ +Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh +This file is part of Swiftest. +Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License +as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with Swiftest. +If not, see: https://www.gnu.org/licenses. + +README.txt + +Swiftest Example : Basic_Simulation +Author : Carlisle Wishard and David Minton +Date : December 6, 2022 + +Included in the Basic_Simulation example directory are the following files: + + - README.txt : This file + - initial_conditions.py : A Python Script that generates and runs a set of initial conditions. + - output_reader.py : A Python Script that processes out.nc and generates output.eps + +This example is intended to be run with Swiftest SyMBA. For details on how to generate, run, and analyze this example, +see the Swiftest User Manual. \ No newline at end of file diff --git a/examples/Basic_Simulation/initial_conditions.py b/examples/Basic_Simulation/initial_conditions.py index 1b9dd123b..fb32dc46a 100644 --- a/examples/Basic_Simulation/initial_conditions.py +++ b/examples/Basic_Simulation/initial_conditions.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + """ Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh This file is part of Swiftest. @@ -9,7 +11,6 @@ If not, see: https://www.gnu.org/licenses. """ -#!/usr/bin/env python3 """ Generates and runs a set of Swiftest input files from initial conditions with the SyMBA integrator. All simulation outputs are stored in the /simdata subdirectory. @@ -20,12 +21,8 @@ Output ------ -data.nc : A NetCDF file containing the simulation output. -dump_bin1.nc : A NetCDF file containing the necessary inputs to restart a simulation from t!=0. -dump_bin2.nc : A NetCDF file containing the necessary inputs to restart a simulation from t!=0. -dump_param1.in : An ASCII file containing the necessary parameters to restart a simulation. -dump_param2.in : An ASCII file containing the necessary parameters to restart a simulation. -fraggle.log : An ASCII file containing the information of any collisional events that occured. +data.nc : A NetCDF file containing the simulation output. +collisions.log : An ASCII file containing the information of any collisional events that occured. init_cond.nc : A NetCDF file containing the initial conditions for the simulation. param.in : An ASCII file containing the parameters for the simulation. swiftest.log : An ASCII file containing the information on the status of the simulation as it runs. diff --git a/examples/Basic_Simulation/output_reader.py b/examples/Basic_Simulation/output_reader.py index 278ed3abd..851384bf3 100644 --- a/examples/Basic_Simulation/output_reader.py +++ b/examples/Basic_Simulation/output_reader.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + """ Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh This file is part of Swiftest. @@ -9,7 +11,6 @@ If not, see: https://www.gnu.org/licenses. """ -#!/usr/bin/env python3 """ Reads and processes a Swiftest output file. diff --git a/examples/Chambers2013/.gitignore b/examples/Chambers2013/.gitignore index 48025297e..64af50e94 100644 --- a/examples/Chambers2013/.gitignore +++ b/examples/Chambers2013/.gitignore @@ -1,4 +1,5 @@ * !.gitignore !init_cond.py -!scattermovie.py \ No newline at end of file +!scattermovie.py +!README.txt diff --git a/examples/Chambers2013/README.txt b/examples/Chambers2013/README.txt new file mode 100644 index 000000000..11e18a729 --- /dev/null +++ b/examples/Chambers2013/README.txt @@ -0,0 +1,23 @@ +Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh +This file is part of Swiftest. +Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License +as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with Swiftest. +If not, see: https://www.gnu.org/licenses. + +README.txt + +Swiftest Example : Chambers2013 +Author : David Minton and Carlisle Wishard +Date : December 6, 2022 + +Included in the Chambers2013 example directory are the following files: + + - README.txt : This file + - init_cond.py : A Python Script that generates and runs a set of initial conditions. + - scattermovie.py : A Python Script that processes data.nc and generates Chambers2013-aescatter.mp4 or Chambers2013-aiscatter.mp4 + +This example is intended to be run with Swiftest SyMBA. For details on how to generate, run, and analyze this example, +see the Swiftest User Manual. \ No newline at end of file diff --git a/examples/Chambers2013/init_cond.py b/examples/Chambers2013/init_cond.py index 91a301886..fdb01bcc8 100755 --- a/examples/Chambers2013/init_cond.py +++ b/examples/Chambers2013/init_cond.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + """ Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh This file is part of Swiftest. @@ -9,7 +11,20 @@ If not, see: https://www.gnu.org/licenses. """ -#!/usr/bin/env python3 +""" +Generates a set of Swiftest input files from initial conditions with the SyMBA integrator. All simulation +outputs are stored in the /simdata subdirectory. + +Input +------ +None. + +Output +------ +init_cond.nc : A NetCDF file containing the initial conditions for the simulation. +param.in : An ASCII file containing the parameters for the simulation. +""" + import swiftest import numpy as np from numpy.random import default_rng diff --git a/examples/Chambers2013/scattermovie.py b/examples/Chambers2013/scattermovie.py index c9bcfded1..5df9cf4ce 100755 --- a/examples/Chambers2013/scattermovie.py +++ b/examples/Chambers2013/scattermovie.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + """ Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh This file is part of Swiftest. @@ -9,7 +11,22 @@ If not, see: https://www.gnu.org/licenses. """ -#!/usr/bin/env python3 +""" +Creates a movie from a set of Swiftest output files. All simulation +outputs are stored in the /simdata subdirectory. + +Input +------ +param.in : ASCII Swiftest parameter input file. +data.nc : A NetCDF file containing the simulation output. + +Output +------ +Chambers2013-aescatter.mp4 : A .mp4 file plotting eccentricity vs semimajor axis. +OR +Chambers2013-aiscatter.mp4 : A .mp4 file plotting inclination vs semimajor axis. +""" + import swiftest import numpy as np import matplotlib.pyplot as plt diff --git a/examples/Fragmentation/.gitignore b/examples/Fragmentation/.gitignore index 2105da1cb..429a2e91a 100644 --- a/examples/Fragmentation/.gitignore +++ b/examples/Fragmentation/.gitignore @@ -2,3 +2,5 @@ !.gitignore !Fragmentation_Movie.py !Multibody_Movie.py +!swiftest_fragmentation.py +!README.txt diff --git a/examples/Fragmentation/Fragmentation_Movie.py b/examples/Fragmentation/Fragmentation_Movie.py index fd8976bbc..cf99bf67d 100755 --- a/examples/Fragmentation/Fragmentation_Movie.py +++ b/examples/Fragmentation/Fragmentation_Movie.py @@ -15,15 +15,12 @@ Inputs _______ -param.in : ASCII text file - Swiftest parameter input file. -out.nc : NetCDF file - Swiftest output file. +param.in : ASCII Swiftest parameter input file. +data.nc : A NetCDF file containing the simulation output. Returns ------- -fragmentation.mp4 : mp4 movie file - Movie of a fragmentation event. +fragmentation.mp4 : A .mp4 file of a fragmentation event. """ import swiftest diff --git a/examples/Fragmentation/Multibody_Movie.py b/examples/Fragmentation/Multibody_Movie.py index 7127c980c..60ca365fe 100755 --- a/examples/Fragmentation/Multibody_Movie.py +++ b/examples/Fragmentation/Multibody_Movie.py @@ -15,15 +15,12 @@ Inputs _______ -param.in : ASCII text file - Swiftest parameter input file. -out.nc : NetCDF file - Swiftest output file. +param.in : ASCII Swiftest parameter input file. +data.nc : A NetCDF file containing the simulation output. Returns ------- -fragmentation.mp4 : mp4 movie file - Movie of a fragmentation event. +fragmentation.mp4 : A .mp4 file of a fragmentation event. """ import swiftest diff --git a/examples/Fragmentation/README.txt b/examples/Fragmentation/README.txt new file mode 100644 index 000000000..59ccaf7c1 --- /dev/null +++ b/examples/Fragmentation/README.txt @@ -0,0 +1,23 @@ +Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh +This file is part of Swiftest. +Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License +as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with Swiftest. +If not, see: https://www.gnu.org/licenses. + +README.txt + +Swiftest Example : Fragmentation +Author : David Minton and Carlisle Wishard +Date : December 6, 2022 + +Included in the Fragmentation example directory are the following files: + + - README.txt : This file + - swiftest_fragmentation.py : A Python Script that generates and runs three sets of initial conditions. + - Fragmentation_Movie.py : A Python Script that processes an out.nc file and generates a movie (.mp4) of a collisional event. + - Multibody_Movie.py : A Python Script that processes an out.nc file and generates a movie (.mp4) of a multi-body collisional event. + +This example is intendedto be run with Swiftest SyMBA. For details on how to generate, run, and analyze this example, see the Swiftest User Manual. \ No newline at end of file diff --git a/examples/Fragmentation/swiftest_fragmentation.py b/examples/Fragmentation/swiftest_fragmentation.py index f48ccfc86..4c2368111 100644 --- a/examples/Fragmentation/swiftest_fragmentation.py +++ b/examples/Fragmentation/swiftest_fragmentation.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + """ Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh This file is part of Swiftest. @@ -8,7 +10,7 @@ You should have received a copy of the GNU General Public License along with Swiftest. If not, see: https://www.gnu.org/licenses. """ -#!/usr/bin/env python3 + """ Generates and runs a set of Swiftest input files from initial conditions with the SyMBA integrator. All simulation outputs for the disruption case are stored in the /disruption subdirectory. All simulation outputs for the hit and run @@ -31,11 +33,7 @@ init_cond.nc : A NetCDF file containing the initial conditions for the simulation. collision_000001.nc : A NetCDF file containing the data for the collisions. encounter_000001.nc : A NetCDF file containing the data for the close encounters. -dump_bin1.nc : A NetCDF file containing the necessary inputs to restart a simulation from t!=0. -dump_bin2.nc : A NetCDF file containing the necessary inputs to restart a simulation from t!=0. -dump_param1.in : An ASCII file containing the necessary parameters to restart a simulation. -dump_param2.in : An ASCII file containing the necessary parameters to restart a simulation. -fraggle.log : An ASCII file containing the information of any collisional events that occured. +collisions.log : An ASCII file containing the information of any collisional events that occured. param.in : An ASCII file containing the parameters for the simulation. swiftest.log : An ASCII file containing the information on the status of the simulation as it runs. diff --git a/examples/Swifter_Swiftest/.gitignore b/examples/Swifter_Swiftest/.gitignore new file mode 100644 index 000000000..4fef97ba1 --- /dev/null +++ b/examples/Swifter_Swiftest/.gitignore @@ -0,0 +1,4 @@ +* +!.gitignore +!8pl_0tp +!108_pl_50tp diff --git a/examples/Swifter_Swiftest/8pl_0tp/.gitignore b/examples/Swifter_Swiftest/8pl_0tp/.gitignore new file mode 100644 index 000000000..002769017 --- /dev/null +++ b/examples/Swifter_Swiftest/8pl_0tp/.gitignore @@ -0,0 +1,12 @@ +* +!.gitignore +!cb.swiftest.in +!init_cond.py +!param.swifter.in +!param.swiftest.in +!pl.swifter.in +!pl.swiftest.in +!README.txt +!tp.swifter.in +!tp.swiftest.in +!swiftest_symba_vs_swifter_symba.ipynb diff --git a/examples/Swifter_Swiftest/8pl_0tp/README.txt b/examples/Swifter_Swiftest/8pl_0tp/README.txt new file mode 100644 index 000000000..0433e822b --- /dev/null +++ b/examples/Swifter_Swiftest/8pl_0tp/README.txt @@ -0,0 +1,29 @@ +Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh +This file is part of Swiftest. +Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License +as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with Swiftest. +If not, see: https://www.gnu.org/licenses. + +README.txt + +Swiftest Example : Swifter_Swiftest/8pl_0tp +Author : David Minton and Carlisle Wishard +Date : August 15, 2022 + +Included in the symba_swifter_comparison/8pl example directory are the following files: + + - README.txt : This file + - param.swiftest.in : The Swiftest parameter input file + - param.swifter.in : The Swifter parameter input file + - cb.swiftest.in : The Swiftest central body input file + - pl.swifter.in : The Swifter massive body input file + - pl.swiftest.in : The Swiftest massive body input file + - tp.swifter.in : The Swifter test particle input file + - tp.swiftest.in : The Swiftest test particle input file + - init_cond.py : A Python Script that generates two sets of initial conditions: one Swifter and one Swiftest + - swiftest_symba_vs_swifter_symba.ipynb : A Jupyter Notebook for processing and analysing Swifter and Swiftest data + +This example is intended to be run with the SyMBA integrator for both Swifter and Swiftest. For details on how to generate, run, and analyze this example, see the Swiftest User Manual. To obtain a copy of Swifter, please see https://www.boulder.swri.edu/swifter/home.html. \ No newline at end of file diff --git a/examples/symba_swifter_comparison/8pl/cb.swiftest.in b/examples/Swifter_Swiftest/8pl_0tp/cb.swiftest.in similarity index 100% rename from examples/symba_swifter_comparison/8pl/cb.swiftest.in rename to examples/Swifter_Swiftest/8pl_0tp/cb.swiftest.in diff --git a/examples/symba_swifter_comparison/8pl/init_cond.py b/examples/Swifter_Swiftest/8pl_0tp/init_cond.py similarity index 84% rename from examples/symba_swifter_comparison/8pl/init_cond.py rename to examples/Swifter_Swiftest/8pl_0tp/init_cond.py index b66768453..4a35fbf74 100755 --- a/examples/symba_swifter_comparison/8pl/init_cond.py +++ b/examples/Swifter_Swiftest/8pl_0tp/init_cond.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + """ Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh This file is part of Swiftest. @@ -9,7 +11,26 @@ If not, see: https://www.gnu.org/licenses. """ -#!/usr/bin/env python3 +""" +Generates and runs a set of Swiftest input files and a set of Swifter input files from initial conditions with the +SyMBA integrator. + +Input +------ +None. + +Output +------ +param.swiftest.in : An ASCII file containing the parameters for the Swiftest simulation. +param.swifter.in : An ASCII file containing the parameters for the Swifter simulation. +cb.swiftest.in : An ASCII file containing the central body data for the Swiftest simulation. +pl.swifter.in : An ASCII file containing the massive body data for the Swifter simulation. +pl.swiftest.in : An ASCII file containing the massive body data for the Swiftest simulation. +tp.swifter.in : An ASCII file containing the test particle data for the Swifter simulation. +tp.swiftest.in : An ASCII file containing the test particle data for the Swiftest simulation. + +""" + import numpy as np import swiftest import swiftest.io as swio diff --git a/examples/symba_swifter_comparison/8pl/param.swifter.in b/examples/Swifter_Swiftest/8pl_0tp/param.swifter.in similarity index 100% rename from examples/symba_swifter_comparison/8pl/param.swifter.in rename to examples/Swifter_Swiftest/8pl_0tp/param.swifter.in diff --git a/examples/symba_swifter_comparison/8pl/param.swiftest.in b/examples/Swifter_Swiftest/8pl_0tp/param.swiftest.in similarity index 100% rename from examples/symba_swifter_comparison/8pl/param.swiftest.in rename to examples/Swifter_Swiftest/8pl_0tp/param.swiftest.in diff --git a/examples/symba_swifter_comparison/8pl/pl.swifter.in b/examples/Swifter_Swiftest/8pl_0tp/pl.swifter.in similarity index 100% rename from examples/symba_swifter_comparison/8pl/pl.swifter.in rename to examples/Swifter_Swiftest/8pl_0tp/pl.swifter.in diff --git a/examples/symba_swifter_comparison/8pl/pl.swiftest.in b/examples/Swifter_Swiftest/8pl_0tp/pl.swiftest.in similarity index 100% rename from examples/symba_swifter_comparison/8pl/pl.swiftest.in rename to examples/Swifter_Swiftest/8pl_0tp/pl.swiftest.in diff --git a/examples/symba_swifter_comparison/8pl/swiftest_symba_vs_swifter_symba.ipynb b/examples/Swifter_Swiftest/8pl_0tp/swiftest_symba_vs_swifter_symba.ipynb similarity index 100% rename from examples/symba_swifter_comparison/8pl/swiftest_symba_vs_swifter_symba.ipynb rename to examples/Swifter_Swiftest/8pl_0tp/swiftest_symba_vs_swifter_symba.ipynb diff --git a/examples/symba_swifter_comparison/8pl/tp.swifter.in b/examples/Swifter_Swiftest/8pl_0tp/tp.swifter.in similarity index 100% rename from examples/symba_swifter_comparison/8pl/tp.swifter.in rename to examples/Swifter_Swiftest/8pl_0tp/tp.swifter.in diff --git a/examples/symba_swifter_comparison/8pl/tp.swiftest.in b/examples/Swifter_Swiftest/8pl_0tp/tp.swiftest.in similarity index 100% rename from examples/symba_swifter_comparison/8pl/tp.swiftest.in rename to examples/Swifter_Swiftest/8pl_0tp/tp.swiftest.in diff --git a/examples/Swifter_Swiftest/cb.in b/examples/Swifter_Swiftest/cb.in deleted file mode 100644 index 5e69f346c..000000000 --- a/examples/Swifter_Swiftest/cb.in +++ /dev/null @@ -1,16 +0,0 @@ -!! Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh -!! This file is part of Swiftest. -!! Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License -!! as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -!! Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty -!! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -!! You should have received a copy of the GNU General Public License along with Swiftest. -!! If not, see: https://www.gnu.org/licenses. - -Sun -39.476926408897626 -0.004650467260962157 -4.7535806948127355e-12 --2.2473967953572827e-18 -0.0 0.0 0.07 -11.209306302144773 -38.759372036774764 82.25088158389266 diff --git a/examples/Swifter_Swiftest/param.swifter.in b/examples/Swifter_Swiftest/param.swifter.in deleted file mode 100644 index 11353ab11..000000000 --- a/examples/Swifter_Swiftest/param.swifter.in +++ /dev/null @@ -1,35 +0,0 @@ -!! Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh -!! This file is part of Swiftest. -!! Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License -!! as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -!! Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty -!! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -!! You should have received a copy of the GNU General Public License along with Swiftest. -!! If not, see: https://www.gnu.org/licenses. - -! VERSION Swiftest parameter input -T0 0.0 -TSTOP 1000000.0 -DT 0.005 -PL_IN pl.swifter.in -TP_IN tp.swifter.in -IN_TYPE ASCII -ISTEP_OUT 200000 -ISTEP_DUMP 200000 -BIN_OUT swifter.dat -OUT_TYPE REAL8 -OUT_FORM EL -OUT_STAT UNKNOWN -J2 0.0 -J4 0.0 -CHK_CLOSE YES -CHK_RMIN 0.004650467260962157 -CHK_RMAX 1000.0 -CHK_EJECT 1000.0 -CHK_QMIN 0.004650467260962157 -CHK_QMIN_COORD HELIO -CHK_QMIN_RANGE 0.004650467260962157 1000.0 -ENC_OUT enc.swifter.dat -EXTRA_FORCE NO -BIG_DISCARD NO -RHILL_PRESENT YES diff --git a/examples/Swifter_Swiftest/param.swiftest.in b/examples/Swifter_Swiftest/param.swiftest.in deleted file mode 100644 index 3ed2d35c8..000000000 --- a/examples/Swifter_Swiftest/param.swiftest.in +++ /dev/null @@ -1,52 +0,0 @@ -!! Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh -!! This file is part of Swiftest. -!! Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License -!! as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -!! Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty -!! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -!! You should have received a copy of the GNU General Public License along with Swiftest. -!! If not, see: https://www.gnu.org/licenses. - -! VERSION Swiftest parameter input -T0 0.0 -TSTOP 1000000.0 -DT 0.005 -ISTEP_OUT 200000 -ISTEP_DUMP 200000 -OUT_FORM XVEL -OUT_TYPE NETCDF_DOUBLE -OUT_STAT REPLACE -IN_FORM XV -IN_TYPE ASCII -NC_IN -1.0 -PL_IN pl.swiftest.in -TP_IN tp.swiftest.in -CB_IN cb.in -BIN_OUT swiftest.nc -CHK_QMIN 0.004650467260962157 -CHK_RMIN 0.004650467260962157 -CHK_RMAX 1000.0 -CHK_EJECT 1000.0 -CHK_QMIN_COORD HELIO -CHK_QMIN_RANGE 0.004650467260962157 1000.0 -MU2KG 1.988409870698051e+30 -TU2S 31557600.0 -DU2M 149597870700.0 -EXTRA_FORCE NO -PARTICLE_OUT particle.swiftest.dat -BIG_DISCARD NO -CHK_CLOSE YES -GR NO -INTERACTION_LOOPS ADAPTIVE -ENCOUNTER_CHECK ADAPTIVE -RHILL_PRESENT YES -FRAGMENTATION NO -ROTATION NO -ENERGY YES -ENERGY_OUT energy.swiftest.dat -ENC_OUT enc.swiftest.out -GMTINY 2.1554293571575797e-06 -MIN_GMFRAG 1.43695290477172e-09 -TIDES NO -YORP NO -YARKOVSKY NO diff --git a/examples/Swifter_Swiftest/pl.swifter.in b/examples/Swifter_Swiftest/pl.swifter.in deleted file mode 100644 index b06654c41..000000000 --- a/examples/Swifter_Swiftest/pl.swifter.in +++ /dev/null @@ -1,446 +0,0 @@ -!! Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh -!! This file is part of Swiftest. -!! Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License -!! as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -!! Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty -!! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -!! You should have received a copy of the GNU General Public License along with Swiftest. -!! If not, see: https://www.gnu.org/licenses. - -109 -0 39.476926408897626 -0.0 0.0 0.0 -0.0 0.0 0.0 -1 1.6384274523913285e-06 0.0014751249629612916 -1.6306381826061646e-05 -0.1602701666124578 0.26554770212071965 0.006999193081403697 --10.84661106170086 5.720201228466586 1.4623737942912969 -2 2.4158283498953847e-05 0.006759060937524364 -4.0453784346544176e-05 --0.16650008137930533 -0.7067930093166555 -9.499295149127326e-05 -7.140870020194017 -1.72394448514424 -0.4357116679934973 -3 3.0006733956988116e-05 0.010044837524750683 -4.25875607065041e-05 --0.9367143789680987 -0.3556044661002122 2.2876740785801783e-05 -2.128067480165353 -5.898785758613359 0.00028348143314299893 -4 1.2739802010675942e-05 0.007246331310184216 -2.2657408050928896e-05 -0.5198158486140217 -1.3167894739096266 -0.040347965015894716 -4.946638260590617 2.316135241491425 -0.07279939287974249 -5 0.037692251088985676 0.355228373158286 -0.0004673261703049093 -4.864059555770782 -1.0357133869333606 -0.10452302173487142 -0.5419156143225717 2.828221887677315 -0.023871674148715123 -6 0.011285899820091273 0.4376244336926855 -0.00038925687730393614 -7.315986571488801 -6.665014703455999 -0.1752690626952322 -1.2596948431635877 1.5048611868874542 -0.07628233691456182 -7 0.001723658947826773 0.4702325754736345 -0.00016953449859497232 -14.123340020758134 13.74564230962882 -0.13198131411115843 --1.01204590263881 0.9653603062188307 0.0166498493238681 -8 0.0020336100526728304 0.7817775176581134 -0.00016458790412449367 -29.67273744046178 -3.7767194623987788 -0.6060977334617753 -0.13798511862468082 1.1474090243078912 -0.026768721885164694 -9 2.8739058095434397e-06 0.0025753291105210636 -1.509673399450197e-05 --0.6623401275205323 -0.4107946039012614 0.028121367086739624 -3.8873470171928273 -6.459644361853568 0.13674465046600903 -10 2.8739058095434397e-06 0.006386093766400174 -1.509673399450197e-05 -0.8522206269710216 1.850581991806107 0.12124968189155705 --3.5850526828074334 2.804125303496323 0.26742825744726045 -11 2.8739058095434397e-06 0.004890050033172402 -1.509673399450197e-05 --0.3488012349339563 1.8704749801105247 -0.19936018743857348 --3.935413848700553 -1.5090146885352058 0.36411104486781243 -12 2.8739058095434397e-06 0.0009418167428588213 -1.509673399450197e-05 --0.184362498696566 0.325958775372328 0.0004687977618883022 --8.055662106004204 -4.952655912148878 0.24283131385366846 -13 2.8739058095434397e-06 0.0035547587602849547 -1.509673399450197e-05 --0.0031282215049410326 -1.1032074585772889 0.03753784280684946 -6.261144632798905 -0.03379578251672892 -0.4137650311220476 -14 2.8739058095434397e-06 0.007524159582592722 -1.509673399450197e-05 -1.9266614646815534 0.09194943067254291 0.004488902628553456 --1.2513954113124655 4.9167388704920585 -0.05214113656143003 -15 2.8739058095434397e-06 0.006735697758400329 -1.509673399450197e-05 --1.6927772298871009 -2.032032058143688 -0.08421387302462716 -2.6435959968647165 -2.4099120719631677 0.27164206085578396 -16 2.8739058095434397e-06 0.00485873601291501 -1.509673399450197e-05 -0.8124821077536961 1.496669326153075 0.1668163306716816 --4.521056029672882 1.4564583747465318 -0.23927911835728555 -17 2.8739058095434397e-06 0.001247804883062001 -1.509673399450197e-05 --0.03558213011379509 -0.3748647006656365 0.025145249145075196 -10.36569178554003 -3.13790856793906 -0.5686730523378405 -18 2.8739058095434397e-06 0.0011971270592630728 -1.509673399450197e-05 --0.27593189211884345 -0.3265030367153882 -0.03285168360073783 -7.142593164902537 -6.136522704836048 -0.0808096468237946 -19 2.8739058095434397e-06 0.005291383850149194 -1.509673399450197e-05 --1.4759555222226983 -1.1786691116459336 0.10344758476439345 -2.810837126006068 -3.497976543626811 0.03958677061629555 -20 2.8739058095434397e-06 0.002003433431282119 -1.509673399450197e-05 -0.49435385728184106 -0.46688247347445927 0.09619656472482273 -4.706204347860886 5.9809540740513825 0.020073197867132044 -21 2.8739058095434397e-06 0.0023238784295016414 -1.509673399450197e-05 --0.7942420728982932 0.28505863867348713 -0.02941141780581869 --3.4232165624235065 -5.675838406061309 0.6265483233270612 -22 2.8739058095434397e-06 0.007589828230830779 -1.509673399450197e-05 -2.1148344421907783 -1.8204620987740254 0.08710287773003927 -1.901029128431052 3.099599587004674 0.025466992634785694 -23 2.8739058095434397e-06 0.0023142206327612454 -1.509673399450197e-05 -0.7389004211204933 -0.00858120417580266 -0.06197451957607665 --0.2911361560379896 7.542462259132478 0.33498215546195015 -24 2.8739058095434397e-06 0.00449141512569776 -1.509673399450197e-05 -1.3925350657794073 0.8936214795531287 -0.030723377816567934 --3.2793775069984896 3.388001216571337 0.1732336546443752 -25 2.8739058095434397e-06 0.003954668313229459 -1.509673399450197e-05 -0.22904647530341832 1.2482376842044842 -0.05060182661390145 --5.756101096701513 -0.17788364069187604 0.31542084615930605 -26 2.8739058095434397e-06 0.00251708275545444 -1.509673399450197e-05 --0.5322881741494946 -0.7940450316585025 0.0631037319851381 -5.511667017782102 -2.5217966764630857 0.5183041796671646 -27 2.8739058095434397e-06 0.004236142339967366 -1.509673399450197e-05 --1.5260756584494053 -0.42218610311255983 0.017226210983337327 -0.25660025852739266 -4.775530843252293 -0.09523384599885339 -28 2.8739058095434397e-06 0.0012245741234824647 -1.509673399450197e-05 -0.18090631510038568 -0.4589585180418969 -0.03943372756994477 -6.753856289067679 4.482603964008263 0.7040007757296776 -29 2.8739058095434397e-06 0.006035263611829456 -1.509673399450197e-05 -0.02172079217285594 2.01863892014518 -0.14030504527320117 --4.449784745882277 -0.46132709260154336 0.2557447085927633 -30 2.8739058095434397e-06 0.0035428954154097594 -1.509673399450197e-05 -0.86774483388796 1.1544975529965802 -0.060044892414450345 --3.994333040503594 2.490117643014227 -0.45393935325655754 -31 2.8739058095434397e-06 0.0011189406712929745 -1.509673399450197e-05 --0.31774925075976324 -0.22766143268839967 -0.02874426572742337 -4.839118426744508 -8.702080841877272 0.39473217129417815 -32 2.8739058095434397e-06 0.004029489812431778 -1.509673399450197e-05 -1.2724967423228333 0.4276376023111785 0.05933701597304163 --1.4439100168127392 5.320280226266139 -0.05259363127082716 -33 2.8739058095434397e-06 0.0016073122132047076 -1.509673399450197e-05 --0.23491881380799007 -0.45266106409572704 0.03347809151443653 -8.38833046854151 -3.5922969849421618 -0.3265027891337281 -34 2.8739058095434397e-06 0.00164509764302705 -1.509673399450197e-05 -0.4287479553393034 -0.323054795195034 -0.009042688650659433 -5.337184982051495 7.000725679806189 0.28839126836652024 -35 2.8739058095434397e-06 0.0036688164177383605 -1.509673399450197e-05 --0.3015969009740601 1.034882691215853 -0.16794859807777443 --6.189594564242739 -1.6663271944111515 -0.36407741931566145 -36 2.8739058095434397e-06 0.01034044300676835 -1.509673399450197e-05 --3.172093316806504 4.04766147898167 -0.5420456132137627 --1.7818558093311394 -1.0098814721896556 0.1442054837893238 -37 2.8739058095434397e-06 0.0008687687886486345 -1.509673399450197e-05 --0.22801541876898315 -0.07006629937091026 0.019029359845983224 -7.557159288558864 -11.827855607427248 1.1740904439111643 -38 2.8739058095434397e-06 0.0028445913454466206 -1.509673399450197e-05 --0.5569467664207998 0.6527933897983793 -0.12488780704178155 --5.076306790427439 -4.9324866787519 -0.8800601626711871 -39 2.8739058095434397e-06 0.004167106981756311 -1.509673399450197e-05 -0.11230816641438923 1.635373566073787 0.11375560712071912 --4.434294056326716 0.9435626461542896 0.2636855119189412 -40 2.8739058095434397e-06 0.004683241416423367 -1.509673399450197e-05 --0.8610238680557628 1.7918034637565383 -0.08478892671391328 --3.8591018396456986 -0.5937537194005754 -0.17539517165723983 -41 2.8739058095434397e-06 0.004932645043204141 -1.509673399450197e-05 -0.1693562572652172 1.5915638521402267 0.07123356387215855 --4.965386189303764 1.2026146117724297 0.09354310594577073 -42 2.8739058095434397e-06 0.005998599442394139 -1.509673399450197e-05 -2.6091142775292036 0.6771281265606981 -0.03872232047644138 --0.7556728108232713 3.101075519309312 -0.216232906614372 -43 2.8739058095434397e-06 0.004708138329728238 -1.509673399450197e-05 --0.10518586010665054 1.4932539004676444 0.034819057154311106 --5.321911844757485 -0.10589872590260131 -0.3457614153180886 -44 2.8739058095434397e-06 0.00916016739402083 -1.509673399450197e-05 -2.9289051355621005 -1.3654955994778664 -0.32631103362194247 -1.1501649867216381 3.235513470473641 0.20002218759573143 -45 2.8739058095434397e-06 0.0024924516608046945 -1.509673399450197e-05 --0.238573567303497 -0.7371022938110062 0.055293143196969 -6.736292738787924 -3.2199718397537542 -0.22254744140522048 -46 2.8739058095434397e-06 0.0017079929019560604 -1.509673399450197e-05 -0.5902105682814927 -0.1314692587426859 -0.017655689798263003 -2.956779723295923 7.404454180488588 0.18067850233965713 -47 2.8739058095434397e-06 0.0032153368485520247 -1.509673399450197e-05 -1.037043800399729 -0.03594663647865548 0.03703914356446883 --0.15947429792412557 6.3488237704111965 -0.4010431134134631 -48 2.8739058095434397e-06 0.0019220756982321575 -1.509673399450197e-05 -0.5070230556584312 0.19206307089101599 0.0071453461364928425 --3.3006858068005576 8.674641604378644 0.06049757513891613 -49 2.8739058095434397e-06 0.004487235490354316 -1.509673399450197e-05 -1.6405332013403902 0.021016118372194748 -0.055205438003346465 -0.412667583902561 4.738088993591651 0.07559195005558962 -50 2.8739058095434397e-06 0.006967960700616453 -1.509673399450197e-05 --2.2941538952763647 1.544358040291795 0.21902672997311295 --2.2974363861541605 -2.603745875459688 0.002908475469253997 -51 2.8739058095434397e-06 0.006707396746149989 -1.509673399450197e-05 --2.4885813264577212 -0.417722139413224 0.16925294332443802 -1.4615337815747902 -3.464174819374684 0.2059665062892221 -52 2.8739058095434397e-06 0.0019132605958338785 -1.509673399450197e-05 -0.5307181461914736 0.22066736207589896 0.004871828195043754 --5.839299639857224 6.597209516492565 -0.07159375603550568 -53 2.8739058095434397e-06 0.0012525628401650311 -1.509673399450197e-05 -0.25062549178866 0.3341855631140645 0.00967264208867581 --7.509100046144855 6.428555150976056 0.018206415929842873 -54 2.8739058095434397e-06 0.0017490597599596309 -1.509673399450197e-05 --0.08847100380722234 -0.5605856096312082 0.005589044492604909 -8.339364981602754 -2.045457686194417 -0.1997265153351233 -55 2.8739058095434397e-06 0.005045587221639991 -1.509673399450197e-05 --1.455747635304268 -0.3407240434657265 0.11026106733079433 -0.4200214745449485 -5.46225028125663 -0.037887008419275114 -56 2.8739058095434397e-06 0.010954331500369612 -1.509673399450197e-05 -0.9785887334826182 -3.146944310672609 -0.0083236782087085 -3.608015510201077 0.7109105341908778 0.027924873662944615 -57 2.8739058095434397e-06 0.0047105771703526275 -1.509673399450197e-05 --0.07482445742777744 1.6881010039147615 -0.092795518220082 --4.725414775960127 0.13357727119203466 0.2111483010583421 -58 2.8739058095434397e-06 0.004456969020088517 -1.509673399450197e-05 --1.1980275017381627 -1.029469559179283 -0.19907358046618925 -2.237070033283333 -4.350562138317463 -0.12893592360399972 -59 1.4369529047717199e-06 0.009063929733314402 -1.1982285712078253e-05 --3.4835967399637786 -2.0198047461598723 -0.06253245735073558 -1.7236200292680683 -2.5663983684642164 0.19843379922859808 -60 1.4369529047717199e-06 0.006814568998382013 -1.1982285712078253e-05 -3.328169715021026 0.5220618297879457 0.244602097886744 --0.39267629640640256 3.142112049371514 -0.19002777839665866 -61 1.4369529047717199e-06 0.0014653355477212912 -1.1982285712078253e-05 --0.2460498882181166 0.5915441352620496 -0.00448597748263217 --7.488621725973728 -2.285203795727855 -0.15741554998226712 -62 1.4369529047717199e-06 0.001500320590905441 -1.1982285712078253e-05 --0.580969414208121 -0.37549049422433606 -0.1176663342382454 -4.166790521865679 -5.840391150097335 0.7651371647900774 -63 1.4369529047717199e-06 0.008845700988161334 -1.1982285712078253e-05 -3.890213681842885 0.9327487325164725 -0.17401314683797195 --0.5884667946931457 3.0184362098234048 -0.07212927861537761 -64 1.4369529047717199e-06 0.007076376575024062 -1.1982285712078253e-05 -2.2175428864743014 -2.7457492182231986 0.06746480088224666 -2.4829706340521867 1.832597386457729 0.15359796771599887 -65 1.4369529047717199e-06 0.001825149856647478 -1.1982285712078253e-05 -0.7381067067002793 0.0977638763685249 0.07019422188189116 --0.2970432350074762 7.452323967686693 -0.49677680844718836 -66 1.4369529047717199e-06 0.0017738218666757113 -1.1982285712078253e-05 -0.05595157559645306 -0.5832463709928819 -0.08253806997887246 -8.788492157974252 -2.236253243409472 0.23526552265071254 -67 1.4369529047717199e-06 0.004026814212867061 -1.1982285712078253e-05 --1.072262514995177 1.3008112431015015 -0.14732711336059817 --3.0506085557380382 -3.8415645626143036 -0.25746704998882364 -68 1.4369529047717199e-06 0.0007216531181762911 -1.1982285712078253e-05 -0.013299706791004784 0.34040433884664184 -0.03200185846491806 --10.240893546853702 -0.06268718020024237 0.4089287179697186 -69 1.4369529047717199e-06 0.003726977173790839 -1.1982285712078253e-05 -0.821244296556658 -1.6266012957153122 0.08787600273602682 -3.4437101350702015 2.660646203989688 -0.04170669638916523 -70 1.4369529047717199e-06 0.002786912751456066 -1.1982285712078253e-05 -0.7797346089335155 -0.6904426400251575 -0.1716832998791038 -3.309044922265838 5.593686295677864 -0.10252185168231216 -71 1.4369529047717199e-06 0.005856670124705245 -1.1982285712078253e-05 -1.2249463109805205 -2.32858081787665 -0.26843408512652345 -2.979094991241669 2.3378796595204436 0.1524564551143064 -72 1.4369529047717199e-06 0.002983715845034672 -1.1982285712078253e-05 --1.071513604906581 -1.134524501286559 0.23768504516225447 -3.322711596006444 -2.8974190931702077 -0.4230300378427455 -73 1.4369529047717199e-06 0.0015405289849267612 -1.1982285712078253e-05 -0.6222449979939311 -0.17042158991817652 0.04406840354243642 -0.723315473109811 7.898874818049032 -0.5425742138263642 -74 1.4369529047717199e-06 0.0008409876069772385 -1.1982285712078253e-05 --0.2942180768126447 0.2589306600669347 -0.01726581198524641 --6.4868639993503185 -7.158927327730385 -0.24306370864261126 -75 1.4369529047717199e-06 0.002886021799050532 -1.1982285712078253e-05 -0.2891014988049755 -1.1277436731051895 0.05898754360239672 -5.941091054100061 0.9743174837899904 -0.23010797367412136 -76 1.4369529047717199e-06 0.003459505078487661 -1.1982285712078253e-05 -0.08886790235524111 -1.7199488656811155 -0.07247353904100214 -4.378056887548356 0.6268492053862617 0.146250474581925 -77 1.4369529047717199e-06 0.004464380088311966 -1.1982285712078253e-05 --0.7263225079970725 1.3973462546687365 0.04812249771790175 --4.553552306479177 -3.0090066241099422 0.053885811221648226 -78 1.4369529047717199e-06 0.0020947051517956794 -1.1982285712078253e-05 -0.908565054512616 -0.4595585609703524 0.03112283256563214 -1.7169460186924992 5.573755089787307 0.4331747583796787 -79 1.4369529047717199e-06 0.003837572859409301 -1.1982285712078253e-05 --1.382556679747199 -0.39161806399026866 -0.11172482003651635 -0.7222388119773917 -5.526378032800891 0.2819423603946751 - -80 1.4369529047717199e-06 0.0036068142418294916 -1.1982285712078253e-05 -1.37112722284144 -0.46209524201763624 -0.06435683201713395 -1.9095110736357366 5.070945864616038 0.05006608200716384 -81 1.4369529047717199e-06 0.009156607867592441 -1.1982285712078253e-05 --4.1603749701672745 -0.35496341007716015 -0.1967751790935142 -0.5892154917494472 -2.9040415982749463 0.44772518870840283 -82 1.4369529047717199e-06 0.0038585207868490406 -1.1982285712078253e-05 --0.08256926449446002 -1.6109511412407516 0.048889757927731654 -4.891058002708651 -1.219692051619414 -0.0641741463253937 -83 1.4369529047717199e-06 0.007295295605949574 -1.1982285712078253e-05 -1.399730932121055 -3.99319492036196 -0.21457067664535642 -2.4126720186782618 0.6129637222210155 -0.06231154463373347 -84 1.4369529047717199e-06 0.0021539271201263944 -1.1982285712078253e-05 --0.3331567897706851 0.9180317964547977 -0.037465116422244 --5.8232503354831495 -2.1627179446986826 -0.28684956773881154 -85 1.4369529047717199e-06 0.0011291028621390601 -1.1982285712078253e-05 -0.5320146747915385 0.047264006343156445 -0.05185729307508005 --0.5877547860152262 8.149405786459024 -0.17985461065925276 -86 1.4369529047717199e-06 0.008349398774320359 -1.1982285712078253e-05 -1.408702716556625 -2.9813361772368348 -0.10367401227711198 -3.1644742728204305 1.7405413342306382 0.15652595378416992 -87 1.4369529047717199e-06 0.0038406305257668487 -1.1982285712078253e-05 -1.761903319253396 0.45102257576900545 0.09184229138114439 --1.3576767789650688 4.213632865150057 -0.3733157922519408 -88 1.4369529047717199e-06 0.0016875757703591246 -1.1982285712078253e-05 -0.38620474800989607 0.40189516861123004 -0.036885123484424465 --6.7633132363329285 6.45162477844062 0.4722443113676685 -89 1.4369529047717199e-06 0.0048038139944044335 -1.1982285712078253e-05 --1.6805793066350616 -0.9293325258574284 0.13104019213583057 -2.0950975948125947 -4.211632026873709 0.08161617887614422 -90 1.4369529047717199e-06 0.0022452238439493242 -1.1982285712078253e-05 --0.37676934247471355 -1.16264134721415 0.042738378033923614 -3.8603520823957385 -3.0425369081962277 -0.011296987728486368 -91 1.4369529047717199e-06 0.0022953941818583136 -1.1982285712078253e-05 --0.8431116114860677 -0.24445036957959682 0.016841561340431764 -0.8537748465883584 -7.032919341487657 0.46329516155551853 -92 1.4369529047717199e-06 0.0016523904161132544 -1.1982285712078253e-05 --0.27240226842230997 -0.5745953677506589 0.001514560594100765 -6.8270782173598255 -4.749867614018482 -0.3051444603382248 -93 1.4369529047717199e-06 0.0030500467222302507 -1.1982285712078253e-05 --1.4044776325673578 -0.07564893420990226 -0.008190496722349902 -1.50744096504877 -4.909806290938663 -0.11584708149013598 -94 1.4369529047717199e-06 0.007814353784309119 -1.1982285712078253e-05 -1.8562621530449532 2.58201909289353 0.11431409648026315 --3.325627530540372 1.461256904251917 -0.09216346534641737 -95 1.4369529047717199e-06 0.001073778156402966 -1.1982285712078253e-05 -0.1764090373691835 0.3654111264370534 0.0007051535861495877 --10.024024877135222 3.1002313498834027 0.08461763258504626 -96 1.4369529047717199e-06 0.0036804108004268137 -1.1982285712078253e-05 -0.7440887755521456 1.2272692343592138 -0.04370530382371359 --4.020335672056772 3.764670793642172 -0.05303180949643653 -97 1.4369529047717199e-06 0.0035006955295143064 -1.1982285712078253e-05 --1.5523597919935552 -0.19160112439546667 0.000447278066132234 -1.0648531356431454 -4.831029013079775 0.30317180315022707 -98 1.4369529047717199e-06 0.008596473624314987 -1.1982285712078253e-05 --2.551460211224862 -1.8028012832616727 -0.011085402766100854 -2.1956184579074627 -3.145608367581683 0.06604958008184625 -99 1.4369529047717199e-06 0.0012546704631549764 -1.1982285712078253e-05 -0.4168947519965348 -0.24730546837801765 0.013646913167151605 -4.072409731225815 8.594814613969156 -0.25040988361747313 -100 1.4369529047717199e-06 0.0009934230176118935 -1.1982285712078253e-05 --0.26878018379524166 0.23368071851328648 0.01168303352747965 --7.938667819724678 -8.175604120348051 -0.620994983801747 -101 1.4369529047717199e-06 0.001404464554781543 -1.1982285712078253e-05 --0.06790080105406238 -0.5747050368614427 -0.0037724651501429727 -8.47502224911877 0.08959627881297773 0.08159505689444894 -102 1.4369529047717199e-06 0.00268815220958338 -1.1982285712078253e-05 -0.6280465733897953 -0.7858895865780965 0.1191517903799037 -5.4502436727706955 3.7960156042665996 0.2770063302236253 -103 1.4369529047717199e-06 0.002805585797815399 -1.1982285712078253e-05 -0.9730469334288293 0.24308398744348192 0.04671778758582927 --2.4367915363746064 6.349024537937233 -0.23506947906671516 -104 1.4369529047717199e-06 0.0019657425104118342 -1.1982285712078253e-05 --0.8622830814426756 0.16203258681713195 -0.006606809355655005 --0.11902693677580688 -6.619715307399879 -0.06684500658339611 -105 1.4369529047717199e-06 0.001226590658044384 -1.1982285712078253e-05 --0.5541618313135865 0.34082323509378454 0.049500920391491496 --3.9753888213903608 -5.537278335680825 -0.7672454872001911 -106 1.4369529047717199e-06 0.003794394954647244 -1.1982285712078253e-05 -1.0458281246106151 -1.6706231748689147 0.06020213533300383 -3.2271523739663226 2.378464654518896 0.2468216279488138 -107 1.4369529047717199e-06 0.00871686068124819 -1.1982285712078253e-05 -0.3882366922214593 -3.845520957302741 0.11428591868220975 -3.1501758161226894 0.2971115474673669 0.011162278031290336 -108 1.4369529047717199e-06 0.0022361849395057575 -1.1982285712078253e-05 --0.1211010784023071 1.1158012407191364 0.01452842000724313 --5.306987605393269 -1.1826788658493506 -0.4604254907830854 diff --git a/examples/Swifter_Swiftest/pl.swiftest.in b/examples/Swifter_Swiftest/pl.swiftest.in deleted file mode 100644 index fc40a2ab3..000000000 --- a/examples/Swifter_Swiftest/pl.swiftest.in +++ /dev/null @@ -1,443 +0,0 @@ -!! Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh -!! This file is part of Swiftest. -!! Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License -!! as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -!! Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty -!! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -!! You should have received a copy of the GNU General Public License along with Swiftest. -!! If not, see: https://www.gnu.org/licenses. - -108 -Mercury 1.6384274523913285e-06 0.0014751249629612916 -1.6306381826061646e-05 -0.1602701666124578 0.26554770212071965 0.006999193081403697 --10.84661106170086 5.720201228466586 1.4623737942912969 -Venus 2.4158283498953847e-05 0.006759060937524364 -4.0453784346544176e-05 --0.16650008137930533 -0.7067930093166555 -9.499295149127326e-05 -7.140870020194017 -1.72394448514424 -0.4357116679934973 -Earth 3.0006733956988116e-05 0.010044837524750683 -4.25875607065041e-05 --0.9367143789680987 -0.3556044661002122 2.2876740785801783e-05 -2.128067480165353 -5.898785758613359 0.00028348143314299893 -Mars 1.2739802010675942e-05 0.007246331310184216 -2.2657408050928896e-05 -0.5198158486140217 -1.3167894739096266 -0.040347965015894716 -4.946638260590617 2.316135241491425 -0.07279939287974249 -Jupiter 0.037692251088985676 0.355228373158286 -0.0004673261703049093 -4.864059555770782 -1.0357133869333606 -0.10452302173487142 -0.5419156143225717 2.828221887677315 -0.023871674148715123 -Saturn 0.011285899820091273 0.4376244336926855 -0.00038925687730393614 -7.315986571488801 -6.665014703455999 -0.1752690626952322 -1.2596948431635877 1.5048611868874542 -0.07628233691456182 -Uranus 0.001723658947826773 0.4702325754736345 -0.00016953449859497232 -14.123340020758134 13.74564230962882 -0.13198131411115843 --1.01204590263881 0.9653603062188307 0.0166498493238681 -Neptune 0.0020336100526728304 0.7817775176581134 -0.00016458790412449367 -29.67273744046178 -3.7767194623987788 -0.6060977334617753 -0.13798511862468082 1.1474090243078912 -0.026768721885164694 -Embryo_100 2.8739058095434397e-06 0.0025753291105210636 -1.509673399450197e-05 --0.6623401275205323 -0.4107946039012614 0.028121367086739624 -3.8873470171928273 -6.459644361853568 0.13674465046600903 -Embryo_101 2.8739058095434397e-06 0.006386093766400174 -1.509673399450197e-05 -0.8522206269710216 1.850581991806107 0.12124968189155705 --3.5850526828074334 2.804125303496323 0.26742825744726045 -Embryo_102 2.8739058095434397e-06 0.004890050033172402 -1.509673399450197e-05 --0.3488012349339563 1.8704749801105247 -0.19936018743857348 --3.935413848700553 -1.5090146885352058 0.36411104486781243 -Embryo_103 2.8739058095434397e-06 0.0009418167428588213 -1.509673399450197e-05 --0.184362498696566 0.325958775372328 0.0004687977618883022 --8.055662106004204 -4.952655912148878 0.24283131385366846 -Embryo_104 2.8739058095434397e-06 0.0035547587602849547 -1.509673399450197e-05 --0.0031282215049410326 -1.1032074585772889 0.03753784280684946 -6.261144632798905 -0.03379578251672892 -0.4137650311220476 -Embryo_105 2.8739058095434397e-06 0.007524159582592722 -1.509673399450197e-05 -1.9266614646815534 0.09194943067254291 0.004488902628553456 --1.2513954113124655 4.9167388704920585 -0.05214113656143003 -Embryo_106 2.8739058095434397e-06 0.006735697758400329 -1.509673399450197e-05 --1.6927772298871009 -2.032032058143688 -0.08421387302462716 -2.6435959968647165 -2.4099120719631677 0.27164206085578396 -Embryo_107 2.8739058095434397e-06 0.00485873601291501 -1.509673399450197e-05 -0.8124821077536961 1.496669326153075 0.1668163306716816 --4.521056029672882 1.4564583747465318 -0.23927911835728555 -Embryo_108 2.8739058095434397e-06 0.001247804883062001 -1.509673399450197e-05 --0.03558213011379509 -0.3748647006656365 0.025145249145075196 -10.36569178554003 -3.13790856793906 -0.5686730523378405 -Embryo_109 2.8739058095434397e-06 0.0011971270592630728 -1.509673399450197e-05 --0.27593189211884345 -0.3265030367153882 -0.03285168360073783 -7.142593164902537 -6.136522704836048 -0.0808096468237946 -Embryo_110 2.8739058095434397e-06 0.005291383850149194 -1.509673399450197e-05 --1.4759555222226983 -1.1786691116459336 0.10344758476439345 -2.810837126006068 -3.497976543626811 0.03958677061629555 -Embryo_111 2.8739058095434397e-06 0.002003433431282119 -1.509673399450197e-05 -0.49435385728184106 -0.46688247347445927 0.09619656472482273 -4.706204347860886 5.9809540740513825 0.020073197867132044 -Embryo_112 2.8739058095434397e-06 0.0023238784295016414 -1.509673399450197e-05 --0.7942420728982932 0.28505863867348713 -0.02941141780581869 --3.4232165624235065 -5.675838406061309 0.6265483233270612 -Embryo_113 2.8739058095434397e-06 0.007589828230830779 -1.509673399450197e-05 -2.1148344421907783 -1.8204620987740254 0.08710287773003927 -1.901029128431052 3.099599587004674 0.025466992634785694 -Embryo_114 2.8739058095434397e-06 0.0023142206327612454 -1.509673399450197e-05 -0.7389004211204933 -0.00858120417580266 -0.06197451957607665 --0.2911361560379896 7.542462259132478 0.33498215546195015 -Embryo_115 2.8739058095434397e-06 0.00449141512569776 -1.509673399450197e-05 -1.3925350657794073 0.8936214795531287 -0.030723377816567934 --3.2793775069984896 3.388001216571337 0.1732336546443752 -Embryo_116 2.8739058095434397e-06 0.003954668313229459 -1.509673399450197e-05 -0.22904647530341832 1.2482376842044842 -0.05060182661390145 --5.756101096701513 -0.17788364069187604 0.31542084615930605 -Embryo_117 2.8739058095434397e-06 0.00251708275545444 -1.509673399450197e-05 --0.5322881741494946 -0.7940450316585025 0.0631037319851381 -5.511667017782102 -2.5217966764630857 0.5183041796671646 -Embryo_118 2.8739058095434397e-06 0.004236142339967366 -1.509673399450197e-05 --1.5260756584494053 -0.42218610311255983 0.017226210983337327 -0.25660025852739266 -4.775530843252293 -0.09523384599885339 -Embryo_119 2.8739058095434397e-06 0.0012245741234824647 -1.509673399450197e-05 -0.18090631510038568 -0.4589585180418969 -0.03943372756994477 -6.753856289067679 4.482603964008263 0.7040007757296776 -Embryo_120 2.8739058095434397e-06 0.006035263611829456 -1.509673399450197e-05 -0.02172079217285594 2.01863892014518 -0.14030504527320117 --4.449784745882277 -0.46132709260154336 0.2557447085927633 -Embryo_121 2.8739058095434397e-06 0.0035428954154097594 -1.509673399450197e-05 -0.86774483388796 1.1544975529965802 -0.060044892414450345 --3.994333040503594 2.490117643014227 -0.45393935325655754 -Embryo_122 2.8739058095434397e-06 0.0011189406712929745 -1.509673399450197e-05 --0.31774925075976324 -0.22766143268839967 -0.02874426572742337 -4.839118426744508 -8.702080841877272 0.39473217129417815 -Embryo_123 2.8739058095434397e-06 0.004029489812431778 -1.509673399450197e-05 -1.2724967423228333 0.4276376023111785 0.05933701597304163 --1.4439100168127392 5.320280226266139 -0.05259363127082716 -Embryo_124 2.8739058095434397e-06 0.0016073122132047076 -1.509673399450197e-05 --0.23491881380799007 -0.45266106409572704 0.03347809151443653 -8.38833046854151 -3.5922969849421618 -0.3265027891337281 -Embryo_125 2.8739058095434397e-06 0.00164509764302705 -1.509673399450197e-05 -0.4287479553393034 -0.323054795195034 -0.009042688650659433 -5.337184982051495 7.000725679806189 0.28839126836652024 -Embryo_126 2.8739058095434397e-06 0.0036688164177383605 -1.509673399450197e-05 --0.3015969009740601 1.034882691215853 -0.16794859807777443 --6.189594564242739 -1.6663271944111515 -0.36407741931566145 -Embryo_127 2.8739058095434397e-06 0.01034044300676835 -1.509673399450197e-05 --3.172093316806504 4.04766147898167 -0.5420456132137627 --1.7818558093311394 -1.0098814721896556 0.1442054837893238 -Embryo_128 2.8739058095434397e-06 0.0008687687886486345 -1.509673399450197e-05 --0.22801541876898315 -0.07006629937091026 0.019029359845983224 -7.557159288558864 -11.827855607427248 1.1740904439111643 -Embryo_129 2.8739058095434397e-06 0.0028445913454466206 -1.509673399450197e-05 --0.5569467664207998 0.6527933897983793 -0.12488780704178155 --5.076306790427439 -4.9324866787519 -0.8800601626711871 -Embryo_130 2.8739058095434397e-06 0.004167106981756311 -1.509673399450197e-05 -0.11230816641438923 1.635373566073787 0.11375560712071912 --4.434294056326716 0.9435626461542896 0.2636855119189412 -Embryo_131 2.8739058095434397e-06 0.004683241416423367 -1.509673399450197e-05 --0.8610238680557628 1.7918034637565383 -0.08478892671391328 --3.8591018396456986 -0.5937537194005754 -0.17539517165723983 -Embryo_132 2.8739058095434397e-06 0.004932645043204141 -1.509673399450197e-05 -0.1693562572652172 1.5915638521402267 0.07123356387215855 --4.965386189303764 1.2026146117724297 0.09354310594577073 -Embryo_133 2.8739058095434397e-06 0.005998599442394139 -1.509673399450197e-05 -2.6091142775292036 0.6771281265606981 -0.03872232047644138 --0.7556728108232713 3.101075519309312 -0.216232906614372 -Embryo_134 2.8739058095434397e-06 0.004708138329728238 -1.509673399450197e-05 --0.10518586010665054 1.4932539004676444 0.034819057154311106 --5.321911844757485 -0.10589872590260131 -0.3457614153180886 -Embryo_135 2.8739058095434397e-06 0.00916016739402083 -1.509673399450197e-05 -2.9289051355621005 -1.3654955994778664 -0.32631103362194247 -1.1501649867216381 3.235513470473641 0.20002218759573143 -Embryo_136 2.8739058095434397e-06 0.0024924516608046945 -1.509673399450197e-05 --0.238573567303497 -0.7371022938110062 0.055293143196969 -6.736292738787924 -3.2199718397537542 -0.22254744140522048 -Embryo_137 2.8739058095434397e-06 0.0017079929019560604 -1.509673399450197e-05 -0.5902105682814927 -0.1314692587426859 -0.017655689798263003 -2.956779723295923 7.404454180488588 0.18067850233965713 -Embryo_138 2.8739058095434397e-06 0.0032153368485520247 -1.509673399450197e-05 -1.037043800399729 -0.03594663647865548 0.03703914356446883 --0.15947429792412557 6.3488237704111965 -0.4010431134134631 -Embryo_139 2.8739058095434397e-06 0.0019220756982321575 -1.509673399450197e-05 -0.5070230556584312 0.19206307089101599 0.0071453461364928425 --3.3006858068005576 8.674641604378644 0.06049757513891613 -Embryo_140 2.8739058095434397e-06 0.004487235490354316 -1.509673399450197e-05 -1.6405332013403902 0.021016118372194748 -0.055205438003346465 -0.412667583902561 4.738088993591651 0.07559195005558962 -Embryo_141 2.8739058095434397e-06 0.006967960700616453 -1.509673399450197e-05 --2.2941538952763647 1.544358040291795 0.21902672997311295 --2.2974363861541605 -2.603745875459688 0.002908475469253997 -Embryo_142 2.8739058095434397e-06 0.006707396746149989 -1.509673399450197e-05 --2.4885813264577212 -0.417722139413224 0.16925294332443802 -1.4615337815747902 -3.464174819374684 0.2059665062892221 -Embryo_143 2.8739058095434397e-06 0.0019132605958338785 -1.509673399450197e-05 -0.5307181461914736 0.22066736207589896 0.004871828195043754 --5.839299639857224 6.597209516492565 -0.07159375603550568 -Embryo_144 2.8739058095434397e-06 0.0012525628401650311 -1.509673399450197e-05 -0.25062549178866 0.3341855631140645 0.00967264208867581 --7.509100046144855 6.428555150976056 0.018206415929842873 -Embryo_145 2.8739058095434397e-06 0.0017490597599596309 -1.509673399450197e-05 --0.08847100380722234 -0.5605856096312082 0.005589044492604909 -8.339364981602754 -2.045457686194417 -0.1997265153351233 -Embryo_146 2.8739058095434397e-06 0.005045587221639991 -1.509673399450197e-05 --1.455747635304268 -0.3407240434657265 0.11026106733079433 -0.4200214745449485 -5.46225028125663 -0.037887008419275114 -Embryo_147 2.8739058095434397e-06 0.010954331500369612 -1.509673399450197e-05 -0.9785887334826182 -3.146944310672609 -0.0083236782087085 -3.608015510201077 0.7109105341908778 0.027924873662944615 -Embryo_148 2.8739058095434397e-06 0.0047105771703526275 -1.509673399450197e-05 --0.07482445742777744 1.6881010039147615 -0.092795518220082 --4.725414775960127 0.13357727119203466 0.2111483010583421 -Embryo_149 2.8739058095434397e-06 0.004456969020088517 -1.509673399450197e-05 --1.1980275017381627 -1.029469559179283 -0.19907358046618925 -2.237070033283333 -4.350562138317463 -0.12893592360399972 -Planetesimal_150 1.4369529047717199e-06 0.009063929733314402 -1.1982285712078253e-05 --3.4835967399637786 -2.0198047461598723 -0.06253245735073558 -1.7236200292680683 -2.5663983684642164 0.19843379922859808 -Planetesimal_151 1.4369529047717199e-06 0.006814568998382013 -1.1982285712078253e-05 -3.328169715021026 0.5220618297879457 0.244602097886744 --0.39267629640640256 3.142112049371514 -0.19002777839665866 -Planetesimal_152 1.4369529047717199e-06 0.0014653355477212912 -1.1982285712078253e-05 --0.2460498882181166 0.5915441352620496 -0.00448597748263217 --7.488621725973728 -2.285203795727855 -0.15741554998226712 -Planetesimal_153 1.4369529047717199e-06 0.001500320590905441 -1.1982285712078253e-05 --0.580969414208121 -0.37549049422433606 -0.1176663342382454 -4.166790521865679 -5.840391150097335 0.7651371647900774 -Planetesimal_154 1.4369529047717199e-06 0.008845700988161334 -1.1982285712078253e-05 -3.890213681842885 0.9327487325164725 -0.17401314683797195 --0.5884667946931457 3.0184362098234048 -0.07212927861537761 -Planetesimal_155 1.4369529047717199e-06 0.007076376575024062 -1.1982285712078253e-05 -2.2175428864743014 -2.7457492182231986 0.06746480088224666 -2.4829706340521867 1.832597386457729 0.15359796771599887 -Planetesimal_156 1.4369529047717199e-06 0.001825149856647478 -1.1982285712078253e-05 -0.7381067067002793 0.0977638763685249 0.07019422188189116 --0.2970432350074762 7.452323967686693 -0.49677680844718836 -Planetesimal_157 1.4369529047717199e-06 0.0017738218666757113 -1.1982285712078253e-05 -0.05595157559645306 -0.5832463709928819 -0.08253806997887246 -8.788492157974252 -2.236253243409472 0.23526552265071254 -Planetesimal_158 1.4369529047717199e-06 0.004026814212867061 -1.1982285712078253e-05 --1.072262514995177 1.3008112431015015 -0.14732711336059817 --3.0506085557380382 -3.8415645626143036 -0.25746704998882364 -Planetesimal_159 1.4369529047717199e-06 0.0007216531181762911 -1.1982285712078253e-05 -0.013299706791004784 0.34040433884664184 -0.03200185846491806 --10.240893546853702 -0.06268718020024237 0.4089287179697186 -Planetesimal_160 1.4369529047717199e-06 0.003726977173790839 -1.1982285712078253e-05 -0.821244296556658 -1.6266012957153122 0.08787600273602682 -3.4437101350702015 2.660646203989688 -0.04170669638916523 -Planetesimal_161 1.4369529047717199e-06 0.002786912751456066 -1.1982285712078253e-05 -0.7797346089335155 -0.6904426400251575 -0.1716832998791038 -3.309044922265838 5.593686295677864 -0.10252185168231216 -Planetesimal_162 1.4369529047717199e-06 0.005856670124705245 -1.1982285712078253e-05 -1.2249463109805205 -2.32858081787665 -0.26843408512652345 -2.979094991241669 2.3378796595204436 0.1524564551143064 -Planetesimal_163 1.4369529047717199e-06 0.002983715845034672 -1.1982285712078253e-05 --1.071513604906581 -1.134524501286559 0.23768504516225447 -3.322711596006444 -2.8974190931702077 -0.4230300378427455 -Planetesimal_164 1.4369529047717199e-06 0.0015405289849267612 -1.1982285712078253e-05 -0.6222449979939311 -0.17042158991817652 0.04406840354243642 -0.723315473109811 7.898874818049032 -0.5425742138263642 -Planetesimal_165 1.4369529047717199e-06 0.0008409876069772385 -1.1982285712078253e-05 --0.2942180768126447 0.2589306600669347 -0.01726581198524641 --6.4868639993503185 -7.158927327730385 -0.24306370864261126 -Planetesimal_166 1.4369529047717199e-06 0.002886021799050532 -1.1982285712078253e-05 -0.2891014988049755 -1.1277436731051895 0.05898754360239672 -5.941091054100061 0.9743174837899904 -0.23010797367412136 -Planetesimal_167 1.4369529047717199e-06 0.003459505078487661 -1.1982285712078253e-05 -0.08886790235524111 -1.7199488656811155 -0.07247353904100214 -4.378056887548356 0.6268492053862617 0.146250474581925 -Planetesimal_168 1.4369529047717199e-06 0.004464380088311966 -1.1982285712078253e-05 --0.7263225079970725 1.3973462546687365 0.04812249771790175 --4.553552306479177 -3.0090066241099422 0.053885811221648226 -Planetesimal_169 1.4369529047717199e-06 0.0020947051517956794 -1.1982285712078253e-05 -0.908565054512616 -0.4595585609703524 0.03112283256563214 -1.7169460186924992 5.573755089787307 0.4331747583796787 -Planetesimal_170 1.4369529047717199e-06 0.003837572859409301 -1.1982285712078253e-05 --1.382556679747199 -0.39161806399026866 -0.11172482003651635 -0.7222388119773917 -5.526378032800891 0.2819423603946751 -Planetesimal_171 1.4369529047717199e-06 0.0036068142418294916 -1.1982285712078253e-05 -1.37112722284144 -0.46209524201763624 -0.06435683201713395 -1.9095110736357366 5.070945864616038 0.05006608200716384 -Planetesimal_172 1.4369529047717199e-06 0.009156607867592441 -1.1982285712078253e-05 --4.1603749701672745 -0.35496341007716015 -0.1967751790935142 -0.5892154917494472 -2.9040415982749463 0.44772518870840283 -Planetesimal_173 1.4369529047717199e-06 0.0038585207868490406 -1.1982285712078253e-05 --0.08256926449446002 -1.6109511412407516 0.048889757927731654 -4.891058002708651 -1.219692051619414 -0.0641741463253937 -Planetesimal_174 1.4369529047717199e-06 0.007295295605949574 -1.1982285712078253e-05 -1.399730932121055 -3.99319492036196 -0.21457067664535642 -2.4126720186782618 0.6129637222210155 -0.06231154463373347 -Planetesimal_175 1.4369529047717199e-06 0.0021539271201263944 -1.1982285712078253e-05 --0.3331567897706851 0.9180317964547977 -0.037465116422244 --5.8232503354831495 -2.1627179446986826 -0.28684956773881154 -Planetesimal_176 1.4369529047717199e-06 0.0011291028621390601 -1.1982285712078253e-05 -0.5320146747915385 0.047264006343156445 -0.05185729307508005 --0.5877547860152262 8.149405786459024 -0.17985461065925276 -Planetesimal_177 1.4369529047717199e-06 0.008349398774320359 -1.1982285712078253e-05 -1.408702716556625 -2.9813361772368348 -0.10367401227711198 -3.1644742728204305 1.7405413342306382 0.15652595378416992 -Planetesimal_178 1.4369529047717199e-06 0.0038406305257668487 -1.1982285712078253e-05 -1.761903319253396 0.45102257576900545 0.09184229138114439 --1.3576767789650688 4.213632865150057 -0.3733157922519408 -Planetesimal_179 1.4369529047717199e-06 0.0016875757703591246 -1.1982285712078253e-05 -0.38620474800989607 0.40189516861123004 -0.036885123484424465 --6.7633132363329285 6.45162477844062 0.4722443113676685 -Planetesimal_180 1.4369529047717199e-06 0.0048038139944044335 -1.1982285712078253e-05 --1.6805793066350616 -0.9293325258574284 0.13104019213583057 -2.0950975948125947 -4.211632026873709 0.08161617887614422 -Planetesimal_181 1.4369529047717199e-06 0.0022452238439493242 -1.1982285712078253e-05 --0.37676934247471355 -1.16264134721415 0.042738378033923614 -3.8603520823957385 -3.0425369081962277 -0.011296987728486368 -Planetesimal_182 1.4369529047717199e-06 0.0022953941818583136 -1.1982285712078253e-05 --0.8431116114860677 -0.24445036957959682 0.016841561340431764 -0.8537748465883584 -7.032919341487657 0.46329516155551853 -Planetesimal_183 1.4369529047717199e-06 0.0016523904161132544 -1.1982285712078253e-05 --0.27240226842230997 -0.5745953677506589 0.001514560594100765 -6.8270782173598255 -4.749867614018482 -0.3051444603382248 -Planetesimal_184 1.4369529047717199e-06 0.0030500467222302507 -1.1982285712078253e-05 --1.4044776325673578 -0.07564893420990226 -0.008190496722349902 -1.50744096504877 -4.909806290938663 -0.11584708149013598 -Planetesimal_185 1.4369529047717199e-06 0.007814353784309119 -1.1982285712078253e-05 -1.8562621530449532 2.58201909289353 0.11431409648026315 --3.325627530540372 1.461256904251917 -0.09216346534641737 -Planetesimal_186 1.4369529047717199e-06 0.001073778156402966 -1.1982285712078253e-05 -0.1764090373691835 0.3654111264370534 0.0007051535861495877 --10.024024877135222 3.1002313498834027 0.08461763258504626 -Planetesimal_187 1.4369529047717199e-06 0.0036804108004268137 -1.1982285712078253e-05 -0.7440887755521456 1.2272692343592138 -0.04370530382371359 --4.020335672056772 3.764670793642172 -0.05303180949643653 -Planetesimal_188 1.4369529047717199e-06 0.0035006955295143064 -1.1982285712078253e-05 --1.5523597919935552 -0.19160112439546667 0.000447278066132234 -1.0648531356431454 -4.831029013079775 0.30317180315022707 -Planetesimal_189 1.4369529047717199e-06 0.008596473624314987 -1.1982285712078253e-05 --2.551460211224862 -1.8028012832616727 -0.011085402766100854 -2.1956184579074627 -3.145608367581683 0.06604958008184625 -Planetesimal_190 1.4369529047717199e-06 0.0012546704631549764 -1.1982285712078253e-05 -0.4168947519965348 -0.24730546837801765 0.013646913167151605 -4.072409731225815 8.594814613969156 -0.25040988361747313 -Planetesimal_191 1.4369529047717199e-06 0.0009934230176118935 -1.1982285712078253e-05 --0.26878018379524166 0.23368071851328648 0.01168303352747965 --7.938667819724678 -8.175604120348051 -0.620994983801747 -Planetesimal_192 1.4369529047717199e-06 0.001404464554781543 -1.1982285712078253e-05 --0.06790080105406238 -0.5747050368614427 -0.0037724651501429727 -8.47502224911877 0.08959627881297773 0.08159505689444894 -Planetesimal_193 1.4369529047717199e-06 0.00268815220958338 -1.1982285712078253e-05 -0.6280465733897953 -0.7858895865780965 0.1191517903799037 -5.4502436727706955 3.7960156042665996 0.2770063302236253 -Planetesimal_194 1.4369529047717199e-06 0.002805585797815399 -1.1982285712078253e-05 -0.9730469334288293 0.24308398744348192 0.04671778758582927 --2.4367915363746064 6.349024537937233 -0.23506947906671516 -Planetesimal_195 1.4369529047717199e-06 0.0019657425104118342 -1.1982285712078253e-05 --0.8622830814426756 0.16203258681713195 -0.006606809355655005 --0.11902693677580688 -6.619715307399879 -0.06684500658339611 -Planetesimal_196 1.4369529047717199e-06 0.001226590658044384 -1.1982285712078253e-05 --0.5541618313135865 0.34082323509378454 0.049500920391491496 --3.9753888213903608 -5.537278335680825 -0.7672454872001911 -Planetesimal_197 1.4369529047717199e-06 0.003794394954647244 -1.1982285712078253e-05 -1.0458281246106151 -1.6706231748689147 0.06020213533300383 -3.2271523739663226 2.378464654518896 0.2468216279488138 -Planetesimal_198 1.4369529047717199e-06 0.00871686068124819 -1.1982285712078253e-05 -0.3882366922214593 -3.845520957302741 0.11428591868220975 -3.1501758161226894 0.2971115474673669 0.011162278031290336 -Planetesimal_199 1.4369529047717199e-06 0.0022361849395057575 -1.1982285712078253e-05 --0.1211010784023071 1.1158012407191364 0.01452842000724313 --5.306987605393269 -1.1826788658493506 -0.4604254907830854 - diff --git a/examples/Swifter_Swiftest/swifter_start.in b/examples/Swifter_Swiftest/swifter_start.in deleted file mode 100644 index 7997921b6..000000000 --- a/examples/Swifter_Swiftest/swifter_start.in +++ /dev/null @@ -1,11 +0,0 @@ -!! Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh -!! This file is part of Swiftest. -!! Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License -!! as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -!! Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty -!! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -!! You should have received a copy of the GNU General Public License along with Swiftest. -!! If not, see: https://www.gnu.org/licenses. - -param.swifter.in -2.1554293571575797e-06 diff --git a/examples/Swifter_Swiftest/swifter_swiftest_comp.py b/examples/Swifter_Swiftest/swifter_swiftest_comp.py deleted file mode 100644 index 79ec247cf..000000000 --- a/examples/Swifter_Swiftest/swifter_swiftest_comp.py +++ /dev/null @@ -1,79 +0,0 @@ -""" - Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh - This file is part of Swiftest. - Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License - as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty - of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License along with Swiftest. - If not, see: https://www.gnu.org/licenses. -""" -#!/usr/bin/env python3 -""" -Reads and processes a Swiftest output file and a Swifter output file. - -Inputs -_______ -param.swifter.in : ASCII text file - Swifter parameter input file. - -param.swiftest.in : ASCII text file - Swiftest parameter input file. - -bin.dat : Binary file. - Swifter output file. - -out.nc : NetCDF file - Swiftest output file. - -Returns -------- -swifter_swiftest_comp.eps : Encapsulated PostScript file. - A figure containing the number of massive bodies and test particles for a Swifter and Swiftest run over time. -""" - -import swiftest -import numpy as np -import matplotlib.pyplot as plt -import xarray as xr - -# Pull in the Swifter Data -swifter_sim = swiftest.Simulation(param_file="param.swifter.in", codename="Swifter").ds - -# Pull in the Swiftest Data -swiftest_sim = swiftest.Simulation(param_file="param.swiftest.in").ds - -# Number of Bodies in Swifter System -npl_swifter = [] -ntp_swifter = [] -for i in range(len(swifter_sim['time'])): - npl_swifter.append(len(swifter_sim['Gmass'][i].values[np.logical_not(np.isnan(swifter_sim['Gmass'][i].values))])) - tp_only = swifter_sim.where(swifter_sim['id'] >= 159) - ntp_swifter.append(len(tp_only['a'][i].values[np.logical_not(np.isnan(tp_only['a'][i].values))])) - -# Calculate Slope of Decay -npl_swifter_slope = np.polyfit(swifter_sim['time'], npl_swifter, 1)[0] -ntp_swifter_slope = np.polyfit(swifter_sim['time'], ntp_swifter, 1)[0] -npl_swiftest_slope = np.polyfit(swiftest_sim['time'], swiftest_sim['npl'], 1)[0] -ntp_swiftest_slope = np.polyfit(swiftest_sim['time'], swiftest_sim['ntp'], 1)[0] - -# Plot -fig, ax = plt.subplots(nrows=1, ncols=1, figsize=(8,4)) -ax.plot(swifter_sim['time'], npl_swifter, color='crimson', linestyle='solid', linewidth=1, label=f'Swifter Massive Bodies\nslope={npl_swifter_slope}') -ax.plot(swiftest_sim['time'], swiftest_sim['npl'], color='navy', linestyle='solid', linewidth=1, label=f'Swiftest Massive Bodies\nslope={npl_swiftest_slope}') -ax.plot(swifter_sim['time'], ntp_swifter, color='crimson', linestyle='dotted', linewidth=1, label=f'Swifter Test Particles\nslope={ntp_swifter_slope}') -ax.plot(swiftest_sim['time'], swiftest_sim['ntp'], color='navy', linestyle='dotted', linewidth=1, label=f'Swiftest Test Particles\nslope={ntp_swiftest_slope}') -ax.set_title("Total Number of Bodies in the System") -ax.set_xlabel("Time (y)", fontsize=12) -ax.set_ylabel("n", fontsize=12) -ax.set_xlim(0,1e6) -ax.set_xticks([0, 2e5, 4e5, 6e5, 8e5, 1e6]) -ax.set_xticklabels(['0','$2 * 10^5$','$4 * 10^5$','$6 * 10^5$','$8 * 10^5$', '$1 * 10^6$'], size=12) -ax.set_ylim(40,110) -ax.set_yticks([40, 50, 60, 70, 80, 90, 100, 110]) -ax.set_yticklabels(['40', '50', '60', '70', '80', '90', '100', '110'], size=12) -ax.tick_params(direction="in", which='both') -plt.legend(fontsize=12, frameon=False, bbox_to_anchor=(1,1), loc="upper left") -plt.tight_layout() -plt.savefig(f'swifter_swiftest_comp.eps', dpi=300,facecolor='white', transparent=False) -plt.show() \ No newline at end of file diff --git a/examples/Swifter_Swiftest/tp.swifter.in b/examples/Swifter_Swiftest/tp.swifter.in deleted file mode 100644 index be1d95e8b..000000000 --- a/examples/Swifter_Swiftest/tp.swifter.in +++ /dev/null @@ -1,160 +0,0 @@ -!! Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh -!! This file is part of Swiftest. -!! Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License -!! as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -!! Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty -!! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -!! You should have received a copy of the GNU General Public License along with Swiftest. -!! If not, see: https://www.gnu.org/licenses. - -50 -159 -0.4652499049236185 -1.9252235978846917 -0.15445104676110957 -4.5639517756905885 0.8605799979310799 0.2905159181209403 -160 --0.5434326729562742 0.0883828454035278 -0.003854119319776863 --0.7917614995282857 -7.097860454292448 -0.26719565832973813 -161 --0.2592435057057568 0.2903065682494606 0.029486677411792762 --8.183870311577216 -5.09367034839905 -0.05154928677040141 -162 --0.12579000410688046 1.1942127029276144 0.0885803628846209 --6.209867898277703 -0.032803805807973575 0.22643488798126735 -163 --1.2926979936477414 -0.18077788800754901 -0.016273157278781224 -0.3933524184833448 -5.595818343699292 -0.5181363767430004 -164 -2.3790846951778133 0.2907846104750287 -0.03274016298005274 --0.22519319756334286 4.181206180278158 0.352500051310821 -165 --0.6215315229112675 0.14164156737490322 0.05899223172886582 --2.9820329363033444 -8.261352401625205 0.31978890986244113 -166 -0.8247676869043595 1.3316366772189672 0.027155941662864103 --4.366948022853148 3.05740341297499 -0.254512237921843 -167 -1.604490163425006 0.060696874838003956 -0.030707184743809603 --0.19477689943817458 5.315467368198203 -0.02826090822407737 -168 -0.2057209501846554 -0.478597474679443 0.009070628384664277 -9.28211084707657 1.5453178124455802 0.2544918592930543 -169 -1.680510804189809 0.11766218336840505 -0.002778997198353247 --0.8232768670901527 4.801155429125758 -0.13709250022781708 -170 --0.9826351749531101 1.0281262802656392 -0.07579219750180603 --3.3906759887357967 -4.2219649631041225 0.5840128834723084 -171 -0.3369757457051352 -0.07955919879572079 0.0173818277889329 -2.2599061237736278 9.97157368274002 -1.031059387149086 -172 --0.9188431923114388 -0.024835231710438582 -0.016143077192416245 -0.07681555705759673 -6.296954220132986 -0.0073286739645223985 -173 --1.1249744424692278 -2.494417760101854 0.04382342659485867 -3.104904742649086 -1.5061075548327385 -0.08796405303686881 -174 --2.844732544832654 1.8480896022529323 0.3517984062216407 --1.730010856284858 -2.5884650296051706 0.023887660587516957 -175 -1.0629099205049168 -0.43893834403046317 0.00912529907799065 -2.856765518650794 5.020417335959219 0.40107565383351573 -176 -0.5939444830533624 0.07159959087816009 -0.022638299058844347 --1.8583553036840865 7.775020655359458 -0.503586799328621 -177 -0.28834791589028475 -0.432923430855143 0.013029978965099562 -6.522866088655446 5.2223702417758116 -0.4389558492420001 -178 --0.08556943776174088 -0.29039791024745065 0.043029363214381576 -11.008814350658957 -3.6244165514423607 -1.0490767144428212 -179 -0.044111908689778136 0.40181667032901586 0.015287875690967971 --8.471297970385988 1.2400050313059299 -0.7647961789401043 -180 --0.4260801607616482 -3.0625778142588165 0.1543031458136795 -3.9284567175195066 -0.4181633499990981 0.12668402166528145 -181 -3.488655211472626 -0.9507656971653827 -0.1488006587448259 -1.2841332721106198 2.635032652587949 -0.3047639059405634 -182 --0.8467159075572467 0.45100730980880177 0.030747925310261603 --3.4295856614204547 -5.306695336690214 0.1034507961003739 -183 -3.719387937301285 -0.5425908284609376 -0.08455715010366704 -0.6119306099598705 3.1672834658541937 0.13441676215470993 -184 --0.9382532065989335 0.13883637582213426 0.02883034593482372 -0.08697641581029335 -6.139949097744219 0.05084300072890564 -185 -1.458928466728456 0.5872358864151304 0.07970623081344938 --1.0774312295075048 5.381856661270171 0.2865837379714281 -186 --3.538322530364556 0.28720261175686773 -0.4063037037621291 --0.33590734312293985 -3.0905246436722766 0.006699597720436009 -187 -0.44714805515736156 0.21656127689899074 0.050211490340064086 --2.547942259470766 7.884030386873806 -0.8653384133304263 -188 -0.9306854261517634 -1.694424464097455 0.05752278217501188 -4.055030020759139 2.3449423535445195 0.13806736546192072 -189 -1.4668457397333827 0.23882926966375606 -0.08580959175982561 --0.4319501961047658 4.762285929587695 0.09557216952729888 -190 -0.41271096363962423 -3.597108581791722 0.24368621666953333 -3.182716499819613 -0.16591870259903638 0.05343624105766983 -191 --4.363650579005379 1.746318694081939 0.13968991083886578 --1.0594057200694706 -2.140818982858905 -0.047639610648087465 -192 --1.8562666113562645 -1.4440938125718437 -0.001421382043194093 -3.120068474078302 -2.3781546605913997 0.14570974564056507 -193 -0.37259506022297584 0.8441174235582465 0.12172763286485236 --6.079127384208098 1.8788843030155018 0.2850183328972841 -194 -0.26987315262650047 0.3178259952964168 -0.017695219737394983 --8.241792601557012 6.163279530583017 1.1586043350056958 -195 -0.8150977336033072 -0.33458246632668986 -0.015489029048587882 -2.3291871552345396 6.200569032330116 0.23027671757000504 -196 -0.26942133221759357 -3.718534127623176 -0.1189172749278874 -3.3017602052874166 -0.19225426080942098 0.06009666678039193 -197 --0.08995330175577071 0.3542513004768212 0.0024102943200328903 --9.942281975187052 -2.410322594985226 -0.08229625793565117 -198 --0.3556570085176459 -0.3609103468677514 -0.043599294100341496 -6.279504329261222 -6.235724665124714 -0.19033053830699953 -199 --0.012883986004486259 1.145023907108886 0.14731951244067265 --5.210009519259157 -0.7173191994237267 -0.17120247570599392 -200 --1.3431335216389804 0.48398069593471715 0.1656257940959615 --2.0279805526721013 -4.408336934541114 0.16217697527100383 -201 --1.5319531220171856 -1.0930338214065207 -0.062372505122950644 -2.8441628344349876 -3.909865401581725 0.29681021047070855 -202 --2.2463919836682367 2.1179583512281592 0.015267123955361207 --1.9532919155320676 -2.4769721589817544 -0.23261826523852772 -203 --2.745055390009489 0.681129023850269 -0.2817512665926909 --1.383757297924798 -3.6060573004005536 0.06291367874406233 -204 --0.3009826779915924 1.2913213221226365 0.07789776121337 --5.609823874430772 -1.5626443992724621 0.4011405921176368 -205 -2.0590444468043505 -2.3104492127147997 -0.17908949939006086 -2.745270008411094 2.498099631772859 -0.13073355692787492 -206 -0.2933685742930625 0.11699203472899847 0.0035754917774219663 --3.7950862610401503 12.422696279780187 1.2027648059109093 -207 --0.634930799323774 0.47331186281364335 -0.019439549705956488 --4.4990069779347746 -5.29573285211759 -0.5307338900527648 -208 -0.3357908746941814 0.7448111778121099 -0.03999732791332919 --6.8385089177440985 2.656785512359358 -0.38418114580883705 diff --git a/examples/Swifter_Swiftest/tp.swiftest.in b/examples/Swifter_Swiftest/tp.swiftest.in deleted file mode 100644 index a09e98094..000000000 --- a/examples/Swifter_Swiftest/tp.swiftest.in +++ /dev/null @@ -1,161 +0,0 @@ -!! Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh -!! This file is part of Swiftest. -!! Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License -!! as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -!! Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty -!! of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -!! You should have received a copy of the GNU General Public License along with Swiftest. -!! If not, see: https://www.gnu.org/licenses. - -50 -TestParticle_200 -0.4652499049236185 -1.9252235978846917 -0.15445104676110957 -4.5639517756905885 0.8605799979310799 0.2905159181209403 -TestParticle_201 --0.5434326729562742 0.0883828454035278 -0.003854119319776863 --0.7917614995282857 -7.097860454292448 -0.26719565832973813 -TestParticle_202 --0.2592435057057568 0.2903065682494606 0.029486677411792762 --8.183870311577216 -5.09367034839905 -0.05154928677040141 -TestParticle_203 --0.12579000410688046 1.1942127029276144 0.0885803628846209 --6.209867898277703 -0.032803805807973575 0.22643488798126735 -TestParticle_204 --1.2926979936477414 -0.18077788800754901 -0.016273157278781224 -0.3933524184833448 -5.595818343699292 -0.5181363767430004 -TestParticle_205 -2.3790846951778133 0.2907846104750287 -0.03274016298005274 --0.22519319756334286 4.181206180278158 0.352500051310821 -TestParticle_206 --0.6215315229112675 0.14164156737490322 0.05899223172886582 --2.9820329363033444 -8.261352401625205 0.31978890986244113 -TestParticle_207 -0.8247676869043595 1.3316366772189672 0.027155941662864103 --4.366948022853148 3.05740341297499 -0.254512237921843 -TestParticle_208 -1.604490163425006 0.060696874838003956 -0.030707184743809603 --0.19477689943817458 5.315467368198203 -0.02826090822407737 -TestParticle_209 -0.2057209501846554 -0.478597474679443 0.009070628384664277 -9.28211084707657 1.5453178124455802 0.2544918592930543 -TestParticle_210 -1.680510804189809 0.11766218336840505 -0.002778997198353247 --0.8232768670901527 4.801155429125758 -0.13709250022781708 -TestParticle_211 --0.9826351749531101 1.0281262802656392 -0.07579219750180603 --3.3906759887357967 -4.2219649631041225 0.5840128834723084 -TestParticle_212 -0.3369757457051352 -0.07955919879572079 0.0173818277889329 -2.2599061237736278 9.97157368274002 -1.031059387149086 -TestParticle_213 --0.9188431923114388 -0.024835231710438582 -0.016143077192416245 -0.07681555705759673 -6.296954220132986 -0.0073286739645223985 -TestParticle_214 --1.1249744424692278 -2.494417760101854 0.04382342659485867 -3.104904742649086 -1.5061075548327385 -0.08796405303686881 -TestParticle_215 --2.844732544832654 1.8480896022529323 0.3517984062216407 --1.730010856284858 -2.5884650296051706 0.023887660587516957 -TestParticle_216 -1.0629099205049168 -0.43893834403046317 0.00912529907799065 -2.856765518650794 5.020417335959219 0.40107565383351573 -TestParticle_217 -0.5939444830533624 0.07159959087816009 -0.022638299058844347 --1.8583553036840865 7.775020655359458 -0.503586799328621 -TestParticle_218 -0.28834791589028475 -0.432923430855143 0.013029978965099562 -6.522866088655446 5.2223702417758116 -0.4389558492420001 -TestParticle_219 --0.08556943776174088 -0.29039791024745065 0.043029363214381576 -11.008814350658957 -3.6244165514423607 -1.0490767144428212 -TestParticle_220 -0.044111908689778136 0.40181667032901586 0.015287875690967971 --8.471297970385988 1.2400050313059299 -0.7647961789401043 -TestParticle_221 --0.4260801607616482 -3.0625778142588165 0.1543031458136795 -3.9284567175195066 -0.4181633499990981 0.12668402166528145 -TestParticle_222 -3.488655211472626 -0.9507656971653827 -0.1488006587448259 -1.2841332721106198 2.635032652587949 -0.3047639059405634 -TestParticle_223 --0.8467159075572467 0.45100730980880177 0.030747925310261603 --3.4295856614204547 -5.306695336690214 0.1034507961003739 -TestParticle_224 -3.719387937301285 -0.5425908284609376 -0.08455715010366704 -0.6119306099598705 3.1672834658541937 0.13441676215470993 -TestParticle_225 --0.9382532065989335 0.13883637582213426 0.02883034593482372 -0.08697641581029335 -6.139949097744219 0.05084300072890564 -TestParticle_226 -1.458928466728456 0.5872358864151304 0.07970623081344938 --1.0774312295075048 5.381856661270171 0.2865837379714281 -TestParticle_227 --3.538322530364556 0.28720261175686773 -0.4063037037621291 --0.33590734312293985 -3.0905246436722766 0.006699597720436009 -TestParticle_228 -0.44714805515736156 0.21656127689899074 0.050211490340064086 --2.547942259470766 7.884030386873806 -0.8653384133304263 -TestParticle_229 -0.9306854261517634 -1.694424464097455 0.05752278217501188 -4.055030020759139 2.3449423535445195 0.13806736546192072 -TestParticle_230 -1.4668457397333827 0.23882926966375606 -0.08580959175982561 --0.4319501961047658 4.762285929587695 0.09557216952729888 -TestParticle_231 -0.41271096363962423 -3.597108581791722 0.24368621666953333 -3.182716499819613 -0.16591870259903638 0.05343624105766983 -TestParticle_232 --4.363650579005379 1.746318694081939 0.13968991083886578 --1.0594057200694706 -2.140818982858905 -0.047639610648087465 -TestParticle_233 --1.8562666113562645 -1.4440938125718437 -0.001421382043194093 -3.120068474078302 -2.3781546605913997 0.14570974564056507 -TestParticle_234 -0.37259506022297584 0.8441174235582465 0.12172763286485236 --6.079127384208098 1.8788843030155018 0.2850183328972841 -TestParticle_235 -0.26987315262650047 0.3178259952964168 -0.017695219737394983 --8.241792601557012 6.163279530583017 1.1586043350056958 -TestParticle_236 -0.8150977336033072 -0.33458246632668986 -0.015489029048587882 -2.3291871552345396 6.200569032330116 0.23027671757000504 -TestParticle_237 -0.26942133221759357 -3.718534127623176 -0.1189172749278874 -3.3017602052874166 -0.19225426080942098 0.06009666678039193 -TestParticle_238 --0.08995330175577071 0.3542513004768212 0.0024102943200328903 --9.942281975187052 -2.410322594985226 -0.08229625793565117 -TestParticle_239 --0.3556570085176459 -0.3609103468677514 -0.043599294100341496 -6.279504329261222 -6.235724665124714 -0.19033053830699953 -TestParticle_240 --0.012883986004486259 1.145023907108886 0.14731951244067265 --5.210009519259157 -0.7173191994237267 -0.17120247570599392 -TestParticle_241 --1.3431335216389804 0.48398069593471715 0.1656257940959615 --2.0279805526721013 -4.408336934541114 0.16217697527100383 -TestParticle_242 --1.5319531220171856 -1.0930338214065207 -0.062372505122950644 -2.8441628344349876 -3.909865401581725 0.29681021047070855 -TestParticle_243 --2.2463919836682367 2.1179583512281592 0.015267123955361207 --1.9532919155320676 -2.4769721589817544 -0.23261826523852772 -TestParticle_244 --2.745055390009489 0.681129023850269 -0.2817512665926909 --1.383757297924798 -3.6060573004005536 0.06291367874406233 -TestParticle_245 --0.3009826779915924 1.2913213221226365 0.07789776121337 --5.609823874430772 -1.5626443992724621 0.4011405921176368 -TestParticle_246 -2.0590444468043505 -2.3104492127147997 -0.17908949939006086 -2.745270008411094 2.498099631772859 -0.13073355692787492 -TestParticle_247 -0.2933685742930625 0.11699203472899847 0.0035754917774219663 --3.7950862610401503 12.422696279780187 1.2027648059109093 -TestParticle_248 --0.634930799323774 0.47331186281364335 -0.019439549705956488 --4.4990069779347746 -5.29573285211759 -0.5307338900527648 -TestParticle_249 -0.3357908746941814 0.7448111778121099 -0.03999732791332919 --6.8385089177440985 2.656785512359358 -0.38418114580883705 - diff --git a/examples/helio_gr_test/.gitignore b/examples/helio_gr_test/.gitignore index 8968b5dd7..7e1c9b544 100644 --- a/examples/helio_gr_test/.gitignore +++ b/examples/helio_gr_test/.gitignore @@ -1,3 +1,4 @@ * !.gitignore -!helio_gr_test.py \ No newline at end of file +!helio_gr_test.py +!README.txt diff --git a/examples/helio_gr_test/README.txt b/examples/helio_gr_test/README.txt new file mode 100644 index 000000000..e14ab2747 --- /dev/null +++ b/examples/helio_gr_test/README.txt @@ -0,0 +1,22 @@ +Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh +This file is part of Swiftest. +Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License +as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with Swiftest. +If not, see: https://www.gnu.org/licenses. + +README.txt + +Swiftest Example : helio_gr_test +Author : David Minton and Carlisle Wishard +Date : December 6, 2022 + +Included in the helio_gr_test example directory are the following files: + + - README.txt : This file + - helio_gr_test.py : A Python Script that generates and runs a set of initial conditions. + +This example is intended to be run with Swiftest HELIO. For details on how to generate, run, and analyze this example, +see the Swiftest User Manual. \ No newline at end of file diff --git a/examples/helio_gr_test/helio_gr_test.py b/examples/helio_gr_test/helio_gr_test.py index a416fbdd1..feaf32f49 100644 --- a/examples/helio_gr_test/helio_gr_test.py +++ b/examples/helio_gr_test/helio_gr_test.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + """ Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh This file is part of Swiftest. @@ -9,7 +11,6 @@ If not, see: https://www.gnu.org/licenses. """ -#!/usr/bin/env python3 """ Generates and runs two sets of Swiftest input files from initial conditions with the helio integrator. All simulation outputs for the general relativity run are stored in the /gr subdirectory while all simulation outputs for the run @@ -30,11 +31,7 @@ Each subdirecotry contains: data.nc : A NetCDF file containing the simulation output. -dump_bin1.nc : A NetCDF file containing the necessary inputs to restart a simulation from t!=0. -dump_bin2.nc : A NetCDF file containing the necessary inputs to restart a simulation from t!=0. init_cond.nc : A NetCDF file containing the initial conditions for the simulation. -dump_param1.in : An ASCII file containing the necessary parameters to restart a simulation. -dump_param2.in : An ASCII file containing the necessary parameters to restart a simulation. param.in : An ASCII file containing the parameters for the simulation. swiftest.log : An ASCII file containing the information on the status of the simulation as it runs. """ diff --git a/examples/solar_impact/.gitignore b/examples/solar_impact/.gitignore index bb6bbd922..5148ba3a2 100644 --- a/examples/solar_impact/.gitignore +++ b/examples/solar_impact/.gitignore @@ -1,3 +1,4 @@ * !.gitignore !sundiver.py +!README.txt diff --git a/examples/solar_impact/README.txt b/examples/solar_impact/README.txt new file mode 100644 index 000000000..fe8cc1e80 --- /dev/null +++ b/examples/solar_impact/README.txt @@ -0,0 +1,22 @@ +Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh +This file is part of Swiftest. +Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License +as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with Swiftest. +If not, see: https://www.gnu.org/licenses. + +README.txt + +Swiftest Example : solar_impact +Author : David Minton and Carlisle Wishard +Date : December 6, 2022 + +Included in the solar_impact example directory are the following files: + + - README.txt : This file + - sundiver.py : A Python Script that generates and runs a set of initial conditions. + +This example is intended to be run with Swiftest SyMBA. For details on how to generate, run, and analyze this example, +see the Swiftest User Manual. \ No newline at end of file diff --git a/examples/solar_impact/sundiver.py b/examples/solar_impact/sundiver.py index e3b24e077..66ba3f0c8 100644 --- a/examples/solar_impact/sundiver.py +++ b/examples/solar_impact/sundiver.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + """ Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh This file is part of Swiftest. @@ -9,7 +11,23 @@ If not, see: https://www.gnu.org/licenses. """ -#!/usr/bin/env python3 +""" +Generates and runs a set of Swiftest input files from initial conditions with the SyMBA integrator. All simulation +outputs are stored in the /simdata subdirectory. + +Input +------ +None. + +Output +------ +data.nc : A NetCDF file containing the simulation output. +collisions.log : An ASCII file containing the information of any collisional events that occured. +init_cond.nc : A NetCDF file containing the initial conditions for the simulation. +param.in : An ASCII file containing the parameters for the simulation. +swiftest.log : An ASCII file containing the information on the status of the simulation as it runs. +""" + import swiftest import numpy as np diff --git a/examples/whm_gr_test/.gitignore b/examples/whm_gr_test/.gitignore index 1463c046c..738e3fe63 100644 --- a/examples/whm_gr_test/.gitignore +++ b/examples/whm_gr_test/.gitignore @@ -1,3 +1,4 @@ * !.gitignore -!whm_gr_test.py \ No newline at end of file +!whm_gr_test.py +!README.txt diff --git a/examples/whm_gr_test/README.txt b/examples/whm_gr_test/README.txt new file mode 100644 index 000000000..82549c927 --- /dev/null +++ b/examples/whm_gr_test/README.txt @@ -0,0 +1,22 @@ +Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh +This file is part of Swiftest. +Swiftest is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License +as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +Swiftest is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. +You should have received a copy of the GNU General Public License along with Swiftest. +If not, see: https://www.gnu.org/licenses. + +README.txt + +Swiftest Example : whm_gr_test +Author : David Minton and Carlisle Wishard +Date : December 6, 2022 + +Included in the whm_gr_test example directory are the following files: + + - README.txt : This file + - whm_gr_test.py : A Python Script that generates and runs a set of initial conditions. + +This example is intended to be run with Swiftest WHM. For details on how to generate, run, and analyze this example, +see the Swiftest User Manual. \ No newline at end of file diff --git a/examples/whm_gr_test/whm_gr_test.py b/examples/whm_gr_test/whm_gr_test.py index e3feb9aaf..68e368553 100644 --- a/examples/whm_gr_test/whm_gr_test.py +++ b/examples/whm_gr_test/whm_gr_test.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + """ Copyright 2023 - David Minton, Carlisle Wishard, Jennifer Pouplin, Jake Elliott, & Dana Singh This file is part of Swiftest. @@ -9,7 +11,6 @@ If not, see: https://www.gnu.org/licenses. """ -#!/usr/bin/env python3 """ Generates and runs two sets of Swiftest input files from initial conditions with the WHM integrator. All simulation outputs for the general relativity run are stored in the /gr subdirectory while all simulation outputs for the run @@ -31,11 +32,7 @@ Each subdirecotry contains: data.nc : A NetCDF file containing the simulation output. -dump_bin1.nc : A NetCDF file containing the necessary inputs to restart a simulation from t!=0. -dump_bin2.nc : A NetCDF file containing the necessary inputs to restart a simulation from t!=0. init_cond.nc : A NetCDF file containing the initial conditions for the simulation. -dump_param1.in : An ASCII file containing the necessary parameters to restart a simulation. -dump_param2.in : An ASCII file containing the necessary parameters to restart a simulation. param.in : An ASCII file containing the parameters for the simulation. swiftest.log : An ASCII file containing the information on the status of the simulation as it runs. """ diff --git a/src/collision/collision_regime.f90 b/src/collision/collision_regime.f90 index 14d1286e1..29f4f60c4 100644 --- a/src/collision/collision_regime.f90 +++ b/src/collision/collision_regime.f90 @@ -186,7 +186,7 @@ subroutine collision_regime_LS12_SI(Mcb, m1, m2, rad1, rad2, rh1, rh2, vb1, vb2, real(DP) :: a1, alpha, aint, b, bcrit, c_star, egy, zeta, l, lint, mu, phi, theta, ke, pe real(DP) :: Qr, Qrd_pstar, Qr_erosion, Qr_supercat real(DP) :: Vhr, Verosion, Vescp, Vhill, Vimp, Vsupercat - real(DP) :: Mint, Mtot, Mtmp + real(DP) :: Mint, Mtot, Mtmp, Mbig, Msmall real(DP) :: Rp, rhill real(DP) :: Mresidual real(DP) :: U_binding @@ -279,11 +279,14 @@ subroutine collision_regime_LS12_SI(Mcb, m1, m2, rad1, rad2, rh1, rh2, vb1, vb2, if (regime == COLLRESOLVE_REGIME_SUPERCATASTROPHIC) then Mlr = max(Mtot * 0.1_DP * (Qr / (Qrd_pstar * SUPERCAT_QRATIO))**(ETA), min_mfrag) !LS12 eq (44) + else if (regime == COLLRESOLVE_REGIME_HIT_AND_RUN) then + Mlr = m1 else Mlr = max((1.0_DP - Qr / Qrd_pstar / 2.0_DP) * Mtot, min_mfrag) ! [kg] # LS12 eq (5) end if - - Mslr_hitandrun = max(calc_Qrd_rev(m2, m1, Mint, den1, den2, Vimp, c_star), min_mfrag) + Mbig = max(m1,Mlr) + Msmall = mtot - Mbig + Mslr_hitandrun = max(calc_Qrd_rev(Msmall, Mbig, Mint, den1, den2, Vimp, c_star), min_mfrag) if (regime == COLLRESOLVE_REGIME_HIT_AND_RUN ) then Mslr = Mslr_hitandrun else diff --git a/src/fraggle/fraggle_generate.f90 b/src/fraggle/fraggle_generate.f90 index 7de02ef09..db4b82fba 100644 --- a/src/fraggle/fraggle_generate.f90 +++ b/src/fraggle/fraggle_generate.f90 @@ -52,6 +52,8 @@ module subroutine fraggle_generate(self, nbody_system, param, t) write(*,*) "Error in swiftest_collision, unrecognized collision regime" call base_util_exit(FAILURE) end select + call collision_io_collider_message(pl, impactors%id, message) + call swiftest_io_log_one_message(COLLISION_LOG_OUT, trim(adjustl(message))) call self%set_mass_dist(param) call self%disrupt(nbody_system, param, t, lfailure) if (lfailure) then @@ -266,12 +268,15 @@ module subroutine fraggle_generate_hitandrun(self, nbody_system, param, t) end if call self%set_mass_dist(param) message = "Hit and run between" + call collision_io_collider_message(nbody_system%pl, impactors%id, message) call swiftest_io_log_one_message(COLLISION_LOG_OUT, trim(adjustl(message))) - - ! Generate the position and velocity distributions of the fragments - call self%disrupt(nbody_system, param, t, lpure) + if (self%fragments%nbody > 2) then ! Hit and run with disruption + call self%disrupt(nbody_system, param, t, lpure) + else + lpure = .true. + end if if (lpure) then ! Disruption failed to find a solution. Convert to pure hit and run - call swiftest_io_log_one_message(COLLISION_LOG_OUT, "Disruptive hit and run failed to converge on a solution. Converting to pure hit and run. No new fragments generated.") + call swiftest_io_log_one_message(COLLISION_LOG_OUT, "Pure hit and run. No new fragments generated.") call self%collision_basic%hitandrun(nbody_system, param, t) return end if @@ -311,12 +316,13 @@ module subroutine fraggle_generate_pos_vec(collider, nbody_system, param, lfailu ! Internals real(DP) :: dis, direction, rdistance real(DP), dimension(NDIM,2) :: fragment_cloud_center + real(DP), dimension(NDIM) :: rwalk real(DP), dimension(2) :: fragment_cloud_radius logical, dimension(collider%fragments%nbody) :: loverlap real(DP), dimension(collider%fragments%nbody) :: mass_rscale, phi, theta, u integer(I4B) :: i, j, loop, istart logical :: lsupercat, lhitandrun - integer(I4B), parameter :: MAXLOOP = 200 + integer(I4B), parameter :: MAXLOOP = 100 real(DP), parameter :: rdistance_scale_factor = 1.0_DP ! Scale factor to apply to distance scaling of cloud centers in the event of overlap ! The distance is chosen to be close to the original locations of the impactors ! but far enough apart to prevent a collisional cascade between fragments @@ -335,33 +341,44 @@ module subroutine fraggle_generate_pos_vec(collider, nbody_system, param, lfailu ! Place the first two bodies at the centers of the two fragment clouds, but be sure they are sufficiently far apart to avoid overlap loverlap(:) = .true. if (lhitandrun) then - rdistance = impactors%radius(2) + rdistance = 1.0_DP else if (lsupercat) then rdistance = 0.5_DP * sum(impactors%radius(:)) else rdistance = 2 * impactors%radius(2) end if - ! Give the fragment positions a random value that is scaled with fragment mass so that the more massive bodies tend to be closer to the impact point - ! Later, velocities will be scaled such that the farther away a fragment is placed from the impact point, the higher will its velocity be. - call random_number(mass_rscale) - mass_rscale(:) = (mass_rscale(:) + 1.0_DP) / 2 - mass_rscale(:) = mass_rscale(:) * (fragments%mtot / fragments%mass(1:nfrag))**(0.125_DP) ! The power is arbitrary. It just gives the velocity a small mass dependence - mass_rscale(:) = mass_rscale(:) / maxval(mass_rscale(:)) + + if (lhitandrun) then + mass_rscale(:) = 1.0_DP + else + ! Give the fragment positions a random value that is scaled with fragment mass so that the more massive bodies tend to be closer to the impact point + ! Later, velocities will be scaled such that the farther away a fragment is placed from the impact point, the higher will its velocity be. + call random_number(mass_rscale) + mass_rscale(:) = (mass_rscale(:) + 1.0_DP) / 2 + mass_rscale(:) = mass_rscale(:) * (fragments%mtot / fragments%mass(1:nfrag))**(0.125_DP) ! The power is arbitrary. It just gives the velocity a small mass dependence + mass_rscale(:) = mass_rscale(:) / maxval(mass_rscale(:)) + end if istart = 3 do loop = 1, MAXLOOP if (.not.any(loverlap(:))) exit if (lhitandrun) then ! Keep the target unchanged and place the largest fragment at rdistance away from the projectile along its trajectory - fragment_cloud_radius(:) = impactors%radius(:) - fragment_cloud_center(:,1) = impactors%rc(:,1) - fragment_cloud_center(:,2) = impactors%rc(:,2) + rdistance * impactors%bounce_unit(:) + fragment_cloud_radius(1) = rbuffer * max(fragments%radius(1), impactors%radius(1)) + fragment_cloud_radius(2) = rbuffer * max(fragments%radius(2), impactors%radius(2)) + ! Initialize the largest body at the original target body position + fragments%rc(:,1) = impactors%rc(:,1) + ! Ensure that the second largest body does not overlap (including the buffer). Otherwise, shift it downrange + dis = max(1.00001_DP * sum(fragment_cloud_radius(1:2)) - .mag.(impactors%rc(:,2) - impactors%rc(:,1)), 0.0_DP) + fragments%rc(:,2) = impactors%rc(:,2) + dis * impactors%bounce_unit(:) + fragment_cloud_center(:,1) = fragments%rc(:,1) + fragment_cloud_center(:,2) = fragments%rc(:,2) + sum(fragment_cloud_radius(1:2)) * rdistance * impactors%bounce_unit(:) else ! Keep the first and second bodies at approximately their original location, but so as not to be overlapping fragment_cloud_center(:,1) = impactors%rcimp(:) - rbuffer * max(fragments%radius(1),impactors%radius(1)) * impactors%y_unit(:) fragment_cloud_center(:,2) = impactors%rcimp(:) + rbuffer * max(fragments%radius(2),impactors%radius(2)) * impactors%y_unit(:) fragment_cloud_radius(:) = cloud_size_scale_factor * rdistance + fragments%rc(:,1) = fragment_cloud_center(:,1) + fragments%rc(:,2) = fragment_cloud_center(:,2) end if - fragments%rc(:,1) = fragment_cloud_center(:,1) - fragments%rc(:,2) = fragment_cloud_center(:,2) do i = 1, nfrag if (loverlap(i)) then @@ -400,11 +417,11 @@ module subroutine fraggle_generate_pos_vec(collider, nbody_system, param, lfailu ! when the rest are not, we will randomly walk their position in space so as not to move them too far from their starting position if (all(.not.loverlap(istart:nfrag)) .and. any(loverlap(1:istart-1))) then do concurrent(i = 1:istart-1,loverlap(i)) - dis = 0.1_DP * fragments%radius(i) - fragments%rmag(i) = dis * u(i)**(THIRD) - fragments%rc(1,i) = fragments%rmag(i) * sin(theta(i)) * cos(phi(i)) - fragments%rc(2,i) = fragments%rmag(i) * sin(theta(i)) * sin(phi(i)) - fragments%rc(3,i) = fragments%rmag(i) * cos(theta(i)) + dis = 0.1_DP * fragments%radius(i) * u(i)**(THIRD) + rwalk(1) = fragments%rmag(i) * sin(theta(i)) * cos(phi(i)) + rwalk(2) = fragments%rmag(i) * sin(theta(i)) * sin(phi(i)) + rwalk(3) = fragments%rmag(i) * cos(theta(i)) + fragments%rc(:,i) = fragments%rc(:,i) + rwalk(:) end do end if @@ -417,7 +434,6 @@ module subroutine fraggle_generate_pos_vec(collider, nbody_system, param, lfailu do i = j + 1, nfrag dis = .mag.(fragments%rc(:,j) - fragments%rc(:,i)) loverlap(i) = loverlap(i) .or. (dis <= rbuffer * (fragments%radius(i) + fragments%radius(j))) - loverlap(j) = loverlap(j) .or. (dis <= rbuffer * (fragments%radius(i) + fragments%radius(j))) end do ! Check for overlaps with existing bodies that are not involved in the collision do i = 1, npl @@ -455,14 +471,41 @@ module subroutine fraggle_generate_rot_vec(collider, nbody_system, param) class(collision_fraggle), intent(inout) :: collider !! Fraggle collision system object class(swiftest_nbody_system), intent(inout) :: nbody_system !! Swiftest nbody system object class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters + ! Internals + integer(I4B) :: i + real(DP), parameter :: frag_rot_fac = 0.1_DP ! Fraction of projectile rotation magnitude to add as random noise to fragment rotation + real(DP) :: mass_fac + real(DP), dimension(NDIM) :: drot, dL + integer(I4B), parameter :: MAXLOOP = 10 associate(fragments => collider%fragments, impactors => collider%impactors, nfrag => collider%fragments%nbody) ! Initialize fragment rotations and velocities to be pre-impact rotation for body 1, and randomized for bodies >1 and scaled to the original rotation. ! This will get updated later when conserving angular momentum - fragments%rot(:,1) = impactors%rot(:,1) + mass_fac = fragments%mass(1) / impactors%mass(1) + fragments%rot(:,1) = mass_fac**(5.0_DP/3.0_DP) * impactors%rot(:,1) + + ! If mass was added, also add spin angular momentum + if (mass_fac > 1.0_DP) then + dL(:) = (fragments%mass(1) - impactors%mass(1)) * (impactors%rc(:,2) - impactors%rc(:,1)) .cross. (impactors%vc(:,2) - impactors%vc(:,1)) + drot(:) = dL(:) / (fragments%mass(1) * fragments%radius(1)**2 * fragments%Ip(3,1)) + ! Check to make sure we haven't broken the spin barrier. Reduce the rotation change if so + do i = 1, MAXLOOP + if (.mag.(fragments%rot(:,1) + drot(:)) < collider%max_rot) exit + if (i == MAXLOOP) drot(:) = 0.0_DP + where(drot(:) > TINY(1.0_DP)) + drot(:) = drot(:) / 2 + elsewhere + drot(:) = 0.0_DP + endwhere + end do + fragments%rot(:,1) = fragments%rot(:,1) + drot(:) + end if call random_number(fragments%rot(:,2:nfrag)) - fragments%rot(:,2:nfrag) = fragments%rot(:,2:nfrag) * .mag.impactors%rot(:,2) + do concurrent (i = 2:nfrag) + mass_fac = fragments%mass(i) / impactors%mass(2) + fragments%rot(:,i) = mass_fac**(5.0_DP/3.0_DP) * impactors%rot(:,2) + 2 * (fragments%rot(:,i) - 1.0_DP) * frag_rot_fac * .mag.impactors%rot(:,2) + end do fragments%rotmag(:) = .mag.fragments%rot(:,:) end associate @@ -484,22 +527,24 @@ module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailu class(swiftest_parameters), intent(inout) :: param !! Current run configuration parameters logical, intent(out) :: lfailure !! Did the velocity computation fail? ! Internals - real(DP), parameter :: ENERGY_SUCCESS_METRIC = 1.0e-4_DP !! Relative energy error to accept as a success (success also must be energy-losing in addition to being within the metric amount) + real(DP), parameter :: ENERGY_SUCCESS_METRIC = 1.0e-3_DP !! Relative energy error to accept as a success (success also must be energy-losing in addition to being within the metric amount) real(DP) :: MOMENTUM_SUCCESS_METRIC = 10*epsilon(1.0_DP) !! Relative angular momentum error to accept as a success (should be *much* stricter than energy) integer(I4B) :: i, j, loop, try, istart, nfrag, nsteps, nsteps_best logical :: lhitandrun, lsupercat real(DP), dimension(NDIM) :: vimp_unit, rimp, vrot, L_residual, L_residual_unit, L_residual_best, dL, drot, rot_new, dL_metric - real(DP) :: vimp, vmag, vesc, dE, E_residual, E_residual_best, E_residual_last, ke_min, ke_avail, ke_remove, dE_best, fscale, dE_metric, mfrag, rn + real(DP) :: vimp, vmag, vesc, dE, E_residual, E_residual_best, E_residual_last, ke_avail, ke_remove, dE_best, fscale, dE_metric, mfrag, rn, dL1_mag, dE_conv integer(I4B), dimension(collider%fragments%nbody) :: vsign real(DP), dimension(collider%fragments%nbody) :: vscale - real(DP), parameter :: L_ROT_VEL_RATIO = 0.2_DP ! Ratio of angular momentum to put into rotation relative to velocity shear of fragments + real(DP), dimension(collider%fragments%nbody) :: dLi_mag + real(DP), parameter :: L_ROT_VEL_RATIO = 0.5_DP ! Ratio of angular momentum to put into rotation relative to velocity shear of fragments ! For the initial "guess" of fragment velocities, this is the minimum and maximum velocity relative to escape velocity that the fragments will have + real(DP), parameter :: hitandrun_vscale = 0.25_DP real(DP) :: vmin_guess real(DP) :: vmax_guess real(DP) :: delta_v, GC integer(I4B), parameter :: MAXINNER = 100 integer(I4B), parameter :: MAXOUTER = 10 - integer(I4B), parameter :: MAXANGMTM = 10000 + integer(I4B), parameter :: MAXANGMTM = 1000 class(collision_fraggle), allocatable :: collider_local character(len=STRMAX) :: message @@ -529,16 +574,17 @@ module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailu end if ! The minimum fragment velocity will be set by the escape velocity + vimp = .mag. (impactors%vc(:,2) - impactors%vc(:,1)) + vesc = sqrt(2 * sum(fragments%Gmass(istart:nfrag)) / sum(fragments%radius(istart:nfrag))) if (lhitandrun) then - vesc = sqrt(2 * impactors%Gmass(2) / impactors%radius(2)) + vmin_guess = .mag.impactors%vc(:,2) - vimp * hitandrun_vscale + vmax_guess = .mag.impactors%vc(:,2) + vimp * hitandrun_vscale else vesc = sqrt(2 * sum(impactors%Gmass(:)) / sum(impactors%radius(:))) + vmin_guess = 1.001_DP * vesc + vmax_guess = vimp end if - vimp = .mag. (impactors%vc(:,2) - impactors%vc(:,1)) - vmax_guess = 1.1_DP * vimp - vmin_guess = 1.001_DP * vesc - E_residual_best = huge(1.0_DP) lfailure = .false. dE_metric = huge(1.0_DP) @@ -548,27 +594,27 @@ module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailu outer: do try = 1, MAXOUTER ! Scale the magnitude of the velocity by the distance from the impact point ! This will reduce the chances of fragments colliding with each other immediately, and is more physically correct - do concurrent(i = 2:nfrag) + do concurrent(i = 1:nfrag) rimp(:) = fragments%rc(:,i) - impactors%rcimp(:) - vscale(i) = .mag. rimp(:) / (.mag. (impactors%rb(:,2) - impactors%rb(:,1))) + vscale(i) = .mag. rimp(:) / sum(impactors%radius(1:2)) end do - vscale(1) = 0.9_DP * minval(vscale(2:nfrag)) ! Set the velocity scale factor to span from vmin/vesc to vmax/vesc - vscale(:) = vscale(:)/minval(vscale(:)) - fscale = log(vmax_guess - vmin_guess + 1.0_DP) / log(maxval(vscale(:))) - vscale(:) = vscale(:)**fscale + vmin_guess - 1.0_DP + if (nfrag == 2) then + vscale(:) = 1.0_DP + else + vscale(:) = vscale(:)/minval(vscale(:)) + fscale = log(vmax_guess - vmin_guess + 1.0_DP) / log(maxval(vscale(:))) + vscale(:) = vscale(:)**fscale + vmin_guess - 1.0_DP + end if ! Set the velocities of all fragments using all of the scale factors determined above - do concurrent(i = 1:nfrag) + if (istart > 1) fragments%vc(:,1) = impactors%vc(:,1) * impactors%mass(1) / fragments%mass(1) + do concurrent(i = istart:nfrag) j = fragments%origin_body(i) vrot(:) = impactors%rot(:,j) .cross. (fragments%rc(:,i) - impactors%rc(:,j)) if (lhitandrun) then - if (i ==1) then - fragments%vc(:,i) = impactors%vc(:,1) - else - fragments%vc(:,i) = vsign(i) * impactors%bounce_unit(:) * vscale(i) - end if + fragments%vc(:,i) = vsign(i) * impactors%bounce_unit(:) * vscale(i) + vrot(:) else vmag = vscale(i) rimp(:) = fragments%rc(:,i) - impactors%rcimp(:) @@ -581,48 +627,59 @@ module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailu ! Every time the collision-frame velocities are altered, we need to be sure to shift everything back to the center-of-mass frame call collision_util_shift_vector_to_origin(fragments%mass, fragments%vc) call fragments%set_coordinate_system() - ke_min = 0.5_DP * fragments%mtot * vesc**2 E_residual = huge(1.0_DP) inner: do loop = 1, MAXINNER nsteps = nsteps + 1 + mfrag = sum(fragments%mass(istart:nfrag)) ! Try to put residual angular momentum into the spin, but if this would go past the spin barrier, then put it into velocity shear instead + call collider_local%get_energy_and_momentum(nbody_system, param, phase="after") + L_residual(:) = (collider_local%L_total(:,2) - collider_local%L_total(:,1)) + L_residual_unit(:) = .unit. L_residual(:) + + ! Use equipartition of spin kinetic energy to distribution spin angular momentum + do concurrent(i = istart:nfrag) + dLi_mag(i) = ((fragments%mass(i) / fragments%mass(istart)) * & + (fragments%radius(i) / fragments%radius(istart))**2 * & + (fragments%Ip(3,i) / fragments%Ip(3,istart)))**(1.5_DP) + end do + dL1_mag = .mag.L_residual(:) / sum(dLi_mag(istart:nfrag)) + + do i = istart,nfrag + dL(:) = -dL1_mag * dLi_mag(i) * L_residual_unit(:) + drot(:) = L_ROT_VEL_RATIO * dL(:) / (fragments%mass(i) * fragments%Ip(3,i) * fragments%radius(i)**2) + rot_new(:) = fragments%rot(:,i) + drot(:) + if (.mag.rot_new(:) < collider_local%max_rot) then + fragments%rot(:,i) = rot_new(:) + fragments%rotmag(i) = .mag.fragments%rot(:,i) + else ! We would break the spin barrier here. Put less into spin and more into velocity shear. + call random_number(drot) + call random_number(rn) + drot(:) = (rn * collider_local%max_rot - fragments%rotmag(i)) * 2 * (drot(:) - 0.5_DP) + fragments%rot(:,i) = fragments%rot(:,i) + drot(:) + fragments%rotmag(i) = .mag.fragments%rot(:,i) + if (fragments%rotmag(i) > collider%max_rot) then + fragments%rotmag(i) = 0.5_DP * collider%max_rot + fragments%rot(:,i) = fragments%rotmag(i) * .unit. fragments%rot(:,i) + end if + end if + L_residual(:) = L_residual(:) - drot(:) * fragments%Ip(3,i) * fragments%mass(i) * fragments%radius(i)**2 + end do + + ! Put any remaining residual into velocity shear angmtm: do j = 1, MAXANGMTM call collider_local%get_energy_and_momentum(nbody_system, param, phase="after") L_residual(:) = (collider_local%L_total(:,2) - collider_local%L_total(:,1)) dL_metric(:) = abs(L_residual(:)) / .mag.(collider_local%L_total(:,1)) / MOMENTUM_SUCCESS_METRIC if (all(dL_metric(:) <= 1.0_DP)) exit angmtm - L_residual_unit(:) = .unit. L_residual(:) - do i = fragments%nbody,1,-1 - mfrag = sum(fragments%mass(i:fragments%nbody)) - drot(:) = -L_ROT_VEL_RATIO * L_residual(:) / (fragments%mtot * fragments%Ip(3,i) * fragments%radius(i)**2) - rot_new(:) = fragments%rot(:,i) + drot(:) - if (.mag.rot_new(:) < collider_local%max_rot) then - fragments%rot(:,i) = rot_new(:) - fragments%rotmag(i) = .mag.fragments%rot(:,i) - else ! We would break the spin barrier here. Put less into spin and more into velocity shear. - if (i >= istart) then - call random_number(drot) - call random_number(rn) - drot(:) = (rn * collider_local%max_rot - fragments%rotmag(i)) * 2 * (drot(:) - 0.5_DP) - fragments%rot(:,i) = fragments%rot(:,i) + drot(:) - fragments%rotmag(i) = .mag.fragments%rot(:,i) - if (fragments%rotmag(i) > collider%max_rot) then - fragments%rotmag(i) = 0.5_DP * collider%max_rot - fragments%rot(:,i) = fragments%rotmag(i) * .unit. fragments%rot(:,i) - end if - else - drot(:) = 0.0_DP - end if - end if - - dL(:) = -L_residual(:) * fragments%mass(i) / fragments%mtot - drot(:) * fragments%Ip(3,i) * fragments%mass(i) * fragments%radius(i)**2 + + do i = istart, nfrag + dL(:) = -L_residual(:) * fragments%mass(i) / sum(fragments%mass(istart:nfrag)) call collision_util_velocity_torque(dL, fragments%mass(i), fragments%rc(:,i), fragments%vc(:,i)) call collision_util_shift_vector_to_origin(fragments%mass, fragments%vc) fragments%vmag(i) = .mag.fragments%vc(:,i) - end do end do angmtm @@ -636,6 +693,7 @@ module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailu L_residual(:) = (collider_local%L_total(:,2) - collider_local%L_total(:,1)) dL_metric(:) = abs(L_residual(:)) / .mag.collider_local%L_total(:,1) / MOMENTUM_SUCCESS_METRIC + dE_conv = abs(E_residual - E_residual_last) / abs(E_residual_last) ! Check if we've converged on our constraints if (all(dL_metric(:) <= 1.0_DP)) then @@ -648,10 +706,9 @@ module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailu if (allocated(collider%fragments)) deallocate(collider%fragments) allocate(collider%fragments, source=fragments) dE_metric = abs(E_residual) / impactors%Qloss - else if (abs(E_residual) >= abs(E_residual_last)) then - exit inner ! We are no longer converging on a solution. At this point, it's best to give up end if if ((dE_best < 0.0_DP) .and. (dE_metric <= ENERGY_SUCCESS_METRIC * try)) exit outer ! As the tries increase, we relax the success metric. What was once a failure might become a success + if (dE_conv < ENERGY_SUCCESS_METRIC * try) exit inner end if ! Remove a constant amount of velocity from the bodies so we don't shift the center of mass and screw up the momentum @@ -685,7 +742,7 @@ module subroutine fraggle_generate_vel_vec(collider, nbody_system, param, lfailu vmin_guess = vmin_guess + delta_v vmax_guess = vmax_guess - delta_v end do outer - lfailure = (dE_best > 0.0_DP) + lfailure = lfailure .or. (dE_best > 0.0_DP) write(message, *) nsteps if (lfailure) then diff --git a/src/fraggle/fraggle_util.f90 b/src/fraggle/fraggle_util.f90 index 68e629338..e8647d589 100644 --- a/src/fraggle/fraggle_util.f90 +++ b/src/fraggle/fraggle_util.f90 @@ -30,7 +30,7 @@ module subroutine fraggle_util_set_mass_dist(self, param) real(DP), parameter :: BETA = 2.85_DP integer(I4B), parameter :: MASS_NOISE_FACTOR = 4 !! The number of digits of random noise that get added to the minimum mass value to prevent identical masses from being generated in a single run integer(I4B), parameter :: NFRAGMAX = 100 !! Maximum number of fragments that can be generated - integer(I4B), parameter :: NFRAGMIN = 7 !! Minimum number of fragments that can be generated (set by the fraggle_generate algorithm for constraining momentum and energy) + integer(I4B), parameter :: NFRAGMIN = 1 !! Minimum number of fragments that can be generated (set by the fraggle_generate algorithm for constraining momentum and energy) integer(I4B), parameter :: NFRAG_SIZE_MULTIPLIER = 3 !! Log-space scale factor that scales the number of fragments by the collisional system mass integer(I4B), parameter :: iMlr = 1 integer(I4B), parameter :: iMslr = 2 @@ -76,15 +76,19 @@ module subroutine fraggle_util_set_mass_dist(self, param) nfrag = NFRAGMAX end select - i = iMrem mremaining = impactors%mass_dist(iMrem) - do while (i <= nfrag) - mfrag = (1 + i - iMslr)**(-3._DP / BETA) * impactors%mass_dist(iMslr) - if (mremaining - mfrag < 0.0_DP) exit - mremaining = mremaining - mfrag - i = i + 1 - end do - if (i < nfrag) nfrag = max(i, NFRAGMIN) ! The sfd would actually give us fewer fragments than our maximum + if (mremaining > 0.0_DP) then + i = iMrem + do while (i <= nfrag) + mfrag = max((1 + i - iMslr)**(-3._DP / BETA) * impactors%mass_dist(iMslr), min_mfrag) + if (mremaining - mfrag <= 0.0_DP) exit + mremaining = mremaining - mfrag + i = i + 1 + end do + else + i = iMrem - 1 + end if + nfrag = i call self%setup_fragments(nfrag) case (COLLRESOLVE_REGIME_MERGE, COLLRESOLVE_REGIME_GRAZE_AND_MERGE) @@ -113,7 +117,9 @@ module subroutine fraggle_util_set_mass_dist(self, param) ! Distribute the remaining mass the 3:nfrag bodies following the model SFD given by slope BETA mremaining = impactors%mass_dist(iMrem) do i = iMrem, nfrag - mfrag = (1 + i - iMslr)**(-3._DP / BETA) * impactors%mass_dist(iMslr) + call random_number(mass_noise) + mass_noise = 1.0_DP + mass_noise * epsilon(1.0_DP) * 10**(MASS_NOISE_FACTOR) + mfrag = max((1 + i - iMslr)**(-3._DP / BETA) * impactors%mass_dist(iMslr), min_mfrag) * mass_noise mass(i) = mfrag mremaining = mremaining - mfrag end do @@ -134,8 +140,7 @@ module subroutine fraggle_util_set_mass_dist(self, param) ! Sort the distribution in descending order by mass so that the largest fragment is always the first call swiftest_util_sort(-mass, ind) call swiftest_util_sort_rearrange(mass, ind, nfrag) - fragments%mass(:) = mass(:) - deallocate(mass) + call move_alloc(mass, fragments%mass) fragments%Gmass(:) = G * fragments%mass(:)