This tutorial uses OptiStruct's topology optimization functionality to create a design concept for an automotive control arm required to meet performance specifications. The finite element mesh containing designable (blue) and non-designable regions (yellow) is shown in the figure below. Part specifications constrain the resultant displacement of the point where loading is applied for three load cases to 0.05mm, 0.02mm, and 0.04mm, respectively. The optimal design would use as little material as possible.
Finite element mesh containing designable (blue) and non-designable (yellow) material.
A finite element model representing the designable and non-designable material (shown in figure) is imported into HyperMesh. Appropriate properties, boundary conditions, loads, and optimization parameters are defined and the OptiStruct software is used to determine the optimal material distribution. The results (the material layout) are viewed as contours of a normalized density value ranging from 0.0 to 1.0 in the design space. Isosurfaces are also used to view the density results. Areas that need reinforcement will tend towards a density of 1.0.
The optimization problem for this tutorial is stated as:
|
Objective: |
Minimize volume. |
|
|
Constraints: |
SUBCASE 1 - |
The resultant displacement of the point where loading is applied must be less than 0.05mm. |
|
SUBCASE 2 - |
The resultant displacement of the point where loading is applied must be less than 0.02mm. |
|
|
SUBCASE 3 - |
The resultant displacement of the point where loading is applied must be less than 0.04mm. |
|
|
Design variables: |
Microstructural void sizes and orientations in the design space. |
|
The following exercises are included:
· Setting up the FE model in HyperMesh
· Setting up the optimization in HyperMesh
· Submitting the job
· Viewing the results in HyperView
To load the OptiStruct user profile and retrieve the file carm.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 carm.hm file, located in the HyperWorks installation directory under <install_directory>/tutorials/os/.
Click Open.
The carm.hm database is loaded into the current HyperMesh session, replacing any existing data.
Note that the location of carm.hm is now displayed in the file: field.
Click return to go to the main menu.
To set up the material and geometric properties:
The imported model has three component collectors with no materials. A material collector needs to be created and assigned to the solid component collectors. The rigid elements do not need to be assigned a material.
Click the Collectors
toolbar button
.
Select the create subpanel.
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 2E5.
For Nu= enter the value 0.30.
If a quantity in brackets does not have a value below it, it is off. To change this, click on the quantity in brackets and an entry field will appear below it. Click on the entry field, and a value can be entered.
A new material, steel, has now been created. The material uses OptiStruct's linear isotropic material model, MAT1. This material has a Young's Modulus of 2E+05 and a Poisson's Ratio of 0.3. It is not necessary to define a density value since only a static analysis will be performed. Density values are required, however, for other solution sequences.
At any time, the card image for this collector can be modified using the card image subpanel.
Click the collector type switch and select components from the pop-up menu.
Select the update subpanel using the radio buttons on the left-hand side of the panel.
Click the yellow comps.
Check the boxes next to design and nondesign and click select.
Click card image= and select PSOLID.
Click material = and select steel.
Click update.
The component collectors design and nondesign now reference the PSOLID property definition; all elements organized into this collector should be solid elements.
Click return to go to the main menu.
The model is to be constrained using single point constraints at the two bushing locations. dof1, dof2, and dof3 are constrained at one end of the bushing and dof2, dof3 at the other. In addition, a constraint is placed on node 3239 to represent another attachment, and dof3 only is constrained at this node.
Loading is applied to the structure with three separate forces in the x, y, and z directions each of these forces is organized into a separate load collector. Three subcases (loadsteps) are then created, each combining the constraints with an individual load.
To create four load collectors, spc, brake, corner, and pothole:
Select the Collectors
toolbar button
.
Select the create subpanel using the radio buttons on the left-hand side of the panel.
Click the collector type switch and select load collectors from the pop-up menu.
Click name = and enter spc.
Click color and pick a color from the palette.
Click the card image switch and select no card image from the pop-up menu.
Click create.
A new load collector, spc, is created.
Click name = and enter brake.
Click color and pick a color from the palette.
Click create.
A new load collector, brake, is created.
Click name = and enter corner.
Click color and choose a color.
Click create.
A new load collector, corner, is created.
Click name = and enter pothole.
Choose a color.
Click create.
A new load collector, pothole, is created.
Click return to go to the main menu.
To set a load collector:
Click comp:
on the header bar
.
This opens a new window in which the collector types (components, system collector, load collector, etc.) can be set as current collectors.
Click on loadcol.
Select spc from the list of load collectors.
This sets the spc collector as the current load collector.
To create constraints:
Select the constraints panel on the Analysis page.
Select the create subpanel using the radio buttons on the left-hand side of the panel.
Select the node at one end of the bushing (see the figure below) by clicking on it in the graphics window.
Constrain dof1, dof2, and dof3.
Make sure dofs 1, 2, and 3 are checked and dofs 4, 5, and 6 are unchecked.
Dofs with a check will 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.
Click create.
A constraint is created. A constraint symbol (triangle) appears in the graphics window at the selected node. The number 123 is written beside the constraint symbol, indicating that dof1, dof2 and dof3 are constrained.
Constraining dof1, dof2 and dof3 at one end of the bushing.
Select the node at the other end of the bushing (see the following figure) by clicking on it in the graphics window.
Constrain dof2 and dof3.
Make sure dofs 2 and 3 are checked.
Dofs with a check will 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.
Click create.
A constraint is created. A constraint symbol (triangle) appears in the graphics window at the selected node. The number 23 is written beside the constraint symbol, indicating that dof2 and dof3 are constrained.
Constraining dof2 and dof3 at the other end of the bushing.
Click nodes and select by id from the extended entity selection window.
Type the value 3239 and press enter.
This selects node ID 3239 (see the next figure).
Constrain only dof3.
Click create.
A constraint is created. A constraint symbol (triangle) appears in the graphics window at the selected node. The number 3 is written beside the constraint symbol, indicating that dof3 is constrained.
Constraining dof3 on node ID 3239.
Click return to go to the main menu.
To create loads:
Set the current load collector to brake using comp: on the header bar.
Select the forces panel on the Analysis page.
Select the create subpanel using the radio buttons on the left-hand side of the panel.
Click the entity selection switch and select nodes from the pop-up menu.
Click nodes and select by id from the extended entity selection menu, which pops up.
Type the value 2699 and press enter.
Set the coordinate system toggle to global system.
Click on the vector definition switch and select constant vector.
Click magnitude = and enter the value 1000.000.
Click on the direction definition switch below magnitude =, and select x-axis from the pop-up menu.
Click create.
This creates a point force of 1000 units in the global x-direction at the node 2699.
Set the current load collector to corner.
Click nodes and select by id from the extended entity selection menu.
Type the value 2699 and press enter.
Click magnitude = and enter the value 1000.000.
Click on the direction definition switch below magnitude = and select y-axis from the pop-up menu.
Click create.
This creates a point force of 1000 units in the global y-direction at the node 2699.
Set the current load collector to pothole.
Click nodes and select by id from the extended entity selection menu, which pops up.
Type the value 2699 and press enter.
Click magnitude = and enter the value 1000.000.
Click on the direction definition switch below magnitude = and select z-axis from the pop-up menu.
Click create.
This creates a point force of 1000 units in the global z-direction at the node 2699.
Click return to go to the main menu.
Three separate forces in load collectors: brake, corner, and pothole with the component "design" turned off using the display panel.
To create an OptiStruct subcase (also referred to as a loadstep):
Select the subcase panel on the Analysis page.
Click name = and enter brake.
Make sure that the export option is toggled to export.
Make sure that type is set to linear static.
Check the box preceding SPC.
An entry field appears to the right of SPC.
Click on the entry field and select spc from the list of load collectors.
Check the box preceding LOAD.
An entry field appears to the right of LOAD.
Click on the entry field and select brake from the list of load collectors.
Click create.
An OptiStruct subcase, brake, has been created which references the constraints in the load collector spc and the force in the load collector brake.
Click name = and enter corner.
Check the box preceding SPC.
An entry field appears to the right of SPC.
Click on the entry field and select spc from the list of load collectors.
Check the box preceding LOAD.
An entry field appears to the right of LOAD.
Click on the entry field and select corner from the list of load collectors.
Click create.
An OptiStruct subcase, corner, has been created which references the constraints in the load collector spc and the force in the load collector corner.
Click name = and enter pothole.
Check the box preceding SPC.
An entry field appears to the right of SPC.
Click on the entry field and select spc from the list of load collectors.
Check the box preceding LOAD.
An entry field appears to the right of LOAD.
Click on the entry field and select pothole from the list of load collectors.
Click create.
An OptiStruct subcase, pothole, has been created which references the constraints in the load collector spc and the force in the load collector pothole.
Click return to go to the main menu.
To define design variables for topology optimization:
Select the optimization panel on the Analysis page.
Select the topology panel.
Select the create subpanel using the radio buttons on the left-hand side of the panel.
Click comps.
Check the box next to design and click select.
Set the type toggle to PSOLID.
Click desvar = and enter dsolid.
Click create.
A topology design space definition, dsolid, has been created. All elements organized into the design component collector are now included in the design space.
Click return to return to the optimization panel.
Defining Responses:
A detailed description can be found in the OptiStruct User's Guide under Responses.
Two responses will be created: a volume response (for the definition of the objective) and a displacement response, which will be constrained in each of the three subcases (loadsteps) creating the three displacement constraints.
Select the responses panel.
Click response = and enter vol.
Click on the response type switch and select volume from the pop-up menu.
Ensure the regional/total toggle is set to total (this is the default).
Click create.
A response, vol, is defined for the total volume of the model.
Click response = and enter disp1.
Click on the response type switch and select Static displacement from the pop-up menu.
Click nodes and select by ID from the extended entity selection menu that pops up.
Type 2699 and hit enter.
The node where the three forces are applied is selected.
Select the total disp.
This is the vector sum of the x, y, and z translations.
Click create.
A response, disp1, is defined for the total displacement of node 2699.
Click return to go back to the optimization panel.
To define the objective function:
The objective in this example is to minimize the global response, vol, which was defined in the previous section.
From the optimization panel, select the objective panel.
Click the switch in the upper left corner of the panel, and select min from the pop-up menu.
Click response = and select vol from the list of responses.
Click create.
Click return to go back to the optimization panel.
To define the desgin constraints:
A response defined as the objective cannot be constrained. In this case, you cannot constrain the response vol.
The response disp1 is to have an upper bound constraint applied for each subcase (loadstep).
Select the dconstraints panel from the optimization panel.
Click constraint = and enter: constr1.
Check the box to the left of upper bound =.
Click on upper bound = and enter the value 0.05.
Click response = and select disp1 from the response list.
Click loadstep.
Check the box next to brake and click select.
Click create.
A constraint is defined on the response disp1. The constraint is an upper bound with a value of 0.05. The constraint applies to the subcase, brake.
Click constraint = and enter: constr2.
Check the box to the left of upper bound =.
Click on upper bound = and enter the value 0.02.
Click response = and select disp1 from the response list.
Click loadstep.
Check the box next to corner and click select.
Click create.
A constraint is defined on the response disp1. The constraint is an upper bound with a value of 0.02. The constraint applies to the subcase corner.
Click constraint = and enter: constr3.
Check the box to the left of upper bound =.
Click on upper bound = and enter the value 0.04.
Click response = and select disp1 from the response list.
Click loadstep.
Check the box next to pothole and click select.
Click create.
A constraint is defined on the response disp1. The constraint is an upper bound with a value of 0.04. The constraint applies to the subcase pothole.
Click return twice to return to the main menu.
To check your OptiStruct input data:
A check run may be performed in which OptiStruct will estimate the amount of RAM and disk space required to run the model. During the check run, OptiStruct will also scan the deck checking that all the necessary information required to perform an analysis or optimization is present and also that this information is not conflicting.
Select the OptiStruct panel on the Analysis page.
Click save as… following the input file: field
A Save file… browser window pops up.
Select the directory where you would like to write the OptiStruct model file and enter the name for the model, carm_check.fem, in the File name: field.
The .fem filename extension is the suggested extension for OptiStruct input decks.
Click Save.
Note the name and location of the carm_check.fem file displays in the input file: field.
Set the memory options: toggle to memory default.
Click the run options: switch and select check.
Set the export options: toggle to all.
Click OptiStruct.
This launches the OptiStruct check run.
Once the processing is complete (indicated in the UNIX or MSDOS window which pops up), view the file carm_check.out. This is the OptiStruct output file containing specific information on the file setup, optimization problem setup, RAM and disk space requirement for the run. Review this file for possible warnings and errors.
Is the optimization problem set up correctly? See Optimization Problem Parameters section of the carm_check.out file.
The objective function? See Optimization Problem Parameters section of the carm_check.out file.
The constraints? See Optimization Problem Parameters section of the carm_check.out file.
What is the recommended amount of RAM for an In-Core solution? See Memory Estimation Information section of the carm_check.out file.
Is there enough disk space to run the optimization? See Disk Space Estimation Information section of the carm_check.out file.
To launch OptiStruct:
Select the OptiStruct panel on the Analysis page.
Click save as… following the input file: field
A Save file… browser window pops up.
Select the directory where you would like to write the OptiStruct model file and enter the name for the model, carm_complete.fem, in the File name: field.
The .fem filename extension is the suggested extension for OptiStruct input decks.
Click Save.
Note the name and location of the carm_complete.fem file displays in the input file: field.
Set the memory toggle to memory default.
Click the run options switch and select optimization.
Set the export options toggle to all.
Click OptiStruct.
This launches the OptiStruct job.
Click return.
If the job was successful, new results files can be seen in the directory where the OptiStruct model file was written. The carm_complete.out file is a good place to look for error messages that will help to debug the input deck if any errors are present.
The default files written to the directory are:
|
carm_complete.hgdata |
HyperGraph file containing data for the objective function, percent constraint violations, and constraint for each iteration. |
|
carm_complete.his_data |
OptiStruct history file containing iteration number, objective function values and percent of constraint violation for each iteration. |
|
carm_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. |
|
carm_complete.HM.ent.cmf |
HyperMesh command file used to organize elements into entity sets based on their density result values. This file is only used with OptiStruct topology optimization runs. |
|
carm_complete.html |
HTML report of the optimization, giving a summary of the problem formulation and the results from the final iteration. |
|
carm_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. |
|
carm_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. |
|
carm_complete.res |
HyperMesh binary results file. |
|
carm_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. The .sh file may be used to restart a run and, if necessary, run OSSmooth files for topology optimization. |
|
cclip_complete.stat |
Summary of analysis process, providing CPU information for each step during analysis process. |
Element density results are output to the carm_complete_des.h3d file from OptiStruct for all iterations. In addition, Displacement and Stress results are output for each subcase for the first and last iterations by default into carm_complete_s#.h3d files, where # specifies the sub case ID. This section describes how to view those results in HyperView.
To view the deformed structure:
Once you see the message Process completed successfully in the command window, click the green HyperView button.
HyperView is launched and the results are loaded. A message window appears to inform about the successful loading of the model and result files into HyperView. Notice that all three .h3d files get loaded, each in a different page of HyperView.
Click Close to close the message window.
It is helpful to view the deformed shape of a model to determine if the boundary conditions are defined correctly, and also to find out if the model is deforming as expected. The analysis results are available in pages 2, 3, and 4. The first page contains the optimization results.
Click the Next Page toolbar button
to move to the second page.
The second page has the results from the carm_complete_s1.h3d file. Note that the name of the page is displayed as Subcase 1 – Brake to indicate that the results correspond to subcase 1.
Click the Contour
toolbar button
.
Select the first pull-down menu below Result type: and select Displacement [v].
Select the second pull-down menu and select Mag.
Click Apply to display the displacement contour.
Click the Deformed
toolbar button
.
Set Result type: to Animation(v), Scale: to Scale factor, and Type: to Uniform.
Enter 1000 for value:.
This means that the maximum displacement will be 1000 model units and all other displacements will be proportional.
Below the Undeformed shape: section, click on the pull-down menu next to Show and select Wireframe.
Click Apply.
A deformed plot of your model with displacement contour should be visible, overlaid on the original undeformed mesh.
Select Linear
Static as the animation mode
.
Click the linear static icon
to animate the model
.
A deformed animation for the first subcase
(brake) should be displayed. Notice that the icon changes
to indicate that the model is being animated.
In what direction is the load applied for the first subcase?
Which nodes have degrees of freedom constrained?
Does the deformed shape look correct for the boundary conditions applied to the mesh?
At the bottom of the GUI, click
on the name Static
Analysis or Iteration
0,
, to activate the Load
Case and Simulation Selection dialog.
Select the 18th iteration by double-clicking on Iteration 18.
The contour now shows the displacement results for Subcase 1 (brake) and iteration 18 which corresponds to the end of the optimization iterations.
Click the linear static icon
again to stop the animation
.
Click on the Next Page icon,
, to move to the third page.
The third page which has results loaded from carm_complete_s12.h3d file, is displayed. Note that the name of the page is displayed as Subcase 2 – corner to indicate that the results correspond to subcase 2.
Repeat steps 2 to 15 to display the displacement contours and deformed shape of the model for the second subcase.
In what direction is the load applied for the second subcase?
Which nodes have degrees of freedom constrained?
Does the deformed shape look correct for the boundary conditions applied to the mesh?
Similarly, review the displacements and deformation for subcase 3 (pothole).
To view a static plot of the density results:
The optimization iteration results (Element Densities) are loaded in the first page.
Click the Previous Page icon
until the name of the page is displayed as Design
History, indicating that the results correspond to optimization
iterations.
You may want to mask your rigid elements before using the Contour panel since density results are not given for 1-D elements.
Click the Entity
Attributes toolbar button
.
The Entity Attributes panel controls the display of attributes of the model. The left side of the panel contains an entity list tree used to select components within the model, as well as selection buttons through which the display of entities is controlled.
Make sure that All is selected in the field next to Entity:.
Click on the + mark to the left of Global to expand the entity list tree.
Click on the name Rigids to highlight the entities set Display: to Off.
The elements that belong to the Rigids component are turned off from the view.
Click the Contour
toolbar button
.
Select the first pull-down menu below Result type: and select Element Densities [s].
Select the second pull-down menu and select Density.
Select Simple in the field below Averaging method:.
Click Apply to display the density contour.
Select the Deformed
toolbar button
.
For Show:, select Features to show only the boundary features of the undeformed mesh.
At the bottom of the GUI, click
on the name Design
or Iteration 0,
, to activate the Load
Case and Simulation Selection dialog.
Select the 18th iteration by double clicking on Iteration 18.
Each element of the model is assigned a legend color, indicating the density of each element for the selected iteration.
Have most of your elements converged to a density close to 1 or 0?
If there are many elements with intermediate densities, the DISCRETE parameter may need to be adjusted. The DISCRETE parameter (set in the opti control panel on the optimization panel) can be used to push elements with intermediate densities towards 1 or 0 so that a more discrete structure is given.
In this model, refining the mesh should provide a more discrete solution; however, for the purposes of this tutorial, the current mesh and results are sufficient.
Regions that need reinforcement tend towards a density of 1.0. Areas that do not need reinforcement tend towards a density of 0.0.
Is the max= field showing 1.0e+00?
In this case, it is.
If it is not, the optimization has not progressed far enough. Allow more iterations and/or decrease the OBJTOL parameter (also set in the opti control panel).
If adjusting the discrete parameter, refining the mesh, and/or decreasing the objective tolerance does not yield a more discrete solution (none of the elements progress to a density value of 1.0), review the set up of the optimization problem. Some of the defined constraints may not be attainable for the given objective function (or vice versa).
To view an iso-surface plot of the density results:
As shown in OS-2000, the Iso Value feature can be a very useful tool for post-processing density results from OptiStruct. For models with solid design regions, this feature becomes a vital tool for analyzing density results.
Click the Iso Value toolbar
button
.
Click Use Contour Settings to choose Element Densities [s] in the first field below Result type: and Density in the second field.
Make sure that Above is selected in the field next to Show:, below the Display options:.
Click Apply to display the density iso-surface plot.
Enter 0.15 in the field next to Current value and press Enter on the keyboard.
An iso-surface plot is displayed in the graphics window. The parts of the model with a density greater than the value of 0.15 are shown with density contour and the rest are removed from the display as shown below.
Iso-surface plot of an optimal layout of the designable material.
The iso-surface post-processing feature in HyperView is an excellent tool to use for viewing the density results from OptiStruct.
Click and hold the left mouse button on the slider below Current value: and move left and right to change the threshold surface.
The iso-surface in the graphics window will interactively update when a new value is introduced. Use this tool to get a better look at the material layout and the load paths from OptiStruct.
To use OSSmooth to create IGES surfaces for topology optimization results:
At this point, it is possible to use the OSSmooth tool to create IGES surfaces by using the topology optimization results for a specific density level. This may be done through the HyperMesh interface as follows:
Return to HyperMesh.
Select the OSSmooth panel on the Post page.
Click browse… following the file: field.
An Open file… window appears.
Select the file carm_complete.fem and click Open.
Click the output switch and select IGES from the pop-up menu.
Enter 0.15 in density threshold:.
Click OSSmooth.
A pop-up window appears asking if you would like to overwrite the existing carm_complete.oss file.
Click Yes.
A shell appears in which OSSmooth is run.
Once the OSSmooth run is complete, the IGES surfaces are automatically loaded into HyperMesh.
Click
to select
the disp panel.
Select the elems/geom toggle (on the right side of the panel) to elems.
Click None.
Only the imported IGES surfaces remain visible in the display.
Go To