Skip to content

Mechanics of Heterogeneous & Architectured Materials

From microstructure
to simulation.

3MAH is an open-source stack for the mechanics of materials: generate and mesh the microstructure, model the material, solve the structure — in a single Python workflow.

Get started Browse examples GitHub

Gyroid ⌄

The 3MAH initiative brings together three complementary, interoperable open-source libraries: simcoon for constitutive modeling and micromechanics, fedoo for nonlinear finite element analysis, and microgen for microstructure generation and meshing. Together, they provide a complete pipeline from geometry to simulation for research in mechanics of heterogeneous and architectured materials.

From microstructure to simulation

An elasto-plastic gyroid under periodic homogenization: microgen generates the unit cell and its periodic mesh, remeshed with mmg, simcoon supplies the plasticity law, fedoo applies a 2 % mean tensile strain. simcoon tensors then post-process the result: the macroscopic stress, and the tangent modulus of the cell, inverted to get the strain increment of a uniaxial stress increment, Δε = Lt-1 : Δσ.

Show the Python script and its output
import fedoo as fd
import numpy as np
import pyvista as pv
import simcoon as sim
from microgen import Phase, Rve, Tpms, mesh_periodic
from microgen.remesh import remesh_keeping_boundaries_for_fem
from microgen.shape.surface_functions import gyroid

# microgen: a gyroid unit cell, meshed with matching nodes on opposite faces,
# then remeshed with mmg for well-shaped tetrahedra
cell = Phase.from_cad(Tpms(surface_function=gyroid, density=0.3, resolution=30).generate_cad())
cell.cad.export_step("gyroid.step")
mesh_periodic(
    mesh_file="gyroid.step",
    rve=Rve(dim=1),
    list_phases=[cell],
    size=0.035,
    order=1,
    output_file="gyroid.vtk",
)
remesh_keeping_boundaries_for_fem(
    pv.UnstructuredGrid("gyroid.vtk"), periodic=True, hmax=0.035
).save("gyroid.vtk")

# simcoon: elasto-plastic law with isotropic power-law hardening
#                 E      nu   alpha  sigma_y  k     m
props = np.array([200e3, 0.3, 1e-5, 300.0, 1000.0, 0.3])
material = fd.constitutivelaw.Simcoon("EPICP", props)

# fedoo: periodic homogenization of the cell under a 2 % mean tensile strain
fd.ModelingSpace("3D")
mesh = fd.Mesh.read("gyroid.vtk")
assembly = fd.Assembly.create(fd.weakform.StressEquilibrium(material), mesh)

pb = fd.problem.NonLinear(assembly)
pb.bc.add(fd.constraint.PeriodicBC("small_strain"))
pb.bc.add("Dirichlet", mesh.nearest_node(mesh.bounding_box.center), "Disp", 0)
pb.bc.add("Dirichlet", "E_xx", 0.02)
pb.nlsolve(dt=0.025, tmax=1)

# simcoon tensors: macroscopic stress at the end of the loading
volume = mesh.bounding_box.volume
sigma = sim.Tensor2.stress(pb.get_ext_forces("MeanStrain").ravel() / volume)
print(f"macroscopic von Mises stress: {sigma.mises():.1f} MPa")

# tangent modulus of the cell, then the strain increment of a uniaxial
# stress increment: deps = Lt^-1 : dsig
Lt = sim.Tensor4.stiffness(fd.homogen.get_tangent_stiffness(pb))
dsig = sim.Tensor2.stress([10, 0, 0, 0, 0, 0])
deps = Lt.inverse() @ dsig
print("strain increment (%):", (100 * deps.voigt).round(2))
print(f"uniaxial tangent modulus: {dsig.voigt[0] / deps.voigt[0]:.0f} MPa")

pb.get_results(assembly, ["Stress", "P"]).plot("P")

The script prints:

macroscopic von Mises stress: 92.3 MPa
strain increment (%): [ 1.07 -0.4  -0.4   0.    0.   -0.  ]
uniaxial tangent modulus: 938 MPa

A full simulation framework

Periodic tetrahedral mesh of the gyroid unit cell

microgen — periodic mesh of the gyroid cell after mmg remeshing, 30 % density.

Equivalent plastic strain in the gyroid cell at 2 % mean strain

fedoo — equivalent plastic strain at 2 % mean strain along x (dark to light: 0 to 2.5 %).

Macroscopic stress-strain response of the gyroid cell with its tangent modulus

simcoon — macroscopic response and tangent modulus Lt at the end of the loading.

At 2 % mean strain the cell carries 92 MPa, for a matrix that yields at 300 MPa. A further uniaxial stress increment of 10 MPa along x stretches the cell by 1.07 % and contracts it by 0.40 % in the two transverse directions: the tangent modulus of the cell has dropped to 0.94 GPa. The mesh has about 27 400 nodes; the images are produced with the same parameters by scripts/render_libraries.py.

The three libraries Install them

simcoon — Constitutive modeling & micromechanics

