# Design Variables

Under topology optimization, the material density of each element should take a value of either 0 or 1, defining the element as being either void or solid, respectively. Unfortunately, optimization of a large number of discrete variables is computationally prohibitive. Therefore, representation of the material distribution problem in terms of continuous variables has to be used.

With the density method, the material density of each element is directly used as the design variable and varies continuously between 0 and 1; these represent the state of void and solid, respectively. Intermediate values of density represent fictitious material. The stiffness of the material is assumed to be linearly dependent on the density. This material formulation is consistent with our understanding of common materials. For example, steel, which is denser than aluminum, is stiffer than aluminum. Following this logic, the representation of fictitious material at intermediate densities does reflect engineering intuitions.

## Penalization

In general, the optimal solution of problems involves large gray areas of intermediate densities in the structural domain. Such solutions are not meaningful when you are looking for the topology of a given material, and not meaningful when considering the use of different materials within the design space. Therefore, techniques need to be introduced to penalize intermediate densities and to force the final design to be represented by densities of 0 or 1 for each element. OptiStruct uses different penalization techniques in different settings of topology optimizations. These are SIMP, RAMP or Polynomial.

Where, $\tilde{K}$ and $K$ represent the penalized and the real stiffness matrix of an element, respectively, $\rho $ is the density and $p$ is the penalization factor which is always greater than 1. SIMP is used for the vast majority of setups.

Where,
$\tilde{K}$
and
$K$
represent the penalized and the real stiffness
matrix of an element, respectively and
$p$
is the penalization factor which is always
greater than 1. RAMP is the default when using the OVERHANG constraint. This
default can be overwritten with the `PENSCHE` field on the
DTPL card. At the moment RAMP can only be used with
OVERHANG.

Where, $\tilde{K}$ and $K$ represent the penalized and the real stiffness matrix of an element, respectively and $p$ is the penalization factor which is always greater than 1. The value of alpha ( $\alpha $ ) is 15.0.

`OLDPEN`, 1. In that case the loading is calculated with the penalized mass matrix. However, the mass response value printed to the .out file for each iteration does not consider the penalty but simply the mass times the density, because the mass matrix is penalized for gravity force calculation and if there are semi-dense elements in the model which is usually the case for non-converged iterations, the Sum of the Applied Forces or SPCFORCE values printed in the .out file will be different from their expected values (from the printed mass response). After convergence, typically the SPCFORCE and Sum of Applied Forces will be closer to the printed mass response-based applied force calculation since the converged solution typically is more discrete and contains lower number of intermediate density elements.

## Discreteness

As described above, for the sake of interpretability it is desirable to achieve a discrete design, that is, a design where the vast majority of elements is either 0 or 1. In addition to interpretability, the performance of the structure, reported at the end of the optimization, becomes inaccurate when large amounts of medium dense elements exist. This is because the medium dense elements, despite their low penalized stiffness, can still have a significant influence on the structural behavior. A reanalysis after interpretation of the structure is the only reliable way to verify the performance of the structure. This becomes even more important when comparing structures obtained with different penalty schemes, for instance comparing a structure obtained with DRAW and a structure with OVERHANG, that is, a topology obtained with SIMP and one obtained with RAMP. The different penalty schemes can further amplify differences between the reported performances as medium dense elements are penalized differently.

## Estimating Discreteness

In practice, it is very difficult to obtain a design that is comprised of densities exclusively equal to 0.0 or 1.0. In reality a transition zone usually exists between a solid member and voids. This transition zone is acceptable in most cases. It should be avoided however, to have large areas containing mainly medium dense elements. To quantify this, OptiStruct reports a discreteness index in the .out file after each iteration (since version 2017.2.3). This indicates the amount of medium dense elements in the structure by calculating the ratio between the volume from elements with densities of at least 0.9 and that of the entire design space. For a perfectly discrete model this value would be 1.0 but for structures where a transition zone exists, this parameter should be 0.5 or higher. When values are smaller than that at the end of the optimization, the topology should at least be interpreted with caution and possibly measures should be taken to improve discreteness.

```
Density %
------------------------------
0.0-0.1 64.6
0.1-0.2 0.9
0.2-0.3 0.8
0.3-0.4 1.3
0.4-0.5 1.2
0.5-0.6 2.1
0.6-0.7 1.2
0.7-0.8 4.1
0.8-0.9 5.6
0.9-1.0 18.2
```

- $D$
- Discreteness indexed
- ${\rho}_{i}$
- Density of element $i$
- ${V}_{i}$
- Volume of element $i$

## Improving Discreteness

- Check the optimization setup. For instance, the volume fraction constraint could be too low relative to mesh size (that is, low volume fraction can only be achieved with very fine mesh).
- The optimization has hit the maximum number of iterations and has not fully
converged to a discrete design. Use DOPTPRM,
`DESMAX`to increase that maximum. - The discreteness might be improved by continuing the optimization for longer
by reducing the objective tolerance with DOPTPRM,
`OBJTOL`. - DOPTPRM,
`TOPDISC`can be used to trigger an additional internal measure to improve discreteness. - Even though the defaults are set in a way that they are optimal for most
cases, sometimes changing the penalty using DOPTPRM,
`DISCRETE`could help improving design discreteness. See more information on this parameter in Penalty for SIMP.Note: This will not have an effect when OVERHANG is used.

## Lattice Optimization

While it is desirable to achieve purely solid and void designs in regular topology
optimization, Lattice structure opens up the freedom of realizing porous zones
(medium dense regions) into lattice regions. The penalty used for this type of
optimization is usually reduced to increase porous zones in the design. The penalty
and thus the amount of lattice structure is controlled via
LATPRM, `POROSITY`. Refer to Lattice Structure Optimization for additional
information.

## Penalty for SIMP

In OptiStruct, the `DISCRETE` parameter
corresponds to (
$p-1$
). `DISCRETE` can be defined on the
DOPTPRM Bulk Data Entry.
$p$
usually takes a value between 2.0 and 4.0. For
example, compared to the non-penalized formulation (which is equivalent to
$p$
=1) at
$\rho $
=0.3,
$p$
=2 reduces the stiffness of the element from 0.3 to
0.09 times the stiffness of the fully dense element. The default
`DISCRETE` is 1.0 for shell dominant structures, and 2.0 for
solids dominant structures with member size control and no manufacturing constraints
(the dominance is defined by the proportion of number of elements). An additional
parameter, `DISCRT1D`, can also be defined on the
DOPTPRM Bulk Data Entry. `DISCRT1D` allows
1D elements to use a different penalization to 2D or 3D elements.

Model | DOPTPRM, DISCRETE | Penalty |
---|---|---|

Shell-dominant structure | 1.0 | 2.0 |

Shell-dominant structure + member size control only | 1.0 | 1st Phase - 2.0 2nd Phase - 3.0 3rd Phase - 3.0 |

Shell-dominant structure + other manufacturing constraints | 1.0 | 1st Phase - 2.0 2nd Phase - 3.0 3rd Phase - 4.0 |

Solid-dominant structure | 1.0 | 2.0 |

Solid-dominant structure + member size control only | 2.0 | 1st Phase - 3.0 2nd Phase - 4.0 3rd Phase - 4.0 |

Solid-dominant structure + other manufacturing constraints | 1.0 | 1st Phase - 2.0 2nd Phase - 3.0 3rd Phase - 4.0 |

Three types of finite elements can be defined as topology Design Elements in OptiStruct: Solid elements, shell elements, and 1D elements (including ROD, BAR/BEAM, BUSH, and WELD elements).