Pandas Dataframes

pandas-dataframes

This notebook demonstrates how systematic analysis of tally scores is possible using Pandas dataframes. A dataframe can be automatically generated using the Tally.get_pandas_dataframe(...) method. Furthermore, by linking the tally data in a statepoint file with geometry and material information from a summary file, the dataframe can be shown with user-supplied labels.

In [1]:
import glob

from IPython.display import Image
import matplotlib.pyplot as plt
import scipy.stats
import numpy as np
import pandas as pd

import openmc
%matplotlib inline

Generate Input Files

First we need to define materials that will be used in the problem. We will create three materials for the fuel, water, and cladding of the fuel pin.

In [2]:
# 1.6 enriched fuel
fuel = openmc.Material(name='1.6% Fuel')
fuel.set_density('g/cm3', 10.31341)
fuel.add_nuclide('U235', 3.7503e-4)
fuel.add_nuclide('U238', 2.2625e-2)
fuel.add_nuclide('O16', 4.6007e-2)

# borated water
water = openmc.Material(name='Borated Water')
water.set_density('g/cm3', 0.740582)
water.add_nuclide('H1', 4.9457e-2)
water.add_nuclide('O16', 2.4732e-2)
water.add_nuclide('B10', 8.0042e-6)

# zircaloy
zircaloy = openmc.Material(name='Zircaloy')
zircaloy.set_density('g/cm3', 6.55)
zircaloy.add_nuclide('Zr90', 7.2758e-3)

With our three materials, we can now create a materials file object that can be exported to an actual XML file.

In [3]:
# Instantiate a Materials collection
materials_file = openmc.Materials([fuel, water, zircaloy])

# Export to "materials.xml"
materials_file.export_to_xml()

Now let's move on to the geometry. This problem will be a square array of fuel pins for which we can use OpenMC's lattice/universe feature. The basic universe will have three regions for the fuel, the clad, and the surrounding coolant. The first step is to create the bounding surfaces for fuel and clad, as well as the outer bounding surfaces of the problem.

In [4]:
# Create cylinders for the fuel and clad
fuel_outer_radius = openmc.ZCylinder(x0=0.0, y0=0.0, r=0.39218)
clad_outer_radius = openmc.ZCylinder(x0=0.0, y0=0.0, r=0.45720)

# Create boundary planes to surround the geometry
# Use both reflective and vacuum boundaries to make life interesting
min_x = openmc.XPlane(x0=-10.71, boundary_type='reflective')
max_x = openmc.XPlane(x0=+10.71, boundary_type='vacuum')
min_y = openmc.YPlane(y0=-10.71, boundary_type='vacuum')
max_y = openmc.YPlane(y0=+10.71, boundary_type='reflective')
min_z = openmc.ZPlane(z0=-10.71, boundary_type='reflective')
max_z = openmc.ZPlane(z0=+10.71, boundary_type='reflective')

With the surfaces defined, we can now construct a fuel pin cell from cells that are defined by intersections of half-spaces created by the surfaces.

In [5]:
# Create fuel Cell
fuel_cell = openmc.Cell(name='1.6% Fuel', fill=fuel,
                        region=-fuel_outer_radius)

# Create a clad Cell
clad_cell = openmc.Cell(name='1.6% Clad', fill=zircaloy)
clad_cell.region = +fuel_outer_radius & -clad_outer_radius

# Create a moderator Cell
moderator_cell = openmc.Cell(name='1.6% Moderator', fill=water,
                             region=+clad_outer_radius)

# Create a Universe to encapsulate a fuel pin
pin_cell_universe = openmc.Universe(name='1.6% Fuel Pin', cells=[
    fuel_cell, clad_cell, moderator_cell
])

Using the pin cell universe, we can construct a 17x17 rectangular lattice with a 1.26 cm pitch.

In [6]:
# Create fuel assembly Lattice
assembly = openmc.RectLattice(name='1.6% Fuel - 0BA')
assembly.pitch = (1.26, 1.26)
assembly.lower_left = [-1.26 * 17. / 2.0] * 2
assembly.universes = [[pin_cell_universe] * 17] * 17

OpenMC requires that there is a "root" universe. Let us create a root cell that is filled by the pin cell universe and then assign it to the root universe.

In [7]:
# Create root Cell
root_cell = openmc.Cell(name='root cell', fill=assembly)

# Add boundary planes
root_cell.region = +min_x & -max_x & +min_y & -max_y & +min_z & -max_z

# Create root Universe
root_universe = openmc.Universe(name='root universe')
root_universe.add_cell(root_cell)

We now must create a geometry that is assigned a root universe and export it to XML.

In [8]:
# Create Geometry and export to "geometry.xml"
geometry = openmc.Geometry(root_universe)
geometry.export_to_xml()

With the geometry and materials finished, we now just need to define simulation parameters. In this case, we will use 5 inactive batches and 15 minimum active batches each with 2500 particles. We also tell OpenMC to turn tally triggers on, which means it will keep running until some criterion on the uncertainty of tallies is reached.

In [9]:
# OpenMC simulation parameters
min_batches = 20
max_batches = 200
inactive = 5
particles = 2500

# Instantiate a Settings object
settings = openmc.Settings()
settings.batches = min_batches
settings.inactive = inactive
settings.particles = particles
settings.output = {'tallies': False}
settings.trigger_active = True
settings.trigger_max_batches = max_batches

# Create an initial uniform spatial source distribution over fissionable zones
bounds = [-10.71, -10.71, -10, 10.71, 10.71, 10.]
uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=True)
settings.source = openmc.Source(space=uniform_dist)

# Export to "settings.xml"
settings.export_to_xml()

Let us also create a plot file that we can use to verify that our pin cell geometry was created successfully.

In [10]:
# Instantiate a Plot
plot = openmc.Plot(plot_id=1)
plot.filename = 'materials-xy'
plot.origin = [0, 0, 0]
plot.width = [21.5, 21.5]
plot.pixels = [250, 250]
plot.color_by = 'material'

# Show plot
openmc.plot_inline(plot)

As we can see from the plot, we have a nice array of pin cells with fuel, cladding, and water! Before we run our simulation, we need to tell the code what we want to tally. The following code shows how to create a variety of tallies.

In [11]:
# Instantiate an empty Tallies object
tallies = openmc.Tallies()

Instantiate a fission rate mesh Tally

In [12]:
# Instantiate a tally Mesh
mesh = openmc.RegularMesh(mesh_id=1)
mesh.dimension = [17, 17]
mesh.lower_left = [-10.71, -10.71]
mesh.width = [1.26, 1.26]

# Instantiate tally Filter
mesh_filter = openmc.MeshFilter(mesh)

# Instantiate energy Filter
energy_filter = openmc.EnergyFilter([0, 0.625, 20.0e6])

# Instantiate the Tally
tally = openmc.Tally(name='mesh tally')
tally.filters = [mesh_filter, energy_filter]
tally.scores = ['fission', 'nu-fission']

# Add mesh and Tally to Tallies
tallies.append(tally)

Instantiate a cell Tally with nuclides

In [13]:
# Instantiate tally Filter
cell_filter = openmc.CellFilter(fuel_cell)

# Instantiate the tally
tally = openmc.Tally(name='cell tally')
tally.filters = [cell_filter]
tally.scores = ['scatter']
tally.nuclides = ['U235', 'U238']

# Add mesh and tally to Tallies
tallies.append(tally)

Create a "distribcell" Tally. The distribcell filter allows us to tally multiple repeated instances of the same cell throughout the geometry.

In [14]:
# Instantiate tally Filter
distribcell_filter = openmc.DistribcellFilter(moderator_cell)

# Instantiate tally Trigger for kicks
trigger = openmc.Trigger(trigger_type='std_dev', threshold=5e-5)
trigger.scores = ['absorption']

# Instantiate the Tally
tally = openmc.Tally(name='distribcell tally')
tally.filters = [distribcell_filter]
tally.scores = ['absorption', 'scatter']
tally.triggers = [trigger]

# Add mesh and tally to Tallies
tallies.append(tally)
In [15]:
# Export to "tallies.xml"
tallies.export_to_xml()

Now we a have a complete set of inputs, so we can go ahead and run our simulation.

