Skip to main content

vstream

Function vstream 

Source
pub fn vstream(
    q: f64,
    step: f64,
    n_points: usize,
    transform_type: i32,
) -> Result<(Vec<f64>, Vec<f64>, Vec<f64>), RocheError>
Expand description

vstream computes the path of the gas stream in a binary in velocity space. There are a few different options for the type of stream velocities produced. vstream works by integrating the equations of motion for the Roche potential using Burlisch-Stoer integration. Every time the speed changes by step, it interpolates and stores a new point.

The velocities are inertial frame velocities for comparison with Doppler maps.

Arguments:

  • q: mass ratio = M2/M1. Stream flows from star 2 to 1.
  • step: step between points (units of K1+K2).
  • n_points: number of points to compute.
  • transform_type: type of velocity, see !!ref{vtrans.html}{vtrans} for supported types.

Returns:

  • vx: array of x velocities.
  • vy: array of y velocities.
  • rad: array of radii equivalent to velocities (units of a)