Make Materials, Plots, and Tallies list-like

This commit is contained in:
Paul Romano 2016-04-29 16:14:02 -05:00
parent ae083cf5d4
commit d9b097dbaf
31 changed files with 373 additions and 297 deletions

View file

@ -23,10 +23,9 @@ fuel = openmc.Material(material_id=1, name='fuel')
fuel.set_density('g/cc', 4.5)
fuel.add_nuclide(u235, 1.)
# Instantiate a Materials collection, register Material, and export to XML
materials_file = openmc.Materials()
# Instantiate a Materials collection and export to XML
materials_file = openmc.Materials([fuel])
materials_file.default_xs = '71c'
materials_file.add_material(fuel)
materials_file.export_to_xml()