In [16]:
# Remove old HDF5 (summary, statepoint) files
!rm statepoint.*

# Run OpenMC!
openmc.run()
                                %%%%%%%%%%%%%%%
                           %%%%%%%%%%%%%%%%%%%%%%%%
                        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                                    %%%%%%%%%%%%%%%%%%%%%%%%
                                     %%%%%%%%%%%%%%%%%%%%%%%%
                 ###############      %%%%%%%%%%%%%%%%%%%%%%%%
                ##################     %%%%%%%%%%%%%%%%%%%%%%%
                ###################     %%%%%%%%%%%%%%%%%%%%%%%
                ####################     %%%%%%%%%%%%%%%%%%%%%%
                #####################     %%%%%%%%%%%%%%%%%%%%%
                ######################     %%%%%%%%%%%%%%%%%%%%
                #######################     %%%%%%%%%%%%%%%%%%
                 #######################     %%%%%%%%%%%%%%%%%
                 ######################     %%%%%%%%%%%%%%%%%
                  ####################     %%%%%%%%%%%%%%%%%
                    #################     %%%%%%%%%%%%%%%%%
                     ###############     %%%%%%%%%%%%%%%%
                       ############     %%%%%%%%%%%%%%%
                          ########     %%%%%%%%%%%%%%
                                      %%%%%%%%%%%

                   | The OpenMC Monte Carlo Code
         Copyright | 2011-2019 MIT and OpenMC contributors
           License | http://openmc.readthedocs.io/en/latest/license.html
           Version | 0.11.0-dev
          Git SHA1 | 61c911cffdae2406f9f4bc667a9a6954748bb70c
         Date/Time | 2019-07-18 22:46:04
    OpenMP Threads | 4

 Reading settings XML file...
 Reading cross sections XML file...
 Reading materials XML file...
 Reading geometry XML file...
 Reading U235 from /opt/data/hdf5/nndc_hdf5_v15/U235.h5
 Reading U238 from /opt/data/hdf5/nndc_hdf5_v15/U238.h5
 Reading O16 from /opt/data/hdf5/nndc_hdf5_v15/O16.h5
 Reading H1 from /opt/data/hdf5/nndc_hdf5_v15/H1.h5
 Reading B10 from /opt/data/hdf5/nndc_hdf5_v15/B10.h5
 Reading Zr90 from /opt/data/hdf5/nndc_hdf5_v15/Zr90.h5
 Maximum neutron transport energy: 20000000.000000 eV for U235
 Reading tallies XML file...
 Writing summary.h5 file...
 Initializing source particles...

 ====================>     K EIGENVALUE SIMULATION     <====================

  Bat./Gen.      k            Average k
  =========   ========   ====================
        1/1    0.55921
        2/1    0.63816
        3/1    0.68834
        4/1    0.71192
        5/1    0.67935
        6/1    0.68254
        7/1    0.65804    0.67029 +/- 0.01225
        8/1    0.66225    0.66761 +/- 0.00756
        9/1    0.66336    0.66655 +/- 0.00545
       10/1    0.70686    0.67461 +/- 0.00910
       11/1    0.71753    0.68176 +/- 0.01031
       12/1    0.66967    0.68004 +/- 0.00889
       13/1    0.67800    0.67978 +/- 0.00770
       14/1    0.65634    0.67718 +/- 0.00727
       15/1    0.66891    0.67635 +/- 0.00656
       16/1    0.66281    0.67512 +/- 0.00606
       17/1    0.68160    0.67566 +/- 0.00556
       18/1    0.63835    0.67279 +/- 0.00586
       19/1    0.66200    0.67202 +/- 0.00548
       20/1    0.67156    0.67199 +/- 0.00510
 Triggers unsatisfied, max unc./thresh. is 68.3537 for absorption in tally 3
 WARNING: The estimated number of batches is 70089 --- greater than max batches
 Creating state point statepoint.020.h5...
       21/1    0.67469    0.67216 +/- 0.00478
 Triggers unsatisfied, max unc./thresh. is 63.9814 for absorption in tally 3
 WARNING: The estimated number of batches is 65503 --- greater than max batches
       22/1    0.69218    0.67334 +/- 0.00464
 Triggers unsatisfied, max unc./thresh. is 64.4829 for absorption in tally 3
 WARNING: The estimated number of batches is 70692 --- greater than max batches
       23/1    0.72838    0.67639 +/- 0.00534
 Triggers unsatisfied, max unc./thresh. is 65.1347 for absorption in tally 3
 WARNING: The estimated number of batches is 76371 --- greater than max batches
       24/1    0.68472    0.67683 +/- 0.00507
 Triggers unsatisfied, max unc./thresh. is 61.6163 for absorption in tally 3
 WARNING: The estimated number of batches is 72140 --- greater than max batches
       25/1    0.66664    0.67632 +/- 0.00483
 Triggers unsatisfied, max unc./thresh. is 59.0208 for absorption in tally 3
 WARNING: The estimated number of batches is 69675 --- greater than max batches
       26/1    0.65315    0.67522 +/- 0.00473
 Triggers unsatisfied, max unc./thresh. is 56.5216 for absorption in tally 3
 WARNING: The estimated number of batches is 67094 --- greater than max batches
       27/1    0.63865    0.67356 +/- 0.00480
 Triggers unsatisfied, max unc./thresh. is 53.8991 for absorption in tally 3
 WARNING: The estimated number of batches is 63918 --- greater than max batches
       28/1    0.68053    0.67386 +/- 0.00460
 Triggers unsatisfied, max unc./thresh. is 51.504 for absorption in tally 3
 WARNING: The estimated number of batches is 61017 --- greater than max batches
       29/1    0.71585    0.67561 +/- 0.00474
 Triggers unsatisfied, max unc./thresh. is 49.3115 for absorption in tally 3
 WARNING: The estimated number of batches is 58364 --- greater than max batches
       30/1    0.67268    0.67549 +/- 0.00455
 Triggers unsatisfied, max unc./thresh. is 47.3457 for absorption in tally 3
 WARNING: The estimated number of batches is 56046 --- greater than max batches
       31/1    0.67027    0.67529 +/- 0.00437
 Triggers unsatisfied, max unc./thresh. is 48.2456 for absorption in tally 3
 WARNING: The estimated number of batches is 60524 --- greater than max batches
       32/1    0.67324    0.67522 +/- 0.00421
 Triggers unsatisfied, max unc./thresh. is 47.1077 for absorption in tally 3
 WARNING: The estimated number of batches is 59922 --- greater than max batches
       33/1    0.66398    0.67481 +/- 0.00408
 Triggers unsatisfied, max unc./thresh. is 45.4352 for absorption in tally 3
 WARNING: The estimated number of batches is 57807 --- greater than max batches
       34/1    0.66373    0.67443 +/- 0.00395
 Triggers unsatisfied, max unc./thresh. is 44.8243 for absorption in tally 3
 WARNING: The estimated number of batches is 58273 --- greater than max batches
       35/1    0.68412    0.67476 +/- 0.00383
 Triggers unsatisfied, max unc./thresh. is 43.7412 for absorption in tally 3
 WARNING: The estimated number of batches is 57404 --- greater than max batches
       36/1    0.66026    0.67429 +/- 0.00374
 Triggers unsatisfied, max unc./thresh. is 43.0549 for absorption in tally 3
 WARNING: The estimated number of batches is 57471 --- greater than max batches
       37/1    0.67283    0.67424 +/- 0.00362
 Triggers unsatisfied, max unc./thresh. is 42.9634 for absorption in tally 3
 WARNING: The estimated number of batches is 59073 --- greater than max batches
       38/1    0.69507    0.67487 +/- 0.00356
 Triggers unsatisfied, max unc./thresh. is 41.6527 for absorption in tally 3
 WARNING: The estimated number of batches is 57259 --- greater than max batches
       39/1    0.68681    0.67522 +/- 0.00347
 Triggers unsatisfied, max unc./thresh. is 40.4174 for absorption in tally 3
 WARNING: The estimated number of batches is 55547 --- greater than max batches
       40/1    0.65886    0.67476 +/- 0.00340
 Triggers unsatisfied, max unc./thresh. is 39.424 for absorption in tally 3
 WARNING: The estimated number of batches is 54404 --- greater than max batches
       41/1    0.63736    0.67372 +/- 0.00347
 Triggers unsatisfied, max unc./thresh. is 40.094 for absorption in tally 3
 WARNING: The estimated number of batches is 57877 --- greater than max batches
       42/1    0.71800    0.67491 +/- 0.00358
 Triggers unsatisfied, max unc./thresh. is 39.0603 for absorption in tally 3
 WARNING: The estimated number of batches is 56457 --- greater than max batches
       43/1    0.67193    0.67484 +/- 0.00348
 Triggers unsatisfied, max unc./thresh. is 38.8448 for absorption in tally 3
 WARNING: The estimated number of batches is 57344 --- greater than max batches
       44/1    0.66680    0.67463 +/- 0.00340
 Triggers unsatisfied, max unc./thresh. is 38.227 for absorption in tally 3
 WARNING: The estimated number of batches is 56996 --- greater than max batches
       45/1    0.65956    0.67425 +/- 0.00334
 Triggers unsatisfied, max unc./thresh. is 37.2591 for absorption in tally 3
 WARNING: The estimated number of batches is 55535 --- greater than max batches
       46/1    0.64705    0.67359 +/- 0.00332
 Triggers unsatisfied, max unc./thresh. is 37.802 for absorption in tally 3
 WARNING: The estimated number of batches is 58594 --- greater than max batches
       47/1    0.67729    0.67368 +/- 0.00324
 Triggers unsatisfied, max unc./thresh. is 36.9727 for absorption in tally 3
 WARNING: The estimated number of batches is 57419 --- greater than max batches
       48/1    0.68259    0.67389 +/- 0.00317
 Triggers unsatisfied, max unc./thresh. is 36.3752 for absorption in tally 3
 WARNING: The estimated number of batches is 56901 --- greater than max batches
       49/1    0.64395    0.67320 +/- 0.00317
 Triggers unsatisfied, max unc./thresh. is 35.7676 for absorption in tally 3
 WARNING: The estimated number of batches is 56296 --- greater than max batches
       50/1    0.68839    0.67354 +/- 0.00312
 Triggers unsatisfied, max unc./thresh. is 34.977 for absorption in tally 3
 WARNING: The estimated number of batches is 55058 --- greater than max batches
       51/1    0.71108    0.67436 +/- 0.00316
 Triggers unsatisfied, max unc./thresh. is 34.453 for absorption in tally 3
 WARNING: The estimated number of batches is 54608 --- greater than max batches
       52/1    0.66286    0.67411 +/- 0.00310
 Triggers unsatisfied, max unc./thresh. is 33.9781 for absorption in tally 3
 WARNING: The estimated number of batches is 54268 --- greater than max batches
       53/1    0.62666    0.67313 +/- 0.00319
 Triggers unsatisfied, max unc./thresh. is 33.4946 for absorption in tally 3
 WARNING: The estimated number of batches is 53856 --- greater than max batches
       54/1    0.67124    0.67309 +/- 0.00313
 Triggers unsatisfied, max unc./thresh. is 32.8639 for absorption in tally 3
 WARNING: The estimated number of batches is 52927 --- greater than max batches
       55/1    0.67741    0.67317 +/- 0.00306
 Triggers unsatisfied, max unc./thresh. is 32.2922 for absorption in tally 3
 WARNING: The estimated number of batches is 52145 --- greater than max batches
       56/1    0.67182    0.67315 +/- 0.00300
 Triggers unsatisfied, max unc./thresh. is 31.9136 for absorption in tally 3
 WARNING: The estimated number of batches is 51948 --- greater than max batches
       57/1    0.68764    0.67343 +/- 0.00296
 Triggers unsatisfied, max unc./thresh. is 31.3059 for absorption in tally 3
 WARNING: The estimated number of batches is 50969 --- greater than max batches
       58/1    0.72310    0.67436 +/- 0.00305
 Triggers unsatisfied, max unc./thresh. is 30.8841 for absorption in tally 3
 WARNING: The estimated number of batches is 50558 --- greater than max batches
       59/1    0.67689    0.67441 +/- 0.00299
 Triggers unsatisfied, max unc./thresh. is 30.5895 for absorption in tally 3
 WARNING: The estimated number of batches is 50534 --- greater than max batches
       60/1    0.65890    0.67413 +/- 0.00295
 Triggers unsatisfied, max unc./thresh. is 30.0567 for absorption in tally 3
 WARNING: The estimated number of batches is 49693 --- greater than max batches
       61/1    0.69128    0.67443 +/- 0.00291
 Triggers unsatisfied, max unc./thresh. is 29.8144 for absorption in tally 3
 WARNING: The estimated number of batches is 49784 --- greater than max batches
       62/1    0.65469    0.67409 +/- 0.00288
 Triggers unsatisfied, max unc./thresh. is 29.3138 for absorption in tally 3
 WARNING: The estimated number of batches is 48986 --- greater than max batches
       63/1    0.71839    0.67485 +/- 0.00293
 Triggers unsatisfied, max unc./thresh. is 28.9465 for absorption in tally 3
 WARNING: The estimated number of batches is 48604 --- greater than max batches
       64/1    0.69556    0.67520 +/- 0.00291
 Triggers unsatisfied, max unc./thresh. is 29.1602 for absorption in tally 3
 WARNING: The estimated number of batches is 50174 --- greater than max batches
       65/1    0.70067    0.67563 +/- 0.00289
 Triggers unsatisfied, max unc./thresh. is 28.9248 for absorption in tally 3
 WARNING: The estimated number of batches is 50204 --- greater than max batches
       66/1    0.67994    0.67570 +/- 0.00284
 Triggers unsatisfied, max unc./thresh. is 28.7841 for absorption in tally 3
 WARNING: The estimated number of batches is 50545 --- greater than max batches
       67/1    0.74539    0.67682 +/- 0.00301
 Triggers unsatisfied, max unc./thresh. is 28.4946 for absorption in tally 3
 WARNING: The estimated number of batches is 50346 --- greater than max batches
       68/1    0.67753    0.67683 +/- 0.00296
 Triggers unsatisfied, max unc./thresh. is 28.1166 for absorption in tally 3
 WARNING: The estimated number of batches is 49810 --- greater than max batches
       69/1    0.69595    0.67713 +/- 0.00293
 Triggers unsatisfied, max unc./thresh. is 28.0441 for absorption in tally 3
 WARNING: The estimated number of batches is 50340 --- greater than max batches
       70/1    0.70621    0.67758 +/- 0.00292
 Triggers unsatisfied, max unc./thresh. is 27.708 for absorption in tally 3
 WARNING: The estimated number of batches is 49908 --- greater than max batches
       71/1    0.71027    0.67807 +/- 0.00292
 Triggers unsatisfied, max unc./thresh. is 27.2979 for absorption in tally 3
 WARNING: The estimated number of batches is 49187 --- greater than max batches
       72/1    0.63710    0.67746 +/- 0.00294
 Triggers unsatisfied, max unc./thresh. is 27.3359 for absorption in tally 3
 WARNING: The estimated number of batches is 50071 --- greater than max batches
       73/1    0.70979    0.67794 +/- 0.00294
 Triggers unsatisfied, max unc./thresh. is 29.5308 for absorption in tally 3
 WARNING: The estimated number of batches is 59306 --- greater than max batches
       74/1    0.65957    0.67767 +/- 0.00291
 Triggers unsatisfied, max unc./thresh. is 29.2344 for absorption in tally 3
 WARNING: The estimated number of batches is 58976 --- greater than max batches
       75/1    0.66611    0.67751 +/- 0.00287
 Triggers unsatisfied, max unc./thresh. is 28.8289 for absorption in tally 3
 WARNING: The estimated number of batches is 58183 --- greater than max batches
       76/1    0.66033    0.67726 +/- 0.00284
 Triggers unsatisfied, max unc./thresh. is 28.4986 for absorption in tally 3
 WARNING: The estimated number of batches is 57670 --- greater than max batches
       77/1    0.68535    0.67738 +/- 0.00280
 Triggers unsatisfied, max unc./thresh. is 28.2548 for absorption in tally 3
 WARNING: The estimated number of batches is 57486 --- greater than max batches
       78/1    0.71920    0.67795 +/- 0.00282
 Triggers unsatisfied, max unc./thresh. is 28.2853 for absorption in tally 3
 WARNING: The estimated number of batches is 58410 --- greater than max batches
       79/1    0.67645    0.67793 +/- 0.00278
 Triggers unsatisfied, max unc./thresh. is 27.9534 for absorption in tally 3
 WARNING: The estimated number of batches is 57829 --- greater than max batches
       80/1    0.68300    0.67800 +/- 0.00275
 Triggers unsatisfied, max unc./thresh. is 27.5813 for absorption in tally 3
 WARNING: The estimated number of batches is 57060 --- greater than max batches
       81/1    0.69810    0.67826 +/- 0.00272
 Triggers unsatisfied, max unc./thresh. is 27.2164 for absorption in tally 3
 WARNING: The estimated number of batches is 56301 --- greater than max batches
       82/1    0.68213    0.67831 +/- 0.00269
 Triggers unsatisfied, max unc./thresh. is 26.8628 for absorption in tally 3
 WARNING: The estimated number of batches is 55570 --- greater than max batches
       83/1    0.68745    0.67843 +/- 0.00265
 Triggers unsatisfied, max unc./thresh. is 26.5172 for absorption in tally 3
 WARNING: The estimated number of batches is 54852 --- greater than max batches
       84/1    0.65239    0.67810 +/- 0.00264
 Triggers unsatisfied, max unc./thresh. is 26.2016 for absorption in tally 3
 WARNING: The estimated number of batches is 54241 --- greater than max batches
       85/1    0.64990    0.67775 +/- 0.00263
 Triggers unsatisfied, max unc./thresh. is 25.9705 for absorption in tally 3
 WARNING: The estimated number of batches is 53963 --- greater than max batches
       86/1    0.68586    0.67785 +/- 0.00260
 Triggers unsatisfied, max unc./thresh. is 25.7908 for absorption in tally 3
 WARNING: The estimated number of batches is 53884 --- greater than max batches
       87/1    0.63453    0.67732 +/- 0.00262
 Triggers unsatisfied, max unc./thresh. is 25.5271 for absorption in tally 3
 WARNING: The estimated number of batches is 53439 --- greater than max batches
       88/1    0.65402    0.67704 +/- 0.00261
 Triggers unsatisfied, max unc./thresh. is 25.321 for absorption in tally 3
 WARNING: The estimated number of batches is 53221 --- greater than max batches
       89/1    0.69063    0.67720 +/- 0.00258
 Triggers unsatisfied, max unc./thresh. is 25.8769 for absorption in tally 3
 WARNING: The estimated number of batches is 56253 --- greater than max batches
       90/1    0.65729    0.67697 +/- 0.00256
 Triggers unsatisfied, max unc./thresh. is 25.7648 for absorption in tally 3
 WARNING: The estimated number of batches is 56431 --- greater than max batches
       91/1    0.72355    0.67751 +/- 0.00259
 Triggers unsatisfied, max unc./thresh. is 25.5034 for absorption in tally 3
 WARNING: The estimated number of batches is 55942 --- greater than max batches
       92/1    0.63010    0.67696 +/- 0.00262
 Triggers unsatisfied, max unc./thresh. is 25.2708 for absorption in tally 3
 WARNING: The estimated number of batches is 55565 --- greater than max batches
       93/1    0.68610    0.67707 +/- 0.00259
 Triggers unsatisfied, max unc./thresh. is 24.9941 for absorption in tally 3
 WARNING: The estimated number of batches is 54980 --- greater than max batches
       94/1    0.67618    0.67706 +/- 0.00256
 Triggers unsatisfied, max unc./thresh. is 24.7139 for absorption in tally 3
 WARNING: The estimated number of batches is 54365 --- greater than max batches
       95/1    0.68946    0.67719 +/- 0.00253
 Triggers unsatisfied, max unc./thresh. is 25.4371 for absorption in tally 3
 WARNING: The estimated number of batches is 58240 --- greater than max batches
       96/1    0.70557    0.67751 +/- 0.00252
 Triggers unsatisfied, max unc./thresh. is 25.5082 for absorption in tally 3
 WARNING: The estimated number of batches is 59216 --- greater than max batches
       97/1    0.64689    0.67717 +/- 0.00252
 Triggers unsatisfied, max unc./thresh. is 25.2374 for absorption in tally 3
 WARNING: The estimated number of batches is 58603 --- greater than max batches
       98/1    0.70194    0.67744 +/- 0.00251
 Triggers unsatisfied, max unc./thresh. is 25.393 for absorption in tally 3
 WARNING: The estimated number of batches is 59972 --- greater than max batches
       99/1    0.68278    0.67750 +/- 0.00248
 Triggers unsatisfied, max unc./thresh. is 25.5651 for absorption in tally 3
 WARNING: The estimated number of batches is 61441 --- greater than max batches
      100/1    0.67066    0.67742 +/- 0.00246
 Triggers unsatisfied, max unc./thresh. is 25.3552 for absorption in tally 3
 WARNING: The estimated number of batches is 61079 --- greater than max batches
      101/1    0.64907    0.67713 +/- 0.00245
 Triggers unsatisfied, max unc./thresh. is 25.3463 for absorption in tally 3
 WARNING: The estimated number of batches is 61679 --- greater than max batches
      102/1    0.69810    0.67735 +/- 0.00243
 Triggers unsatisfied, max unc./thresh. is 25.1877 for absorption in tally 3
 WARNING: The estimated number of batches is 61544 --- greater than max batches
      103/1    0.70659    0.67764 +/- 0.00242
 Triggers unsatisfied, max unc./thresh. is 24.9371 for absorption in tally 3
 WARNING: The estimated number of batches is 60948 --- greater than max batches
      104/1    0.64152    0.67728 +/- 0.00243
 Triggers unsatisfied, max unc./thresh. is 24.6848 for absorption in tally 3
 WARNING: The estimated number of batches is 60330 --- greater than max batches
      105/1    0.68117    0.67732 +/- 0.00240
 Triggers unsatisfied, max unc./thresh. is 24.4368 for absorption in tally 3
 WARNING: The estimated number of batches is 59721 --- greater than max batches
      106/1    0.71963    0.67774 +/- 0.00242
 Triggers unsatisfied, max unc./thresh. is 24.2091 for absorption in tally 3
 WARNING: The estimated number of batches is 59200 --- greater than max batches
      107/1    0.69488    0.67790 +/- 0.00240
 Triggers unsatisfied, max unc./thresh. is 23.9711 for absorption in tally 3
 WARNING: The estimated number of batches is 58616 --- greater than max batches
      108/1    0.65697    0.67770 +/- 0.00238
 Triggers unsatisfied, max unc./thresh. is 23.8071 for absorption in tally 3
 WARNING: The estimated number of batches is 58384 --- greater than max batches
      109/1    0.70032    0.67792 +/- 0.00237
 Triggers unsatisfied, max unc./thresh. is 23.5788 for absorption in tally 3
 WARNING: The estimated number of batches is 57825 --- greater than max batches
      110/1    0.66571    0.67780 +/- 0.00235
 Triggers unsatisfied, max unc./thresh. is 23.5035 for absorption in tally 3
 WARNING: The estimated number of batches is 58009 --- greater than max batches
      111/1    0.69676    0.67798 +/- 0.00234
 Triggers unsatisfied, max unc./thresh. is 23.3157 for absorption in tally 3
 WARNING: The estimated number of batches is 57629 --- greater than max batches
      112/1    0.68219    0.67802 +/- 0.00231
 Triggers unsatisfied, max unc./thresh. is 23.1525 for absorption in tally 3
 WARNING: The estimated number of batches is 57361 --- greater than max batches
      113/1    0.69025    0.67813 +/- 0.00230
 Triggers unsatisfied, max unc./thresh. is 23.0036 for absorption in tally 3
 WARNING: The estimated number of batches is 57156 --- greater than max batches
      114/1    0.69241    0.67826 +/- 0.00228
 Triggers unsatisfied, max unc./thresh. is 22.792 for absorption in tally 3
 WARNING: The estimated number of batches is 56628 --- greater than max batches
      115/1    0.68646    0.67834 +/- 0.00226
 Triggers unsatisfied, max unc./thresh. is 22.6864 for absorption in tally 3
 WARNING: The estimated number of batches is 56620 --- greater than max batches
      116/1    0.69601    0.67850 +/- 0.00224
 Triggers unsatisfied, max unc./thresh. is 22.5007 for absorption in tally 3
 WARNING: The estimated number of batches is 56203 --- greater than max batches
      117/1    0.68761    0.67858 +/- 0.00222
 Triggers unsatisfied, max unc./thresh. is 22.3093 for absorption in tally 3
 WARNING: The estimated number of batches is 55749 --- greater than max batches
      118/1    0.71356    0.67889 +/- 0.00223
 Triggers unsatisfied, max unc./thresh. is 22.6651 for absorption in tally 3
 WARNING: The estimated number of batches is 58054 --- greater than max batches
      119/1    0.69850    0.67906 +/- 0.00221
 Triggers unsatisfied, max unc./thresh. is 22.4712 for absorption in tally 3
 WARNING: The estimated number of batches is 57570 --- greater than max batches
      120/1    0.70957    0.67933 +/- 0.00221
 Triggers unsatisfied, max unc./thresh. is 22.3266 for absorption in tally 3
 WARNING: The estimated number of batches is 57331 --- greater than max batches
      121/1    0.69643    0.67947 +/- 0.00220
 Triggers unsatisfied, max unc./thresh. is 22.6029 for absorption in tally 3
 WARNING: The estimated number of batches is 59269 --- greater than max batches
      122/1    0.67717    0.67945 +/- 0.00218
 Triggers unsatisfied, max unc./thresh. is 22.4667 for absorption in tally 3
 WARNING: The estimated number of batches is 59062 --- greater than max batches
      123/1    0.68419    0.67949 +/- 0.00216
 Triggers unsatisfied, max unc./thresh. is 22.3764 for absorption in tally 3
 WARNING: The estimated number of batches is 59089 --- greater than max batches
      124/1    0.69221    0.67960 +/- 0.00214
 Triggers unsatisfied, max unc./thresh. is 22.3341 for absorption in tally 3
 WARNING: The estimated number of batches is 59364 --- greater than max batches
      125/1    0.73940    0.68010 +/- 0.00218
 Triggers unsatisfied, max unc./thresh. is 22.1478 for absorption in tally 3
 WARNING: The estimated number of batches is 58868 --- greater than max batches
      126/1    0.66908    0.68001 +/- 0.00217
 Triggers unsatisfied, max unc./thresh. is 22.0085 for absorption in tally 3
 WARNING: The estimated number of batches is 58615 --- greater than max batches
      127/1    0.66041    0.67985 +/- 0.00216
 Triggers unsatisfied, max unc./thresh. is 21.8274 for absorption in tally 3
 WARNING: The estimated number of batches is 58131 --- greater than max batches
      128/1    0.69395    0.67996 +/- 0.00214
 Triggers unsatisfied, max unc./thresh. is 21.6537 for absorption in tally 3
 WARNING: The estimated number of batches is 57678 --- greater than max batches
      129/1    0.68665    0.68002 +/- 0.00212
 Triggers unsatisfied, max unc./thresh. is 21.7739 for absorption in tally 3
 WARNING: The estimated number of batches is 58794 --- greater than max batches
      130/1    0.64849    0.67976 +/- 0.00212
 Triggers unsatisfied, max unc./thresh. is 21.7492 for absorption in tally 3
 WARNING: The estimated number of batches is 59134 --- greater than max batches
      131/1    0.69734    0.67990 +/- 0.00211
 Triggers unsatisfied, max unc./thresh. is 21.59 for absorption in tally 3
 WARNING: The estimated number of batches is 58738 --- greater than max batches
      132/1    0.69482    0.68002 +/- 0.00210
 Triggers unsatisfied, max unc./thresh. is 21.4249 for absorption in tally 3
 WARNING: The estimated number of batches is 58302 --- greater than max batches
      133/1    0.68884    0.68009 +/- 0.00208
 Triggers unsatisfied, max unc./thresh. is 21.2587 for absorption in tally 3
 WARNING: The estimated number of batches is 57853 --- greater than max batches
      134/1    0.63042    0.67971 +/- 0.00210
 Triggers unsatisfied, max unc./thresh. is 21.1851 for absorption in tally 3
 WARNING: The estimated number of batches is 57902 --- greater than max batches
      135/1    0.69209    0.67980 +/- 0.00209
 Triggers unsatisfied, max unc./thresh. is 21.0525 for absorption in tally 3
 WARNING: The estimated number of batches is 57623 --- greater than max batches
      136/1    0.69873    0.67995 +/- 0.00208
 Triggers unsatisfied, max unc./thresh. is 20.9996 for absorption in tally 3
 WARNING: The estimated number of batches is 57774 --- greater than max batches
      137/1    0.70270    0.68012 +/- 0.00207
 Triggers unsatisfied, max unc./thresh. is 20.8455 for absorption in tally 3
 WARNING: The estimated number of batches is 57364 --- greater than max batches
      138/1    0.67295    0.68006 +/- 0.00205
 Triggers unsatisfied, max unc./thresh. is 21.3716 for absorption in tally 3
 WARNING: The estimated number of batches is 60752 --- greater than max batches
      139/1    0.63853    0.67975 +/- 0.00206
 Triggers unsatisfied, max unc./thresh. is 21.2124 for absorption in tally 3
 WARNING: The estimated number of batches is 60301 --- greater than max batches
      140/1    0.66645    0.67966 +/- 0.00205
 Triggers unsatisfied, max unc./thresh. is 21.1279 for absorption in tally 3
 WARNING: The estimated number of batches is 60268 --- greater than max batches
      141/1    0.70730    0.67986 +/- 0.00204
 Triggers unsatisfied, max unc./thresh. is 20.9845 for absorption in tally 3
 WARNING: The estimated number of batches is 59893 --- greater than max batches
      142/1    0.68838    0.67992 +/- 0.00203
 Triggers unsatisfied, max unc./thresh. is 20.8774 for absorption in tally 3
 WARNING: The estimated number of batches is 59719 --- greater than max batches
      143/1    0.64900    0.67970 +/- 0.00203
 Triggers unsatisfied, max unc./thresh. is 21.3772 for absorption in tally 3
 WARNING: The estimated number of batches is 63069 --- greater than max batches
      144/1    0.64490    0.67945 +/- 0.00203
 Triggers unsatisfied, max unc./thresh. is 21.2531 for absorption in tally 3
 WARNING: The estimated number of batches is 62791 --- greater than max batches
      145/1    0.69221    0.67954 +/- 0.00201
 Triggers unsatisfied, max unc./thresh. is 21.2049 for absorption in tally 3
 WARNING: The estimated number of batches is 62956 --- greater than max batches
      146/1    0.69481    0.67965 +/- 0.00200
 Triggers unsatisfied, max unc./thresh. is 21.0645 for absorption in tally 3
 WARNING: The estimated number of batches is 62569 --- greater than max batches
      147/1    0.70394    0.67982 +/- 0.00200
 Triggers unsatisfied, max unc./thresh. is 20.9156 for absorption in tally 3
 WARNING: The estimated number of batches is 62125 --- greater than max batches
      148/1    0.69482    0.67992 +/- 0.00198
 Triggers unsatisfied, max unc./thresh. is 20.7699 for absorption in tally 3
 WARNING: The estimated number of batches is 61694 --- greater than max batches
      149/1    0.63886    0.67964 +/- 0.00199
 Triggers unsatisfied, max unc./thresh. is 20.6366 for absorption in tally 3
 WARNING: The estimated number of batches is 61331 --- greater than max batches
      150/1    0.69377    0.67973 +/- 0.00198
 Triggers unsatisfied, max unc./thresh. is 20.5819 for absorption in tally 3
 WARNING: The estimated number of batches is 61430 --- greater than max batches
      151/1    0.71045    0.67994 +/- 0.00198
 Triggers unsatisfied, max unc./thresh. is 20.5417 for absorption in tally 3
 WARNING: The estimated number of batches is 61612 --- greater than max batches
      152/1    0.66093    0.67982 +/- 0.00197
 Triggers unsatisfied, max unc./thresh. is 20.4124 for absorption in tally 3
 WARNING: The estimated number of batches is 61256 --- greater than max batches
      153/1    0.68564    0.67985 +/- 0.00196
 Triggers unsatisfied, max unc./thresh. is 20.3025 for absorption in tally 3
 WARNING: The estimated number of batches is 61010 --- greater than max batches
      154/1    0.66961    0.67979 +/- 0.00194
 Triggers unsatisfied, max unc./thresh. is 20.2239 for absorption in tally 3
 WARNING: The estimated number of batches is 60948 --- greater than max batches
      155/1    0.67099    0.67973 +/- 0.00193
 Triggers unsatisfied, max unc./thresh. is 20.0962 for absorption in tally 3
 WARNING: The estimated number of batches is 60584 --- greater than max batches
      156/1    0.72742    0.68004 +/- 0.00194
 Triggers unsatisfied, max unc./thresh. is 19.9753 for absorption in tally 3
 WARNING: The estimated number of batches is 60256 --- greater than max batches
      157/1    0.66458    0.67994 +/- 0.00193
 Triggers unsatisfied, max unc./thresh. is 19.8852 for absorption in tally 3
 WARNING: The estimated number of batches is 60109 --- greater than max batches
      158/1    0.69052    0.68001 +/- 0.00192
 Triggers unsatisfied, max unc./thresh. is 19.7963 for absorption in tally 3
 WARNING: The estimated number of batches is 59965 --- greater than max batches
      159/1    0.70643    0.68018 +/- 0.00192
 Triggers unsatisfied, max unc./thresh. is 19.6991 for absorption in tally 3
 WARNING: The estimated number of batches is 59766 --- greater than max batches
      160/1    0.68576    0.68022 +/- 0.00191
 Triggers unsatisfied, max unc./thresh. is 19.6197 for absorption in tally 3
 WARNING: The estimated number of batches is 59670 --- greater than max batches
      161/1    0.69854    0.68034 +/- 0.00190
 Triggers unsatisfied, max unc./thresh. is 19.8287 for absorption in tally 3
 WARNING: The estimated number of batches is 61341 --- greater than max batches
      162/1    0.65983    0.68020 +/- 0.00189
 Triggers unsatisfied, max unc./thresh. is 20.0243 for absorption in tally 3
 WARNING: The estimated number of batches is 62958 --- greater than max batches
      163/1    0.66316    0.68010 +/- 0.00188
 Triggers unsatisfied, max unc./thresh. is 19.8975 for absorption in tally 3
 WARNING: The estimated number of batches is 62560 --- greater than max batches
      164/1    0.66179    0.67998 +/- 0.00187
 Triggers unsatisfied, max unc./thresh. is 19.895 for absorption in tally 3
 WARNING: The estimated number of batches is 62940 --- greater than max batches
      165/1    0.70881    0.68016 +/- 0.00187
 Triggers unsatisfied, max unc./thresh. is 19.8013 for absorption in tally 3
 WARNING: The estimated number of batches is 62740 --- greater than max batches
      166/1    0.70729    0.68033 +/- 0.00187
 Triggers unsatisfied, max unc./thresh. is 19.6876 for absorption in tally 3
 WARNING: The estimated number of batches is 62410 --- greater than max batches
      167/1    0.71073    0.68052 +/- 0.00186
 Triggers unsatisfied, max unc./thresh. is 19.5695 for absorption in tally 3
 WARNING: The estimated number of batches is 62046 --- greater than max batches
      168/1    0.69610    0.68061 +/- 0.00185
 Triggers unsatisfied, max unc./thresh. is 19.4797 for absorption in tally 3
 WARNING: The estimated number of batches is 61857 --- greater than max batches
      169/1    0.67141    0.68056 +/- 0.00184
 Triggers unsatisfied, max unc./thresh. is 19.438 for absorption in tally 3
 WARNING: The estimated number of batches is 61970 --- greater than max batches
      170/1    0.67727    0.68054 +/- 0.00183
 Triggers unsatisfied, max unc./thresh. is 19.3208 for absorption in tally 3
 WARNING: The estimated number of batches is 61599 --- greater than max batches
      171/1    0.64150    0.68030 +/- 0.00184
 Triggers unsatisfied, max unc./thresh. is 19.2066 for absorption in tally 3
 WARNING: The estimated number of batches is 61242 --- greater than max batches
      172/1    0.68758    0.68035 +/- 0.00183
 Triggers unsatisfied, max unc./thresh. is 19.114 for absorption in tally 3
 WARNING: The estimated number of batches is 61018 --- greater than max batches
      173/1    0.67126    0.68029 +/- 0.00182
 Triggers unsatisfied, max unc./thresh. is 19.1545 for absorption in tally 3
 WARNING: The estimated number of batches is 61644 --- greater than max batches
      174/1    0.65933    0.68017 +/- 0.00181
 Triggers unsatisfied, max unc./thresh. is 19.0415 for absorption in tally 3
 WARNING: The estimated number of batches is 61281 --- greater than max batches
      175/1    0.70572    0.68032 +/- 0.00181
 Triggers unsatisfied, max unc./thresh. is 18.9347 for absorption in tally 3
 WARNING: The estimated number of batches is 60954 --- greater than max batches
      176/1    0.66175    0.68021 +/- 0.00180
 Triggers unsatisfied, max unc./thresh. is 18.8337 for absorption in tally 3
 WARNING: The estimated number of batches is 60660 --- greater than max batches
      177/1    0.68714    0.68025 +/- 0.00179
 Triggers unsatisfied, max unc./thresh. is 18.7329 for absorption in tally 3
 WARNING: The estimated number of batches is 60364 --- greater than max batches
      178/1    0.70181    0.68037 +/- 0.00178
 Triggers unsatisfied, max unc./thresh. is 18.6297 for absorption in tally 3
 WARNING: The estimated number of batches is 60048 --- greater than max batches
      179/1    0.66700    0.68030 +/- 0.00177
 Triggers unsatisfied, max unc./thresh. is 18.5239 for absorption in tally 3
 WARNING: The estimated number of batches is 59711 --- greater than max batches
      180/1    0.68980    0.68035 +/- 0.00176
 Triggers unsatisfied, max unc./thresh. is 18.4186 for absorption in tally 3
 WARNING: The estimated number of batches is 59374 --- greater than max batches
      181/1    0.69586    0.68044 +/- 0.00176
 Triggers unsatisfied, max unc./thresh. is 18.3816 for absorption in tally 3
 WARNING: The estimated number of batches is 59473 --- greater than max batches
      182/1    0.68689    0.68048 +/- 0.00175
 Triggers unsatisfied, max unc./thresh. is 18.2781 for absorption in tally 3
 WARNING: The estimated number of batches is 59139 --- greater than max batches
      183/1    0.69257    0.68054 +/- 0.00174
 Triggers unsatisfied, max unc./thresh. is 18.1773 for absorption in tally 3
 WARNING: The estimated number of batches is 58819 --- greater than max batches
      184/1    0.69926    0.68065 +/- 0.00173
 Triggers unsatisfied, max unc./thresh. is 18.2191 for absorption in tally 3
 WARNING: The estimated number of batches is 59422 --- greater than max batches
      185/1    0.67801    0.68063 +/- 0.00172
 Triggers unsatisfied, max unc./thresh. is 18.1184 for absorption in tally 3
 WARNING: The estimated number of batches is 59096 --- greater than max batches
      186/1    0.67049    0.68058 +/- 0.00171
 Triggers unsatisfied, max unc./thresh. is 18.0484 for absorption in tally 3
 WARNING: The estimated number of batches is 58965 --- greater than max batches
      187/1    0.68164    0.68058 +/- 0.00170
 Triggers unsatisfied, max unc./thresh. is 17.9808 for absorption in tally 3
 WARNING: The estimated number of batches is 58848 --- greater than max batches
      188/1    0.66856    0.68052 +/- 0.00170
 Triggers unsatisfied, max unc./thresh. is 17.9146 for absorption in tally 3
 WARNING: The estimated number of batches is 58736 --- greater than max batches
      189/1    0.71850    0.68073 +/- 0.00170
 Triggers unsatisfied, max unc./thresh. is 17.8551 for absorption in tally 3
 WARNING: The estimated number of batches is 58665 --- greater than max batches
      190/1    0.67095    0.68067 +/- 0.00169
 Triggers unsatisfied, max unc./thresh. is 17.8953 for absorption in tally 3
 WARNING: The estimated number of batches is 59250 --- greater than max batches
      191/1    0.70857    0.68082 +/- 0.00169
 Triggers unsatisfied, max unc./thresh. is 17.8197 for absorption in tally 3
 WARNING: The estimated number of batches is 59068 --- greater than max batches
      192/1    0.65322    0.68067 +/- 0.00169
 Triggers unsatisfied, max unc./thresh. is 17.8199 for absorption in tally 3
 WARNING: The estimated number of batches is 59387 --- greater than max batches
      193/1    0.67888    0.68066 +/- 0.00168
 Triggers unsatisfied, max unc./thresh. is 17.8072 for absorption in tally 3
 WARNING: The estimated number of batches is 59620 --- greater than max batches
      194/1    0.72890    0.68092 +/- 0.00169
 Triggers unsatisfied, max unc./thresh. is 17.7152 for absorption in tally 3
 WARNING: The estimated number of batches is 59319 --- greater than max batches
      195/1    0.64688    0.68074 +/- 0.00169
 Triggers unsatisfied, max unc./thresh. is 17.6252 for absorption in tally 3
 WARNING: The estimated number of batches is 59029 --- greater than max batches
      196/1    0.68906    0.68078 +/- 0.00168
 Triggers unsatisfied, max unc./thresh. is 17.5465 for absorption in tally 3
 WARNING: The estimated number of batches is 58810 --- greater than max batches
      197/1    0.69381    0.68085 +/- 0.00167
 Triggers unsatisfied, max unc./thresh. is 17.4939 for absorption in tally 3
 WARNING: The estimated number of batches is 58764 --- greater than max batches
      198/1    0.70057    0.68095 +/- 0.00167
 Triggers unsatisfied, max unc./thresh. is 17.4414 for absorption in tally 3
 WARNING: The estimated number of batches is 58717 --- greater than max batches
      199/1    0.67868    0.68094 +/- 0.00166
 Triggers unsatisfied, max unc./thresh. is 17.4394 for absorption in tally 3
 WARNING: The estimated number of batches is 59008 --- greater than max batches
      200/1    0.69190    0.68100 +/- 0.00165
 Triggers unsatisfied, max unc./thresh. is 17.3511 for absorption in tally 3
 WARNING: The estimated number of batches is 58712 --- greater than max batches
 Creating state point statepoint.200.h5...

 =======================>     TIMING STATISTICS     <=======================

 Total time for initialization     = 9.3777e-01 seconds
   Reading cross sections          = 8.7757e-01 seconds
 Total time in simulation          = 4.0652e+01 seconds
   Time in transport only          = 3.9022e+01 seconds
   Time in inactive batches        = 9.1120e-01 seconds
   Time in active batches          = 3.9741e+01 seconds
   Time synchronizing fission bank = 4.0496e-02 seconds
     Sampling source sites         = 3.3700e-02 seconds
     SEND/RECV source sites        = 6.4404e-03 seconds
   Time accumulating tallies       = 2.0272e-03 seconds
 Total time for finalization       = 4.0896e-03 seconds
 Total time elapsed                = 4.1621e+01 seconds
 Calculation Rate (inactive)       = 13718.1 particles/second
 Calculation Rate (active)         = 12267.1 particles/second

 ============================>     RESULTS     <============================

 k-effective (Collision)     = 0.68122 +/- 0.00150
 k-effective (Track-length)  = 0.68100 +/- 0.00165
 k-effective (Absorption)    = 0.68224 +/- 0.00159
 Combined k-effective        = 0.68162 +/- 0.00134
 Leakage Fraction            = 0.34047 +/- 0.00082

