upxo.material.Material module

Material.py

Aggregates a material’s data across many categories – identity, processing route, crystal structure, texture, mechanical/physical properties, irradiation condition, EBSD-derived statistics, etc. – into one MaterialRegistry (see registry.py), replacing the old ObjectDataDictionary-based build(), which flattened every category to a plain dict on write (discarding type information immediately) and offered no validation or extensibility beyond editing this function directly every time a category was added.

See admin/material/scoping.md and admin/material/implementation_plan.md for the full redesign rationale. Categories that used to live directly in this file – MaterialIdentity, ProcessingCondition, TexCompVolFracFCC, TexFibreVolFracFCC, TexCompWidth – have moved to their own files (identity.py, processing.py, texture.py) or been superseded outright (ProcessingCondition -> ProcessingRoute; the three Tex* classes -> TextureComponentProfile). Everything below is carried over unchanged in content – only the container it’s registered into has changed.

There is no CrossCheckAndAppend equivalent here (the old, broken, never-exercised update-in-place path – see admin/material/scoping.md §2, item 5): calling MaterialRegistry.ingest() again for an already-registered category simply replaces its stored instance and provenance, which covers the same “update on a segment-by-segment basis” use case without a second method.

upxo.material.Material.build()[source]

Build and return the material data base using classes in this module.

When no inputs are provided, defaults prescribed in the class data are used.

Returns:

Typed, extensible, provenance-tracking material data container (see upxo.material.registry). Access a category’s instance via matdata.get("CategoryName"), and its provenance via matdata.get_provenance("CategoryName").

Return type:

MaterialRegistry

Examples

>>> from upxo.material.Material import build
>>> matdata = build()
>>> matdata.categories()
class upxo.material.Material.IrradiationCondition(irr: str = 'neutron', irr_temp: float = 400, irr_dpa: float = 1e-05)[source]

Bases: object

Irradiation environment (type, temperature K, dose in dpa).

irr: str = 'neutron'
irr_temp: float = 400
irr_dpa: float = 1e-05
class upxo.material.Material.CrystalFamily(xtal_family: str = 'mmm')[source]

Bases: object

Crystal family / system label for texture and phase work.

Soft-validated against KNOWN_CRYSTAL_FAMILIES (FCC/BCC/HCP) when registered via build(). Default 'mmm' is a legacy placeholder and intentionally triggers a soft warning.

xtal_family: str = 'mmm'
class upxo.material.Material.Phases(nphases: int = 2, namesPhases: numpy.ndarray = <factory>, phaseFractions: numpy.ndarray = <factory>)[source]

Bases: object

Phase count, names, and volume/area fractions.

nphases: int = 2
namesPhases: numpy.ndarray
phaseFractions: numpy.ndarray
class upxo.material.Material.PhysicalProperty(density: float = 2700.0)[source]

Bases: object

Bulk physical properties (density in kg/m^3 by default).

density: float = 2700.0
class upxo.material.Material.ElasticProperty(E: float = 70000.0)[source]

Bases: object

Elastic constants (Young’s modulus E in MPa by default).

E: float = 70000.0
class upxo.material.Material.TensileStressStrain(strain: numpy.ndarray = <factory>, stress: numpy.ndarray = <factory>)[source]

Bases: object

Experimental tensile stress–strain curve arrays.

strain: numpy.ndarray
stress: numpy.ndarray
class upxo.material.Material.PlasticProperty(Sy001: float = 135, Sy002: float = 150, Sy003: float = 155, HV0005: float = 50, HV0010: float = 50, HV0020: float = 50, K: float = 1234)[source]

Bases: object

Proof strengths, hardness numbers, and fracture toughness.

Sy001: float = 135
Sy002: float = 150
Sy003: float = 155
HV0005: float = 50
HV0010: float = 50
HV0020: float = 50
K: float = 1234
class upxo.material.Material.ExpDataAvailability(tt: bool = True, fatigue_low: bool = True, fatigue_high: bool = True, ebsd: bool = True, tem: bool = True)[source]

Bases: object

Flags for which experimental datasets exist for this material.

tt: bool = True
fatigue_low: bool = True
fatigue_high: bool = True
ebsd: bool = True
tem: bool = True
class upxo.material.Material.GrainEqDiaEbsd(modality: int = 2, skewness: float = -1.02, kurtosis: float = 1.24, dist_grain_size: numpy.ndarray = <factory>, dist_grain_count: numpy.ndarray = <factory>, dist_grain_prob: numpy.ndarray = <factory>)[source]

Bases: object

EBSD-derived equivalent-diameter distribution summary and histograms.

modality: int = 2
skewness: float = -1.02
kurtosis: float = 1.24
dist_grain_size: numpy.ndarray
dist_grain_count: numpy.ndarray
dist_grain_prob: numpy.ndarray
class upxo.material.Material.EBSDParameters(zero_fraction_uncorrected: float = 0.0, zero_fraction_corrected: float = 0.0, phase_fraction: numpy.ndarray = <factory>)[source]

Bases: object

EBSD map quality metrics (zero fractions, phase fractions).

zero_fraction_uncorrected: float = 0.0
zero_fraction_corrected: float = 0.0
phase_fraction: numpy.ndarray
class upxo.material.Material.TensileTestParameters(sample_type: str = 'value', strain_rate: float = 0.0, test_temperature: float = 0.0)[source]

Bases: object

Tensile-test setup (sample geometry, rate, temperature).

sample_type: str = 'value'
strain_rate: float = 0.0
test_temperature: float = 0.0
upxo.material.Material.TempKelvin(temp_celcius)[source]

Tempkelvin.

upxo.material.Material.generate()[source]