Expand description
Single-material emission to legacy transport-code cards.
emit_all renders one Material through five code dialects — MCNP,
Serpent, FLUKA, ALARA, PARTISN — and drift_table reports how much mass
survives each translation. Every emitter is pure glue over the workspace
*-io crates plus nucleide_nuclei::dialects; no new physics lives here.
§Drift semantics
Each emitter returns the mass it could represent per nuclide
(Emitted::accounted) plus what it had to drop (Emitted::dropped,
e.g. a nuclide with no FLUKA name). DriftRow::rel_drift is
(mass_in - mass_out) / mass_in. Emitted::reparsed tells whether the
emitted text was machine-verified by feeding it back through that code’s
reader (MCNP and ALARA only — Serpent, FLUKA, and PARTISN have no material
readers in this workspace, so their drift is analytic).
§Example
use nucleide_emit::{EmitOptions, emit_drift};
use nucleide_material::Material;
use nucleide_nuclei::NuclideId;
let mut mat = Material::new();
mat.add_nuclide(NuclideId::from_name("U235").unwrap(), 5.0);
mat.add_nuclide(NuclideId::from_name("U238").unwrap(), 95.0);
let opts = EmitOptions::new("leu").with_density(10.0);
let (emitted, table) = emit_drift(&mat, &opts).unwrap();
assert_eq!(emitted.len(), 5);
assert!(table.worst_rel_drift() < 1e-9);Modules§
- alara
- ALARA
mixtureblock emission. - armi
- ARMI blueprint mass fractions →
Material. - fluka
- FLUKA
COMPOUNDcard emission. - mcnp
- MCNP
m<number>card emission. - partisn
- PARTISN single-zone deck emission.
- serpent
- Serpent
matcard emission.
Structs§
- Drift
Row - One row of the mass-drift report.
- Drift
Table - Mass conservation across all five dialects.
- Dropped
- One nuclide the emitter could not represent.
- Emit
Options - Shared emission settings.
- Emitted
- Cards emitted for one dialect.
Enums§
Functions§
- drift_
table - Build the mass-drift report for already-emitted cards.
- emit_
all - Emit one
Materialthrough all five dialects, inCode::allorder. - emit_
drift - Emit through all dialects and report mass drift in one call.
Type Aliases§
- Result
- Crate-local result alias.