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

Commit

Permalink
Updated Chambers 2013 script to use default simdir
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Jan 6, 2023
1 parent 056bcbe commit 9ac43be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/Chambers2013/aescattermovie.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def update(self,frame):
self.s3 = s[3]
return self.s0, self.s1, self.s2, self.s3, self.title,

sim = swiftest.Simulation(simdir="fragglesim",read_old_output=True)
sim = swiftest.Simulation(read_old_output=True)
print('Making animation')
anim = AnimatedScatter(sim.data,sim.param)
print('Animation finished')
6 changes: 2 additions & 4 deletions examples/Chambers2013/init_cond.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
from numpy.random import default_rng

# Initialize simulation object
sim = swiftest.Simulation(simdir="fragglesim")

sim.set_parameter(compute_conservation_values=True, rotation=True, init_cond_format="EL",collision_model="fraggle",encounter_save="none")
sim = swiftest.Simulation(compute_conservation_values=True, rotation=True, init_cond_format="EL",collision_model="fraggle",encounter_save="none")

# Add bodies described in Chambers (2013) Sec. 2.1, with the uniform spatial distribution and two bodies sizes (big and small)
Nb = 14
Expand All @@ -18,7 +16,7 @@
Rs = (3 * Ms / (4 * np.pi * dens) )**(1.0 / 3.0)
mtiny = 1e-2 * Ms
mininum_fragment_mass = 1e-4 * Ms
rng = default_rng(seed=880334)
rng = default_rng(seed=170834)

# Define the initial orbital elements of the big and small bodies
avalb = rng.uniform(0.3, 2.0, Nb)
Expand Down

0 comments on commit 9ac43be

Please sign in to comment.