pub fn vel_transform(
q: f64,
transform_type: i32,
x: f64,
y: f64,
vx: f64,
vy: f64,
) -> Result<(f64, f64), RocheError>Expand description
vtrans computes two velocity transforms, (1) a straight transform from rotating to inertial frame and (2) an inertial frame velocity in the disc.
When translating to inertial, the accretor velocity is added. If you want the velocity relative to this you must add mu = q/(1+q) to tvy before using it.
Arguments:
q: mass ratio M2/M1transform_type: integer representing velocity transform. 1: rotating frame -> inertial frame 2: rotating frame to inertial frame velocity of disc 3: rotating frame (i.e. gived out what you entered)x: x-coordinate where transform is performed fory: y-coordinate where transform is performed forvx: velocity in x-axis in the rotating frame to transformvy: velocity in y-axis in the rotating frame to transform
Returns:
vx: velocity in x-axis transformed to the chosen framevy: velocity in y-axis tranformed to the chosen frame