In this tutorial a topology optimization using draw direction constraints on a control arm is performed. The finite element mesh containing designable (brown) and non-designable regions (blue) is shown in Figure 1.
Figure 1. Control arm schematic.
The following exercises are included:
• | Setting up topology design variables and the draw direction constraints in HyperMesh |
• | Setting up the optimization problem in HyperMesh |
• | Post-processing the results in HyperView |
Exercise
Setting Up Topology Design Variables and the Draw Direction Constraints in HyperMesh
Step 1: Launch the HyperMesh Desktop and Load the User Profile
1. | Launch HyperMesh Desktop. The User Profiles dialog appears. |
2. | Select OptiStruct and click OK. This loads the user profile. It includes the appropriate template, macro menu, and import reader, paring down the functionality of HyperMesh to what is relevant for generating models for OptiStruct. |
Step 2: Retrieve the controlarm.hm file
1. | From the File menu on the toolbar, select Open. An Open file browser window opens. |
2. | Select the controlarm.hm file you saved to your working directory from the optistruct.zip file. Refer to Accessing the Model Files. |
3. | Click Open. The controlarm.hm database is loaded into the current HyperMesh session. |
Step 3: Create Design Variables for Topology Optimization with 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.
1. | From the Analysis page, click optimization. |
2. | Select the topology panel. |
3. | Make sure the create radio button is selected on the left hand side of the panel. |
4. | Enter a name in desvar = dv1. |
5. | Click props and select Design. |
7. | Set the type: toggle to PSOLID. |
9. | Click the draw radio button, 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.
11. | Enter the value 3029 and press ENTER. This selects node ID 3029. |
13. | Enter the value 4716 and press ENTER. This selects node ID 4716. |
14. | Under obstacle, double-click props, 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.
16. | Click return to go back to the Optimization panel. |
Setting Up the Optimization Problem in HyperMesh
Step 4: Create the Optimization Responses
1. | Select the responses panel. |
2. | In the response = field, enter Volfrac. |
3. | Select the switch below response type: and set it to volumefrac. |
5. | In the response = field, enter Compl. |
Just eight characters can be used here. Since the name is used, a label is needed for the response.
6. | Set the response type: to weighted comp (use the arrows to access the second page, if not shown). |
7. | Click loadsteps, check the boxes next to both loadcases, and click return. |
9. | Click return to go back to the Optimization panel. |
Step 5: Apply Design Constraints on Volume Fraction Response
1. | Click dconstraints to define the constraints. |
2. | Enter Constr in the constraint = field. |
Only eight characters can be used here. Since the name is used, a label is needed for the response.
3. | Select upper bound = by clicking in the box preceding it. |
4. | Click in the text box and enter the value 0.3. |
5. | Click response = and select Volfrac. |
6. | Click create. The volume fraction constraint is now created. |
7. | Click return to go back to the Optimization panel. |
Step 6: Set Minimize Compliance as Objective
1. | Click objective to define the objective function. |
2. | Click the min/max switch in the upper left corner and select min. |
3. | Click response and select Compl. |
This completes your optimization problem setup.
Step 7: Save the Database
1. | From the File menu on the toolbar, select Save as > Model. |
2. | Change the file name to controlarm_opt.hm and click Save. |
Step 8: Run OptiStruct
1. | From the Analysis page, select the OptiStruct panel. |
2. | Set the export options: toggle to all. |
3. | Click the run options: switch and select optimization. |
4. | Set the memory options: toggle to memory default. |
5. | 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.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.hist
|
The OptiStruct iteration history file containing the iteration history of the objective function and of the most violated constraint. Can be used for a xy plot of the iteration history.
|
controlarm_opt.oss
|
OSSmooth file with a default density threshold of 0.3. You may edit the parameters in the file to obtain the desired results.
|
controlarm_opt.out
|
OptiStruct output file containing specific information on the file setup, the set up of your optimization problem, estimates for the amount of RAM and disk space required for the run, information for all optimization iterations, 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.html
|
Automatic .html report generation which can be viewed in Netscape or MS Internet Explorer using the HyperView Player 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.
|
controlarm_opt.mvw
|
HyperView session file.
|
controlarm_opt_hist.mvw
|
HyperView session file with the history plots.
|
controlarm_opt_frames.html
|
HTML file used to post-process the .h3d with HyperView Player using a browser. It is linked with the _menu.html file.
|
controlarm_opt_menu.html
|
HTML file used to post-process the .h3d with HyperView Player using a browser.
|
controlarm_opt_des.H3D
|
HyperView binary results file that contains: Density results from topology optimizations, Shape results from topography or shape optimizations and Thickness results from size and topology optimizations.
|
controlarm_opt_s1.H3D
controlarm_opt_s2.H3D
|
HyperView binary results file that contains: Displacement results from linear static analysis, Element strain energy results from normal mode analysis and Stress results from linear static analysis, etc.
|
controlarm_opt.res
|
HyperMesh Binary result file.
|
Post-processing the Results using HyperView
OptiStruct provides the Element density information for all of the iterations. OptiStruct will also show Displacement and von Mises stress results of a linear static analysis for iteration 0 and iteration 38. This section describes how to view those results in HyperView. First, the HyperMesh binary results file needs to be loaded.
Step 9: Contour Plot of Element Densities
1. | From the OptiStruct panel, click HyperView. |
2. | Click Close to close the message GUI. |
3. | Select the last iteration in the Results browser. |
4. | Click the Contour icon . |
5. | Under Result type:, select Element densities (s) from the first menu and Density for the second menu. |
6. | Set the Averaging method: to Simple. |
The resulting contours represent the displacement field resulting from the applied loads and boundary conditions.
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.
Step 10: Iso Plot of the Densities
The iso surface 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.
1. | Click the Iso Value icon . |
2. | Set the Result type: to Element Densities (s). |
3. | Make sure the last iteration is still selected in the Results browser. |
5. | Enter a value of 0.3 in the Current value: field. |
6. | Make sure that Show values: is set to Above. |
7. | Also check the boxes next to Features and Transparent. |
8. | You can also move the slider bar to change current value of Element densities. |
Isosurface plot of element densities.
Step 11: Plot a Contour of Displacements and Stresses
1. | Click the Next Page arrow to proceed to the results of Load Case 1 on page 3. |
2. | Set the animation mode to Linear Static . |
3. | Click the Contour icon . |
4. | Set the Result type: to Displacements (v). |
5. | Click Apply. This will give a displacement plot for Iteration 0. |
6. | Set the iteration to the last iteration in the Model browser. |
A displacement plot for the last Iteration # should be visible.
Displacement contour for the first loadstep at the last iteration.
The stress results are also available for the respective iterations.
7. | Similarly, results for Load Case 2 can be viewed on page 4 using Next Page. |
Displacement contour for the second loadstep at the last iteration.
See Also:
OptiStruct Tutorials