# Topology optimization

Topology optimization is a mathematical method that optimizes material layout within a given design space, for a given set of loads, boundary conditions and constraints with the goal of maximizing the performance of the system. Topology optimization is different from shape optimization and sizing optimization in the sense that the design can attain any shape within the design space, instead of dealing with predefined configurations.
The conventional topology optimization formulation uses a finite element method (FEM) to evaluate the design performance. The design is optimized using either gradient-based mathematical programming techniques such as the optimality criteria algorithm and the method of moving asymptotes or non gradient-based algorithms such as genetic algorithms.
Topology optimization has a wide range of applications in aerospace, mechanical, bio-chemical and civil engineering. Currently, engineers mostly use topology optimization at the concept level of a design process. Due to the free forms that naturally occur, the result is often difficult to manufacture. For that reason the result emerging from topology optimization is often fine-tuned for manufacturability. Adding constraints to the formulation in order to increase the manufacturability is an active field of research. In some cases results from topology optimization can be directly manufactured using additive manufacturing; topology optimization is thus a key part of design for additive manufacturing.

## Problem statement

A topology optimization problem can be written in the general form of an optimization problem as:
    ${\begin{aligned}&{\underset {\rho }{\operatorname {minimize} }}&&F=F(\mathbf {u(\rho ),\rho } )=\int _{\Omega }f(\mathbf {u(\rho ),\rho } )\mathrm {d} V\\&\operatorname {subject\;to} &&G_{0}(\rho )=\int _{\Omega }\rho \mathrm {d} V-V_{0}\leq 0\\&&&G_{j}(\mathbf {u} (\rho ),\rho )\leq 0{\text{ with }}j=1,...,m\end{aligned}}$
The problem statement includes the following:
* An objective function $F(\mathbf {u(\rho ),\rho } )$. This function represents the quantity that is being minimized for best performance. The most common objective function is compliance, where minimizing compliance leads to maximizing the stiffness of a structure.
* The material distribution as a problem variable. This is described by the density of the material at each location $\rho (\mathbf {x} )$. Material is either present, indicated by a 1, or absent, indicated by a 0. $\mathbf {u} =\mathbf {u} (\mathbf {\rho } )$ is a state field that satisfies a linear or nonlinear state equation depending on $\rho$.
* The design space $(\Omega )$. This indicates the allowable volume within which the design can exist. Assembly and packaging requirements, human and tool accessibility are some of the factors that need to be considered in identifying this space . With the definition of the design space, regions or components in the model that cannot be modified during the course of the optimization are considered as non-design regions.
* $\scriptstyle m$ constraints $G_{j}(\mathbf {u} (\rho ),\rho )\leq 0$ a characteristic that the solution must satisfy. Examples are the maximum amount of material to be distributed (volume constraint) or maximum stress values.
Evaluating $\mathbf {u(\rho )}$ often includes solving a differential equation. This is most commonly done using the finite element method since these equations do not have a known analytical solution.

## Implementation methodologies

There are various implementation methodologies that have been used to solve topology optimization problems.

### Solving with discrete/binary variables

Solving topology optimization problems in a discrete sense is done by discretizing the design domain into finite elements. The material densities inside these elements are then treated as the problem variables. In this case material density of one indicates the presence of material, while zero indicates an absence of material. Owing to the attainable topological complexity of the design being dependent on the number of elements, a large number is preferred. Large numbers of finite elements increases the attainable topological complexity, but come at a cost. Firstly, solving the FEM system becomes more expensive. Secondly, algorithms that can handle a large number (several thousands of elements is not uncommon) of discrete variables with multiple constraints are unavailable. Moreover, they are impractically sensitive to parameter variations. In literature problems with up to 30000 variables have been reported.

### Solving the problem with continuous variables

The earlier stated complexities with solving topology optimization problems using binary variables has caused the community to search for other options. One is the modelling of the densities with continuous variables. The material densities can now also attain values between zero and one. Gradient based algorithms that handle large amounts of continuous variables and multiple constraints are available. But the material properties have to be modelled in a continuous setting. This is done through interpolation. One of the most implemented interpolation methodologies is the Solid Isotropic Material with Penalisation method (SIMP). This interpolation is essentially a power law $E\;=\;E_{0}\,+\,\rho ^{p}(E_{1}-E_{0})$. It interpolates the Young's modulus of the material to the scalar selection field. The value of the penalisation parameter $p$ is generally taken between $[1,\,3]$. This has been shown to confirm the micro-structure of the materials. In the SIMP method a lower bound on the Young's modulus is added, $E_{0}$, to make sure the derivatives of the objective function are non-zero when the density becomes zero. The higher the penalisation factor, the more SIMP penalises the algorithm in the use of non-binary densities. Unfortunately, the penalisation parameter also introduces non-convexities.

