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.
Learn how to perform a multi-disciplinary size optimization for two finite element
models defined for OptiStruct that have common input variables.
Before you begin, copy the model files used in
this tutorial from <hst.zip>/HS-4210/ to your working
directory.
The objective is to minimize the volume of the plate under a stress and a frequency
constraint. The input variables are the thickness of each of the three components,
defined in the input deck via the PSHELL card. The thickness should be between 0.05
and 0.15; the initial thickness is 0.1. The optimization type is size. To
demonstrate the use of the optimization tool in a multi-disciplinary optimization,
two models are created. One model is used for the stress analysis and one for the
frequency analysis. Both models must have the same input variables. Figure 1. Double Symmetric Plate Model
Perform the Study Setup
Start HyperStudy.
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 plate1.tpl
file, located in
approaches/setup_1-def/run__00001/m_1, into the
work area.
Figure 2.
In the Solver input file column, enter
plate1.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 Parameterized File model.
From the Directory, drag-and-drop the plate2.tpl
file, located in
approaches/setup_1-def/run__00001/m_2, into the
work area.
Figure 3.
In the Solver input file column, enter
plate2.fem.
In the Solver execution script column, select OptiStruct
(os).
Click Import Variables.
Six input variables are imported from the
plate1.tpl and plate2.tpl resource
file.
Go to the Define Input Variables step.
Review the input variable's lower and upper bound ranges.
Link Property 21 to Property 11.
Click the Links tab.
In the Expression column of the input variable Property 21, click
.
In the Expression Builder, click the
Input Variables tab.
In the work area, select Property 11.
Click Insert Varname.
The expression var1 appears in the
Evaluate expression field. Figure 4.
Click OK.
Property 21 of Model 2 is linked to Property 11 of Model
1.
Create two more links.
Link Property 22 to Property
12.
Link Property 23 to Property
13.
Figure 5.
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 plate2.out (for the structural volume and
frequency) and plate1.h3d (for the stresses) files, which
are the results of the nominal run, and will be using during the
Optimization.
Create and Evaluate Output Responses
In this step you will create three output responses: Volume, Stress43, and
Frequency1.
Go to the Define Output Responses step.
Create the Volume output response, which represents the volume of the
plate.
From the Directory, drag-and-drop the plate2.out
file, located in
approaches/setup_1-def/run__00001/m_2, 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, then click
Next.
Set Type to Volume.
Set Request to Volume.
Set Component to Value.
Figure 6.
Label the output response Volume.
Set Expression to First Element.
Note: Because there is only a single value in this data source, [0] is
inserted after m_2_ds_1, thereby choosing the first (and only) entry
in the data source.
Figure 7.
Click Finish.
The Volume output response is added to the work area.
Create the Stress43 output response, which represents the von Mises Stress of
Element 43.
From the Directory, drag-and-drop the plate1.h3d
file, located in
approaches/setup_1-def/run__00001/m_1, into the
work area.
The file contains the analysis results, including the stresses.
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, then click
Next.
Set Subcase to Subcase 1 (Load).
Set Type to Element Stresses (2D & 3D)
(2D).
Set Requests to E43.
Set Component to vonMises (Mid).
Label the output response Stress43.
Set Expression to First Element.
Click Finish.
The Stress43 output response is added to the work
area.
Create the Frequency1 output response, which represents the frequency
results.
From the Directory, drag-and-drop the plate2.out
file, located in
approaches/setup_1-def/run__00001/m_2, into the
work area.
In the File Assistant dialog, click
Next.
Select Single item in a time series, then click
Next.
Define the following options, then click
Next.
Set Type to Frequency1.
Set Requests to Mode 1.
Set Component to Value.
Label the output response Frequency1.
Set Expression to First Element.
Click Finish.
The Frequency1 output response is added to the work
area.
Click Evaluate to extract the output response
values.
Figure 8.
Run Optimization
Add an Optimization.
In the Explorer, right-click and select
Add from the context menu.
In the Add dialog, select
Optimization.
For Definition from, select an approach and click OK.
Go to the Optimization 1 > Definition > Define Output Responses step.
Click the Objectives/Constraints - Goals tab.
Apply an objective on the Volume output response.
Click Add Goal.
In the Apply On column, select Volume.
In the Type column, select Minimize.
Figure 9.
Apply a constraint on the Stress43 output response.
Click Add Goal.
In the Apply On column, select Stress43.
In the Type column, select Constraint.
deterministic
In column 1, select <= (less than or equal
to).
In column 2, enter 22.
Figure 10.
Apply a constraint on the Frequency1 output response.
Click Add Goal.
In the Apply On column, select Frequency1.
In the Type column, select Constraint.
deterministic
In column 1, select >= (less than or equal
to).
In column 2, enter 32.
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.
Plot the progress of the Optimization iteration.
Click the Iteration Plot tab.
Using the Channel selector, select Goal 1,
Goal 2, and Goal
3.
Above the Channel selector, activate and enable
the Bounds setting.
Over the course of the optimization, the objective is minimized and at
the conclusion, the constraints are satisfied. In the plots, the large markers
indicate a design which has at least one violated constraint and a small marker
indicates a feasible design. At the optimal design, the only active constraint
is Constraint 1. In contrast, constraint 2 is not active at the optimum; this
indicates Constraint 2 does not have an influence on the result. Figure 11.