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

Commit

Permalink
Decrased the number of fragments made in the example movie script to …
Browse files Browse the repository at this point in the history
…make it run faster, and rearranged script to make the variable that controls fragment number more obvious.
  • Loading branch information
MintoDA1 authored and MintoDA1 committed Oct 4, 2023
1 parent a057705 commit ba9f088
Showing 1 changed file with 29 additions and 21 deletions.
50 changes: 29 additions & 21 deletions examples/Fragmentation/Fragmentation_Movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,24 @@
Generates and runs a set of Swiftest input files from initial conditions with the SyMBA integrator. All simulation
outputs are stored in the subdirectory named after their collisional regime.
**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.
User selects which collisional movie to generate
Output
------
collisions.log : An ASCII file containing the information of any collisional events that occured.
collisions.nc : A NetCDF file containing the collision output.
data.nc : A NetCDF file containing the simulation output.
encounters.nc : A NetCDF file containing the encounter output.
init_cond.nc : A NetCDF file containing the initial conditions for the simulation.
param.00...0.in : A series of parameter input files containing the parameters for the simulation at every output stage.
param.in : An ASCII file containing the inital parameters for the simulation.
param.restart.in : An ASCII file containing the parameters for the simulation at the last output.
swiftest.log : An ASCII file containing the information on the status of the simulation as it runs.
collision.mp4 : A movie file named after the collisional regime depicting the collision.
Files are stored in directories for each collision type name requested
[COLLISION_TYPE].mp4 : A movie file named after the collisional regime depicting the collision.
"""

Expand All @@ -48,6 +50,22 @@
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 = {"disruption_headon" : 10.0,
"disruption_off_axis" : 10.0,
"supercatastrophic_headon" : 10.0,
"supercatastrophic_off_axis" : 10.0,
"hitandrun_disrupt" : 10.0,
"hitandrun_pure" : 1.0,
"merge" : 1.0,
"merge_spinner" : 1.0,
}



# These initial conditions were generated by trial and error
names = ["Target","Projectile"]
pos_vectors = {"disruption_headon" : [np.array([1.0, -5.0e-05, 0.0]),
Expand Down Expand Up @@ -124,16 +142,6 @@
"merge_spinner" : 5.0e-3,
}

nfrag_reduction = {"disruption_headon" : 1.0,
"disruption_off_axis" : 1.0,
"supercatastrophic_headon" : 1.0,
"supercatastrophic_off_axis" : 10.0,
"hitandrun_disrupt" : 1.0,
"hitandrun_pure" : 1.0,
"merge" : 1.0,
"merge_spinner" : 1.0,
}

density = 3000 * swiftest.AU2M**3 / swiftest.MSun
GU = swiftest.GMSun * swiftest.YR2S**2 / swiftest.AU2M**3
body_radius = body_Gmass.copy()
Expand Down

0 comments on commit ba9f088

Please sign in to comment.