ANTOINE LAURAIN
PHD IN MATHEMATICS
LEVEL SET-BASED 2D STRUCTURAL OPTIMIZATION USING FENICS

This educational code written for FEniCS is for compliance minimization in structural optimization, in two dimensions. The code is based on a level set formulation and on the distributed expression of the shape derivative, and exploits the powerful features of FEniCS to solve complicated PDEs with a simple implementation. The code is written for compliance minimization in the framework of linearized elasticity, but can be adapted for other functionals or other PDEs. I have also added an extension of the code for compliant mechanisms.

FEniCS Project


The code consists of two files: compliance.py and init.py. The main file is compliance.py. The file init.py is used to initialize one of the six following cases:

half_wheel, bridge, cantilever, cantilever_asymmetric, MBB_beam, cantilever_twoforces.

For instance, to run the cantilever case, the command line is

python compliance.py cantilever

I have also added an extension of the code for compliant mechanisms, see the file mechanism.py. To run this case, the command line is

python mechanism.py inverter

The code comes with a paper explaining in details the mathematical framework used for the code, and the implementation. The PDF file is included in the .tar.gz file for downloading here:

FEniCS 2017.1 code for structural optimization and PDF file


Questions, suggestions and feedback are welcome, please send me an email at the following address: laurain at ime dot usp dot br

Updates:
- 08/05/2017 First upload
- 30/05/2017 Update 1. Line 94, replaced print('Volume fraction : %.2f' % vol/(lx*ly))
by print('Volume fraction : %.2f' % (vol/(lx*ly)))
PDF file updated.
- 25/08/2017 Update 2. Code and PDF file updated. The file compliance.py gives the same result but is shorter.
The PDF file has been significantly modified compared to the previous version.
Added a file mechanism.py for compliant mechanisms.
Symmetric cantilever
Asymmetric cantilever
Half-wheel
Bridge
MBB beam
Cantilever with two loads
ENGLISH | FRANÇAIS