HyperStudy

HS-4425: Multi-Objective Shape Optimization Study

HS-4425: Multi-Objective Shape Optimization Study

Previous topic Next topic Expand/collapse all hidden text  

HS-4425: Multi-Objective Shape Optimization Study

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

This tutorial illustrates the trade-off challenges faced by the designer of a typical mechanical component. The arm shown below is clamped at one end and under an axial loading on the other end (see figures 1 and 2).

This model has been meshed and modeled in HyperMesh. Linear static analysis is performed using the HyperWorks finite element solver, OptiStruct.

hs_6030_model

Arm model

hs_6030_boundary_conds

Boundary and loading conditions

The problem is stated as follows: minimize the mass and minimize the stress, but respect an upper limit on the displacement measure at the force application.

The current (nominal) design gives a volume of 1.7667E06 mm3, a maximum displacement of 1.41 mm, and a maximum stress of 195.29 MPa.

The designer can change the following properties of the arm: 6 shape variables for the overall length and height of the part, 3 shape variables for the three radii (see following image).

hs_6030_shapes_defined

Shapes defined on the model

The sample base input template can be found in <hst.zip>/HS-4425/.  Copy the file crank_morph.hm from this directory to your working directory.

hmtoggle_plus1greyStep 1: Export the Shape Parameterization from HyperMesh
1.Start HyperMesh Desktop.
2.In the User Profiles dialog, change the user profile to OptiStruct.
3.From the menu bar, click File > Open > Model.
4.In the Open Model dialog, navigate to your working directory and open the crank_morph.hm file. The crank_morph.hm database contains the OptiStruct analysis setup, and shapes that have been already created.
5.From the Analysis page, click Optimization > Shape.

hs_4425_optimization

6.Go to the desvar subpanel.
7.Switch single desvars to multiple desvars.

hs_4420_desvar_subpanel

8.In the initial value= field, enter 0.
9.In the lower bound= field, enter -1.
10.In the upper bound= field, enter 1.
11.Click the shapes selector.

hypermesh_shape_selector

12.Select all of the shapes.

hs-4425-1

13.Click select.
14.Click create. A shape design variable is created for each shape.
15.Optional: If you would like to animate or visualize the shapes, click animate.
16.Optional: In the Deformed panel, click linear or modal to animate the shape variables in the graphics area.
17.Optional: While the shape is animating, you can adjust the animation speed by moving the slider indicated in the image below.

hs_3070_animate

18.Go to the export subpanel.
19.For analysis code, select HyperStudy.
20.For sub-code, select Optistruct.
21.In the File field, enter crankDV.shp.
22.Click export as.
23.In the Save As dialog, navigate to your working directory and save the file as crankDV.shp. HyperMesh writes the following files:

crankDV.optistruct.node.tpl        Grid coordinates template.

crankDV.shp                                Grid perturbation vector data read by crankDV.optistruct.node.tpl.

24.Exit HyperMesh Desktop.

 

hmtoggle_plus1greyStep 2: Create the Base Input Template in HyperStudy
1.Start HyperStudy.
2.From the menu bar, click Tools > Editor. The Editor opens.
3.In the File field, navigate to your working directory and open the crank_model.fem file.
4.Right-click anywhere in the editor and select Select Nodes > GRID from the context menu. HyperStudy highlights all of the GRID cards in the crank_model.fem file.

hs_4425_GRID

5.Right-click on the highlighted cards and select Include Shape from the context menu.
6.In the Shape Template dialog, navigate to your working directory and open the crankDV.optistruct.node.tpl file.
7.Click Save.
8.In the Save Template dialog, navigate to your working directory, and save the file as crank_model.tpl.
9.Close the Editor.

 

hmtoggle_plus1greyStep 3: Perform the Study Setup
1.To start a new study, click File > New from the menu bar, or click files_new_hst2 on the toolbar.
2.In the HyperStudy – Add dialog, enter a study name, select a location for the study, and click OK.
3.Go to the Define models step.  
4.Add a Parameterized File model.
a.From the Directory, drag-and-drop the crank_model.tpl file into the work area.

hs_4425_drag_drop_model

b.In the Solver input file column, enter crank.fem. This is the name of the starter input file HyperStudy creates.
c.In the Solver execution script column, select OptiStruct (os).

hs_4425_define_models

5.Click Import Variables. Nine input variables are imported from the crank_model.tpl resource file.
6.Go to the Define design variables step.
7.Change the lower and upper bounds of the input variables to the values indicated in the image below.

