OS-T: 5020 3D Bracket Model using the Free-shape Method

In this tutorial you will perform a shape optimization on a solid bracket model 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.

Launch HyperMesh and Set the OptiStruct User Profile

1. Launch HyperMesh.
The User Profile dialog opens.
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.

Open the Model

1. Click File > Open > Model.
2. Select the free_shape3D.hm file you saved to your working directory from the optistruct.zip file. Refer to Access the Model Files.
3. Click Open.
The free_shape3D.hm database is loaded into the current HyperMesh session, replacing any existing data.

Set Up the Optimization

Create Free-shape Design Variables

1. From the Analysis page, click the optimization panel.
2. Click the free shape panel.
3. In the name= field, enter shape.
4. Using the nodes selector, select the nodes shown in Figure 2. Sselect only the face nodes that are also on shells.
5. Click create.

Create Optimization Responses

1. From the Analysis page, click optimization.
2. Click Responses.
3. Create a static stress response.
1. In the response= field, enter Stress.
2. Set the response type to static stress.
3. Using the props selector, select stress_faces.
4. Set the response selector to von mises.
5. Under von mises, select both surfaces.
6. Click create.

Define the Objective Function

1. Create an objective reference.
1. Click the obj reference panel.
2. In the dobjref= field, enter MAX_STR.
3. Click response= and select stress.
4. Select pos reference=.
A value of 1.0 is assigned by default.
5. Click create.
2. Define the objective.
1. Click the objective panel.
2. Select minmax.
3. Using the dobjrefs= selector, select MAX_STR.
4. Click create.

Define the SHAPE Card

Only displacement and stress results are available in the _s#.h3d file by default. To obtain analysis results (displacement/stress/temperature) 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, click the control cards panel.
2. In the Card Image dialog, click SHAPE.
3. Set FORMAT to H3D.
4. Set TYPE to ALL.
5. Set OPTION to ALL.
6. Click return twice to go back to the main menu.

Run the Optimization

1. From the Analysis page, click OptiStruct.
2. Click save as.
3. In the Save As dialog, specify location to write the OptiStruct model file and enter Free_Shape3D for filename.
For OptiStruct input decks, .fem is the recommended extension.
4. Click Save.
The input file field displays the filename and location specified in the Save As dialog.
5. Set the export options toggle to all.
6. Set the run options toggle to optimization.
7. Set the memory options toggle to memory default.
8. Click OptiStruct to run the optimization.
The following message appears in the window at the completion of the job:
OPTIMIZATION HAS CONVERGED.
FEASIBLE DESIGN (ALL CONSTRAINTS SATISFIED).
OptiStruct also reports error messages if any exist. The file Free_Shape3D.out can be opened in a text editor to find details regarding any errors. This file is written to the same directory as the .fem file.
9. Click Close.

View the Results

View the Shape Results

1. From the OptiStruct panel, click HyperView.
HyperView launches within the HyperMesh Desktop and loads Free_Shape3D_des.h3d file in page 2 and the Free_Shape3D.h3d file in page 3.
2. In the top, right of the application, use the navigations buttons to navigate to the Design History (page 2).
3. In the Results Browser, select the last iteration (Iteration 8).
4. On the Results toolbar, click to open the Deformed panel.
5. Set the Result type: to Shape change.
6. Click Apply.
Shape optimization results are applied to the model.

View a Contour Plot of the Stress

1. In the top, right of the application, use the navigations buttons to navigate to the Subcase 1 - step (page 3).
2. In the Results Browser, select the last iteration (iteration 8).
3. On the Results toolbar, click to open the Contour panel.
4. Set the Result type to Element Stresses [2D & 3D].
5. Set the stress type to von Mises.
6. Click Apply.
The stress contour shows on top of the shape changes applied to the model.

Set 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.

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.

In this step you will define constraints on DSHAPE grids such that the thickness of design space will remain unchanged.

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.

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. In the top, right of the application, click / to move back to Page 1 and the HyperMesh client.
2. In HyperMesh, click return.
3. Define a local coordinate system.
1. From the 1D page, click the systems panel.
2. Select the create by axis direction subpanel.
3. Click nodes > by id, then enter 20999 in the id= field.
4. Click origin and enter 20999 in the id= field.
5. Click x-axis and enter 15989 in the id= field.
6. Click xy-plane and enter 19462 in the id= field.
7. Click create.
8. Click return.
4. From the Analysis page, click the optimization panel.
5. Click the free shape panel.
6. Select the gridcon subpanel.
7. Create constraints on the flat part without any coordinate system.
1. Click desvar= and select shape.
2. Set the constraint type to planar.
3. Using the nodes selector, select the nodes shown in Figure 12.
4. Set the vector definition to vectors.
5. Using the N1, N2, and N3 selectors, select the three nodes on plane geometry.
These nodes will move only on the specified plane.
8. Create constraints on the curved part using a local coordinate system.
1. Set the constraint type to vector.
2. Using the nodes selector, select the nodes shown in Figure 14.
Only select the nodes that are on the curved part.
3. Set the direction selector to local system, then click the local coordinate system you created.
4. Set the vector definition switch to vector.
5. Set the direction definition, under vector, to z-axis.
9. Click return twice to get back to the main menu.

Run the Optimization

1. From the Analysis page, click OptiStruct.
2. Click save as.
3. In the Save As dialog, specify location to write the OptiStruct model file and enter Free_Shape3D_const for filename.
For OptiStruct input decks, .fem is the recommended extension.
4. Click Save.
The input file field displays the filename and location specified in the Save As dialog.
5. Set the export options toggle to all.
6. Set the run options toggle to optimization.
7. Set the memory options toggle to memory default.
8. Click OptiStruct to run the optimization.
The following message appears in the window at the completion of the job:
OPTIMIZATION HAS CONVERGED.
FEASIBLE DESIGN (ALL CONSTRAINTS SATISFIED).
OptiStruct also reports error messages if any exist. The file Free_Shape3D_const.out can be opened in a text editor to find details regarding any errors. This file is written to the same directory as the .fem file.
9. Click Close.

View the 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.