This tutorial demonstrates how to perform a size optimization on a welded bracket modeled with shell elements. The structural model with loads and constraints applied is shown in the figure below. The objective is to minimize the amount of material used in the model subject to certain stress specifications. The gauge changes of the bracket are linked to each other so that the gauge is identical for both sides at the optimal design.
Structural model of the welded bracket.
The structural model, as shown, is loaded into HyperMesh. The constraints, loads, material properties, and subcases (loadsteps) are already defined in the model. Size design variables and optimization parameters are defined and the OptiStruct software determines the optimal gauges. The results are then reviewed in HyperMesh.
The optimization problem is stated as:
Objective:
|
Minimize volume.
|
Constraints:
|
Maximum von Mises Stress of the brackets < 100 Mpa.
|
Design variables:
|
Gauges of the brackets.
|
The following exercises are included:
• | Setting up the size optimization problem in HyperMesh |
Exercise
Step 1: Launch the HyperMesh Desktop, Set the User Profile and Retrieve the Database File
1. | Launch HyperMesh Desktop. |
2. | 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 menu on the toolbar.
3. | Select the Open Model toolbar icon . |
4. | Select the bracket_size.hm file you saved to your working directory from the optistruct.zip file and click Open. Refer to Accessing the Model Files. |
The bracket_size.hm database is loaded into the current HyperMesh session, replacing any existing data.
Step 2: Define the Design Variables
1. | From the Analysis page, select the optimization panel. |
3. | Select the desvar subpanel using the radio buttons on the left-hand side of the panel. |
4. | Click desvar = and enter part1. |
5. | Click initial value = and enter 2.5. |
6. | Click lower bound = and enter 1.0. |
7. | Click upper bound = and enter 2.5. |
8. | Set the move limit toggle to move limit default. |
A design variable, part1, has been created. The design variable has an initial value of 2.5, a lower bound of 1.0, and an upper bound of 2.5.
10. | Repeat steps 4 through 9 to create the design variable part2 using the same initial value, lower, and upper bounds. |
11. | Select the generic relationship subpanel using the radio buttons on the left-hand side of the panel. |
12. | Click name = and enter part1_th. |
13. | Click the entity selection switch and choose prop. |
14. | Click prop and select part1 from the list of component collectors. A property selection switch now appears below the comp button. |
15. | Click the property selection switch and select Thickness T from the pop-up menu. |
16. | Click designvars. The list of design variables appears. |
17. | Check the box next to part1. |
The linear factor (value is box beside part1) is automatically set to 1.000.
A design variable to property relationship, part1_th, has been created relating the design variable part1 to the thickness entry on the PSHELL card for the component part1.
20. | Repeat steps 12 through 19 to create the design variable to property relationship part2_th relating the design variable part2 to the thickness entry on the PSHELL card for the component part2. |
21. | Click return to go to the Optimization Setup panel. |
Step 3: Link the Design Variables
1. | Select the desvar link panel. |
2. | Click dlink = and enter link1. |
3. | Click designvar=, under dependent:, and select part2. |
4. | Click designvars, under independent:, and activate part1. |
Note the linear factor (value is box beside part1) automatically is set to 1.000.
6. | Set C0 = 0.000 and CMULT = 1.000. |
The design variable part2 is now linearly dependent on the design variable part1.
8. | Click return to go to the Optimization Setup panel. |
Step 4: Define Responses
A detailed description can be found in the OptiStruct User's Guide under Responses.
1. | Select the responses panel. |
2. | Click response = and enter volume. |
3. | Click the response type: switch and select volume from the pop-up menu. Make sure type is set to total. |
4. | Click create. A response, volume, is defined for the total volume of the model. |
5. | Click response = and enter stress1. |
6. | Click the response type: switch and select static stress from the pop-up menu. |
7. | Click props and select the component part1. |
8. | Click select. A stress type selector switch appears. |
9. | Click the response selector switch and select von mises from the pop-up menu. |
10. | Click the switch under von mises and select both surfaces from the pop-up menu. |
11. | Click create. A response, stress1, is defined for the von Mises stress of the elements in the component part1. |
12. | Click response = and enter stress2. |
14. | Click one of the pink shell elements in the graphics window to select the component part2. |
16. | Click create. A response, stress2, is defined for the von Mises stress of the elements in the component part2. |
17. | Click return to go to the Optimization Setup panel. |
Step 5: Define the Objective Function
In this example, the objective is to minimize the volume response defined in the previous section.
1. | Select the objective panel. |
2. | Click the switch in the upper left corner of the panel, and select min from the pop-up menu. |
3. | Click response = and select volume from the response list. |
4. | Click create. The objective function is now defined. |
5. | Click return to return to the Optimization Setup panel. |
Step 6: Define Constraints
A response defined as the objective cannot be constrained. In this case, you cannot constrain the response volume.
Upper bound constraints are to be defined for the responses stress1 and stress2.
1. | Select the dconstraints panel. |
2. | Click constraint = and enter stress1. |
3. | Click response = and select stress1 from the list of responses. A loadsteps button appears in the panel. |
5. | Check the box next to STEP and click select. |
6. | Check the box next to upper bound =. |
7. | Click upper bound = and enter 100. |
8. | Click create. A constraint is defined on the response stress1. The constraint is an upper bound with a value of 100. The constraint applies to the subcase STEP. |
9. | Click constraint = and enter stress2. |
10. | Click response = and select stress2 from the list of responses. |
12. | Check the box next to STEP and click select. |
13. | Check the box next to upper bound =. |
14. | Click upper bound = and enter 100. |
15. | Click create. A constraint is defined on the response stress2. The constraint is an upper bound with a value of 100. The constraint applies to the subcase STEP. |
16. | Click return twice to go to the main menu. |
Step 7: Save the HyperMesh Database
1. | From the File menu, click Save As. A Save file browser window opens. |
2. | Select the directory where you would like to save the database, enter the name bracket_size.hm for the database, and click Save. |
Step 8: Launch OptiStruct
1. | Select the OptiStruct panel on the Analysis page. |
2. | Click save as following the input file: field. A Save file browser window opens. |
3. | Select the directory where you would like to write the OptiStruct model file and enter the name for the model, bracket_size.fem, in the File name: field. The suggested file extension for OptiStruct input decks is .fem. |
The name and location of the bracket_size.fem file displays in the input file: field.
5. | Set the memory options: toggle to memory default. |
6. | Set the run options: toggle to optimization. |
7. | Set the export options: toggle to all. |
8. | Click OptiStruct. This launches the OptiStruct job. |
If the job was successful, new results files can be seen in the directory where the OptiStruct model file was written. The bracket_size.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 written to the directory are:
bracket_size.hgdata
|
HyperGraph file containing data for the objective function, percent constraint violations and constraint for each iteration.
|
bracket_size.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.
|
bracket_size.html
|
HTML report of the optimization, giving a summary of the problem formulation and the results from the final iteration.
|
bracket_size.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 all optimization iterations, and compute time information. This file contains compliance, volume calculations, and gauge information for all optimization iterations. It is highly recommended this file be reviewed for warnings and errors.
|
bracket_size. prop
|
OptiStruct property output file containing all updated property data from the last iteration for size optimization.
|
bracket_size.h3d
|
HyperView binary results file.
|
bracket_size.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. The .sh file may be used to restart a run and, if necessary, run OSSmooth files for topology optimization.
|
bracket_size.stat
|
Summary of analysis process, providing CPU information for each step during analysis process.
|
Viewing the Results
Size optimization results from OptiStruct are given in two places. The bracket_size.out file contains gauge and volume information for all iterations. The bracket_size.h3d file contains the element thickness for all five iterations and Displacement and Stress results for the linear static analysis for iteration 0 and iteration 3. This section describes how to review all results. The results contained in the HyperMesh binary results file will be examined first. The gauge history in the bracket_size.out file will then be reviewed.
Step 9: View the Stress Results
After the size optimization, the stress value should be reviewed to make sure the stress constraints are not violated.
1. | When the message Process completed successfully is received in the command window, click HyperView. |
This launches HyperView and opens the results. A message window appears to inform about the successful loading of the model and result files into HyperView. Notice that all of the .h3d files get loaded, each into a different page in HyperView. The files bracket_size_des.h3d and bracket_size_s2.h3d get loaded in pages 2 and 3, respectively.
2. | Click Close to close the message window. |
3. | Click the Next Page toolbar icon . |
The third page has the results loaded from the bracket_size_s1.h3d file. The name of the page is displayed as Subcase 1 – STEP to indicate that the results correspond to subcase 1.
4. | Click the Contour toolbar icon . |
5. | Select the first drop-down menu below Result type: and select Element Stresses [2D & 3D] (t). |
6. | From the second drop-down menu, select vonMises. |
7. | Select None in the field below Averaging method:. |
A contoured image representing von Mises stresses should be visible. Each element in the model is assigned a legend color, indicating the von Mises stress value for that element resulting from the applied loads and boundary conditions. If you did not change the Iteration step, you should contour the stress of the initial step. To contour the final step, set the last iteration of that loadcase using the Model browser.
9. | Click the last Iteration # in the Simulation list. |
Notice only two iterations are displayed; the First and Last (FL) is the default setting for optimization runs. To change this setting, add an OUTPUT control card with a frequency setting of ALL.
This will now contour your final iteration of that loadcase. Review the stress to see that it is under the proper constraints.
Step 10: View the Thickness Results
1. | Click the Previous Page toolbar icon to move to the First page. |
2. | Make sure Result type: is set to Element Thicknesses (s). |
3. | Also make sure that you select Iteration 2 from the Load Case and Simulation Selection window. |
Alternatively, you can also open the bracket_size.prop file in a text editor to view the final gauge thicknesses of the two parts.
Review
The .out file contains a summary of the optimization process. From the information in the .out file, you can see how the objective, constraints, and design variables are changing from one iteration, to the next.
Has the volume been minimized for the given constraints?
Have the stress constraints been met?
What are the resulting gauges for the two parts?
Did the design variable linking work?
See Also:
OptiStruct Tutorials