hs_4425_bounds

8.Go to the Specifications step.

 

hmtoggle_plus1greyStep 4: Perform the Nominal Run
1.In the work area, set the Mode to Nominal Run.
2.Click Apply.
3.Go to the Evaluate step.
4.Click Evaluate Tasks. An approach/nom_1/ directory is created inside the study directory. The approaches/nom_1/run__00001/m_1 sub-directory contains the crank.res (finite element results) and crank.out (analysis information of the model’s volume) files.
5.Go to the Define Output Responses step.

 

hmtoggle_plus1greyStep 5: Create and Define Output Responses

In this study, we want to analyze the volume, the displacement at the force application (node 35527), and the maximum stresses.  Three output responses will be created.

1.Click Add Output Response.
2.In the HyperStudy - Add dialog, add three output responses and label them Max_Stress, Disp_35527, and Volume.
3.In the Expression column of the output response Max_Stress, click hs_popupdialogicon.
4.In the Expression Builder, click the Functions tab.
5.From the list of functions, select max.
6.Click Insert Varname. The function max() appears in the Evaluate Expression field.

hs_4425_max

7.From the list of functions, select readsim.
8.Click Insert Varname.
9.In the readsim - Builder dialog, navigate to the approaches/nom_1/run__00001/m_1 directory and open the crank.res file.
10.From the Subcase, Type, Request, and Component fields, select the options indicated in the image below.

hs_4425_maxstress

11.Click OK. The expression reads: max(readsim(getenv("HST_APPROACH_RUN_PATH") + "/m_1/crank.res", "Scalar", "Von Mises Stress", "firstrequest", "lastrequest", "{Value}", 0)). This expression returns the max value of the stress vector.
12.Click OK.
13.In the Expression column of the output response Disp_35527, click hs_popupdialogicon.
14.In the Expression Builder, click the File Sources tab.
15.Click Add File Source.
16.In the HyperStudy - Add dialog, add one Solver output file.

solver_output_file

17.In the File column of Vector 1, click hs_popupdialogicon.
18.In the Vector Source dialog, navigate to the approaches/nom_1/run__00001/m_1 directory and open the crank.res file.
19.Define Vector 1 as the magnitude of displacement at node 35527 by selecting the options indicated in the image below from the Subcase, Type, Request, and Component fields.

hs_4425_vector1

20.Click OK.
21.Click Insert Varname.
Note:Because there is only a single value in this vector, HyperStudy inserts a [0] after v_1, thereby choosing the first (and only) entry in the vector. 
22.Click OK.
23.Repeat steps 13 through 17 for the output response Volume.
24.In the Vector Source dialog, navigate to approaches/nom_1/run__00001/m_1 directory and open the crank.out file.
25.Define Vector 2 as the volume of the crank model by selecting the options indicated in the image below from the Type, Request, and Component fields.

hs_4425_vector 2

26.Click OK.
27.Click Insert Varname.
Note:Because there is only a single value in this vector, HyperStudy inserts a [0] after v_2, thereby choosing the first (and only) entry in the vector. 
28.Click OK.
29.Click Evaluate Expressions to extract the output response values.

 

hmtoggle_plus1greyStep 6: Run a Screening DOE Study

We will start with a “screening” type design of experiments (Plackett Burman DOE, in this case) in order to reduce the number of variables by separating out the significant factors from the many factors of this model.

1.In the Explorer, right-click and select Add Approach from the context menu.
2.In the HyperStudy - Add dialog, select Doe and click OK.
3.Go to the Specifications step.
4.In the work area, set the Mode to Plackett Burman.
5.Click Apply (there is no interaction required for this DOE study).
6.Go to the Evaluate step.
7.Click Evaluate Tasks to execute all 12 runs and extract all of the output responses.
8.Go to the Post processing step.

 

hmtoggle_plus1greyStep 7: Post Process the Screening DOE Study

4425_main_effects_chart

 

4425_main_placket

 

4425_main_effects_vol

 

From the figures shown in the drop-downs, it is understood that the variables radius_1, radius_2 and radius_3 can be screened out as their effect is lower than the other variables.

We will now work on optimization.  We decided to do optimization based on response surfaces.  In order to create response surfaces, we need to create two new DOE studies which will be used to fit the physical model (approximation).

 

hmtoggle_plus1greyStep 8: Run Two DOE Studies for Response Surfaces

These DOE studies will be used for doing a response surface used for optimization.  We will create a Hammersley DOE of 100 runs for the input matrix and a Latin Hypercube of 20 runs for the validation matrix.

