def pot_VCH(d, q1, q2, q3, qz, phi, ra, x, y, z, v): c1, c2, c3 = constants(q1, q2, q3, phi) rA = np.sqrt(x**2 + y**2 + z**2/qz**2) rT = np.sqrt(c1*x**2 + c2*y**2 + c3*x*y + z**2/q3**2) r = (ra + rT)*rA / (ra + rA) pot = v**2 * log(r**2 + d**2) return pot
def pot_VCH(d, q1, q2, q3, qz, phi, ra, x, y, z, v): c1, c2, c3 = constants(q1, q2, q3, phi) rA = np.sqrt(x**2 + y**2 + z**2 / qz**2) rT = np.sqrt(c1 * x**2 + c2 * y**2 + c3 * x * y + z**2 / q3**2) r = (ra + rT) * rA / (ra + rA) pot = v**2 * log(r**2 + d**2) return pot
def pot_LMJ(r_h, q1, q2, qz, phi, x, y, z, v): r_h = r_h * units.kpc z = z * units.kpc x = x * units.kpc y = y * units.kpc v = v * units.km / units.s v = v.to(units.kpc / units.s) C1, C2, C3 = constants(q1, q2, qz, phi) phi = v**2 * np.log(C1*x**2 + C2*y**2 + C3*x*y + (z/qz)**2 + r_h**2) return phi
def pot_LMJ(r_h, q1, q2, qz, phi, x, y, z, v): r_h = r_h * units.kpc z = z * units.kpc x = x * units.kpc y = y * units.kpc v = v * units.km / units.s v = v.to(units.kpc / units.s) C1, C2, C3 = constants(q1, q2, qz, phi) phi = v**2 * np.log(C1 * x**2 + C2 * y**2 + C3 * x * y + (z / qz)**2 + r_h**2) return phi
def vc_LMJ(r_h, q1, q2, qz, phi, x, y, z, v): r_h = r_h * units.kpc z = z * units.kpc x = x * units.kpc y = y * units.kpc v = v * units.km / units.s v = v.to(units.kpc / units.s) C1, C2, C3 = constants(q1, q2, qz, phi) factor = (C1*x**2 + C2*y**2 + C3*x*y + (z**2/qz**2 + r_h**2)) r = np.sqrt(x**2 + y**2 + z**2) vc = v * np.sqrt(r*np.sqrt((2*C1*x + C3*y)**2 + (2*C2*y + C3*x)**2 + (2*z/qz**2)**2) / factor) vc = vc.to(units.km / units.s) return vc
def mass_LMJ(r_h, q1, q2, qz, phi, x, y, z, v): r_h = r_h * units.kpc z = z * units.kpc x = x * units.kpc y = y * units.kpc v = v * units.km / units.s v = v.to(units*kpc / units.s) C1, C2, C3 = constants(q1, q2, qz, phi) r = np.sqrt(x**2 + y**2 + z**2) factor1 = 2*C1*x + C3*y factor2 = 2*C2*y + C3*x factor3 = 2*z/qz**2 factor = (C1*x**2 + C2*y**2 + C3*x*y + (z**2/qz**2 + r_h**2)) M = v**2 * r**2 * (factor1**2 + factor2**2 + factor3**2) / (G * factor) return M
def mass_LMJ(r_h, q1, q2, qz, phi, x, y, z, v): r_h = r_h * units.kpc z = z * units.kpc x = x * units.kpc y = y * units.kpc v = v * units.km / units.s v = v.to(units * kpc / units.s) C1, C2, C3 = constants(q1, q2, qz, phi) r = np.sqrt(x**2 + y**2 + z**2) factor1 = 2 * C1 * x + C3 * y factor2 = 2 * C2 * y + C3 * x factor3 = 2 * z / qz**2 factor = (C1 * x**2 + C2 * y**2 + C3 * x * y + (z**2 / qz**2 + r_h**2)) M = v**2 * r**2 * (factor1**2 + factor2**2 + factor3**2) / (G * factor) return M
def vc_LMJ(r_h, q1, q2, qz, phi, x, y, z, v): r_h = r_h * units.kpc z = z * units.kpc x = x * units.kpc y = y * units.kpc v = v * units.km / units.s v = v.to(units.kpc / units.s) C1, C2, C3 = constants(q1, q2, qz, phi) factor = (C1 * x**2 + C2 * y**2 + C3 * x * y + (z**2 / qz**2 + r_h**2)) r = np.sqrt(x**2 + y**2 + z**2) vc = v * np.sqrt(r * np.sqrt((2 * C1 * x + C3 * y)**2 + (2 * C2 * y + C3 * x)**2 + (2 * z / qz**2)**2) / factor) vc = vc.to(units.km / units.s) return vc
def a_LMJ(r_h, q1, q2, qz, phi, x, y, z, v): r_h = r_h * units.kpc z = z * units.kpc x = x * units.kpc y = y * units.kpc v = v * units.km / units.s v = v.to(units*kpc / units.s) C1, C2, C3 = constants(q1, q2, qz, phi) factor = (C1*x**2 + C2*y**2 + C3*x*y + (z**2/qz**2 + r_h**2)) ax = -v**2 * (2*C1*x + C3*y) / factor ay = -v**2 * (2*C2*y + C3*x) / factor az = -v**2 * (2*z / qz**2) / factor #ax = ax.to(units.km / units.s**2) #ay = ay.to(units.km / units.s**2) #az = az.to(units.km / units.s**2) return ax, ay, az
def a_LMJ(r_h, q1, q2, qz, phi, x, y, z, v): r_h = r_h * units.kpc z = z * units.kpc x = x * units.kpc y = y * units.kpc v = v * units.km / units.s v = v.to(units * kpc / units.s) C1, C2, C3 = constants(q1, q2, qz, phi) factor = (C1 * x**2 + C2 * y**2 + C3 * x * y + (z**2 / qz**2 + r_h**2)) ax = -v**2 * (2 * C1 * x + C3 * y) / factor ay = -v**2 * (2 * C2 * y + C3 * x) / factor az = -v**2 * (2 * z / qz**2) / factor #ax = ax.to(units.km / units.s**2) #ay = ay.to(units.km / units.s**2) #az = az.to(units.km / units.s**2) return ax, ay, az