MeshTally

Description

The MeshTally class wraps an OpenMC tally with an unstructured libMesh filter to directly enable tallying on an unstructured mesh. There are two options when using a MeshTally:

  • Do nothing, in which case OpenMC will tally on the [Mesh]

  • Specify a mesh_template, which provides a path to a mesh file

For the mesh_template option, it is possible to translate the same mesh to multiple locations in the OpenMC geometry (while only taking up the memory needed to store a single mesh) using the mesh_translations or mesh_translations_file parameters provided by the tallies block. This is a useful feature for geometries that consist of many repeated geometry units, such as pebble bed and pin fuel systems.

commentnote

At present, unstructured mesh tallies are copied directly to the [Mesh] (without doing any type of nearest-node lookup). Suppose the mesh template consists of a mesh for a pincell with elements that you have translated to 3 different locations, giving a total of tally bins. Because a direct copy is used to transfer the mesh tally results to the [Mesh], the first elements in the [Mesh] must exactly match the elements in the mesh tally (except for a possible mesh scaling, as described in Mesh Scaling ). This equivalence is required for the direct copy to be accurate - otherwise, the mesh tally results would be transferred to incorrect regions of space.

Cardinal supports several tally scores which can be specified in the score parameter when adding a tally. Options include:

  • heating: total nuclear heating

  • heating_local: same as the heating score, except that energy from secondary photons is deposited locally

  • kappa_fission: recoverable energy from fission, including prompt sources (fission fragments, prompt neutrons, prompt gammas) and delayed sources (delayed neutrons, delayed gammas, delayed betas). Neutrino energy is neglected. The energy from photons is assumed to deposit locally.

  • fission_q_prompt: the prompt components of the kappa_fission score, except that the energy released is a function of the incident energy by linking to optional fission energy release data.

  • fission_q_recoverable: same as the kappa_fission score, except that the score depends on the incident energy by linking to optional fission energy release data

  • damage_energy: damage energy production

  • flux: particle scalar flux

  • H3_production: tritium production reaction rate

  • total: the total reaction rate

  • absorption: the absorption reaction rate

  • scatter: the scattering reaction rate

  • nu_scatter: the scattering reaction rate combined with the total (n, xn) reaction rate

  • fission: the fission reaction rate

  • nu_fission: the fission neutron production rate

  • prompt_nu_fission: the prompt fission neutron production rate

  • delayed_nu_fission: the delayed fission neutron production rate

  • decay_rate: the neutron precursor decay constant weighted by the delayed fission neutron production rate

  • inverse_velocity: one over the particle velocity weighted by the particle flux

commentnote

To obtain the true precursor decay constant or inverse velocity, you need to divide decay_rate by delayed_nu_fission and inverse_velocity by flux (respectively). This requires the addition of either delayed_nu_fission or flux and some additional post-processing.

For more information on the specific meanings of these various scores, please consult the OpenMC tally documentation. Table 1 compares the units from OpenMC and the units of the AuxVariables created for all tally scores supported by Cardinal. Note that for all area or volume units in Table 1, that those units match whatever unit is used in the [Mesh]. The names of the tally auxvariables added by the OpenMCCellAverageProblem can be modified by specifying a name for each score in name.

Table 1: Tally units from OpenMC and the conversion in Cardinal.

Tally scoreOpenMC UnitsCardinal Units
heatingeV / source particleW / volume
heating_localeV / source particleW / volume
kappa_fissioneV / source particleW / volume
fission_q_prompteV / source particleW / volume
fission_q_recoverableeV / source particleW / volume
damage_energyeV / source particleeV / volume / second
fluxparticle - cm / source particleparticle / area / second
H3_productiontritium / source particletritium / volume / second
totaltotal reactions / source particletotal reactions / volume / second
absorptionabsorption reactions / source particleabsorption reactions / volume / second
scatterscattering reactions / source particlescattering reactions / volume / second
nu_scatternu-scattering reactions / source particlenu-scattering reactions / volume / second
fissionfission reactions / source particlefission reactions / volume / second
nu_fissionnu-fission reactions / source particlenu-fission reactions / volume / second
prompt_nu_fissionprompt nu-fission reactions / source particleprompt nu-fission reactions / volume / second
delayed_nu_fissiondelayed nu-fission reactions / source particledelayed nu-fission reactions / volume / second
decay_ratedelayed nu-fission reactions / source particle / sdelayed nu-fission reactions / volume / second^2
inverse_velocityparticle-seconds / source particleparticles / volume

