streamlines


Synopsis

integrate a velocity field producing streamlines or streamribbons

Input Ports

in_field

Mesh + Node_Data

in_probe

Mesh of initial streamline positions

ui_parent

user interface parent object

 

Parameters

velocity vector

UIradioBoxLabel

which vector component to streamline

Direction

UIradioBoxLabel

forward/backward motion of particles

nsegments

UIslider

accuracy of integration

max segments

UIslider

number of integration steps

order

UIslider

order of integration

min_velocity

UIslider

minimum velocity value when integration stops

Ribbons

UItoggle

create streamribbons

ribbon width

UIslider

control width of ribbon

ribbon angle

UIslider

set ribbon angle

 

Output Ports

out_fld

Mesh + Node_Data

out_obj

output renderable object

 

Description

streamlines generates streamlines or streamribbons based on a field of any mesh type that has at least one component that is a one-, two-, or three-element vector.

You place a sample of points (the in_probe) at a starting location in the field. Then, for every time step, streamlines advances each sample point through space based on the interpolated value of the vector field at its present position. The result is a set of streamlines or streamribbons showing the progress of massless particles through a vector field.

streamlines is similar to the advector macro, except that the result is a set of lines instead of a dynamically updated set of glyphs.

Input Ports

in_field

The input field can have any type of mesh. Its Node_Data must contain at least one component that is a one-, two-, or three-element velocity vector.

in_probe

Any mesh whose coordinates represent the sample points. To create this sampling mesh you can use the plane objects in Geometries or the slice macro.

ui_parent

A port to connect to a user interface object that contains the macro's widgets. By default, it is connected to the default user interface object in the application in which the macro is instanced. (This default connection is not drawn.)

Parameters

velocity vector

UIradioBoxLabel. Radio buttons to pick on which component to base the streamlines. The selection must be a three-element vector.

Direction

UIradioBoxLabel. Radio buttons to pick the direction of streamline generation, forward or backward. The default is forward.

nsegments

UIslider. An integer slider that sets how many integration steps will be used within one grid "cell" to compute the streamline path. The default is 2. The range is from 0 to 16.

max segments

UIslider. An integer slider that sets the total number of integration steps. When an individual streamline exceeds this value, integration for it stops. The range is from 1 to 10000. The default is 256.

order

UIslider. An integer slider that sets the order of integration. Higher orders are more accurate, but execute more slowly. The default is 2. The range is from 1 to 4.

min_velocity

UIslider. A float slider. When a streamline falls below this velocity, the integration process for that streamline stops. The default is 0.00001. The range is from 0.0 to unbounded. You can use this to prevent wasted computation for streamlines barely moving, or even stationary (min_velocity = 0).

Ribbons

UItoggle. When on, streamlines produce streamribbons rather than streamlines. The default is off.

ribbon width

UIslider. An integer slider. Scales the width of the ribbon. Ribbon width varies along its length according to the divergence of the flow. This value controls ribbon width at the beginning of the ribbon. The default is 1. The range is unbounded.

ribbon angle

UIslider. An integer slider. Controls the initial angle at which the ribbon is drawn. The default is 0. The range is 0.0 to 360.0.

Output Ports

out_fld

The output field is a new unstructured mesh of cell type Polyline that represents the streamlines. Its new Node_Data contains the selected element's velocity component. The output also contains a reference to the input field's xform.

out_obj

This is a renderable version of the output field.

Algorithm

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

Example

Libraries.Examples.Visualization.Stream
examples/stream.v

File

v/modules.v

See also

Related modules