>calculate [<function name>, <arguments>]
A number of useful quantitative functions have been defined within Ansys TurboGrid. These functions are specified in the table below. You can follow the links in the Function Name column to see the syntax used for each function when using them from the Command Editor dialog box. A detailed description of the calculation performed by each function is not provided here. For details, see Function in the TurboGrid User's Guide. When using quantitative functions as part of a CEL expression, a different syntax is required. For details, see CEL Standard Functions.
These functions may be accessed from the Command Editor
dialog box using the >calculate
command, or via function
calls within Power Syntax. Reference documentation on the Power Syntax functions is
provided in Power Syntax.
When a function is evaluated, a singleton CALCULATOR
object
is created that shows the parameters and results for the most recent calculation. If
the >calculate
command is supplied without
<function name>
or
<arguments>
, then the calculation is performed with
the settings from the CALCULATOR
object (which may be modified
like any other object in the Command Editor dialog box). An
error is raised if the CALCULATOR
object does not exist.
When evaluated as part of a Power Syntax function, the results of the calculation can be stored in a Power Syntax variable for further processing. See Examples of Power Syntax for examples of using calculations within Power Syntax.
Function Name |
Operation |
Arguments <required> [<optional>] |
---|---|---|
Area projected to axis (no axis specification returns total area) |
<Location>, [<Axis>] | |
Area-weighted average |
<Expression>, <Location>, [<Axis>] | |
Area-weighted integral |
<Expression>, <Location>, [<Axis>] | |
Arithmetic average |
<Expression>, <Location> | |
Number of calculation points |
<Location> | |
Length of a curve |
<Location> | |
Length-weighted average |
<Expression>, <Location> | |
Length-weighted integration |
<Expression>, <Location> | |
Maximum Value |
<Expression>, <Location> | |
Minimum Value |
<Expression>, <Location> | |
Value at a point |
<Expression>, <Location> | |
Sum over the calculation points |
<Expression>, <Location> | |
Volume of a 3D location |
<Location> | |
Volume-weighted average |
<Expression>, <Location> | |
Volume-weighted integral |
<Expression>, <Location> |
Note: The following functions are not available in Ansys TurboGrid: force, forceNorm, massFlow, massFlowAve, massFlowInt and torque.
Any variable or valid expression can be used as the
<Expression>
argument. For example,
areaAve Minimum Face Angle, myPlane
is
allowed. For a list of variables and valid expressions, see CEL Functions, Constants and System Variables.
Some functions take an axis specification as an argument. The general format for an axis specification is:
<X|Y|Z>
>calculate area, <Location>, [<Axis>]
The specification of an axis is optional. If one is not specified, the
value held in the CALCULATOR
object is used. To
calculate the total area of the location, the axis specification should be
left blank (you should type a comma after the location specification). See
area in the TurboGrid User's Guide for a detailed function description.
Example:
>calculate area, myplane
calculates the area of the
locator myplane
projected onto a plane normal to
the axis specification in the CALCULATOR
object.
Example: >calculate area,
myplane
, calculates the area of the locator
myplane
. Note that adding the comma after
myplane
removes the axis specification.
>calculate areaAve, <Expression>, <Location>, <Axis>
See areaAve in the TurboGrid User's Guide for a detailed function description.
>calculate areaInt, <Expression>, <Location>, [<Axis>]
Axis is optional. If it is not specified the value held in the
CALCULATOR
object is used. To perform the
integration over the total face area, the axis specification should be blank
(you should type a comma after the location name). See areaInt in the TurboGrid User's Guide
for a detailed function description.
>calculate ave, <Expression>, <Location>
See ave in the TurboGrid User's Guide for a detailed function description.
>calculate count, <Location>
See count in the TurboGrid User's Guide for a detailed function description.
>calculate length, <Location>
Note: When using this function in Power Syntax the leading character should be capitalized to avoid confusion with the Perl internal command "length". See length in the TurboGrid User's Guide for a function description.
>calculate lengthAve, <Expression>, <Location>
See lengthAve in the TurboGrid User's Guide for a detailed function description.
>calculate lengthInt, <Expression>, <Location>.
See lengthInt in the TurboGrid User's Guide for a detailed function description.
>calculate maxVal, <Expression>, <Location>
See maxVal in the TurboGrid User's Guide for a detailed function description.
>calculate minVal, <Expression>, <Location>
See minVal in the TurboGrid User's Guide for a detailed function description.
>calculate probe, <Expression>, <Location>
See probe in the TurboGrid User's Guide for a detailed function description.
>calculate sum, <Expression>, <Location>
See sum in the TurboGrid User's Guide for a detailed function description.
>calculate volume, <Location>
See volume in the TurboGrid User's Guide for a detailed function description.
>calculate volumeAve, <Expression>, <Location>
See volumeAve in the TurboGrid User's Guide for a detailed function description.
>calculate volumeInt, <Expression>, <Location>
See volumeInt in the TurboGrid User's Guide for a detailed function description.