### Commercial software

There are several commercial topology optimization software on the market. Most of them use topology optimization as a hint how the optimal design should look like, and manual geometry re-construction is required. There are a few solutions which produce optimal designs ready for Additive Manufacturing.

## Examples
### Structural compliance

A stiff structure is one that has the least possible displacement when given certain set of boundary conditions. A global measure of the displacements is the strain energy (also called compliance) of the structure under the prescribed boundary conditions. The lower the strain energy the higher the stiffness of the structure. So, the objective function of the problem is to minimize the strain energy.
On a broad level, one can visualize that the more the material, the less the deflection as there will be more material to resist the loads. So, the optimization requires an opposing constraint, the volume constraint. This is in reality a cost factor, as we would not want to spend a lot of money on the material. To obtain the total material utilized, an integration of the selection field over the volume can be done.
Finally the elasticity governing differential equations are plugged in so as to get the final problem statement.
    $\min _{\rho }\;\int _{\Omega }{\frac {1}{2}}\mathbf {\sigma } :\mathbf {\varepsilon } \,\mathrm {d} \Omega$
subject to:
* $\rho \,\in \,[0,\,1]$
* $\int _{\Omega }\rho \,\mathrm {d} \Omega \;\leq \;V^{*}$
* $\mathbf {\nabla } \cdot \mathbf {\sigma } \,+\,\mathbf {F} \;=\;{\mathbf {0} }$
* $\mathbf {\sigma } \;=\;{\mathsf {C}}:\mathbf {\varepsilon }$
But, a straightforward implementation in the finite element framework of such a problem is still infeasible owing to issues such as:
* Mesh dependency—Mesh Dependency means that the design obtained on one mesh is not the one that will be obtained on another mesh. The features of the design become more intricate as the mesh gets refined.
* Numerical instabilities—The selection of region in the form of a chess board.
Some techniques such as filtering based on image processing are currently being used to alleviate some of these issues. Although it seemed like this was purely a heuristic approach for a long time, theoretical connections to nonlocal elasticity have been made to support the physical sense of these methods.

### Multiphysics problems
#### Fluid-structure-interaction

Fluid-structure-interaction is a strongly coupled phenomenon and concerns the interaction between a stationary or moving fluid and an elastic structure. Many engineering applications and natural phenomena are subject to fluid-structure-interaction and to take such effects into consideration is therefore critical in the design of many engineering applications. Topology optimisation for fluid structure interaction problems has been studied in e.g. references and. Design solutions solved for different Reynolds numbers are shown below. The design solutions depend on the fluid flow with indicate that the coupling between the fluid and the structure is resolved in the design problems.

#### Thermoelectric energy conversion

Thermoelectricity is a multi-physic problem which concerns the interaction and coupling between electric and thermal energy in semi conducting materials. Thermoelectric energy conversion can be described by two separately identified effects: The Seebeck effect and the Peltier effect. The Seebeck effect concerns the conversion of thermal energy into electric energy and the Peltier effect concerns the conversion of electric energy into thermal energy. By spatially distributing two thermoelectric materials in a two dimensional design space with a topology optimisation methodology, it is possible to exceed performance of the constitutive thermoelectric materials for thermoelectric coolers and thermoelectric generators.

### 3F3D Form Follows Force 3D Printing

The current proliferation of 3D printer technology has allowed designers and engineers to use topology optimization techniques when designing new products. Topology optimization combined with 3D printing can result in less weight, improved structural performance and shortened design-to-manufacturing cycle. As the designs, while efficient, might not be realisable with more traditional manufacturing techniques.

### Internal contact

Internal contact can be included in topology optimization by applying the third medium contact method. The third medium contact (TMC) method is an implicit contact formulation that is continuous and differentiable. This makes TMC suitable for use with gradient-based approaches to topology optimization. Monolithic as well as staggerede approaches, which are more common in topology optimization, have been used to create various design with internal contact. Recently, thermal contact has been included in the TMC topology optmization framework.