advect_multi_block


Synopsis

release massless particles into Multi_Block velocity field

Input Ports

in_field

Multi_Block velocity field

in_probe

mesh of initial particle positions

in_glyph

Grid describing geometry of particle glyph

parent

user interface parent object

 

Output Ports

out_fld

Mesh + Node_Data

out_obj

output renderable object

 

Description

advect_multi_block releases a sample of zero mass particles into a field with a component that represents a velocity vector, for example, a fluid flow simulation. The particles move through the velocity field according to the magnitude and direction of the vectors at the nodes in the volume. A forward differencing method estimates the next position of each particle as a function of its current position and velocity (see Algorithm ).

Advection starts when you turn the Run toggle on. If you have set the Release Interval, another set of particles is released each time the specified interval passes.

Advection for an individual particle stops when one of the following conditions occurs:

The particle exceeds the Max Segments value.

The particle's velocity drops below the Min Velocity.

The particle goes outside the field's bounds.

Advection of all particles stops when one of the following conditions occurs:

The End Time value is reached.

You turn the Run toggle off.

Input Ports

in_field

The input is a Multi_Block object. A Multi_Block object can be created with fields_to_mblock or Plot3D_Multi_Block. A Multi_Block object consists of an array of fields describing the data and some ancillary metadata. The first component of the fields' data is used and must be a scalar or a two- or three-element velocity vector. You can use mblock_to_fields, extract_component_ARR and fields_to_mblock before this macro to get the component you want from a multi-component Multi_Block.

in_probe

Any mesh whose coordinates represent the sample points. Meshes that are not unstructured are accepted, but a local unstructured version is generated during execution.

To create this sampling mesh you could use the slice macro or the plane object in Geometries.FPlane.

in_glyph

A Grid describing a glyph to represent the particles. This is simply a mesh describing the geometry of the glyph. Any mesh can be used (for example, that of a teapot) but for convenience you can use the Geometries objects to generate arrows or solid arrows, and so on

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

N-segments

UIslider. An integer slider that sets the number of integration steps used within one grid "cell" to compute the streamline/particle 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 particle 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 particle falls below this velocity, the integration process for that particle stops. The default is 0.00001. The range is from 0.0 to unbounded. You can use this to prevent wasted computation for particles barely moving, or even stationary (Min Velocity = 0).

Direction

UIradioBoxLabel. A radio box that controls whether particles are advected forward (1) or backward (0) from the starting sample points. The default is forward.

Mode

UIradioBoxLabel. A radio box that establishes how glyphs are rendered to represent the data values. (Glyphs are always colored by the magnitude of the data values in the component.) The choices are:

scalar

Scale the glyph by the magnitude of the vector at that position.

vector (default)

Scale the glyph by the magnitude of the vector at that position. Also rotate the glyph in X, Y, (and Z) by the first, second, (and third) vector subcomponent values at that position. For example, a Cross3D in_probe would be rotated to reflect the vector values.

components

Scale the glyph in X, Y, (and Z) by the first, second, (and third) vector subcomponent values at that position. For example, a Cross3D in_probe's three lines would be individually scaled to match the vector values.

Glyph Normalize

UItoggle. If off (0), the sizes of the glyphs are made proportional to the data component values at each node. If on (1), all glyphs are the same size. The default is off.

Glyph Scale

UIslider. A float slider to adjust the sizes of the glyphs. The default is 1.00. The range is 0.00 to 100.00.

Start Time

UIslider. The time value along the original streamline continuum at which to start advection. (See DVadvect reference page.) The default is 0.0.

End Time

UIslider. The time value along the original streamline continuum at which to halt advection of all particles. The default is 1.0.

Step

UIslider. The value by which to increment the time along the original streamline continuum for each advection step. The default is 0.2

Release Interval

The time interval at which to release another set of particles. The default is 0. If this parameter is 0, the module releases just one set of particles.

Time

UIfieldTypein. An output only widget that displays the current time in the count from Start Time to End Time.

Run

UItoggle. Starts (1) or stops (0) advection.

Reset Time

UItoggle. Reset Time to the value of Start Time.

Cycle

UItoggle. When End Time is reached, start the advection again at Start Time.

Output Ports

out_fld

The output is a new unstructured Mesh composed of the original mesh plus the meshes representing the particles. Its new Node_Data element's values represent the selected velocity component.

out_fld1

This 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 out_fld output field.

out_obj1

This is a renderable version of the out_fld1 output field.

Algorithm

advect_multi_block 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-Kutta method of specified order with adaptive time steps.

Example

Not available.

File

v/modules.v

See also

Related modules