13.8.1. Calculating Difference Variables

There are two ways of creating difference variables:

  • You can use the CFX Interpolator.

  • You can use CFD-Post in comparison mode.

In each case you can then view variables such as "<vector variable>.Difference" (such as Velocity.Difference) and "<scalar variable>.Difference" (such as Temperature.Difference). For a description of the general variable syntax, see Quantitative CEL Functions in Ansys CFX in the CFX Reference Guide.

Difference variables are computed on the mesh of the first case by first interpolating the variable from the second mesh to the first mesh, and then subtracting the two variables.

The magnitude of a difference variable "<vector variable>.Difference" is always calculated as:

(13–16)

This is not the difference of the vector magnitudes between file 1 and file 2.

If you plot a vector plot such as Velocity.Difference, it is obvious that a real vector is being plotted. However, if you plot "<vector variable>.Difference" in plots that use a scalar variable, how the difference variable is calculated is an issue. For example, suppose in one file you have a velocity vector (1, 0, 0), so the velocity magnitude is 1 [m/s], and in the second file you have a velocity vector of (-1, 0, 0), so the velocity magnitude is also 1 [m/s]. The vector variable Velocity.Difference variable is (2, 0, 0), and the scalar variable that CFD-Post calls "Velocity.Difference" is equal to the magnitude of this vector variable (that is, it is 2 [m/s]). You might expect Velocity.Difference to be equal to "velocity magnitude in file 2" - "velocity magnitude in file 1", which would give a value of 0 [m/s], but this is incorrect.