Hello everyone,
I am trying to determine the axial flux distribution for a BWR assembly. To achieve this, I have created a mesh filter and an energy filter. The code is:
tallies_file = openmc.Tallies()
mesh = openmc.RegularMesh(mesh_id=1)
mesh.dimension = [1, 1, 381]
mesh.lower_left = [5.951855, 5.951855, -169.6]
mesh.upper_right= [7.63016, 7.63016, 211.4]
#mesh.width = [1.678305, 1.678305, 1]
mesh_filter = openmc.MeshFilter(mesh)
energy_filter = openmc.EnergyFilter([0.0, 1.0])
tally = openmc.Tally(name=‘flux’)
tally.filters = [mesh_filter, energy_filter]
tally.scores = [‘flux’]
tallies_file.append(tally)
I then loaded the statepoint file, extracted the flux tally, and plotted the axial flux distribution. The code is:
Load the statepoint file
sp = openmc.StatePoint(“statepoint.200.h5”)
Extract the flux tally
tally = sp.get_tally(name=‘flux’)
Extract the flux data for all particle types
flux_data = tally.get_slice(scores=[“flux”])
Extract the values of the flux data
flux_values = flux_data.mean.ravel()
Plot the axial flux distribution
plt.plot(flux_values)
plt.xlabel(“Axial Position”)
plt.ylabel(“Flux”)
plt.show()
However, I am encountering an issue where the plot consistently displays the same flux distribution for all fuel rods within the assembly, regardless of any variations in fuel or burnable absorbers. I am uncertain as to the cause of this discrepancy and would greatly appreciate any guidance in resolving this issue.
Thanks,
Niloy