|
Cardinal
|
#include <CellTally.h>
Public Member Functions | |
| CellTally (const InputParameters ¶meters) | |
| virtual std::pair< unsigned int, openmc::Filter * > | spatialFilter () override |
| virtual void | initializeTally () |
| virtual void | resetTally () |
| Real | storeResults (const std::vector< unsigned int > &var_numbers, unsigned int local_score, const std::string &output_type) |
| void | addScore (const std::string &score) |
| void | setRelaxation (relaxation::RelaxationEnum relaxation_type, const Real &relaxation_factor) |
| void | computeSumAndMean () |
| virtual void | gatherLinkedSum () |
| virtual void | renormalizeLinkedTallies () |
| void | relaxAndNormalizeTally () |
| void | addLinkedTally (const TallyBase *other) |
| const openmc::Tally * | getWrappedTally () const |
| const openmc::Tally * | getWrappedGlobalTally () const |
| int32_t | getTallyID () const |
| int32_t | getGlobalTallyID () const |
| const std::vector< std::string > & | getScores () const |
| int | scoreIndex (const std::string &score) const |
| const std::vector< std::string > & | getAuxVarNames () const |
| const std::vector< std::string > & | getOutputs () const |
| openmc::TallyEstimator | getTallyEstimator () const |
| const Real & | getMean (unsigned int local_score) const |
| const Real & | getSum (unsigned int local_score) const |
| std::vector< std::string > | getScoreVars (const std::string &score) const |
| bool | extBinSkipped (unsigned int ext_bin) const |
| bool | hasTrigger () const |
| bool | hasOutputs () const |
| bool | hasScore (const std::string &score) const |
| bool | renamesTallyVars () const |
| unsigned int | numExtFilterBins () const |
| const std::set< SubdomainID > & | getBlocks () const |
| virtual bool | addingGlobalTally () const |
| const std::vector< const TallyBase * > & | linkedTallies () const |
Static Public Member Functions | |
| static InputParameters | validParams () |
Protected Member Functions | |
| virtual Real | storeResultsInner (const std::vector< unsigned int > &var_numbers, unsigned int local_score, const std::vector< OMCTensor > &tally_vals, bool norm_by_src_rate=true) override |
| void | checkCellMappedSubdomains () |
| std::vector< OpenMCCellAverageProblem::cellInfo > | getTallyCells () const |
| void | fillElementalAuxVariable (const unsigned int &var_num, const std::vector< unsigned int > &elem_ids, const Real &value) |
| void | applyTriggersToLocalTally (openmc::Tally *tally) |
| Real | tallyNormalization (unsigned int score) const |
| void | checkTallySum (const unsigned int &score) const |
| void | checkNormalization (const Real &sum, unsigned int score) const |
Protected Attributes | |
| std::map< OpenMCCellAverageProblem::cellInfo, bool > | _cell_has_tally |
| Whether a cell index, instance pair should be added to the tally filter. More... | |
| openmc::CellInstanceFilter * | _cell_filter |
| OpenMC mesh filter for this unstructured mesh tally. More... | |
| const bool & | _check_equal_mapped_tally_volumes |
| const Real & | _equal_tally_volume_abs_tol |
| Absolute tolerance for checking equal tally mapped volumes. More... | |
| OpenMCCellAverageProblem & | _openmc_problem |
| The OpenMCCellAverageProblem using the tally system. More... | |
| MooseMesh & | _mesh |
| The MooseMesh. More... | |
| AuxiliarySystem & | _aux |
| The aux system. More... | |
| std::vector< std::shared_ptr< FilterBase > > | _ext_filters |
| The external filters added in the [Problem/Filters] block. More... | |
| openmc::TallyEstimator | _estimator |
| The OpenMC estimator to use with this tally. More... | |
| std::vector< std::string > | _tally_score |
| OpenMC tally score(s) to use with this tally. More... | |
| std::vector< std::string > | _tally_name |
| Auxiliary variable name(s) for this tally. More... | |
| openmc::Tally * | _local_tally = nullptr |
| The OpenMC tally object this class wraps. More... | |
| unsigned int | _local_tally_index |
| The index of the OpenMC tally this object wraps. More... | |
| openmc::Tally * | _global_tally = nullptr |
| unsigned int | _global_tally_index |
| The index of the global OpenMC tally this object wraps. More... | |
| unsigned int | _filter_index |
| The index of the first filter added by this tally. More... | |
| unsigned int | _num_ext_filter_bins = 1 |
| The number of non-spatial bins in this tally. More... | |
| std::vector< Real > | _local_sum_tally |
| Sum value of this tally across all bins. Indexed by score. More... | |
| std::vector< Real > | _global_sum_tally |
| std::vector< Real > | _local_mean_tally |
| std::vector< Real > | _linked_local_sum_tally |
| Linked sum value across all bins. Indexed by score. More... | |
| const MultiMooseEnum * | _tally_trigger |
| std::vector< Real > | _tally_trigger_threshold |
| std::vector< bool > | _trigger_ignore_zeros |
| std::vector< OMCTensor > | _current_tally |
| std::vector< OMCTensor > | _previous_tally |
| Previous fixed point iteration tally result (after relaxation) More... | |
| std::vector< OMCTensor > | _current_raw_tally |
| Current "raw" tally output from Monte Carlo solution. More... | |
| std::vector< OMCTensor > | _current_raw_tally_rel_error |
| Current "raw" tally relative error. More... | |
| std::vector< OMCTensor > | _current_raw_tally_std_dev |
| Current "raw" tally standard deviation. More... | |
| const bool | _normalize_by_global |
| const bool | _check_tally_sum |
| const bool | _needs_global_tally |
| const bool | _renames_tally_vars |
| Whether this tally stores results in variables names something other than '_tally_score'. More... | |
| const bool | _has_outputs |
| Whether this tally has additional outputs or not. More... | |
| std::vector< std::string > | _output_name |
| Suffixes to apply to 'tally_name' in order to name the fields in the 'output'. More... | |
| const bool | _is_adaptive |
| Whether the problem uses adaptive mesh refinement or not. More... | |
| std::vector< bool > | _ext_bins_to_skip |
| External filter bins to skip while computing the tally sum and mean for normalization. More... | |
| std::set< SubdomainID > | _tally_blocks |
| Blocks for which to add tallies. More... | |
| std::vector< const TallyBase * > | _linked_tallies |
| Other tallies linked for normalization. More... | |
| relaxation::RelaxationEnum | _relaxation_type |
| The type of relaxation this tally should employ. More... | |
| Real | _relaxation_factor |
| The relaxation factor this tally should use (for constant relaxation). More... | |
Static Protected Attributes | |
| static constexpr Real | ZERO_TALLY_THRESHOLD = 1e-12 |
| Tolerance for setting zero tally. More... | |
| CellTally::CellTally | ( | const InputParameters & | parameters | ) |
|
inlinevirtualinherited |
Whether this tally requires a global tally or not.
Reimplemented in MeshTally.
|
inherited |
Add a linked tally for normalization.
| [in] | tally | the other tally to link for normalization |
|
inherited |
Add a score to this tally.
| [in] | score | score to add |
|
protectedinherited |
Applies triggers to a tally. This is often the local tally wrapped by this object.
| [in] | tally | the tally to apply triggers to |
|
protected |
Loop over all the OpenMC cells and determine if a cell maps to more than one subdomain that also has different tally settings (i.e. we would not know whether to add or not to add tallies to the cell).
|
protectedinherited |
Check that the tally normalization gives a total tally sum of 1.0 (when normalized against the total tally value).
| [in] | sum | sum of the tally |
| [in] | score | tally score |
|
protectedinherited |
Check the sum of the tallies against the global tally
| [in] | score | tally score |
|
inherited |
A function which computes and stores the sum and mean of the tally across all bins for a particular score.
|
inlineinherited |
Check to see if the given external filter bin is skipped during normalization.
| [in] | ext_bin | the external filter bin |
|
protectedinherited |
Set an auxiliary elemental variable to a specified value
| [in] | var_num | variable number |
| [in] | elem_ids | element IDs to set |
| [in] | value | value to set |
|
virtualinherited |
A function which gathers the sums and means from all tallies linked to this tally.
Reimplemented in MeshTally.
|
inlineinherited |
Gets the auxvariable names for use in creating and storing tally results. This allows for the splitting of tally results into energy bins, angular bins, etc.
|
inlineinherited |
A function to get the blocks associated with this CellTally.
|
inherited |
Get the global ID of the tally this object wraps.
|
inlineinherited |
Get the mean for a score summed over all bins.
| [in] | local_score | the index representing a tally score |
|
inlineinherited |
Gets the output names to append to the end of the '_tally_name' when adding tally auxvariables for additional outputs.
|
inlineinherited |
Get the list of scores this tally uses.
|
inherited |
Get a vector of variable names corresponding to the provided score.
| [in] | score | the score that the user wishes to fetch variable names from |
|
inlineinherited |
Get the sum for a score summed over all bins.
| [in] | local_score | the index representing a tally score |
|
protected |
Loop over all the OpenMC cells and find those for which we should add tallies.
|
inlineinherited |
Get the estimator used in this tally.
|
inherited |
Get the ID of the tally this object wraps.
|
inherited |
Get the global OpenMC tally that this object wraps.
|
inherited |
Get the local OpenMC tally that this object wraps.
|
inlineinherited |
Check to see if this tally adds additional output variables or not.
|
inlineinherited |
Check to see if this tally contains a specific score.
| [in] | score | the score to check |
|
inlineinherited |
Check to see if this tally uses a trigger or not.
|
virtualinherited |
A function to initialize the tally object. Override with care.
|
inlineinherited |
Get the vector of tallies linked to this tally object for normalization
|
inlineinherited |
Get the total number of external filter bins applied to this tally.
|
inherited |
Relax the tally and normalize it according to some normalization factor 'norm'. This tends to either be the sum of the over all bins OR a global tally over the entire problem.
NOTE: This function relaxes the tally distribution, and not the actual magnitude of the sum. That is, we relax the shape distribution and then multiply it by the power (for k-eigenvalue) or source strength (for fixed source) of the current step before applying it to MOOSE. If the magnitude of the power or source strength is constant in time, there is zero error in this. But if the magnitude of the tally varies in time, we are basically relaxing the distribution of the tally, but then multiplying it by the current mean tally magnitude.
There will be very small errors in these approximations unless the power/source strength change dramatically with iteration. But because relaxation is itself a numerical approximation, this is still inconsequential at the end of the day as long as your problem has converged the relaxed tally to the raw (unrelaxed) tally.
|
inlineinherited |
Check to see if the user has requested special names for the tallies.
|
virtualinherited |
A function which renormalizes this tally based on the gathered sum from linked tallies.
|
virtualinherited |
A function to reset the tally object. Override with care.
Reimplemented in MeshTally.
|
inherited |
Get the index corresponding to a specific score.
| [in] | score | the score |
|
inherited |
A function which sets the relaxation type and factor for a tally.
| [in] | relaxation_type | the type of relaxation to use |
| [in] | factor | the relaxation factor to use (for constant relxation or no relaxation) |
|
overridevirtual |
A function to generate the cell filter needed by this object.
Implements TallyBase.
|
inherited |
A function which stores the results of this tally into the created auxvariables. This calls storeResultsInner.
| [in] | var_numbers | variables which the tally will store results in |
| [in] | local_score | index into the tally's local array of scores which represents the current score being stored |
| [in] | output_type | the output type |
|
overrideprotectedvirtual |
A function which stores the results of this tally into the created auxvariables. This implements the distributed cell tally -> MOOSE mesh mapping.
| [in] | var_numbers | variables which the tally will store results in |
| [in] | local_score | index into the tally's local array of scores which represents the current score being stored |
| [in] | tally_vals | the tally values to store |
| [in] | norm_by_src_rate | whether or not tally_vals should be normalized by the source rate |
Implements TallyBase.
|
protectedinherited |
Factor by which to normalize a tally
| [in] | score | index for the tally score |
|
static |
|
protectedinherited |
The aux system.
|
protected |
OpenMC mesh filter for this unstructured mesh tally.
|
protected |
Whether a cell index, instance pair should be added to the tally filter.
|
protected |
Whether to check that the [Mesh] volume each cell tally maps to is identical. This is a useful helper function for OpenMC models where each cell tally has the same volume (often the case for many reactor geometries). If the OpenMC model cell tallies all are of the same spatial size, it's still possible that they can map to different volumes in the MOOSE mesh if the MOOSE elements don't line up with the edges of the OpenMC cells. Different volumes then can distort the volume normalization that we do to convert the fission power to a volumetric power (in a perfect world, we would actually divide OpenMC's tallies by the results of a stochastic volume calculation in OpenMC, but that is too expensive).
|
protectedinherited |
Whether to check the tallies against the global tally; if set to true, and the tallies added for the 'tally_blocks' do not sum to the global tally, an error is thrown. If you are only performing multiphysics feedback for, say, a single assembly in a full-core OpenMC model, you must set this check to false, because there are known fission sources outside the domain of interest.
If not specified, then this is set to 'true' if normalizing by a global tally, and to 'false' if normalizing by the local tally (because when we choose to normalize by the local tally, we're probably using mesh tallies). But you can of course still set a value for this parameter to override the default.
|
protectedinherited |
Current "raw" tally output from Monte Carlo solution.
|
protectedinherited |
Current "raw" tally relative error.
|
protectedinherited |
Current "raw" tally standard deviation.
|
protectedinherited |
Current fixed point iteration tally result; for instance, when using constant relaxation, the tally is updated as: q(n+1) = (1-a) * q(n) + a * PHI(q(n), s) where q(n+1) is _current_tally, a is the relaxation factor, q(n) is _previous_tally, and PHI is the most-recently-computed tally result (the _current_raw_tally).
|
protected |
Absolute tolerance for checking equal tally mapped volumes.
|
protectedinherited |
The OpenMC estimator to use with this tally.
|
protectedinherited |
External filter bins to skip while computing the tally sum and mean for normalization.
|
protectedinherited |
The external filters added in the [Problem/Filters] block.
|
protectedinherited |
The index of the first filter added by this tally.
|
protectedinherited |
Sum value of the global tally associated with this tally object. Each entry in _global_sum_tally corresponds to a score in _tally_score. As an example, _global_sum_tally[0] corresponds to the score located at _tally_score[0].
|
protectedinherited |
The global OpenMC tally object this class wraps. Used for global normalization and error-checking of the sum of local tally results over all bins.
|
protectedinherited |
The index of the global OpenMC tally this object wraps.
|
protectedinherited |
Whether this tally has additional outputs or not.
|
protectedinherited |
Whether the problem uses adaptive mesh refinement or not.
|
protectedinherited |
Linked sum value across all bins. Indexed by score.
|
protectedinherited |
Other tallies linked for normalization.
|
protectedinherited |
Mean value of this tally across all bins; only used for fixed source mode. Each entry in _local_mean_tally corresponds to a score in _tally_score. As an example, _local_mean_tally[0] corresponds to the score located at _tally_score[0].
|
protectedinherited |
Sum value of this tally across all bins. Indexed by score.
|
protectedinherited |
The OpenMC tally object this class wraps.
|
protectedinherited |
The index of the OpenMC tally this object wraps.
|
protectedinherited |
The MooseMesh.
|
protectedinherited |
Whether a global tally is required for the sake of normalization and/or checking the tally sum
|
protectedinherited |
How to normalize the OpenMC tally into units of W/volume. If 'true', normalization is performed by dividing each local tally against a problem-global tally. The advantage of this approach is that some non-zero tally regions of the OpenMC domain can be excluded from multiphysics feedback (without us having to guess what the power of the included part of the domain is). This can let us do "zooming" type calculations, where perhaps we only want to send T/H feedback to one bundle in a full core.
If 'false', normalization is performed by dividing each local tally by the sum of the local tally itself. The advantage of this approach becomes evident when using mesh tallies. If a mesh tally does not perfectly align with an OpenMC cell - for instance, a first-order sphere mesh will not perfectly match the volume of a TRISO pebble - then not all of the power actually produced in the pebble is tallies on the mesh approximation to that pebble. Therefore, if you set a core power of 1 MW and you normalized based on a global tally, you'd always miss some of that power when sending to MOOSE. So, in this case, it is better to normalize against the local tally itself so that the correct power is preserved.
|
protectedinherited |
The number of non-spatial bins in this tally.
|
protectedinherited |
The OpenMCCellAverageProblem using the tally system.
|
protectedinherited |
Suffixes to apply to 'tally_name' in order to name the fields in the 'output'.
|
protectedinherited |
Previous fixed point iteration tally result (after relaxation)
|
protectedinherited |
The relaxation factor this tally should use (for constant relaxation).
|
protectedinherited |
The type of relaxation this tally should employ.
|
protectedinherited |
Whether this tally stores results in variables names something other than '_tally_score'.
|
protectedinherited |
Blocks for which to add tallies.
|
protectedinherited |
Auxiliary variable name(s) for this tally.
|
protectedinherited |
OpenMC tally score(s) to use with this tally.
|
protectedinherited |
Type of trigger to apply to OpenMC tallies to indicate when the simulation is complete. These can be used to on-the-fly adjust the number of active batches in order to reach some desired criteria (which is specified by this parameter).
|
protectedinherited |
Thresholds to use for accepting this tally when using triggers. Indexed by score.
|
protectedinherited |
Whether tally bins for certain scores should ignore bins with zeros when computing trigger metrics. Indexed by the tally score.
|
staticprotectedinherited |
Tolerance for setting zero tally.
1.8.16