simcoon

simcoon

Constitutive modeling and micromechanics in C++ with Python bindings. Anisotropic elasticity, plasticity (isotropic, kinematic, Chaboche), viscoelasticity, hyperelasticity and phase transformation, with finite-strain support.

simcoon docs

Mean-field homogenization

Mean-field homogenization

Effective properties of composites with Mori-Tanaka and self-consistent schemes, framed by Voigt and Reuss bounds and validated against experimental data.

See example

Directional stiffness

Analysis & identification

Analyse directional stiffness, yield surfaces and cyclic response, then identify model parameters with hybrid genetic-gradient algorithms.

See example

Parameter identification from cyclic experiments

Identify seven Chaboche parameters — initial yield σ_y, Voce isotropic hardening (Q, b) and two non-linear Armstrong-Frederick backstresses (C₁, D₁, C₂, D₂) — from three cyclic uniaxial tests at increasing strain amplitudes. simcoon's EPCHA UMAT is the forward model, driven through sim.solver; the new simcoon.identify module wraps SciPy's differential evolution with a key-based file-templating workflow that generalises to any optimiser or external simulator.

EPCHA UMAT · E = 140 GPa, ν = 0.3 (fixed) · 7 parameters identified · cost = NMSE-per-response, balanced across the three tests · optimiser: scipy.optimize.differential_evolution (popsize 15, maxiter 80, seed 42) · final cost ≈ 8 × 10⁻³.

fedoo — Nonlinear finite element analysis

fedoo

fedoo

A Python finite element solver for nonlinear mechanics, with an emphasis on geometric and material nonlinearity, model reduction (PGD) and multiscale homogenization.

fedoo docs

Periodic homogenization

Periodic homogenization

Apply periodic boundary conditions on representative volume elements to extract full anisotropic effective stiffness and nonlinear macroscopic response.

−920+920 MPashear stress σyz

See example

Beam and shell elements

Beam, shell and solid elements

From 2D plates with holes to 3D beam lattices and pressurised shells: a unified API for 1D, 2D and 3D structural analysis.

025displacement |u| (lattice side: 100)

Read more

Nonlinear and finite-strain mechanics

Plastic buckling of a thin tube under axial compression — 2D axisymmetric model with updated-Lagrangian finite strain, self-contact, and a simcoon EPICP elasto-plastic UMAT. Line-search Newton with adaptive stiffness drives the tube from undeformed to fully folded in a single nonlinear solve.

Undeformed tube — initial configuration

Initial

Evolution

Fully folded tube — final accordion-like configuration with equivalent plastic strain field

Final

E = 200 GPa · σ_y = 300 MPa · power-law isotropic hardening σ = σ_y + k·pm (k = 1000, m = 0.3) · 240 axial elements · 3D revolution from the axisymmetric solution · field shown: equivalent plastic strain p.

Contact with IPC

Robust incremental potential contact (IPC) via the ipctk backend — barrier-method, intersection-free, frictional or frictionless contact for indentation, self-contact and lattice compression. The disk-on-plate example here is validated against the Hertzian half-space solution.

Read more

microgen — Microstructure generation & meshing

microgen

microgen

A Python library for microstructure generation and meshing: TPMS, lattices, polycrystals and hybrid architectures, exported to CAD or directly to periodic FE meshes.

microgen docs

Graded TPMS

Graded TPMS & lattices

Generate gyroids, Schwarz, Schoen and other triply periodic minimal surfaces, with spatially graded thickness and mapping onto arbitrary CAD bodies.

See example

Polycrystals & architectured cells

Voronoi polycrystals, octet-truss lattices, honeycombs and hybrid architectures, ready for periodic homogenization in fedoo or Abaqus.

See example

Graded and periodic meshes

microgen drives Gmsh and MMG from Python to deliver two complementary mesh styles for architectured materials: graded structures with spatially varying thickness, and seamlessly periodic unit cells ready for periodic-homogenisation BCs in fedoo or Abaqus.

Spatially graded gyroid with the conforming triangular mesh visible across the gradient

Graded — tanh-graded gyroid, thickness varying along x.

A single TPMS unit cell tiled three by two showing seamless periodicity across cell boundaries

Periodic — unit cell tiled 3 × 2, no seam visible.

Open CASCADE (OCP) for geometry · Gmsh for the conforming triangulation · MMG for adaptive remeshing · exported as .vtk /.msh for fedoo, Abaqus and others.

Continuous morphing between TPMS families

Blend any two TPMS surface functions with a tanh weight to walk continuously through families: gyroid → Schwarz P → Schwarz D → Neovius → Schoen IWP → Schoen FRD → Fischer-Koch S → PMY → honeycomb → Lidinoid → split P → gyroid. The animated transition exposes the underlying surface-function arithmetic of microgen.

See example

Team

Meet the researchers and labs behind 3MAH.

About the team

Gallery

Explore simulations and renderings produced with the 3MAH stack.

Open gallery