Add files via upload

This commit is contained in:
Yaël M
2024-06-21 16:22:42 +02:00
committed by GitHub
parent 86c8c722db
commit d1518894c4

View File

@@ -140,10 +140,10 @@ def create_channels():
def generate_galaxy(stars, params):
galaxy_model = galaxy.MilkyWay_AMUSE()
vc = galaxy_model.vel_circ(stars.center_of_mass().length())
stars.x += params["cluster_position_x"]
stars.y += params["cluster_position_y"]
stars.z += params["cluster_position_z"]
vc = galaxy_model.vel_circ(stars.center_of_mass().length()).in_(u.km * u.s**(-1))
phi = np.arctan2(stars.center_of_mass().y.value_in(u.pc), stars.center_of_mass().x.value_in(u.pc))
stars.vx += - vc * np.sin(phi)
stars.vy += vc * np.cos(phi)