Fixed-Source Tally Normailization

Hello All!

I’m modelling a one-speed, fixed-source problem using a 2D quarter square pincell containing 2 detector cells (as shown in the attached image), where the fuel has a known isotropic volume source of 2pi [n/cm^3-s]. My objective is to create an angular flux distribution with respect to azimuthal direction along a single polar direction for these detector cells using the flux tally.

In my python script I create the flux tallies for detector 1 and 2 via:


Initialize the tallies object

tallies = openmc.Tallies()

angles_per_deg: int = 1
n_angle_bins: int = 360 * angles_per_deg

Instantiate azimuthal filter

azimuthalFilter = openmc.AzimuthalFilter(n_angle_bins)

Initialize PolarFilter

xi = 0.0
d_xi = 0.01
xi_lower = xi - d_xi
xi_upper = xi + d_xi
theta_lower = np.arccos(xi_lower)
theta_upper = np.arccos(xi_upper)
polarFilter = openmc.PolarFilter([theta_upper, theta_lower])

Initialize detector 1 Tally object

d1_tally = openmc.Tally(name=“DETECTOR_1_TALLY”)
d1_tally.filters = [openmc.CellFilter([d1_cell]), polarFilter, azimuthalFilter]
d1_tally.scores = [“flux”]
tallies.append(d1_tally)

Initialize detector 2 Tally object

d2_tally = openmc.Tally(name=“DETECTOR_2_TALLY”)
d2_tally.filters = [openmc.CellFilter([d2_cell]), polarFilter, azimuthalFilter]
d2_tally.scores = [“flux”]
tallies.append(d2_tally)


After I create the Tallies, I set the OpenMC simulation settings via


OpenMC simulation parameters

batches = 150
inactive = 0
particles = 100_000

Instantiate a Settings object

settings = openmc.Settings()
settings.batches = batches
settings.inactive = inactive
settings.particles = particles

Tell OpenMC this is a multi-group problem

settings.energy_mode = ‘multi-group’

Set the verbosity to 6 so we dont see output for every batch

settings.verbosity = 6

Create an initial uniform spatial source distribution over fissionable zones

bounds = [0., 0., -1E50, r_fuel, r_fuel, 1E50]
uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:])

settings.source = openmc.IndependentSource(space=uniform_dist, constraints={‘fissionable’: True})

Tell OpenMC we want to run in fixed-source mode

settings.run_mode = ‘fixed source’

model.settings = settings


Where the fissionable constraint ensures particles are born only in the fuel. Note that the macroscopic XS data only consists of a total and scattering cross-section, but I assign an ultra small fission cross-section to assign the source regions. Finally, I run OpenMC and get the tallies from the statepoint HDF5 file.

My issue is how to actually convert these tallies to [n/cm^2-sec-ster]. I wrote a discrete ordinates code and get fluxes around 5-7 [n/cm^2-sec-ster], but the tallies are normalized to ~1E-07. When attempting to convert these tallies, I’ve two observations were made:

  1. Changing the number of particles simulated doesn’t change the magnitude of the flux tallies (consistency in tallies), but ultimately results in a decrease in the angular flux. Maybe approaching an asymptotic value?
  2. I get the correct angular flux distribution (yay!), but need to appropriately scale the tallies correctly.

My latest attempt was as follows:

  1. Calculate width of azimuthal bins : dazimuthal [radian]
  2. Calculate width of polar bin : dpolar [radian]
  3. Calculate area of detector cells : a_det = 0.03 * 0.03 [cm^2]
  4. Calculate tally filter scaling factor : tally_factor = 1.0 / (dazimuthal * dpolar * a_det)
    [1/ster-cm^2]
  5. Calculate ratio of source to pin area : a_ratio = (0.3629 * 0.3629) / (0.63 * 0.63) [unitless]
  6. Calculate source scaling factor : source_factor = (2.0 * pi) * a_ratio
    [n/cm^3-s]
  7. Scale flux tallies to get angular flux : psi_scaled = flux * tally_factor * source_factor
    [n/cm^4-ster-s]

Amazingly, the ‘angular fluxes’ matches fairly well with my SN code (~5%), but I have my doubts on whether the tally scaling procedure above was correct because the units do not align with the standard angular flux units. I’m fairly new to OpenMC and look forward to feedback and suggestions on the procedure I took. Thanks all!