morphoGen
Virtual microstructures for the mechanics and physics of materials.
morphoGen generates random and architected media from models of mathematical morphology and stochastic geometry, describes them exactly, measures them against theory, computes their apparent properties up to their fracture, and tells how large a volume must be to represent them. It is a Python package with a command line and a graphical interface in the web browser.
What it does
A study follows one chain, and each step is a part of the package:
| Step | What morphoGen does |
|---|---|
| Generate | 40 models: Boolean models, packings, fibres, tessellations, Gaussian fields, dead leaves, automata and growths, lattices, foams, triply periodic surfaces, bio-inspired structures; periodic or not, combined, nested |
| Describe | an exact description of each realization (centres, axes, cells) and an implicit function for each phase, from which voxel images, surfaces and conforming meshes are cut at any resolution |
| Measure | fractions, specific surface, covariance, chords, tortuosity, percolation thresholds, stereology..., each beside the closed form of its model when there is one |
| Compute | elastic, thermal, electrical, dielectric, magnetic and diffusive properties, their couplings, harmonic regimes, waves, flow and sound: an FFT solver on voxels (CPU or GPU), finite elements on conforming meshes, extended finite elements |
| Load | plasticity, crystal plasticity, viscoelasticity, hyperelasticity, damage and MFront laws along loading paths, in small or finite strains; macroscopic laws identified, reduced or learned from the responses |
| Break | the phase field of fracture, cohesive zones, cracks of any front, ductile growth; contact and friction; high-cycle fatigue |
| Size the RVE | the statistics of Kanit et al. (2003): the variance against the volume, the integral range, the volume and the number of realizations for a precision |
| Design | topology optimization of periodic cells, compatible assemblies of building blocks, rigidity of lattices, isogeometric shape optimization |
Two application modules build on this chain: metal sheets architectured by localized
laser treatment (morphogen.laser) and explicit dynamics with OpenRadioss
(morphogen.dynamics). Meshes, images, behaviours and results go to Abaqus, CalculiX,
AMITEX_FFTP, MFront, Z-set, Gmsh, Neper, DAMASK, FEniCSx and ParaView.
Installation
python -m pip install "morphogen[all]"
morphoGen needs Python 3.12 or newer, on Windows, macOS or Linux; every dependency comes as a binary wheel. The installation guide gives the environments, the installation from the sources and the optional components (NVIDIA GPUs, the stand-alone application, OpenRadioss, MFront).
A first study
A model, a realization, its voxels, a measure against theory and three apparent properties, in a second:
import morphogen as mg
from morphogen.homogenization import Material, homogenize
model = mg.models.BooleanSpheres(radius=1.0, volume_fraction=0.3)
micro = model.generate(mg.Domain.cube(8.0, periodic=True), seed=1) # centres and radii
image = micro.voxelize(shape=32) # 32³ voxels: phase 0 (matrix), phase 1 (spheres)
theory = model.theory()
print(mg.analysis.volume_fraction(image), theory["volume_fraction"]) # 0.29 for 0.3
phases = {
0: Material(young=3.0, poisson=0.35, conductivity=0.2), # a polymer: GPa, W/(m K)
1: Material(young=70.0, poisson=0.22, conductivity=1.0), # glass
}
properties = ["bulk_modulus", "shear_modulus", "conductivity"]
out = homogenize(image, phases, properties=properties)
print({name: result.value for name, result in out.items()}) # 5.89, 2.59 (GPa), 0.33
The same from a configuration file, or from forms:
morphogen template homogenization_spheres -o study.yaml # an example to start from
morphogen run study.yaml # realizations and properties
morphogen gui # the interface, in the browser
Documentation
The documentation is online at jdirr.github.io/morphoGen:
- the tutorials follow whole studies, and the recipes answer short questions;
- the user guide has a page for each step of a study, and the gallery an example for each template;
- the API reference documents the package, and the theory notes the formulas implemented and how they are checked.
Citing
If morphoGen serves your work, please cite it by the DOI of all its versions, 10.5281/zenodo.24340315, with the papers of the methods you use; CITATION.cff and the page Citing morphoGen give the reference.
Contributing
Questions, bug reports and proposals are welcome as issues; changes go through pull requests (CONTRIBUTING.md).
Licence
Copyright © 2026 Justin Dirrenberger. morphoGen is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See LICENSE.
Metadata
Release files for morphogen 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| morphogen-1.0.2.tar.gz | 6.2 MB | With provenance | Details for morphogen-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| morphogen-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for morphogen-1.0.2-py3-none-any.whl |
Total release size: 8.6 MB
Release files / morphogen-1.0.2.tar.gz
| Download URL | morphogen-1.0.2.tar.gz |
|---|---|
| Size | 6.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15349a757cc06f5712394fb013c80f10e020285fa6fc80a623bcaadc4bfc2a9a
|
|
BLAKE2b-256 checksum How to use checksums |
193f6fbafc5b0626940ef85e0673e5dba70f41fe4f6b0cf5ee554fb5f1aa0e80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logRelease files / morphogen-1.0.2-py3-none-any.whl
| Download URL | morphogen-1.0.2-py3-none-any.whl |
|---|---|
| Size | 2.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fbd08a96ca9e831e9db6a296d06106edc91980d889dddde49a5945d7dc77c364
|
|
BLAKE2b-256 checksum How to use checksums |
9e247687e6b8f36a2a45c61b4225495f9523d4bdd33b9a71f839e5d1e8c5206c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logSecurity for morphogen 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for morphogen-1.0.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.