Angular velocity at the revolute joint defined left end of the bar is 10*SIN(2*TIME)
rad/sec. The objective is to minimize the maximum stress of the structure subject to
certain mass specifications. The bar consists of five bar elements with a solid
circle cross section (each element has its own PBARL with
ROD cross section). The design variables are the radius of
each bar property.Figure 1. Structural Model of a Rotating Bar
The optimization problem is stated as:
Objective
Minimize maximum normal stress.
Constraints
Mass < 10kg.
Design Variables
Radius of each bar properties (PBARL).
Launch HyperMesh and Set the OptiStruct User Profile
Launch HyperMesh.
The User Profile dialog opens.
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
Click File > Open > Model.
Select the rotating_bar_design.hm file you saved to
your working directory.
Click Open.
The rotating_bar_design.hm database is loaded
into the current HyperMesh session, replacing any
existing data.
Set Up the Model
Define Boundary Conditions for Structural Analysis
Structural analysis and optimization of the flexible bodies of this model are performed in
ESL optimization. Thus, the boundary condition for the flexible bodies needs to be
defined.
Create a load collector.
In the Model Browser, right-click and select Create > Load Collector from the context menu.
A default load collector displays in the Entity Editor.
In the Name field, enter BCforOpt.
Enable coincident picking.
From the menu bar, click Preferences > Graphics.
Select the graphics subpanel.
Select coincident picking.
Click return.
Figure 2.
In the Model Browser, click to display the properties view.
Create constraints.
Only 6 dof per flexible body should be fixed to remove 6 rigid body motion of
each flexible body.
From the Analysis page, click the constraints
panel.
Click the left end of the model.
Two node numbers display.
Select node number 1.
Figure 3.
Select all dofs (dof1 to dof6), and verify that their values are set to
0.0.
Click create.
Click return.
Define a Driving Motion Not Supported by HyperMesh
In this tutorial, the driving motion at a joint, MOTNJE is defined.
However, MOTNJE is currently not supported by HyperMesh. Thus, you need to enter this card and a corresponding
MBVAR card manually.
From the Analysis page, click the
control cards panel.
Click
BULK_UNSUPPORTED_CARDS.
Verify the following two cards are listed. If
they are not listed, enter the cards.
Figure 4.
Click OK.
Click return.
Edit the Load Step
In the Model Browser, click
SUBCASE1.
The load step's data displays in the Entity Editor.
In the Name field, enter Dynamic.
Set the Analysis type to multi-body dynamics.
Define SPC.
For SPC, click Unspecified > Loadcol.
In the Select Loadcol dialog, select
BCforOpt and click OK.
Define MBSIM.
For MBSIM, click Unspecified > Loadcol.
In the Select Loadcol dialog, select
MBSIM1 and click OK.
Define MOTION.
For MOTION, click Unspecified > Loadcol.
In the Select Loadcol dialog, select
MBSIM1 and click OK.
Set Up the Optimization
Define the Size Optimization Design Variables
From the Analysis page, click the optimization
panel.
Click the size panel.
Select the desvar subpanel.
Create the design variable, rad1.
In the desvar = field, enter rad1.
In the initial value = field, enter 10.
In the lower bound = field, enter 0.05.
In the upper bound = field, enter 100.
Set the move limit toggle to move limit
default.
Set the discrete design variable (ddval) toggle to no
ddval.
Click create.
A design variable, rad1, has been created. The design variable has an
initial value of 10, a lower bound of 0.05, and an upper bound of
100.
Create the design variable rad2, rad3, rad4, and rad5 using the same initial
value, lower, and upper bounds as rad1.
Select the generic relationship subpanel.
Create a design variable property relationship, bar1_rad1.
In the name = field, enter bar1_rad1.
Using the prop selector, select PBARL_1.
Under the props selector, select Dimension
1.
Click designvars.
Select rad1.
Notice: The linear factor is automatically set to
1.000.
Click return.
Click create.
A design variable to property relationship, bar1_rad1, has been created
relating the design variable rad1 to the radius entry on the PBARL card for
property PBARL_1.
Create the design variable to property relationship bar2_rad2, bar3_rad3,
bar4_rad4, and bar5_rad5 relating the design variables to the radius entry on
the PBARL cards for the property PBARL_2, PBARL_3, PBARL_4, and PBARL_5.
Click return to go to the optimization panel.
Create the Mass and Stress Responses
Create the response, Mass.
Click the responses panel.
In the response = field, enter Mass.
Set the response type to mass.
Set the regional selection to total (this is the
default).
Click create.
A response, mass, is defined for the total mass of the
model.
Create the response, Stress.
Click the responses panel.
In the response = field, enter Stress.
Set the response type to static stress.
Click props.
Select all of the properties in the list and click
select.
Set the stress to normal.
Set the stress recovery point to all.
Click create.
Figure 5.
Click return to go to the optimization panel.
Create Design Constraints
Click the dconstraints panel.
In the constraint= field, enter Mass.
Click response = and select Mass.
Check the box next to upper bound, then enter
10.0.
Click create.
Click return to go back to the Optimization panel.
Define the Objective Function
The objective of this tutorial is to minimize the maximum stress of the model while the
model rotates.
Create an objective reference.
Click the obj reference panel.
In the dobjref= field, enter MaxStress.
Click response= and select Stress.
Select neg reference= and pos
reference=.
Switch the toggle from all to loadsteps, then
use the loadsteps selector to select Dynamic.
Click create.
Click return to go back to the Optimization panel.
Define the objective.
Click the objective panel.
Select minmax.
Using the dobjrefs= selector, select MaxStress.
Click create.
Click return to go back to the Optimization panel.
Save the Database
From the menu bar, click File > Save As > Model.
In the Save As dialog, enter rotating_bar_design.hm for the file name and save it to your
working directory.
Run the Optimization
From the Analysis page, click OptiStruct.
Click save as.
In the Save As dialog, specify location to write the
OptiStruct model file and enter
rotating_bar_design for filename.
For OptiStruct input decks,
.fem is the recommended extension.
Click Save.
The input file field displays the filename and location specified in the
Save As dialog.
Set the export options toggle to all.
Set the run options toggle to optimization.
Set the memory options toggle to memory default.
Click OptiStruct to run the optimization.
Click Close.
If the optimization was successful, no error messages are reported to
the shell. The optimization is complete when the message Processing completed
successfully appears in the shell.
If the job was successful, the new results file can be seen in the
directory where the input file was saved. In addition to ordinary output files, you
can see a text file with the name rotating_bar_design.eslout. This file is a good source to see the process of the ESL
optimization.
After ~ 7 interations, the model should converge to the descending
values shown in Figure 6.Figure 6.