Project

Project
This container holds the Systems, Components and Templates in the project.

Data Entities

Component

Data entity representing a component of a system in the schematic.

Properties

DirectoryName

Data directory name to be shown in UI

Type     string
Read Only    Yes
DisplayText

The general property that defines the user-visible name of an entity. This property is defined for all data entities but is used only in those entities that present a label in the user interface.

Type     string
Read Only    No
Notes

A note about the component.

Type     string
Read Only    No
UserId

ID to be shown in UI

Type     string
Read Only    Yes

Methods

Clean

Delete the heavyweight data (e.g. solution and/or results) of this component to reduce the size of the project.

DeleteShare

Removes all sharing affecting the specified component.

Optional Arguments

System    The target system holding the shared component. Used if the component is shared in more than one system.
    Type     DataReference
DeleteTransfer

Deletes the transfer connection between two components.

Required Arguments

TargetComponent    A reference to the component that was receiving data.
    Type     DataReference
GetAIMMechanicalPhysicsDefinitionOutput

This method is available only in AIM. For the given Physics Definition schematic component, return it's valid Mechanical Physics Definition output

Return     The AIMMechanicalPhysicsDefinitionOutput object associated with the project schematic component.
    Type     DataReference
GetContainer

Query to return the Container for the component.

Return     Container Reference
    Type     DataContainerReference
GetFluentMeshOutput

This method is available only in AIM. For the given Meshing schematic component, return it's valid FluentMesh output

Return     The AIMFluentMeshOutput object associated with the project schematic component.
    Type     DataReference
GetFluentPartMeshOutputProvider

This method is available only in AIM. For the given Meshing schematic component, return it's valid FluentMesh output

Return     The AIMFluentPartMeshOutputProvider object associated with the project schematic component.
    Type     DataReference
GetFluentPhysicsDefinitionOutput

This method is available only in AIM. For the given Meshing schematic component, return it's valid FluentPhysicsDefinition output for Fluent

Return     The AIMFluentPhysicsDefinitionOutput object associated with the project schematic component.
    Type     DataReference
GetGeometryMeshOutput

This method is available only in AIM. For the given Meshing schematic component, return it's valid GeometryMesh output

Return     The AIMGeometryMeshOutput object associated with the project schematic component.
    Type     DataReference
GetTaskObject

This method is available only in AIM. For the given project schematic component, return it's anchor object.

Return     The anchor object associated with the project schematic component.
    Type     DataReference
HasValidPartMesh

For the given Meshing schematic component, check whether it supports Part Mesh

Return     Returns true if it supports Part Mesh otherwise false
    Type     bool
HasValidVolumeFillMesh

For the given Meshing schematic component, check whether it supports volume Fill Mesh

Return     Returns true if it supports Volume Fill Mesh otherwise false
    Type     bool
Refresh

Refreshes the input data for a component by reading all changed data from upstream (source) components. Does not perform any calculations or updates based on the new data.

RemoveFromSystem

Deletes the component and all dependents from a system.

Required Arguments

System    A reference to the system containing the component to be deleted. This is needed in case the component is shared between more than one system.
    Type     DataReference
ReplaceWithShare

Replaces a component in a system with a shared copy of a component from another system. The data sources of any downstream components are updated to include the new component.

Required Arguments

ComponentToShare    The component to share into the target system.
    Type     DataReference

Optional Arguments

SourceSystem    The system from which to share the specified component.
    Type     DataReference
TargetSystem    The target system into which to share the component.
    Type     DataReference
Example

The following example illustrates a replace of a component with a shared copy of another system's component.

    componentToShare = sys2.GetComponent("componentName")
    componentToReplace = sys1.GetComponent("componentName")
    componentToReplace.ReplaceWithShare(ComponentToShare=componentToShare)

Note that you do not need to specify the TargetSystem and SourceSystem. They are only retained for legacy compatibility.

Reset

Resets the component by removing all user input and result data.

TransferData

Creates a data transfer connection between two components in the project.

Required Arguments

TargetComponent    A reference to the component receiving data.
    Type     DataReference
TransferSpecificData

Create a data transfer connection between two existing components, specifying the type of data to be transferred. This is used in some situations where more than one type of data can be exchanged between two components.

See also component.TransferData(TargetComponent=...)

Required Arguments

TargetComponent    A reference to the component receiving data.
    Type    DataReference
TransferDataName    The name of the type of data to be transferred between components.
    Type    string
Update

Updates the component by refreshing the input from all upstream components and then performs a local calculation based on current data.

Optional Arguments

AllDependencies    If true, also updates all upstream dependencies of this component.
    Type     bool
Continue    If TargetOnly is passed here, the target component will be updated even if it is Interrupted with up-to-date data. If All is passed here, both the target component and any upstream components will be updated even if they are Interrupted with up-to-date data. By default, interrupted components will not be updated if their data is up to date.
    Type     UpdateContinuation
    Default Value    None
UpdateUpstreamComponents

Updates all components upstream of the given component, without updating the component itself.


ComponentTemplate

This entity provides information used in the creation of a new component in the project. A component template has no user modifiable properties and is typically only referenced when creating a new system that includes data connections.

