2.4. Ansys CFX Expression Language

The Ansys CFX Expression Language (CEL) is integrated into Ansys TurboGrid. You can use an expression defined with CEL in place of any number in TurboGrid. Within TurboGrid you can:

  • Create new expressions.

  • Set any numeric parameter in an TurboGrid object based on an expression (and the object updates if the expression result changes).

  • Create user-defined variables from expressions.

  • Directly use the quantitative functions in an expression.

  • Specify units as part of an expression.

All expressions are defined in the EXPRESSIONS singleton object. 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 pre-defined list of valid parameters).


Note:  TurboGrid evaluates CEL expressions with single (not double) precision.



Important:  Since Power Syntax uses Perl mathematical operators, you should exercise caution when combining CEL with Power Syntax expressions. For example, in CEL, 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.