Skip to content

Commit

Permalink
Update planetary_system.py (#955)
Browse files Browse the repository at this point in the history
  • Loading branch information
rieder committed Apr 28, 2023
1 parent 913c28c commit 14427d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/textbook/planetary_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ def main(Mstar, Ndisk, fmdisk, Rmin, Rmax, t_end, n_steps):
filename = "planetary_system_i{0:04}.amuse".format(index)
write_set_to_file(star_and_planets, filename, 'amuse',
attribute_names=planet_attributes,
append_to_file=False)
write_set_to_file(disk, filename, 'amuse', attribute_names=disk_attributes)
overwrite_file=True)
write_set_to_file(disk, filename, 'amuse', attribute_names=disk_attributes, overwrite_file=True)

gravity_hydro = bridge.Bridge(use_threading=False)
gravity_hydro.add_system(gravity, (hydro,) )
Expand Down Expand Up @@ -133,9 +133,9 @@ def main(Mstar, Ndisk, fmdisk, Rmin, Rmax, t_end, n_steps):
filename = "planetary_system_i{0:04}.amuse".format(index)
write_set_to_file(star_and_planets, filename, 'amuse',
attribute_names=planet_attributes,
append_to_file=False)
overwrite_file=True)
write_set_to_file(disk, filename, 'amuse',
attribute_names=disk_attributes)
attribute_names=disk_attributes, overwrite_file=True)

Ekin = gravity_hydro.kinetic_energy
Epot = gravity_hydro.potential_energy
Expand Down

0 comments on commit 14427d1

Please sign in to comment.