This tally is capable of controlling OpenMC execution through the use of tally triggers. Tallies currently support active batch termination through a relative error indicator, which can be enabled by setting trigger to rel_err for each score in the tally. Scores which do not need to control active batch termination can have a value of none set. If enabled, an appropriate relative error must be set for each score in trigger_threshold.

Certain aspects of tally results can be output as auxiliary variables to the mesh:

  • unrelaxed_tally: unrelaxed tally; this will append _raw to the tally name and output to the mesh mirror

  • unrelaxed_tally_rel_error: unrelaxed tally relative error; this will append _rel_error to the tally name and output to the mesh mirror

  • unrelaxed_tally_std_dev: unrelaxed tally standard deviation; this will append _std_dev to the tally and output to the mesh mirror

commentnote

At present time, libMesh unstructured mesh tallies only support collision and analog estimators. Attempting to set estimator to tracklength will result in a warning; the MeshTally will then manually reset the estimator to collision to prevent OpenMC from throwing an error.

Example Input File Syntax

As an example, this MeshTally scores kappa_fission (the default tally score) on the unstructured mesh found in mesh_in.e and stores it in a variable called heat_source. The [Tallies] block adds three MeshTally classes, each one located at a different point specified in mesh_translations which corresponds to the centroid of a fuel pebble.

[Problem<<<{"href": "../../syntax/Problem/index.html"}>>>]
  type = OpenMCCellAverageProblem
  verbose = true
  power = 1500.0
  temperature_blocks = '0'
  cell_level = 1
  scaling = 100.0

  [Tallies<<<{"href": "../../syntax/Problem/Tallies/index.html"}>>>]
    [heat_source]
      type = MeshTally<<<{"description": "A class which implements unstructured mesh tallies.", "href": "MeshTally.html"}>>>
      mesh_translations = '0 0 0.02
                           0 0 0.06
                           0 0 0.10'
      mesh_template<<<{"description": "Mesh tally template for OpenMC when using mesh tallies; at present, this mesh must exactly match the mesh used in the [Mesh] block because a one-to-one copy is used to get OpenMC's tally results on the [Mesh]."}>>> = mesh_in.e
      name<<<{"description": "Auxiliary variable name(s) to use for OpenMC tallies. If not specified, defaults to the names of the scores"}>>> = heat_source

      normalize_by_global_tally<<<{"description": "Whether to normalize local tallies by a global tally (true) or else by the sum of the local tally (false)"}>>> = false
    []
  []
[]
(tutorials/pebbles/openmc_um.i)