Properties

DisplayText

The general property that defines the user-visible name of an entity. This property is defined for all data entities but is used only in those entities that present a label in the user interface.

Type     string
Read Only    No

Methods

CreateComponent

Creates a component based on a given component template.

Required Arguments

System    The system to which the created component should be added.
    Type     DataReference

Optional Arguments

AllSystemProperties    The system properties to provide to the container creation command.
    Type     SystemPropertyDictionary
CreatedComponent    The created component.
    Type     Output<DataReference>
Name    The name to use for the created component.
    Type     string
UpstreamComponent    A list of upstream components which will provide transfer data to the created component.
    Type     List<DataReference>
Example

The following example illustrates Component creation from a template.

    system1 = CreateSystem(...)
    template = GetComponentTemplate("MyTemplate")
    template.CreateComponent(System=system1)

Optional properties allow you to modify component creation, including the establishment of upstream component connections.

    system1 = CreateSystem(...)
    upstreamComponent = ...
    template = GetComponentTemplate("MyTemplate")
    template.CreateComponent(Name="MyComponent", System=system1, UpsatreamComponent=[upstreamComponent], AllSystemProperties=None)


CustomProjectTemplate

A project snippet template containing multiple systems and their links.

Properties

DisplayText

The general property that defines the user-visible name of an entity. This property is defined for all data entities but is used only in those entities that present a label in the user interface.

Type     string
Read Only    No
SystemNames

The names of the systems to create, one for each entry in the SystemTemplates list.

Type     List<string>
Read Only    No
SystemTemplates

Templates for the systems making up this snippet.

Type     List<DataReference>
Read Only    No

Methods

CreateProject

Instantiates all the systems contained in a project snippet template.

Delete

Deletes the project template from the toolbox and user's Workbench application data.


DesignPointSolveSettings

Design point update settings entity.

Properties

ComponentExecutionMode

component execution mode

Type     string
Read Only    No
ConfiguredQueue

A configured queue used for new RSM architecture

Type     string
Read Only    No
DelayReservedLicenseCheckout

whether reserved licenses should be checked out when the remote job starts, as opposed to by the local session before submitting the jobs

Type     bool
Read Only    No
DesignPointRetainedOrExportedUpdate

retained design point update behavior

Type     DesignPointRetainedOrExportedUpdate
Read Only    No
DisplayText

The general property that defines the user-visible name of an entity. This property is defined for all data entities but is used only in those entities that present a label in the user interface.

Type     string
Read Only    No
JobControl

job submission

Type     DesignPointJobControl
Read Only    No
KeepFailedDesignPointFiles

whether to keep failed design point files

Type     bool
Read Only    No
LicenseCheckout

license checkout

Type     DesignPointLicenseCheckout
Read Only    No
LicenseReserved

This property represents a hyperlink on UI that is used to open a License Reserved dialog.

Type     string
Read Only    No
MaxNumberOfJobs

Maximum number of jobs if job submission is "Specify Number of Jobs"

Type     int
Read Only    No
NumberOfCoresPerJob

number of processes per job

Type     int
Read Only    No
PartialUpdate

partial update

Type     PartialDesignPointUpdate
Read Only    No
PortalConnection

connection name

Type     string
Read Only    No
PortalQueue

configured queue name

Type     string
Read Only    No
PreRSMUpdate

pre-RSM update

Type     PartialDesignPointUpdate
Read Only    No
ReservedLicensingExcludesPreRsmUpdate

whether reserved licensing should apply to pre-RSM update

Type     bool
Read Only    No
RetainPartialUpdate

retain partial update data

Type     PartialDesignPointUpdate
Read Only    No
RsmJobName

RSM job name

Type     string
Read Only    No
RsmQueueDetails

Configured queue details

Type     RsmQueueDetails
Read Only    No
UpdateOption

Update mode

Type     JobRunMode
Read Only    No
UpdateOrder

design point update order

Type     DesignPointUpdateOrder
Read Only    No

SchematicSettings

This data entity holds properties that control the appearance of the Project Schematic.

Properties

DisplayText

The general property that defines the user-visible name of an entity. This property is defined for all data entities but is used only in those entities that present a label in the user interface.

Type     string
Read Only    No
Notes

A note about the project.

Type     string
Read Only    No

System

A collection of components brought together to complete a specific type of analysis or data generation within a project.

Properties

AnalysisType

The analysis type associated with this system.

Type     string
Read Only    No
DisplayText

The general property that defines the user-visible name of an entity. This property is defined for all data entities but is used only in those entities that present a label in the user interface.

Type     string
Read Only    No
Notes

A note about the system.

Type     string
Read Only    No
Physics

The physics associated with this system.

Type     List<string>
Read Only    No
Solver

The solver associated with this system.

Type     List<string>
Read Only    Yes
UserId

ID to be shown in UI

Type     string
Read Only    Yes

Methods

Delete

Deletes the system and all contained data from the project.

Duplicate

Creates a new system containing a copy of all the data in this system.

Return     The reference to the created system.
    Type     DataReference

Optional Arguments

