Parameterizing Properties

When defining ACT properties in ANSYS Workbench or in the Mechanical and DesignModeler products, you can also define the property value as either an input or an output parameter. All ACT parameters are inputs, unless you specify otherwise in the definition.

Once parameterized, the property is in added to the Parameter Set bar in the Workbench Project Schematic, where it behaves and is treated as any other parameter.

You can incorporate parameters in a variety of places in your analysis.

All combinations of ACT-based and standard parameters are supported:

The following parameterization topics are discussed:

Common Property Parameterization Processes

To define a property as a parameter, you must add the attribute isparameter to the XML extension definition file and set it to true. By default, a property is created as an input parameter. To further specify that the property is to be an output parameter, you must also add the attribute readonly to the XML file and set it to true. The following sections use sample code segments to illustrate the creation of input and output parameters.

When you define a property as a parameter, it is not parameterized by default. Defining a property as a parameter only makes parameterization possible by adding a check box to the user interface. To actually parameterize the property, the user must select the check box provided by the ACT attribute.

Once a property has been selected for parameterization, it is automatically sent to the Parameter Set bar on the Project Schematic in Workbench. It can be viewed in both the Outline and Table views for the Parameter Set bar. While output parameters are read-only, input parameters from ACT can be defined in the same way as any other input parameter. For example, you can:

  • Change the unit of the parameterized input property. The unit proposed respects the type of unit specified in the XML extension definition file.

  • Add a design point for the input parameter by clicking in the bottom row of the design points table.

  • Modify the value of a design point by selecting an input parameter and entering a new value. However, the type of value must respect the one specified in the XML extension definition file. As such, design point values in the previous value must be floats. They cannot be strings.

There should be at least one input parameter and one output parameter. When finished setting up the system and working with parameters and design point values, you can solve the problem by updating the design points for the Parameter Set bar.

Parameterizing Properties in ANSYS Workbench

In ANSYS Workbench, you can define ACT-based task properties either as input parameters, output parameters, or non-parameterized values. The following sections describe how to implement input and output parameters on ACT objects within an ANSYS Workbench Project Schematic workflow.

To define either an input parameter or an output parameter in your schematic workflow, add the attribute isparameter to the XML extension definition of the task-level property that you want to parameterize. To illustrate, the extension DataSquares is used.

For example, the following code segment creates and parameterizes a task-level input property named Input. Because it is an input, the attribute readonly is set to False. The property also has the attribute control set to integer.

...
	<propertygroup name="Inputs">
		<property name="Input" caption="Input" control="integer" default="0" readonly="False" 
needupdate="true" visible="True" persistent="True" isparameter="True" />
	</propertygroup>
...

In the same way, the following code segment creates and enables parameterization for a task-level output property named Output. Because it is an output property, the attribute readonly is set to true. The property also has the attribute control set to integer.

...
	<propertygroup name="Outputs">
		<property name="Output" caption="Output" control="integer" default="0" readonly="True" 
visible="True" persistent="True" isparameter="True" />
	</propertygroup>
...

A custom system named DataSquares is created on the Project Schematic. The new properties are shown in the custom Inputs and Outputs sections exposed in the task properties. These custom sections are defined by the task groups.

When you select the check box for parametrizing the two new properties, they are added to the Parameter Set bar.

For a more information about this example, see Custom, Lightweight, External Application Integration with Custom Data and Remote Job Execution.

Parameterizing Properties in ANSYS Mechanical

The following sections provide examples and methods for integrating ACT parameters into your ANSYS Mechanical model.

In Mechanical, it is possible to define ACT-based property values as either input parameters or output parameters. This section addresses how to implement a parameter on an ACT object in Mechanical. Specifically, it describes how to parameterize loads, results, and user objects. ACT objects in any of these categories behave and interact with parameters in exactly the same way.

The following sections provide examples and methods for integrating ACT parameters into your Mechanical model.

Defining Input Parameters in ANSYS Mechanical

To define a property as a parameter, add the attribute isparameter to the XML extension definition file and set it to true.

For example, the following code segment creates a property named float_unit. The property is a pressure and its value is a float.

<property name="float_unit" caption="float_unit" control="float" unit="Pressure" isparameter="true"/>

Note:  Other attributes such as default and isload could be added as well.


The attribute isparameter adds a check box to the user interface, making it possible for the user to select the property for parameterization.

Once the property has been selected for parameterization, it automatically displays in both the Outline and Table views for the Parameter Set bar.