Tally Data Processing

In [17]:
# We do not know how many batches were needed to satisfy the 
# tally trigger(s), so find the statepoint file(s)
statepoints = glob.glob('statepoint.*.h5')

# Load the last statepoint file
sp = openmc.StatePoint(statepoints[-1])

Analyze the mesh fission rate tally

In [18]:
# Find the mesh tally with the StatePoint API
tally = sp.get_tally(name='mesh tally')

# Print a little info about the mesh tally to the screen
print(tally)
Tally
	ID             =	1
	Name           =	mesh tally
	Filters        =	MeshFilter, EnergyFilter
	Nuclides       =	total 
	Scores         =	['fission', 'nu-fission']
	Estimator      =	tracklength

Use the new Tally data retrieval API with pure NumPy

In [19]:
# Get the relative error for the thermal fission reaction 
# rates in the four corner pins 
data = tally.get_values(scores=['fission'],
                        filters=[openmc.MeshFilter, openmc.EnergyFilter], \
                        filter_bins=[((1,1),(1,17), (17,1), (17,17)), \
                                    ((0., 0.625),)], value='rel_err')
print(data)
[[[0.16617932]]

 [[0.06455926]]

 [[0.32266365]]

 [[0.13355528]]]
In [20]:
# Get a pandas dataframe for the mesh tally data
df = tally.get_pandas_dataframe(nuclides=False)

