Different source in the system

Hello everyone,
I’m starting my studies with Openmc and I have some questions. My system is simple, it contains a fuel and a cylindrical source in the center, in which I described the source as monoenergetic and also as an energy distribution source. When I add a tally to the input to calculate the neutron flux in the fuel cell, the results are the same (both for the input with the monoenergetic source and for the source with energy distribution), it seems to me that in calculating the flux it is not considered the source energy. Could someone explain it to me?

Source 1:
settings = openmc.Settings()
settings.output = {‘tallies’: True}
settings.particles = 1000000 #1e06
settings.batches = 550
settings.inactive = 100
settings.create_delayed_neutrons = False
source = openmc.IndependentSource()
source.space = openmc.stats.CylindricalIndependent(
r=openmc.stats.Uniform(0, raio_gap_interno),
phi=openmc.stats.Uniform(0, 2 * np.pi),
z=openmc.stats.Uniform(altura_plano_superior, altura_plano_inferior),
origin=(0.0, 0.0, 0.0)
)
source.angle = openmc.stats.Isotropic()
source.energy = openmc.stats.Discrete([14.08e6], [1.0])
source.time = openmc.stats.Uniform(0, 1e-6)
#source.strength = 1.86E+20
settings.source = source
settings.export_to_xml()

Source 2:
settings = openmc.Settings()
settings.output = {‘tallies’: True}
settings.particles = 1000000
settings.batches = 550
settings.inactive = 100
settings.create_delayed_neutrons = False
source = openmc.IndependentSource()
source.space = openmc.stats.CylindricalIndependent(
r=openmc.stats.Uniform(0, raio_gap_interno),
phi=openmc.stats.Uniform(0, 2 * np.pi),
z=openmc.stats.Uniform(altura_plano_superior, altura_plano_inferior),
origin=(0.0, 0.0, 0.0)
)
source.angle = openmc.stats.Isotropic()
source.energy = openmc.stats.Tabular([
1.0000E-05,
1.1220E-05,
1.2589E-05,
1.4125E-05, …]
[0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00, …])
settings.source = source
settings.export_to_xml()

Hi Criss, welcome to openmc community.
Regarding the tally results, openmc reports tally with units per source, you could read the documentation for this topic here
https://docs.openmc.org/en/stable/usersguide/tallies.html?highlight=Normalization#normalization-of-tally-results

Also, have you used energy filter on your tally? Since you said that you try to change from monogenetic to energy distributed source, then the tally you used need to have an energy filter so each neutron will be reported corresponding to each energy bin.

I also recommend you to ask this kind of question in user support topic User Support - OpenMC
I think this will catch more interest.

Hi, I did use the power filter on my tally.
I put it below, maybe I’m not doing it correctly. Do you have any more suggestions?

energy_filter = openmc.EnergyFilter([1.00E-05, …, 1.12E+07, 1.26E+07, 1.41E+07])
cell_filter = openmc.CellFilter([cell_fuel])

fuel_element_tally = openmc.Tally(name=‘flux fuel’)
fuel_element_tally.filters = [cell_filter, energy_filter]
fuel_element_tally.scores.append(‘flux’)

nu_tally = openmc.Tally(name=‘Total production of neutrons due to fission’)
nu_tally.scores.append(‘nu-fission’)

fission_tally = openmc.Tally(name=‘Fission reaction rate’)
fission_tally.scores.append(‘fission’)

tallies = openmc.Tallies([fuel_element_tally, nu_tally, fission_tally])
tallies.export_to_xml()

Hi criss,
If you have been declared your source properly, I think that tally specifications will reports number of neutron per energy bin. So how the the reported neutron spectrum in your cell? Is it showing your expected output?
Also I cant see the whole tabular data for your energy definition of your source

source.energy = openmc.stats.Tabular([
1.0000E-05,
1.1220E-05,
1.2589E-05,
1.4125E-05, …]
[0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00, …])

Just to make sure, please check whether all value of energy bin is 0 or not in your energy distribution.

Hi Wahid,
It is a spectrum of neutrons in the fast neutron region. The energy is in eV and the probability is not normalized.

This is my energy distribution:

source.energy = openmc.stats.Tabular([
1.0000E-05,
1.1220E-05,
1.2589E-05,
1.4125E-05,
1.5849E-05,
1.7783E-05,
1.9953E-05,
2.2387E-05,
2.5119E-05,
2.8184E-05,
3.1623E-05,
3.5481E-05,
3.9811E-05,
4.4668E-05,
5.0119E-05,
5.6234E-05,
6.3096E-05,
7.0795E-05,
7.9433E-05,
8.9125E-05,
1.0000E-04,
1.1220E-04,
1.2589E-04,
1.4125E-04,
1.5849E-04,
1.7783E-04,
1.9953E-04,
2.2387E-04,
2.5119E-04,
2.8184E-04,
3.1623E-04,
3.5481E-04,
3.9811E-04,
4.4668E-04,
5.0119E-04,
5.6234E-04,
6.3096E-04,
7.0795E-04,
7.9433E-04,
8.9125E-04,
1.0000E-03,
1.1220E-03,
1.2589E-03,
1.4125E-03,
1.5849E-03,
1.7783E-03,
1.9953E-03,
2.2387E-03,
2.5119E-03,
2.8184E-03,
3.1623E-03,
3.5481E-03,
3.9811E-03,
4.4668E-03,
5.0119E-03,
5.6234E-03,
6.3096E-03,
7.0795E-03,
7.9433E-03,
8.9125E-03,
1.0000E-02,
1.1220E-02,
1.2589E-02,
1.4125E-02,
1.5849E-02,
1.7783E-02,
1.9953E-02,
2.2387E-02,
2.5119E-02,
2.8184E-02,
3.1623E-02,
3.5481E-02,
3.9811E-02,
4.4668E-02,
5.0119E-02,
5.6234E-02,
6.3096E-02,
7.0795E-02,
7.9433E-02,
8.9125E-02,
1.0000E-01,
1.1220E-01,
1.2589E-01,
1.4125E-01,
1.5849E-01,
1.7783E-01,
1.9953E-01,
2.2387E-01,
2.5119E-01,
2.8184E-01,
3.1623E-01,
3.5481E-01,
3.9811E-01,
4.4668E-01,
5.0119E-01,
5.6234E-01,
6.3096E-01,
7.0795E-01,
7.9433E-01,
8.9125E-01,
1.0000E+00,
1.1220E+00,
1.2589E+00,
1.4125E+00,
1.5849E+00,
1.7783E+00,
1.9953E+00,
2.2387E+00,
2.5119E+00,
2.8184E+00,
3.1623E+00,
3.5481E+00,
3.9811E+00,
4.4668E+00,
5.0119E+00,
5.6234E+00,
6.3096E+00,
7.0795E+00,
7.9433E+00,
8.9125E+00,
1.0000E+01,
1.1220E+01,
1.2589E+01,
1.4125E+01,
1.5849E+01,
1.7783E+01,
1.9953E+01,
2.2387E+01,
2.5119E+01,
2.8184E+01,
3.1623E+01,
3.5481E+01,
3.9811E+01,
4.4668E+01,
5.0119E+01,
5.6234E+01,
6.3096E+01,
7.0795E+01,
7.9433E+01,
8.9125E+01,
1.0000E+02,
1.1220E+02,
1.2589E+02,
1.4125E+02,
1.5849E+02,
1.7783E+02,
1.9953E+02,
2.2387E+02,
2.5119E+02,
2.8184E+02,
3.1623E+02,
3.5481E+02,
3.9811E+02,
4.4668E+02,
5.0119E+02,
5.6234E+02,
6.3096E+02,
7.0795E+02,
7.9433E+02,
8.9125E+02,
1.0000E+03,
1.1220E+03,
1.2589E+03,
1.4125E+03,
1.5849E+03,
1.7783E+03,
1.9953E+03,
2.2387E+03,
2.5119E+03,
2.8184E+03,
3.1623E+03,
3.5481E+03,
3.9811E+03,
4.4668E+03,
5.0119E+03,
5.6234E+03,
6.3096E+03,
7.0795E+03,
7.9433E+03,
8.9125E+03,
1.0000E+04,
1.1220E+04,
1.2589E+04,
1.4125E+04,
1.5849E+04,
1.7783E+04,
1.9953E+04,
2.2387E+04,
2.5119E+04,
2.8184E+04,
3.1623E+04,
3.5481E+04,
3.9811E+04,
4.4668E+04,
5.0119E+04,
5.6234E+04,
6.3096E+04,
7.0795E+04,
7.9433E+04,
8.9125E+04,
1.0000E+05,
1.1220E+05,
1.2589E+05,
1.4125E+05,
1.5849E+05,
1.7783E+05,
1.9953E+05,
2.2387E+05,
2.5119E+05,
2.8184E+05,
3.1623E+05,
3.5481E+05,
3.9811E+05,
4.4668E+05,
5.0119E+05,
5.6234E+05,
6.3096E+05,
7.0795E+05,
7.9433E+05,
8.9125E+05,
1.0000E+06,
1.1220E+06,
1.2589E+06,
1.4125E+06,
1.5849E+06,
1.7783E+06,
1.9953E+06,
2.2387E+06,
2.5119E+06,
2.8184E+06,
3.1623E+06,
3.5481E+06,
3.9811E+06,
4.4668E+06,
5.0119E+06,
5.6234E+06,
6.3096E+06,
7.0795E+06,
7.9433E+06,
8.9125E+06,
1.0000E+07,
1.1220E+07,
1.2589E+07,
1.4125E+07],
[0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
0.00000E+00,
3.00760E-07,
0.00000E+00,
8.68928E-07,
5.16266E-07,
6.07497E-07,
1.44755E-06,
5.32975E-07,
1.67710E-06,
1.79905E-06,
2.05900E-06,
2.08135E-06,
3.87546E-06,
4.40189E-06,
4.34140E-06,
5.85458E-06,
6.25837E-06,
6.32107E-06,
7.05245E-06,
9.75458E-06,
1.08502E-05,
1.20638E-05,
1.26320E-05,
1.22440E-05,
1.24033E-05,
1.25153E-05,
1.21965E-05,
9.64990E-06,
7.62524E-06,
2.29616E-06,
1.79993E-07,
7.90048E-06,
1.50361E-05,
1.68270E-05,
1.40630E-05,
3.41090E-06,
1.53452E-05,
1.89685E-05,
1.72636E-05,
1.44065E-05,
1.06360E-05,
2.90995E-06,
4.66234E-08,
1.10941E-08,
3.02625E-07,
2.51898E-06,
2.70886E-06,
1.72719E-05,
2.10426E-05,
1.91779E-05,
1.33339E-05,
4.88377E-06,
2.26036E-05,
2.31010E-05,
2.10225E-05,
2.00528E-05,
1.76047E-05,
1.40222E-05,
9.67628E-06,
6.35038E-06,
7.59260E-06,
5.84682E-06,
6.61978E-06,
2.69283E-06,
8.07812E-06,
1.23260E-05,
1.52338E-05,
2.19910E-05,
2.44525E-05,
2.57772E-05,
2.54112E-05,
2.64297E-05,
2.40442E-05,
2.35033E-05,
2.13953E-05,
1.92459E-05,
1.71652E-05,
1.63588E-05,
1.50287E-05,
1.47623E-05,
1.42940E-05,
1.25367E-05,
1.43012E-05,
1.18490E-05,
9.72644E-06,
1.05718E-05,
8.74613E-06,
8.73859E-06,
7.49333E-06,
7.29732E-06,
7.01299E-06,
6.85430E-06,
6.37816E-06,
5.74589E-06,
5.61145E-06,
5.57940E-06,
5.22435E-06,
4.91554E-06,
4.83986E-06,
5.14893E-06,
5.60706E-06,
1.83661E-06,
1.64941E-06,
2.01502E-06,
3.00259E-06,
2.74510E-06,
1.91944E-06,
2.41146E-06,
2.81146E-06,
2.56363E-06,
2.32065E-06,
1.81876E-06,
2.06299E-06,
2.73668E-06,
1.57997E-06,
1.90433E-06,
1.59859E-06,
9.76285E-07,
9.92132E-07,
1.15704E-06,
1.32107E-06,
9.97157E-07,
7.96887E-07,
7.82745E-07,
6.14146E-07,
4.90976E-07,
4.30063E-07,
4.13609E-07,
3.94221E-07,
3.92156E-07,
3.66470E-07,
3.69374E-07,
3.46044E-07,
2.81873E-07,
2.64557E-07,
2.21447E-07,
1.80803E-07,
1.48103E-07,
1.22341E-07,
9.94449E-08,
8.10755E-08,
6.59298E-08,
5.31155E-08,
4.26058E-08,
3.30831E-08,
2.61782E-08,
1.97338E-08,
1.56874E-08,
1.26342E-08,
1.00769E-08,
8.28540E-09,
6.49175E-09,
5.50921E-09,
4.62210E-09,
3.98849E-09,
3.38670E-09,
2.97659E-09,
2.95819E-09,
2.98508E-09,
3.52202E-09,
1.60296E-07])

Hi Wahid,
Do you know if my energy distribution is correct?

Hi Criss,
I think you need to declare the probability in the unit per eV for each neutron energy bin.
I am making a small notebook to show you the input and how it works in a cell filled with voids.
You can check if the neutron energy distribution matched between one you specified in the input and calculated by openmc if we use a voided cell.
tallyingE.ipynb (161.9 KB)
image

I am also adding some material if you want to fill the cells with other materials and see how the neutron spectrum changes/shifts.
I also added some lines if you want to use discrete neutron energy to check if the neutron energy calculated by openmc matches your discrete energy specified in input.

This discussion helped me on specifying the energy probability table.

2 Likes