FEMorph 2.0

FEMorph is an extensive addon for Python FEniCS for large scale nodal shape optimization, morphing and deformation. Its main feature is the automatic derivation of shape derivatives in UFL. It also features robust grid deformation algorithms, mesh repair techniques, equal distant point spacing, curvature computation and symmetry computations, among others.

The software will be made available soon on GitHub.

The strongest new feature of version 2.0 is the automatic generation of 1st and higher order classical Hadamard-type shape derivatives in UFL and FEniCS.

Consider for example the problem to find a flow obstacle, such that internal shear, resp. drag, is minimized in a viscous, incompressible fluid: Navier Stokes Optimization With the new version 2.0 capabilities, it suffices to specify the Lagrangian (excluding the target volume) in UFL


  L = Eta*inner(grad(u0), grad(u0))*dx
  L +=(Eta*inner(grad(u0), grad(lu0)) + lp0*div(u0) - p0*div(lu0))*dx
  L += (lVol*OneR)*dx

and a call to the ShapeDerivative-routine will automatically generate the Hadamard shape derivative, that is the derivative of the Lagrangian into the direction of a domain deformation V.

  dLV = ShapeDerivative(L, V, N, ...)

The resulting UFL object can then be used in a steepest descent algorithm or a repeated application of the routines can be used to construct a Newton-like scheme.

FEMorph 1.0

The version 1.0 software is available here. It contains the actual shape optimization toolbox "ShapeOpt.py" as well as the transient/stationary 2D/3D primal/adjoint flow solver "Navier.py" and the SUPG Convection-Diffusion solver "ConvectionDiffusion.py". Together with the meshes also contained in the .zip, all results from this website should be reproduceable. The software also works in distributed memory parallelism.

The article describing the reparameterization and deformation strategy is available here.

This addon is tested with dolfin version 1.4.0+ (Dorsal automatic installation on OpenSuse 13.2 and Debian Wheezy). I have had reports of memory leaks when version 1.4.0 was used.

Self-Reparameterization
Reparameterization and equal node spacing in 2D and 3D Navier-Stokes nodal shape optimization
2D initial shape and mesh 2d final shape and mesh
Automatic and robust mesh deformation in 2D and 3D. Both meshes are topologically identical with nicely spaced vertices.
Volume Vertex Normal
Vertex normal extension to the volume based on solving a smoothed Eikonal-Equation
Transient 3D Flow Transient 2D Flow
Transient flow calculation in 2D and 3D with hand-discrete adjoint with customizable primal storage.
Curvature
Mean curvature of surfaces computed with FEniCS