# OS-E: 0815 Cantilever Beam in Bending

Demonstrates how OptiStruct creates optimized design concepts from a solid block of material.

## Model Files

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

## Model Description

The design space consists of a cantilever beam loaded at the mid-section of the free end.

Subcase Section
The objective function (compliance) is a subcase dependent response, therefore the response reference is part of the subcase definition. The constraint (volume fraction) is a global response, therefore the reference is outside the subcase.
DESGLB = 2
$SUBCASE 1 SPC = 1 LOAD = 2 DESOBJ = 1 Bulk Data Section The responses and constraints are defined in the Bulk Data section. Two responses are defined here: the compliance, which is referenced by the objective function, and the volume fraction, which is referenced by the constraint statement to put up an upper bound of 0.25 (25% of the design space volume). The constraint statement is then referenced as a global constraint in the subcase section. BEGIN BULK$
DRESP1,1,comp,COMP
DRESP1,2,volfrac,VOLFRAC
DCONSTR,2,2,,0.2
The volume fraction constraint is set to 25% of the total design material. In the beam.fem file, the following PSOLID entry is used:
(1) (2) (3) (4) (5) (6) (7) (8) (9)
PSOLID 1 1           1

The "1" in the 9th field denotes that the component is designated as design material. The example is run for 20 iterations.

By running the file, beam.HM.comp.cmf, as a command file in HyperMesh, the elements are grouped into sets according to their final material density values. The set labeled "0.0 - 0.1" contains all of the elements in which densities range from 0% to 10%. The set labeled "0.1 - 0.2" contains all of the sets in which densities range from 10% to 20%. The elements in the sets that have material densities less then 30% are masked so that the solution is easier to visualize. The material densities of the remaining elements are plotted.

This example is analyzed in the one-file setup with the file, beam.fem. The OptiStruct batch job is submitted using the command shell script, % optistruct beam.

## Results

The optimization runs for 20 iterations. The results are requested in HyperMesh binary format and written to the file, beam.res. The shape of the solution at the final iteration is visualized by creating an assign plot of the density results at the 20th iteration in the HyperMesh Contour panel. By removing components labeled "0.1 - 0.2", "0.2 - 0.3", "0.3 - 0.4", and "0.4 - 0.5" from the display, a concept of the optimized beam can be visualized.