Skip to content
William Hunter edited this page Jun 4, 2016 · 20 revisions

ToPy Logo

Introduction

What is ToPy? ToPy is short for topology optimisation (optimization) using Python.

ToPy can solve one of three types of topology optimisation problems:

  1. minimum compliance (same as maximum stiffness),
  2. heat conduction or
  3. mechanism design (synthesis).

A problem is defined (created) by means of a simple text input file, a TPD file, which stands for ToPy Problem Definition.

ToPy solves the problem to obtain a 2D (or 3D, depending on the input file) checker-free black-white (in 2D) or solid-void (in 3D) solution. The result is

  1. an optimally stiff structure for minimum compliance problems,
  2. an optimal distribution of two materials for heat conduction problems and
  3. an optimal distribution of material for efficient mobility.

The 2D results are PNG files and the 3D results are VTK files.

There is (going to be) a tutorial to solve a 2D compliance problem here: Tutorials.

Limitations

  • ToPy only works with regular square (for 2D) and cubic (for 3D) meshes. Your mesh will therefore consist of perfectly square (for 2D) or perfectly cubic (for 3D) elements.
  • No GUI for defining problems (but maybe in the future, if I can come up with a simple way of doing it)
  • No CAD interface (although you can save the 3D files as STL files via ParaView)

Background

The development was originally done on Linux (32-bit), but ToPy works on Windows (32 and 64-bit¹) and OS X¹ too.

ToPy was part of my master's thesis in mechanical engineering at the University of Stellenbosch, South Africa.

¹ Thanks to Nikos Kaminakis for letting me know.

Status

All the code has been uploaded here, so just clone and follow the instructions in the install file. ToPy has been downloaded more than a 1000 times (when it was still hosted by Google Code) and numerous users have used it with success. If you follow the installation instructions, ToPy should (will) work.

Examples

See Examples for some examples of the input (problem definition) files and their output after it was solved with ToPy.

Disclaimer (sort of)

I'm not a programmer by profession or training/education, so don't expect to see a coding masterpiece. The code is however well documented, it follows the prescribed Python syntax rules, and probably most relevant: it works.

Clone this wiki locally