Defining Expressions for Electric Transient Solutions

You can specify additional evaluation criteria through the use of expressions and output variables.

To set expressions as evaluation criteria:

  1. Right-click on the Analysis icon in the Project Manager tree to open the Solve Setup window.
  2. Click the Expression Cache tab and click the Add... button to open the Add to Expression Cache dialog box.
  3. Specify the Context for the expression, including Report Type, and Solution.
  4. Under the Trace tab, select from the Category, Quantity, and Functionlists to create expressions.
  5. Selecting a listed category lists the Quantities and Functions available for each category. If you have defined one or more output variables, you can see them by selecting the Output Variables category. The Output Variables button opens a dialog box that lets you define output variables. See Specifying Output Variables.

    When you have created an expression, it appears in the Expression field of the Trace tab. If desired, you can use the Range Function button to select range functions to apply to the expression.

    Under the Calculation Range tab, you can view the values of available sweep variables. Clicking the ellipsis [...] button in the Edit column opens a list of values from which you can select.

  6. When finished defining the expression that you want to add to the cache, click the Add Calculation button.
  7. This adds the selected expression and the associated context to a table in the Expression Cache tab. You can define additional expressions with contexts and add them in the same way.

  8. When finished adding expressions, click Done to close the Add to Expression Cache dialog box.
  9. The Expression Cache tab lists the expressions you have added in a table:

    • The Title field is editable, by default showing the name as built from the expression (with underscores removed).
    • The Expression field shows the full expression. You can resize the Solve Setup window, and also each column in the table, to view the contents of the fields.
    • The Context column for non-field types lists the parameter type specifying the force, torque or matrix setup. For these types the context also can be given as part of the expression. For example, the expression Force1.Force_x with a context of None is equivalent to an expression of Force_x with a context of Force1.

    For field quantities the Context can be the geometry on which to evaluate the field quantity - a point or line. If you use a line you need to use some range function to reduce the dimensionality to a single value (or use the Calculation Range tab to specify a single point along the line). Note that, if you create a named expression in the field calculator that already evaluates to a single value, then the Context here will likely be None.

    • The Intrinsics column shows a clickable button that opens an Edit Calculation Range dialog box. If the Intrinsics column button shows None you cannot edit the value. If the button shows variables, click the ellipsis [...] in the Edit column to display a list of the variable values from which you can select. Click OK to close the Edit Calculation Range dialog box and apply your selections to the Expression Cache.

    The Intrinsics field lists the values you may have set in the Calculation Range tab when you added the expression. This is used to set the values of “other” sweeps. Usually there are no other sweeps because the values of the variables are set in the definition of each variation. In some cases you may need to specify the values of “other” sweeps. For field values with a line for the context, you can specify the (normalized) distance along the line For eddy current field quantities you can also specify the phase for the calculation.

  10. In the Evaluation timestep panel, set how often the solver is to output field solutions. Select Constant to output solutions at a preset time interval (e.g., every 0.1 s); or Number of solve steps to output solutions each preset number of timesteps (e.g., every 3 timesteps).
  11. Optionally, buttons allow you to Edit and Remove selected expressions, and to Remove All expressions in the table.
  12. When finished defining expressions, click OK to close the Solve Setup window.

Related Topics 

Specifying Output Variables