3.5.3. Variables: Example

In this example, you will use an expression to create an Isosurface that is a fixed radial distance from an axis or point. For details, see Expressions Workspace: Example. Before trying this example, you must first create the expression in the aforementioned example.

  1. Copy the StaticMixer_001.res file (provided with a tutorial) to your working directory and load it into CFD-Post.

  2. Click the Variables tab.

  3. Click   in the Variables details view to create a new variable.

  4. When the New Object window appears, type the name Radial Distance, and then click OK.

  5. In the variable details view, set Expression to radial (which is the expression you created earlier).

  6. Click Apply to create the new variable.

This variable appears in the tree view and can be used like any other variable. Notice that the variable is listed as User Defined.

You can now create an Isosurface using this variable as follows:

  1. Select Insert > Location > Isosurface.

  2. In the New Isosurface dialog box, enter a name and then click OK.

  3. On the Geometry tab for the Isosurface:

    1. Set Variable to Radial Distance.

    2. Set Value to 1 [m].

      This is a suitable value for results from the StaticMixer_001.res file. You may need to alter this value to something sensible depending on the results you are viewing.

  4. Click the Color tab and set the Mode option to Variable. Select a sensible variable (such as, Temperature or Velocity) with which to color the isosurface.

  5. Set the Range option to Local so that the full color range is used on the Isosurface.

  6. Click Apply to create the isosurface.

You should now see a cylindrical Isosurface centered about the Z-axis. All points on the Isosurface are a distance of 1 m (or the value you used in the Value box) from the Z-axis. Note that a cylinder can also be created as a surface of revolution. For details, see Surface of Revolution Command. Additional information on expressions is available; for details, see Further Expressions.