Custom Parameters

At the project level, you can create custom parameters that are not directly associated with a data model property. They can be custom input or custom output parameters that are defined by a constant value, such as 12.5 [cm] or sin(pi/2). Or, they can be derived parameters, defined by an expression of other parameters, such as P2+3*P3.

To create a derived parameter, you enter the expression statement in either the Expression field in the Properties view or in the Value field in the Outline view. Both constant values and derived parameters can be added in the Outline view. While constant values can be edited in the Outline view, once derived parameters are added, they become read-only in the Outline view. To edit them, you must use the Properties view.

If the expression defining a custom parameter results in a quantity, Workbench infers its quantity name from the value produced by the expression evaluation. Consequently, if the expression is a sum of multiple terms, every term must be using the same quantity name. For example, if the resulting quantity is 3.4[m^2], the new custom parameter must have its Quantity Name property set to Area. In some cases, more than one quantity name may be valid for the expression. In these cases, the Quantity Name property is not set, but you can select from a list for Quantity Name property in the Properties view for the parameter. Once the value quantity name is determined from the unit of the value, it can be subsequently changed only by changing the Quantity Name property for the parameter. For example, you cannot change the expression from Area to Volume without changing the Quantity Name property.

The expression defined for a custom Boolean parameter can be the Python values True or False, or it can be a Python logical expression such as P1 > P2 or P1 == 10 and P2 == 10. For a parameterized Boolean parameter, you can select True/False from the drop-down in the Value column.

The expression defined for a custom string parameter must be quoted with single or double quotes; that is, ‘string value’ or “string value”.

Chaining Output Parameters to Input Parameters

You can chain an output parameter to an input parameter to allow an input to be driven directly from the current value of an output, provided that the chaining does not create a circular dependency. To chain parameters, change the input parameter definition to an expression involving other parameters. To create a derived variable, first insert an expression and then edit the Expression field in the Outline view.


Release 18.2 - © ANSYS, Inc. All rights reserved.