Skip to main content

Micro-CT-driven generation of biomimetic enamel lattices with FEA-based design optimization.

Project description

biomimetic-lattice-pipeline

CI License: Apache 2.0 Python

Micro-CT–driven generation of biomimetic enamel lattices with finite-element-based design optimization.

The pipeline turns measured three-dimensional rod geometry from synchrotron micro-CT of tooth enamel into parametric CAD lattices, runs linear-elastic finite-element analysis (FEA) on them, scores the results against pluggable objectives, and can drive a closed-loop Optuna optimization that searches the manufacturability-constrained design space — emitting a metrics JSON and a LaTeX/PDF report per run.

This is the software behind the Matter manuscript "Translating Helically Decussated Enamel into Damage-Tolerant Bioinspired Lattices" (Renteria et al., in preparation).

Architecture

pipeline architecture

A single canonical morphometrics.json is the only coupling point between stages, so each component can be swapped independently:

ingest/        measured micro-CT morphometrics  ->  canonical morphometrics.json
mapping/       morphometrics  ->  CAD parameters (deterministic, with logged manufacturability clamps)
generators/    parametric continuous-twist CAD family + rod-by-rod digital-twin variants
fea/           strain-solver driving SfePy to a target representative stress
metrics/       crack-deflection streamlines, biomimicry score, SCF, toughness, ...
objectives/    YAML-configured, registry-based scoring (crack deflection, toughness, ...)
orchestration/ single-run, sweep, Optuna optimization, and closed-loop drivers
reporting/     LaTeX/PDF report generation
geometry/      CadQuery + SfePy CAD/mesh/FEA engine, driven by generators/ + fea/ via subprocess (conda)

Install

git clone https://github.com/crentb/biomimetic-lattice-pipeline.git
cd biomimetic-lattice-pipeline
python -m pip install -e ".[dev]"      # core runtime + dev tools (pytest, ruff, black)

Optional heavy geometry/visualization extras:

python -m pip install -e ".[fea]"      # pyvista, gmsh, meshio, scikit-image

Full FEA additionally requires CadQuery and SfePy (installed via conda, as they are awkward to pip-install across platforms); the CAD/FEA engine itself ships in this repo under geometry/ (see geometry/README.md). The default install and the CI exercise the pure-Python design and analytics logic; the heavy FEA/CAD path is gated behind the slow pytest marker.

Quickstart

# End-to-end single-specimen run: morphometrics -> CAD -> mesh -> FEA -> metrics -> report
python scripts/run_pipeline.py --morphometrics path/to/morphometrics.json \
    --run-name demo --objective crack_deflection --model-type continuous_twist

# Parametric sweep over a single free CAD parameter
python scripts/run_sweep.py --morphometrics path/to/morphometrics.json \
    --run-name sweep_layers --param N_BRIDGE_LAYERS --values 4 6 8

# Closed-loop Optuna optimization of an objective
python scripts/run_optimize.py --morphometrics path/to/morphometrics.json \
    --run-name opt_cd --objective crack_deflection --n-trials 30

(See scripts/ for the full set of CLI entry points.)

Testing

pytest -m "not slow"      # fast, pure-Python logic tests (what CI runs)
pytest                    # everything, including the FEA integration test (needs the conda FEA stack)

License

Apache-2.0 — see LICENSE and NOTICE.

Citation

A CITATION.cff will accompany the first tagged release; until then, please cite the Matter manuscript above.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

biomimetic_lattice_pipeline-0.2.0.tar.gz (105.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

biomimetic_lattice_pipeline-0.2.0-py3-none-any.whl (124.4 kB view details)

Uploaded Python 3

File details

Details for the file biomimetic_lattice_pipeline-0.2.0.tar.gz.

File metadata

File hashes

Hashes for biomimetic_lattice_pipeline-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e0664b455a7bf1b68c15947c3890b0a0f4a4a707da55f0003c5a1364e9e66eb3
MD5 2328445da34d1959ebf620de406ba535
BLAKE2b-256 26e00bea3772b8efcef48eb5a261ad9e616027dd8f1bb241e9a43a466d17c9f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for biomimetic_lattice_pipeline-0.2.0.tar.gz:

Publisher: release.yml on crentb/biomimetic-lattice-pipeline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file biomimetic_lattice_pipeline-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for biomimetic_lattice_pipeline-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cfdf1a7c517edd2fa33f6992f80f92a5a7b482e6541d456e949c085004ec91b0
MD5 14dd231f83de787b4418b807e0757671
BLAKE2b-256 dc2b6be0062d0d8f327f68894aa83ffda1ff9fa6ab2cc269fb6550ef0f0cd5cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for biomimetic_lattice_pipeline-0.2.0-py3-none-any.whl:

Publisher: release.yml on crentb/biomimetic-lattice-pipeline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page