OS-T: 4040 Size Optimization of a Shredder

In this tutorial you will perform a size optimization for a model comprised of shell and bar elements. You will update the PBARL property to simulate the properties of the bar elements and then link that to the design variable. The resulting design will have higher frequencies and updated element properties.

Size optimizations involve the changing of the properties of either 1D or 2D elements. These properties include area, moments of inertia of the 1D elements, and the thickness of 2D elements. Size optimization is performed when it is not necessary to remove materials, generate beads or change the shape of the structure.

With size optimization, the cross-sectional properties of the elements are changed to meet the necessary objective. Properties are linked with design variables (DESVAR) using DVPREL cards.

This tutorial outlines using OptiStruct macros under an OptiStruct user profile to setup the optimization problem.

4040_fe_model_shredder
Figure 1. Finite Element Model of a Shredder
The optimization problem is stated as:
Objective
Minimize the global mass.
Constraints
Transverse modes higher than 6 Hz.
Design Variables
Beam width, beam thickness, beam depth, and shell thickness.

Launching HyperMesh and Setting the OptiStruct User Profile

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

Importing the Model

  1. Click File > Import > Solver Deck.
    An Import tab is added to your tab menu.
  2. For the File type, select OptiStruct.
  3. Select the Files icon files_panel.
    A Select OptiStruct file browser opens.
  4. Select the shredder.fem file you saved to your working directory from the optistruct.zip file. Refer to Accessing the Model Files.
  5. Click Open.
  6. Click Import, then click Close to close the Import tab.

Performing Finite Element Analysis and Checking Results

Submitting the Job

  1. From the Analysis page, click the OptiStruct panel.

    OS_1000_13_17
    Figure 2. Accessing the OptiStruct Panel
  2. Click save as.
  3. In the Save As dialog, specify location to write the OptiStruct model file and enter shredder_analysis 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 analysis.
  7. Set the memory options toggle to memory default.
  8. Click OptiStruct to launch the OptiStruct job.
If the job is successful, new results files should be in the directory where the shredder_analysis.fem was written. The shredder_analysis.out file is a good place to look for error messages that could help debug the input deck if any errors are present.

Viewing the Eigen Modes

  1. From the OptiStruct panel, click HyperView.
    HyperView launches within the HyperMesh Desktop and a new page and session file, shredder_analysis.mvw, loads. This file is linked with the shredder_analysis.h3d file, which contains the model and results.
  2. On the Animation toolbar, set the animation type to animationModal-24 (Modal).
  3. On the Results toolbar, click resultsDeformed-24 to open the Deformed panel.
  4. Define deformed shape settings.
    1. Set the Result type to Eigen Mode(v).
    2. Set Scale to Model Units.
    3. Set Type to Uniform.
    4. In the Value field, enter 1000.

    This means that the maximum displacement will be 1000 modal units and all other displacements will be proportional.

    Using a scale factor higher than 1.0, amplifies the deformations while a scale factor smaller than 1.0 would reduce them. In this case, you are accentuating displacements in all directions.

  5. Define undefomed shape settings.
    1. Set Show to Edges.
    2. Set Color to Mesh.
  6. Click Apply.
  7. In the Results Browser, from the list of simulations, select Mode 1.

    os_4040_mode1
    Figure 3.
  8. On the Results toolbar, click resultsContour-24 to open the Contour panel.
  9. Click Apply.
    The Eigen Mode contour is plotted.
  10. On the Annotations toolbar, click annotateNotes-24 to open the Note panel.
  11. In the Description pane, remove the first two lines.

    os_4040_annotate
    Figure 4.
  12. Click Apply.
  13. On the Page Controls toolbar, set the page layout to pageLayout4-24.

    os_4040_4windows
    Figure 5.
  14. Click the first window, then click Edit > Copy > Window from the menu bar.
  15. Click the second window, then click Edit > Paste > Window from the menu bar.
  16. Copy the first window into the third and fourth windows.

    os_404_4windows2
    Figure 6. First mode on contour on all windows
  17. Change the mode assigned to the windows by clicking a window to make it active, then selecting a mode in the Results Browser.
    • Set the second window to Mode 2.
    • Set the third window to Mode 3.
    • Set the fourth window to Mode 4.

    os_4040_assign_entities
    Figure 7.

    os_4040_modes
    Figure 8. First Four Eigen Modes Contour
  18. On the Animation toolbar, click animationStart-24 to start the animation. Click again to stop the animation.
    The third and fourth mode (~ 3.9 and 4.8 Hz) has a transversal shape that can reduce the performance of the shredder when it gets excited. The objective, then, is to get the minimum mass to greater than 7Hz.
  19. From the menu bar, click File > Save As > Report Template.
  20. In the Save Report As dialog, navigate to your working directory and save the file as report.tpl.

    4040_save_session_file
    Figure 9.
  21. In the top, right of the application, click pagePrevious-24 and pageNext-24 to navigate back to the HyperMesh client on the first page.

Setting Up the Optimization

Defining Design Variables

