I am a beginner in OpenMC. While learning to build a fuel rod by following the official website examples, I encountered the following error:
-
ERROR: HDF5 data format uses version 2.0 whereas your installation of OpenMC expects version 3.x data.
I would like to ask what the problem is. The relevant code is shown below:
import openmc
uo2 = openmc.Material(1, “uo2”)
print(uo2)
mat = openmc.Material()
# Add nuclides to uo2
uo2.add_nuclide(‘U235’, 0.03)
uo2.add_nuclide(‘U238’, 0.97)
uo2.add_nuclide(‘O16’, 2.0)
uo2.set_density(‘g/cm3’, 10.0)
zirconium = openmc.Material(name=“zirconium”)
zirconium.add_element(‘Zr’, 1.0)
zirconium.set_density(‘g/cm3’, 6.6)
water = openmc.Material(name=“h2o”)
water.add_nuclide(‘H1’, 2.0)
water.add_nuclide(‘O16’, 1.0)
water.set_density(‘g/cm3’, 1.0)
water.add_s_alpha_beta(‘c_H_in_H2O’)
materials = openmc.Materials([uo2, zirconium, water])
materials = openmc.Materials()
materials.append(uo2)
materials += [zirconium, water]
isinstance(materials, list)
materials.export_to_xml()
#surface
pitch = 1.26
left = openmc.XPlane(-pitch/2, boundary_type=‘reflective’)
right = openmc.XPlane(pitch/2, boundary_type=‘reflective’)
bottom = openmc.YPlane(-pitch/2, boundary_type=‘reflective’)
top = openmc.YPlane(pitch/2, boundary_type=‘reflective’)
z1 = openmc.ZPlane(5, boundary_type=‘reflective’)
z2 = openmc.ZPlane(-5, boundary_type=‘reflective’)
fuel_outer_radius = openmc.ZCylinder(r=0.39)
clad_inner_radius = openmc.ZCylinder(r=0.40)
clad_outer_radius = openmc.ZCylinder(r=0.46)
# cell
fuel_region = -fuel_outer_radius & +z2 & -z1
gap_region = +fuel_outer_radius & -clad_inner_radius & +z2 & -z1
clad_region = +clad_inner_radius & -clad_outer_radius & +z2 & -z1
water_region = +left & -right & +bottom & -top & +clad_outer_radius & +z2 & -z1
# fill the cell
fuel = openmc.Cell(name=‘fuel’)
fuel.fill = uo2
fuel.region = fuel_region
gap = openmc.Cell(name=‘air gap’)
gap.region = gap_region
clad = openmc.Cell(name=‘clad’)
clad.fill = zirconium
clad.region = clad_region
moderator = openmc.Cell(name=‘moderator’)
moderator.fill = water
moderator.region = water_region
root_universe = openmc.Universe(cells=(fuel, gap, clad, moderator))
geometry = openmc.Geometry()
geometry.root_universe = root_universe
geometry.export_to_xml()
# Create a point source
point = openmc.stats.Point((0, 0, 0))
source = openmc.IndependentSource(space=point)
settings = openmc.Settings()
settings.source = source
settings.batches = 100
settings.inactive = 10
settings.particles = 1000
settings.export_to_xml()
openmc.run(2)