NOrmalizing Flux in [n/(cm^2-s)]

Hello! Some time ago i used Serpent 2 and to get flux in [n/(cm^2-s)] i devide to volume.

Now i want to get the same results in OpenMC with this simple example.

import openmc

# Define materials
fuel = openmc.Material(name='fuel')
fuel.set_density('g/cm3', 20.0)
fuel.add_nuclide('U235', 0.05)
fuel.add_nuclide('U238', 0.85)
fuel.add_nuclide('O16', 0.10)

steel = openmc.Material(name='4steel607')
steel.set_density('g/cm3', 7.84)
steel.add_nuclide('C0', 0.001)
steel.add_nuclide('Mn55', 0.004)
steel.add_nuclide('Fe56', 0.995)

materials = openmc.Materials([fuel, steel])
materials.export_to_xml()

# Define geometry
s1 = openmc.Sphere(r=5.0)
s2 = openmc.Sphere(r=10.0)
s3 = openmc.Sphere(r=30.0)
s4 = openmc.Sphere(r=50.0)
s5 = openmc.Sphere(r=100.0)
s6 = openmc.Sphere(r=300.0)
s7 = openmc.Sphere(r=500.0)
s8 = openmc.Sphere(r=800.0)
s9 = openmc.Sphere(r=1200.0)
s10 = openmc.Sphere(r=1800.0)
s11 = openmc.Sphere(r=2000.0, boundary_type='vacuum')

c1 = openmc.Cell(fill=fuel, region=-s1)
c2 = openmc.Cell(fill=steel, region=+s1 & -s2)
c3 = openmc.Cell(fill=steel, region=+s2 & -s3)
c4 = openmc.Cell(fill=steel, region=+s3 & -s4)
c5 = openmc.Cell(fill=steel, region=+s4 & -s5)
c6 = openmc.Cell(fill=steel, region=+s5 & -s6)
c7 = openmc.Cell(fill=steel, region=+s6 & -s7)
c8 = openmc.Cell(fill=steel, region=+s7 & -s8)
c9 = openmc.Cell(fill=steel, region=+s8 & -s9)
c10 = openmc.Cell(fill=steel, region=+s9 & -s10)
c11 = openmc.Cell(fill=steel, region=+s10 & -s11)
c12 = openmc.Cell(region=+s11)

universe = openmc.Universe(cells=[c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12])
geom = openmc.Geometry(universe)
geom.export_to_xml()

# Define source
source = openmc.Source()
source.space = openmc.stats.Point((0, 0, 0))
source.angle = openmc.stats.Isotropic()
source.energy = openmc.stats.Discrete([1.0e6], [1.0])  # 1 MeV monoenergetic
settings = openmc.Settings()
settings.source = source
settings.particles = 1000000
settings.batches = 200
settings.inactive = 0
settings.export_to_xml()



# Tally filters
cell_filter1 = openmc.CellFilter(c1)
cell_filter2 = openmc.CellFilter(c2)
cell_filter3 = openmc.CellFilter(c3)
cell_filter4 = openmc.CellFilter(c4)
cell_filter5 = openmc.CellFilter(c5)
cell_filter6 = openmc.CellFilter(c6)
cell_filter7 = openmc.CellFilter(c7)
cell_filter8 = openmc.CellFilter(c8)
cell_filter9 = openmc.CellFilter(c9)
cell_filter10 = openmc.CellFilter(c10)
cell_filter11 = openmc.CellFilter(c11)
energy_filter1 = openmc.EnergyFilter([0.0, 0.5, 1.0e6, 200.0e6]) 
# cell_filter2 = openmc.CellFilter(c2)
# energy_filter2 = openmc.EnergyFilter([0.0, 0.5, 1.0e6, 200.0e6])
# cell_filter3 = openmc.CellFilter(c3)
# energy_filter3 = openmc.EnergyFilter([0.0, 0.5, 1.0e6, 200.0e6])

# Define tallies
tally1 = openmc.Tally(name='sphere_1')
tally1.filters = [cell_filter1, energy_filter1]
tally1.scores = ['flux']

tally2 = openmc.Tally(name='sphere_2')
tally2.filters = [cell_filter2, energy_filter1]
tally2.scores = ['flux']

tally3 = openmc.Tally(name='sphere_3')
tally3.filters = [cell_filter3, energy_filter1]
tally3.scores = ['flux']

tally4 = openmc.Tally(name='sphere_4')
tally4.filters = [cell_filter4, energy_filter1]
tally4.scores = ['flux']

tally5 = openmc.Tally(name='sphere_5')
tally5.filters = [cell_filter5, energy_filter1]
tally5.scores = ['flux']

tally6 = openmc.Tally(name='sphere_6')
tally6.filters = [cell_filter6, energy_filter1]
tally6.scores = ['flux']

tally7 = openmc.Tally(name='sphere_7')
tally7.filters = [cell_filter7, energy_filter1]
tally7.scores = ['flux']

tally8 = openmc.Tally(name='sphere_8')
tally8.filters = [cell_filter8, energy_filter1]
tally8.scores = ['flux']

tally9 = openmc.Tally(name='sphere_9')
tally9.filters = [cell_filter9, energy_filter1]
tally9.scores = ['flux']

tally10 = openmc.Tally(name='sphere_10')
tally10.filters = [cell_filter10, energy_filter1]
tally10.scores = ['flux']

tally11 = openmc.Tally(name='sphere_11')
tally11.filters = [cell_filter11, energy_filter1]
tally11.scores = ['flux']

# Add tallies to the model
tallies = openmc.Tallies([tally1, tally2, tally3, tally4, tally5, tally6, tally7, tally8, tally9, tally10, tally11])
tallies.export_to_xml()

# Run OpenMC!
openmc.run()

What i have to do additionally to get flux in [n/(cm^2-s)] ?

A while back I had the same question so wrote up some simulations and a discussion on openmc flux units and put it in this notebook which might be useful for you

2 Likes