Exemplo n.º 1
0
def test_compare_kerr_kerrnewman_time_velocity(pos_vec, vel_vec, mass, a01):
    # time velocity for kerr & kerr-newman should be same when Q=0
    a = kerr_utils.scaled_spin_factor(a01,
                                      mass.to(u.kg).value, constant.c.value,
                                      constant.G.value)
    t1 = kerr_utils.kerr_time_velocity(pos_vec, vel_vec, mass, a)
    t2 = kerrnewman_utils.kerrnewman_time_velocity(pos_vec, vel_vec, mass, a,
                                                   0.0 * u.C)
    assert_allclose(t1.value, t2.value, rtol=1e-10)
Exemplo n.º 2
0
def test_compare_kerr_kerrnewman_time_velocity():
    # time velocity for Kerr & Kerr-Newman should be same when Q=0
    pos_vec = np.array([1.0, np.pi / 2, 0.1])
    vel_vec = np.array([-0.1, -0.01, 0.05])
    mass = 1e24 * u.kg
    a01 = 0.85
    a = kerr_utils.scaled_spin_factor(a01, mass.to(u.kg).value)
    t1 = kerr_utils.kerr_time_velocity(pos_vec, vel_vec, mass, a)
    t2 = kerrnewman_utils.kerrnewman_time_velocity(pos_vec, vel_vec, mass, a, 0.0 * u.C)
    assert_allclose(t1.value, t2.value, rtol=1e-10)
Exemplo n.º 3
0
 def __init__(self, pos_vec, vel_vec, time, M, a):
     self.M = M
     self.a = a
     self.pos_vec = pos_vec
     self.vel_vec = vel_vec
     self.time = time
     self.time_vel = kerr_utils.kerr_time_velocity(self.pos_vec,
                                                   self.vel_vec, self.M,
                                                   self.a)
     self.initial_vec = np.hstack(
         (self.time.value, self.pos_vec, self.time_vel.value, self.vel_vec))
     self.schwarzschild_r = scr(M)
Exemplo n.º 4
0
    def __init__(self, bl_coords, M, time):
        self.input_coords = bl_coords
        self.M = M
        self.a = self.input_coords.a.to(u.m)
        self.time = time

        pos_vec, vel_vec = (
            self.input_coords.si_values()[:3],
            self.input_coords.si_values()[3:],
        )
        time_vel = kerr_utils.kerr_time_velocity(pos_vec, vel_vec, self.M,
                                                 self.a.value)

        self.initial_vec = np.hstack(
            (self.time.value, pos_vec, time_vel.value, vel_vec))
        self.scr = schwarzschild_radius(M)