Input Parameters

  • blockSubdomains for which to add tallies in OpenMC. If not provided, tallies will be applied over the entire domain corresponding to the [Mesh] block.

    C++ Type:std::vector<SubdomainName>

    Controllable:No

    Description:Subdomains for which to add tallies in OpenMC. If not provided, tallies will be applied over the entire domain corresponding to the [Mesh] block.

  • blocksThis parameter is deprecated, use 'block' instead!

    C++ Type:std::vector<SubdomainName>

    Controllable:No

    Description:This parameter is deprecated, use 'block' instead!

  • check_tally_sumFalseWhether to check consistency between the local tallies with a global tally sum. This will require that the integral of the local tally matches a tally with no filters (defined over the entire phase space).

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether to check consistency between the local tallies with a global tally sum. This will require that the integral of the local tally matches a tally with no filters (defined over the entire phase space).

  • estimatorType of tally estimator to use in OpenMC

    C++ Type:MooseEnum

    Options:collision, tracklength, analog

    Controllable:No

    Description:Type of tally estimator to use in OpenMC

  • filtersExternal filters to add to this tally.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:External filters to add to this tally.

  • mesh_templateMesh tally template for OpenMC when using mesh tallies; at present, this mesh must exactly match the mesh used in the [Mesh] block because a one-to-one copy is used to get OpenMC's tally results on the [Mesh].

    C++ Type:std::string

    Controllable:No

    Description:Mesh tally template for OpenMC when using mesh tallies; at present, this mesh must exactly match the mesh used in the [Mesh] block because a one-to-one copy is used to get OpenMC's tally results on the [Mesh].

  • mesh_translationCoordinate to which this mesh should be translated. Units must match those used to define the [Mesh].

    C++ Type:libMesh::Point

    Controllable:No

    Description:Coordinate to which this mesh should be translated. Units must match those used to define the [Mesh].

  • nameAuxiliary variable name(s) to use for OpenMC tallies. If not specified, defaults to the names of the scores

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Auxiliary variable name(s) to use for OpenMC tallies. If not specified, defaults to the names of the scores

  • normalize_by_global_tallyTrueWhether to normalize local tallies by a global tally (true) or else by the sum of the local tally (false)

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Whether to normalize local tallies by a global tally (true) or else by the sum of the local tally (false)

  • outputUNRELAXED field(s) to output from OpenMC for each tally score. unrelaxed_tally_std_dev will write the standard deviation of each tally into auxiliary variables named *_std_dev. unrelaxed_tally_rel_error will write the relative standard deviation (unrelaxed_tally_std_dev / unrelaxed_tally) of each tally into auxiliary variables named *_rel_error. unrelaxed_tally will write the raw unrelaxed tally into auxiliary variables named *_raw (replace * with 'name').

    C++ Type:MultiMooseEnum

    Options:unrelaxed_tally_std_dev, unrelaxed_tally_rel_error, unrelaxed_tally

    Controllable:No

    Description:UNRELAXED field(s) to output from OpenMC for each tally score. unrelaxed_tally_std_dev will write the standard deviation of each tally into auxiliary variables named *_std_dev. unrelaxed_tally_rel_error will write the relative standard deviation (unrelaxed_tally_std_dev / unrelaxed_tally) of each tally into auxiliary variables named *_rel_error. unrelaxed_tally will write the raw unrelaxed tally into auxiliary variables named *_raw (replace * with 'name').

  • scoreScore(s) to use in the OpenMC tallies. If not specified, defaults to 'kappa_fission'

    C++ Type:MultiMooseEnum

    Options:heating, heating_local, kappa_fission, fission_q_prompt, fission_q_recoverable, damage_energy, flux, H3_production, total, absorption, scatter, nu_scatter, fission, nu_fission, prompt_nu_fission, delayed_nu_fission, decay_rate, inverse_velocity

    Controllable:No

    Description:Score(s) to use in the OpenMC tallies. If not specified, defaults to 'kappa_fission'

  • triggerTrigger criterion to determine when OpenMC simulation is complete based on tallies. If multiple scores are specified in 'score, this same trigger is applied to all scores.

    C++ Type:MultiMooseEnum

    Options:rel_err, none

    Controllable:No

    Description:Trigger criterion to determine when OpenMC simulation is complete based on tallies. If multiple scores are specified in 'score, this same trigger is applied to all scores.

  • trigger_ignore_zeros0 Whether tally bins with zero scores are ignored when computing the tally trigger. If only one value of 'trigger_ignore_zeros' is provided, that value is applied to all tally scores.

    Default:0

    C++ Type:std::vector<bool>

    Controllable:No

    Description:Whether tally bins with zero scores are ignored when computing the tally trigger. If only one value of 'trigger_ignore_zeros' is provided, that value is applied to all tally scores.

  • trigger_thresholdThreshold for the tally trigger

    C++ Type:std::vector<double>

    Unit:(no unit assumed)

    Range:trigger_threshold > 0

    Controllable:No

    Description:Threshold for the tally trigger

Optional Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Set the enabled status of the MooseObject.

Advanced Parameters

Input Files