In multibody dynamics, design exploration helps identify how different model parameters influence system performance. Altair HyperStudy is a powerful multidisciplinary design exploration and optimization tool that enables engineers to improve product performance and robustness through intelligent design analysis.
Some MotionView components—such as bearings, gears, and cables from the Machinery Library—require a Python solver file to function. This article provides a step-by-step guide on how to set up a MotionSolve Python solver file in HyperStudy.
Example Overview
For demonstration purposes, we’ll use a four-bar mechanism and define the rotational velocity of the shaft as an input variable in HyperStudy.
Model Files
1. Load the Model in MotionView
Open 4bar_mechanism.mdl in MotionView. The model is already configured, and the rotational speed is set to 6.2832 rad/s (60 rpm).
2. Export the Solver Deck in Python Format
Go to: File → Export → Solver Deck
- Select Python as the format.
- Define the save directory.
- Click Export.
3. Launch HyperStudy and Create a New Study
- Open HyperStudy.
- Create a new study in the desired working directory.
4. Add the Model
In the Add Model dialog:
- Select Parameterized File, then click OK.
5. Link the Solver File
In Resources:
- Select the previously exported .py file.
- Click Open.
When prompted, click Yes to create a parameterized copy of the file.
An Editor window will appear.
- Search for the Motion Entity.
- Select the value to be parameterized and click Create.
- Optionally, define the Lower and Upper Bounds here (these can also be adjusted later).
- Click OK, then Save to store the parameterized template (.tpl file) in your chosen directory.
- Finally, click OK again.
6. Define Solver Execution
The .tpl file will now appear in Resources, and the .py file will be set as the solver input file.Next, specify MotionSolve as the Solver Execution Script.
7. Import Variables
Click Import Variables, then Next.
The Motion Value will be defined as a variable with the corresponding Lower and Upper Bounds.
8. Run Definition Tests
Click Next, then go to Run Definition.Ensure that all three tests are successfully checked:
The rest of the setup is like any other HyperStudy setup to define Output Responses and later create a Design of Experiments or Optimization study.
Additional Resources