In this tutorial, shape optimization on a solid bracket model will be performed using the Free Shape optimization method. The objective of this optimization is to reduce the stress by changing the geometry of the bracket model.
The essential idea of free-shape optimization, and where it differs from other shape optimization techniques, is that the allowable movement of the outer boundary is automatically determined, thus relieving users of the burden of defining shape perturbations.
The optimization problem for this tutorial is stated as:
Objective:
|
Minimize (Max von Mises Stress)
|
Constraints:
|
No Constraints
|
Design variables:
|
Grids move normal to the surface
|
In this tutorial, you will learn to:
• | Setup a free-shape optimization |
• | Post-process the free-shape optimization results |
• | Setup a new free-shape optimization simulation with moving constraints |
• | Post-process the new free-shape optimization results |
Exercise
Step 1: Set the User Profile and Retrieve the File
1. | Launch HyperMesh Desktop. |
2. | Choose OptiStruct in the User Profiles dialog 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. |
User Profiles can also be accessed from the Preferences menu on the toolbar.
3. | Select the Open Model toolbar icon . |
4. | Select the free_shape3D.hm file you saved to your working directory from the optistruct.zip file. Refer to Accessing the Model Files. |
5. | Click Open. The free_shape3D.hm database is loaded into the current HyperMesh session, replacing any existing data. |
The location of free_shape3D.hm file displays in the File: field.
6. | Click return to go to the main menu. |
Step 2: Create Free-shape Design Variables (DSHAPE Cards)
1. | From the Analysis page, click optimization. |
2. | Select the free shape panel. |
3. | Click name= and enter shape. |
4. | Select nodes, as shown in the figure (select only the face nodes that are also on shells). |
Free-shape design space
6. | Click return to go to the main menu. |
Step 3: Define the Optimization Problem
1. | Select responses panel. |
2. | For response=, enter Stress. |
3. | Set the response type to static stress. |
4. | Click prop and select the stress_faces component which contains skin shells. |
5. | Click on the button below von mises and select both surfaces. |
7. | Click return to go back to the optimization panel. |
Step 4: Define the Objective Reference
2. | For dobjref =, enter MAX_STR. |
3. | Check pos reference; this gives the value 1.0. |
4. | Click response and select stress. |
6. | Click return to go back to the optimization panel. |
Step 5: Define the Objective Function
1. | Choose the objective panel. |
2. | Click the left-most toggle and select minmax. |
3. | Click dobjrefs and select MAX_STR. |
5. | Click return twice to go back to main menu. |
Step 6: Define the SHAPE Card
Only displacement and stress results are available in the _s#.h3d file by default. In order to look at stress results on top of a shape change that was applied to the model in HyperView, a SHAPE card needs to be defined.
1. | From the Analysis page, select the control cards panel. |
3. | Click next to see more cards. |
4. | Set both TYPE and OPTION to ALL. |
5. | Click return twice to go back to the main menu. |
Step 7: Launch OptiStruct
1. | From the Analysis page, click OptiStruct. |
2. | Click save as following the input file: field. |
3. | Select the directory where you would like to write the OptiStruct model file and enter the name for the model, Free_Shape3D.fem, in the File name: field. |
The name and location of the Free_Shape3D.fem file displays in the input file: field.
5. | Set the memory options toggle to memory default. |
6. | Click the run options switch and select optimization. |
7. | Set the export options toggle to all. |
8. | Click OptiStruct. This launches an OptiStruct run in a separate solver GUI window. |
If the optimization was successful, no error messages are reported in the GUI window. The optimization is complete when the message Job completed appears in the window.
Post-processing the Free-shape Optimization Results
This section describes how to view the results in HyperView which will be launched from within the OptiStruct panel of HyperMesh.
HyperView is a complete post-processing and visualization environment for finite element analysis (FEA), multi-body system simulation, video and engineering data.
Step 8: View Shape Results
1. | While in the OptiStruct panel of the Analysis page, click HyperView. |
Note that the message window opens to indicate that Free_Shape3D_des.h3d and Free_Shape3D.h3d are opened.
2. | Click Close to close the Message Log window. |
Free_Shape3D_des.h3d will be opened in page 2 and Free_Shape3D.h3d will be opened in page 3 of HyperView.
3. | Use the navigation icons, seen in the figure below to navigate to Design History (page 2). |
4. | Select the last iteration (Iteration 8) using the drop-down selection, seen in the image below. |
5. | Go to the Deformed panel . |
6. | Set the Result type: to Shape change. |
7. | Click Apply. Shape optimization results are applied to the model. The figure below shows the results. |
Step 9: View a Contour Plot of the Stress on Top of the Shape Optimized Model
1. | Use the navigation icons, seen in the figure below, to navigate to Subcase 1 - step (page 3). |
2. | Select the last iteration (iteration 8) using the drop-down selection, as seen in the image below. |
3. | Go to the Contour panel and select Element Stresses [2D & 3D] as the Result type:. |
4. | For stress type, select von Mises. |
5. | Click Apply. The stress contour shows on top of the shape changes applied to the model. |
Setting Up a New Free-shape Optimization Simulation with Moving Constraints
In the previous run, no constraints were applied on the movement of the DSHAPE grids. Therefore, grids are free to move and the part thickness increases, as shown in the figure.
Free-shape results without constraints
In practice, however, there will be some sort of constraints imposed upon the movement of grids due to manufacturability. For this tutorial model, thickness must be unchanged to avoid any interference with other parts.
The next step will describe how to define constraints on DSHAPE grids such that the thickness of design space will remain unchanged.
Step 10: Add Constraints on DSHAPE Grids
The constraints on free-shape design grids will be created separately for curved and flat parts of the design space. The parts of the design space that are grouped as curved and those grouped as flat are illustrated in the figure below.
Design space on curved and flat part
The constraints on the curved part will be created using a local rectangular coordinate system (the other constraints on the flat part do not need a local coordinate system). Therefore, a local rectangular coordinate system (z-axis will point to normal to DSHAPE surface) needs to be created first.
1. | Use the page navigation controls to move back to Page 1 and the HyperMesh client. |
2. | Back in HyperMesh, click return and go to the 1D page. |
4. | Select the create by axis direction subpanel. |
5. | Click nodes and select node ID 20999 (See the following figure). |
6. | Click origin and select the same node (ID 20999) as nodes. |
7. | Click x-axis and select node ID 15989. |
8. | Click xy-plane and select node ID 19462. |
Local coordinate system
11. | From the Analysis page, click optimization. |
12. | Select the free shape panel. |
13. | Select the gridcon subpanel. |
The constraints on the flat part will be created first without any coordinate system.
14. | Click desvar= and select shape. |
15. | Select constraint type as planar. |
16. | Select nodes, shown in the following figure. |
Constraints on Free Shape design space
17. | Click the vector definition switch and select vectors. |
18. | Select N1, N2, and N3 as those three nodes on plane geometry (as shown in the figure). |
Three nodes to defined the plane
These nodes will move only on the specified plane above. Next, the constraints on the curved part will be created using a local coordinate system.
20. | Select constraint type as vector. |
22. | Select nodes, shown in the following figure (select only the nodes that are on the curved part). |
Constraints on free-shape design space on curved part
23. | Click direction selector and select local system. |
24. | Click the local coordinate system created in the previous step. |
25. | Click the vector definition switch and select vector. |
26. | Click the direction definition switch below vector, and select z-axis from the pop-up menu. |
28. | Click return twice to get back to the main menu. |
Step 11: Launch OptiStruct
1. | From the Analysis page, click OptiStruct. |
2. | Click save as following the input file: field. |
3. | Select the directory where you would like to write the OptiStruct model file and enter the name for the model, Free_Shape3D_const.fem, in the File name: field. |
The name and location of the Free_Shape3D_const.fem file displays in the input file: field.
5. | Set the memory options toggle to memory default. |
6. | Click the run options switch and select optimization. |
7. | Set the export options toggle to all. |
Post-processing the New Free-shape Optimization Results
Follow the previously described steps on how to post-process the results (optimization results without constraints) using HyperView, and compare the final shape change and stress results.
See Also:
OptiStruct Tutorials