# Set the Pandas float display settings
pd.options.display.float_format = '{:.2e}'.format

# Print the first twenty rows in the dataframe
df.head(20)
Out[20]:
mesh 1 energy low [eV] energy high [eV] score mean std. dev.
x y z
0 1 1 1 0.00e+00 6.25e-01 fission 1.76e-04 2.92e-05
1 1 1 1 0.00e+00 6.25e-01 nu-fission 4.28e-04 7.12e-05
2 1 1 1 6.25e-01 2.00e+07 fission 6.67e-05 6.94e-06
3 1 1 1 6.25e-01 2.00e+07 nu-fission 1.75e-04 1.71e-05
4 2 1 1 0.00e+00 6.25e-01 fission 2.04e-04 3.80e-05
5 2 1 1 0.00e+00 6.25e-01 nu-fission 4.96e-04 9.27e-05
6 2 1 1 6.25e-01 2.00e+07 fission 5.76e-05 6.97e-06
7 2 1 1 6.25e-01 2.00e+07 nu-fission 1.52e-04 1.91e-05
8 3 1 1 0.00e+00 6.25e-01 fission 1.80e-04 3.15e-05
9 3 1 1 0.00e+00 6.25e-01 nu-fission 4.38e-04 7.68e-05
10 3 1 1 6.25e-01 2.00e+07 fission 7.19e-05 9.68e-06
11 3 1 1 6.25e-01 2.00e+07 nu-fission 1.89e-04 2.49e-05
12 4 1 1 0.00e+00 6.25e-01 fission 1.91e-04 3.67e-05
13 4 1 1 0.00e+00 6.25e-01 nu-fission 4.66e-04 8.93e-05
14 4 1 1 6.25e-01 2.00e+07 fission 6.78e-05 9.81e-06
15 4 1 1 6.25e-01 2.00e+07 nu-fission 1.76e-04 2.44e-05
16 5 1 1 0.00e+00 6.25e-01 fission 1.56e-04 2.32e-05
17 5 1 1 0.00e+00 6.25e-01 nu-fission 3.81e-04 5.65e-05
18 5 1 1 6.25e-01 2.00e+07 fission 6.28e-05 8.06e-06
19 5 1 1 6.25e-01 2.00e+07 nu-fission 1.62e-04 2.05e-05
In [21]:
# Create a boxplot to view the distribution of
# fission and nu-fission rates in the pins
bp = df.boxplot(column='mean', by='score')
In [22]:
# Extract thermal nu-fission rates from pandas
fiss = df[df['score'] == 'nu-fission']
fiss = fiss[fiss['energy low [eV]'] == 0.0]

