Using the topology optimization technique yields a new design and optimal material distribution. Topology optimization is performed on a concept design, resulting in a design that is lighter in most cases, and also performs better than the concept design. Topology optimization allow designers to start with a design that already has the advantage of improved material distribution and is ready for fine tuning with shape or size optimization.
In this tutorial, topology optimization is performed on a model to create a new boundary for the structure and to remove any unnecessary material. The optimization normalizes each element according to its density and lets you remove elements with low density. The resulting structure is lighter and satisfies all constraints.
The optimization problem for this tutorial is stated as:
|
Objective: |
Minimize volume. |
|
Constraints: |
Translation in the y-axis for node A < 0.07mm. Translation in the y-axis at node B > -0.07mm. |
|
Design variables: |
The density of each element in the design space. |
In this tutorial, you will:
· Set up the model in HyperMesh
· Define loads
· Analyze the model
· Set up the optimization
· View the results
To load the OptiStruct user profile and retrieve the file cclip.hm:
Launch HyperMesh and choose the OptiStruct user profile in the User Profiles dialog.
User Profiles… can also be accessed from the Preferences pull-down menu on the toolbar.
Click the Files
panel toolbar button
.
Select the hm file subpanel using the radio buttons on the left-hand side of the panel.
Click retrieve….
An Open file… browser window pops up.
Select the cclip.hm file, located in the HyperWorks installation directory under <install_directory>/tutorials/os/.
Click Open.
The cclip.hm database is loaded into the current HyperMesh session, replacing any existing data.
Note that the location of the file is now displayed in the file: field.
Click return to go to the main menu.
To define the material properties and components:
Because components need to reference a material, the materials collectors should be created first.
Card images and materials for collectors can be modified
using the Card Editor
toolbar button
.
Click the Collectors
toolbar button
.
Select the create subpanel using the radio buttons on the left side of the panel.
Click the collector type switch and select materials from the pop-up menu.
Click name= and enter steel.
Click card image= and select MAT1 from the pop-up menu.
Click create/edit.
The MAT1 card image pops up.
For E, enter the value 2.0E5.
For Nu, enter the value 0.3.
For RHO, enter the value 7.85E-9.
Click return to go to the Collectors panel.
Change the collector type from materials to components.
Click name= and enter shells.
Click card image= and select PSHELL from the pop-up menu.
Click material= and select steel.
Click color and pick a color from the palette.
Click create/edit to load the PSHELL card image for the component shells.
Enter the thickness for the shell component by clicking T, clicking in the text box, and typing 1.
Click return to go back to the Collectors panel.
Click return to go to the main menu.
To generate a finite element mesh:
Use the automesh option to create a quad dominant mesh. Since the shells component that you just created is the current component, any elements you generate will be organized into that component.
From the 2D page, select the automesh panel.
For element size=, type 2.5 and press ENTER to set the element size.
Set the mesh type: to mixed using the switch.
Select the top half of the surface by clicking any line in that surface.
Click mesh.
The mesh density is displayed on the surface.
Click mesh again.
The automesher should create about 558 shell elements. See the HyperMesh message bar for the message.
Quad mesh created from automesh panel.
Click return to save the mesh into the shells component.
Note that the mesh color corresponds to the color selected for the current component.
Click return to go to the main menu.
To create a mirrored duplicate of the upper surface elements:
From the Tool page, select the reflect panel.
Click the switch on the left of the panel and select elems from the pop-up menu.
Click elems and select displayed and then duplicate from the extended entity menu and then original comp from the subsequent pop-up menu.
Click the switch in the center of the page. From the pop-up menu, select the normal direction of the reflection plane (the y-axis in this case).
The purple button B next to the y-axis is highlighted; select the node as shown in the following figure.
The node is needed to reflect the mesh about the y-axis.
Node to select as base to reflect elements
Click reflect.
Mesh appears in the lower half of the image.
Click return.
To equivalence duplicate nodes between the meshes:
The nodes on the edges shared by the two surfaces are defined for each edge. They need to be equivalenced.
Select the edges panel (from Tools page).
Click any element in the figure to select it and place its component into the comps buffer.
Click preview equiv.
This highlights the twenty-one nodes defining the seam between the two sets of elements.
Click equivalence.
The message 21 nodes were equivalenced appears.
Click return to go back to the Tool page.
To create load collectors:
Next we will create two load collectors (spc and forces) and assign each a color. Follow these steps for each load collector.
Click the Collectors
toolbar button
.
Select the create subpanel using the radio buttons on the left side of the panel.
Click the collector type switch and select load collectors from the pop-up menu.
Click name= and enter constraints.
Click color and pick a shade of green from the palette.
Click the creation method switch and select no card image from the pop-up menu.
Click create.
A new load collector, constraints, is created.
Click name= and type forces.
Click color and pick a shade of red from the palette.
Click the creation method switch and select no card image from the pop-up menu.
Click create.
Click return to go back to the main menu.
To apply loads and boundary conditions:
For the three nodes in the following figure that show constraints, we need to create these constraints and assign them to the spc load collector as outlined in the following steps.
Mesh showing the boundary conditions applied on the c-clip.
Press G on the keyboard to go to the Global panel.
Click loadcol=.
Select constraints from the list of load collectors.
Click return to exit the Global panel.
Select the constraints panel on the Analysis page.
Select the create subpanel using the radio buttons on the left side of the panel.
Click on the node at the center of the left edge of the design space to select it (see the figure above).
Activate dof1, dof2, and dof3 (active degrees of freedom contain a check in the box to the left of their label).
The degree of freedom definitions are listed below for reference:
|
Degree of |
Definition |
|
dof1 |
Translation about x-axis |
|
dof2 |
Translation about y-axis |
|
dof3 |
Translation about z-axis |
|
dof4 |
Rotation about x-axis |
|
dof5 |
Rotation about y-axis |
|
dof6 |
Rotation about z-axis |
Click create to apply this constraint to the selected node.
Note that a triangle with a number for each degree of freedom selected appears at the node.
Click the node at the center of the c-clip curve as in the figure above.
Activate only dof2.
Click create.
Click on the node at the upper left corner of the c-clip design space as in the figure above.
Set only dof3.
Click create.
The image should appear as above.
Click return.
To apply force boundary conditions:
Load the structure with two opposing forces of 100.0 N at the opposite tips of the opening of the c-clip as shown in the following figure.
Opposing forces created at the opening of the c-clip.
Press G on the keyboard to go to the Global panel.
Click loadcol=.
Select the forces collector.
Click return.
From the Analysis page, select the forces panel.
Click nodes.
To create the force at the top of the opening, click on the node at the top of the opening (A) of the c-clip as in the figure above.
Click magnitude=, enter 100.0 and press ENTER.
Set the switch below to y-axis.
Click create.
An arrow, pointing up, should appear at the node on the screen.
To create the force at the bottom of the opening, left mouse click on the node at the bottom of the opening (B) of the c-clip.
Click magnitude=, type -100.0 and press ENTER.
Verify the y-axis is selected.
Click create.
An arrow, pointing down, should appear at the node on the screen.
To provide a separation between the arrows, select uniform size=, type 7, and press ENTER.
Click return to go back to the Analysis page.
To create a load case:
The last step in establishing boundary conditions is the creation of an OptiStruct subcase (referred to as a load step in HyperMesh).
From the Analysis page, click subcase.
Click name=, type opposing forces, and press ENTER.
Check the box preceding SPC.
An entry field appears to the right of SPC.
Click on the entry field and select constraints from the list of load collectors.
Check the box preceding Load and select forces from the list of load collectors.
Select type as linear static.
Click create.
Click return to go back to the Analysis page.
To perform the analysis:
A linear static analysis of this c-clip is performed prior to the definition of the optimization process. An analysis identifies the responses of the structure before optimization to ensure that constraints defined for the optimization are reasonable.
From the Analysis page, select the OptiStruct panel.
This panel exports the deck, runs the analysis/optimization and then loads the results files into HyperMesh after the job is complete.
Click save as… and enter cclip_analysis.fem as the file name and click Save.
Click the run options: switch and select analysis.
Click OptiStruct to run the analysis.
Running OptiStruct from this panel automatically loads the results file after the job is done.
Close the DOS window or shell window and click return.
To post-process the analysis results in HyperView:
From the OptiStruct panel, click the HyperView button.
HyperView is launched, and the cclip.h3d file (containing the model and results) is loaded.
At the bottom of the GUI, click in the area shown below to activate the Load Case and Simulation Selection dialog.

