All,
Just wanted some help in figuring out how to plot the neutron flux in my simulation as a function of the radius from my cylindrical mesh tally. Essentially, I want a line plot that shows the neutron flux as the radius increases on the x axis, and the expected result is obviously that the flux will decrease as the distance r increases.
I set up a cylindrical tally around my reactor with 49 r, phi, and z bins:
mesh_all = openmc.CylindricalMesh( r_grid= np.linspace(0, shielding_radius, 50), phi_grid= np.linspace(0.0, 2*np.pi, 50), z_grid=np.linspace(-(shielding_height/2), (shielding_height/2), 50) ) all_mesh_filter = openmc.MeshFilter(mesh_all)
And that gives me a pandas dataframe that looks something like this:
But I’m having trouble taking what I want to do and putting it in terms of code. First I’m confused on the x, y, z in the dataframe. Is that meant to be r, phi, and z?
In that case, could I:
- Sum all values of phi and z (y and z) for each x index,
- Divide by the volume of all the bins in each x index, and
- Plot the results?
If someone could provide a simple example which shows that, it would be much appreciated. I think I know what I want to do conceptually, but I need some guidance putting that in terms of tally arithmetic. Thanks in advance!