# Extract mean and reshape as 2D NumPy arrays
mean = fiss['mean'].values.reshape((17,17))

plt.imshow(mean, interpolation='nearest')
plt.title('fission rate')
plt.xlabel('x')
plt.ylabel('y')
plt.colorbar()
Out[22]:
<matplotlib.colorbar.Colorbar at 0x15494902cf28>

Analyze the cell+nuclides scatter-y2 rate tally

In [23]:
# Find the cell Tally with the StatePoint API
tally = sp.get_tally(name='cell tally')

# Print a little info about the cell tally to the screen
print(tally)
Tally
	ID             =	2
	Name           =	cell tally
	Filters        =	CellFilter
	Nuclides       =	U235 U238 
	Scores         =	['scatter']
	Estimator      =	tracklength

In [24]:
# Get a pandas dataframe for the cell tally data
df = tally.get_pandas_dataframe()

# Print the first twenty rows in the dataframe
df.head(20)
Out[24]:
cell nuclide score mean std. dev.
0 1 U235 scatter 3.80e-02 1.33e-04
1 1 U238 scatter 2.33e+00 8.12e-03

Use the new Tally data retrieval API with pure NumPy

In [25]:
# Get the standard deviations the total scattering rate
data = tally.get_values(scores=['scatter'], 
                        nuclides=['U238', 'U235'], value='std_dev')
print(data)
[[[0.00811746]
  [0.00013266]]]

Analyze the distribcell tally

In [26]:
# Find the distribcell Tally with the StatePoint API
tally = sp.get_tally(name='distribcell tally')

# Print a little info about the distribcell tally to the screen
print(tally)
Tally
	ID             =	3
	Name           =	distribcell tally
	Filters        =	DistribcellFilter
	Nuclides       =	total 
	Scores         =	['absorption', 'scatter']
	Estimator      =	tracklength

Use the new Tally data retrieval API with pure NumPy

In [27]:
# Get the relative error for the scattering reaction rates in
# the first 10 distribcell instances 
data = tally.get_values(scores=['scatter'], filters=[openmc.DistribcellFilter],
                        filter_bins=[tuple(range(10))], value='rel_err')
print(data)
[[[0.04347272]]

 [[0.04671736]]

 [[0.04878286]]

 [[0.03059582]]

 [[0.04548096]]

 [[0.04288085]]

 [[0.02557663]]

 [[0.0419826 ]]

 [[0.05878954]]

 [[0.04217666]]]

Print the distribcell tally dataframe

In [28]:
# Get a pandas dataframe for the distribcell tally data
df = tally.get_pandas_dataframe(nuclides=False)

# Print the last twenty rows in the dataframe
df.tail(20)
Out[28]:
level 1 level 2 level 3 distribcell score mean std. dev.
univ cell lat univ cell
id id id x y id id
558 3 4 2 7 16 1 3 279 absorption 6.26e-04 4.62e-05
559 3 4 2 7 16 1 3 279 scatter 8.73e-02 2.14e-03
560 3 4 2 8 16 1 3 280 absorption 6.15e-04 3.12e-05
561 3 4 2 8 16 1 3 280 scatter 8.06e-02 1.85e-03
562 3 4 2 9 16 1 3 281 absorption 6.36e-04 4.24e-05
563 3 4 2 9 16 1 3 281 scatter 7.59e-02 1.93e-03
564 3 4 2 10 16 1 3 282 absorption 5.30e-04 2.75e-05
565 3 4 2 10 16 1 3 282 scatter 6.82e-02 1.02e-03
566 3 4 2 11 16 1 3 283 absorption 4.67e-04 2.84e-05
567 3 4 2 11 16 1 3 283 scatter 6.42e-02 1.81e-03
568 3 4 2 12 16 1 3 284 absorption 4.52e-04 2.13e-05
569 3 4 2 12 16 1 3 284 scatter 5.64e-02 1.20e-03
570 3 4 2 13 16 1 3 285 absorption 3.85e-04 1.99e-05
571 3 4 2 13 16 1 3 285 scatter 4.86e-02 1.58e-03
572 3 4 2 14 16 1 3 286 absorption 2.84e-04 2.16e-05
573 3 4 2 14 16 1 3 286 scatter 3.91e-02 1.66e-03
574 3 4 2 15 16 1 3 287 absorption 2.17e-04 2.15e-05
575 3 4 2 15 16 1 3 287 scatter 3.02e-02 1.71e-03
576 3 4 2 16 16 1 3 288 absorption 1.50e-04 1.42e-05
577 3 4 2 16 16 1 3 288 scatter 1.89e-02 9.31e-04
In [29]:
# Show summary statistics for absorption distribcell tally data
absorption = df[df['score'] == 'absorption']
absorption[['mean', 'std. dev.']].dropna().describe()

# Note that the maximum standard deviation does indeed
# meet the 5e-5 threshold set by the tally trigger
Out[29]:
mean std. dev.
count 2.89e+02 2.89e+02
mean 4.15e-04 2.29e-05
std 2.33e-04 9.14e-06
min 1.84e-05 3.31e-06
25% 2.08e-04 1.58e-05
50% 4.10e-04 2.24e-05
75% 6.25e-04 2.93e-05
max 8.87e-04 5.06e-05

Perform a statistical test comparing the tally sample distributions for two categories of fuel pins.

In [30]:
# Extract tally data from pins in the pins divided along y=-x diagonal 
multi_index = ('level 2', 'lat',)
lower = df[df[multi_index + ('x',)] + df[multi_index + ('y',)] < 16]
upper = df[df[multi_index + ('x',)] + df[multi_index + ('y',)] > 16]
lower = lower[lower['score'] == 'absorption']
upper = upper[upper['score'] == 'absorption']

# Perform non-parametric Mann-Whitney U Test to see if the 
# absorption rates (may) come from same sampling distribution
u, p = scipy.stats.mannwhitneyu(lower['mean'], upper['mean'])
print('Mann-Whitney Test p-value: {0}'.format(p))
Mann-Whitney Test p-value: 0.3531165056829588

Note that the symmetry implied by the y=-x diagonal ensures that the two sampling distributions are identical. Indeed, as illustrated by the test above, for any reasonable significance level (e.g., $\alpha$=0.05) one would not reject the null hypothesis that the two sampling distributions are identical.

Next, perform the same test but with two groupings of pins which are not symmetrically identical to one another.

In [31]:
# Extract tally data from pins in the pins divided along y=x diagonal
multi_index = ('level 2', 'lat',)
lower = df[df[multi_index + ('x',)] > df[multi_index + ('y',)]]
upper = df[df[multi_index + ('x',)] < df[multi_index + ('y',)]]
lower = lower[lower['score'] == 'absorption']
upper = upper[upper['score'] == 'absorption']

# Perform non-parametric Mann-Whitney U Test to see if the 
# absorption rates (may) come from same sampling distribution
u, p = scipy.stats.mannwhitneyu(lower['mean'], upper['mean'])
print('Mann-Whitney Test p-value: {0}'.format(p))
Mann-Whitney Test p-value: 2.835784441937541e-42

Note that the asymmetry implied by the y=x diagonal ensures that the two sampling distributions are not identical. Indeed, as illustrated by the test above, for any reasonable significance level (e.g., $\alpha$=0.05) one would reject the null hypothesis that the two sampling distributions are identical.

In [32]:
# Extract the scatter tally data from pandas
scatter = df[df['score'] == 'scatter']

scatter['rel. err.'] = scatter['std. dev.'] / scatter['mean']

# Show a scatter plot of the mean vs. the std. dev.
scatter.plot(kind='scatter', x='mean', y='rel. err.', title='Scattering Rates')
/home/romano/.pyenv/versions/3.7.0/lib/python3.7/site-packages/ipykernel_launcher.py:4: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  after removing the cwd from sys.path.
Out[32]:
<matplotlib.axes._subplots.AxesSubplot at 0x154948ffb160>
In [33]:
# Plot a histogram and kernel density estimate for the scattering rates
scatter['mean'].plot(kind='hist', bins=25)
scatter['mean'].plot(kind='kde')
plt.title('Scattering Rates')
plt.xlabel('Mean')
plt.legend(['KDE', 'Histogram'])
Out[33]:
<matplotlib.legend.Legend at 0x154948f326a0>