Hello, I have a design where I am doing flux tallie with three energy group. Below is my tallie.xml file
<?xml version='1.0' encoding='utf-8'?>regular
120 1
<lower_left> -60 -60 </lower_left>
1 120
1
0.0 0.625 100000.0 20000000.0
1 2
flux
Now, I want the tally data plot on the same graph with python API. How can I do it? So far I am able to generate the graph with python API with only one energy group (0.0 0.625). To do that I edit my tallie.xml to only one energy group hanging 0.0 0.625 100000.0 20000000.0 to 0.0 0.625 , and after running the project i open python API and run these below commands,
Import openmc
sp = openmc.StatePoint(‘statepoint.200.h5’)
tally = sp.tallies[1]
flux = tally.mean.ravel()
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(-60, 60, 120)
plt.plot(x, flux)
plt.xlabel(‘x position [cm]’)
plt.ylabel('flux (0 - 0.625eV)’)
plt.show()
this generates a graph for the (0 - 0.625eV) energy group. Can anyone help me with the python API command that I can use to generate the graph for three energy group for my provided tallies.xml. I get three different flux value for three energy group for a single mash. I need to know how to ploy multiple energy group data in a single plot. I can do it with xcell. But I want to know the python API way. Any help is much appreciated. I followed the link https://openmc.readthedocs.io/en/stable/examples/tally-arithmetic.html but I wasn’t able to figure out. Thanks.