mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Make Materials, Plots, and Tallies list-like
This commit is contained in:
parent
ae083cf5d4
commit
d9b097dbaf
31 changed files with 373 additions and 297 deletions
|
|
@ -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()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue