Skip to main content

Crate nucleide_material

Crate nucleide_material 

Source
Expand description

Materials: compositions, mixing, and serialization for nuclear engineering.

A Material is a map from NuclideId to a stored mass in grams, plus an optional mass density (g/cm3 by convention) and free-form JSON metadata. Density lives outside the composition: it is a property of the stream rather than part of the composition itself.

Atomic-mass-dependent conversions (Material::from_atom_frac and Material::atom_fractions) take a MassProvider so the material crate stays independent of the nuclear-data tables; wire up nucleide_nuclei::data once it lands.

use nucleide_material::{MassProvider, Material, NoMasses};
use nucleide_nuclei::NuclideId;

let mut mat = Material::new();
mat.add_nuclide(NuclideId::from_name("U235").unwrap(), 19.0);
mat.add_nuclide(NuclideId::from_name("U238").unwrap(), 1.0);
assert_eq!(mat.mass(), 20.0);

// Atom conversions need atomic masses:
let atoms = mat.atom_fractions(&NoMasses);
assert!(atoms.is_err());

Structs§

Ame2020
MassProvider backed by the AME2020 tables in nucleide_nuclei::data.
Analytics
Provider bundle for radioanalytic quantities.
AuditIssue
One conservation problem found by audit.
ChainDecays
DecayProvider backed by the ENDF/B-VIII.0 half-life table in nucleide_nuclei::data.
Collision
One truncated label form claimed by more than one nuclide.
CompendiumElement
One elemental constituent.
CompendiumEntry
One compendium material entry.
CompendiumIsotope
One isotope row of an element inside a compendium material.
DecayEnergies
DecayEnergyProvider backed by the ENDF/B-VII.1 prompt-decay-energy table in nucleide_nuclei::data (mean-field evaluation values, generated by scripts/gen-nuclear-data.py — see the table docs before quoting heat numbers).
Material
A nuclear material: nuclide masses plus optional density and metadata.
MaterialsDoc
A <materials> document bundling named Materials, optionally pointing at a cross-sections file via the root cross_sections attribute — the container shape of a materials collection document.
MaterialsLibrary
The full parsed compendium with fast lookups.
NaturalAbundances
AbundanceProvider backed by the natural-abundance table in nucleide_nuclei::data.
NoAbundances
An AbundanceProvider that knows no isotopes.
NoDecay
A DecayProvider that knows no decays.
NoDecayEnergies
A DecayEnergyProvider that knows no decay energies.
NoMasses
A MassProvider that knows no masses.

Enums§

AnalyticsError
Errors from radioanalytics beyond the shared [crate::Error] set.
AuditKind
The class of a conservation problem found by audit.
CompendiumError
Errors from compendium loading.
Error
Errors produced by material construction, conversion, and export.
FormulaError
Errors from formula parsing and element expansion.

Constants§

AVOGADRO
Avogadro constant, atoms per mole (exact, 2019 SI).
DEFAULT_WIDTHS
Default truncation widths probed by check_labels: 6 (DIF3D label limit) and 8 (MC2-3 label limit).
GRAMS_PER_U
One unified atomic mass unit in grams (2022 CODATA).
MEV_TO_JOULES
One MeV in joules (exact, 2019 SI: 1 eV = 1.602176634e-19 J).

Traits§

AbundanceProvider
Source of natural-isotope composition data, element by element.
DecayEnergyProvider
Source of per-nuclide mean recoverable decay energies in MeV per decay.
DecayProvider
Source of per-nuclide decay constants λ in inverse seconds.
MassProvider
Source of per-nuclide atomic masses in g/mol.

Functions§

audit
Validate mass-fraction normalization, mass signs, key uniqueness, and atomic-mass availability.
check_labels
Truncate every member’s cross-code labels to each of widths and report every truncated form claimed by more than one nuclide.
parse_formula
Parse a chemical formula into per-element atom counts.

Type Aliases§

FormulaResult
Result alias for formula parsing and expansion.
Result
Result alias for the material crate.