OS-T: 4010 Size Optimization of a Welded Bracket
In this tutorial you will perform a size optimization on a welded bracket modeled with shell elements.
![4010_bracket](../../../images/solvers/4010_bracket.png)
You will load the structural model 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.
- Objective
- Minimize volume.
- Constraints
- Maximum von Mises Stress of the brackets < 100 Mpa.
- Design Variables
- Gauges of the brackets.
Launch HyperMesh and Set the OptiStruct User Profile
-
Launch HyperMesh.
The User Profile dialog opens.
-
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
- Click .
- Select the bracket_size.hm file you saved to your working directory.
-
Click Open.
The bracket_size.hm database is loaded into the current HyperMesh session, replacing any existing data.
Set Up the Optimization
Create Size Design Variables
- From the Analysis page, click the optimization panel.
- Click the size panel.
- Select the desvar subpanel.
-
Create the design variable, part1.
- In the desvar = field, enter part1.
- In the initial value = field, enter 2.5.
- In the lower bound = field, enter 1.0.
- In the upper bound = field, enter 2.5.
- Set the move limit toggle to move limit default.
- Set the discrete design variable (ddval) toggle to no ddval.
- Click create.
-
Create the design variable, part2.
- In the desvar = field, enter part2.
- In the initial value = field, enter 2.5.
- In the lower bound = field, enter 1.0.
- In the upper bound = field, enter 2.5.
- Set the move limit toggle to move limit default.
- Set the discrete design variable (ddval) toggle to no ddval.
- Click create.
- Select the generic relationship subpanel.
-
Create a design variable property relationship, part1_th.
A design variable property relationship, part1_th, has been created relating the design variable part1 to the thickness entry on the PSHELL card for the property part1.
-
Create a design variable property relationship, part2_th.
- In the name = field, enter part2_th.
- Using the prop selector, select part2.
- Under the props selector, select Thickness T.
- Click designvars.
- Select part2.
- Click return.
- Click create.
A design variable property relationship, part2_th, has been created relating the design variable part2 to the thickness entry on the PSHELL card for the property part2. - Click return to go to the Optimization panel.
Link Design Variables
- Click the desvar link panel.
- In the dlink = field, enter link1.
- Under dependent, click designvar= and select part2.
-
Under independent, click designvars and select
part1.
Notice: The linear factor is automatically set to 1.000.
- Click return.
- In the C0 = field, enter 0.000.
- In the CMULT = field, enter 1.000.
- Click create.
- Click return to go to the Optimization Setup panel.
Create Optimization Responses
- From the Analysis page, click optimization.
- Click Responses.
-
Create the volume response, which defines the volume fraction of the design
space.
- In the responses= field, enter volume.
- Below response type, select volume.
- Set regional selection to total and no regionid.
- Click create.
-
Create a static stress response.
- In the response= field, enter stress1.
- Set the response type to static stress.
- Using the props selector, select part1.
- Set the response selector to von mises.
- Under von mises, select both surfaces.
- Click create.
- Create another static stress response named stress2, which is defined for the von Mises stress of the elements in the component part2.
- Click return to go back to the Optimization panel.
Create 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.
- Click the dconstraints subpanel.
-
Define a constraint on the response stress1.
- In the constraints= field, enter stress1.
- Check the box next to upper bound, then enter 100.
- Click response = and select stress1.
- Using the loadsteps selector, select STEP.
- Click create.
The constraint is an upper bound with a value of 100. The constraint applies to the subcase STEP. -
Define a constraint on the response stress2.
- In the constraints= field, enter stress2.
- Check the box next to upper bound, then enter 100.
- Click response = and select stress2.
- Using the loadsteps selector, select STEP.
- Click create.
The constraint is an upper bound with a value of 100. The constraint applies to the subcase STEP. - Click return to go to the Optimization panel.
Define the Objective Function
- Click the objective panel.
- Verify that min is selected.
- Click response and select volume.
- Click create.
- Click return twice to exit the Optimization panel.
Save the Database
- From the menu bar, click .
- In the Save As dialog, enter bracket_size.hm for the file name and save it to your working directory.
Run the Optimization
- From the Analysis page, click OptiStruct.
- Click save as.
-
In the Save As dialog, specify location to write the
OptiStruct model file and enter
bracket_size for filename.
For OptiStruct input decks, .fem is the recommended extension.
-
Click Save.
The input file field displays the filename and location specified in the Save As dialog.
- Set the export options toggle to all.
- Set the run options toggle to optimization.
- Set the memory options toggle to memory default.
-
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 bracket_size.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. - Click Close.
- bracket_size.hgdata
- HyperGraph file containing data for the objective function, percent constraint violations, and constraint for each iteration.
- bracket_size.prop
- OptiStruct property output file containing all updated property data from the last iteration for size optimization.
- bracket_size.hist_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 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 bracket_size.fem 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. This file may be used to restart a run.
- bracket_size.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.
- bracket_size.h3d
- HyperView binary results file.
View 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. In this step you will 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.
View the Stress Results
-
From the OptiStruct panel, click HyperView.
HyperView launches within the HyperMesh Desktop and loads the result files. All of the .h3d files get loaded into a different page in HyperView. The files bracket_size_des.h3d and bracket_size_s1.h3d get loaded in page 2 and page 3, respectively.
-
In the top, right of the application, click
to proceed to the next page.
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. -
On the Results toolbar, click
to open the Contour panel.
- Set the Result type to Element Stresses [2D & 3D] (t) and vonMises.
- Set the Averaging method to None.
-
Click Apply.
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.
-
In the Results Browser, select the last iteration from the
simulation list.
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.
Figure 2.
View the Thickness Results
-
In the top, right of the application, click
to go back to the previous page.
- Set the Result type to Element Thicknesses (s).
- In the Results Browser, select Iteration 2 from the Load Case and Simulation Selection.
- Click Apply.
Review the .out File
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?