mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 13:45:36 -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])
|
||||
|
|
|
|||
|
|
@ -15,25 +15,19 @@ particles = 10000
|
|||
# Exporting to OpenMC materials.xml File
|
||||
###############################################################################
|
||||
|
||||
# Instantiate some Nuclides
|
||||
h1 = openmc.Nuclide('H1')
|
||||
o16 = openmc.Nuclide('O16')
|
||||
u235 = openmc.Nuclide('U235')
|
||||
u238 = openmc.Nuclide('U238')
|
||||
|
||||
# Instantiate some Materials and register the appropriate Nuclides
|
||||
fuel1 = openmc.Material(material_id=1, name='fuel')
|
||||
fuel1.set_density('g/cc', 4.5)
|
||||
fuel1.add_nuclide(u235, 1.)
|
||||
fuel1.add_nuclide('U235', 1.)
|
||||
|
||||
fuel2 = openmc.Material(material_id=2, name='depleted fuel')
|
||||
fuel2.set_density('g/cc', 4.5)
|
||||
fuel2.add_nuclide(u238, 1.)
|
||||
fuel2.add_nuclide('U238', 1.)
|
||||
|
||||
moderator = openmc.Material(material_id=3, 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')
|
||||
|
||||
# Instantiate a Materials collection and export to XML
|
||||
|
|
|
|||
|
|
@ -14,26 +14,20 @@ particles = 10000
|
|||
# Exporting to OpenMC materials.xml File
|
||||
###############################################################################
|
||||
|
||||
# Instantiate some Nuclides
|
||||
h1 = openmc.Nuclide('H1')
|
||||
o16 = openmc.Nuclide('O16')
|
||||
u235 = openmc.Nuclide('U235')
|
||||
fe56 = openmc.Nuclide('Fe56')
|
||||
|
||||
# Instantiate some Materials and register the appropriate Nuclides
|
||||
fuel = openmc.Material(material_id=1, name='fuel')
|
||||
fuel.set_density('g/cc', 4.5)
|
||||
fuel.add_nuclide(u235, 1.)
|
||||
fuel.add_nuclide('U235', 1.)
|
||||
|
||||
moderator = openmc.Material(material_id=2, 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')
|
||||
|
||||
iron = openmc.Material(material_id=3, name='iron')
|
||||
iron.set_density('g/cc', 7.9)
|
||||
iron.add_nuclide(fe56, 1.)
|
||||
iron.add_element('Fe', 1.)
|
||||
|
||||
# Instantiate a Materials collection and export to XML
|
||||
materials_file = openmc.Materials([moderator, fuel, iron])
|
||||
|
|
|
|||
|
|
@ -14,20 +14,15 @@ 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
|
||||
fuel = openmc.Material(material_id=1, name='fuel')
|
||||
fuel.set_density('g/cc', 4.5)
|
||||
fuel.add_nuclide(u235, 1.)
|
||||
fuel.add_nuclide('U235', 1.)
|
||||
|
||||
moderator = openmc.Material(material_id=2, 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')
|
||||
|
||||
# Instantiate a Materials collection and export to XML
|
||||
|
|
|
|||
|
|
@ -14,20 +14,15 @@ 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
|
||||
fuel = openmc.Material(material_id=1, name='fuel')
|
||||
fuel.set_density('g/cc', 4.5)
|
||||
fuel.add_nuclide(u235, 1.)
|
||||
fuel.add_nuclide('U235', 1.)
|
||||
|
||||
moderator = openmc.Material(material_id=2, 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')
|
||||
|
||||
# Instantiate a Materials collection and export to XML
|
||||
|
|
|
|||
|
|
@ -14,86 +14,29 @@ particles = 1000
|
|||
# Exporting to OpenMC materials.xml file
|
||||
###############################################################################
|
||||
|
||||
# Instantiate some Nuclides
|
||||
h1 = openmc.Nuclide('H1')
|
||||
h2 = openmc.Nuclide('H2')
|
||||
he4 = openmc.Nuclide('He4')
|
||||
b10 = openmc.Nuclide('B10')
|
||||
b11 = openmc.Nuclide('B11')
|
||||
o16 = openmc.Nuclide('O16')
|
||||
o17 = openmc.Nuclide('O17')
|
||||
cr50 = openmc.Nuclide('Cr50')
|
||||
cr52 = openmc.Nuclide('Cr52')
|
||||
cr53 = openmc.Nuclide('Cr53')
|
||||
cr54 = openmc.Nuclide('Cr54')
|
||||
fe54 = openmc.Nuclide('Fe54')
|
||||
fe56 = openmc.Nuclide('Fe56')
|
||||
fe57 = openmc.Nuclide('Fe57')
|
||||
fe58 = openmc.Nuclide('Fe58')
|
||||
zr90 = openmc.Nuclide('Zr90')
|
||||
zr91 = openmc.Nuclide('Zr91')
|
||||
zr92 = openmc.Nuclide('Zr92')
|
||||
zr94 = openmc.Nuclide('Zr94')
|
||||
zr96 = openmc.Nuclide('Zr96')
|
||||
sn112 = openmc.Nuclide('Sn112')
|
||||
sn114 = openmc.Nuclide('Sn114')
|
||||
sn115 = openmc.Nuclide('Sn115')
|
||||
sn116 = openmc.Nuclide('Sn116')
|
||||
sn117 = openmc.Nuclide('Sn117')
|
||||
sn118 = openmc.Nuclide('Sn118')
|
||||
sn119 = openmc.Nuclide('Sn119')
|
||||
sn120 = openmc.Nuclide('Sn120')
|
||||
sn122 = openmc.Nuclide('Sn122')
|
||||
sn124 = openmc.Nuclide('Sn124')
|
||||
u = openmc.Element('U')
|
||||
o = openmc.Element('O')
|
||||
|
||||
# Instantiate some Materials and register the appropriate Nuclides
|
||||
uo2 = openmc.Material(material_id=1, name='UO2 fuel at 2.4% wt enrichment')
|
||||
uo2.set_density('g/cm3', 10.29769)
|
||||
uo2.add_element(u, 1., enrichment=2.4)
|
||||
uo2.add_element(o, 2.)
|
||||
uo2.add_element('U', 1., enrichment=2.4)
|
||||
uo2.add_element('O', 2.)
|
||||
|
||||
helium = openmc.Material(material_id=2, name='Helium for gap')
|
||||
helium.set_density('g/cm3', 0.001598)
|
||||
helium.add_nuclide(he4, 2.4044e-4)
|
||||
helium.add_element('He', 2.4044e-4)
|
||||
|
||||
zircaloy = openmc.Material(material_id=3, name='Zircaloy 4')
|
||||
zircaloy.set_density('g/cm3', 6.55)
|
||||
zircaloy.add_nuclide(o16, 3.0743e-4)
|
||||
zircaloy.add_nuclide(o17, 7.4887e-7)
|
||||
zircaloy.add_nuclide(cr50, 3.2962e-6)
|
||||
zircaloy.add_nuclide(cr52, 6.3564e-5)
|
||||
zircaloy.add_nuclide(cr53, 7.2076e-6)
|
||||
zircaloy.add_nuclide(cr54, 1.7941e-6)
|
||||
zircaloy.add_nuclide(fe54, 8.6699e-6)
|
||||
zircaloy.add_nuclide(fe56, 1.3610e-4)
|
||||
zircaloy.add_nuclide(fe57, 3.1431e-6)
|
||||
zircaloy.add_nuclide(fe58, 4.1829e-7)
|
||||
zircaloy.add_nuclide(zr90, 2.1827e-2)
|
||||
zircaloy.add_nuclide(zr91, 4.7600e-3)
|
||||
zircaloy.add_nuclide(zr92, 7.2758e-3)
|
||||
zircaloy.add_nuclide(zr94, 7.3734e-3)
|
||||
zircaloy.add_nuclide(zr96, 1.1879e-3)
|
||||
zircaloy.add_nuclide(sn112, 4.6735e-6)
|
||||
zircaloy.add_nuclide(sn114, 3.1799e-6)
|
||||
zircaloy.add_nuclide(sn115, 1.6381e-6)
|
||||
zircaloy.add_nuclide(sn116, 7.0055e-5)
|
||||
zircaloy.add_nuclide(sn117, 3.7003e-5)
|
||||
zircaloy.add_nuclide(sn118, 1.1669e-4)
|
||||
zircaloy.add_nuclide(sn119, 4.1387e-5)
|
||||
zircaloy.add_nuclide(sn120, 1.5697e-4)
|
||||
zircaloy.add_nuclide(sn122, 2.2308e-5)
|
||||
zircaloy.add_nuclide(sn124, 2.7897e-5)
|
||||
zircaloy.add_element('Sn', 0.014 , 'wo')
|
||||
zircaloy.add_element('Fe', 0.00165, 'wo')
|
||||
zircaloy.add_element('Cr', 0.001 , 'wo')
|
||||
zircaloy.add_element('Zr', 0.98335, 'wo')
|
||||
|
||||
borated_water = openmc.Material(material_id=4, name='Borated water at 975 ppm')
|
||||
borated_water = openmc.Material(material_id=4, name='Borated water')
|
||||
borated_water.set_density('g/cm3', 0.740582)
|
||||
borated_water.add_nuclide(b10, 8.0042e-6)
|
||||
borated_water.add_nuclide(b11, 3.2218e-5)
|
||||
borated_water.add_nuclide(h1, 4.9457e-2)
|
||||
borated_water.add_nuclide(h2, 7.4196e-6)
|
||||
borated_water.add_nuclide(o16, 2.4672e-2)
|
||||
borated_water.add_nuclide(o17, 6.0099e-5)
|
||||
borated_water.add_element('B', 4.0e-5)
|
||||
borated_water.add_element('H', 5.0e-2)
|
||||
borated_water.add_element('O', 2.4e-2)
|
||||
borated_water.add_s_alpha_beta('c_H_in_H2O')
|
||||
|
||||
# Instantiate a Materials collection and export to XML
|
||||
|
|
|
|||
|
|
@ -15,13 +15,10 @@ particles = 10000
|
|||
# Exporting to OpenMC materials.xml file
|
||||
###############################################################################
|
||||
|
||||
# Instantiate a Nuclides
|
||||
u235 = openmc.Nuclide('U235')
|
||||
|
||||
# Instantiate a Material and register the Nuclide
|
||||
fuel = openmc.Material(material_id=1, 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([fuel])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue