You can use custom outputs to write expressions using quantities from point, surface, and volume outputs with standard math operations and functions. This can be useful for calculating things like aerodynamic efficiency, pressure drop coefficients, and more.
When you begin typing an output name, operator, or function, autocomplete will make suggestions. Hit Enter to select a suggestion and continue typing your expression.
Syntax
Outputs are referenced in expressions by their name. For example, if you have two surface outputs, one for Lift and one for Drag, you can use those outputs to calculate aerodynamic efficiency like this:
Important: Expressions are case-sensitive.
If a referenced output defines a coefficient or trailing average, those values can be accessed by appending “ - Coefficient” or “ - Average” to the name in your expression, making sure to include the output name within double quotation marks. For example:
pow(Lift - "Lift - Average", 2)
Note: If a coefficient isn’t selected for plotting in its respective output, it can still be accessed.
Output names can be used with the following operators and functions:
Arithmetic operators: +, -, *, /
Math functions: sqrt, cbrt, pow, hypot, log, exp, abs, max, min
Trigonometric functions: cos, sin, tan, acos, asin, atan, atan2
For example, if you’re computing Total Pressure Drop with a surface output, you can add a Velocity Magnitude surface output to obtain a reference velocity, and then compute the pressure drop coefficient (assuming the fluid is water, where density is 998):
Total Pressure Drop / (0.5 * 998 * pow(Velocity Magnitude, 2))
Error Checking
When you create an expression, it will be checked for common errors like missing parentheses, unknown output names, or incorrect number of arguments in a function. If any errors are found, they’ll be shown in red below the input box.
Limitations
Convergence monitors cannot be used in custom output expressions.
Point outputs can be used in custom output expressions only if they contain a single point.
Volume and surface outputs where the Calculation drop-down is set to Per Surface or Per Volume can be used in custom output expressions only if they contain a single surface or volume.