3.6. Expressions Workspace

The Expressions workspace is used to select and generate expressions using the CFX Expression Language (CEL), which you can then use in CFD-Post in place of almost any numeric value (as long as the correct units are returned by the expression).


Note:
  • When a setting is defined by an expression, and the latter evaluates to a quantity that has no units, the software internally applies the default units for that setting.

  • In an expression, a term that has no units can be added to a term that has angular units, in which case the software internally applies radians to the term that has no units.


The following topics will be discussed:

You should be aware of the guidelines regarding expressions:

  • When using expressions in multifile and case-comparison situations, a specific expression syntax is employed. For further information, see Examples of the Calling Syntax for an Expression in the CFX Reference Guide.

  • You cannot create an expression with the same name as an object or variable.

  • Within the CFX Expression Language, some variables are known by short names to save typing the full variable name. For example, p refers to Pressure. Although it is possible to create an expression with the same name as an abbreviated variable, it is ignored. For example, if you define an expression named p with the definition 5 [K], an expression defined as 2*p represents 2*Pressure, not 10 [K].

  • You must always provide units inside square brackets for constant values typed into an expression.


Note:  CFD-Post and the CFX-Solver evaluate expressions differently:

  • CFD-Post evaluates expressions on slice planes by first interpolating the variables in the expression to the "plane points" (that is, the places where the plane is cut by mesh edges), and then evaluates the expression.

  • The CFX-Solver evaluates expressions on the vertices and then interpolates to the plane points.

The results given by these two approaches (evaluate and then interpolate vs. interpolate and then evaluate) will differ most significantly where the variable gradients are large.