OS-T: 4020 Composite Bike Frame Optimization

In this tutorial you will perform a ply orientation optimization for a composite structure.

Before you begin, copy the file(s) used in this tutorial to your working directory.

4020_frame_model
Figure 1. Bicycle Frame Model
The optimization problem for this tutorial is stated as:
Objective
Minimize volume.
Constraints
A given maximum nodal displacement.
Design Variables
Layer thickness.

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 bicycle_frame.hm file you saved to your working directory.
  3. Click Open.
    The bicycle_frame.hm database is loaded into the current HyperMesh session, replacing any existing data.

Set Up the Model

Create Load Collectors

  1. In the Model Browser, right-click and select Create > Load Collector from the context menu.
    A default load collector displays in the Entity Editor.
  2. For Name, enter crank.
  3. Click Color and select a color from the color palette.
  4. Set Card Image to None.
  5. Create another load collector.
    1. For Name, enter spcs.
    2. For Card Image, select None.

Create Loads

  1. In the Model Browser, Load Collectors folder, right-click on crank and select Make Current from the context menu.
  2. Create a force.
    1. From the Analysis page, click the forces panel.
    2. Select the create subpanel.
    3. Set the entity selector to nodes, then select the node at the center of the rigid spider.
    4. Set the coordinate system toggle to global system.
    5. In the magnitude = field, enter -100.0.
    6. Set the direction definition to z-axis.
    7. Click create.
    8. Click return.
    A point force is created at the pedal location.
  3. Create a moment.
    1. From the Analysis page, click the moments panel.
    2. Select the create subpanel.
    3. Set the entity selector to nodes, then select the node at the center of the rigid spider.
    4. Set the coordinate system toggle to global system.
    5. In the magnitude = field, enter 100.0.
    6. Set the direction definition to x-axis.
    7. Click create.
    8. Click return.
    A moment is created at the pedal location.
Note: This is a simplified loading regime that represents the transformed loads from a person's foot on the pedal.20.

4020_loads_applied_lower
Figure 2. Loads applied to bottom bracket of a bicycle

Create Constrains

  1. In the Model Browser, Load Collectors folder, right-click on spcs and select Make Current from the context menu.
  2. From the Analysis page, click the constraints panel.
  3. Select the create subpanel.
  4. Set the entity selector to nodes, then select the nodes to constrain the structure by clicking on the center of the rigid spiders.


    Figure 3. SPCs Applied to Rear Wheel Location of Frame


    Figure 4. SPCs Applied to Upper and Lower Portion of Head Tube
  5. Constrain all dofs.
    Dofs with a check are to be constrained, while dofs without a check will be free. Dofs 1, 2, and 3 are x, y, and z translation degrees of freedom. Dofs 4, 5, and 6 are x, y, and z rotational degrees of freedom.
  6. Click create.
  7. Click return.
Constraints are applied to the selected nodes.

Create Load Steps

  1. In the Model Browser, right-click and select Create > Load Step from the context menu.
  2. For Name, enter crank.
  3. Set Analysis type to linear static.
  4. Define SPC.
    1. For SPC, click Unspecified > Loadcol.
    2. In the Select Loadcol dialog, select spcs and click OK.
  5. Define LOAD.
    1. For LOAD, click Unspecified > Loadcol.
    2. In the Select Loadcol dialog, select crank and click OK.

Create Design Variables

  1. From the 2D page, click the HyperLaminate panel.
    HyperLaminate opens.
  2. Create the design variable, thk1.
    1. In the Laminate Browser, expand Design Variable, right-click on DESVAR, and select New from the context menu.
      A new design variable, named NewDv1 by default, is added.
    2. In the Desvar field, enter thk1.
    3. In the Initial value field, enter 1.0.
    4. In the Lower bound field, enter 0.0.
    5. In the Upper bound field, enter 2.0.
    6. Click Apply.
  3. Create four more design variables named thk2, thk3, thk4, and thk5 using the same values as thk1.
    Tip: Quickly create identical design variables by right-clicking on thk1 and selecting Duplicate from the context menu.
  4. Examine the PCOMP branch to see all of the PCOMPs in the model.
  5. Select the seat_tube PCOMP.
    Details of the laminate appear.
  6. Click the check box next to Optimization at the top of the middle panel.
    New fields appear in the Ply lay-up order table allowing design variables to be associated to ply thicknesses or ply orientations.
  7. In the Ply lay-up order table, row 1, set Thickness Designvar to thk1.
  8. Change the Thickness Designvar for the other rows as shown in Figure 5.

    4020_designvar
    Figure 5.
  9. Click Update Laminate.
    The design variables thk(i) are now associated with the thickness for the ply(i) of this laminate. In this case, ply(11-i) too, since this is a symmetric laminate.
  10. Repeat this process for TOP_tube and down_tube using the same DVs as on the seat_tube property.
  11. From the menu bar, click File > Exit.

Set Up the Optimization

Create Optimization Responses

  1. From the Analysis page, click optimization.
  2. Click Responses.
  3. Create the volume response, which defines the volume fraction of the design space.
    1. In the responses= field, enter volume.
    2. Below response type, select volume.
    3. Set regional selection to total and no regionid.
    4. Click create.
  4. Create the displacement response.
    1. In the response= field, enter disp.
    2. Below response type, select static displacement.
    3. Using the nodes selector, select the node at the bottom of the bracket where the loads were applied.
    4. Set the displacement type to total disp.
      dof1, dof2, dof3
      Translation in the X, Y, and Z directions.
      dof4, dof5, dof6
      Rotation about the X, Y, and Z axes.
      total disp
      Resultant of the translational displacements in x, y, and z directions.
      total rotation
      Resultant of the rotational displacements in x, y, and z directions.
    5. Click create.
  5. Click return to go back to the Optimization panel.

Create Design Constraints

  1. Click the dconstraints panel.
  2. In the constraint= field, enter Disp.
  3. Click response = and select disp.
  4. Check the box next to upper bound, then enter 1.8.
  5. Using the loadsteps selector, select crank.
  6. Click create.
  7. Click return to go back to the Optimization panel.

A constraint is defined on the response disp. It states that any solution (min. volume) needs to have a displacement lower than 1.8 mm to be feasible.

Define the Objective Function

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

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

In this step you will view the design variable and objective history.
  1. From the Page Controls toolbar, click pageNew-24 to open a session of HyperView.
  2. From the menu bar, click File > Open > Session.
  3. In the Open Session File dialog, navigate to your working directory and open the bicycle_frameOPT_hist.mvw file.

This file contains plots of the objective, constraints, and design variables against iteration history.

The first page shows the objective function.

4020_objective_function
Figure 6. Objective function (Volume) for each iteration
The second page shows the maximum constraint violation.

4020_iteration
Figure 7. Maximum constraint violation (% [disp > 1.8 mm]) for each iteration
The next pages show the design variables (DVs) which are grouped together making it possible to compare the behavior of the different plies. This plot can be created by opening the bicycle_frameOPT.hgdata file.

4020_dvs
Figure 8. Design variable values for each iteration