# Free-shape Optimization

Uses a proprietary optimization technique developed by Altair Engineering, Inc. There are two types of Free-Shape Optimization, Classic and Vertex Morphing Free-Shape.

The essential idea of free-shape optimization, and where it differs from other shape optimization techniques, is that the allowable movement of the outer boundary is automatically determined, thus relieving you of the burden of defining shape perturbations.

Free-shape design regions are defined on the DSHAPE Bulk Data Entry.
• Classic Free-Shape Optimization (TYPE=CLASSIC)

Design regions are identified by the grids on the grids are the structure (the edge of a shell structure or the surface of a solid structure). These grids are listed on the DSHAPE entry.

The outer boundary of a structure is altered to meet with pre-defined objectives and constraints. Allows these design grids to move in one of two ways:
1. For shell structures, grids move normal to the surface edge in the tangential plane.
2. For solid structures, grids move normal to the surface.

During free-shape optimization, the normal directions change with the change in shape of the structure; thus, for each iteration, the design grids move along the updated normals.

• Vertex Morphing Free-Shape Optimization (TYPE=VERTEXM)

Vertex morphing shape optimization was introduced by Dr. Bletzinger and associates. 1 In this method the vertices of all FE-mesh grids are treated as design variables. Shape smoothness is achieved by a filtering function connecting grids within a user-defined feature size radius. Compared to the CLASSIC formulation, the GRID option offers largely increased design freedom. It also overcomes the limitation in the classic free-shape formulation that only allowed in-plane shape changes of shell structures. However, computational effort of the VERTEXM method can be significantly higher, since it involves a much larger number of design variables. Adjoint sensitivity analysis is implemented for this formulation. Therefore, it is important that the user make effort to contain the number of active constraints similar to topology optimization applications.

For the Vertex Morphing free-shape optimization, the optimization design space can be defined as:
• For shells – Grids in the entire design space can be selected. It does not have to only be the edge grids of the shell design domain.
• For solids – Grids should be selected on the surface of the solid design space. Even if the internal grids are selected, then they are ignored for the creation of design variables.
Note: In the rare case wherein only internal solid grids are selected, the run will error out.

## Define Free-shape Design Regions

Ideally, free-shape design regions should be selected where it can be assumed that the shape of the structure is most sensitive to the concerned responses.

For example, it would be appropriate to select grids in a high stress region when the objective is to reduce stress.

Free-shape design regions should be defined at different locations on the structure where it is desired for the shape to change independently. For solid structures, feature lines often define natural boundaries for free-shape design regions. Containing any feature lines inside a free-shape design region should be avoided unless the intention is to smooth the feature lines during an optimization. Likewise for a shell structure, sharp corners should not be contained inside a free-shape design region unless the intention is to smooth out such corners.

The DSHAPE card identifies the design region through the GRID continuation card, shown here:
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
GRID GID1 GID2 GID3 GID4 GID5 GID6 GID7
GID8 GID9 etc etc
A free-shape design region is defined on the curved edge of the plate by selecting the edge grids; the grids are free to move in the normal direction on the tangential plane.
A free-shape design region is defined on a surface of the solid structure by selecting the face surface grids; the grids are free to move normal to the surface.

## Free-shape Parameters

The five parameters that affect the way in which the free-shape design region deforms are the direction type, the move factor, the number of layers for mesh smoothing, the maximum shrinkage, and maximum growth.

### Direction Type

This provides a general constraint on the direction of the movement of the free-shape design region. It is defined on the PERT continuation line of the DSHAPE entry in the DTYPE field.
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
PERT DTYPE MVFACTOR NSMOOTH MXSHRK MXGROW SMETHOD NTRANS
DTYPE has three distinct options:
GROW
Grids cannot move inside of the initial part boundary.
SHRINK
Grids cannot move outside of the initial part boundary.
BOTH
Grids are unconstrained.

### Move Factor

The maximum allowable movement in one iteration of the grids defining a free-shape design region is specified as:
MVFACTOR * mesh_size
Where,
"mesh_size"
Average mesh size of the design region defined in the same DSHAPE card
MVFACTOR is defined on the PERT continuation line of the DSHAPE entry.
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
PERT DTYPE MVFACTOR NSMOOTH MXSHRK MXGROW SMETHOD NTRANS
The default value of MVFACTOR is 0.5. A smaller MVFACTOR will make free-shape optimization run slower but with more stability. Conversely, a larger MVFACTOR will make free-shape optimization run faster but with less stability.
MVFACTOR affects the maximum movement in one iteration.
Undeformed shape
Shape at iteration 1 with MVFACTOR = 0.5 (default)
Shape at iteration 1 with MVFACTOR = 1.0

