MatTO#

Material and topology optimization of stimulus-responsive soft materials: nonlinear finite-element analysis with FEniCSx and gradient-based optimization of structural density, material composition and material orientation, with the constitutive model kept apart from the optimization machinery. The supported material models are hard-magnetic soft materials, isotropic and anisotropic magneto-active elastomers, and liquid crystal elastomers; a new model is a class with a free-energy density.

Source and issues: github.com/CEADpx/matto.

Installation#

FEniCSx (dolfinx, basix, ufl, petsc4py, mpi4py) is installed from conda-forge, not pip. The environment file pins the tested versions.

conda env create -f environment.yml
conda activate confenx
python -m pip install -e .

Running an example#

Each example is one input script that builds a problem dictionary and runs it:

python examples/hMSM/input_beam.py
mpirun -n 4 python examples/hMSM/input_beam.py

Results go to the output_dir named in the script: a .bp file per load case for ParaView, the final design fields as .npy arrays, and final_results.txt.