Next: , Previous: , Up: Internal Routines   [Contents][Index]


15.5.643 trajectory

trajectory, gx, gy, vx, vy [[, n], ox, oy]

trajectory, gx, gy, v [[, n], ox, oy]

[develop package] Calculates trajectories of particles under guidance of a specified flow field. The two starting coordinates of each particle are taken from gx and gy which must be real numerical arrays with the same number of elements. The velocity field which guides the particles has coordinates either given by two arguments vx and vy, or by a single argument v. vx and vy must be two-dimensional real numerical arrays with the same dimensional structures. Alternatively, v must be a three-dimensional real numerical array with 2 elements in its first dimension (which count the x and y coordinates).

The coordinates in gx and gy are interpreted such that the first velocity vector resides at coordinates (0,0) and the second one at (1,0).

If n is specified, then it must be a scalar that indicates (after transformation of its value to type long) over how many time steps the particles are to be followed. The integer value of n must be positive.

If ox and oy are specified, then they must be named writeable variables, and the resulting coordinates are returned in them. If these arguments are not specified, then n cannot be specified either (and a value of 1 is taken for it), and then the results are returned in gx and gy. The results get all dimensions of gx, plus one dimension at the beginning equal to n (but only if n is greater than 1).

Currently, the flow field depends only on the integer part of the coordinates. In other words, there is no interpolation of the flow field for non-integer coordinates, and the flow vectors may change discontinuously when one crosses an integer coordinate line. The trajectory within each integer-coordinate box is a straight line with a direction corresponding to the flow vector. Because of the discontinuous flow field, it is possible that the velocity on both sides of an integer coordinate line points to the other side of the coordinate line. Any trajectory that reaches such an integer coordinate line stops there.


Next: , Previous: , Up: Internal Routines   [Contents][Index]