### Number of Layers for Mesh Smoothing

With free-shape optimization, internal grids adjacent to those grids defining the design region are moved to avoid mesh distortion. The number of layers of grids to be included in the mesh smoothing buffer may be defined by the NSMOOTH field on the PERT continuation line of the DSHAPE entry.
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
PERT DTYPE MVFACTOR NSMOOTH MXSHRK MXGROW SMETHOD NTRANS
The default value of NSMOOTH is 10. A larger NSMOOTH will give a larger smoothing buffer, and consequently will work better in avoiding mesh distortion; however, it will result in a slower optimization.

### Maximum Shrinkage and Growth

The maximum shrinkage and growth provide a simple way to limit the total amount of deformation of the free-shape design region. These parameters are defined on the PERT continuation line of the DSHAPE entry.
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
PERT DTYPE MVFACTOR NSMOOTH MXSHRK MXGROW SMETHOD NTRANS
The design region is offset to form two barriers; MXSHRK is the offset in the shrinkage direction and MXGROW is the offset in the growth direction. The design region is then constrained to deform between these two barriers.

For more details and an example, refer to Mesh Barrier Constraint.

### Additional Treatment to Grids in the Transition Zone

When the entire surface or edge of a system is not a design zone and both design and non-design regions exist adjacent to one another, a transition zone can be defined using NTRANS which helps to smooth out the transition. Sharp changes can occur in the design region during optimization and the sections of the design region closest to the non-design region are designated as a transition zone where the corresponding location of the adjacent non-design region is taken into consideration allowing for a smoother transition from the design to non-design region.

NTRANS defines the number of design grid layers in the transition zone to non-design area, where additional treatment will be applied to produce smooth transition.
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
PERT DTYPE MVFACTOR NSMOOTH MXSHRK MXGROW SMETHOD NTRANS
The resulting optimized design will incorporate the effect of non-design regions while moving the transition zone grid points to achieve a smoother final design. The three regions illustrated in the figure above consist of the following highlighted nodes:
• The non-design nodes (marked by yellow circles), which do not move during Freeshape optimization.
The design nodes are separated into two groups:
• Design nodes in transition zone (highlighted nodes enclosed by red circles, defined by NTRANS=3)
• Design nodes that are NOT in the transition zone (highlighted nodes enclosed by a black circle)
The design nodes in the transition zone will be adjusted during Free-shape optimization to build a smooth transition between "(1) non-design nodes" and "(3) Design nodes that are NOT in the transition zone". Otherwise, discontinuous or sharp sections may occur, which is explained in Figure 11.

## Constraints on Grids in the Design Region

It is possible to identify additional constraints on certain grids in free-shape design regions.

Three types of constraints are available for specified grids as defined by CTYPE# on the GRIDCON continuation line of the DSHAPE entry:
FIXED
Grid cannot move due to free-shape optimization.
DIR
Grid is forced to move along the specified vector.
NORM
Grid is forced to remain on a plane for which the specified vector defines the normal direction.
Note: VECTOR is used to constrain a grid to move along a line, thus it makes no difference by rotating the vector by 180 degrees.
Constraints are defined on the GRIDCON continuation line as:
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
GRIDCON GCMETH GCSETID1 /

GDID1

CTYPE1 CID1 X1 Y1 Z1
GCMETH GCSETID2 /

GDID2

CTYPE2 CID2 X2 Y2 Z2

### Example: CTYPE=VECTOR

This example demonstrates a simple case where it is necessary to use the "DIR" constraint type to force grids to move in a predefined direction.

A free-shape optimization is performed on a quarter model of a rectangular plate with a hole, shown here:
The curved edge is the free-shape design region. Without any constraints on the free-shape design region, the grids at the ends of the curved edge do not move exactly along the line of the straight edge, but move slightly outward, as shown here:
In order to prevent this phenomenon, the grids at the ends of the curved edge (shown in yellow below) are both constrained to move along the vector indicated by the red arrows.
Using these constraints - corner grids moving along the constrained direction - the grids at the ends of the curved edge now move as desired, along the line of the straight edge, as shown here:

### Example: CTYPE=PLANAR

The total volume of a cantilever beam is to be minimized subject to a displacement constraint in the loading direction at the free-end of the beam.
Two free-shape design regions are defined in this example. Both of the vertical sides of the beam are selected as design regions and a free-shape optimization is performed.
Without any constraints on the free-shape design region, the top and bottom surfaces of the beam do not remain strictly on the X-Z plane.
To ensure that the top and bottom surfaces remain on the X-Z plane, the grids along the edges of the design regions DSHAPE1 and DSHAPE2 are constrained to move only on the X-Z plane.
Using these constraints - constrained grids moving only on the X-Z plane - the top and bottom surfaces of the beam remain on the X-Z plane as desired.

