OS-T: 5060 3D Model using the Free-shape Method with Manufacturing Constraints
In this tutorial you will perform a shape optimization on a solid model using the free-shape optimization method along with manufacturing constraints, such as symmetry and mesh barrier constraints. The objective of this optimization is to reduce the stress by changing the geometry of the model.
Before you begin, copy the file(s) used in this tutorial to your
working directory.

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 .
- Select the freeshape3D_mfg.hm file you saved to your working directory.
-
Click Open.
The freeshape3D_mfg.hm database is loaded into the current HyperMesh session, replacing any existing data.
Set Up the Optimization
Create Free-shape Design Variables
- From the Analysis page, click the optimization panel.
- Click the free shape panel.
-
Create the design variable, shape.
- Select the create subpanel.
- In the desvar= field, enter shape.
- Click .
- Select shape_nodes, then click select.
- Click create.
Figure 2. Free-shape Design Space
-
Update the parameters for the shape design variable.
- Select the parameters subpanel.
- Set the direction to grow.
- In the mvfactor= field, enter 0.5.
- In the nsmooth= field, enter 10.
- Click update.
Figure 3.
- Click return twice to exit the panel.
Convert Shell Elements to Create Barrier Mesh Face
- From the 2D page, click the elem types panel.
- Click elemsby collector.
- Select barrier, then click select.
- Select the 2D & 3D subpanel.
- In the tria3 field, click CTRIA3 and select BMFACE.
- In the quad4 field, click CQUAD4 and select BMFACE.
- Click update.
Define the 1-Plane Symmetry Constraint
- From the Analysis page, click the optimization panel.
- Click the free shape panel.
- In the desvar= field, enter shape.
- Select the pattern grouping subpanel.
-
Select pattern type to 1-pln sym.
The 1-plane symmetry constraints in free-shape will produce symmetric designs regardless of the initial mesh, boundary conditions or loads. The plane of symmetry is defined by specifying the anchor and the first nodes. The plane of symmetry will then be perpendicular to the vector from the anchor node to the first node and pass through the anchor node.
-
Click anchor node and enter 1 in
the id= field.
The node with the ID of 1 is selected.
-
Click first node and enter 2 in
the id= field.
The node with the ID of 2 is selected.
- Click update to update the design variables.

Define the Mesh Barrier Constraint
The barrier should be constructed by shell elements with the smallest number of elements possible.
- In the free shape panel, click the sidecon subpanel.
- Click desvar = and select shape.
- Next to Barrier mesh, click component= and select barrier.
- Click update.
- Click return to go back to the main menu.

Create Optimization Responses
- From the Analysis page, click optimization.
- Click Responses.
-
Create the mass response, which is defined for the total volume of the
model.
- In the responses= field, enter mass.
- Below response type, select mass.
- Set regional selection to total and no regionid.
- Click create.
-
Create a static stress response.
- In the response= field, enter Stress.
- Set the response type to static stress.
- Set the entity selector to elems, then click and select stress.
- Set the response selector to von mises.
- Under von mises, select both surfaces.
- Click create.
- Click return to go back to the Optimization panel.
Create Design Constraints
- Click the dconstraints panel.
- In the constraint= field, enter stress.
- Click response = and select stress.
- Check the box next to upper bound, then enter 62.
- Using the loadsteps selector, select ls2.
- Click create.
- Click return to go back to the Optimization panel.
Define the Objective Function
- Click the objective panel.
- Verify that min is selected.
- Click response and select Mass.
- Click create.
- Click return twice to exit the Optimization panel.
Define the SHAPE Card
- From the Analysis page, click the control cards panel.
- In the Card Image dialog, click SHAPE.
- Set FORMAT to H3D.
- Set TYPE to ALL.
- Set OPTION to ALL.
- Click return twice to go back to the main menu.
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
freeshape3d_mfgopt 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.
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 freeshape3d_mfgopt.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. - Click Close.
View the Results
View Shape Results
-
From the OptiStruct panel, click
HyperView.
HyperView is launched and the freeshape3d_mfgopt_des.h3d file opens in page 1 and the freeshape3d_mfgopt_s4.h3d file opens in page 2.
-
In the top, right of the application, click
to move to page 2
- In the Results Browser, select Iteration 14, which is the final iteration result.
-
On the Results toolbar, click
to open the Deformed panel.
- Set the Result type: to Shape change(v).
- Click Apply.
View a Contour Plot of the Stress
-
On the Results toolbar, click
to open the Contour panel.
- Set the Result type to Element Stresses (2D & 3D) (t).
- Set the stress type to von Mises.
- Under selection, set the selector to Elements.
- Click stress. , then select
- Click Add and close.
- Click Apply.