The design variables for this problem are the thickness of the cover, width, thickness, and depth of the bar. You will define the first design variable using the Size panel.
  1. From the Analysis page, click the optimization panel.
  2. Click the size panel.
  3. Select the desvar subpanel.
  4. Create the design variable, coverthck.
    1. In the desvar = field, enter coverthck.
    2. In the initial value = field, enter 3.0.
    3. In the lower bound = field, enter 1.0.
    4. In the upper bound = field, enter 6.0.
    5. Set the move limit toggle to move limit default.
    6. Set the discrete design variable (ddval) toggle to no ddval.
    7. Click create.
  5. Create four more design variables.
    Design Variable Initial Value Lower Bound Upper Bound
    Beamwide 50 30 90
    Beamhigh 100 80 125
    Beamthck1 10 5 15
    Beamthck2 20 15 30
  6. Select the generic relationship subpanel.
  7. Create a design variable property relationship, coverthck.
    1. In the name = field, enter coverthck.
    2. In the C0 field, enter 0.0.
    3. Using the prop selector, select cover.
    4. Under the props selector, select Thickness T.
    5. Click designvars, select coverthck, and click return.
    6. Click create.

In the next steps you will define property relations for beam dimensions. Each dimension of a C beam will be defined as a design variable.


4040_type_chan
Figure 10.
Table 1. Property Values on the Initial Design
Name Represents Value
DIMs(1) Beam Width 50
DIMs(2) Beam High 100
DIMs(3) Beam Thck1 10
DIMs(4) Beam Thck2 20

  1. Create a design variable property relationship, DIM1.
    1. In the name = field, enter DIM1.
    2. In the C0 field, enter 0.0.
    3. Using the prop selector, select frame2.
    4. Under the props selector, select Dimension 1.
    5. Click designvars, select Beamwide, and click return.
    6. Click create.
  2. Create a design variable property relationship, DIM2.
    1. In the name = field, enter DIM2.
    2. In the C0 field, enter 0.0.
    3. Using the prop selector, select frame2.
    4. Under the props selector, select Dimension 2.
    5. Click designvars, select Beamhigh, and click return.
    6. Click create.
  3. Create a design variable property relationship, DIM3.
    1. In the name = field, enter DIM3.
    2. In the C0 field, enter 0.0.
    3. Using the prop selector, select frame2.
    4. Under the props selector, select Dimension 3.
    5. Click designvars, select Beamthck1, and click return.
    6. Click create.
  4. Create a design variable property relationship, DIM4.
    1. In the name = field, enter DIM4.
    2. In the C0 field, enter 0.0.
    3. Using the prop selector, select frame2.
    4. Under the props selector, select Dimension 4.
    5. Click designvars, select Beamthck2, and click return.
    6. Click create.
  5. Click return to go back to the Optimization panel.

Creating Optimization Responses

  1. From the Analysis page, click optimization.
  2. Click Responses.
  3. Create the mass response, which is defined for the total volume of the model.
    1. In the responses= field, enter mass.
    2. Below response type, select mass.
    3. Set regional selection to total and no regionid.
    4. Click create.
  4. Create the frequency response.
    1. In the responses= field, enter f3.
    2. Below response type, select frequency.
    3. For Mode Number, enter 3.
    4. Click create.
    A response, f3, is defined for the frequency of the third mode extracted.
  5. Create another frequency response, named f4, for mode 4.
  6. Click return to go back to the Optimization panel.

Defining Constraints

  1. Click the dconstraints panel.
  2. Create the constraint, c_f3.
    1. In the constraint= field, enter c_f3.
    2. Check the box next to lower bound, then enter 6.0.
    3. Click response = and select f3.
    4. Using the loadsteps selector, select ld1.
    5. Click create.
  3. Create the constraint, c_f4.
    1. In the constraint= field, enter c_f4.
    2. Check the box next to lower bound, then enter 6.0.
    3. Click response = and select f4.
    4. Using the loadsteps selector, select ld1.
    5. Click create.
  4. Click return to exit the panel.

Defining the Objective Function

  1. Click the objective panel.
  2. Verify that min is selected.
  3. Click response and select mass.
  4. Click create.
  5. Click return twice to exit the Optimization panel.

Saving the Database

  1. From the menu bar, click File > Save As > Model.
  2. In the Save As dialog, enter shredder_optimization.hm for the file name and save it to your working directory.

Running 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 shredder_optimization 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 shredder_optimization.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.

Viewing the Results

  1. From the OptiStruct panel, click HyperView.
    HyperView launches within the HyperMesh Desktop and the results are loaded.
  2. In the top, right of the application, click pagePrevious-24 and pageNext-24 to navigate to the Design History page.
  3. In the Results Browser, select the last iteration.

    os4040_iteration
    Figure 11.
  4. On the Results toolbar, click resultsContour-24 to open the Contour panel.
  5. Set the Result type to Element Thicknesses (s) and Thickness.
  6. Click Apply.
    The resulting colors represent the thickness fields resulting from the applied loads and boundary conditions. The final optimized thickness of the cover component is 1.0.
  7. Open the shredder_optimization.prop file using any text editor to review final optimized PBAR property.

    4040_pbarl
    Figure 12.
    The final dimensions could be rounded off to:
    Beam Wide (DIM1)
    70.10
    Beam High (DIM2)
    125
    Beam Thck (DIM3)
    5
    Beam wide (DIM4)
    15
    This .prop file can be read into HyperMesh with over write mode on and the PBARL card will be updated.