Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Improved the fragmentation movie scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
MintoDA1 authored and MintoDA1 committed Oct 4, 2023
1 parent bf3d684 commit 05101f9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/Fragmentation/Fragmentation_Movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,11 @@ def vec_props(self, c):
# Set fragmentation parameters
minimum_fragment_gmass = 0.01 * body_Gmass[style][1]
gmtiny = 0.50 * body_Gmass[style][1]
sim.set_parameter(collision_model="fraggle", encounter_save="both", gmtiny=gmtiny, minimum_fragment_gmass=minimum_fragment_gmass, nfrag_reduction=nfrag_reduction[style])
sim.set_parameter(collision_model="fraggle",
encounter_save="both",
gmtiny=gmtiny,
minimum_fragment_gmass=minimum_fragment_gmass,
nfrag_reduction=nfrag_reduction[style])
sim.run(dt=5e-4, tstop=tstop[style], istep_out=1, dump_cadence=0)

print("Generating animation")
Expand Down
26 changes: 25 additions & 1 deletion examples/Multibody_Fragmentation/Multibody_Movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@
Generates, runs, and processes a set of initial conditions for a multi-body super-catastrophic distruption collisional event.
All Swiftest output files are stored in the /supercatastrophic_multi subdirectory.
**NOTE: You must have ffmpeg installed on your system before running this script. For instance, on MacOS:
```brew install ffmpeg```
on Ubuntu:
```sudo apt-get install ffmpeg```
Inputs
_______
None.
Expand Down Expand Up @@ -47,6 +56,16 @@
movie_titles = dict(zip(available_movie_styles, movie_title_list))
num_movie_frames = 1000


# ----------------------------------------------------------------------------------------------------------------------
# To increase the number of bodies generated in each collision type, decrease the value of the corresponding nfrag_reduction number
# ----------------------------------------------------------------------------------------------------------------------
nfrag_reduction = {
"supercatastrophic_multi" : 5.0,
}



# These initial conditions were generated by trial and error
names = ["Body1","Body2","Body3","Body4"]

Expand Down Expand Up @@ -287,7 +306,12 @@ def vec_props(self, c):
# Set fragmentation parameters
minimum_fragment_gmass = 0.05 * body_Gmass[style][1]
gmtiny = 0.10 * body_Gmass[style][1]
sim.set_parameter(collision_model="fraggle", encounter_save="both", gmtiny=gmtiny, minimum_fragment_gmass=minimum_fragment_gmass, verbose=False)
sim.set_parameter(collision_model="fraggle",
encounter_save="both",
gmtiny=gmtiny,
minimum_fragment_gmass=minimum_fragment_gmass,
nfrag_reduction=nfrag_reduction[style],
verbose=False)
sim.run(dt=5e-4, tstop=tstop[style], istep_out=1, dump_cadence=0)

print("Generating animation")
Expand Down

0 comments on commit 05101f9

Please sign in to comment.