Tutorial Level: Intermediate In this tutorial, a topology optimization is performed on a bracket-hook modeled with
shell elements.
The structural model with loads and constraints applied is shown in Figure 1. The objective is to minimize the volume of the material used in the model
subject to certain stress constraints. Topology optimization is performed to find
the optimal material placement and reduce the volume. This optimization normalizes
each element according to its density and you can remove elements that have low
density.
Before you begin, copy the file(s) used in this tutorial to your
working directory.
The structural model is loaded into HyperMesh Desktop.
The constraints, loads, subcases and material properties are already defined in the
model. The topology design variables and the optimization problem setup are defined
using HyperMesh, and OptiStruct is used to determine the optimal material layout.
The results can then be reviewed in HyperView.
The optimization problem is stated as:
Objective Function
Minimize mass.
Constraints
Minimum Member Size = 1.0
Von Mises stress < 1000
Design Variables
The density of each element in the design space.
The following exercises are included:
Set up the optimization problem in HyperMesh.
Post-process the results in HyperView.
Launch HyperMesh
Launch HyperMesh.
In the New Session window, select HyperMesh from the list of tools.
For Profile, select OptiStruct.
Click Create Session.
Figure 2. Create New Session This loads the user profile, including the appropriate template, menus,
and functionalities of HyperMesh relevant for
generating models for OptiStruct.
Import the Model
On the menu bar, select File > Import > Solver Deck.
In the Import File window, navigate to and select
hook.fem you saved to your
working directory.
Click Open.
In the Solver Import Options dialog, ensure the Reader is
set to OptiStruct.
Figure 3. Import Base Model in HyperMesh
Accept the default settings and click Import.
Tip: Alternatively, you can drag and drop the file from your file
browser into the application window to open the model file.
Set Up the Optimization
Set the View
In the Model Browser, right-click on
Components and select
Isolate.
Only the components are displayed.
In the modeling window, click the
View Cube to fit the model to
the window.
Figure 4. Orient Model to Front
Use the arrows below the View Cube to orient the model to
Front view, so the Front face
is visible.
Create the Design Variables
In this step, create design variables for topology optimization.
Open the Optimize ribbon and click
Topology.
Figure 5. Topology Tool
For Name, enter shells.
For Config, verify topology is selected.
For Property Type, select PSHELL.
For List of Properties, click 0 Properties > to open Advanced Selection.
Select the base and hook on the
model.
Figure 6. Select Base and Hook
Click .
For Mindim, enter 1.0.
For Stress Constraint, enter 1000.
Click
Close.
Figure 7. Topology Design Variable (DESVAR) is Created This sets the optimization to optimize the shell elements in the Design
and Base components to create structural members with minimum member size of 1.0
unit in width and thicknesses that vary between zero and the thickness of the
shell. The optimization uses 1000 as the maximum stress for any element within
the design region when validating the design.
Create Responses
A detailed description is available in the Responses section of
the User Guide.
On the Optimize ribbon, click Responses.
Figure 8. Responses Tool
For Name, enter mass.
For Response Type, accept the default of mass.
Figure 9. Mass Optimization Response
Click
Close.
A response, mass, is defined for the total volume of the
model.
Apply Constraints
There is no need for additional constraints, since setting a stress target in the design
variable serves as a constraint that limits the
amount of material used in the optimized
model.
Define the Objective Function
In this step, the objective is to minimize the mass response defined in the Create Responses step.
On the Optimize ribbon, click Objectives.
Figure 10. Objectives Tool
Verify the Objective Type is set to Minimize.
For Response ID, click Unspecified.
Click the Search tool and select mass.
Click
Close.
The objective function is now defined.
Save the HyperMesh Database
From the ribbon, File tool group, select the Save.hm file icon.
Figure 11. Save
Select the directory where you would like to save the database.
For File name, enter hook_opt.hm.
Click Save.
Run the Optimization
From the Optimize tool, click Run.
Figure 12. Run Optimization
Select the directory where you want to write the OptiStruct model file.
For File name, enter hook_opt.
The .fem filename extension is the recommended extension
for Bulk Data Format input decks.
Click Save.
For Export, select All.
Click Export.
In the Altair Compute Console, click
Run.
If the job is successful, the following message appears in the window:
OPTIMIZATION HAS CONVERGED.
FEASIBLE DESIGN (ALL CONSTRAINTS SATISFIED).
New results files are seen in the directory where the model file was
written. The hook_opt.out file is a
good place to look for error messages that could help debug the input deck if
any errors are present.
The following default files are written to your run directory:
hook_opt_des.h3d
HyperView binary results file
containing the iso surface.
hook_opt_s--.h3d
HyperView binary results file
containing the displacement and stress results from each
loadcase.
hook_opt.mvw
Contains the design results and the displacement and stress
results from the *_des.h3d and
*_s1.h3d files.
hook_opt_hist.mvw
Contains the iteration history of the objective, constraints,
and the design variables. It can be used to plot curves in
HyperGraph, HyperView, and MotionView.
hook_opt.out
OptiStruct output file containing
specific information on the file setup, the setup of the
optimization problem, estimates for the amount of RAM and disk
space required for the run, information for all optimization
iterations, and compute time information. Review this file for
warnings and errors that are flagged from processing the
cclip_complete.fem file.
hook_opt.sh
Shape file for the final iteration. It contains the material
density, void size parameters, and void orientation angle for
each element in the analysis. This file can be used to restart a
run.
hook_opt.hgdata
HyperGraph file containing data for
the objective function, percent constraint violations, and
constraint for each iteration.
hook_opt.oss
OSSmooth file with a default density threshold of 0.3. You can
edit the parameters in the file to obtain the desired
results.
hook_opt.stat
Contains information about the CPU time used for the complete
run and also the break-up of the CPU time for reading the input
deck, assembly, analysis, convergence, and so on.
Post-process the Results
View the Iso Surface Plot of the Density Results
In the AltairCompute Console Solver Window, click
Results.
Figure 13. Open Results HyperView opens and the results of the
optimization run and corresponding linear static subcases are
loaded.
Click Contour.
Figure 14. Contour Tool
In the Results Browser, select the final iteration number, Iteration
26, from the drop-down menu.
For Result type, select Element Densities (s) and click
Apply.
Figure 15. Element Densities Contour Plot
On the ribbon, click Iso.
Select the Result type: Element densities (s).
Click Apply.
Change the Current value to see the results with varying
density values.
Figure 16. Change Current Value Figure 17. Isosurface Plot. The isosurface post-processing feature is an excellent tool to use for
viewing the density results from OptiStruct
(Current value = 0.460).
The isosurface in the modeling window interactively
update when you change it to a new value. Use this tool to get a better look
at the material layout and the load paths from OptiStruct.
View the Element Stress Results
To load the results of the linear static loadcases as well, click File > Session > Open, and select hook_opt.mvw. Click
Open, and then click Yes.
Expand the page selection dialog.
This is located at the top right of the window, near the search tool.Figure 18. Expand Page Selection
Select Subcase 19 - Subcase 1.
Figure 19. Select Subcase The next page is displayed with results loaded from
hook_opt_s19.h3d. This contains the linear static
results for the 1st subcase.
On the ribbon, click Contour.
Figure 20. Contour Tool
For Results type, first drop-down menu, select Element
stresses(2D&3D)(t).
Figure 21. Select Results Type
In the second drop-down menu, select vonMises.
In the Results Browser, set the displayed iteration to the last iteration,
Iteration 26.
Figure 22. Display Last Iteration
Click Apply.
Similarly, use this process to view results from the other subcase.
Figure 23. von Mises Stress Results
Notice that there are some local regions where the stresses are still
high; this is because topology stress constraints should be interpreted as
global stress control or global stress target.
The functionality has some
ways to filter out the artificial or local stresses caused by point loading
or boundary conditions, but those artificial stresses are not completely
removed unless the geometry is changed by shape optimization.
Note: There
might still be high local stress regions that can be improved more
effectively with local shape and size
optimization.