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)