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 viamatdata.get("CategoryName"), and its provenance viamatdata.get_provenance("CategoryName").- Return type:
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:
objectIrradiation environment (type, temperature K, dose in dpa).
- class upxo.material.Material.CrystalFamily(xtal_family: str = 'mmm')[source]
Bases:
objectCrystal family / system label for texture and phase work.
Soft-validated against
KNOWN_CRYSTAL_FAMILIES(FCC/BCC/HCP) when registered viabuild(). Default'mmm'is a legacy placeholder and intentionally triggers a soft warning.
- class upxo.material.Material.Phases(nphases: int = 2, namesPhases: numpy.ndarray = <factory>, phaseFractions: numpy.ndarray = <factory>)[source]
Bases:
objectPhase count, names, and volume/area fractions.
- namesPhases: numpy.ndarray
- phaseFractions: numpy.ndarray
- class upxo.material.Material.PhysicalProperty(density: float = 2700.0)[source]
Bases:
objectBulk physical properties (density in kg/m^3 by default).
- class upxo.material.Material.ElasticProperty(E: float = 70000.0)[source]
Bases:
objectElastic constants (Young’s modulus
Ein MPa by default).
- class upxo.material.Material.TensileStressStrain(strain: numpy.ndarray = <factory>, stress: numpy.ndarray = <factory>)[source]
Bases:
objectExperimental 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:
objectProof strengths, hardness numbers, and fracture toughness.
- class upxo.material.Material.ExpDataAvailability(tt: bool = True, fatigue_low: bool = True, fatigue_high: bool = True, ebsd: bool = True, tem: bool = True)[source]
Bases:
objectFlags for which experimental datasets exist for this material.
- 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:
objectEBSD-derived equivalent-diameter distribution summary and histograms.
- 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:
objectEBSD map quality metrics (zero fractions, phase fractions).
- phase_fraction: numpy.ndarray