You should understand the following terms and concepts when working with ANSYS Workbench scripting. The following graphic depicts the relationship between the objects in a project.

The project is the full collection of systems, components, data, and their connections that you create to achieve an overall CAE goal.
A system is a collection of components that together provide workflow to achieve an engineering simulation goal, such as completing a static structural analysis or a steady state fluid flow simulation. Systems may also contain a single component to complete an analysis sub-task, for example, meshing a geometric assembly.
A component includes a collection of data and a data editor that work together to achieve a CAE-related task. A system may include several components which together to define a simulation workflow. A data editor can be an ANSYS Workbench-enabled application like ANSYS Fluent or Mechanical, or a native ANSYS Workbench workspace like Engineering Data or Design Exploration. In the ANSYS Workbench user interface, a component is depicted as a cell in the Project Schematic.
In an abstract sense, a component receives data from external or upstream sources, enables you to edit data local to the container, and then performs operations to produce output data. For example, a meshing component may receive geometry data from an upstream source, enable you define meshing attributes, and then generate a mesh for a downstream analysis.
In addition to managing the data and data editor required for a CAE task, a component also provides common services to control the input and output data from the component. For example, the component allows its output data to be transferred to other components.
A data container includes data unique to an individual component as well as the services to manage and manipulate it. Although most components have a single data container, they may have more than one.
Services which create, retrieve, or modify a component’s local data are provided by the data container, while services to control the transfer of data into and out of the component are provide by the component.
A data entity is a data structure defined within the data container. A data container often employs several data entities. A data entity is similar to a class in an object-oriented programming language; it defines member data (or properties) and methods which can be called to perform operations on the data.
A data reference is a handle to an instantiated data entity. From a data entity definition, an object can be created, and the data reference provides access to that object. In an ANSYS Workbench journal, data references are assigned to variables. The variables are then used to access the properties and methods of the data entity. Consider the following example:
system = GetSystem(Name="My Analysis") system.Update()
The first line queries for a previously instantiated System
data entity named “My Analysis.” The GetSystem method returns a data reference
to the specified System object and assigns it to the variable
system. Using this variable,
the second line calls a method supported by System data
entity called Update. This method updates
the state of the system referenced by the variable, namely “My
Analysis.”
Similar to data references, a data container reference is a handle to an instantiated data container object.
ANSYS AIM captures three concepts of Workbench under the Study name:
Study is the system provided by ANSYS AIM within the Project Schematic. Only one Study system is allowed at this time.
Study is the component provided by ANSYS AIM, which provides a namespace for the top level AIM methods and queries.
Study is the container within the ANSYS AIM system that contains all DataObjects that are created as the user is working within ANSYS AIM. The ANSYS AIM container (or ANSYS AIM database) is managed using a dependency graph, or a directed acyclic graph (DAG) in computer science terminology. The graph is established by means of the AssociatedObject argument of the CreateEntity command.
An ANSYS AIM task is associated with a subset of DataObjects that exist within the ANSYS AIM Study container. Each task corresponds to a container. The task container contains only a DataObject that references a single DataObject within the ANSYS AIM container, which is known as the Task Anchor. This anchor is the root of the dependency graph that defines the subset of DataObjects (i.e., the context) that the task action will operate within and is a sub-graph of the overall dependency graph.
An ANSYS AIM task group is used to group tasks together for the purposes of presentation. Currently, this can only be used for the Physics Definition and Physics Solution task types. Grouping these tasks is the default behavior.
In this diagram, we have the Study system which holds, for example, four containers.
The first container is the Study container, which contains the dependency graph.
The dependency graph contains seven data objects. These objects are the objects that are created when the user is working with ANSYS AIM. Examples could be PartMesh, GeometryImportSource, Force, ReferenceFrame, etc.
The other three containers are task containers that each hold only one data object. This data object is the Task data object and stores a reference to a data object that exists within the dependency graph, which is known formally as the task anchor. The dotted lines represent these references.
The context or sub-graph concept for Task 1 is illustrated here:
In this diagram, the context for Task 1 is the graph represented by DataObject 2, DataObject 5, and DataObject 6, where DataObject 2 is the root of the graph, and DataObject 5 and DataObject 6 are the leaf nodes of the graph. Task 1 will operate only upon the three data objects within this sub-graph and does not have the ability to change any data objects within the rest of the dependency graph.
An object encapsulates a combination of data and services that act on the data. In the ANSYS Workbench scripting interface, data entities, data containers, or components are all examples of objects. Access to these objects is provided by data references and data container references.
A object’s data is referred to as its properties. In the ANSYS Workbench scripting interface, only objects derived from data entities have properties. A property is defined by its name, type, and value. Property types include:
Boolean
String
Numerical types (Integer, Real)
Physical quantities
Data references and data container references
Collections of the above types (Lists, Dictionaries)
An object’s properties are accessed
by applying the dot operator on the corresponding reference
to that object. In the example below, parameter1 is a data reference to a Parameter object, and the Expression
property of that object is set to 10.
parameter1.Expression = "10"
A method is a command that is bound to a data entity
or data container object. Methods can change property
values, create or delete properties, or invoke complex
calculations and operations. Methods may require arguments to further
specify the action to be taken, and they may return an
object as a result of that action. Like properties, an
object's methods are accessed by applying the dot operator on a corresponding
data reference. In the following example, parameter1 is a data reference to a Parameter object, and the method
SetQuantityUnits is called to set the object's units to
meters.
parameter1.SetQuantityUnits("m")To see a list of all methods and queries in a component, execute
dir(<component>) from the
Workbench script console.
An argument is a variable that can be passed to a method when invoked. An argument has a type and share most of the same types as properties.
ANSYS Workbench methods use 'Named' arguments, where each argument is given a name that is used to distinguish it from other arguments in the method. Because the arguments are named, their order is inconsequential.
Arguments can be required or optional. All required arguments must be specified or the method will fail. Optional arguments may be omitted and typically take a default value.
In the following example, the density property of a material is set to 8500 kg/m3. The named arguments are "Variables" and "Values" which are set to "Density" and "8500 [kg m^-3]}," respectively.
property1.SetData(Variables="Density", Values="8500 [kg m^-3]")
Because ANSYS Workbench uses named arguments, the following form of the command is also acceptable.
property1.SetData(Values="8500 [kg m^-3]", Variables="Density")
A query is a method which typically returns a data or container reference which can then be used to further interrogate or modify the project. Queries by themselves do not change the state of the project. Like methods, queries may require specifying arguments.
Namespaced commands are commands that are not bound to a particular object but have been grouped in a namespace with other commands having similar context. Like methods, commands perform some action, often require arguments, and may return an object as a result of the action. In the following example, the Update command is called in the Project namespace to update all components in a project by refreshing the input data and performing local calculations:
Project.Update()
The AssociatedObject command argument creates a directed edge in the ANSYS AIM dependency graph.
In the same diagram from above:
DataObject 6 may have been created by calling:
dataObject6 = study1.CreateEntity(
Type="SomeExampleType",
AssociatedObject=dataObject2)The AssociatedObject command argument therefore defines the directed edge which is represented by the arrow between DataObject 2 and DataObject 6.
ANSYS Workbench uses template apps to create the Projects, System, and Components elements described above.
Apps that create templates are analogous to document templates provided for Microsoft Word. For example, you may pick a Word report template that contains the formatting, sections, etc., for a type of report you wish to create. You then create a document from that template and fill out your specific content within that document to produce the report. Comparably, you may pick a System Template in ANSYS Workbench that describes the components, data, and relationships needed to execute a particular type of CAE analysis. You then create a system from that template, enter data, and perform operations within that system to complete the analysis.
Templates facilitate and automate creation of project elements for a specific purpose. However, these templates do not preclude you from manually (and flexibly) building up a project from the constituent elements to achieve the same goal.
A project template defines a set of system templates and the connections between them that can be used to perform a multi-disciplinary CAE analysis task (e.g., Thermal-Stress or One-Way FSI).
The project template can be used to create specific instances of systems and components within the project (such as the Custom Templates in ANSYS Workbench Toolbox).
A system template contains the information to create an ANSYS Workbench System designed for a particular simulation objective. ANSYS Workbench provides system templates for many types of standard analyses, including static structural, fluid flow, explicit dynamics, steady-state thermal, and others. The Analysis Systems listed in the ANSYS Workbench Toolbox are all examples of system templates. All analyses performed in ANSYS Workbench begin by referencing a system template.
The component template includes the allowed input/output data types, internal data, and key commands associated with a specific component (e.g., Geometry).
Apps that create simulation templates in ANSYS AIM automate some common engineering cases. Each app provides a simulation with typical default settings for geometry, mesh, physics and results.