# A 3-D FreeFem++ Toolbox for Shape Optimization (Geometry and Topology)

## CMAP, Ecole Polytechnique, January 2010

### Page under construction

• Overview
• Thickness Optimization
• The SIMP Method
• Geometric Optimization
• Low-Contrast Homogenization
• FreeFEM++
• ### Overview

We propose several FreeFem++ routines which allow the users to optimize the thickness, the geometry or the topology of elastic structures. All examples are programmed in three space dimensions.
These routines have been written by G. Allaire, A. Kelly.

Warning : Although they have been written and tested with great care, these FreeFem++ programs come with absolutely no warranty. Their authors decline any responsability linked to their use.

What is shape optimization ?
In the context of solid mechanics it is also called structural optimization. It is the mathematical theory which makes possible the ``automatic'' optimization of mechanical structures. By ``automatic'' it is meant that these methods and algorithms can be implemented on a computer which can analyse and improve the designs of numerous successive configurations without any help from the engineer or designer.
For more details on this topic we refer to the book "Conception optimale de structures" quoted below.

### Thickness Optimization

A simple introductory example is to optimize the distribution of elastic material in a thick plate under load in order to minimize the structure's compliance. The algorithm proceeds by a gradient descent on the elastic energy density of the structure. The total amount of material in the design is constrained by a Lagrange multiplier on the descent step. Numerically implementation of this method requires the use of two capabilities of FreeFEM++: the construction of the three-dimensional mesh, and iterative solution of the PDEs of elasticity by the Finite Element Method on this mesh. For simple structures such as thick plates, the mesh is easily constructed using FreeFEM's internal layer meshing tool. Here a mesh is constructed in two dimensions (x,y) and essentially extruded by copying it in the third (z) and tetrahedralizing. The Finite Element Method is implemented using the Conjugate Gradient solver incorporated in FreeFEM++.

The script for this density optimization algorithm in FreeFEM++ can be downloaded here
.

### The SIMP Method

The SIMP (Solid Isotropic Material with Penalization) is implemented in essentially the same way numerically as the density optimization example above. The difference is that the material density is "penalized" (i.e. the density is raised to some large exponent, say >=3) in order to discourage the formation of intermediate densities (i.e. between 0 and 1) that have no real physical significance in structural optimization. For simple structures such as the long cantilever, which is optimized on a fixed mesh that is shaped as a rectangular prism, the layer mesh capability again proves sufficient to generate the mesh for the Finite Element Method.

The Thick Plate by the SIMP Method
A script for the thick plate by the SIMP Method can be obtained here.

Long Cantilever by the SIMP Method
A script for a long cantilever by the SIMP Method can be obtained here.

A Pylon by the SIMP Method
For more interesting structures (such as a pylon) where layered meshes prove insufficient, the three-dimensional meshing is made possible through FreeFEM's interface with the third-party mesh generator TetGen (by Hang Si, see http://tetgen.berlios.de). A three dimensional surface mesh generated in FreeFEM++ and tetrahedralized by calling the TetGen software.
A script for the Pylon by the SIMP Method can be obtained here (requires TetGen included in current FreeFEM++ releases).

### Geometric Optimization

This Section is Currently Under Construction. Please Check Back Soon.