ComponentsToShare    The components to share into the new system. Used if the system being duplicated has shared components, and we wish to continue using those shares in the new system.
    Type     List<DataReference>
Name    The name for the new system.
    Type     string
Position    Type of positioning of the new system.
    Type     PositionType
RelativeTo    The system to which new system is positioned relative to.
    Type     DataReference
Example

The following example illustrates System duplication. No components are shared. The new, copied system will appear to the right of the existing system. Its name will be "MyNewSystme".

    mySystem = CreateSystem(...)
    mySystem2 = mySystem.Duplicate(ComponentsToShare=[],
                                   Position="Right",
                                   RelativeTo=mySystem,
                                   Name="MyNewSystem")

GetComponent

Query to return the component reference for a given component base name in the system.

Return     Data Container Reference
    Type     DataReference

Required Arguments

Name    The Name of Component derived form its Base Name.
    Type     string
GetContainer

Query to return the container for a given component base name in the system.

Return     Data Container Reference
    Type     DataContainerReference

Required Arguments

ComponentName    Base Name of the Component
    Type     string
GetReplaceableTemplates

A query to return the list of templates that can be used to replace the current system.

See also template.ReplaceSystem(System=...).

Return    The list of System Template references that can be used to replace this system.
    Type    List<DataReference>
Move

Moves an existing system in the schematic.

Required Arguments

Position    Type of positioning.
    Type     PositionType
RelativeTo    The system that the moved system is positioned relative to.
    Type     DataReference
RecreateDeletedComponents

Recreates new versions of any components that have been deleted from the system.

Refresh

Refreshes the input data for all components in the system by reading changed data from upstream sources. Does not perform any calculations or updates based on the new data.

Update

Updates all components in the system by refreshing the input from all upstream sources, and then performing local calculation based on current data.

Optional Arguments

AllDependencies    If true, also updates all upstream dependencies of this system.
    Type     bool

Template

A template that is used to create a system within the project.

Properties

AnalysisType

The analysis type assocated with this system template.

Type     string
Read Only    No
DisplayName

The user-visible name for the type of systems created from this template.

Type     string
Read Only    No
DisplayText

The general property that defines the user-visible name of an entity. This property is defined for all data entities but is used only in those entities that present a label in the user interface.

Type     string
Read Only    No
Physics

The physics assocated with this system template.

Type     List<string>
Read Only    No
Solver

The solver assocated with this system template.

Type     List<string>
Read Only    Yes
SystemType

The system type, displayed in the User Interface in the header of the system block.

Type     string
Read Only    No
SystemTypeAbbreviation

The system type abbreviation, used to create the system unique directory name and also serves as the system object's base name.

Type     string
Read Only    No

Methods

CreateSystem

Creates a new system from a system template.

Return     The reference to the created system.
    Type     DataReference

Optional Arguments

ComponentsToShare    A list of components to share into the newly created system.
    Type     List<DataReference>
DataTransferFrom    A list of data transfer specifications to transfer data into the new system. This is used to create follow-on systems. This and DataTransferTo are mutually exclusive.
    Type     List<TransferDataToNewComponentSpec>
DataTransferTo    A list of data transfer specifications to transfer data from the new system into existing components. This is used to create a preceding system. This and DataTransferFrom are mutually exclusive.
    Type     List<TransferDataFromNewComponentSpec>
Name    The name for the new system.
    Type     string
Position    Type of positioning of the new system.
    Type     PositionType
    Default Value    Default
RelativeTo    The system to which new system is positioned relative to.
    Type     DataReference
Example

Two examples are presented. This first section gets the template for a "Fluid Flow (CFX)" system, and then creates an empty, stand-alone system in the default position.

    template1 = GetTemplate(TemplateName="Fluid Flow", Solver="CFX")
    system1 = template1.CreateSystem()

In the second part of the example, we create a Static Structural (ANSYS) system connected to the previous Fluid Flow system. The Geometry component from the Fluid Flow system (component1) is shared with the new Static Structural system. The Solution component from the Fluid Flow system (component2) transfers results data into the Setup component of the Static Structural system. The new system is created to the right of the existing system.

    template2 = GetTemplate(TemplateName="Static Structural", Solver="ANSYS")
    component1 = system1.GetComponent(Name="Geometry")
    component2 = system1.GetComponent(Name="Solution")
    componentTemplate1 = GetComponentTemplate(Name="SimulationSetupTemplate_StructuralStaticANSYS")
    system2 = template2.CreateSystem(
        CellsToShare=[component1],
        DataTransferFrom=[{"FromComponent": component2, 
                           "TransferName": "CFXTransferResultsTemplate", 
                           "ToComponentTemplate": componentTemplate1}],
        Position="Right",
        RelativeTo=system1) 

ReplaceSystem

Replace an existing system with one based on the selected System Template.

There are a number of restrictions on the template that can be used to replace an existing system. See system.GetReplaceableTemplates() to determine the list of allowable templates.

Return    The reference to the created system.
    Type    DataReference

Required Arguments

System    The existing system to replace.
    Type    DataReference

Optional Arguments

Name    The name for the new system.
    Type    string


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