All of the files referenced in the OptiStruct tutorials are located in the HyperWorks installation directory under <install_directory>/tutorials/os/. If the location of the HyperWorks installation directory is not known, contact your systems administrator.
In this lesson, you will perform a topology optimization using draw direction constraints on a control arm. The finite element mesh containing designable (yellow) and non-designable regions (blue) is shown in Figure 1.
Figure 1. Control arm schematic.
The following exercises are included in this tutorial:
· Setting up topology design variables and the draw direction constraints in HyperMesh
· Setting up the optimization problem in HyperMesh
· Running OptiStruct
· Post-processing the results
To retrieve the structural model and define the OptiStruct template:
Launch HyperMesh.
Choose OptiStruct in the User Profiles dialog and click OK.
This loads the OptiStruct user profile. It includes the OptiStruct template, macro menu, and import reader, paring down the functionality of HyperMesh to what is relevant for use with OptiStruct.
User Profiles… can also be accessed from the Preferences pull-down menu on the toolbar.
Select the Files
panel toolbar button
.
Select the hm file subpanel using the radio buttons on the left side of the panel.
Click retrieve….
An Open file… browser window appears.
Select the controlarm.hm file, located in the HyperWorks installation directory under <install_directory>/tutorials/os/.
Click Open.
The controlarm.hm database is loaded into the current HyperMesh session, replacing any existing data.
Note the location of controlarm.hm shows in the file: field.
To create design variables for topology optimization using draw direction constraints:
The draw direction constraints allow the casting feasibility of the design so that the topology determined will allow the die to slide in a given direction. These constraints are defined using the DTPL card. Two DRAW options are available. The option 'SINGLE' assumes that a single die will be used. The option 'SPLIT' assumes that two dies splitting apart in the given draw direction will be used to cast the part.
From the Analysis page select the optimization panel.
Select the topology panel.
Click create to select that sub-panel.
Click comps and select Design.
Click select.
Enter a name (max. 8 characters) in desvar =dv1.
Set the component type toggle to PSOLID.
Click create.
Click draw to go to the draw sub-panel and toggle the draw type to single.
The option 'SINGLE' assumes that a single die will be used and it slides in the given drawing direction. The anchor node and the first node define the drawing direction.
Click anchor node.
Enter the value 3029 and press enter.
This selects node ID 3029.
Click first node.
Enter the value 4716 and press enter.
This selects node ID 4716.
Under obstacle double-click comps, select non-design and click select.
This selects the non-designable parts as obstacles for the casting process on the same DTPL card. This preserves the casting feasibility of the final structure.
Click update.
Click return to go back to the optimization panel.
The optimization problem for this tutorial is stated as:
|
Objective: |
Minimize compliance. |
|
Constraints: |
Upper bound of 0.3 on the volume fraction. |
To define the responses:
Select the responses panel.
Turn the response type: selector to volumefrac.
Enter Volfrac in response = field.
Click create.
Set the response type: to weighted comp (located on the second page, accessed through arrows).
Enter Compl in the response = field.
Just eight characters can be used here, since the name is used, a label is needed for the response.
Click loadsteps and click both loadcases and click return.
Click create.
Click return to go back to the optimization panel.
To define the objective:
Click objective to define the objective function.
Click the min/max switch in the upper left corner and select min.
Click response and select Compl.
Click create.
Click return to go back to the optimization panel.
To define the constraint:
Click dconstraints to define the constraints.
Enter Constr in constraint = field.
Only eight characters can be used here. Since the name is used, a label is needed for the response.
Select upper bound = by clicking in the box preceding upper bound =.
Click in the text box and enter the value 0.3.
Click response = and select Volfrac.
Click create.
The volume fraction constraint is now created.
Click return twice.
This completes your optimization problem setup.
To save the database:
Select the Files
panel toolbar button
.
Select the hm file subpanel.
Click save as… to set the directory in which to save the file and, in File name:, type controlarm_opt.hm.
Click save.
To submit the job:
From the Analysis page, select the OptiStruct panel.
You can also get to the OptiStruct panel from the Applications pull-down menu on the toolbar.
Click save as… and select the directory where you would like to write the OptiStruct model file, enter the file name controlarm_opt.fem, and click Save.
Set the memory options: toggle to memory default.
Click the run options: switch and select optimization.
Set the export options: toggle to all.
Click OptiStruct.
This launches the OptiStruct job. If the job is successful, new result files will be seen in the directory where HyperMesh was invoked. The controlarm_opt.out file is a good place to look for error messages that will help to debug the input deck if any errors are present.
The default files that will be written to your directory are:
|
controlarm_opt.grid |
OptiStruct output file containing the grid point coordinates in the GRID bulk data format for the final design. |
|
controlarm_opt.hgdata |
HyperGraph file containing data for the objective function, percent constraint violations and constraint for each iteration. |
|
controlarm_opt.HM.comp.cmf |
HyperMesh command file used to organize elements into components based on their density result values. This file is only used with OptiStruct topology optimization runs. |
|
controlarm_opt.HM.ent.cmf |
HyperMesh command file used to organize elements into entity sets based on their density result values. This file is only used with OptiStruct topology optimization runs. |
|
controlarm_opt.his_dat |
OptiStruct iteration history file containing the iteration history of the objective function and of the most violated constraint. Can be used for an xy plot of the iteration history. |
|
controlarm_opt.oss |
OSSmooth file with a default density threshold of 0.3. The user may edit the parameters in the file to obtain the desired results. |
|
controlarm_opt.out |
OptiStruct output file containing specific information on the file set-up, the set-up of your optimization problem, estimate for the amount of RAM and disk space required for the run, information for each optimization iteration, and compute time information. It is highly recommended to review this file for warnings and errors that are flagged from processing the Controlarm_opt.fem file. |
|
controlarm_opt.h3d |
HyperMesh binary results file. |
|
controlarm_opt.html |
Automatic .html report generation which can be viewed in Netscape or MS Internet Explorer using the Altair HyperViewPlayer plug-in. |
|
controlarm_opt.sh |
Shape file for the final iteration containing the material density, void size parameters, and void orientation angle for each element in the analysis. The .sh file may be used to restart a run and, if necessary, run OSSmooth files for topology optimization. |
OptiStruct provides the density information for all of the iterations. OptiStruct will also show displacement and Von Mises stress results of a linear static analysis for iteration0 and iteration38. This section describes how to view those results in HyperView. First, the HyperMesh binary results file needs to be loaded.
To view a contour plot of element densities:
From the OptiStruct panel, click the HyperView button.
From the Graphics pull-down menu from the toolbar, choose Select Load Case.
Select Design under Load Case and Iteration 38 under Simulation.
Click the Contour
panel toolbar button
.
Under Result type:, select Element Densities (s) from the drop-down list and review the Density component.
Click Apply.
The resulting contours represent the displacement field resulting from the applied loads and boundary conditions.
Regions that need reinforcement tend towards a density of 1.0. Areas that do not need reinforcement tend towards a density of 0.0.
Is the max = field showing 1.0e+00?
In this case, it is showing 1.0e+00.
If it is not, the optimization has not progressed far enough. Allow more iterations and/or decrease the OBJTOL parameter (set in the opti control panel).
In this model, refining the mesh should provide a more discrete solution; however, for the sake of this tutorial, the current mesh and results are sufficient.
To view an isosurface plot of the densities:
The isosurface feature can be a very useful tool for post-processing density results from OptiStruct. For models with solid design regions, this feature becomes a vital tool for analyzing density results.
Click the Iso
Value toolbar button
.
Set the Result type: to Element densities (s).
At the bottom of the GUI, click on Design to activate the Load Case and Simulation Selection dialog.
Select the last iteration listed in the Simulation list.
Make sure that Show is set to Above.
Click Apply.
Move the slider below Current value: to look at the element densities.
You can also enter a value of 0.3 in the Current value: field.
To view a contour plot of the displacements and element stresses:
Click the Next Page arrow to proceed to the results of Load Case1 on page 2.
Change the animation mode from
Transient
to Linear
Static
.
Set the Result type: to Displacements (v).
Click Apply.
This will give a displacement plot for Iteration 0.
Click the greater than sign after
the iteration indicator
(at the bottom of the GUI) to
review the results for the next iteration.
A displacement plot for Iteration 38 should be visible.
Set the Result type: to Element stresses (3d) (s).
Click Apply.
The stress results are now available for the respective iterations.
Results for Load Case 2 can be viewed on page 3 using the Next Page arrow.
Go To