There are many situations that benefit from automation of tasks which otherwise require manual work in GT’s user interface. To address these situations, GT offers GT-Automation, a time-saving enterprise package that allows simulation engineers to write Python code to manipulate GT models programmatically. With GT-Automation, users save time and eliminate errors that often come from repeated, tedious operations.
Common time-saving capabilities include:
Aiding in the building of complex models
Models with complex linking configurations often involve tedious, repetitive linking operations. For example, battery thermal models can contain hundreds of thermal links. A python script will automate the creation of these links, saving time and reducing errors.
Performing the same action to many similar models
Sometimes there are many models that have significant overlap in structure and that require the same change. This is repetitive and time consuming to do manually.
For example, the image below shows an air conditioning system re-used in several similar platform models. To evaluate the effect of switching from an air cooled to a liquid cooled condenser, these platform models need the same linking/connectivity changes made. With Python scripting in GT-Automation, this is quickly and consistently performed compared to manually changing each model.
The time savings scales with the number of models being changed by a Python script. For example, deleting 10 flow links and creating 10 new ones can take about 2 minutes. Writing a Python script to automate this will not save time for a single model. But if this operation is to be repeated on tens or hundreds of similar models, GT-Automation offers significant time savings and eliminates user error.
Automating changes based on user selections when running model
Entire subsystems can be dynamically added or removed, including replacing parts, based on user selections in Case Setup. In the example below, a drop-down choice (Super Parameter) is made by the user, and as the model runs, a python script transforms the model based on the choice made.
How GT-Automation Works:
A built-in script editor is available in GT-ISE, allowing users to create python scripts that execute to modify models. The editor comes with complete and robust command API documentation, covering proper syntax and function, along with relevant scripting examples.
Supported automation actions:
- Open/save models
- Links and Signals
- Cases in Case Setup
- Setup menu attribute values (i.e. Run Setup, Output Setup)
- Parts, objects and their attribute values
- Turn on and off plots
- Run models
See Python Scripting in Action: “In the sample video below, a script executes based on user inputs which programmatically adds multiple battery cell packs to the model map. The script can build as many modules as the user desires based on the input