Skip to main content

morphoGen

PyPI Python CI Documentation DOI Licence: GPL v3 or later

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.

a Boolean model of spheres a Voronoi polycrystal fibres packed without overlap a gyroid trabecular bone a pattern of reaction and diffusion

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:

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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for morphogen 1.0.1
File Size Uploaded Provenance Actions
morphogen-1.0.1.tar.gz 9.5 MB With provenance Details for morphogen-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for morphogen 1.0.1
File Interpreter ABI Platform Actions
morphogen-1.0.1-py3-none-any.whl Python 3 none any Details for morphogen-1.0.1-py3-none-any.whl

Total release size: 11.8 MB

Release files / morphogen-1.0.1.tar.gz

Download URL morphogen-1.0.1.tar.gz
Size 9.5 MB
Tags Source
SHA-256 checksum
How to use checksums
188bf1ce9e9d0e5a4a35712abb8172a2e7ed79637ef51cbe79b5a74d96500505
BLAKE2b-256 checksum
How to use checksums
727f8a26a18b080961e42fb84683839deb25316e52bac0d9f29480a17d7f3690
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 18, 2026.

Transparency log

Release files / morphogen-1.0.1-py3-none-any.whl

Download URL morphogen-1.0.1-py3-none-any.whl
Size 2.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ff27d04eb53e4631990e2df07f55bf76dc2bcf4f185ed85d375b1f3affa99603
BLAKE2b-256 checksum
How to use checksums
61a00a77f0aadb0d9abab2eeb21cb9ec937482ac69e742b8a6b3a2c9dc55c577
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 18, 2026.

Transparency log

Security for morphogen 1.0.1

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.

Select from 2 files

Attestation for morphogen-1.0.1.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 18, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page