From c7472ee9b9e454b211ecce30fe676d3ccf2c62e9 Mon Sep 17 00:00:00 2001 From: David A Minton Date: Tue, 6 Dec 2022 13:36:00 -0500 Subject: [PATCH] Put the commented out code back from testing --- examples/Fragmentation/Fragmentation_Movie.py | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/examples/Fragmentation/Fragmentation_Movie.py b/examples/Fragmentation/Fragmentation_Movie.py index 07211cc76..68cdab59b 100644 --- a/examples/Fragmentation/Fragmentation_Movie.py +++ b/examples/Fragmentation/Fragmentation_Movie.py @@ -170,16 +170,15 @@ def data_stream(self, frame=0): for style in movie_styles: movie_filename = f"{style}.mp4" - sim = swiftest.Simulation(simdir=style, read_old_output_file=True) # Pull in the Swiftest output data from the parameter file and store it as a Xarray dataset. - # sim = swiftest.Simulation(simdir=style, rotation=True, init_cond_format = "XV", compute_conservation_values=True) - # sim.add_solar_system_body("Sun") - # sim.add_body(Gmass=body_Gmass[style], radius=body_radius[style], rh=pos_vectors[style], vh=vel_vectors[style]) #, rot=rot_vectors[style]) - # # - # # Set fragmentation parameters - # minimum_fragment_gmass = 0.2 * body_Gmass[style][1] # Make the minimum fragment mass a fraction of the smallest body - # gmtiny = 0.99 * body_Gmass[style][1] # Make GMTINY just smaller than the smallest original body. This will prevent runaway collisional cascades - # sim.set_parameter(fragmentation=True, fragmentation_save="TRAJECTORY", gmtiny=gmtiny, minimum_fragment_gmass=minimum_fragment_gmass, verbose=False) - # sim.run(dt=1e-4, tstop=2.0e-3, istep_out=1, dump_cadence=0) + sim = swiftest.Simulation(simdir=style, rotation=True, init_cond_format = "XV", compute_conservation_values=True) + sim.add_solar_system_body("Sun") + sim.add_body(Gmass=body_Gmass[style], radius=body_radius[style], rh=pos_vectors[style], vh=vel_vectors[style]) #, rot=rot_vectors[style]) # - # anim = AnimatedScatter(sim,movie_filename,movie_titles[style],nskip=1) + # Set fragmentation parameters + minimum_fragment_gmass = 0.2 * body_Gmass[style][1] # Make the minimum fragment mass a fraction of the smallest body + gmtiny = 0.99 * body_Gmass[style][1] # Make GMTINY just smaller than the smallest original body. This will prevent runaway collisional cascades + sim.set_parameter(fragmentation=True, fragmentation_save="TRAJECTORY", gmtiny=gmtiny, minimum_fragment_gmass=minimum_fragment_gmass, verbose=False) + sim.run(dt=1e-4, tstop=2.0e-3, istep_out=1, dump_cadence=0) + + anim = AnimatedScatter(sim,movie_filename,movie_titles[style],nskip=1)