Wrong sign of circular velocity in BH smoothing kernel
I believe that the circular velocity in lines 124 - 126 in black_holes_iact.h
is calculated with the wrong sign:
bi->circular_velocity_gas[0] += mj * wi * (dx[1] * dv[2] - dx[2] * dv[1]);
bi->circular_velocity_gas[1] += mj * wi * (dx[2] * dv[0] - dx[0] * dv[2]);
bi->circular_velocity_gas[2] += mj * wi * (dx[0] * dv[1] - dx[1] * dv[0]);
The wrong sign comes from dx
, which is calculated in runner_doiact_functions_black_holes
in the frame of the particles, not the black holes.