## 1-plane Symmetry Constraint

An advantage of this constraint is that it will produce symmetric designs regardless of the initial mesh, loads or boundary conditions.

It is often desirable to produce a symmetric design. Even if the loads and boundary conditions are perfectly symmetric, there is no guarantee that the resulting design will be perfectly symmetric. In order to ensure a symmetric design, a symmetry constraint must be defined.

The 1-plane symmetry constraint is defined on the PATRN continuation line:
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
PATRN TYP AID/

XA

YA ZA FID/

XF

YF ZF

### Example: 1-plane Symmetry Constraints in 2-dimensions

The objective is to minimize the total volume subject to a stress constraint using free-shape optimization. Results are shown with and without symmetry constraints.

### Example: 1-plane Symmetry Constraints in 3-dimensions

The objective is to minimize the compliance subject to a volume constraint using free-shape optimization. Results are shown with and without symmetry constraints.

## Extrusion Constraint

Using extrusion manufacturing constraints with free-shape optimization, constant cross-section designs can be attained for solid models (regardless of the initial mesh, loads or boundary conditions).

It is often desirable to produce a design with a constant cross-section along a given path, particularly in the case of parts manufactured by an extrusion process.

The extrusion constraint is defined on the EXTR continuation line:
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
EXTR ECID XE YE ZE

Two types of extrusion path are available for free-shape optimization - straight line and circular.

### Example: Extrusion Constraint Along a Straight Line

The FE model, optimization problem and design variables definition are the same as in the previous example, so the result without the extrusion constraint is the same as shown above. The result with the extrusion constraint (straight line) is shown here.

### Example: Extrusion Constraint Along a Circular Path

The objective is to minimize the von Mises stress subject to a volume constraint using free-shape optimization. A circular extrusion path is defined using a cylindrical coordinate system ($\theta$ direction). Results are shown with and without extrusion constraints (circular).

## Draw Direction Constraint

Draw direction constraints may be defined for the design region so that the optimized shape will allow the die to slide in a specified direction.

In the casting process, cavities that are not open and lined up with the sliding direction of the die are not feasible. Only a single die is considered for each design region (defined in each DSHAPE card), and non-design regions will not be considered for this constraint.

The draw direction constraint is defined on the DRAW continuation line:
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
DRAW DTYP DAID/

XDA

YDA ZDA DFID/

XDF

YDF ZDF

### Example: Draw Direction Constraint

The FE model, optimization problem and design grids definition are the same as those in the example showing 1-plane symmetry constraints in 3 dimensions.

### Example: Combination of 1-plane Symmetry and Draw Direction Constraints

The FE model, Side Constraints optimization problem and design grids definition are the same as those in the example showing 1-plane symmetry constraints in 3 dimensions.

## Side Constraints

Side constraints allow the deformation space to be defined as a coordinate range.

Similar to the maximum shrinkage and growth parameters as defined on the PERT continuation line, it is possible to limit the extent of the total deformation of the design region by way of side constraints. Side constraints allow the deformation space to be defined as a coordinate range; i.e. between (x1, y1, z1) and (x2, y2, z2). These ranges may be with reference to rectangular, cylindrical or spherical systems.

### Example: Side Constraints

The objective is to minimize the von Mises stress subject to a volume constraint using free-shape optimization. Results are shown with and without side constraints.

## Mesh Barrier Constraints

The mesh barrier is composed of special shell elements (BMFACE), and in order to keep computational effort to a minimum, as few elements as possible should be used in its definition.

Aside from shrinkage and growth parameters and side constraints, a more general capability to limit the extent of the total deformation of the design region is available by way of defining a mesh barrier constraint.

The mesh barrier is defined on the BMESH continuation line.
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10)
BMESH BMID

### Example: Mesh Barrier Constraint

The FE model, optimization problem and design grids definition are the same as those in the example showing 1-plane symmetry constraints in 3 dimensions. A mesh barrier is added (large red tria elements).

From the results, you can see how the mesh barrier constrains the model deformation, but if the mesh barrier is not big enough, the design region deformation is unconstrained beyond its limits.

### Example: Maximum Shrinkage and Growth Parameters

The FE model, optimization problem and design grids definition are the same as those in the example showing 1-plane symmetry constraints in 3 dimensions. In addition, maximum shrinkage and growth parameters (2.0) and a 1-plane symmetry constraint (XZ-plane), are defined.