Repository navigation
Material Registry
The upxo.material package stores typed, provenance-tracked material metadata — identity, processing history, and texture profiles — separately from grain-structure geometry (LFI). It is a small, test-backed layer used when you need structured material records (e.g. tracking texture/processing context alongside a grain structure), not a full materials database or FE material-card library.
Related: Texture & Crystallography, Architecture.
MaterialRegistry replaces older dict-flattening storage: categories keep dataclass instances, optional soft validation (unknown values warn, never block), and provenance (source, method, parameters, timestamp).
from upxo.material.registry import MaterialRegistry
from upxo.material.identity import MaterialIdentity, KNOWN_MATERIALS
from upxo.material.processing import ProcessingRoute, ProcessingStep
from upxo.material.texture import TextureComponentProfile
reg = MaterialRegistry()
reg.register_category(
'MaterialIdentity',
MaterialIdentity,
known_values={'name': KNOWN_MATERIALS},
)
reg.ingest(
'MaterialIdentity',
MaterialIdentity(name='OFHC-Cu', alloy='OFHC', comp='Cu'),
source='user input',
)
print(reg.get('MaterialIdentity').name)
print(reg.get_provenance('MaterialIdentity').source)| Module | Types / role |
|---|---|
registry.py |
MaterialRegistry — register_category, ingest, get, get_provenance
|
provenance.py |
Provenance metadata per ingested instance |
identity.py |
MaterialIdentity (name, alloy, comp); KNOWN_MATERIALS soft whitelist |
processing.py |
ProcessingStep, ProcessingRoute, last_deformation_step
|
texture.py |
TextureComponentProfile — crystal family + component fractions/widths + random fraction |
Material.py |
Older/legacy material property dataclasses and helpers (irradiation, phases, tensile stubs, …) — prefer the typed registry path for new work |
KNOWN_MATERIALS currently includes: OFHC-Cu, CuCrZr, AA7075, AA2099. Unlisted names still ingest with a warning.
| Kind | Examples |
|---|---|
Deformation (seen by last_deformation_step) |
rolling_symmetric, rolling_asymmetric, extrusion, forging
|
| Other |
heat_treatment, casting, machining, aging
|
ProcessingRoute is an ordered list of steps — order matters for texture-history reasoning.
TextureComponentProfile is crystal-family-generic (crystal_family='FCC', …) with dicts shaped like FCCTexture.tc_fractions / spreads so a profile can feed synthetic texture generation without reshaping.
| File | Focus |
|---|---|
tests/material/test_registry.py |
Categories, ingest, provenance, soft validation |
tests/material/test_processing.py |
Step types, last_deformation_step
|
tests/material/test_identity.py |
Identity + known materials |
tests/material/test_texture.py |
TextureComponentProfile |
- In scope: typed bookkeeping for identity / route / texture profile + provenance.
- Out of scope: calibrated property cards for Eurofer/F82H, full ODF databases, automatic coupling into every generator.
- Pipelines (MCGS, FM, twin) do not require a registry entry to generate geometry; registry is optional metadata infrastructure.
Home | Getting Started | API Reference | PyPI | YouTube | GitHub
© 2026 UK Atomic Energy Authority (UKAEA) — GPL-3.0
Getting Started
Grain Structure Generation
- 2D Grain Structures
- 3D Grain Structures
- Excel Input Dashboard
- Monte Carlo Algorithms
- Parameter Sweep & Ensembles
Analysis & Operations
- Grain Characterisation
- Grain Boundary Operations
- Texture & Crystallography
- Representativeness Assessment
- Material Registry
Output
Use Cases
Development
External