mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 05:05:30 -04:00
updated tests and updated setting of nuclides and elements in example files
This commit is contained in:
parent
ff3d034275
commit
1a7630083b
18 changed files with 114 additions and 201 deletions
|
|
@ -15,21 +15,16 @@ particles = 10000
|
|||
# Exporting to OpenMC materials.xml file
|
||||
###############################################################################
|
||||
|
||||
# Instantiate some Nuclides
|
||||
h1 = openmc.Nuclide('H1')
|
||||
o16 = openmc.Nuclide('O16')
|
||||
u235 = openmc.Nuclide('U235')
|
||||
|
||||
# Instantiate some Materials and register the appropriate Nuclides
|
||||
moderator = openmc.Material(material_id=41, name='moderator')
|
||||
moderator.set_density('g/cc', 1.0)
|
||||
moderator.add_nuclide(h1, 2.)
|
||||
moderator.add_nuclide(o16, 1.)
|
||||
moderator.add_element('H', 2.)
|
||||
moderator.add_element('O', 1.)
|
||||
moderator.add_s_alpha_beta('c_H_in_H2O')
|
||||
|
||||
fuel = openmc.Material(material_id=40, name='fuel')
|
||||
fuel.set_density('g/cc', 4.5)
|
||||
fuel.add_nuclide(u235, 1.)
|
||||
fuel.add_nuclide('U235', 1.)
|
||||
|
||||
# Instantiate a Materials collection and export to XML
|
||||
materials_file = openmc.Materials([moderator, fuel])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue