Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/source/methods/energy_deposition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ run with :math:`N918` reflecting fission heating computed from NJOY.
+ E_{i, \gamma, d}\right]\sigma_{i, f}(E).

This modified heating data is stored as the MT=901 reaction and will be scored
if ``heating-local`` is included in :attr:`openmc.Tally.scores`.
if ``heating-local`` is included in :attr:`openmc.TallyBase.scores`.

Coupled Neutron-Photon Transport
--------------------------------
Expand All @@ -155,7 +155,7 @@ Let :math:`N301` represent the total heating number returned from this
+ \left[E_{i, fr}(E) + E_{i, \beta}(E)\right]\sigma_{i, f}(E).

This modified heating data is stored as the MT=301 reaction and will be scored
if ``heating`` is included in :attr:`openmc.Tally.scores`.
if ``heating`` is included in :attr:`openmc.TallyBase.scores`.

Photons and Charged Particles
-----------------------------
Expand Down
5 changes: 4 additions & 1 deletion docs/source/pythonapi/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ Constructing Tallies
openmc.MeshMaterialVolumes
openmc.Trigger
openmc.TallyDerivative
openmc.Tally
openmc.TallyBase
openmc.VolumeTally
openmc.SurfaceTally
openmc.PulseHeightTally
openmc.Tallies

Meshes
Expand Down
2 changes: 1 addition & 1 deletion docs/source/usersguide/decay_sources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ create a shallow copy of the original neutron model (available as the
``neutron_model`` attribute) and store it in the ``photon_model`` attribute. We
can use this to define tallies specific to the photon model::

dose_tally = openmc.Tally()
dose_tally = openmc.VolumeTally()
...
r2s.photon_model.tallies = [dose_tally]

Expand Down
4 changes: 2 additions & 2 deletions docs/source/usersguide/kinetics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Alternatively, each of the tallies can be manually defined using group-wise or
total :math:`\beta_{\text{eff}}` specified by providing a 6-group
:class:`openmc.DelayedGroupFilter`::

beta_tally = openmc.Tally(name="group-beta-score")
beta_tally = openmc.VolumeTally(name="group-beta-score")
beta_tally.scores = ["ifp-beta-numerator"]

# Add DelayedGroupFilter to enable group-wise tallies
Expand All @@ -87,7 +87,7 @@ total :math:`\beta_{\text{eff}}` specified by providing a 6-group
Here is an example showing how to declare the three available IFP scores in a
single tally::

tally = openmc.Tally(name="ifp-scores")
tally = openmc.VolumeTally(name="ifp-scores")
tally.scores = [
"ifp-time-numerator",
"ifp-beta-numerator",
Expand Down
8 changes: 4 additions & 4 deletions docs/source/usersguide/processing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ a flat array for a given dataset can be passed directly to this method.
mesh.lower_left = [-5, -10, -15]
mesh.upper_right = [5, 10, 15]
mesh_filter = openmc.MeshFilter(mesh)
tally = openmc.Tally()
tally = openmc.VolumeTally()
tally.filters = [mesh_filter]
tally.scores = ['flux']

Expand All @@ -136,10 +136,10 @@ a flat array for a given dataset can be passed directly to this method.
# provide the data as-is to the method
mesh.write_data_to_vtk('flux.vtk', {'flux-mean': tally.mean})

The :class:`~openmc.Tally` object also provides a way to expand the dimensions
The :class:`~openmc.TallyBase` object also provides a way to expand the dimensions
of the mesh filter into a meaningful form where indexing the mesh filter
dimensions results in intuitive slicing of structured meshes by setting
``expand_dims=True`` when using :meth:`openmc.Tally.get_reshaped_data`. This
``expand_dims=True`` when using :meth:`openmc.TallyBase.get_reshaped_data`. This
reshaping does cause flat indexing of the data to change, however. As noted
above, provided datasets are allowed to be shaped so long as such datasets have
shapes that match the mesh dimensions. The ability to pass datasets in this way
Expand All @@ -158,7 +158,7 @@ demonstrates such a case for tally with both a :class:`~openmc.MeshFilter` and
mesh.upper_right = [5, 10, 15]
mesh_filter = openmc.MeshFilter(mesh)
energy_filter = openmc.EnergyFilter([0.0, 1.0, 20.0e6])
tally = openmc.Tally()
tally = openmc.VolumeTally()
tally.filters = [mesh_filter, energy_filter]
tally.scores = ['flux']

Expand Down
4 changes: 2 additions & 2 deletions docs/source/usersguide/random_ray.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ given below:
energy_filter = openmc.EnergyFilter(group_edges)

# Create tally using our two filters and add scores
tally = openmc.Tally()
tally = openmc.VolumeTally()
tally.filters = [mesh_filter, energy_filter]
tally.scores = ['flux', 'fission', 'nu-fission']

Expand Down Expand Up @@ -1222,7 +1222,7 @@ given below:
energy_filter = openmc.EnergyFilter(ebins)

# Create tally using our two filters and add scores
tally = openmc.Tally()
tally = openmc.VolumeTally()
tally.filters = [mesh_filter, energy_filter]
tally.scores = ['flux']

Expand Down
11 changes: 6 additions & 5 deletions docs/source/usersguide/tallies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Specifying Tallies
.. currentmodule:: openmc

In order to obtain estimates of physical quantities in your simulation, you need
to create one or more tallies using the :class:`openmc.Tally` class. As
to create one or more tallies using some of the :class:`openmc.TallyBase` subclasses.
The most used :class:`openmc.TallyBase` subclass is the :class:`openmc.VolumeTally` class. As
explained in detail in the :ref:`theory manual <methods_tallies>`, tallies
provide estimates of a scoring function times the flux integrated over some
region of phase space, as in:
Expand Down Expand Up @@ -53,8 +54,8 @@ Energies are specified in eV and need to be monotonically increasing.
.. caution:: An energy bin between zero and the lowest energy specified is not
included by default as it is in MCNP.

Once you have created a filter, it should be assigned to a :class:`openmc.Tally`
instance through the :attr:`Tally.filters` attribute::
Once you have created a filter, it should be assigned to a :class:`openmc.TallyBase`
instance through the :attr:`TallyBase.filters` attribute::

tally.filters.append(cell_filter)
tally.filters.append(energy_filter)
Expand All @@ -74,15 +75,15 @@ Scores
------

To specify the scoring functions, a list of strings needs to be given to the
:attr:`Tally.scores` attribute. You can score the flux ('flux'), or a reaction
:attr:`TallyBase.scores` attribute. You can score the flux ('flux'), or a reaction
rate ('total', 'fission', etc.). For example, to tally the elastic scattering
rate and the fission neutron production, you'd assign::

tally.scores = ['elastic', 'nu-fission']

With no further specification, you will get the total elastic scattering rate
and the total fission neutron production. If you want reaction rates for a
particular nuclide or set of nuclides, you can set the :attr:`Tally.nuclides`
particular nuclide or set of nuclides, you can set the :attr:`TallyBase.nuclides`
attribute to a list of strings indicating which nuclides. The nuclide names
should follow the same :ref:`naming convention <usersguide_naming>` as that used
for material specification. If we wanted the reaction rates only for U235 and
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_source/build_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
mesh.upper_right = (5.0, 5.0)
mesh.dimension = (50, 50)

tally = openmc.Tally()
tally = openmc.VolumeTally()
tally.filters = [openmc.MeshFilter(mesh)]
tally.scores = ['flux']
tallies = openmc.Tallies([tally])
Expand Down
2 changes: 1 addition & 1 deletion examples/lattice/hexagonal/build_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
###############################################################################

# Instantiate a distribcell Tally
tally = openmc.Tally(tally_id=1)
tally = openmc.VolumeTally(tally_id=1)
tally.filters = [openmc.DistribcellFilter(cell2)]
tally.scores = ['total']

Expand Down
2 changes: 1 addition & 1 deletion examples/lattice/nested/build_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
mesh_filter = openmc.MeshFilter(mesh)

# Instantiate the Tally
tally = openmc.Tally(tally_id=1)
tally = openmc.VolumeTally(tally_id=1)
tally.filters = [mesh_filter]
tally.scores = ['total']

Expand Down
2 changes: 1 addition & 1 deletion examples/lattice/simple/build_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
trigger.scores = ['all']

# Instantiate the Tally
tally = openmc.Tally(tally_id=1)
tally = openmc.VolumeTally(tally_id=1)
tally.filters = [mesh_filter]
tally.scores = ['total']
tally.triggers = [trigger]
Expand Down
2 changes: 1 addition & 1 deletion examples/parameterized_custom_source/build_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
mesh.upper_right = (5.0, 5.0)
mesh.dimension = (50, 50)

tally = openmc.Tally()
tally = openmc.VolumeTally()
tally.filters = [openmc.MeshFilter(mesh)]
tally.scores = ['flux']
tallies = openmc.Tallies([tally])
Expand Down
4 changes: 2 additions & 2 deletions examples/pincell/build_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
mesh_filter = openmc.MeshFilter(mesh)

# Now use the mesh filter in a tally and indicate what scores are desired
mesh_tally = openmc.Tally(name="Mesh tally")
mesh_tally = openmc.VolumeTally(name="Mesh tally")
mesh_tally.filters = [mesh_filter]
mesh_tally.scores = ['flux', 'fission', 'nu-fission']

Expand All @@ -104,7 +104,7 @@
energies = np.logspace(log10(e_min), log10(e_max), groups + 1)
energy_filter = openmc.EnergyFilter(energies)

spectrum_tally = openmc.Tally(name="Flux spectrum")
spectrum_tally = openmc.VolumeTally(name="Flux spectrum")
spectrum_tally.filters = [energy_filter]
spectrum_tally.scores = ['flux']

Expand Down
4 changes: 2 additions & 2 deletions examples/pincell_multigroup/build_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
mesh_filter = openmc.MeshFilter(mesh)

# Now use the mesh filter in a tally and indicate what scores are desired
mesh_tally = openmc.Tally(name="Mesh tally")
mesh_tally = openmc.VolumeTally(name="Mesh tally")
mesh_tally.filters = [mesh_filter]
mesh_tally.scores = ['flux', 'fission', 'nu-fission']

Expand All @@ -142,7 +142,7 @@
energies = np.logspace(log10(e_min), log10(e_max), groups + 1)
energy_filter = openmc.EnergyFilter(energies)

spectrum_tally = openmc.Tally(name="Flux spectrum")
spectrum_tally = openmc.VolumeTally(name="Flux spectrum")
spectrum_tally.filters = [energy_filter]
spectrum_tally.scores = ['flux']

Expand Down
2 changes: 1 addition & 1 deletion examples/pincell_pulsed/run_pulse.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
time_filter = openmc.TimeFilter(t_grid)

# Tally for total neutron density in time
density_tally = openmc.Tally(name="Density")
density_tally = openmc.VolumeTally(name="Density")
density_tally.filters = [time_filter]
density_tally.scores = ["inverse-velocity"]

Expand Down
2 changes: 1 addition & 1 deletion examples/pincell_random_ray/build_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
energy_filter = openmc.EnergyFilter(group_edges)

# Now use the mesh filter in a tally and indicate what scores are desired
tally = openmc.Tally(name="Mesh and Energy tally")
tally = openmc.VolumeTally(name="Mesh and Energy tally")
tally.filters = [mesh_filter, energy_filter]
tally.scores = ['flux', 'fission', 'nu-fission']

Expand Down
Loading
Loading