Learn how to perform an optimization study in which the input variables are entered and the output responses are calculated
in a Microsoft Excel spreadsheet.
This tutorial is centered around a synchronous permanent magnet motor designed with AltairFluxMotor tool. The goal of this tutorial is to achieve an optimal magnet shape to minimize the ripple torque at a specific
working point while maintaining the torque reached at this working point and without increasing the magnet
mass.
HS-4215: Multi-Disciplinary Design Optimization
Study
Learn how to perform a multi-disciplinary design Optimization study. The disciplines used in this tutorial are
structural performance and cost.
Before you begin, copy the model files used in
this tutorial from <hst.zip>/HS-4215/ to your working
directory.
Structural performance is simulated using OptiStruct, and
Cost is simulated using Compose or Python. Optimization parameters
for both the simulations are identified in template files corresponding to each
input deck:
tail.fem
OptiStruct
tail.oml
Compose
tail.py
Python
It is assumed that the tail is cantilevered about its inboard section. Three loading
scenarios are considered; one where the tail experiences pressure loads of 0.25 psi
on the bottom skin, a second where the tail experiences a tip load of 400 lbs, and a
third where the tail experiences both the pressure load and tip load simultaneously.
The applied loading is represented in Figure 2.
Problem Formulation for this study is as follows:
Input variables
Glass fabric thickness at inboards; initial value = 0.1; lower bound =
0.01, upper bound = 2.0
Glass fabric thickness at midspan; initial value = 0.1; lower bound =
0.01, upper bound = 2.0
Glass fabric thickness at outboards; initial value = 0.1; lower bound =
0.01, upper bound = 2.0
Core thickness at inboards; initial value = 0.1; lower bound = 0.01,
upper bound = 2.0
Core fabric thickness at midspan; initial value = 0.1; lower bound =
0.01, upper bound = 2.0
Core fabric thickness at outboards; initial value = 0.1; lower bound =
0.01, upper bound = 2.0
Note: Both models have seven input variables; however values of the
input variables need to be consistent between the two models. In
order to obtain this, we will be linking the two sets of input
variables to each other.
Objective
Minimize the cost
Design constraints
Maximum displacement must be less than its baseline value of 31
Perform the Study Setup
Start a new study in the following ways:
From the menu bar, click File > New.
On the ribbon, click .
In the Add Study dialog, enter a study name, select a
location for the study, and click OK.
Go to the Define Models step.
Add a Parameterized File model.
From the Directory, drag-and-drop the
tail_structure_optistruct.tpl file into the
work area.
In the Solver Input File column, enter
tail.fem.
This is the name of the solver input file HyperStudy writes during the
evaluation.
In the Solver Execution Script column, select OptiStruct
(os).
Add a second Parameterized File model.
From the Directory, drag-and-drop the appropriate
.tpl file into the work area.
If you are using Python, use
tail_cost_python.tpl.
If you are using Compose, use
tail_cost_compose.tpl.
In the Solver Input File column, enter a name for the solver input file
HyperStudy writes during any
evaluation.
If you are using Python, enter
tail.py.
If you are using Compose, enter
tail.oml.
In the Solver Execution Script column, select either:
Python
(py)
Compose
(oml)
If you are using Compose as the solver
execution script, in the Solver Input Arguments column, enter
-f before
$file.
Note: If you are using Compose as part the
HyperWorks suite, than HyperStudy should automatically point to the correct
.bat file. If you have Compose as a separate installation, than during the
Register Solver Script step you must point to
Compose_batch.bat.
Click Import Variables.
Fourteen input variables are imported from the two
.tpl resource files.
Go to the Define Input Variables step.
Review the input variable's lower and upper bound ranges.
Link input variables.
Click the Links tab.
In the Varname column, copy all of the independent variables (all
variables from Model_1).
In the Expression column of all of the dependent input variables (all
variables from Model_2), paste the independent variables.
Perform Nominal Run
Go to the Test Models step.
Click Run Definition.
An approaches/setup_1-def/ directory is created
inside the study directory. The
approaches/setup_1-def/run__00001/m_1 and
approaches/setup_1-def/run__00001/m_2 sub-directories
contain the tail.h3d (for maximum displacement) and
cost.res (for cost) files, which are the result of the
nominal run, and will be used in the optimization.
Create and Evaluate Output Responses
In this step you will create two output responses: MaxDisp and Cost.
Go to the Define Output Responses step.
Create the MaxDisp output response.
From the Directory, drag-and-drop the tail.h3d
file, located in
approaches/setup_1-def/run__00001/m_1, into the
work area.
In the File Assistant dialog, set the Reading
technology to Altair® HyperWorks® and click
Next.
Select Multiple Items at Multiple Time Steps,
then click Next.
Define the following options and click
Next.
Subcase: Subcase 5 (Combo)
Type: Displacement (Grids)
Request - Start: Select First Request and
enter N4660
Request - End: Select Last Request and
enter N7528
Component: Mag.
Select the Create individual Responses (1)
checkbox, and then select Maximum.
Click Finish.
The output response is added to the work area.
In the work area, Label column, change the label to
MaxDisp.
Create the Cost output response.
From the Directory, drag-and-drop the cost.res
file, located in
approaches/setup_1-def/run__00001/m_1, into the
work area.
In the File Assistant dialog, set the Reading
technology to Altair® HyperWorks® and click
Next.
Select Single item in a time series, then click
Next.
Define the following options and click
Next.
Type: Unknown.
Request: Block 1.
Component: Column 1.
Label the output response Cost.
Set Expression to First Element.
Click Finish.
The Cost output response is added to the work area.
Click Evaluate to extract the response values.
Run Optimization
Add an Optimization.
In the Explorer, right-click and select
Add from the context menu.
In the Add dialog, select
Optimization and click OK.
Go to the Optimization > Definition > Define Output Responses step.
Click the Objectives/Constraints - Goals tab.
Apply an objective on the Cost output response.
Click Add Goal.
In the Apply On column, select Cost.
In the Type column, select Minimize.
Apply a constraint to the MaxDisp output response.
Click Add Goal.
In the Apply On column, select MaxDisp.
In the Type column, select Constraint.
deterministic
In column 1, select <= (less than or equal
to).
In column 2, enter 31.
Go to the Optimization > Specifications step.
In the work area, set the Mode to Adaptive
Response Surface Method (ARSM).
Note: Only the methods that are valid for the problem formulation are enabled.
Click Apply.
Go to the Optimization > Evaluate step.
Click Evaluate Tasks.
View iteration history of Optimization.
Click the Iteration Plot tab to plot the
progress of the Optimization iteration.
Using the Channel selector, select Objective_1
and Constraint_1.
The evolution of the objective function and constraint vs. iterations is
2D plotted. You can see that the cost of the horizontal tail plane is reduced
from 72715 to 67700 (7% reduction), while keeping the structural performance the
same.