1.In the Explorer, right-click and select Add Approach from the context menu.
2.In the HyperStudy - Add dialog, select Doe and click OK.
3.Go to the Define Input Variables step.
4.In the Active column, clear the radius_1, radius_2 and radius_3 checkboxes. These input variables contributes less effects than the other variables.

hs_3000_define_design_variables

5.Go to the Specifications step.
6.In the work area, set the Mode to Hammersley.
7.In the Settings tab, change the Number of runs to 100.
8.Click Apply.
9.Go to the Evaluate step.
10.Click Evaluate Tasks.
11.Create a third Doe study by repeating steps 1 through 10, except in the Specifications step, change the Mode to Latin Hypercube and the Number of runs to 20.

 

hmtoggle_plus1greyStep 9: Fit the Physical Model and Create Response Surfaces
1.In the Explorer, right-click and select Add Approach from the context menu.
2.In the HyperStudy - Add dialog, select Fit and click OK.
3.Go to the Select matrices step.
4.Click Add Matrix.
5.In the HyperStudy - Add dialog, add two matrices.
6.Define FitMatrix1 and FitMatrix2 by selecting the options indicated in the image below from the Type and Matrix Source columns.

hs_4425_select_matricies

7.Click Import Matrix.
8.Go to the Select Input Variables step.
9.Review the input variables and output responses. The input variables radius_1, radius_2, and radius_3 are no longer visible.
10.Go to the Specifications step.
11.In the work area, set the Mode to Moving Lease Squares (MLSM).
12.In the Settings tab, change the Order to 2.
13.Click Apply.
14.Go to the Evaluate step.
15.Click Evaluate Tasks.
16.Go to the Post processing step.
17.To assess the accuracy of the regression equations, click the Residuals and Diagnostics tab.
18.To review the output response curves and surfaces, click the Trade-Off tabs.

In the Trade-Off 1D tab you can modify the values of the input variables and see their effect on the output response approximations. Use the Channel selector to select the desired output responses to display. Input variable controls are located in the in the top frame (Inputs). Change each input variable by moving the slider in the first Value column, or by entering a value into the second Value column. Set input variables to their initial, minimum, or maximum values by moving the slider in the upper right-hand corner of the Inputs frame.

hs_4425_tradeoff_1d

 

hmtoggle_plus1greyStep 10: Run an Optimization Study
1.In the Explorer, right-click and select Add Approach from the context menu.
2.In the HyperStudy - Add dialog, select Optimization and click OK.
3.Go to the Select Input Variables step.
4.In the Active column, clear the radius_1, radius_2 and radius_3 checkboxes. These input variables contributes less effects than other variables.
5.Go to the Select Output Responses step.
6.Click Add Objective.
7.In the HyperStudy - Add dialog, add two objectives.
8.Define Objective 1 and Objective 2 by selecting the options indicated in the image below from the Type, Apply On and Evaluate From columns.

hs_4425_objectives

9.Click the Constraint tab.
10.Click Add Constraint.
11.In the HyperStudy - Add dialog, add one constraint.
12.Define the constraint.
a.Set Apply On to Disp_35527 (r_3).
b.Set Bound Type to <= (less than or equal to).
c.Set Evaluate From to Disp_35527_MLSM (r_2_fit_1).
d.For Bound Value, enter 1.

hs_4425_constraint

13.Click Apply.
14.Go to the Specifications step.
15.In the work area, set the Mode to Global Response Surface Method (GRSM).
Note:Only the methods that are valid for the problem formulation are enabled.
16.In the Settings tab, change the Number of runs to 100.
17.Click Apply.
18.Go to the Evaluate step.
19.Click Evaluate Tasks to launch the Optimization.
20.Click the Iteration History tab to review a table of each iteration.
21.Go to the Post processing step.

 

hmtoggle_plus1greyStep 11: View the Iteration History of an Optimization Study
1.Click the Iterations tab.
2.Review the Pareto front (objective versus objective).
a.Using the Channel selector, select Objective_1 (Max_stress) for the X Axis and Objective_2 (Volume) for the Y Axis.
b.Filter the entries to only include non-blank entries by right-clicking in the Best Step Major column and selecting Filter > 45 from the context menu. The optimal iterations display.
c.Select all of the optimal designs by clicking the Iteration column.

The Pareto front displays in the plot.

4425_pareto

 

 

 

 

See Also:

HyperStudy Tutorials