Creating a User Field Function

To create a user field function:

  1. Right-click the Automation > Field Functions node and select New followed by the type of field function you wish to create:
    • Scalar
    • Array
    • Vector
    • Position
    • Symmetric Tensor
    A new field function appears in the object tree. The type that you selected in the context menu is displayed in the Type property of the field function.

    Alternatively, you can create a user field function directly from either of the following dialogs that you use for working with field functions:

    • To create a user field function while working with the Function property of a scene displayer or a report, click the button in the object selection dialog.

      For a vector-related Function property (for example, within a vector displayer's Vector Field sub-node), this feature includes a drop-down list for the type of vector.



    • To create a user field function from within the expression editor, select a field function type from the New Field Function drop-down list.

    A New Field Function dialog appears in which you define the field function (details below). When you finish defining the field function, click OK in the dialog, and then click OK in the object selection dialog to finish selecting your new field function.

Initially the node has a default name such as User Field Function 1. However, you can rename the field function providing that the new name does not already exist. If, at a later time in setting up the simulation, Simcenter STAR-CCM+ registers a primitive field function with a name that matches one of your user field functions, Simcenter STAR-CCM+ renames the user field function. For example, suppose that you create a field function, Temperature, before activating the energy solver for temperature. When you do activate the energy solver for temperature, Simcenter STAR-CCM+ renames your field function to User Temperature.

You can set the user field function so that the function name (the name that Simcenter STAR-CCM+ uses; listed in the Function Name property) always reflects the presentation name (the node name) that you set. To do this, activate the Synchronize Function Name property. As soon as you activate that property, the function name changes automatically to reflect the presentation name. However, even when this option is activated, differences can remain between these names for the following reasons:

  • Simcenter STAR-CCM+ registers a primitive field function with a name that matches one of your user field functions, as explained previously.
  • Special characters (the ones that are not allowed or valid for a field function name) in the presentation name are assigned to the field function name directly. You must make sure the input name is valid.

A new field function also appears automatically with the creation of a report. You cannot rename such field functions directly; their names contain the names of their respective reports.

In Simcenter STAR-CCM+, you define user field functions using expressions, which are written using a specific syntax.

To define the user field function, select the field function node and set the Definition property using an expression (see Expressions). You can enter the expression in one of the following ways:
  • For short definitions, type the expression manually.
  • For longer definitions, click (Custom Editor) to access the expression editor, then use the editor to enter the required expression.


    Note Field function definitions are always done in SI units, independent of the units that you use for input or display.