OWEN 0.3.8 — high-fidelity MCNP<->OpenMC converter (beta)
MCNP <-> OpenMC converter rewritten — graduates to beta
Both directions rewritten from scratch and validated against the bundled BEAVRS full core in real OpenMC (0.15.3). Serpent/SCONE targets remain experimental.
MCNP -> OpenMC
- Full boolean region AST: intersections, unions,
#cell/#()complements, nested parentheses - All common surfaces: planes (incl. three-point), spheres, cylinders, cones (one/two-sided), tori, GQ/SQ ->
openmc.Quadric, and macrobodies RPP/RCC/BOX/RHP ->openmc.modelcomposites - Multi-level universes;
lat=1->RectLatticeandlat=2->HexLattice(fill arrays withnRrepeats, 3D arrays, self-fill,outer=heuristic) trcl=/fill transforms -> translation/rotation;tmp=-> cell temperature- Graveyard (
imp:n=0) elimination ->boundary_type='vacuum';*/+surfaces -> reflective/periodic - Materials split per cell density,
add_elementfor natural ZAIDs, official OpenMC S(a,b) names, metastable ZAIDs kcode/multi-pointksrc->Settings/IndependentSource; FMESH + F4/F6/F7 tallies
OpenMC -> MCNP
- New architecture: static parser for flat scripts + a pure-Python trace harness (no OpenMC install needed) for procedural scripts (loops/functions, e.g. native BEAVRS) -> JSON IR -> MCNP emitter
- De Morgan region normalization, synthesized lattice windows + graveyard, S(a,b) ->
mt, temperatures ->tmp=
Validation (BEAVRS gauntlet)
- Forward: converted full core loads in OpenMC — 327 cells / 62 universes / 16 lattices / 13 materials; 4000-point material sampling vs the native deck: 0 mismatches; transport smoke test runs
- Reverse: native procedural BEAVRS script traced -> MCNP; extractor instance parity +0.004%, validator zero Errors
- Round-trips (pin cell, 17x17 assembly) preserve materials, S(a,b), lattices, settings
- 52 new converter tests; suite total 483
Fixed
beavrs_fullcore_mcnp.i: root cells 300/303-307 illegally reused pin-cell ids — renumbered 343-348
Known gaps (TODO-marked, never silently dropped)
- Tallies beyond FMESH type-4 and F4/F6/F7;
sdefbeyond point sources; surface TR transforms flagged but not applied