From d1518894c47f2cf192eadd876fc76f0017288cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C3=ABl=20M?= <154762804+Yael-II@users.noreply.github.com> Date: Fri, 21 Jun 2024 16:22:42 +0200 Subject: [PATCH] Add files via upload --- COSMIC/source/COSMIC_v3_init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/COSMIC/source/COSMIC_v3_init.py b/COSMIC/source/COSMIC_v3_init.py index 248b7bd..768b9c3 100644 --- a/COSMIC/source/COSMIC_v3_init.py +++ b/COSMIC/source/COSMIC_v3_init.py @@ -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)