Variables are numerical values provided by your analysis software (model variables) or created within EnSight (created variables). Variables can be dependent on server part-geometry (for example, the area of a part), and a part's geometry can be dependent on its parent part's variable values (for example, an isosurface).
There are six types of variables: tensor, vector, scalar, constant, and constant per part. Scalars and vectors can be real or complex. Symmetric tensors are defined by six values, while asymmetric tensors are defined by nine values. Vectors, such as displacement and velocity, have three values (the components of the vector) if real, or six values if complex. Scalars, such as temperature or pressure, have a single value if real, or two values if complex. Constants have a single value for the model, such as analysis time or volume at each timestep. Constants per part have a single value for each part, such as area at each timestep. All types can change over time for transient models.
Note: Constants per part, that are in model files and exist with the same value in all parent parts of a created part - are inherited by said created parts. If the value differs, they will become undefined in the created part. However, computed constants per part are not automatically inherited by created parts, and become undefined in the created parts. If a value is desired in the created part(s) for the computed constant per part, one should include the created part as one of the parent parts for the computed constant per part.
Before using a variable, it must be loaded by EnSight, a process called activation. EnSight normally activates variables as they are needed. Variable Selection and Activation describes how to select, activate, and deactivate variables to make efficient use of your system memory.
In addition to using the variables given by your analysis software, EnSight can create additional variables based on any existing variables and geometric properties of server parts. EnSight provides approximately 100 functions to make this process simpler. Because created variables may have dependencies on other variables and possibly also on parts, they are more limited in their usage than model variables. Variable Creation.
Very often you will wish to color a part according to the values of a variable. EnSight associates colors to values using a color palette. You have control over the number of value-levels of the palette and the type of scale, as well as control over colors and method of color gradation. You also use function palettes to specify a set of levels for a variable, such as when creating contours.
You can make numerical queries about variables and geometric characteristics of Server-based parts. These queries can be at points, nodes, elements, parts, along lines, and along 1D parts. If you have transient data, you can query at one time step or over a range of time steps, looking at actual variable values or a Fast Fourier Transform (FFT) of the values. (see Query Menu Functions)
Variables can come from more than one case. If more than one case has a variable with the same name, this will be treated as one variable. If a variable does not exist in one of the cases, it cannot be used in that case.
When variables are activated or created, all parts except Particle Trace parts are updated to reflect the new variable state. Particle Trace parts will always show variables which are activated after the part's creation as zero values.
Variable calculation occurs on the server. Therefore, the input to all of the predefined functions includes some type of server based parts. Conversely, parts which reside only on the client (contours, particle traces, profiles, vector arrows, and tensor glyphs) cannot be used to calculate variables.
Variables can be defined at the vertices, at the element centers, or undefined. Face and edge variables are not supported.
Users can write external variable calculator functions called User Defined Math Functions (UDMF) that can be dynamically loaded by EnSight at startup. These functions appear in EnSight's calculator in the general function list and can be used just as any other calculator function to derive new variables.
Several examples of UDMFs can be found in the directory $CEI/ensight251/src/math_functions/ .
When the EnSight server starts it will look in the following subdirectories for UDMF dynamic shared libraries:
./libudmf-devel.so (.sl) (.dll) $ENSIGHT10_UDMF/libudmf-*.so (.sl) (.dll) $CEI_HOME/ensight102/machines/$ENSIGHT10_ARCH/lib_udmf/libudmf-*.so (.sl) (.dll)
Depending on the server platform, the dynamic shared library must have the correct suffix for that platform (for example, .so, .sl, .dll).
Currently, when a UDMF is used in the EnSight calculator, it is invoked for each node in the specified part(s) if all the variables operated on for the specified part(s) are node centered. If all of the variables are element centered, then the UDMF is invoked for each element in the part(s). If the variables are a mix of node and element centered values, then the node centered values are automatically converted to element centered values and then the UDMF is invoked for each element using element centered variables.
Arguments and the return type for the UDMF can be either scalar or vector EnSight variables or constants. At this time, only variable quantities and constants can be passed into UDMFs. There is no mechanism for passing in either part geometry, neighboring variables, or other information. For more information, see User Defined Math Functions.