Post

Generative Adversarial Network for Topology Optimization

While working on the infill patterns for my slicer , I had the idea to topology optimize the cross-sections of the part. TO cross sections should produce stiffer parts compared to parts constructed with arbitrary infill patterns, but incur a hefty computational cost. GANs offer a unique solution to drastically reduce the computational cost.

Overview

I was interested in making parts more resilient to impact. Assuming each region of the part has an equal chance of hitting the ground, which imparts a force normal to the surface, the contact force distributed across the shape’s perimeter creates a hydrostatic pressure field. This pressure field will be used as the boundary condition in topology optimization.

FBD

Dataset Generation

The dataset used to train the network was created in four steps. First, a circle or rectangle was selected as the base shape, with 48 evenly spaced nodes placed on its perimeter. These nodes were then randomly translated, and the weak convex hull of these points was used to construct the topology for subsequent optimization, an example of which is below:

Randomized Generated Shape

Using the previously generated topology, a dense point cloud is created within its area. Lloyd’s algorithm is then applied to generate elements of equal area, forming the shape’s mesh. The hydrostatic condition is applied. From these conditions, the topology is optimized resulting in the design below:

Optimized Topology

Tensorflow

TensorFlow was used to train the neural network. The input to the network was the unoptimized topology, while the output was the optimized topology. Training lasted for 48 hours on a cluster computer. In the image to the right, the top row shows the original shapes, the middle row displays the network’s optimized topologies, and the bottom row presents the optimized topology.

Tensorflow Comparison

Implementation

Using the GAN network, slices are fed into the system to produce an approximated optimized topology. Since the resulting topologies are often difficult to manufacture, a filter is applied to the output. This filter removes small cavities and smooths the rest, resulting in the final optimized topology

Natural Shape

Initial Shape

NN Output

NN Output

Smoothed

Processed Output
This post is licensed under CC BY 4.0 by the author.