The following code is extracted from the XML file for the previous example. You can see how the definition of the property float_unit is incorporated into the file.

<load name="CustomPressure" version="1" caption="CustomPressure" icon="tload" support="false" 
isload="true" color="#0000FF">    
	<callbacks>
		<getsolvecommands order="1">writeNodeId</getsolvecommands>
	</callbacks>
	<property name="Geometry" caption="Geometry" control="scoping">
		<attributes selection_filter="face"/>
	</property>
	<property name="float_unit" caption="float_unit" control="float" unit="Pressure" isparameter="true"/>
</load>
Defining Output Parameters in ANSYS Mechanical

It is also possible to define an ACT property as an output parameter.

The process for making a property available as a parameter is the same as for any input parameter. You add the attribute isparameter and set it to true. A check box allowing parameterization of the property then becomes available. To specify that the property is to be an output parameter, you must also add the attribute readonly to the XML extension definition file and set it to true.

For example, the following code segment creates a property named MyOutPutProperty. As in the previous example, the property is a pressure and its value is a float. However, because this property has the attribute readonly set to true, it can be parameterized only as an output parameter.

<property name="MyOutPutProperty" caption="MyOutPutProperty" control="float" unit="Pressure" 
readonly="true" isparameter="true"/>

Note:  Other attributes such as default and isload could be added as well.


Again, the user must select the check box provided by the ACT attribute to parameterize the property. Once the property has been selected for parameterization, the corresponding output is automatically generated in the Outline view for the Parameter Set bar.

In addition, the minimum and maximum values of an ACT result object are available to become output parameters by default. This capability is not managed by the ACT extension, but takes advantage of the Mechanical environment.

Parameterizing Properties in ANSYS DesignModeler

In ANSYS DesignModeler, it is possible to define ACT-based property values only as input parameters. This section addresses how to implement an input parameter on an ACT object in DesignModeler.

As with any other input parameter, to add an input to DesignModeler you must add the parameter isparameter to the XML extension definition file and set it to true. However, you are not able to add output parameters. The attribute readonly is not available for DesignModeler.

For example, in an ACT feature that generates a cylinder, you can add length as a parameter. The following excerpt from the XML file defines the parameter Length.

<geometry name="MyFeatureWithParameters" caption="MyFeatureWithParameters" 
icon="Construction" version="1">
	<callbacks>
        <ongenerate>generateMyFeature</ongenerate>
    </callbacks>
    <property name="Length" caption="Length" control="float" isparameter="true"></property>
 </geometry>

In DesignModeler, the check box next to the property Length allows you to parameterize it as an input parameter.

You could add a static structural analysis based on the previous Geometry template by adding an output parameter in the Static Structural analysis. This results in the following schematic workflow:

The input parameter defined in DesignModeler is managed in exactly the same way as other any other input parameter. In the Outline view for the Parameter Set bar, the geometry input parameter is placed under the Geometry system.

Parameterizing Properties in a Third-Party Solver

When you have used ACT to deploy a third-party solver, it is possible to define ACT-based properties as either input parameters or output parameters. This section addresses how to implement a parameter on an ACT object in an external third-party solver—specifically, under a load, in the analysis settings, and under results.

The definition of parameters for a third-party solver is no different than the process described in earlier sections: To parameterize a property, in the property definition you must add the attribute isparameter and set it to true. By default, it is an input parameter. To define it as an output parameter, you must set the attribute readonly to true.

Defining Parameters under a Load in a Third-Party Solver

The process of defining parameters under a load in ANSYS DesignModeler is identical to the process described in Defining Input Parameters in ANSYS Mechanical.

Defining Parameters in Analysis Settings in a Third-Party Solver

It is possible to parameterize the Analysis Settings in a third-party external solver. The settings options available depend on the definition of the third-party solver.

For example, you can opt to parameterize the maximum number of iterations in the analysis settings:

The following code segment, placed under the solver section of the XMLfile, defines the property MaxIter, for which the attribute caption is set to Max. Iterations.

<solver…

    <property name="MaxIter" caption="Max. Iterations" control="integer" isparameter="true" default="10"/>
</solver>
Defining Parameters under Results in a Third-Party Solver

The process of defining parameters under Results in ANSYS Mechanical is identical to the process described in Parameterizing Properties in ANSYS Mechanical. Results parameters can be either inputs or outputs, depending on whether the attribute readonly is set to true or false.


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