Select Subcase 1 under Load Case and Static Analysis under Simulation.
Go to the Contour
panel
. For
Result type:,
choose Displacement
and click Apply.
This should show the contour of displacements.
Click File from the pull-down menu and select Quit to exit HyperView.
The preliminary finite element model, consisting of shell elements, element properties, material properties, and loads and boundary conditions has been defined. Now a topology optimization will be performed with the goal of minimizing the amount of material to be used. When reducing material in an existing mesh with the same loads and boundary conditions, it follows for the model to be less stiff and more prone to deform. Therefore, the optimization process needs to be constrained with a displacement so that a balance between material and overall stiffness is achieved.
The forces in the structure are applied on the outer nodes of the opening of the clip, making those two nodes critical locations in the mesh. We applied a displacement constraint on the nodes so that they would not displace more than 0.07 in the y-axis.
To define the topology design variables:
From the Analysis page, select optimization.
Select topology.
Select the create subpanel.
Click comp:
on the header bar and choose shells
for the comps
field.
Choose type: PSHELL.
Click DESVAR=, type shells, and press ENTER.
Verify that the base thickness is 0.00.
A value of 0.0 implies that the thickness at a specific element can go to zero, and therefore becomes a void.
Click create.
Click return to go back to the optimization panel.
To define volume as a response:
Click responses.
Click response= and type Vol.
Change response type: to volumefrac.
Verify that the toggle is set to total.
Click create.
To define displacement as a response:
To create a displacement as a response, you will need to supply a meaningful name for the response, set the response type to displacement, select the node for the response, and select the type of displacement (dof).
Click response= and type upperdis.
Change the response type: to static displacement.
Click the node labeled A (upper opening of c-clip) as shown in the figure to select it.
Choose dof2 for the node.
Click create.
Click response= and type lowerdis.
The response type: should still be static displacement.
Click the node labeled B (lower opening of the c-clip) as shown in the figure.
Select dof2 and create the response.
Select review to see the list of responses just created.
Click return to leave this panel.
Click return to go back to the optimization panel.
To define constraints:
Set the upper and lower bound constraint criteria for this analysis.
Select dconstraints to access the Constraints panel.
Click constraint= and enter const1.
Check the box for upper bound.
Click upper bound= and enter 0.07.
Select response= and set it to upperdis.
Click loadsteps.
Activate opposing forces.
Click select.
Click create.
Click constraint= and enter const2.
Uncheck upper bound=.
Check beside lower bound=.
Click lower bound= and enter -0.07.
Select response= and set it to lowerdis.
Click loadsteps.
Select opposing forces.
Click select.
Click create.
Select review to see a list of the newly created constraints.
Click return.
Click return to go back to the optimization panel.
To define the objective function:
Click objective.
The switch on the left should be set to min.
Click response= and select Vol.
Click create.
Click return twice to exit the optimization panel.
To solve the problem:
From the Analysis page, select OptiStruct.
This panel exports the deck, runs the analysis/optimization and then loads the results files into HyperMesh after the job is complete.
Click save as…, enter cclip_complete.fem as the file name, and click Save.
This indicates what file name is to be associated with the various output OptiStruct creates, and where the files should be located. The actual save occurs at the completion of the optimization run.
Click the run options: switch and select optimization.
Click OptiStruct to run the optimization.
Running OptiStruct from his panel automatically loads the results file after the job is done. When you click the OptiStruct button, OptiStruct writes out the input file, solves the optimization, and loads the results into HyperMesh for post-processing. You no longer need to export the file with the OptiStruct template, manually initiate the solver, and import the results file for pos-processing.
The message …Processing complete appears in the window at the completion of the job. OptiStruct also reports error messages if any exist. The file cclip_complete.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.
Close the DOS window or shell and click return.
The default files written to your directory include:
|
cclip_complete.res |
HyperMesh binary results file. |
|
cclip_complete.h3d |
HyperView binary results file. |
|
cclip_complete.HM.comp.cmf |
HyperMesh command file used to organize elements into components based on their density result values. This file is only used with OptiStruct topology optimization runs. |
|
cclip_complete.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 each optimization iteration, and compute time information. Review this file for warnings and errors that are flagged from processing the cclip_complete.fem file. |
|
cclip_complete.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. |
|
cclip_complete.hgdata |
HyperGraph file containing data for the objective function, percent constraint violations, and constraint for each iteration. |
|
cclip_complete.oss |
OSSmooth file with a default density threshold of 0.3. The user may edit the parameters in the file to obtain the desired results. |
|
cclip_complete_hist.mvw |
Contains the iteration history of the objective, constraints, and the design variables. It can be used to plot curves in HyperGraph, HyperView, and MotionView. |
|
cclip_complete.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, etc. |
OptiStruct provides density information for all iterations, and also gives displacement and von Mises stress results for your linear static analysis. This section describes how to view those results in HyperView.
To view an iso value plot:
This plot provides the information about the element density. Iso Value retains all of the elements at and above a certain density threshold. Pick the density threshold providing the structure that suits your needs.
From the OptiStruct panel, click the HyperView button.
This will launch HyperView and load the cclip_complete.h3d file.
In the bottom portion of the GUI, click in the area circled below to activate the Load Case and Simulation Selection dialog.
Select Design under the Load Case section and the last iteration listed under Simulation.
Go to the Iso
Value panel
and choose Element
Densities as the Result
type:.
Set the Current Value: to 0.3.
Click Apply.
Iso value plot of element densities
Move the slider below Current value: to change the density threshold.
You will see the iso value in the graphics window update interactively when you scroll to a new value. Use this tool to get a better look at the material layout and the load paths from OptiStruct.
To view a transient animation of density results:
This step lets you view how the material is distributed during the optimization.
Click the traffic light toolbar
button
to view the animation of the design iterations.
Click the Animation
Controls toolbar button
and use the slider to control
the speed of the animation.
Click the traffic light again when you are finished viewing the animation.
To view a static contour:
This plot assigns density to all of the elements in the model.
In HyperView, click on the Next Page arrow toolbar button.
This will bring up the cclip_complete_s1.h3d file, which contains the static subcase results for the first and last iteration steps.
In the bottom, right area of the GUI, click in the section circled below to activate the Load Case and Simulation Selection dialog.
Select Iteration 29 under Simulation and click OK.
Go to the Contour
panel
, and set Result
type: to Element
Stresses (2D & 3D) and select vonMises.
Click Apply.
The regions with high element densities indicate where material is needed and regions with low element densities are areas with scope for mass reduction.
From the File pull-down menu, select Exit to quit HyperView. .
Go To