Dear experts @pshriwise @paulromano , I want to create a voxel image on a simple model in OpenMC. Even though I added the voxel creation scripts to my Python code, the voxel.h5 file does not appear among my output files. How can I solve this problem?
%matplotlib inline
import math
import openmc
import vtk
fuel = openmc.Material(name="uo2")
fuel.add_element("U", 1, percent_type="ao", enrichment=4.25)
fuel.add_element("O", 2)
fuel.set_density("g/cc", 10.4)
clad = openmc.Material(name="clad")
clad.add_element("Zr", 1)
clad.set_density("g/cc", 6)
water = openmc.Material(name="water")
water.add_element("O", 1)
water.add_element("H", 2)
water.set_density("g/cc", 1.0)
water.add_s_alpha_beta("c_H_in_H2O")
materials = openmc.Materials([fuel, clad, water])
materials.export_to_xml()
radii = [0.42, 0.45]
pin_surfaces = [openmc.ZCylinder(r=r) for r in radii]
pin_univ = openmc.model.pin(pin_surfaces, materials)
bound_box = openmc.model.rectangular_prism(1.24, 1.24, boundary_type="reflective")
root_cell = openmc.Cell(fill=pin_univ, region=bound_box)
geometry = openmc.Geometry([root_cell])
geometry.export_to_xml()
vox_plot = openmc.Plot()
vox_plot.type = 'voxel'
vox_plot.filename= 'voxel.h5'
vox_plot.width = (100., 100., 50.)
vox_plot.pixels = (400, 400, 200)
plots.append(vox_plot)
plots= openmc.Plots()
plots.export_to_xml()
settings = openmc.Settings()
settings.particles = 1000
settings.inactive = 10
settings.batches = 50
settings.export_to_xml()
openmc.run()