Chapter 17: CFX Expression Language (CEL) in CFD-Post

This chapter provides information that is specific to CFX Expression Language (CEL) use in CFD-Post. For details on the CFX Expression Language, see CFX Expression Language (CEL). A list of variables available for use in CEL expression is available in Variables and Predefined Expressions Available in CEL Expressions.

CEL Variables in CFD-Post

Within CFD-Post, you can:

  • Create new expressions.

  • Set any numeric parameter in a CFD-Post object based on an expression (and the object will update if the expression result changes).

  • Create user-defined variables from expressions.

  • Directly use the post-processor quantitative functions in an expression.

  • Specify units as part of an expression.

  • Use the variables x, y, and z in general CEL expressions. Additionally, you can use user-defined coordinate frames with the CEL functions. For details, see Quantitative CEL Functions in Ansys CFX.

However, you cannot use CEL to solve systems of equations in CFD-Post—CEL expressions are purely algebraic operations.

All expressions in the post-processor are defined in the EXPRESSIONS singleton object (which is also a sub-object of LIBRARY:CEL). Each expression is a simple name = expression statement within that object. New expressions are added by defining new parameters within the expressions object (the EXPRESSIONS object is special in that it does not have a predefined list of valid parameters).


Note:  CFD-Post evaluates CEL expressions with single (not double) precision.



Important:  Because Power Syntax uses Perl mathematical operators, you should exercise caution when combining CEL with Power Syntax expressions. For example, in CEL, 22 is represented as 2^2, but in Perl, would be written 2**2. If you are unsure about the validity of an operator in Perl, consult a Perl reference guide.