volume_integr


Synopsis

The volume_integr module determines the length, area, or volume of an unstructured field.

Input Ports

in_field

Mesh

ui_parent

user interface parent object

 

Parameters

data component

UIradioBoxLabel

component for mass calculation

dimensionality

UIslider

if mixed cells, what to calculate

volume

UIfieldTypein

display volume output

volume integral

UIfieldTypein

display volume integral output

 

Output Ports

none

Description

volume_integr calculates the length (1D cells), area (2D cells), or volume (3D cells) and mass of an unstructured field and outputs them as two float values.

Input Ports

in_field

The input is a field with an unstructured mesh. Structured meshes (Mesh_Struct, Mesh_Unif, and so on) are accepted, but volume_integr creates a temporary working version of the mesh by converting it to an unstructured mesh of cell type Hex.

If only a mesh is present, only the length, area, or volume is calculated. To calculate mass, a Node_Data must be present, and at least one of its components must be a scalar representing density.

ui_parent

A port for connecting 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

data component

UIradioBoxLabel. Radio buttons to pick which component to use as the density when calculating mass. The default is the first (0th) component. If node data labels are present, they are displayed.

dimensionality

UIslider. An integer slider. This value only comes into play if the unstructured mesh contains mixed (1D and 2D, or 2D and 3D) cell types. Then, you must specify whether you want to calculate the length (1) of the 1D cells, the area (2) of the 2D cells, or the volume (3) of the 3D cells. The default is 3.

volume

UIfieldTypein. A float widget that displays the volume of the field.

volume integral

UIfieldTypein. A float widget that displays the volume integral of the field.

Algorithm

The algorithm used to calculate the volume is Gauss-Legendre quadrature (a.k.a. "Gauss sampling points").

Example

Libraries.Examples.Visualization.Volume_Integral
examples/vintgr.v

File

v/modules.v