DVadvect


Synopsis

determine the position of a massless particle along a velocity streamline


 

group DVadvect {
Mesh+Node_Data+Iparam &in { /* input field */
nnodes+req;
xform+nonotify;
};
float+Iparam time; /* time step */
int+Iparam direction ; /* direction of integration */
Mesh+Node_Data+Oparam out { /* output field */
&xform<weight=-1> => in.xform;
};
method+notify_val+notify_inst upd_advect = "advect";
} ;

 

Description

DVadvect takes the output of DVstream, which is a polyline Mesh with velocity Node_Data that represents the path of the velocities through a field, plus a float value that is a time along that streamline. From this, for each streamline, it calculates the position of a particle at that a given time along the streamline.

Input

&in

Reference to the field output of DVstream. This is a polyline unstructured Mesh that is the path of a streamline through a velocity (three object X, Y, Z vector component) field. Its Node_Data is a velocity value.

time

A float. Sets the time along the streamline for which the particle's position should be calculated.

direction

An integer. If the value is not 0, the direction of integration is forward. If it is zero, the direction is backward.

Output

&out

The output is a new object. Its mesh is an unstructured Mesh of cell type Point. The locations of the points represent each particle's current position. Its Node_Data is the velocities at those points. The field also includes a reference to the input field's xform.

Algorithm

advector uses precomputed streamlines (from DVstream) as particle paths. It integrates velocity along the streamlines to calculate the new position of the particles at each time step.

The streamlines are originally calculated using the Runge-Kutte method of specified order with adaptive time steps.

Files

v/dv.v
modules/advect.c

Utility DVM macros

DVMadvect_param, Advect

Example

Libraries.Main.Mappers.advector

See also