Cardinal
|
Tally/filter includes. More...
#include <OpenMCCellAverageProblem.h>
Public Types | |
typedef std::unordered_map< int32_t, std::vector< int32_t > > | containedCells |
typedef std::pair< int32_t, int32_t > | cellInfo |
Public Member Functions | |
OpenMCCellAverageProblem (const InputParameters ¶ms) | |
virtual void | initialSetup () override |
virtual void | externalSolve () override |
virtual void | syncSolutions (ExternalProblem::Direction direction) override |
virtual bool | converged (unsigned int) override |
void | read2DBlockParameters (const std::string name, std::vector< std::vector< SubdomainName >> &names, std::vector< SubdomainID > &flattened_ids) |
void | checkBlocksInMesh (const std::string name, const std::vector< SubdomainID > &ids, const std::vector< SubdomainName > &names) const |
void | setupProblem () |
Initialize the mapping of OpenMC to the MooseMesh and perform additional setup actions. More... | |
virtual void | addExternalVariables () override |
virtual Real | cellVolume (const cellInfo &cell_info) const |
virtual const OpenMCVolumeCalculation * | volumeCalculation () const |
virtual const std::map< cellInfo, std::vector< unsigned int > > & | cellToElem () const |
virtual std::unordered_set< SubdomainID > | getCellToElementSub (const cellInfo &info) |
virtual bool | hasPointTransformations () const |
virtual const std::vector< std::string > & | getTallyScores () const |
virtual Point | transformPoint (const Point &pt) const |
virtual void | createQRules (QuadratureType type, Order order, Order volume_order, Order face_order, SubdomainID block, bool allow_negative_weights=true) override |
int32_t | elemToCellIndex (const int &elem_id) const |
int32_t | elemToCellID (const int &elem_id) const |
int32_t | elemToCellInstance (const int &elem_id) const |
cellInfo | elemToCellInfo (const int &elem_id) const |
int32_t | cellToMaterialIndex (const cellInfo &cell_info) |
coupling::CouplingFields | cellFeedback (const cellInfo &cell_info) const |
bool | hasDensityFeedback (const cellInfo &cell_info) const |
bool | hasTemperatureFeedback (const cellInfo &cell_info) const |
bool | hasFilter (const std::string &filter_name) const |
std::shared_ptr< FilterBase > & | getFilter (const std::string &filter_name) |
const std::vector< std::shared_ptr< TallyBase > > & | getLocalTally () const |
double | cellTemperature (const cellInfo &cell_info) const |
double | cellMappedVolume (const cellInfo &cell_info) const |
void | reloadDAGMC () |
Reconstruct the DAGMC geometry after skinning. More... | |
void | addFilter (const std::string &type, const std::string &name, InputParameters &moose_object_pars) |
void | addTally (const std::string &type, const std::string &name, InputParameters &moose_object_pars) |
Real | tallyMultiplier (unsigned int global_score) const |
template<typename T > | |
void | checkEmptyVector (const std::vector< T > &vector, const std::string &name) const |
int | fixedPointIteration () const |
std::string | subdomainName (const SubdomainID &id) const |
void | catchOpenMCError (const int &err, const std::string descriptor) const |
bool | isReactionRateScore (const std::string &score) const |
bool | isHeatingScore (const std::string &score) const |
unsigned int | addExternalVariable (const std::string &name, const std::vector< SubdomainName > *block=nullptr) |
const Real & | scaling () const |
bool | hasScaling () const |
std::string | enumToTallyScore (const std::string &score) const |
std::string | tallyScoreToEnum (const std::string &score) const |
virtual void | geometryType (bool &has_csg_universe, bool &has_dag_universe) const |
bool | firstSolve () const |
Whether this is the first time OpenMC is running. More... | |
openmc::TriggerMetric | triggerMetric (trigger::TallyTriggerTypeEnum trigger) const |
openmc::TriggerMetric | triggerMetric (std::string trigger) const |
openmc::TallyEstimator | tallyEstimator (tally::TallyEstimatorEnum estimator) const |
std::string | estimatorToString (openmc::TallyEstimator estimator) const |
void | importProperties () const |
Import temperature and density from a properties.h5 file. More... | |
xt::xtensor< double, 1 > | tallySum (openmc::Tally *tally, const unsigned int &score) const |
Compute the sum of a tally within each bin. More... | |
double | tallySumAcrossBins (std::vector< openmc::Tally * > tally, const unsigned int &score) const |
double | tallyMeanAcrossBins (std::vector< openmc::Tally * > tally, const unsigned int &score) const |
bool | cellIsVoid (const cellInfo &cell_info) const |
bool | cellHasZeroInstances (const cellInfo &cell_info) const |
std::string | materialName (const int32_t index) const |
xt::xtensor< double, 1 > | relativeError (const xt::xtensor< double, 1 > &sum, const xt::xtensor< double, 1 > &sum_sq, const int &n_realizations) const |
const Real & | densityConversionFactor () const |
int | nParticles () const |
int | nTotalParticles () const |
int32_t | cellID (const int32_t index) const |
int32_t | materialID (const int32_t index) const |
std::string | printPoint (const Point &p) const |
std::string | printMaterial (const int32_t &index) const |
void | writeSourceBank (const std::string &filename) |
unsigned int | numElemsInSubdomain (const SubdomainID &id) const |
bool | isLocalElem (const Elem *elem) const |
unsigned int | globalElemID (const unsigned int &id) const |
virtual void | setCellTemperature (const int32_t &id, const int32_t &instance, const Real &T, const cellInfo &cell_info) const |
virtual void | setCellDensity (const Real &density, const cellInfo &cell_info) const |
virtual std::string | printCell (const cellInfo &cell_info, const bool brief=false) const |
virtual std::vector< int32_t > | cellFill (const cellInfo &cell_info, int &fill_type) const |
bool | materialFill (const cellInfo &cell_info, int32_t &material_index) const |
long unsigned int | numCells () const |
template<typename T > | |
void | checkDuplicateEntries (const std::vector< T > &var, const std::string &name) const |
void | checkDuplicateVariableName (const std::string &name) const |
bool | stringHasEnding (std::string const &full, std::string const &ending) const |
Static Public Member Functions | |
static InputParameters | validParams () |
Static Public Attributes | |
static constexpr int32_t | UNMAPPED {-1} |
Constant flag to indicate that a cell/element was unmapped. More... | |
static constexpr int | DIMENSION {3} |
Spatial dimension of the Monte Carlo problem. More... | |
Protected Member Functions | |
unsigned int | getCellLevel (const Point &c) const |
void | readBlockVariables (const std::string ¶m, const std::string &default_name, std::map< std::string, std::vector< SubdomainName >> &vars_to_specified_blocks, std::vector< SubdomainID > &specified_blocks) |
bool | cellHasIdenticalFill (const cellInfo &cell_info) const |
containedCells | shiftCellInstances (const cellInfo &cell_info) const |
bool | cellMapsToSubdomain (const cellInfo &cell_info, const std::unordered_set< SubdomainID > &id) const |
cellInfo | firstContainedMaterialCell (const cellInfo &cell_info) const |
containedCells | containedMaterialCells (const cellInfo &cell_info) const |
virtual void | updateMaterials () |
std::vector< std::string > | getMaterialInEachSubdomain () const |
Point | transformPointToOpenMC (const Point &pt) const |
void | checkNormalization (const Real &sum, unsigned int global_score) const |
void | printTrisoHelp (const std::chrono::time_point< std::chrono::high_resolution_clock > &start) const |
void | printAuxVariableIO () |
std::vector< int32_t > | materialsInCells (const containedCells &contained_cells) const |
void | subdomainsToMaterials () |
Loop over the mapped cells, and build a map between subdomains to OpenMC materials. More... | |
std::set< SubdomainID > | coupledSubdomains () const |
template<typename T > | |
void | gatherCellSum (std::vector< T > &local, std::map< cellInfo, T > &global) const |
template<typename T > | |
void | gatherCellVector (std::vector< T > &local, std::vector< unsigned int > &n_local, std::map< cellInfo, std::vector< T >> &global) |
coupling::CouplingFields | elemFeedback (const Elem *elem) const |
void | getTallyTriggerParameters (const InputParameters ¶ms) |
void | readBlockParameters (const std::string name, std::unordered_set< SubdomainID > &blocks) |
void | cacheContainedCells () |
void | setContainedCells (const cellInfo &cell_info, const Point &hint, std::map< cellInfo, containedCells > &map) |
void | checkContainedCellsStructure (const cellInfo &cell_info, containedCells &reference, containedCells &compare) const |
void | setMinimumVolumeQRules (Order &volume_order, const std::string &type) |
std::string | printNewline () const |
For keeping the output neat when using verbose. More... | |
void | storeElementPhase () |
Loop over the elements in the MOOSE mesh and store the type of feedback applied by each. More... | |
void | relaxAndNormalizeTally (unsigned int global_score, unsigned int local_score, std::shared_ptr< TallyBase > local_tally) |
void | getCellMappedPhase () |
void | checkCellMappedPhase () |
This function is used to ensure that each OpenMC cell only maps to a single phase. More... | |
void | getCellMappedSubdomains () |
Loop over all the OpenMC cells and get the element subdomain IDs that map to each cell. More... | |
void | computeCellMappedVolumes () |
void | initializeElementToCellMapping () |
Set up the mapping from MOOSE elements to OpenMC cells. More... | |
void | mapElemsToCells () |
Populate maps of MOOSE elements to OpenMC cells. More... | |
void | validateLocalTallies () |
void | initializeTallies () |
Add OpenMC tallies to facilitate the coupling. More... | |
void | resetTallies () |
void | getMaterialFills () |
Find the material filling each cell which receives density feedback. More... | |
void | getPointInCell () |
std::map< cellInfo, Real > | computeVolumeWeightedCellInput (const std::map< SubdomainID, std::pair< unsigned int, std::string >> &var_num, const std::vector< coupling::CouplingFields > *phase) const |
void | sendTemperatureToOpenMC () const |
void | sendDensityToOpenMC () const |
Real | tallyNormalization (unsigned int global_score) const |
void | checkTallySum (const unsigned int &score) const |
void | latticeOuterCheck (const Point &c, int level) const |
void | latticeOuterError (const Point &c, int level) const |
bool | findCell (const Point &point) |
void | compareContainedCells (std::map< cellInfo, containedCells > &reference, std::map< cellInfo, containedCells > &compare) const |
void | getOpenMCUserObjects () |
Find all userobjects which are changing OpenMC data structures. More... | |
void | sendNuclideDensitiesToOpenMC () |
Set the nuclide densities for any materials being modified via MOOSE. More... | |
void | sendTallyNuclidesToOpenMC () |
Set the tally nuclides for any tallies being modified via MOOSE. More... | |
void | fillElementalAuxVariable (const unsigned int &var_num, const std::vector< unsigned int > &elem_ids, const Real &value) |
std::string | sourceBankFileName () const |
Protected Attributes | |
std::unique_ptr< NumericVector< Number > > | _serialized_solution |
const bool & | _output_cell_mapping |
const coupling::OpenMCInitialCondition | _initial_condition |
const relaxation::RelaxationEnum | _relaxation |
Type of relaxation to apply to the OpenMC tallies. More... | |
const trigger::TallyTriggerTypeEnum | _k_trigger |
unsigned int | _cell_level |
const bool & | _export_properties |
const bool | _normalize_by_global |
const bool | _need_to_reinit_coupling |
const bool | _check_tally_sum |
const Real & | _relaxation_factor |
Constant relaxation factor. More... | |
const bool | _has_identical_cell_fills |
const bool & | _check_identical_cell_fills |
const bool & | _assume_separate_tallies |
bool | _map_density_by_cell |
const bool | _specified_density_feedback |
const bool | _specified_temperature_feedback |
bool | _has_cell_tallies = false |
Whether any cell tallies exist. More... | |
bool | _needs_to_map_cells |
Whether any spatial mapping from OpenMC's cells to the mesh is needed. More... | |
const bool | _needs_global_tally |
std::map< std::string, std::shared_ptr< FilterBase > > | _filters |
std::vector< std::shared_ptr< TallyBase > > | _local_tallies |
A vector of the tally objects created by the [Problem/Tallies] block. More... | |
std::vector< std::string > | _all_tally_scores |
A list of all of the scores contained by the local tallies added in the [Tallies] block. More... | |
std::vector< std::map< std::string, int > > | _local_tally_score_map |
std::vector< std::vector< unsigned int > > | _tally_var_ids |
A vector of auxvariable ids added by the [Tallies] block. More... | |
std::vector< std::vector< std::vector< unsigned int > > > | _tally_ext_var_ids |
A vector of external (output-based) auxvariable ids added by the [Tallies] block. More... | |
std::vector< SubdomainID > | _density_blocks |
Blocks in MOOSE mesh that provide density feedback. More... | |
std::vector< SubdomainID > | _temp_blocks |
Blocks in MOOSE mesh that provide temperature feedback. More... | |
std::unordered_set< SubdomainID > | _identical_cell_fill_blocks |
Blocks for which the cell fills are identical. More... | |
std::vector< cellInfo > | _elem_to_cell {} |
Mapping of MOOSE elements to the OpenMC cell they map to (if any) More... | |
std::map< cellInfo, coupling::CouplingFields > | _cell_phase |
Phase of each cell. More... | |
int | _n_moose_density_elems |
Number of elements in the MOOSE mesh that exclusively provide density feedback. More... | |
int | _n_moose_temp_elems |
Number of elements in the MOOSE mesh that exclusively provide temperature feedback. More... | |
int | _n_moose_temp_density_elems |
Number of elements in the MOOSE mesh which provide temperature+density feedback. More... | |
int | _n_moose_none_elems |
Number of no-coupling elements in the MOOSE mesh. More... | |
int | _n_mapped_temp_elems |
int | _n_mapped_density_elems |
int | _n_mapped_temp_density_elems |
int | _n_mapped_none_elems |
Number of no-coupling elements mapped to OpenMC cells. More... | |
Real | _uncoupled_volume |
Total volume of uncoupled MOOSE mesh elements. More... | |
bool | _material_cells_only {true} |
Whether non-material cells are mapped. More... | |
std::map< cellInfo, std::vector< unsigned int > > | _cell_to_elem |
Mapping of OpenMC cell indices to a vector of MOOSE element IDs. More... | |
std::map< cellInfo, std::vector< unsigned int > > | _local_cell_to_elem |
Mapping of OpenMC cell indices to a vector of MOOSE element IDs, on each local rank. More... | |
std::map< cellInfo, std::unordered_set< SubdomainID > > | _cell_to_elem_subdomain |
Mapping of OpenMC cell indices to the subdomain IDs each maps to. More... | |
std::map< SubdomainID, std::set< int32_t > > | _subdomain_to_material |
Mapping of elem subdomains to materials. More... | |
std::map< cellInfo, Point > | _cell_to_point |
std::map< cellInfo, Real > | _cell_to_elem_volume |
std::map< cellInfo, Real > | _cell_volume |
std::map< cellInfo, int32_t > | _cell_to_material |
std::map< cellInfo, containedCells > | _cell_to_contained_material_cells |
std::map< cellInfo, int32_t > | _cell_to_n_contained |
Number of material-type cells contained within a cell. More... | |
std::vector< openmc::Tally * > | _global_tallies |
std::vector< std::vector< std::string > > | _global_tally_scores |
Global tally scores corresponding to '_global_tallies'. More... | |
std::vector< openmc::TallyEstimator > | _global_tally_estimators |
Global tally estimators corresponding to '_global_tallies'. More... | |
std::vector< Real > | _global_sum_tally |
Sum value of the global tally(s), across all bins. More... | |
std::vector< Real > | _local_sum_tally |
Sum value of the local tally(s), across all bins. More... | |
std::vector< Real > | _local_mean_tally |
Mean value of the local tally(s), across all bins; only used for fixed source mode. More... | |
openmc::Particle | _particle |
Dummy particle to reduce number of allocations of particles for cell lookup routines. More... | |
unsigned int | _n_particles_1 |
Number of particles simulated in the first iteration. More... | |
std::map< std::string, std::vector< SubdomainName > > | _temp_vars_to_blocks |
Mapping from temperature variable name to the subdomains on which to read it from. More... | |
std::map< std::string, std::vector< SubdomainName > > | _density_vars_to_blocks |
Mapping from density variable name to the subdomains on which to read it from. More... | |
OpenMCVolumeCalculation * | _volume_calc |
Optional volume calculation for cells which map to MOOSE. More... | |
const SymmetryPointGenerator * | _symmetry |
Userobject that maps from a partial-symmetry OpenMC model to a whole-domain [Mesh]. More... | |
std::map< cellInfo, int > | _n_temp |
Number of temperature-only feedback elements in each mapped OpenMC cell (global) More... | |
std::map< cellInfo, int > | _n_rho |
Number of density-only feedback elements in each mapped OpenMC cell (global) More... | |
std::map< cellInfo, int > | _n_temp_rho |
Number of temperature+density feedback elements in each mapped OpenMC cell (global) More... | |
std::map< cellInfo, int > | _n_none |
Number of none elements in each mapped OpenMC cell (global) More... | |
unsigned int | _global_tally_index = 0 |
Index in OpenMC tallies corresponding to the first global tally added by Cardinal. More... | |
unsigned int | _source_rate_index |
Index in tally_score pointing to the score used for normalizing flux tallies in eigenvalue mode. More... | |
long unsigned int | _n_openmc_cells |
Total number of unique OpenMC cell IDs + instances combinations. More... | |
int32_t | _dagmc_universe_index |
Index in the OpenMC universes corresponding to the DAGMC universe. More... | |
const bool & | _verbose |
Whether to print diagnostic information about model setup and the transfers. More... | |
const Real * | _power |
Power by which to normalize the OpenMC results, for k-eigenvalue mode. More... | |
const Real * | _source_strength |
Source strength by which to normalize the OpenMC results, for fixed source mode. More... | |
bool | _reuse_source |
const bool | _specified_scaling |
Whether a mesh scaling was specified by the user. More... | |
const Real & | _scaling |
const bool & | _skip_statepoint |
Whether to skip writing statepoints from OpenMC. More... | |
int | _fixed_point_iteration |
unsigned int | _total_n_particles |
Total number of particles simulated. More... | |
int | _n_cell_digits |
openmc::RunMode | _run_mode |
OpenMC run mode. More... | |
std::vector< OpenMCNuclideDensities * > | _nuclide_densities_uos |
Userobjects for changing OpenMC material compositions. More... | |
std::vector< OpenMCTallyNuclides * > | _tally_nuclides_uos |
Userobjects for changing OpenMC tally nuclides. More... | |
std::vector< unsigned int > | _local_to_global_elem |
Mapping from local element indices to global element indices for this rank. More... | |
Static Protected Attributes | |
static bool | _first_transfer |
Whether the present transfer is the first transfer. More... | |
static bool | _printed_initial |
Whether the diagnostic tables on initialization have already been printed. More... | |
static bool | _printed_triso_warning |
Whether a warning has already been printed about very long setup times (for TRISOs) More... | |
static constexpr Real | EV_TO_JOULE = 1.6022e-19 |
Conversion rate from eV to Joule. More... | |
static constexpr Real | ZERO_TALLY_THRESHOLD = 1e-12 |
Tolerance for setting zero tally. More... | |
static constexpr Real | _density_conversion_factor {0.001} |
Conversion unit to transfer between kg/m3 and g/cm3. More... | |
static constexpr int | MATERIAL_VOID {-1} |
ID used by OpenMC to indicate that a material fill is VOID. More... | |
Tally/filter includes.
Mapping of OpenMC to a collection of MOOSE elements, with temperature and/or density feedback. The mappind is established authomatically by looping over all the MOOSE elements and finding the OpenMC cell at each element's centroid.
All feedback into OpenMC is performed via element averages. The 'temperature_blocks' parameter is used to indicate which MOOSE blocks should provide temperature feedback, while the 'density_blocks' parameter is used to indicate which MOOSE blocks should provide density feedback. Tallies are automatically added to OpenMC using either cell or mesh tallies.
Each OpenMC cell shall not have ambiguous data transfers. That is, a cell should map to a set of elements that are ALL/NONE providing temperature feedback, ALL/NONE providing density feedback, ALL/NONE providing cell tallies, and ALL/NONE being uncoupled altogether.
TODO: If this is too restrictive in the future, we could implement some type of weighted averaging process. Also, if a cell maps to a phase and an unmapped region, perhaps we want to allow that.
Other considerations you should be aware of:
|
inherited |
Type definition for storing the relevant aspects of the OpenMC geometry; the first value is the cell index, while the second is the cell instance.
typedef std::unordered_map<int32_t, std::vector<int32_t> > OpenMCCellAverageProblem::containedCells |
Type definition for cells contained within a parent cell; the first value is the cell index, while the second is the set of cell instances
OpenMCCellAverageProblem::OpenMCCellAverageProblem | ( | const InputParameters & | params | ) |
|
inherited |
Add a constant monomial auxiliary variable
[in] | name | name of the variable |
[in] | block | optional subdomain names on which to restrict the variable |
|
overridevirtual |
Add the tally variable(s) (to receive OpenMC tally values), temperature variable(s) (to write into OpenMC cells), and density variable(s) (to write into OpenMC materials)
void OpenMCCellAverageProblem::addFilter | ( | const std::string & | type, |
const std::string & | name, | ||
InputParameters & | moose_object_pars | ||
) |
Add a Filter object using the filter system.
[in] | type | the new tally type |
[in] | name | the name of the new tally |
[in] | moose_object_pars | the input parameters of the new tally |
void OpenMCCellAverageProblem::addTally | ( | const std::string & | type, |
const std::string & | name, | ||
InputParameters & | moose_object_pars | ||
) |
Add a Tally object using the tally system.
[in] | type | the new tally type |
[in] | name | the name of the new tally |
[in] | moose_object_pars | the input parameters of the new tally |
|
protected |
Cache the material cells contained within each coupling cell; depending on user settings, this may attempt to take shortcuts by assuming each cell has the same fills
|
inherited |
Print a full error message when catching errors from OpenMC
[in] | err | OpenMC error code |
[in] | descriptor | descriptive message for error |
coupling::CouplingFields OpenMCCellAverageProblem::cellFeedback | ( | const cellInfo & | cell_info | ) | const |
Get the fields coupled for each cell; because we require that each cell maps to a consistent set, we simply look up the coupled fields of the first element that this cell maps to. Note that this function requires a valid instance, index pair for cellInfo - you cannot pass in an unmapped cell, i.e. (UNMAPPED, UNMAPPED)
[in] | cell_info | cell index, instance pair |
|
virtualinherited |
Get the fill of an OpenMC cell
[in] | cell_info | cell ID, instance |
[out] | fill_type | fill type of the cell, one of MATERIAL, UNIVERSE, or LATTICE |
|
protected |
Whether this cell has an identical fill
[in] | cell_info | cell index, instance pair |
|
inherited |
Whether this cell has zero instances
[in] | cell_info | cell info |
|
inherited |
Get the cell ID from the cell index
[in] | index | cell index |
|
inherited |
Whether a cell is filled with VOID (vacuum)
[in] | cell_info | cell ID, instance |
double OpenMCCellAverageProblem::cellMappedVolume | ( | const cellInfo & | cell_info | ) | const |
Get the volume that each OpenMC cell mapped to
[in] | cell_info | cell index, instance pair |
|
protected |
Whether this cell overlaps with ANY value in the given subdomain set
[in] | cell_info | cell index, instance pair |
[in] | id | subdomain IDs |
double OpenMCCellAverageProblem::cellTemperature | ( | const cellInfo & | cell_info | ) | const |
Get the temperature of a cell; for cells not filled with materials, this will return the temperature of the first material-type cell
[in] | cell_info | cell index, instance pair |
|
inlinevirtual |
Get the mapping of cells to MOOSE elements
|
inline |
Get the cell material index based on index, instance pair. Note that this function requires a valid instance, index pair for cellInfo - you cannot pass in an unmapped cell, i.e. (UNMAPPED, UNMAPPED)
[in] | cell_info | cell index, instance pair |
|
virtual |
Get the cell volume from a stochastic calculation
[in] | cell_info | cell index, instance pair |
void OpenMCCellAverageProblem::checkBlocksInMesh | ( | const std::string | name, |
const std::vector< SubdomainID > & | ids, | ||
const std::vector< SubdomainName > & | names | ||
) | const |
Check that the specified blocks are in the mesh
[in] | name | name for throwing an error |
[in] | ids | block IDs to check |
[in] | names | block subdomain names for throwing an error |
|
protected |
This function is used to ensure that each OpenMC cell only maps to a single phase.
|
protected |
Check that the structure of the contained material cells for two cell matches; i.e. this checks that the keys are the same and that the number of instances of each filling material cell match.
[in] | cell_info | cell index, instance pair |
[in] | reference | map we want to check against |
[in] | compare | map we want to check |
|
inlineinherited |
Check for duplicate entries in a 1-d vector
[in] | var | input vector |
[in] | name | string to use for printing error message |
|
inherited |
Check whether the user has already created a variable using one of the protected names that the wrapping is using.
[in] | name | variable name |
|
inline |
Check whether a vector extracted with getParam is empty
[in] | vector | vector |
[in] | name | name to use for printing error if empty |
|
protected |
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 |
|
protected |
Check the sum of the tallies against the global tally
[in] | score | tally score |
|
protected |
Checks that the contained material cells exactly match between a reference obtained by calling openmc::Cell::get_contained_cells for each cell and a shortcut approach that assumes all identical cells (which aren't simply just material fills) has exactly the same contained material cells.
[in] | reference | reference map to compare against |
[in] | compare | shortcut map to compare |
|
protected |
Loop over all the OpenMC cells and compute the volume of the MOOSE elements that each cell maps to
|
protected |
Compute the product of volume with a field across ranks and sum into a global map
[in] | var_num | variable to weight with volume, mapped by subdomain ID |
[in] | phase | phases to compute the operation for |
|
protected |
Get all of the material cells contained within this cell
[in] | cell_info | cell index, instance pair |
|
inlineoverridevirtual |
|
protected |
Get a set of all subdomains that have at least 1 element coupled to an OpenMC cell
|
overridevirtual |
This class uses elem->volume() in order to normalize the tally values. However, elem->volume() is expensive, so whenever MOOSE does integration, they set _current_elem_volume to the volume as set by the sum of the quadrature weights. The quadrature rule that MOOSE provides when you only have CONSTANT MONOMIALS is insufficient for exactly integrating the element Jacobian mapping type (which is FIRST LAGRANGE for a first order element), so you get an error relative to the libmesh volume computation.
So, we need to make sure that a minimum order quadrature rule is used so that the total tally as computed by an ElementIntegralVariablePostprocessor actually matches the specified total (for low quadrature orders, there can be an error up to about 5% or so in total power). This override simply forces the volume quadrature order to be 2 or higher when using Gauss (default), monomial, or Gauss-Lobatto quadrature.
For other quadrature rules, the approximations made in elem->volume() are never going to match the volume integrations in MOOSE (unless the quadrature order is very very high). For these orders, we print an error message informing the user that they should switch to a different order.
|
inlineinherited |
Get the density conversion factor (multiplicative factor)
|
protected |
Get the feedback which this element provides to OpenMC
[in] | elem |
|
inline |
Get the cell ID from the element ID. Note that this function requires that the elem_id maps to an OpenMC cell, or else an error will be raised from OpenMC in cellID.
[in] | elem_id | element ID |
|
inline |
Get the cell index from the element ID; will return UNMAPPED for unmapped elements
[in] | elem_id | element ID |
|
inline |
Get the cell index, instance pair from element ID; if the element doesn't map to an OpenMC cell, the index and instance are both set to UNMAPPED
[in] | elem_id | element ID |
|
inline |
Get the cell instance from the element ID; will return UNMAPPED for unmapped elements
[in] | elem_id | element ID |
|
inherited |
Convert from a MOOSE-type enum into a valid OpenMC tally score string
[in] | score | MOOSE-type enum string |
|
inherited |
Convert a tally estimator to a string (for output purposes).
[in] | estimator | OpenMC tally estimator enum |
|
overridevirtual |
|
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 |
|
protected |
Find the OpenMC cell at a given point in space
[in] | point | point |
|
protected |
Get the first material cell contained in the given cell
[in] | cell_info | cell index, instance pair |
|
inherited |
Whether this is the first time OpenMC is running.
|
inline |
|
protected |
Gather a vector of values to be summed for each cell
[in] | local | local values to be summed for the cells |
[out] | global | global mapping of the summed values to the cells |
|
protected |
Gather a vector of values to be pushed back to for each cell
[in] | local | local values to be pushed back for the cells |
[in] | n_local | number of local values contributed to each cell |
[out] | global | global mapping of the pushed back values to the cells |
|
virtualinherited |
Find the geometry type in the OpenMC model
[out] | has_csg_universe | whether there is at least 1 CSG universe |
[out] | has_dag_universe | whether there is at least 1 DagMC universe |
|
protected |
Get the cell level in OpenMC to use for coupling
[in] | c | point |
|
protected |
Loop over all the OpenMC cells and count the number of MOOSE elements to which the cell is mapped based on phase.
|
protected |
Loop over all the OpenMC cells and get the element subdomain IDs that map to each cell.
|
inlinevirtual |
Get the MOOSE subdomains associated with an OpenMC cell
info | the cell info |
|
inline |
Get a filter added by the [Problem/Filters] block by it's MOOSE object name.
[in] | filter_name | the MOOSE object name of the filter |
|
inline |
Get the local tally
|
protected |
Find the material filling each cell which receives density feedback.
|
protected |
Get a list of each material in the problem, sorted by subdomain. This function also checks that there is just one OpenMC material in each subdomain, necessary for the DAGMC skinning.
|
protectedinherited |
Find all userobjects which are changing OpenMC data structures.
|
protected |
Get one point inside each cell, for accelerating the particle search routine. This function will get the centroid of the first global element in the lowest rank in the cell.
|
inlinevirtual |
Get all the scores added to the tally
|
protected |
Read the parameters needed for triggers
[in] | params | input parameters |
|
inlineinherited |
Get the global element ID from the local element ID
[in] | id | local element ID |
|
inline |
Whether a cell has density feedback
[in] | cell_info | cell index,instance pair |
|
inline |
Checks if the [Problem/Filters] block contains a specific filter.
[in] | filter_name | the MOOSE object name of the filter |
|
inlinevirtual |
Whether transformations are applied to the [Mesh] points when mapping to OpenMC
|
inlineinherited |
Whether the problem has user defined scaling or not.
|
inline |
Whether a cell has temperature feedback
[in] | cell_info | cell index,instance pair |
|
inherited |
Import temperature and density from a properties.h5 file.
|
protected |
Set up the mapping from MOOSE elements to OpenMC cells.
|
protected |
Add OpenMC tallies to facilitate the coupling.
|
overridevirtual |
|
inherited |
Whether the score is a heating-type score
|
inherited |
Whether the element is owned by this rank
|
inherited |
Whether the score is a reaction rate score
|
protected |
Check if a mapped location is in the outer universe of a lattice
[in] | level | lattice level |
|
protected |
Report an error for a mapped location in an outer universe of a lattice
[in] | c | Mapped location |
[in] | level | level of the mapped cell |
|
protected |
Populate maps of MOOSE elements to OpenMC cells.
|
inherited |
Whether the cell has a material fill (if so, then get the material index). Void counts as a material, with a material index of -1.
[in] | cell_info | cell ID, instance |
[out] | material_index | material index in the cell |
|
inherited |
Get the material ID from the material index; for VOID cells, this returns -1
[in] | index | material index |
|
inherited |
Get the material name given its index. If the material does not have a name, return the ID.
[in] | index |
|
protected |
Get all the material indices within the set of cells
[in] | contained_cells | set of cells |
|
inherited |
Get the number of particles used in the current Monte Carlo calculation
|
inlineinherited |
Total number of particles run (not multiplied by batches)
|
inherited |
Calculate the number of unique OpenMC cells (each with a unique ID & instance)
|
inherited |
Get the total (i.e. summed across all ranks, if distributed) number of elements in a given block
[in] | id | subdomainID return number of elements in block |
|
protected |
Print to the console the names of the auxvariables used for I/O with OpenMC. We only print these tables once, upon initialization, because this data does not change if re-initializing the spatial mapping for moving-mesh problems, adaptive refinement, skinning, etc.
|
virtualinherited |
Get a descriptive, formatted, string describing a cell
[in] | cell_info | cell index, instance pair |
[in] | brief | whether to print a shorter string |
|
inherited |
Get a descriptive, formatted, string describing a material
[in] | index | material index |
|
inlineprotected |
For keeping the output neat when using verbose.
|
inherited |
Print point coordinates with a neater formatting than the default MOOSE printing
|
protected |
For geometries with fine-scale details (e.g. TRISO), Cardinal's default settings can take a very long time to initialize the problem (but we can't change those defaults because they are not 100% applicable all the time). So, we print out a message to the user to point them in the right direction if their initialization is taking a long time.
[in] | start | time to use for evaluating whether we've exceeded our limit for printing the message |
void OpenMCCellAverageProblem::read2DBlockParameters | ( | const std::string | name, |
std::vector< std::vector< SubdomainName >> & | names, | ||
std::vector< SubdomainID > & | flattened_ids | ||
) |
Read a 2d vector of subdomain names, and check that there are no duplications and that all provided values exist on the mesh.
[in] | name | string name for the 2d vector parameter |
[out] | names | subdomain names |
[out] | flattened_ids | flattened 1d vector of subdomain IDs |
|
protected |
Read the block parameters based on user settings
[in] | name | name of input parameter representing a vector of subdomain names |
[in] | blocks | list of block ids to write |
|
protected |
Read the names of the MOOSE variables used for sending feedback into OpenMC
[in] | param | feedback term to read |
[in] | default_name | default name to use for MOOSE variables holding this field |
[out] | vars_to_specified_blocks | map from MOOSE variable names to the blocks on which they are defined |
[out] | specified_blocks | user-specified blocks for feedback |
|
inherited |
Compute relative error
[in] | sum | sum of scores |
[in] | sum_sq | sum of scores squared |
[in] | n_realizations | number of realizations |
|
protected |
Relax the tally and normalize it according to some "global" tally. If you set 'normalize_by_global_tally = true', you will be normalizing by a tally over the ENTIRE OpenMC geometry. Otherwise, you normalize only by the sum of the tally bins themselves.
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.
[in] | global_score | the global index of the tally score |
[in] | local_score | the local index of the tally score |
[in] | local_tally | the tally to relax and normalize |
void OpenMCCellAverageProblem::reloadDAGMC | ( | ) |
Reconstruct the DAGMC geometry after skinning.
|
protected |
Reset any tallies previously added by Cardinal, by deleting them from OpenMC. Also delete any mesh filters and meshes added to OpenMC for mesh filters.
|
inlineinherited |
Get the scaling value applied to the [Mesh] to convert to OpenMC's centimeters units
|
protected |
Send density from MOOSE to OpenMC by computing a volume average and applying a single density per OpenMC cell.
|
protectedinherited |
Set the nuclide densities for any materials being modified via MOOSE.
|
protectedinherited |
Set the tally nuclides for any tallies being modified via MOOSE.
|
protected |
Send temperature from MOOSE to OpenMC by computing a volume average and applying a single temperature per OpenMC cell
|
virtualinherited |
Set the cell density, and print helpful error message if a failure occurs
[in] | density | density |
[in] | cell_info | cell info for which we are setting the density |
|
virtualinherited |
Set the cell temperature, and print helpful error message if a failure occurs; this sets the temperature for the id + instance, which could be one of N cells filling the 'cell_info' parent cell (which is what we actually use for error printing)
[in] | id | cell ID |
[in] | instance | cell instance |
[in] | T | temperature |
[in] | cell_info | cell info for which we are setting interior temperature, for error printing |
|
protected |
Fill the cached contained cells data structure for a given cell
[in] | cell_info | cell index, instance pair |
[in] | hint | location hint used to accelerate the search |
[out] | map | contained cell map |
|
protected |
Set a minimum order for a volume quadrature rule
[in] | volume_order | order of the volume quadrature rule |
[in] | type | string type of quadrature rule for printing a console message |
void OpenMCCellAverageProblem::setupProblem | ( | ) |
Initialize the mapping of OpenMC to the MooseMesh and perform additional setup actions.
|
protected |
When using the 'identical_cell_fills' feature, this is used to determine the contained material cells in each parent cell by applying a uniform shift
[in] | cell_info | cell index, instance pair |
|
inlineprotectedinherited |
Get name of source bank file to write
[out] | file | name |
|
protected |
Loop over the elements in the MOOSE mesh and store the type of feedback applied by each.
|
inherited |
Whether a string ends in a particular sub-string
[in] | full | full string |
[in] | ending | sub-string ending |
|
inherited |
Get the subdomain name for a given ID. If not named, we return the ID
[in] | id | subdomain ID |
|
protected |
Loop over the mapped cells, and build a map between subdomains to OpenMC materials.
|
overridevirtual |
|
inherited |
Convert from a MooseEnum for tally estimator to an OpenMC enum
[in] | estimator | MOOSE estimator enum |
|
inherited |
Compute the mean of a tally across all of its bins
[in] | tally | OpenMC tallies (multiple if repeated mesh tallies) |
[in] | score | tally score |
Real OpenMCCellAverageProblem::tallyMultiplier | ( | unsigned int | global_score | ) | const |
Multiplier on the normalized tally results; for fixed source runs, we multiply the tally (which has units of eV/source) by the source strength and the eV to joule conversion, while for k-eigenvalue runs, we multiply the normalized tally (which is unitless and has an integral value of 1.0) by the power.
[in] | global_score | tally score |
|
protected |
Factor by which to normalize a tally
[in] | global_score | global index for the tally score |
|
inherited |
Convert into a MOOSE-type enum from a valid OpenMC tally score string
[in] | score | OpenMC tally score string |
|
inherited |
Compute the sum of a tally within each bin.
For example, suppose we have a cell tally with 4 bins, one for each of 4 different cells. This function will return the sum of the tally in each of those bins, so the return xtensor will have a length of 4, with each value representing the sum for that bin.
[in] | tally | OpenMC tally |
[in] | score | tally score |
|
inherited |
Compute the sum of a tally across all of its bins
[in] | tally | OpenMC tallies (multiple if repeated mesh tallies) |
[in] | score | tally score |
|
inlinevirtual |
Apply transformations to point
[in] | pt | point |
|
protected |
Apply transformations and scale point from MOOSE into the OpenMC domain
[in] | pt | point |
|
inherited |
Convert from a MooseEnum for a trigger metric to an OpenMC enum
[in] | trigger | trigger metric |
|
inherited |
|
protectedvirtual |
Re-generate the OpenMC materials in-place, needed for skinning operation where we create new OpenMC materials on-the-fly in order to receive density feedback.
|
protected |
A function which validates local tallies. This is done to ensure that at least one of the tallies contains a heating score when running in eigenvalue mode. This must be done outside of the constructor as tallies are added from an external system.
|
static |
|
inlinevirtual |
Reference to stochastic volume calculation
|
inherited |
Write the source bank to HDF5 for postprocessing or for use in subsequent solves
[in] | filename | file name |
|
protected |
A list of all of the scores contained by the local tallies added in the [Tallies] block.
|
protected |
Whether it can be assumed that all of the tallies (both those set by the user in the XML file, as well as those created automatically by Cardinal) are spatially separate. This means that once a particle scores to one tally bin, it wouldn't score to ANY other tally bins. This can dramatically increase tracking rates for problems with many tallies.
|
protected |
Coordinate level in the OpenMC domain to use for mapping cells to mesh. When using 'lowest_cell_level', this parameter indicates that the lowest cell level is used, up until _cell_level.
|
protected |
Phase of each cell.
|
protected |
Material-type cells contained within a cell; this is only populated if a cell is NOT indicated as having an identical fill
|
protected |
Mapping of OpenMC cell indices to a vector of MOOSE element IDs.
|
protected |
Mapping of OpenMC cell indices to the subdomain IDs each maps to.
|
protected |
Volume associated with the mapped element space for each OpenMC cell; the unit for this volume is whatever is used in the [Mesh] block
|
protected |
Material filling each cell to receive density feedback. We enforce that these cells are filled with a material (cannot be filled with a lattice or universe).
|
protected |
Number of material-type cells contained within a cell.
|
protected |
A point inside the cell, taken simply as the centroid of the first global element inside the cell. This is stored to accelerate the particle search.
|
protected |
Volume associated with the actual OpenMC cell, computed by an optional OpenMCVolumeCalculation user object
|
protected |
Whether we should rigorously check that each tally cell has identical fills; this is SLOW for large TRISO problems, but is essential to ensure the accuracy of 'identical_cell_fills'. Please set 'check_identical_cell_fills' to 'true' at least once before running production cases to be sure the optimization can be applied.
|
protected |
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.
|
protected |
Index in the OpenMC universes corresponding to the DAGMC universe.
|
protected |
Blocks in MOOSE mesh that provide density feedback.
|
staticprotectedinherited |
Conversion unit to transfer between kg/m3 and g/cm3.
|
protected |
Mapping from density variable name to the subdomains on which to read it from.
|
protected |
Mapping of MOOSE elements to the OpenMC cell they map to (if any)
|
protected |
Whether OpenMC properties (temperature and density) should be exported after being updated in syncSolutions.
|
protected |
A map of the filter objects created by the [Problem/Filters] block. The key for each filter is it's corresponding MOOSE name to allow tallies to look up filters.
|
staticprotected |
Whether the present transfer is the first transfer.
|
protectedinherited |
Fixed point iteration index used in relaxation; because we sometimes run OpenMC in a pseudo-transient coupling with NekRS, we simply increment this by 1 each time we call openmc::run(). This uses a zero indexing, so after the first iteration, we have finished iteration 0, and so on.
|
protected |
Sum value of the global tally(s), across all bins.
|
protected |
Global tallies. We add one per tally added in the [Tallies] block to enable global noramlization.
|
protected |
Global tally estimators corresponding to '_global_tallies'.
|
protected |
Index in OpenMC tallies corresponding to the first global tally added by Cardinal.
|
protected |
Global tally scores corresponding to '_global_tallies'.
|
protected |
Whether any cell tallies exist.
|
protected |
If known a priori by the user, whether the tally cells (which are not simply material fills) have EXACTLY the same contained material cells. This is a big optimization for TRISO problems in setting up homogenized temperature/density feedback to OpenMC.
The concept can best be explained with a pebble bed reactor. If every pebble is filled with an identical TRISO universe, then the material fills in each pebble are identical to one another except for a constant offset. This idea can be used to then skip all but the first two openmc::Cell::get_contained_cells calls (which are required in order to figure out the pattern by which pebble N is incremented relative to pebble 1).
When using this parameter, we HIGHLY recommend setting 'check_identical_cell_fills = true' the first time you run your model. This will figure out the material cell fills using a method that calls openmc::Cell::get_contained_cells for every tally cell, i.e. without assuming anything about repeated structure in your OpenMC model. Setting 'identical_cell_fills' without also setting 'check_identical_cell_fills = true' may result in SILENT errors!!! So it is essential to be sure you've removed any error sources before you turn the error check off to actually leverage the speedup.
Note: for any tally cells that are just filled with a material, we use the approach where openmc::Cell::get_contained_cells is called in full.
This optimization will not work (and 'check_identical_cell_fills = true' will catch these) for:
|
protected |
Blocks for which the cell fills are identical.
|
protected |
Where to get the initial OpenMC temperatures and densities from; can be either hdf5 (from a properties.h5 file), xml (whatever is already set in the XML files), or moose (meaning whatever ICs are set on the 'temperature_variables' and 'density_variables'
|
protected |
Type of trigger to apply to k eigenvalue 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).
|
protected |
Mapping of OpenMC cell indices to a vector of MOOSE element IDs, on each local rank.
|
protected |
Mean value of the local tally(s), across all bins; only used for fixed source mode.
|
protected |
Sum value of the local tally(s), across all bins.
|
protected |
A vector of the tally objects created by the [Problem/Tallies] block.
|
protected |
The [Tallies] block allows tallies with different scores, and so we can't assume they have the same indices in each tally's arrays. This variable map between the name of each score and it's index in each local tally.
|
protectedinherited |
Mapping from local element indices to global element indices for this rank.
|
protected |
Whether to map density according to each individual OpenMC cell (in which case an error is thrown if you don't have a unique material in each cell) or by material.
|
protected |
Whether non-material cells are mapped.
|
protectedinherited |
Number of digits to use to display the cell ID for diagnostic messages; this is estimated conservatively based on the total number of cells, even though there may be distributed cells such that the maximum cell ID is far smaller than the total number of cells.
|
protected |
Number of MOOSE elements that exclusively provide density feedback, and which successfully mapped to OpenMC cells
|
protected |
Number of no-coupling elements mapped to OpenMC cells.
|
protected |
Number of MOOSE elements that provide temperature+density feedback, and which successfully mapped to OpenMC cells
|
protected |
Number of MOOSE elements that exclusively provide temperature feedback, and which successfully mapped to OpenMC cells
|
protected |
Number of elements in the MOOSE mesh that exclusively provide density feedback.
|
protected |
Number of no-coupling elements in the MOOSE mesh.
|
protected |
Number of elements in the MOOSE mesh which provide temperature+density feedback.
|
protected |
Number of elements in the MOOSE mesh that exclusively provide temperature feedback.
|
protected |
Number of none elements in each mapped OpenMC cell (global)
|
protected |
Total number of unique OpenMC cell IDs + instances combinations.
|
protected |
Number of particles simulated in the first iteration.
|
protected |
Number of density-only feedback elements in each mapped OpenMC cell (global)
|
protected |
Number of temperature-only feedback elements in each mapped OpenMC cell (global)
|
protected |
Number of temperature+density feedback elements in each mapped OpenMC cell (global)
|
protected |
If 'fixed_mesh' is false, this indicates that the [Mesh] is changing during the simulation (either from adaptive refinement or from deformation). When the mesh changes during the simulation, the mapping from OpenMC cells to the [Mesh] must be re-established after each OpenMC run.
|
protected |
Whether a global tally is required for the sake of normalization and/or checking the tally sum
|
protected |
Whether any spatial mapping from OpenMC's cells to the mesh is needed.
|
protected |
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 |
Userobjects for changing OpenMC material compositions.
|
protected |
Whether to automatically compute the mapping of OpenMC cell IDs and instances to the [Mesh].
|
protected |
Dummy particle to reduce number of allocations of particles for cell lookup routines.
|
protectedinherited |
Power by which to normalize the OpenMC results, for k-eigenvalue mode.
|
staticprotected |
Whether the diagnostic tables on initialization have already been printed.
|
staticprotected |
Whether a warning has already been printed about very long setup times (for TRISOs)
|
protected |
Type of relaxation to apply to the OpenMC tallies.
|
protected |
Constant relaxation factor.
|
protectedinherited |
Whether to take the starting fission source from iteration \(n\) as the fission source converged from iteration \(n-1\). Setting this to true will in most cases lead to improved convergence of the initial source as iterations progress because you don't "start from scratch" each iteration and do the same identical (within a random number seed) converging of the fission source.
|
protectedinherited |
OpenMC run mode.
|
protectedinherited |
Multiplicative factor to apply to the mesh in the [Mesh] block in order to convert whatever units that mesh is in into OpenMC's length scale of centimeters. For instance, it is commonplace to develop fuel performance models with a length scale of meters. Rather than onerously convert all MOOSE inputs to which OpenMC will be coupled to units of centimeters, this parameter allows us to scale the mesh we couple to OpenMC. Note that this does not actually scale the mesh itself, but simply multiplies the mesh coordinates by this parameter when identifying the mapping between elements and cells.
By default, this parameter is set to 1.0, meaning that OpenMC is coupled to another MOOSE application with an input written in terms of centimeters. Set this parameter to 100 if the coupled MOOSE application is in units of meters, for instance.
To summarize by example - if the MOOSE application uses units of meters, with a mesh named mesh.exo, then the OpenMC-wrapped input file should also use that mesh (with units of meters) in its [Mesh] block (or perhaps a coarser version of that mesh if the resolution of coupling does not need to match - the units just have to be the same). Then, you should set 'scaling = 100.0' so that the mapping is performed correctly.
|
protected |
|
protectedinherited |
Whether to skip writing statepoints from OpenMC.
|
protected |
Index in tally_score pointing to the score used for normalizing flux tallies in eigenvalue mode.
|
protectedinherited |
Source strength by which to normalize the OpenMC results, for fixed source mode.
|
protected |
Whether the problem has density feedback blocks specified; note that this is NOT necessarily indicative that the mapping was successful in finding any cells corresponding to those blocks
|
protectedinherited |
Whether a mesh scaling was specified by the user.
|
protected |
Whether the problem has temperature feedback blocks specified; note that this is NOT necessarily indicative that the mapping was successful in finding any cells corresponding to those blocks
|
protected |
Mapping of elem subdomains to materials.
|
protected |
Userobject that maps from a partial-symmetry OpenMC model to a whole-domain [Mesh].
|
protected |
A vector of external (output-based) auxvariable ids added by the [Tallies] block.
|
protectedinherited |
Userobjects for changing OpenMC tally nuclides.
|
protected |
A vector of auxvariable ids added by the [Tallies] block.
|
protected |
Blocks in MOOSE mesh that provide temperature feedback.
|
protected |
Mapping from temperature variable name to the subdomains on which to read it from.
|
protectedinherited |
Total number of particles simulated.
|
protected |
Total volume of uncoupled MOOSE mesh elements.
|
protectedinherited |
Whether to print diagnostic information about model setup and the transfers.
|
protected |
Optional volume calculation for cells which map to MOOSE.
|
static |
Spatial dimension of the Monte Carlo problem.
|
staticprotected |
Conversion rate from eV to Joule.
|
staticprotectedinherited |
ID used by OpenMC to indicate that a material fill is VOID.
|
static |
Constant flag to indicate that a cell/element was unmapped.
|
staticprotected |
Tolerance for setting zero tally.