- blocksSubdomains for which to add tallies in OpenMC. If not provided, cell tallies will be applied over the entire mesh.
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:Subdomains for which to add tallies in OpenMC. If not provided, cell tallies will be applied over the entire mesh.
- check_equal_mapped_tally_volumesFalseWhether to check if the tallied cells map to regions in the mesh of equal volume. This can be helpful to ensure that the volume normalization of OpenMC's tallies doesn't introduce any unintentional distortion just because the mapped volumes are different. You should only set this to true if your OpenMC tally cells are all the same volume!
Default:False
C++ Type:bool
Controllable:No
Description:Whether to check if the tallied cells map to regions in the mesh of equal volume. This can be helpful to ensure that the volume normalization of OpenMC's tallies doesn't introduce any unintentional distortion just because the mapped volumes are different. You should only set this to true if your OpenMC tally cells are all the same volume!
- equal_tally_volume_abs_tol1e-08Absolute tolerance for comparing tally volumes
Default:1e-08
C++ Type:double
Controllable:No
Description:Absolute tolerance for comparing tally volumes
- estimatorType of tally estimator to use in OpenMC
C++ Type:MooseEnum
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.
- 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
- 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 will write the raw unrelaxed tally into auxiliary variables named *_raw (replace * with 'name').
C++ Type:MultiMooseEnum
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 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
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
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>
Controllable:No
Description:Threshold for the tally trigger
CellTally
CellTally
can only be added to problems when the input files contains a OpenMCCellAverageProblem in the [Problem]
block. Otherwise, attempting to add this tally will result in an error.
Description
The CellTally
class wraps an OpenMC tally with a distributed cell filter to enable data transfer from CSG cells to a MooseMesh mirror of the OpenMC geometry. The cell to element mapping established by the OpenMCCellAverageProblem is used to facilitate this data transfer to the mesh mirror. When using a CellTally
, tally_blocks
specifies which blocks in the [Mesh]
should be tallied. Then, any OpenMC cells that map to those blocks are added to a cell tally, with one bin for each unique cell ID/instance combination. check_equal_mapped_tally_volumes
is used to confirm whether each cell in the CellTally
has the same mapped volume on the MooseMesh
(to a tolerance specified in equal_tally_volume_abs_tol
).
Cardinal supports several tally scores which can be specified in the score
parameter when adding a tally. Options include:
heating
: total nuclear heatingheating_local
: same as theheating
score, except that energy from secondary photons is deposited locallykappa_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 thekappa_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 thekappa_fission
score, except that the score depends on the incident energy by linking to optional fission energy release datadamage_energy
: damage energy productionflux
: particle scalar fluxH3_production
: tritium production reaction ratetotal
: the total reaction rateabsorption
: the absorption reaction ratescatter
: the scatter reaction ratefission
: the fission reaction rate
For more information on the specific meanings of these various scores, please consult the OpenMC tally documentation. The names of the tally auxvariables added by the OpenMCCellAverageProblem can be modified by specifying a name for each score in name
.
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 mirrorunrelaxed_tally_std_dev
: unrelaxed tally standard deviation; this will append_std_dev
to the tally and output to the mesh mirror
Example Input File Syntax
As an example, this CellTally
scores kappa_fission
(the default tally score) on block 0
and stores the result in a variable named heat_source
. This corresponds to tallying the heating for three different fuel pebbles.
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1500.0
temperature_blocks = '0'
cell_level = 1
scaling = 100.0
[Tallies]
[heat_source]
type = CellTally
blocks = '0'
name = heat_source
[]
[]
[]
(tutorials/pebbles/openmc.i)Input 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
- (test/tests/neutronics/heat_source/custom_name.i)
- (test/tests/neutronics/triggers/tally_rel_err.i)
- (test/tests/postprocessors/fission_tally_relative_error/multi.i)
- (test/tests/neutronics/feedback/multi_component_temp/multi_vars.i)
- (test/tests/openmc_errors/adaptivity/fixed_mesh.i)
- (test/tests/openmc_errors/tallies/length.i)
- (tutorials/gas_compact/openmc.i)
- (test/tests/openmc_errors/block_mappings/multiple_phases.i)
- (test/tests/neutronics/fixed_source/flux.i)
- (test/tests/neutronics/flux/missing_norm.i)
- (test/tests/openmc_errors/densities/void_density.i)
- (test/tests/postprocessors/openmc_particles/openmc.i)
- (test/tests/neutronics/heat_source/cell_volumes.i)
- (test/tests/openmc_errors/block_mappings/no_overlap.i)
- (test/tests/neutronics/filters/energy/mesh_sum.i)
- (test/tests/neutronics/dagmc/wrong_uo.i)
- (test/tests/neutronics/dagmc/density_skin/only_solid.i)
- (test/tests/openmc_errors/cell_instances/insufficient_materials/fluid.i)
- (test/tests/neutronics/heat_source/overlap_fluid.i)
- (tutorials/pebbles/openmc.i)
- (test/tests/neutronics/flux/flux.i)
- (doc/content/source/actions/multi_tally_example.i)
- (test/tests/openmc_errors/zero_tally/openmc.i)
- (test/tests/neutronics/fixed_source/overlap_solid.i)
- (test/tests/neutronics/filters/multi_filter.i)
- (test/tests/neutronics/filters/polar/mesh_sum.i)
- (test/tests/neutronics/dagmc/cell_tallies/with_scaling.i)
- (test/tests/neutronics/feedback/multi_component_density/openmc_incorrect_length.i)
- (test/tests/neutronics/feedback/multi_component_temp/openmc_incorrect_length.i)
- (test/tests/neutronics/solid/openmc_missing_pebble.i)
- (test/tests/neutronics/relaxation/cell_tallies/output_fission_tally.i)
- (test/tests/neutronics/heat_source/overlap_solid.i)
- (test/tests/controls/openmc_nuclide_densities/openmc.i)
- (test/tests/openmc_errors/level/phase_too_high/fluid_too_high.i)
- (test/tests/controls/openmc_nuclide_densities/error.i)
- (test/tests/neutronics/relaxation/cell_tallies/dufek_gudowski.i)
- (test/tests/neutronics/tallies/reaction_rates/openmc.i)
- (test/tests/neutronics/feedback/multi_component_density/openmc.i)
- (test/tests/neutronics/relaxation/cell_tallies/multi_tally.i)
- (doc/content/source/problems/smallest_openmc_input.i)
- (test/tests/neutronics/feedback/lattice/openmc_scores.i)
- (test/tests/neutronics/filters/azimuthal/mesh.i)
- (test/tests/neutronics/dagmc/cell_tallies/one_bin.i)
- (test/tests/neutronics/heat_source/partial_overlap_moose_union.i)
- (test/tests/neutronics/solid/openmc_zero.i)
- (test/tests/neutronics/tally_system/multi_diff.i)
- (test/tests/userobjects/openmc_nuclide_densities/no_change.i)
- (test/tests/openmc_errors/block_mappings/skipping_moose_feedback.i)
- (test/tests/userobjects/openmc_tally_nuclides/openmc.i)
- (test/tests/neutronics/feedback/triso/missing_triso_fill/openmc.i)
- (test/tests/neutronics/filters/azimuthal/mesh_sum.i)
- (test/tests/neutronics/symmetry/openmc.i)
- (test/tests/neutronics/dagmc/density_skin/openmc.i)
- (test/tests/openmc_errors/tallies/separate_tallies.i)
- (test/tests/openmc_errors/block_mappings/unequal_volumes.i)
- (test/tests/postprocessors/eigenvalue/openmc.i)
- (test/tests/neutronics/heat_source/distrib_cell/solid.i)
- (test/tests/neutronics/filters/energy/mesh.i)
- (test/tests/neutronics/heat_source/overlap_all.i)
- (test/tests/neutronics/filters/polar/mesh.i)
- (tutorials/gas_compact_multiphysics/openmc_nek.i)
- (test/tests/neutronics/feedback/multiple_levels/openmc.i)
- (test/tests/neutronics/triggers/ignore_zeros/ignore_zero.i)
- (test/tests/neutronics/relaxation/cell_tallies/openmc_nonaligned.i)
- (test/tests/neutronics/tally_system/multi_cell.i)
- (test/tests/neutronics/filters/xml/cell.i)
- (test/tests/neutronics/tally_system/multi_cell_triggers.i)
- (test/tests/openmc_errors/block_mappings/multiple_tally_settings.i)
- (test/tests/neutronics/dagmc/cell_tallies/csg_step_2/openmc.i)
- (test/tests/neutronics/feedback/interchangeable/openmc.i)
- (test/tests/neutronics/heat_source/default_tally_blocks.i)
- (test/tests/openmc_errors/incorrect_aux_setup/incorrect_var_type.i)
- (test/tests/neutronics/filters/xml/mesh.i)
- (tutorials/lwr_solid/openmc.i)
- (test/tests/neutronics/feedback/different_units/openmc_cm.i)
- (tutorials/gas_assembly/openmc.i)
- (tutorials/pincell_multiphysics/openmc.i)
- (test/tests/neutronics/photon/openmc.i)
- (test/tests/openmc_errors/cell_instances/insufficient_materials/solid.i)
- (test/tests/userobjects/volume_calculation/instances/openmc.i)
- (test/tests/neutronics/tally_system/multi_estimator.i)
- (tutorials/gas_compact_multiphysics/openmc_thm.i)
- (test/tests/neutronics/heat_source/multi_tally.i)
- (test/tests/neutronics/filters/energy/cell.i)
- (test/tests/neutronics/dagmc/cell_tallies/csg_step_1/openmc.i)
- (test/tests/openmc_errors/material_mappings/materials.i)
- (test/tests/userobjects/openmc_nuclide_densities/thermal_density.i)
- (test/tests/neutronics/relaxation/cell_tallies/openmc.i)
- (test/tests/neutronics/feedback/single_level/openmc.i)
- (test/tests/neutronics/source/openmc.i)
- (test/tests/neutronics/heat_source/from_postprocessor.i)
- (test/tests/userobjects/openmc_nuclide_densities/only_density.i)
- (test/tests/neutronics/feedback/multi_component_temp/openmc.i)
- (test/tests/neutronics/fixed_source/overlap_all.i)
- (test/tests/neutronics/heat_source/multi_tally_overlap_solid.i)
- (test/tests/neutronics/feedback/triso/cache/openmc.i)
- (test/tests/neutronics/dagmc/properties.i)
- (test/tests/neutronics/feedback/lattice/openmc.i)
- (test/tests/neutronics/feedback/materials/openmc.i)
- (test/tests/openmc_errors/densities/zero_density.i)
- (test/tests/neutronics/dagmc/cell_tallies/openmc.i)
- (test/tests/userobjects/volume_calculation/no_vol.i)
- (test/tests/neutronics/triggers/multi_rel_err.i)
- (test/tests/userobjects/volume_calculation/scaling.i)
- (test/tests/neutronics/dagmc/cell_tallies/null_density.i)
- (test/tests/neutronics/filters/mesh_sum_gold.i)
- (test/tests/postprocessors/fission_tally_relative_error/ratio.i)
- (test/tests/neutronics/heat_source/partial_overlap_openmc_union.i)
- (test/tests/neutronics/filters/polar/cell.i)
- (test/tests/neutronics/tally_system/multi_cell_relax.i)
- (test/tests/neutronics/dagmc/density_skin/csg_step_2/openmc.i)
- (test/tests/neutronics/tally_system/cell_with_unmapped.i)
- (test/tests/neutronics/dagmc/density_skin/disjoint_bins.i)
- (test/tests/neutronics/filters/no_filter.i)
- (test/tests/userobjects/openmc_nuclide_densities/openmc.i)
- (test/tests/neutronics/symmetry/triso/openmc.i)
- (test/tests/neutronics/feedback/unmapped_moose/openmc.i)
- (test/tests/neutronics/feedback/triso/openmc.i)
- (test/tests/neutronics/tallies/tritium/openmc.i)
- (test/tests/userobjects/volume_calculation/openmc.i)
- (test/tests/postprocessors/fission_tally_relative_error/openmc.i)
- (test/tests/neutronics/symmetry/rotational/openmc.i)
- (test/tests/neutronics/feedback/triso/different_fill_univs/openmc.i)
- (test/tests/openmc_errors/block_mappings/nonexistent_block.i)
- (test/tests/neutronics/feedback/different_units/openmc.i)
- (test/tests/openmc_errors/level/total_too_high/level_too_high.i)
- (test/tests/neutronics/filters/azimuthal/cell.i)
(tutorials/pebbles/openmc.i)
[Mesh]
[pebble]
type = SphereMeshGenerator
nr = 2
radius = 0.015
[]
[repeat]
type = CombinerGenerator
inputs = pebble
positions = '0 0 0.02
0 0 0.06
0 0 0.10'
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1500.0
temperature_blocks = '0'
cell_level = 1
scaling = 100.0
[Tallies]
[heat_source]
type = CellTally
blocks = '0'
name = heat_source
[]
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
[]
[max_tally_rel_err]
type = TallyRelativeError
[]
[k]
type = KEigenvalue
[]
[]
(test/tests/neutronics/heat_source/custom_name.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100 200'
density_blocks = '200'
initial_properties = xml
# We are skipping some feedback with fissile regions, so we need to turn off the check
check_tally_sum = false
verbose = true
cell_level = 0
[Tallies]
[Cell]
type = CellTally
# Use a custom tally name
name = "volumetric_power"
# This input has fissile material in the fluid phase, so we will get a warning
# that we are neglecting some of the global kappa-fission distribution; so here
# the power is the total power of the OpenMC problem, and only a fraction of this
# will be computed in the solid pebbles
blocks = '100'
[]
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = volumetric_power
[]
[]
[Outputs]
exodus = true
csv = true
hide = 'density'
[]
(test/tests/neutronics/triggers/tally_rel_err.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
cell_level = 0
normalize_by_global_tally = false
max_batches = 200
[Tallies]
[Cell]
type = CellTally
blocks = '100'
trigger = rel_err
trigger_threshold = 2e-2
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[max_tally_err]
type = TallyRelativeError
[]
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/fission_tally_relative_error/multi.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100'
cell_level = 0
check_tally_sum = false
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '100'
score = 'heating kappa_fission'
# this outputs the fission tally standard deviation in space
output = 'unrelaxed_tally_std_dev'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[max_rel_err_ht]
type = TallyRelativeError
value_type = max
tally_score = 'heating'
[]
[min_rel_err_ht]
type = TallyRelativeError
value_type = min
tally_score = 'heating'
[]
[avg_rel_err_ht]
type = TallyRelativeError
value_type = average
tally_score = 'heating'
[]
[max_rel_err_kf]
type = TallyRelativeError
value_type = max
tally_score = 'kappa_fission'
[]
[min_rel_err_kf]
type = TallyRelativeError
value_type = min
tally_score = 'kappa_fission'
[]
[avg_rel_err_kf]
type = TallyRelativeError
value_type = average
tally_score = 'kappa_fission'
[]
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/feedback/multi_component_temp/multi_vars.i)
[Mesh]
[load]
type = FileMeshGenerator
file = ../../meshes/pincell.e
[]
[split_fuel]
type = ParsedSubdomainMeshGenerator
combinatorial_geometry = 'z < 5.0'
excluded_subdomains = '3 2'
block_id = 10
input = load
[]
[]
[AuxVariables]
[cell_temp]
family = MONOMIAL
order = CONSTANT
[]
[collated_temp]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temp]
type = CellTemperatureAux
variable = cell_temp
[]
[collated_solid_temp]
type = ProjectionAux
variable = collated_temp
v = solid_temp
block = '1 3'
execute_on = timestep_begin
[]
[collated_fluid_temp]
type = ProjectionAux
variable = collated_temp
v = fluid_temp
block = '2'
execute_on = timestep_begin
[]
[collated_other_temp]
type = ProjectionAux
variable = collated_temp
v = other_temp
block = '10'
execute_on = timestep_begin
[]
[]
[ICs]
[solid_temp]
type = ConstantIC
variable = solid_temp
value = 800
[]
[fluid_temp]
type = ConstantIC
variable = fluid_temp
value = 600
[]
[other_temp]
type = ConstantIC
variable = other_temp
value = 400
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 500.0
cell_level = 0
verbose = true
temperature_variables = 'solid_temp; fluid_temp; other_temp'
temperature_blocks = '1 3; 2; 10'
[Tallies]
[Cell]
type = CellTally
blocks = '1 3 2 10'
[]
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[max_temp]
type = ElementExtremeValue
variable = cell_temp
value_type = max
[]
[min_temp]
type = ElementExtremeValue
variable = cell_temp
value_type = min
[]
[avg_temp]
type = ElementAverageValue
variable = collated_temp
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/openmc_errors/adaptivity/fixed_mesh.i)
[Mesh]
[sphere]
# Mesh of a single pebble with outer radius of 1.5 (cm)
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 70.0
temperature_blocks = '100'
cell_level = 0
fixed_mesh = true
[Tallies]
[Cell]
type = CellTally
blocks = '100'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Adaptivity]
[Markers]
[error_tol_marker]
type = UniformMarker
mark = refine
[]
[]
[]
[Outputs]
exodus = true
[]
(test/tests/openmc_errors/tallies/length.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
cell_level = 0
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Executioner]
type = Transient
[]
(tutorials/gas_compact/openmc.i)
height = 1.60 # height of the unit cell (m)
fluid_Cp = 5189.0 # fluid isobaric specific heat (J/kg/K)
inlet_T = 598.0 # inlet fluid temperature (K)
power = 30e3 # unit cell power (W)
mdot = 0.011 # fluid mass flowrate (kg/s)
[Mesh]
[solid]
type = FileMeshGenerator
file = mesh_in.e
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[]
[ICs]
[temp]
type = FunctionIC
variable = temp
function = temp_ic
[]
[]
[Functions]
[temp_ic]
type = ParsedFunction
expression = '${inlet_T} + z / ${height} * ${power} / ${mdot} / ${fluid_Cp}'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = ${power}
scaling = 100.0
temperature_blocks = 'graphite compacts compacts_trimmer_tri'
cell_level = 1
[Tallies]
[heat_source]
type = CellTally
name = heat_source
blocks = 'compacts compacts_trimmer_tri'
check_equal_mapped_tally_volumes = true
output = 'unrelaxed_tally_std_dev'
[]
[]
[]
[MultiApps]
[solid]
type = TransientMultiApp
input_files = 'solid.i'
execute_on = timestep_end
[]
[]
[Transfers]
[heat_source_to_solid]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = solid
variable = power
source_variable = heat_source
from_postprocessors_to_be_preserved = heat_source
to_postprocessors_to_be_preserved = power
[]
[temperature_to_openmc]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = solid
variable = temp
source_variable = T
[]
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
execute_on = 'transfer initial timestep_end'
[]
[max_tally_rel_err]
type = TallyRelativeError
value_type = max
[]
[max_power]
type = ElementExtremeValue
variable = heat_source
value_type = max
block = 'compacts compacts_trimmer_tri'
[]
[min_power]
type = ElementExtremeValue
variable = heat_source
value_type = min
block = 'compacts compacts_trimmer_tri'
[]
[]
[UserObjects]
[avg_power]
type = NearestPointLayeredAverage
variable = heat_source
points = '0.0 0.0 0.0'
num_layers = 30
direction = z
block = 'compacts compacts_trimmer_tri'
[]
[avg_std_dev]
type = NearestPointLayeredAverage
variable = heat_source_std_dev
points = '0.0 0.0 0.0'
num_layers = 30
direction = z
block = 'compacts compacts_trimmer_tri'
[]
[]
[VectorPostprocessors]
[avg_q]
type = SpatialUserObjectVectorPostprocessor
userobject = avg_power
[]
[stdev]
type = SpatialUserObjectVectorPostprocessor
userobject = avg_std_dev
[]
[]
[Executioner]
type = Transient
num_steps = 4
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/openmc_errors/block_mappings/multiple_phases.i)
# This input tests what happens if an OpenMC cell maps to more than one phase;
# we do this by slightly moving one of the pebbles so that some of its elements
# will overlap with the fluid region
[Mesh]
[sphere]
# Mesh of a single pebble with outer radius of 1.5 (cm)
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8.5'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
# Mesh of the fluid phase; this mesh would be the same as whatever is used to
# solve for the fluid phase
type = FileMeshGenerator
file = stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 70.0
temperature_blocks = '100 200'
density_blocks = '200'
cell_level = 0
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '100'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/fixed_source/flux.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
source_strength = 1e12
temperature_blocks = '100 200'
density_blocks = '200'
cell_level = 0
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
score = flux
blocks = '100 200'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[vol_solid]
type = VolumePostprocessor
block = '100'
[]
[vol_fluid]
type = VolumePostprocessor
block = '200'
[]
[flux_pebble1]
type = PointValue
variable = flux
point = '0 0 0'
[]
[flux_pebble2]
type = PointValue
variable = flux
point = '0 0 4'
[]
[flux_pebble3]
type = PointValue
variable = flux
point = '0 0 8'
[]
[flux_fluid]
type = PointValue
variable = flux
point = '0 0 2'
[]
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/flux/missing_norm.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
score = 'heating flux H3_production'
blocks = '100'
[]
[]
[]
[Executioner]
type = Steady
[]
(test/tests/openmc_errors/densities/void_density.i)
[Mesh]
[m]
type = GeneratedMeshGenerator
dim = 3
xmin = -2
xmax = 2
ymin = -2
ymax = 2
zmin = -2
zmax = 10
nx = 5
ny = 5
nz = 5
[]
[id]
type = SubdomainIDGenerator
input = m
subdomain_id = 1
[]
[]
[ICs]
[t]
type = ConstantIC
variable = temp
value = 500.0
[]
[rho]
type = ConstantIC
variable = density
value = 1000.0
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 10.0
temperature_blocks = '1'
density_blocks = '1'
verbose = true
cell_level = 0
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/openmc_particles/openmc.i)
[Mesh]
[pebble]
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere_in_m.e
[]
[repeat]
type = CombinerGenerator
inputs = pebble
positions = '0 0 0.02
0 0 0.06
0 0 0.10'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 100.0
temperature_blocks = '100'
cell_level = 1
scaling = 100.0
relaxation = dufek_gudowski
first_iteration_particles = 500
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '100'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 3
[]
[Outputs]
csv = true
[]
[Postprocessors]
[particles]
type = OpenMCParticles
value_type = instantaneous
[]
[particles_total]
type = OpenMCParticles
value_type = total
[]
[]
(test/tests/neutronics/heat_source/cell_volumes.i)
# In this input, MOOSEs domain contains the entire OpenMC domain, but some
# MOOSE elements arent mapped anywhere (this is facilitated by adding an
# extra pebble to the MOOSE mesh).
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8
9 9 9'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[AuxVariables]
[cell_volume]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_volume]
type = CellVolumeAux
variable = cell_volume
volume_type = mapped
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100 200'
density_blocks = '200'
initial_properties = xml
verbose = true
cell_level = 0
[Tallies]
[Cell]
type = CellTally
blocks = '100 200'
[]
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = final
exodus = true
hide = 'density kappa_fission temp'
[]
(test/tests/openmc_errors/block_mappings/no_overlap.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '100 100 100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 70.0
cell_level = 0
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Executioner]
type = Transient
[]
(test/tests/neutronics/filters/energy/mesh_sum.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
allow_renumbering = false
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
# Disable global normalization since we have a loosely fitting mesh tally.
normalize_by_global_tally = false
[Tallies]
[Heating]
type = CellTally
score = 'kappa_fission'
blocks = '100'
[]
[Flux]
type = MeshTally
score = 'flux'
mesh_template = ../../meshes/sphere.e
mesh_translations = '0 0 0
0 0 4
0 0 8'
filters = 'Energy'
[]
[]
[Filters]
[Energy]
type = EnergyFilter
# CASMO 2 group structure for testing. May result in some missed particles
energy_boundaries = '0.0 6.25e-1 2.0e7'
[]
[]
[]
[AuxVariables]
[flux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[total_flux]
type = SumAux
variable = flux
values = 'flux_g1 flux_g2'
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
hide = 'flux_g1 flux_g2'
[]
(test/tests/neutronics/dagmc/wrong_uo.i)
[Mesh]
[file]
type = FileMeshGenerator
file = ../meshes/tet_cube.e
[]
parallel_type = replicated
[]
[Problem]
type = OpenMCCellAverageProblem
cell_level = 0
temperature_blocks = '1'
power = 1000.0
skinner = moab
[Tallies]
[Mesh]
type = CellTally
blocks = '1'
[]
[]
[]
[UserObjects]
[moab]
type = NearestNodeNumberUO
point = '0.0 0.0 0.0'
[]
[]
[Executioner]
type = Steady
[]
(test/tests/neutronics/dagmc/density_skin/only_solid.i)
[Mesh]
type = FileMesh
file = ../mesh_tallies/slab.e
allow_renumbering = false
[]
[AuxVariables]
[density]
family = MONOMIAL
order = CONSTANT
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
initial_properties = xml
temperature_blocks = '1 2'
cell_level = 0
power = 100.0
skinner = moab
[Tallies]
[Mesh]
type = CellTally
blocks = '1 2'
[]
[]
[]
[UserObjects]
[moab]
type = MoabSkinner
# just one temperature bin
temperature_min = 0.0
temperature_max = 1000.0
n_temperature_bins = 1
temperature = temp
density_min = 0.0
density_max = 100.0
n_density_bins = 4
density = density
build_graveyard = true
[]
[]
[Executioner]
type = Steady
[]
(test/tests/openmc_errors/cell_instances/insufficient_materials/fluid.i)
[Mesh]
type = FileMesh
file = ../../../neutronics/meshes/pincell.e
[]
[Problem]
type = OpenMCCellAverageProblem
power = 500.0
temperature_blocks = '1 2 3'
density_blocks = '2'
verbose = true
cell_level = 1
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/heat_source/overlap_fluid.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100 200'
density_blocks = '200'
initial_properties = xml
# We are skipping some feedback with fissile regions, so we need to turn off the check
check_tally_sum = false
verbose = true
cell_level = 0
[Tallies]
[Cell]
type = CellTally
name = heat_source
# This input has fissile material in the solid phase, so we will get a warning
# that we are neglecting some of the global kappa-fission distribution; so here
# the power is the total power of the OpenMC problem, and only a fraction of this
# will be computed in the fluid
blocks = '200'
[]
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
[]
[fluid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '200'
[]
[solid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '100'
[]
[]
[Outputs]
exodus = true
csv = true
hide = 'density'
[]
(tutorials/pebbles/openmc.i)
[Mesh]
[pebble]
type = SphereMeshGenerator
nr = 2
radius = 0.015
[]
[repeat]
type = CombinerGenerator
inputs = pebble
positions = '0 0 0.02
0 0 0.06
0 0 0.10'
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1500.0
temperature_blocks = '0'
cell_level = 1
scaling = 100.0
[Tallies]
[heat_source]
type = CellTally
blocks = '0'
name = heat_source
[]
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
[]
[max_tally_rel_err]
type = TallyRelativeError
[]
[k]
type = KEigenvalue
[]
[]
(test/tests/neutronics/flux/flux.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100 200'
density_blocks = '200'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'heating'
[Tallies]
[Cell]
type = CellTally
score = 'heating flux'
blocks = '100 200'
[]
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[flux_pebble1]
type = PointValue
variable = flux
point = '0 0 0'
[]
[flux_pebble2]
type = PointValue
variable = flux
point = '0 0 4'
[]
[flux_pebble3]
type = PointValue
variable = flux
point = '0 0 8'
[]
[flux_fluid]
type = PointValue
variable = flux
point = '0 0 2'
[]
[]
[Outputs]
csv = true
[]
(doc/content/source/actions/multi_tally_example.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = mesh_in.e
[]
[]
[Problem]
type = OpenMCCellAverageProblem
particles = 10000
inactive_batches = 100
batches = 1000
initial_properties = xml
verbose = true
cell_level = 0
normalize_by_global_tally = true
check_tally_sum = true
power = 100.0
source_rate_normalization = 'heating_local'
[Tallies]
[Mesh_Tally]
type = MeshTally
score = 'flux'
[]
[Cell_Tally]
type = CellTally
score = 'heating_local'
[]
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = final
exodus = true
[]
(test/tests/openmc_errors/zero_tally/openmc.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
cell_level = 0
source_strength = 1e6
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
[Postprocessors]
[power]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
[]
[]
(test/tests/neutronics/fixed_source/overlap_solid.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
source_strength = 1e12
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
# we are omitting the fluid regions from feedback (which have some fissile material),
# so we need to explicitly skip the tally check
check_tally_sum = false
[Tallies]
[Cell]
type = CellTally
blocks = '100'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
[]
[heat_source_fluid]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
block = '200'
[]
[heat_source_solid]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
block = '100'
[]
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/filters/multi_filter.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
allow_renumbering = false
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
[Tallies]
[Heating]
type = CellTally
score = 'kappa_fission'
blocks = '100 200'
[]
[Flux]
type = CellTally
score = 'flux'
blocks = '100 200'
filters = 'Energy Polar'
[]
[]
[Filters]
[Energy]
type = EnergyFilter
# CASMO 2 group structure for testing. May result in some missed particles
energy_boundaries = '0.0 6.25e-1 2.0e7'
[]
[Polar]
type = PolarAngleFilter
num_equal_divisions = 2
[]
[]
[]
[Postprocessors]
[Pebble_1_Flux_g1_t1]
type = PointValue
point = '0 0 0'
variable = flux_g1_theta1
[]
[Pebble_1_Flux_g2_t1]
type = PointValue
point = '0 0 0'
variable = flux_g2_theta1
[]
[Pebble_1_Flux_g1_t2]
type = PointValue
point = '0 0 0'
variable = flux_g1_theta2
[]
[Pebble_1_Flux_g2_t2]
type = PointValue
point = '0 0 0'
variable = flux_g2_theta2
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/filters/polar/mesh_sum.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
allow_renumbering = false
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
# Disable global normalization since we have a loosely fitting mesh tally.
normalize_by_global_tally = false
[Tallies]
[Heating]
type = CellTally
score = 'kappa_fission'
blocks = '100'
[]
[Flux]
type = MeshTally
score = 'flux'
mesh_template = ../../meshes/sphere.e
mesh_translations = '0 0 0
0 0 4
0 0 8'
filters = 'Polar'
[]
[]
[Filters]
[Polar]
type = PolarAngleFilter
num_equal_divisions = 2
[]
[]
[]
[AuxVariables]
[flux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[total_flux]
type = SumAux
variable = flux
values = 'flux_theta1 flux_theta2'
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
hide = 'flux_theta1 flux_theta2'
[]
(test/tests/neutronics/dagmc/cell_tallies/with_scaling.i)
scale = 100.0
[Mesh]
[file]
type = FileMeshGenerator
file = scale_in.e
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[]
[Functions]
[temp]
type = ParsedFunction
expression = '500.0 + 10.0*x*${scale}'
[]
[]
[AuxKernels]
[temp]
type = FunctionAux
variable = temp
function = temp
execute_on = timestep_begin
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
scaling = ${scale}
temperature_blocks = '1 2'
cell_level = 0
power = 16.0
skinner = moab
[Tallies]
[Cell]
type = CellTally
blocks = '1 2'
[]
[]
[]
[UserObjects]
[moab]
type = MoabSkinner
temperature_min = 300.0
temperature_max = 1500.0
n_temperature_bins = 10
temperature = temp
build_graveyard = true
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/feedback/multi_component_density/openmc_incorrect_length.i)
[Mesh]
type = FileMesh
file = ../../meshes/pincell.e
[]
[ICs]
[density1]
type = ConstantIC
variable = density1
value = 800
blocks = '1 3'
[]
[density2]
type = ConstantIC
variable = density2
value = 600
blocks = '2'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 500.0
density_variables = 'density1; density2'
density_blocks = '1'
temperature_blocks = '1'
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Executioner]
type = Transient
[]
(test/tests/neutronics/feedback/multi_component_temp/openmc_incorrect_length.i)
[Mesh]
type = FileMesh
file = ../../meshes/pincell.e
[]
[ICs]
[solid_temp]
type = ConstantIC
variable = solid_temp
value = 800
blocks = '1 3'
[]
[fluid_temp]
type = ConstantIC
variable = fluid_temp
value = 600
blocks = '2'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 500.0
cell_level = 1
temperature_variables = 'solid_temp; fluid_temp'
temperature_blocks = '1'
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Executioner]
type = Transient
[]
(test/tests/neutronics/solid/openmc_missing_pebble.i)
# This is a vertical stack of three pebbles, with a 1 meter thick layer of flibe
# on the outer periphery and on the top and bottom, to get a k closer to 1.0.
#
# We check that we get an error if we forget one of the pebbles.
[Mesh]
[sphere]
# Mesh of a single pebble with outer radius of 1.5 (cm)
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[multiple]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 10.0
cell_level = 0
temperature_blocks = '1'
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Executioner]
type = Transient
[]
(test/tests/neutronics/relaxation/cell_tallies/output_fission_tally.i)
[Mesh]
[pebble]
type = FileMeshGenerator
file = ../../meshes/sphere_in_m.e
[]
[repeat]
type = CombinerGenerator
inputs = pebble
positions = '0 0 0.02
0 0 0.06
0 0 0.10'
[]
[set_block_ids]
type = SubdomainIDGenerator
input = repeat
subdomain_id = 0
[]
[]
[AuxKernels]
[temp]
type = FunctionAux
variable = temp
function = axial
execute_on = initial
[]
[]
[Functions]
[axial]
type = ParsedFunction
expression = '500 + z / 0.10 * 100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1500.0
temperature_blocks = '0'
cell_level = 1
scaling = 100.0
relaxation = constant
[Tallies]
[Cell]
type = CellTally
blocks = '0'
output = 'unrelaxed_tally'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 3
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/heat_source/overlap_solid.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100 200'
density_blocks = '200'
initial_properties = xml
# We are skipping some feedback with fissile regions, so we need to turn off the check
check_tally_sum = false
verbose = true
cell_level = 0
[Tallies]
[Cell]
type = CellTally
name = heat_source
# This input has fissile material in the fluid phase, so we will get a warning
# that we are neglecting some of the global kappa-fission distribution; so here
# the power is the total power of the OpenMC problem, and only a fraction of this
# will be computed in the solid pebbles
blocks = '100'
[]
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
[]
[fluid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '200'
[]
[solid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '100'
[]
[]
[Outputs]
exodus = true
csv = true
hide = 'density'
[]
(test/tests/controls/openmc_nuclide_densities/openmc.i)
[Mesh]
[g]
type = GeneratedMeshGenerator
dim = 3
nx = 8
ny = 8
nz = 8
xmin = -12.5
xmax = 87.5
ymin = -12.5
ymax = 37.5
zmin = -12.5
zmax = 12.5
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
cell_level = 0
power = 100.0
[Tallies]
[Cell]
type = CellTally
blocks = 0
[]
[]
[]
[UserObjects]
[mat1]
type = OpenMCNuclideDensities
material_id = 2
names = 'U235 U238'
# dummy values which do not get set, because the control will override these
densities = '0.0 0.0'
[]
[]
[Controls]
[c]
type = OpenMCNuclideDensitiesControl
user_object = mat1
names = 'U235 U238'
densities = '0.03 0.09'
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
[]
(test/tests/openmc_errors/level/phase_too_high/fluid_too_high.i)
[Mesh]
[sphere]
# Mesh of a single pebble with outer radius of 1.5 (cm)
type = FileMeshGenerator
file = ../../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../../../neutronics/heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 70.0
temperature_blocks = '100 200'
density_blocks = '200'
verbose = true
# skip the data transfer of temperature into OpenMC for the first time step
# so that we can just use the ICs set in OpenMCs XML files
initial_properties = xml
# For this setup, the fluid cells only exist on coordinate level 0, even though
# the highest coordinate level across the entire problem is 1
cell_level = 1
[Tallies]
[Cell]
type = CellTally
blocks = '100 200'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
[]
(test/tests/controls/openmc_nuclide_densities/error.i)
[Mesh]
[g]
type = GeneratedMeshGenerator
dim = 3
nx = 8
ny = 8
nz = 8
xmin = -12.5
xmax = 87.5
ymin = -12.5
ymax = 37.5
zmin = -12.5
zmax = 12.5
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
temperature_blocks = '0'
cell_level = 0
power = 100.0
[Tallies]
[Cell]
type = CellTally
blocks = 0
[]
[]
[]
[UserObjects]
[mat1]
type = OpenMCNuclideDensities
material_id = 1
names = 'U235'
densities = '0.02'
[]
[]
[Controls]
[c]
type = OpenMCNuclideDensitiesControl
user_object = none
names = 'U235'
densities = '0.01'
[]
[]
[Executioner]
type = Steady
[]
(test/tests/neutronics/relaxation/cell_tallies/dufek_gudowski.i)
[Mesh]
[pebble]
type = FileMeshGenerator
file = ../../meshes/sphere_in_m.e
[]
[repeat]
type = CombinerGenerator
inputs = pebble
positions = '0 0 0.02
0 0 0.06
0 0 0.10'
[]
[set_block_ids]
type = SubdomainIDGenerator
input = repeat
subdomain_id = 0
[]
[]
[AuxKernels]
[temp]
type = FunctionAux
variable = temp
function = axial
execute_on = initial
[]
[]
[Functions]
[axial]
type = ParsedFunction
expression = '500 + z / 0.10 * 100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 100.0
temperature_blocks = '0'
cell_level = 1
scaling = 100.0
relaxation = dufek_gudowski
first_iteration_particles = 1000
[Tallies]
[Cell]
type = CellTally
blocks = '0'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 3
[]
[Outputs]
csv = true
exodus = true
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
[]
[p1]
type = PointValue
variable = kappa_fission
point = '0.0 0.0 0.02'
[]
[p2]
type = PointValue
variable = kappa_fission
point = '0.0 0.0 0.06'
[]
[p3]
type = PointValue
variable = kappa_fission
point = '0.0 0.0 0.10'
[]
[]
(test/tests/neutronics/tallies/reaction_rates/openmc.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
source_strength = 1e6
temperature_blocks = '100 200'
density_blocks = '200'
cell_level = 0
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
score = 'absorption fission scatter total'
blocks = '100 200'
[]
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[total_abs]
type = ElementIntegralVariablePostprocessor
variable = absorption
[]
[fluid_abs]
type = PointValue
variable = absorption
point = '0.0 0.0 2.0'
[]
[pebble1_abs]
type = PointValue
variable = absorption
point = '0.0 0.0 0.0'
[]
[pebble2_abs]
type = PointValue
variable = absorption
point = '0.0 0.0 4.0'
[]
[pebble3_abs]
type = PointValue
variable = absorption
point = '0.0 0.0 8.0'
[]
[max_err_abs]
type = TallyRelativeError
tally_score = 'absorption'
[]
[total_fis]
type = ElementIntegralVariablePostprocessor
variable = fission
[]
[fluid_fis]
type = PointValue
variable = fission
point = '0.0 0.0 2.0'
[]
[pebble1_fis]
type = PointValue
variable = fission
point = '0.0 0.0 0.0'
[]
[pebble2_fis]
type = PointValue
variable = fission
point = '0.0 0.0 4.0'
[]
[pebble3_fis]
type = PointValue
variable = fission
point = '0.0 0.0 8.0'
[]
[max_err_fis]
type = TallyRelativeError
tally_score = 'fission'
[]
[total_sca]
type = ElementIntegralVariablePostprocessor
variable = scatter
[]
[fluid_sca]
type = PointValue
variable = scatter
point = '0.0 0.0 2.0'
[]
[pebble1_sca]
type = PointValue
variable = scatter
point = '0.0 0.0 0.0'
[]
[pebble2_sca]
type = PointValue
variable = scatter
point = '0.0 0.0 4.0'
[]
[pebble3_sca]
type = PointValue
variable = scatter
point = '0.0 0.0 8.0'
[]
[max_err_sca]
type = TallyRelativeError
tally_score = 'scatter'
[]
[total_tot]
type = ElementIntegralVariablePostprocessor
variable = total
[]
[fluid_tot]
type = PointValue
variable = total
point = '0.0 0.0 2.0'
[]
[pebble1_tot]
type = PointValue
variable = total
point = '0.0 0.0 0.0'
[]
[pebble2_tot]
type = PointValue
variable = total
point = '0.0 0.0 4.0'
[]
[pebble3_tot]
type = PointValue
variable = total
point = '0.0 0.0 8.0'
[]
[max_err_tot]
type = TallyRelativeError
tally_score = 'total'
[]
[]
[Outputs]
execute_on = final
csv = true
[]
(test/tests/neutronics/feedback/multi_component_density/openmc.i)
[Mesh]
[file]
type = FileMeshGenerator
file = ../../meshes/pincell.e
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 500.0
cell_level = 1
verbose = true
density_variables = 'density1'
density_blocks = '1; 2 3'
temperature_blocks = '1 2 3'
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/relaxation/cell_tallies/multi_tally.i)
[Mesh]
[pebble]
type = FileMeshGenerator
file = ../../meshes/sphere_in_m.e
[]
[repeat]
type = CombinerGenerator
inputs = pebble
positions = '0 0 0.02
0 0 0.10'
[]
[set_block_ids]
type = SubdomainIDGenerator
input = repeat
subdomain_id = 0
[]
[]
[AuxKernels]
[temp]
type = FunctionAux
variable = temp
function = axial
execute_on = initial
[]
[]
[Functions]
[axial]
type = ParsedFunction
expression = '500 + z / 0.10 * 100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1500.0
temperature_blocks = '0'
cell_level = 1
scaling = 100.0
# our problem is missing overlap for fissile regions, so our local and global tallies
# wont match
check_tally_sum = false
[Tallies]
[Cell]
type = CellTally
score = 'kappa_fission heating'
name = 'heat_source heating'
blocks = '0'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 3
[]
[Outputs]
csv = true
[]
[Postprocessors]
[kf]
type = ElementIntegralVariablePostprocessor
variable = heat_source
[]
[peb1_kf]
type = PointValue
variable = heat_source
point = '0 0 0.02'
[]
[peb2_kf]
type = PointValue
variable = heat_source
point = '0 0 0.10'
[]
[heating]
type = ElementIntegralVariablePostprocessor
variable = heating
[]
[peb1_ht]
type = PointValue
variable = heating
point = '0 0 0.02'
[]
[peb2_ht]
type = PointValue
variable = heating
point = '0 0 0.10'
[]
[]
(doc/content/source/problems/smallest_openmc_input.i)
[Mesh]
type = FileMesh
file = pincell.e
[]
[Problem]
type = OpenMCCellAverageProblem
power = 1000.0
temperature_blocks = '1 2 3'
density_blocks = '3'
cell_level = 0
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/feedback/lattice/openmc_scores.i)
[Mesh]
type = FileMesh
file = ../../meshes/pincell.e
[]
[Problem]
type = OpenMCCellAverageProblem
power = 500.0
temperature_blocks = '1 2 3'
density_blocks = '2'
cell_level = 1
check_tally_sum = false
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '1 2 3'
score = heating
name = heat_source
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
[]
[fluid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '2'
[]
[fuel_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '1'
[]
[clad_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '3'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/neutronics/filters/azimuthal/mesh.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
allow_renumbering = false
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
# Disable global normalization since we have a loosely fitting mesh tally.
normalize_by_global_tally = false
[Tallies]
[Heating]
type = CellTally
score = 'kappa_fission'
blocks = '100'
[]
[Flux]
type = MeshTally
score = 'flux'
mesh_template = ../../meshes/sphere.e
mesh_translations = '0 0 0
0 0 4
0 0 8'
filters = 'Azimuthal'
[]
[]
[Filters]
[Azimuthal]
type = AzimuthalAngleFilter
num_equal_divisions = 2
[]
[]
[]
[Postprocessors]
[Total_Flux_Omega1]
type = ElementIntegralVariablePostprocessor
variable = flux_omega1
[]
[Total_Flux_Omega2]
type = ElementIntegralVariablePostprocessor
variable = flux_omega2
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/dagmc/cell_tallies/one_bin.i)
[Mesh]
type = FileMesh
file = ../mesh_tallies/slab.e
allow_renumbering = false
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[]
[AuxKernels]
[temp]
type = ConstantAux
variable = temp
value = 500.0
execute_on = timestep_begin
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
temperature_blocks = '1 2'
cell_level = 0
power = 100.0
skinner = moab
[Tallies]
[Cell]
type = CellTally
blocks = '1 2'
[]
[]
[]
[UserObjects]
[moab]
type = MoabSkinner
temperature_min = 0.0
temperature_max = 1000.0
n_temperature_bins = 1
temperature = temp
build_graveyard = true
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
exodus = true
hide = 'temp cell_instance'
[]
(test/tests/neutronics/heat_source/partial_overlap_moose_union.i)
# In this input, MOOSEs domain contains the entire OpenMC domain, but some
# MOOSE elements arent mapped anywhere (this is facilitated by adding an
# extra pebble to the MOOSE mesh).
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8
9 9 9'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100 200'
density_blocks = '200'
initial_properties = xml
verbose = true
cell_level = 0
[Tallies]
[Cell]
type = CellTally
name = heat_source
blocks = '100 200'
[]
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
[]
[fluid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '200'
[]
[solid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '100'
[]
[]
[Outputs]
csv = true
exodus = true
hide = 'density'
[]
(test/tests/neutronics/solid/openmc_zero.i)
# This is a vertical stack of three pebbles, with a 1 meter thick layer of flibe
# on the outer periphery and on the top and bottom, to get a k closer to 1.0.
#
# This input just checks that setting a power of zero in the OpenMC model does not
# give any different results from a MOOSE-standalone case with zero power.
[Mesh]
[sphere]
# Mesh of a single pebble with outer radius of 1.5 (cm)
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[multiple]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 0.0
cell_level = 0
temperature_blocks = '1'
[Tallies]
[Cell]
type = CellTally
blocks = '1'
name = heat_source
[]
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/tally_system/multi_diff.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
allow_renumbering = false
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
# The global tally check is disabled because we have a loosely fitting unstructured mesh tally.
normalize_by_global_tally = false
source_rate_normalization = 'kappa_fission'
# Missing some hits in the model (only tallying a single pebble instead of 3)
check_tally_sum = false
[Tallies]
[Cell]
type = CellTally
score = 'kappa_fission'
blocks = '100'
[]
[Mesh]
type = MeshTally
score = 'flux'
mesh_translations = '0 0 0'
mesh_template = ../meshes/sphere.e
[]
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/openmc_nuclide_densities/no_change.i)
[Mesh]
[g]
type = GeneratedMeshGenerator
dim = 3
nx = 8
ny = 8
nz = 8
xmin = -12.5
xmax = 87.5
ymin = -12.5
ymax = 37.5
zmin = -12.5
zmax = 12.5
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temp
value = 500.0
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
temperature_blocks = '0'
cell_level = 0
power = 100.0
[Tallies]
[Cell]
type = CellTally
blocks = '0'
[]
[]
[]
[UserObjects]
[mat1]
type = OpenMCNuclideDensities
material_id = 1
names = 'U235'
densities = '0.02'
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/openmc_errors/block_mappings/skipping_moose_feedback.i)
# This input tests what happens if the OpenMC domain is fully enclosed in
# the MOOSE domain such that all OpenMC cells are coupled, but some MOOSE
# cells do not map anywhere in OpenMC. We should print a warning.
[Mesh]
[sphere]
# Mesh of a single pebble with outer radius of 1.5 (cm)
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
# Combine together to form four pebbles; this mesh would be the same as
# whatever is used to solve for the solid phase. One of these pebbles
# will be far outside the OpenMC domain, and will be unmapped
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8
9 9 9'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
# Mesh of the fluid phase; this mesh would be the same as whatever is used to
# solve for the fluid phase
type = FileMeshGenerator
file = stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 70.0
temperature_blocks = '100 200'
density_blocks = '200'
cell_level = 0
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '100'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/openmc_tally_nuclides/openmc.i)
[Mesh]
[g]
type = GeneratedMeshGenerator
dim = 3
nx = 8
ny = 8
nz = 8
xmin = -12.5
xmax = 87.5
ymin = -12.5
ymax = 37.5
zmin = -12.5
zmax = 12.5
[]
[]
[Problem]
type = OpenMCCellAverageProblem
cell_level = 0
power = 100.0
check_tally_sum = false
[Tallies]
[Cell]
type = CellTally
blocks = '0'
[]
[]
[]
[UserObjects]
[tally1]
type = OpenMCTallyNuclides
tally_id = 2
names = 'U238'
[]
[]
[Postprocessors]
[power_1]
type = PointValue
variable = kappa_fission
point = '0.0 -12.0 0.0'
[]
[power_2]
type = PointValue
variable = kappa_fission
point = '0.0 37.0 0.0'
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/feedback/triso/missing_triso_fill/openmc.i)
[Mesh]
[solid]
type = FileMeshGenerator
file = ../solid.e
[]
[change_block_ids_for_middle]
type = SubdomainBoundingBoxGenerator
input = solid
bottom_left = '-1.0 -1.0 0.05'
top_right = '1.0 1.0 0.07'
block_id = '5'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 2000.0
scaling = 100.0
temperature_blocks = '2 5'
cell_level = 1
# This input should error because the offset we compute for shifting cell instances
# in a TRISO universe cant account for the fact that we are skipping some of the
# TRISO universes from the tally setup
identical_cell_fills = '2'
check_identical_cell_fills = true
[Tallies]
[Cell]
type = CellTally
blocks = '2'
[]
[]
[]
[Executioner]
type = Transient
[]
(test/tests/neutronics/filters/azimuthal/mesh_sum.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
allow_renumbering = false
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
# Disable global normalization since we have a loosely fitting mesh tally.
normalize_by_global_tally = false
[Tallies]
[Heating]
type = CellTally
score = 'kappa_fission'
blocks = '100'
[]
[Flux]
type = MeshTally
score = 'flux'
mesh_template = ../../meshes/sphere.e
mesh_translations = '0 0 0
0 0 4
0 0 8'
filters = 'Azimuthal'
[]
[]
[Filters]
[Azimuthal]
type = AzimuthalAngleFilter
num_equal_divisions = 2
[]
[]
[]
[AuxVariables]
[flux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[total_flux]
type = SumAux
variable = flux
values = 'flux_omega1 flux_omega2'
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
hide = 'flux_omega1 flux_omega2'
[]
(test/tests/neutronics/symmetry/openmc.i)
num_layers = 1
channel_diameter = 0.016 # diameter of the coolant channels (m)
height = 6.343 # height of the full core (m)
[Mesh]
# mesh mirror for the solid regions
[solid]
type = FileMeshGenerator
file = solid_mesh_in.e
[]
# create a mesh for a single coolant channel; because we will receive uniform
# temperatures and densities on each x-y plane, we can use a very coarse
# mesh in the radial direction
[coolant_face]
type = AnnularMeshGenerator
nr = 1
nt = 8
rmin = 0.0
rmax = ${fparse channel_diameter / 2.0}
[]
[extrude]
type = AdvancedExtruderGenerator
input = coolant_face
num_layers = ${num_layers}
direction = '0 0 1'
heights = '${height}'
top_boundary = '300' # inlet
bottom_boundary = '400' # outlet
[]
[rename]
type = RenameBlockGenerator
input = extrude
old_block = '1'
new_block = '101'
[]
# repeat the coolant channels and then combine together to get a combined mesh mirror
[repeat]
type = CombinerGenerator
inputs = rename
positions_file = coolant_channel_positions.txt
[]
[add]
type = CombinerGenerator
inputs = 'solid repeat'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
initial_properties = 'xml'
power = 1000.0
scaling = 100.0
temperature_blocks = '1 2 101'
density_blocks = '101'
cell_level = 1
symmetry_mapper = sym
[Tallies]
[Cell]
type = CellTally
blocks = '2'
[]
[]
[]
[UserObjects]
[sym]
type = SymmetryPointGenerator
normal = '${fparse -sqrt(3.0) / 2.0} 0.5 0.0'
[]
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
[]
# check a few of the pins to be sure that the reflected heat source matches
[pin1_l]
type = PointValue
variable = kappa_fission
point = '0.0096 0.0489 4.0'
[]
[pin1_r]
type = PointValue
variable = kappa_fission
point = '0.0389 0.0326 4.0'
[]
[diff1]
type = DifferencePostprocessor
value1 = pin1_l
value2 = pin1_r
[]
[pin2_l]
type = PointValue
variable = kappa_fission
point = '-0.019 0.0329 4.0'
[]
[pin2_r]
type = PointValue
variable = kappa_fission
point = '0.0363 0.0 4.0'
[]
[diff2]
type = DifferencePostprocessor
value1 = pin2_l
value2 = pin2_r
[]
[pin3_l]
type = PointValue
variable = kappa_fission
point = '0.0463 0.115 4.0'
[]
[pin3_r]
type = PointValue
variable = kappa_fission
point = '0.0770 0.098 4.0'
[]
[diff3]
type = DifferencePostprocessor
value1 = pin3_l
value2 = pin3_r
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
csv = true
hide = 'pin1_l pin1_r pin2_l pin2_r pin3_l pin3_r'
[]
(test/tests/neutronics/dagmc/density_skin/openmc.i)
[Mesh]
type = FileMesh
file = ../mesh_tallies/slab.e
allow_renumbering = false
[]
x0 = 12.5
x1 = 37.5
x2 = 62.5
[AuxVariables]
[material_id]
family = MONOMIAL
order = CONSTANT
[]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[material_id]
type = CellMaterialIDAux
variable = material_id
[]
[cell_density]
type = CellDensityAux
variable = cell_density
[]
[]
rho0 = 600.0
drho = 50.0
[Functions]
[density]
type = ParsedFunction
expression = 'if (x <= ${x0}, ${fparse rho0 - drho}, if (x <= ${x1}, ${rho0}, if (x <= ${x2}, ${fparse rho0 + drho}, ${fparse rho0 + 2 * drho})))'
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temp
value = 500.0
[]
[]
[AuxKernels]
[density]
type = FunctionAux
variable = density
function = density
execute_on = timestep_begin
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
temperature_blocks = '1 2'
density_blocks = '1 2'
power = 100.0
skinner = moab
cell_level = 0
[Tallies]
[Mesh]
type = CellTally
blocks = '1 2'
[]
[]
[]
[UserObjects]
[moab]
type = MoabSkinner
# just one temperature bin
temperature_min = 0.0
temperature_max = 1000.0
n_temperature_bins = 1
temperature = temp
density_min = ${fparse rho0 - drho}
density_max = ${fparse rho0 + 2 * drho}
n_density_bins = 4
density = density
build_graveyard = true
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
exodus = true
hide = 'temp density cell_instance cell_id'
[]
(test/tests/openmc_errors/tallies/separate_tallies.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
cell_level = 0
assume_separate_tallies = true
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
(test/tests/openmc_errors/block_mappings/unequal_volumes.i)
[Mesh]
[sphere]
# Mesh of a single pebble with outer radius of 1.5 (cm)
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[sphere_shrunken]
# Mesh of a single pebble with outer radius of 1.4 (cm) - this approximates
# the effect of an OpenMC model have equal cell tally volumes but not mapping
# to identical volumes in the [Mesh]
type = TransformGenerator
input = sphere
transform = SCALE
vector_value = '0.93 0.93 0.93'
[]
[solid]
type = CombinerGenerator
inputs = 'sphere sphere_shrunken sphere'
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 70.0
temperature_blocks = '100'
verbose = true
cell_level = 0
[Tallies]
[Cell]
type = CellTally
blocks = '100'
check_equal_mapped_tally_volumes = true
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/eigenvalue/openmc.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100'
cell_level = 0
check_tally_sum = false
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '100'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[k_collision]
type = KEigenvalue
value_type = 'collision'
[]
[k_absorption]
type = KEigenvalue
value_type = 'absorption'
[]
[k_tracklength]
type = KEigenvalue
value_type = 'tracklength'
[]
[k_combined]
type = KEigenvalue
value_type = 'combined'
[]
[k_collision_std_dev]
type = KStandardDeviation
value_type = 'collision'
[]
[k_absorption_std_dev]
type = KStandardDeviation
value_type = 'absorption'
[]
[k_tracklength_std_dev]
type = KStandardDeviation
value_type = 'tracklength'
[]
[k_combined_std_dev]
type = KStandardDeviation
value_type = 'combined'
[]
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/heat_source/distrib_cell/solid.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100 200'
density_blocks = '200'
# This turns off the density and temperature update on the first syncSolutions;
# this uses whatever temperature and densities are set in OpenMCs XML files for first step
initial_properties = xml
verbose = true
cell_level = 0
[Tallies]
[Cell]
type = CellTally
name = heat_source
blocks = '100 200'
[]
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
[]
[]
[Outputs]
execute_on = final
exodus = true
hide = 'density'
[]
(test/tests/neutronics/filters/energy/mesh.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
allow_renumbering = false
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
# Disable global normalization since we have a loosely fitting mesh tally.
normalize_by_global_tally = false
[Tallies]
[Heating]
type = CellTally
score = 'kappa_fission'
blocks = '100'
[]
[Flux]
type = MeshTally
score = 'flux'
mesh_template = ../../meshes/sphere.e
mesh_translations = '0 0 0
0 0 4
0 0 8'
filters = 'Energy'
[]
[]
[Filters]
[Energy]
type = EnergyFilter
# CASMO 2 group structure for testing. May result in some missed particles
energy_boundaries = '0.0 6.25e-1 2.0e7'
[]
[]
[]
[Postprocessors]
[Total_Flux_1]
type = ElementIntegralVariablePostprocessor
variable = flux_g1
[]
[Total_Flux_2]
type = ElementIntegralVariablePostprocessor
variable = flux_g2
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/heat_source/overlap_all.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100 200'
density_blocks = '200'
verbose = true
cell_level = 0
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '100 200'
name = heat_source
[]
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
[]
[fluid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '200'
[]
[solid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '100'
[]
[]
[Outputs]
execute_on = final
exodus = true
hide = 'density'
[]
(test/tests/neutronics/filters/polar/mesh.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
allow_renumbering = false
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
# Disable global normalization since we have a loosely fitting mesh tally.
normalize_by_global_tally = false
[Tallies]
[Heating]
type = CellTally
score = 'kappa_fission'
blocks = '100'
[]
[Flux]
type = MeshTally
score = 'flux'
mesh_template = ../../meshes/sphere.e
mesh_translations = '0 0 0
0 0 4
0 0 8'
filters = 'Polar'
[]
[]
[Filters]
[Polar]
type = PolarAngleFilter
num_equal_divisions = 2
[]
[]
[]
[Postprocessors]
[Total_Flux_Theta1]
type = ElementIntegralVariablePostprocessor
variable = flux_theta1
[]
[Total_Flux_Theta2]
type = ElementIntegralVariablePostprocessor
variable = flux_theta2
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(tutorials/gas_compact_multiphysics/openmc_nek.i)
# This input file runs coupled OpenMC Monte Carlo transport, MOOSE heat
# conduction, and NekRS fluid flow and heat transfer.
# This input should be run with:
#
# cardinal-opt -i common_input.i openmc_nek.i
num_layers_for_THM = 150
density_blocks = 'coolant'
temperature_blocks = 'graphite compacts compacts_trimmer_tri'
fuel_blocks = 'compacts compacts_trimmer_tri'
unit_cell_power = ${fparse power / (n_bundles * n_coolant_channels_per_block) * unit_cell_height / height}
U_ref = ${fparse mdot / (n_bundles * n_coolant_channels_per_block) / fluid_density / (pi * channel_diameter * channel_diameter / 4.0)}
t0 = ${fparse channel_diameter / U_ref}
nek_dt = 6e-3
N = 1000
[Mesh]
[solid]
type = FileMeshGenerator
file = solid_mesh_in.e
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[cell_density]
type = CellDensityAux
variable = cell_density
[]
[density]
type = FluidDensityAux
variable = density
p = ${outlet_P}
T = nek_temp
fp = helium
execute_on = 'timestep_begin'
[]
[]
[FluidProperties]
[helium]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.668282 # should correspond to Cp = 5189 J/kg/K
k = 0.2556
mu = 3.22639e-5
[]
[]
[ICs]
[temp]
type = FunctionIC
variable = nek_temp
function = temp_ic
[]
[solid_temp]
type = FunctionIC
variable = solid_temp
function = temp_ic
[]
[]
[Functions]
[temp_ic]
type = ParsedFunction
expression = '${inlet_T} + z / ${unit_cell_height} * ${unit_cell_power} / (${mdot} / ${n_bundles} / ${n_coolant_channels_per_block}) / ${fluid_Cp}'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = ${unit_cell_power}
scaling = 100.0
density_blocks = ${density_blocks}
cell_level = 1
relaxation = robbins_monro
temperature_variables = 'solid_temp; nek_temp'
temperature_blocks = '${temperature_blocks}; ${density_blocks}'
k_trigger = std_dev
k_trigger_threshold = 7.5e-4
batches = 40
max_batches = 100
batch_interval = 5
[Tallies]
[heat_source]
type = CellTally
blocks = ${fuel_blocks}
name = heat_source
check_equal_mapped_tally_volumes = true
trigger = rel_err
trigger_threshold = 1e-2
output = 'unrelaxed_tally_std_dev'
[]
[]
[]
[Executioner]
type = Transient
dt = ${fparse N * nek_dt * t0}
# This is somewhat loose, and you should use a tighter tolerance for production runs;
# we use 1e-2 to obtain a faster tutorial
steady_state_detection = true
check_aux = true
steady_state_tolerance = 1e-2
[]
[MultiApps]
[bison]
type = TransientMultiApp
input_files = 'solid_nek.i'
execute_on = timestep_end
sub_cycling = true
[]
[]
[Transfers]
[solid_temp_to_openmc]
type = MultiAppGeometricInterpolationTransfer
source_variable = T
variable = solid_temp
from_multi_app = bison
[]
[source_to_bison]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = heat_source
variable = power
to_multi_app = bison
from_postprocessors_to_be_preserved = heat_source
to_postprocessors_to_be_preserved = power
[]
[temp_from_nek]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = nek_bulk_temp
from_multi_app = bison
variable = nek_temp
[]
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
execute_on = 'transfer initial timestep_end'
[]
[max_tally_err]
type = TallyRelativeError
value_type = max
[]
[k]
type = KEigenvalue
[]
[k_std_dev]
type = KStandardDeviation
[]
[min_power]
type = ElementExtremeValue
variable = heat_source
value_type = min
block = ${fuel_blocks}
[]
[max_power]
type = ElementExtremeValue
variable = heat_source
value_type = max
block = ${fuel_blocks}
[]
[]
[UserObjects]
[average_power_axial]
type = LayeredAverage
variable = heat_source
direction = z
num_layers = ${num_layers_for_plots}
block = ${fuel_blocks}
[]
[]
[VectorPostprocessors]
[power_avg]
type = SpatialUserObjectVectorPostprocessor
userobject = average_power_axial
[]
[]
[Outputs]
[out]
type = Exodus
hide = 'solid_temp nek_temp'
[]
[csv]
type = CSV
file_base = 'csv_nek/openmc_nek'
[]
[]
(test/tests/neutronics/feedback/multiple_levels/openmc.i)
[Mesh]
[pincell]
type = FileMeshGenerator
file = ../../meshes/pincell.e
[]
[delete_block]
type = BlockDeletionGenerator
input = pincell
block = 2
[]
[add_surrounding]
type = FileMeshGenerator
file = surrounding.e
[]
[translate_surrounding]
type = TransformGenerator
input = add_surrounding
transform = translate
vector_value = '0.0 0.0 5.0'
[]
[combine]
type = CombinerGenerator
inputs = 'delete_block translate_surrounding'
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
execute_on = 'timestep_end'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 500.0
# In the OpenMC model script, we set the fuel temperature to 500, the clad temperature
# to 450, and the exterior temperature to 300. Checking that the temperatures obtained with
# CellTemperatureAux match these values will confirm that the correct cell level is
# fetched in the exterior region, which is at a level of 0 (greater than the lowest_cell_level).
initial_properties = xml
# block 5 should map to an OpenMC region on level 0 in the geometry; by setting
# the lowest cell level, we will just map to level 0 in this region instead of 1.
temperature_blocks = '1 3 5'
lowest_cell_level = 1
verbose = true
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
# makes the gold files smaller, since these are not of concern for the test
hide = 'temp kappa_fission'
[]
(test/tests/neutronics/triggers/ignore_zeros/ignore_zero.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
source_strength = 1e6
verbose = true
temperature_blocks = '100 200'
density_blocks = '200'
cell_level = 0
initial_properties = xml
max_batches = 200
[Tallies]
[Cell]
type = CellTally
score = 'H3_production'
blocks = '100 200'
trigger = 'rel_err'
# If tally bins with zeros are ignored, this will fire immediately since
# the fluid region doesn't have a tritium production score.
trigger_threshold = '1.0'
trigger_ignore_zeros = 'true'
[]
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[max_err]
type = TallyRelativeError
tally_score = 'H3_production'
[]
[]
[Outputs]
execute_on = final
csv = true
[]
(test/tests/neutronics/relaxation/cell_tallies/openmc_nonaligned.i)
[Mesh]
[pebble]
type = FileMeshGenerator
file = ../../meshes/sphere_in_m.e
[]
[repeat]
type = CombinerGenerator
inputs = pebble
positions = '0 0 0.02
0 0 0.10'
[]
[set_block_ids]
type = SubdomainIDGenerator
input = repeat
subdomain_id = 0
[]
[]
[AuxKernels]
[temp]
type = FunctionAux
variable = temp
function = axial
execute_on = initial
[]
[]
[Functions]
[axial]
type = ParsedFunction
expression = '500 + z / 0.10 * 100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1500.0
temperature_blocks = '0'
cell_level = 1
scaling = 100.0
# our problem is missing overlap for fissile regions, so our local and global tallies
# wont match
check_tally_sum = false
[Tallies]
[Cell]
type = CellTally
blocks = '0'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 3
[]
[Outputs]
csv = true
exodus = true
[]
[Postprocessors]
[p1]
type = PointValue
variable = kappa_fission
point = '0.0 0.0 0.02'
[]
[p2]
type = PointValue
variable = kappa_fission
point = '0.0 0.0 0.10'
[]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
[]
[]
(test/tests/neutronics/tally_system/multi_cell.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[AuxVariables]
[cell_volume]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_volume]
type = CellVolumeAux
variable = cell_volume
volume_type = mapped
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
[Tallies]
[Cell_1]
type = CellTally
score = kappa_fission
blocks = '100 200'
[]
[Cell_2]
type = CellTally
score = flux
blocks = '100 200'
[]
[]
[]
[Postprocessors]
[Pebble_1_Vol]
type = PointValue
point = '0 0 0'
variable = cell_volume
[]
[Pebble_2_Vol]
type = PointValue
point = '0 0 4'
variable = cell_volume
[]
[Pebble_3_Vol]
type = PointValue
point = '0 0 8'
variable = cell_volume
[]
[Pebble_1_Heat]
type = PointValue
point = '0 0 0'
variable = kappa_fission
[]
[Pebble_2_Heat]
type = PointValue
point = '0 0 4'
variable = kappa_fission
[]
[Pebble_3_Heat]
type = PointValue
point = '0 0 8'
variable = kappa_fission
[]
[Pebble_1_Flux]
type = PointValue
point = '0 0 0'
variable = flux
[]
[Pebble_2_Flux]
type = PointValue
point = '0 0 4'
variable = flux
[]
[Pebble_3_Flux]
type = PointValue
point = '0 0 8'
variable = flux
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/filters/xml/cell.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
allow_renumbering = false
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
check_tally_sum = false
normalize_by_global_tally = true
[Tallies]
[Heating]
type = CellTally
score = 'kappa_fission'
blocks = '100 200'
[]
[Flux]
type = CellTally
score = 'flux'
blocks = '100 200'
filters = 'SPH_XML'
[]
[]
[Filters]
[SPH_XML]
type = FromXMLFilter
filter_id = 1
bin_label = 'sph'
allow_expansion_filters = true
[]
[]
[]
[Postprocessors]
[Pebble_1_Flux_l0_m0]
type = PointValue
point = '0 0 0'
variable = flux_sph1
[]
[Pebble_1_Flux_l1_mn1]
type = PointValue
point = '0 0 0'
variable = flux_sph2
[]
[Pebble_1_Flux_l1_m0]
type = PointValue
point = '0 0 0'
variable = flux_sph3
[]
[Pebble_1_Flux_l1_m1]
type = PointValue
point = '0 0 0'
variable = flux_sph4
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/tally_system/multi_cell_triggers.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
max_batches = 200
[Tallies]
[Cell_1]
type = CellTally
score = kappa_fission
blocks = '100 200'
trigger = rel_err
trigger_threshold = 1e-2
[]
[Cell_2]
type = CellTally
score = flux
blocks = '100 200'
trigger = rel_err
trigger_threshold = 1e-2
[]
[]
[]
[Postprocessors]
[Pebble_1_Heat]
type = PointValue
point = '0 0 0'
variable = kappa_fission
[]
[Pebble_2_Heat]
type = PointValue
point = '0 0 4'
variable = kappa_fission
[]
[Pebble_3_Heat]
type = PointValue
point = '0 0 8'
variable = kappa_fission
[]
[Pebble_1_Flux]
type = PointValue
point = '0 0 0'
variable = flux
[]
[Pebble_2_Flux]
type = PointValue
point = '0 0 4'
variable = flux
[]
[Pebble_3_Flux]
type = PointValue
point = '0 0 8'
variable = flux
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/openmc_errors/block_mappings/multiple_tally_settings.i)
# This input tests what happens if an OpenMC cell maps to multiple subdomains for
# which the tally settings are different.
[Mesh]
[sphere]
# Mesh of a single pebble with outer radius of 1.5 (cm)
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8.5'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
# Mesh of the fluid phase; this mesh would be the same as whatever is used to
# solve for the fluid phase
type = FileMeshGenerator
file = stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 70.0
temperature_blocks = '100 200'
cell_level = 0
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '100'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/dagmc/cell_tallies/csg_step_2/openmc.i)
[Mesh]
type = FileMesh
file = ../../mesh_tallies/slab.e
[]
x0 = 12.5
x1 = 37.5
x2 = 62.5
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[]
T0 = 600.0
dT = 50.0
[Functions]
[temp]
type = ParsedFunction
expression = 'if (x <= ${x0}, ${fparse T0 - dT}, if (x <= ${x1}, ${T0}, if (x <= ${x2}, ${fparse T0 + dT}, ${fparse T0 + 2 * dT})))'
[]
[]
[AuxKernels]
[temp]
type = FunctionAux
variable = temp
function = temp
execute_on = timestep_begin
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
temperature_blocks = '1 2'
cell_level = 0
power = 100.0
[Tallies]
[Cell]
type = CellTally
blocks = '1 2'
[]
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/feedback/interchangeable/openmc.i)
[Mesh]
[3d]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 2
xmin = -12.5
xmax = 87.5
ymin = -12.5
ymax = 37.5
zmin = -12.5
zmax = 12.5
[]
[upper_block]
type = ParsedSubdomainMeshGenerator
input = 3d
combinatorial_geometry = 'y > 12.5'
block_id = 1
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[material_id]
family = MONOMIAL
order = CONSTANT
[]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[material_id]
type = CellMaterialIDAux
variable = material_id
[]
[cell_density]
type = CellDensityAux
variable = cell_density
[]
[]
[ICs]
active = ''
[temp]
type = ConstantIC
variable = temp
value = 300.0
[]
[density]
type = ConstantIC
variable = density
value = 15.0e3
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
cell_level = 0
power = 1.0
[Tallies]
[Cell]
type = CellTally
blocks = '0 1'
[]
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[power_0]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
block = '0'
[]
[power_1]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
block = '1'
[]
[id_0]
type = ElementAverageValue
variable = cell_id
block = '0'
[]
[id_1]
type = ElementAverageValue
variable = cell_id
block = '1'
[]
[instance_0]
type = ElementAverageValue
variable = cell_instance
block = '0'
[]
[instance_1]
type = ElementAverageValue
variable = cell_instance
block = '1'
[]
[temp_0]
type = ElementAverageValue
variable = cell_temperature
block = '0'
[]
[temp_1]
type = ElementAverageValue
variable = cell_temperature
block = '1'
[]
[rho_0]
type = ElementAverageValue
variable = cell_density
block = '0'
[]
[rho_1]
type = ElementAverageValue
variable = cell_density
block = '1'
[]
[mat_0]
type = ElementAverageValue
variable = material_id
block = '0'
[]
[mat_1]
type = ElementAverageValue
variable = material_id
block = '1'
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/heat_source/default_tally_blocks.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100 200'
density_blocks = '200'
verbose = true
cell_level = 0
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
name = heat_source
blocks = '100 200'
[]
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
[]
[fluid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '200'
[]
[solid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '100'
[]
[]
[Outputs]
execute_on = final
exodus = true
hide = 'density'
[]
(test/tests/openmc_errors/incorrect_aux_setup/incorrect_var_type.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8
9 9 9'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[]
[AuxVariables]
[cell_id_n]
[]
[]
[AuxKernels]
[cell_id_n]
type = CellIDAux
variable = cell_id_n
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 70.0
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '100'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/filters/xml/mesh.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
allow_renumbering = false
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
check_tally_sum = false
normalize_by_global_tally = true
[Tallies]
[Heating]
type = CellTally
score = 'kappa_fission'
blocks = '100'
[]
[Flux]
type = MeshTally
score = 'flux'
mesh_template = ../../meshes/sphere.e
mesh_translations = '0 0 0
0 0 4
0 0 8'
filters = 'SPH_XML'
[]
[]
[Filters]
[SPH_XML]
type = FromXMLFilter
filter_id = 1
bin_label = 'sph'
allow_expansion_filters = true
[]
[]
[]
[Postprocessors]
[Total_Flux_l0_m0]
type = ElementIntegralVariablePostprocessor
variable = flux_sph1
[]
[Total_Flux_l1_mn1]
type = ElementIntegralVariablePostprocessor
variable = flux_sph2
[]
[Total_Flux_l1_m0]
type = ElementIntegralVariablePostprocessor
variable = flux_sph3
[]
[Total_Flux_l1_m1]
type = ElementIntegralVariablePostprocessor
variable = flux_sph4
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(tutorials/lwr_solid/openmc.i)
[Mesh]
[file]
type = FileMeshGenerator
file = mesh_in.e
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = ${fparse 3000e6 / 273 / (17 * 17)}
temperature_blocks = '1 2 3'
cell_level = 0
volume_calculation = vol
[Tallies]
[heat_source]
type = CellTally
blocks = '2 3'
name = heat_source
[]
[]
[]
[UserObjects]
[vol]
type = OpenMCVolumeCalculation
n_samples = 100000
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
[]
[max_tally_rel_err]
type = TallyRelativeError
[]
[max_heat_source]
type = ElementExtremeValue
variable = heat_source
[]
[]
(test/tests/neutronics/feedback/different_units/openmc_cm.i)
[Mesh]
type = FileMesh
file = sphere_in_cm.e
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[material_id]
family = MONOMIAL
order = CONSTANT
[]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[material_id]
type = CellMaterialIDAux
variable = material_id
[]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
execute_on = 'timestep_end'
[]
[cell_density]
type = CellDensityAux
variable = cell_density
execute_on = 'timestep_end'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e6
temperature_blocks = '1'
density_blocks = '1'
cell_level = 0
[Tallies]
[Cell]
type = CellTally
blocks = '1'
name = 'heat_source'
[]
[]
[]
[Executioner]
type = Transient
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
[]
[]
[Outputs]
exodus = true
[]
(tutorials/gas_assembly/openmc.i)
num_layers_for_THM = 50 # number of elements in the THM model; for the converged
# case, we set this to 150
[Mesh]
# mesh mirror for the solid regions
[solid]
type = FileMeshGenerator
file = solid_mesh_in.e
[]
# create a mesh for a single coolant channel; because we will receive uniform
# temperatures and densities from THM on each x-y plane, we can use a very coarse
# mesh in the radial direction
[coolant_face]
type = AnnularMeshGenerator
nr = 1
nt = 8
rmin = 0.0
rmax = ${fparse channel_diameter / 2.0}
[]
[extrude]
type = AdvancedExtruderGenerator
input = coolant_face
num_layers = ${num_layers_for_THM}
direction = '0 0 1'
heights = '${height}'
top_boundary = '300' # inlet
bottom_boundary = '400' # outlet
[]
[rename]
type = RenameBlockGenerator
input = extrude
old_block = '1'
new_block = '101'
[]
# repeat the coolant channels and then combine together to get a combined mesh mirror
[repeat]
type = CombinerGenerator
inputs = rename
positions_file = coolant_channel_positions.txt
[]
[add]
type = CombinerGenerator
inputs = 'solid repeat'
[]
[]
[AuxVariables]
[material_id]
family = MONOMIAL
order = CONSTANT
[]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[thm_temp_wall]
block = '101'
[]
[flux]
[]
# just for postprocessing purposes
[thm_pressure]
block = '101'
[]
[thm_velocity]
block = '101'
[]
[z]
family = MONOMIAL
order = CONSTANT
block = 'compacts'
[]
[]
[AuxKernels]
[material_id]
type = CellMaterialIDAux
variable = material_id
[]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[cell_density]
type = CellDensityAux
variable = cell_density
[]
[density]
type = FluidDensityAux
variable = density
p = ${outlet_P}
T = thm_temp
fp = helium
execute_on = 'timestep_begin linear'
[]
[z]
type = ParsedAux
variable = z
use_xyzt = true
expression = 'z'
[]
[]
[ICs]
[fluid_temp_wall]
type = FunctionIC
variable = thm_temp_wall
function = temp_ic
[]
[fluid_temp]
type = FunctionIC
variable = thm_temp
function = temp_ic
[]
[heat_source]
type = ConstantIC
variable = heat_source
block = 'compacts'
value = ${fparse power / (n_bundles * n_fuel_compacts_per_block) / (pi * compact_diameter * compact_diameter / 4.0 * height)}
[]
[]
[Functions]
[temp_ic]
type = ParsedFunction
expression = '${inlet_T} + (${height} - z) / ${height} * ${power} / ${mdot} / ${fluid_Cp}'
[]
[]
[FluidProperties]
[helium]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.668282 # should correspond to Cp = 5189 J/kg/K
k = 0.2556
mu = 3.22639e-5
[]
[]
[Problem]
type = OpenMCCellAverageProblem
identical_cell_fills = '2'
power = ${fparse power / n_bundles}
scaling = 100.0
cell_level = 1
relaxation = constant
relaxation_factor = 0.5
# to get a faster-running tutorial, we use only 1000 particles per batch; converged
# results are instead obtained by increasing this parameter to 10000. We also use fewer
# batches to speed things up; the converged results were obtained with 500 inactive batches
# and 2000 active batches
particles = 1000
inactive_batches = 200
batches = 1000
# we will read temperature from THM (for the fluid) and MOOSE (for the solid)
# into variables we name as 'solid_temp' and 'thm_temp'. This syntax will automatically
# create those variabes for us
temperature_variables = 'solid_temp; thm_temp'
temperature_blocks = '1 2 4; 101'
density_blocks = '101'
[Tallies]
[heat_source]
type = CellTally
blocks = '2'
name = heat_source
check_equal_mapped_tally_volumes = true
output = 'unrelaxed_tally_std_dev'
[]
[]
[]
[MultiApps]
[bison]
type = TransientMultiApp
input_files = 'solid.i'
execute_on = timestep_begin
[]
[thm]
type = FullSolveMultiApp
input_files = 'thm.i'
execute_on = timestep_end
max_procs_per_app = 1
bounding_box_padding = '0.1 0.1 0'
positions_file = coolant_channel_positions.txt
output_in_position = true
[]
[]
[Transfers]
[solid_temp_to_openmc]
type = MultiAppGeometricInterpolationTransfer
source_variable = T
variable = solid_temp
from_multi_app = bison
[]
[heat_flux_to_openmc]
type = MultiAppGeneralFieldNearestLocationTransfer
source_variable = flux
variable = flux
from_multi_app = bison
from_boundaries = 'fluid_solid_interface'
to_boundaries = 'fluid_solid_interface'
from_postprocessors_to_be_preserved = flux_integral
to_postprocessors_to_be_preserved = flux_integral
[]
[source_to_bison]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = heat_source
variable = power
to_multi_app = bison
from_postprocessors_to_be_preserved = heat_source
to_postprocessors_to_be_preserved = power
[]
[thm_temp_to_bison]
type = MultiAppGeometricInterpolationTransfer
source_variable = thm_temp_wall
variable = thm_temp
to_multi_app = bison
[]
[q_wall_to_thm]
type = MultiAppGeneralFieldUserObjectTransfer
variable = q_wall
to_multi_app = thm
source_user_object = q_wall_avg
[]
[T_wall_from_thm]
type = MultiAppGeneralFieldNearestLocationTransfer
source_variable = T_wall
from_multi_app = thm
variable = thm_temp_wall
to_boundaries = 'fluid_solid_interface'
[]
[T_bulk_from_thm]
type = MultiAppGeneralFieldNearestLocationTransfer
source_variable = T
from_multi_app = thm
variable = thm_temp
[]
# just for postprocessing purposes
[pressure_from_thm]
type = MultiAppGeneralFieldNearestLocationTransfer
source_variable = p
from_multi_app = thm
variable = thm_pressure
[]
[velocity_from_thm]
type = MultiAppGeneralFieldNearestLocationTransfer
source_variable = vel_z
from_multi_app = thm
variable = thm_velocity
[]
[]
[UserObjects]
[q_wall_avg]
type = NearestPointLayeredSideAverage
boundary = 'fluid_solid_interface'
variable = flux
# Note: make this to match the num_elems in the channel
direction = z
num_layers = ${num_layers_for_THM}
points_file = coolant_channel_positions.txt
direction_min = 0.0
direction_max = ${height}
[]
[average_power_axial]
type = LayeredAverage
variable = heat_source
direction = z
num_layers = ${num_layers_for_plots}
block = 'compacts'
[]
[average_fluid_axial]
type = LayeredAverage
variable = thm_temp
direction = z
num_layers = ${num_layers_for_plots}
block = '101'
[]
[average_pressure]
type = LayeredAverage
variable = thm_pressure
direction = z
num_layers = ${num_layers_for_plots}
block = '101'
[]
[average_axial_velocity]
type = LayeredAverage
variable = thm_velocity
direction = z
num_layers = ${num_layers_for_plots}
block = '101'
[]
[]
[VectorPostprocessors]
[power_avg]
type = SpatialUserObjectVectorPostprocessor
userobject = average_power_axial
[]
[fluid_avg]
type = SpatialUserObjectVectorPostprocessor
userobject = average_fluid_axial
[]
[pressure_avg]
type = SpatialUserObjectVectorPostprocessor
userobject = average_pressure
[]
[velocity_avg]
type = SpatialUserObjectVectorPostprocessor
userobject = average_axial_velocity
[]
[]
[Postprocessors]
[flux_integral]
type = SideIntegralVariablePostprocessor
variable = flux
boundary = 'fluid_solid_interface'
execute_on = 'transfer linear'
[]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
execute_on = 'transfer initial timestep_end'
[]
[max_tally_rel_err]
type = TallyRelativeError
value_type = max
[]
[k]
type = KEigenvalue
[]
[k_std_dev]
type = KStandardDeviation
[]
[min_power]
type = ElementExtremeValue
variable = heat_source
value_type = min
block = 'compacts'
[]
[max_power]
type = ElementExtremeValue
variable = heat_source
value_type = max
block = 'compacts'
[]
[z_max_power]
type = ElementExtremeValue
proxy_variable = heat_source
variable = z
block = 'compacts'
[]
[max_Tf]
type = ElementExtremeValue
variable = thm_temp
block = '101'
[]
[P_in]
type = SideAverageValue
variable = thm_pressure
boundary = '300'
[]
[pressure_drop]
type = LinearCombinationPostprocessor
pp_names = 'P_in'
pp_coefs = '1.0'
b = '${fparse -outlet_P}'
[]
[]
[Executioner]
type = Transient
num_steps = 10
[]
[Outputs]
exodus = true
csv = true
hide = 'P_in flux_integral z'
[]
(tutorials/pincell_multiphysics/openmc.i)
inlet_T = 573.0 # inlet temperature
power = 1e3 # total power (W)
Re = 500.0 # Reynolds number
outlet_P = 1e6
height = 0.5 # total height of the domain
Df = 0.825e-2 # fuel diameter
pin_diameter = 0.97e-2 # pin outer diameter
pin_pitch = 1.28e-2 # pin pitch
mu = 8.8e-5 # fluid dynamic viscosity
rho = 723.6 # fluid density
Cp = 5512.0 # fluid isobaric specific heat capacity
Rf = ${fparse Df / 2.0}
flow_area = ${fparse pin_pitch * pin_pitch - pi * pin_diameter * pin_diameter / 4.0}
wetted_perimeter = ${fparse pi * pin_diameter}
hydraulic_diameter = ${fparse 4.0 * flow_area / wetted_perimeter}
U_ref = ${fparse Re * mu / rho / hydraulic_diameter}
mdot = ${fparse rho * U_ref * flow_area}
dT = ${fparse power / mdot / Cp}
[Mesh]
[solid]
type = FileMeshGenerator
file = solid_in.e
[]
[]
[AuxVariables]
# These auxiliary variables are all just for visualizing the solution and
# the mapping - none of these are part of the calculation sequence
[material_id]
family = MONOMIAL
order = CONSTANT
[]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[material_id]
type = CellMaterialIDAux
variable = material_id
[]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[cell_density]
type = CellDensityAux
variable = cell_density
[]
[density]
type = FluidDensityAux
variable = density
p = ${outlet_P}
T = nek_temp
fp = sodium
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[FluidProperties]
[sodium]
type = SodiumSaturationFluidProperties
[]
[]
[ICs]
[nek_temp]
type = FunctionIC
variable = nek_temp
function = temp_ic
[]
[solid_temp]
type = FunctionIC
variable = solid_temp
function = temp_ic
[]
[heat_source]
type = ConstantIC
variable = heat_source
block = '2'
value = ${fparse power / (pi * Rf * Rf * height)}
[]
[]
[Functions]
[temp_ic]
type = ParsedFunction
expression = '${inlet_T} + z / ${height} * ${dT}'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = ${power}
scaling = 100.0
density_blocks = '1'
cell_level = 0
# This automatically creates these variables and will read from the non-default choice of 'temp'
temperature_variables = 'solid_temp; nek_temp'
temperature_blocks = '2 3; 1'
relaxation = robbins_monro
# Set some parameters for when we terminate the OpenMC solve in each iteration;
# this will run a minimum of 30 batches, and after that, terminate once reaching
# the specified std. dev. of k and rel. err. of the fission tally
inactive_batches = 20
batches = 30
k_trigger = std_dev
k_trigger_threshold = 7.5e-4
batch_interval = 50
max_batches = 1000
[Tallies]
[heat_source]
type = CellTally
blocks = '2'
name = heat_source
check_equal_mapped_tally_volumes = true
trigger = rel_err
trigger_threshold = 2e-2
output = unrelaxed_tally_std_dev
[]
[]
[]
[MultiApps]
[bison]
type = TransientMultiApp
input_files = 'bison.i'
execute_on = timestep_begin
sub_cycling = true
[]
[]
[Transfers]
[solid_temp_to_openmc]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = T
variable = solid_temp
from_multi_app = bison
[]
[source_to_bison]
type = MultiAppCopyTransfer
source_variable = heat_source
variable = power
to_multi_app = bison
[]
[temp_from_nek]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = nek_temp
from_multi_app = bison
variable = nek_temp
[]
[]
[Outputs]
exodus = true
csv = true
[]
[Executioner]
type = Transient
dt = 0.5
num_steps = 10
[]
[Postprocessors]
[max_tally_rel_err]
type = TallyRelativeError
value_type = max
[]
[k]
type = KEigenvalue
[]
[k_std_dev]
type = KStandardDeviation
[]
[]
(test/tests/neutronics/photon/openmc.i)
[Mesh]
type = FileMesh
file = ../meshes/pincell.e
[]
[Problem]
type = OpenMCCellAverageProblem
power = 500.0
cell_level = 1
[Tallies]
[Cell]
type = CellTally
blocks = '1'
score = 'heating'
estimator = tracklength
[]
[]
[]
[Executioner]
type = Transient
[]
(test/tests/openmc_errors/cell_instances/insufficient_materials/solid.i)
[Mesh]
type = FileMesh
file = ../../../neutronics/meshes/pincell.e
[]
[Problem]
type = OpenMCCellAverageProblem
power = 500.0
temperature_blocks = '2'
cell_level = 1
verbose = true
check_tally_sum = false
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '2'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/volume_calculation/instances/openmc.i)
[Mesh]
type = FileMesh
file = ../../../neutronics/meshes/pincell.e
[]
[AuxVariables]
[cell_vol]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_vol]
type = CellVolumeAux
variable = cell_vol
volume_type = actual
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 500.0
temperature_blocks = '1 2 3'
density_blocks = '2'
verbose = true
cell_level = 1
volume_calculation = vol
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '1'
name = heat_source
[]
[]
[]
[UserObjects]
[vol]
type = OpenMCVolumeCalculation
n_samples = 1000
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[p1]
type = PointValue
variable = cell_vol
point = '0.0 0.0 0.5'
[]
[p2]
type = PointValue
variable = cell_vol
point = '0.0 0.0 1.5'
[]
[p3]
type = PointValue
variable = cell_vol
point = '0.0 0.0 2.5'
[]
[p4]
type = PointValue
variable = cell_vol
point = '0.0 0.0 3.5'
[]
[p5]
type = PointValue
variable = cell_vol
point = '0.0 0.0 4.5'
[]
[p6]
type = PointValue
variable = cell_vol
point = '0.0 0.0 5.5'
[]
[p7]
type = PointValue
variable = cell_vol
point = '0.0 0.0 6.5'
[]
[p8]
type = PointValue
variable = cell_vol
point = '0.0 0.0 7.5'
[]
[p9]
type = PointValue
variable = cell_vol
point = '0.0 0.0 8.5'
[]
[p10]
type = PointValue
variable = cell_vol
point = '0.0 0.0 9.5'
[]
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/tally_system/multi_estimator.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
[Tallies]
[Cell_1]
type = CellTally
score = kappa_fission
blocks = '100 200'
estimator = tracklength
[]
[Cell_2]
type = CellTally
score = flux
blocks = '100 200'
estimator = collision
[]
[]
[]
[Postprocessors]
[Pebble_1_Heat]
type = PointValue
point = '0 0 0'
variable = kappa_fission
[]
[Pebble_2_Heat]
type = PointValue
point = '0 0 4'
variable = kappa_fission
[]
[Pebble_3_Heat]
type = PointValue
point = '0 0 8'
variable = kappa_fission
[]
[Pebble_1_Flux]
type = PointValue
point = '0 0 0'
variable = flux
[]
[Pebble_2_Flux]
type = PointValue
point = '0 0 4'
variable = flux
[]
[Pebble_3_Flux]
type = PointValue
point = '0 0 8'
variable = flux
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(tutorials/gas_compact_multiphysics/openmc_thm.i)
# This input file runs coupled OpenMC Monte Carlo transport, MOOSE heat
# conduction, and THM fluid flow and heat transfer.
# This input should be run with:
#
# cardinal-opt -i common_input.i openmc_thm.i
num_layers_for_THM = 150
num_layers = 50
density_blocks = 'coolant'
temperature_blocks = 'graphite compacts compacts_trimmer_tri'
fuel_blocks = 'compacts compacts_trimmer_tri'
unit_cell_power = ${fparse power / (n_bundles * n_coolant_channels_per_block) * unit_cell_height / height}
[Mesh]
[solid]
type = FileMeshGenerator
file = solid_mesh_in.e
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[thm_temp_wall]
family = MONOMIAL
order = CONSTANT
block = ${density_blocks}
[]
[flux]
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[cell_density]
type = CellDensityAux
variable = cell_density
[]
[density]
type = FluidDensityAux
variable = density
p = ${outlet_P}
T = thm_temp
fp = helium
execute_on = 'timestep_begin linear'
[]
[]
[FluidProperties]
[helium]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.668282 # should correspond to Cp = 5189 J/kg/K
k = 0.2556
mu = 3.22639e-5
[]
[]
[ICs]
[fluid_temp_wall]
type = FunctionIC
variable = thm_temp_wall
function = temp_ic
[]
[fluid_temp]
type = FunctionIC
variable = thm_temp
function = temp_ic
[]
[heat_source]
type = ConstantIC
variable = heat_source
block = ${fuel_blocks}
value = ${fparse unit_cell_power / (2.0 * pi * compact_diameter * compact_diameter / 4.0 * unit_cell_height)}
[]
[]
[Functions]
[temp_ic]
type = ParsedFunction
expression = '${inlet_T} + z / ${unit_cell_height} * ${unit_cell_power} / (${mdot} / ${n_bundles} / ${n_coolant_channels_per_block}) / ${fluid_Cp}'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = ${unit_cell_power}
scaling = 100.0
density_blocks = ${density_blocks}
cell_level = 1
relaxation = robbins_monro
temperature_variables = 'solid_temp; thm_temp'
temperature_blocks = '${temperature_blocks}; ${density_blocks}'
k_trigger = std_dev
k_trigger_threshold = 7.5e-4
batches = 40
max_batches = 100
batch_interval = 5
[Tallies]
[heat_source]
type = CellTally
blocks = ${fuel_blocks}
name = heat_source
check_equal_mapped_tally_volumes = true
trigger = rel_err
trigger_threshold = 1e-2
output = 'unrelaxed_tally_std_dev'
[]
[]
[]
[Executioner]
type = Transient
# We use a fairly loose tolerance here for a tutorial; you may consider increasing this
# for production runs
steady_state_detection = true
check_aux = true
steady_state_tolerance = 5e-3
[]
[MultiApps]
[bison]
type = TransientMultiApp
input_files = 'solid_thm.i'
execute_on = timestep_begin
[]
[thm]
type = FullSolveMultiApp
input_files = 'thm.i'
execute_on = timestep_end
max_procs_per_app = 1
bounding_box_padding = '0.1 0.1 0'
[]
[]
[Transfers]
[solid_temp_to_openmc]
type = MultiAppGeometricInterpolationTransfer
source_variable = T
variable = solid_temp
from_multi_app = bison
[]
[heat_flux_to_openmc]
type = MultiAppGeneralFieldNearestLocationTransfer
source_variable = flux
variable = flux
from_multi_app = bison
from_boundaries = 'fluid_solid_interface'
to_boundaries = 'fluid_solid_interface'
from_postprocessors_to_be_preserved = flux_integral
to_postprocessors_to_be_preserved = flux_integral
[]
[source_to_bison]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = heat_source
variable = power
to_multi_app = bison
from_postprocessors_to_be_preserved = heat_source
to_postprocessors_to_be_preserved = power
[]
[thm_temp_to_bison]
type = MultiAppGeometricInterpolationTransfer
source_variable = thm_temp_wall
variable = fluid_temp
to_multi_app = bison
[]
[q_wall_to_thm]
type = MultiAppGeneralFieldUserObjectTransfer
variable = q_wall
to_multi_app = thm
source_user_object = q_wall_avg
[]
[T_wall_from_thm]
type = MultiAppGeneralFieldNearestLocationTransfer
source_variable = T_wall
from_multi_app = thm
variable = thm_temp_wall
[]
[T_bulk_from_thm]
type = MultiAppGeneralFieldNearestLocationTransfer
source_variable = T
from_multi_app = thm
variable = thm_temp
[]
[]
[Postprocessors]
[flux_integral]
type = SideIntegralVariablePostprocessor
variable = flux
boundary = 'fluid_solid_interface'
execute_on = 'transfer'
[]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
execute_on = 'transfer initial timestep_end'
[]
[max_tally_err]
type = TallyRelativeError
value_type = max
[]
[k]
type = KEigenvalue
[]
[k_std_dev]
type = KStandardDeviation
[]
[min_power]
type = ElementExtremeValue
variable = heat_source
value_type = min
block = ${fuel_blocks}
[]
[max_power]
type = ElementExtremeValue
variable = heat_source
value_type = max
block = ${fuel_blocks}
[]
[]
[AuxVariables]
[q_wall]
[]
[]
[AuxKernels]
[q_wall]
type = SpatialUserObjectAux
variable = q_wall
user_object = q_wall_avg
[]
[]
[UserObjects]
[q_wall_avg]
type = LayeredSideAverage
boundary = fluid_solid_interface
variable = flux
# Note: make this to match the num_elems in the channel
direction = z
num_layers = ${num_layers_for_THM}
direction_min = 0.0
direction_max = ${unit_cell_height}
[]
[average_power_axial]
type = LayeredAverage
variable = heat_source
direction = z
num_layers = ${num_layers}
block = ${fuel_blocks}
[]
[]
[VectorPostprocessors]
[power_avg]
type = SpatialUserObjectVectorPostprocessor
userobject = average_power_axial
[]
[]
[Outputs]
exodus = true
[csv]
type = CSV
file_base = 'csv_thm/openmc_thm'
[]
[]
(test/tests/neutronics/heat_source/multi_tally.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100 200'
density_blocks = '200'
verbose = true
cell_level = 0
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
score = 'kappa_fission heating'
blocks = '100 200'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[kappa_fission]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
[]
[fluid_kappa_fission]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
block = '200'
[]
[solid_kappa_fission]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
block = '100'
[]
[heating]
type = ElementIntegralVariablePostprocessor
variable = heating
[]
[fluid_heating]
type = ElementIntegralVariablePostprocessor
variable = heating
block = '200'
[]
[solid_heating]
type = ElementIntegralVariablePostprocessor
variable = heating
block = '100'
[]
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/filters/energy/cell.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
allow_renumbering = false
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
[Tallies]
[Heating]
type = CellTally
score = 'kappa_fission'
blocks = '100 200'
[]
[Flux]
type = CellTally
score = 'flux'
blocks = '100 200'
filters = 'Energy'
[]
[]
[Filters]
[Energy]
type = EnergyFilter
# CASMO 2 group structure for testing. May result in some missed particles
[]
[]
[]
[Postprocessors]
[Pebble_1_Flux_1]
type = PointValue
point = '0 0 0'
variable = flux_g1
[]
[Pebble_2_Flux_1]
type = PointValue
point = '0 0 4'
variable = flux_g1
[]
[Pebble_3_Flux_1]
type = PointValue
point = '0 0 8'
variable = flux_g1
[]
[Pebble_1_Flux_2]
type = PointValue
point = '0 0 0'
variable = flux_g2
[]
[Pebble_2_Flux_2]
type = PointValue
point = '0 0 4'
variable = flux_g2
[]
[Pebble_3_Flux_2]
type = PointValue
point = '0 0 8'
variable = flux_g2
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/dagmc/cell_tallies/csg_step_1/openmc.i)
[Mesh]
type = FileMesh
file = ../../mesh_tallies/slab.e
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[material_id]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[material_id]
type = CellMaterialIDAux
variable = material_id
[]
[]
[AuxKernels]
[temp]
type = ConstantAux
variable = temp
value = 500.0
execute_on = timestep_begin
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
temperature_blocks = '1 2'
cell_level = 0
power = 100.0
[Tallies]
[Cell]
type = CellTally
blocks = '1 2'
[]
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/openmc_errors/material_mappings/materials.i)
# This input tests what happens if an OpenMC material maps to more than one phase
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../block_mappings/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 70.0
temperature_blocks = '100 200'
density_blocks = '200'
cell_level = 0
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '100'
[]
[]
[]
[Executioner]
type = Transient
[]
(test/tests/userobjects/openmc_nuclide_densities/thermal_density.i)
[Mesh]
[g]
type = GeneratedMeshGenerator
dim = 3
nx = 8
ny = 8
nz = 8
xmin = -12.5
xmax = 87.5
ymin = -12.5
ymax = 37.5
zmin = -12.5
zmax = 12.5
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temp
value = 500.0
[]
[density]
type = ConstantIC
variable = density
value = 500.0
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
temperature_blocks = '0'
density_blocks = '0'
cell_level = 0
power = 100.0
[Tallies]
[Cell]
type = CellTally
blocks = '0'
[]
[]
[]
[UserObjects]
[mat1]
type = OpenMCNuclideDensities
material_id = 1
names = 'U235 U238'
densities = '0.01 0.02'
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/relaxation/cell_tallies/openmc.i)
[Mesh]
[pebble]
type = FileMeshGenerator
file = ../../meshes/sphere_in_m.e
[]
[repeat]
type = CombinerGenerator
inputs = pebble
positions = '0 0 0.02
0 0 0.06
0 0 0.10'
[]
[set_block_ids]
type = SubdomainIDGenerator
input = repeat
subdomain_id = 0
[]
[]
[AuxKernels]
[temp]
type = FunctionAux
variable = temp
function = axial
execute_on = initial
[]
[]
[Functions]
[axial]
type = ParsedFunction
expression = '500 + z / 0.10 * 100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 100.0
temperature_blocks = '0'
cell_level = 1
scaling = 100.0
volume_calculation = vol
[Tallies]
[Cell]
type = CellTally
blocks = '0'
[]
[]
[]
[UserObjects]
[vol]
type = OpenMCVolumeCalculation
n_samples = 1000
[]
[]
[Executioner]
type = Transient
num_steps = 3
[]
[Outputs]
csv = true
exodus = true
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
[]
[p1]
type = PointValue
variable = kappa_fission
point = '0.0 0.0 0.02'
[]
[p2]
type = PointValue
variable = kappa_fission
point = '0.0 0.0 0.06'
[]
[p3]
type = PointValue
variable = kappa_fission
point = '0.0 0.0 0.10'
[]
[]
(test/tests/neutronics/feedback/single_level/openmc.i)
[Mesh]
type = FileMesh
file = ../../meshes/pincell.e
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[material_id]
family = MONOMIAL
order = CONSTANT
[]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[material_id]
type = CellMaterialIDAux
variable = material_id
[]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
execute_on = 'timestep_end'
[]
[cell_density]
type = CellDensityAux
variable = cell_density
execute_on = 'timestep_end'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 500.0
temperature_blocks = '1 2 3'
density_blocks = '2'
verbose = true
cell_level = 0
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Executioner]
type = Transient
[]
[Postprocessors]
[kappa_fission]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
[]
[fluid_kappa_fission]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
block = '2'
[]
[solid_kappa_fission]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
block = '1 3'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/source/openmc.i)
[Mesh]
[file]
type = FileMeshGenerator
file = mesh_in.e
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temp
value = 600.0
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = ${fparse 3000e6 / 273 / (17 * 17)}
temperature_blocks = '1 2 3'
cell_level = 0
reuse_source = true
[Tallies]
[Cell]
type = CellTally
blocks = '2 3'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 3
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/heat_source/from_postprocessor.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Postprocessors]
[p]
type = Receiver
default = 100.0
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = p
temperature_blocks = '100 200'
density_blocks = '200'
verbose = true
cell_level = 0
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '100 200'
name = heat_source
[]
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
[]
[fluid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '200'
[]
[solid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '100'
[]
[]
[Outputs]
execute_on = final
exodus = true
hide = 'density p'
[]
(test/tests/userobjects/openmc_nuclide_densities/only_density.i)
[Mesh]
[g]
type = GeneratedMeshGenerator
dim = 3
nx = 8
ny = 8
nz = 8
xmin = -12.5
xmax = 87.5
ymin = -12.5
ymax = 37.5
zmin = -12.5
zmax = 12.5
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temp
value = 500.0
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
temperature_blocks = '0'
cell_level = 0
power = 100.0
[Tallies]
[Cell]
type = CellTally
blocks = '0'
[]
[]
[]
[UserObjects]
[mat1]
type = OpenMCNuclideDensities
material_id = 1
names = 'U235'
densities = '0.04'
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/feedback/multi_component_temp/openmc.i)
[Mesh]
type = FileMesh
file = ../../meshes/pincell.e
[]
[AuxVariables]
[cell_temp]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temp]
type = CellTemperatureAux
variable = cell_temp
[]
[]
[ICs]
[solid_temp]
type = ConstantIC
variable = solid_temp
value = 800
[]
[fluid_temp]
type = ConstantIC
variable = fluid_temp
value = 600
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 500.0
cell_level = 1
verbose = true
temperature_variables = 'solid_temp; fluid_temp'
temperature_blocks = '1 3; 2'
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[max_temp_1]
type = ElementExtremeValue
variable = cell_temp
value_type = max
block = '1'
[]
[min_temp_1]
type = ElementExtremeValue
variable = cell_temp
value_type = min
block = '1'
[]
[max_temp_2]
type = ElementExtremeValue
variable = cell_temp
value_type = max
block = '2'
[]
[min_temp_2]
type = ElementExtremeValue
variable = cell_temp
value_type = min
block = '2'
[]
[max_temp_3]
type = ElementExtremeValue
variable = cell_temp
value_type = max
block = '3'
[]
[min_temp_3]
type = ElementExtremeValue
variable = cell_temp
value_type = min
block = '3'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/neutronics/fixed_source/overlap_all.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
source_strength = 1e12
temperature_blocks = '100 200'
density_blocks = '200'
cell_level = 0
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '100 200'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
[]
[heat_source_fluid]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
block = '200'
[]
[heat_source_solid]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
block = '100'
[]
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/heat_source/multi_tally_overlap_solid.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100 200'
density_blocks = '200'
verbose = true
cell_level = 0
normalize_by_global_tally = false
check_tally_sum = false
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
score = 'kappa_fission heating'
blocks = '100'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[kappa_fission]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
[]
[fluid_kappa_fission]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
block = '200'
[]
[solid_kappa_fission]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
block = '100'
[]
[heating]
type = ElementIntegralVariablePostprocessor
variable = heating
[]
[fluid_heating]
type = ElementIntegralVariablePostprocessor
variable = heating
block = '200'
[]
[solid_heating]
type = ElementIntegralVariablePostprocessor
variable = heating
block = '100'
[]
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/feedback/triso/cache/openmc.i)
l = 0.2
h = 1.0
[Mesh]
[solid]
type = GeneratedMeshGenerator
dim = 3
xmin = ${fparse -l / 2.0}
xmax = ${fparse l / 2.0}
ymin = ${fparse -l / 2.0}
ymax = ${fparse l / 2.0}
zmin = 0.0
zmax = ${h}
nx = 4
ny = 4
nz = 20
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = solid
combinatorial_geometry = 'z < ${fparse h / 2.0}'
block_id = 100
[]
[]
[ICs]
[temp]
type = FunctionIC
variable = temp
function = temp
[]
[]
[Functions]
[temp]
type = ParsedFunction
expression = 450.0
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
scaling = 100.0
temperature_blocks = '0 100'
lowest_cell_level = 1
[Tallies]
[Cell]
type = CellTally
blocks = '0 100'
score = heating_local
[]
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/dagmc/properties.i)
[Mesh]
[file]
type = FileMeshGenerator
file = ../meshes/tet_cube.e
[]
parallel_type = replicated
[]
[Problem]
type = OpenMCCellAverageProblem
cell_level = 0
temperature_blocks = '1'
power = 1000.0
skinner = moab
initial_properties = hdf5
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[UserObjects]
[moab]
type = MoabSkinner
temperature = temp
n_temperature_bins = 1
temperature_min = 0.0
temperature_max = 100.0
[]
[]
[Executioner]
type = Steady
[]
(test/tests/neutronics/feedback/lattice/openmc.i)
[Mesh]
type = FileMesh
file = ../../meshes/pincell.e
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[material_id]
family = MONOMIAL
order = CONSTANT
[]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[material_id]
type = CellMaterialIDAux
variable = material_id
[]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
execute_on = 'timestep_end'
[]
[cell_density]
type = CellDensityAux
variable = cell_density
execute_on = 'timestep_end'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 500.0
temperature_blocks = '1 2 3'
density_blocks = '2'
cell_level = 1
[Tallies]
[Cell]
type = CellTally
blocks = '1'
name = heat_source
[]
[]
[]
[Executioner]
type = Transient
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
[]
[fluid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '2'
[]
[solid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '1 3'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/feedback/materials/openmc.i)
[Mesh]
type = FileMesh
file = ../../meshes/pincell.e
[]
[ICs]
[temp]
type = FunctionIC
variable = temp
function = temp
[]
[density]
type = FunctionIC
variable = density
function = density
[]
[]
[Functions]
[temp]
type = ParsedFunction
expression = '500'
[]
[density]
type = ParsedFunction
expression = '800+z*10'
[]
[]
[AuxVariables]
[material_id]
family = MONOMIAL
order = CONSTANT
[]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[material_id]
type = CellMaterialIDAux
variable = material_id
[]
[cell_density]
type = CellDensityAux
variable = cell_density
execute_on = 'timestep_end'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 500.0
temperature_blocks = '1 2 3'
density_blocks = '2'
cell_level = 0
map_density_by_cell = false
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Postprocessors]
[avg_density]
type = ElementAverageValue
variable = density
block = '2'
[]
[rho1]
type = PointValue
variable = cell_density
point = '0.5 0 1.5'
[]
[rho2]
type = PointValue
variable = cell_density
point = '0.5 0 8.5'
[]
[mat1]
type = PointValue
variable = material_id
point = '0.5 0 1.5'
[]
[mat2]
type = PointValue
variable = material_id
point = '0.5 0 8.5'
[]
[k]
type = KEigenvalue
value_type = collision
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/openmc_errors/densities/zero_density.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -2
xmax = 2
ymin = -2
ymax = 2
zmin = -2
zmax = 10
nx = 5
ny = 5
nz = 5
[]
[AuxVariables]
[dummy]
[]
[]
[AuxKernels]
[dummy]
type = ConstantAux
variable = dummy
value = 0.0
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temp
value = 500.0
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '0'
density_blocks = '0'
verbose = true
cell_level = 0
[Tallies]
[Cell]
type = CellTally
blocks = '0'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/dagmc/cell_tallies/openmc.i)
[Mesh]
type = FileMesh
file = ../mesh_tallies/slab.e
allow_renumbering = false
[]
x0 = 12.5
x1 = 37.5
x2 = 62.5
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[]
T0 = 600.0
dT = 50.0
[Functions]
[temp]
type = ParsedFunction
expression = 'if (x <= ${x0}, ${fparse T0 - dT}, if (x <= ${x1}, ${T0}, if (x <= ${x2}, ${fparse T0 + dT}, ${fparse T0 + 2 * dT})))'
[]
[]
[AuxKernels]
[temp]
type = FunctionAux
variable = temp
function = temp
execute_on = timestep_begin
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
temperature_blocks = '1 2'
cell_level = 0
power = 100.0
skinner = moab
[Tallies]
[Cell]
type = CellTally
blocks = '1 2'
[]
[]
[]
[UserObjects]
[moab]
type = MoabSkinner
temperature_min = ${fparse T0 - dT}
temperature_max = ${fparse T0 + 2 * dT}
n_temperature_bins = 4
temperature = temp
build_graveyard = true
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/volume_calculation/no_vol.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[]
[AuxVariables]
[cell_vol]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_vol]
type = CellVolumeAux
variable = cell_vol
volume_type = actual
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100'
cell_level = 0
check_tally_sum = false
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '100'
name = heat_source
[]
[]
[]
[Executioner]
type = Steady
[]
[UserObjects]
[vol]
type = OpenMCVolumeCalculation
n_samples = 10000
[]
[]
(test/tests/neutronics/triggers/multi_rel_err.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
batches = 20
cell_level = 0
normalize_by_global_tally = false
max_batches = 200
[Tallies]
[Cell]
type = CellTally
blocks = '100'
score = 'damage_energy kappa_fission'
trigger = 'rel_err rel_err'
trigger_threshold = '2e-2 2e-2'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[max_err_kf]
type = TallyRelativeError
tally_score = 'kappa_fission'
[]
[max_err_de]
type = TallyRelativeError
tally_score = 'damage_energy'
[]
[]
[Outputs]
csv = true
[]
(test/tests/userobjects/volume_calculation/scaling.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../../neutronics/heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[scale]
type = TransformGenerator
input = combine
transform = scale
vector_value = '0.01 0.01 0.01'
[]
[]
[AuxVariables]
[cell_vol]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_vol]
type = CellVolumeAux
variable = cell_vol
volume_type = actual
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100 200'
density_blocks = '200'
verbose = true
scaling = 100.0
cell_level = 0
initial_properties = xml
volume_calculation = vol
[Tallies]
[Cell]
type = CellTally
blocks = '100 200'
name = heat_source
[]
[]
[]
[Executioner]
type = Steady
[]
[UserObjects]
[vol]
type = OpenMCVolumeCalculation
n_samples = 10000
[]
[]
[Postprocessors]
[vol_1]
type = PointValue
variable = cell_vol
point = '0.0 0.0 0.0'
[]
[vol_2]
type = PointValue
variable = cell_vol
point = '0.0 0.0 0.04'
[]
[vol_3]
type = PointValue
variable = cell_vol
point = '0.0 0.0 0.08'
[]
[vol_4]
type = PointValue
variable = cell_vol
point = '0.0 0.0 0.02'
[]
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/dagmc/cell_tallies/null_density.i)
[Mesh]
type = FileMesh
file = ../mesh_tallies/slab.e
allow_renumbering = false
[]
x0 = 12.5
x1 = 37.5
x2 = 62.5
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[]
T0 = 600.0
dT = 50.0
[Functions]
[temp]
type = ParsedFunction
expression = 'if (x <= ${x0}, ${fparse T0 - dT}, if (x <= ${x1}, ${T0}, if (x <= ${x2}, ${fparse T0 + dT}, ${fparse T0 + 2 * dT})))'
[]
[]
[AuxKernels]
[temp]
type = FunctionAux
variable = temp
function = temp
execute_on = timestep_begin
[]
[]
[ICs]
[density]
type = ConstantIC
variable = density
value = 11000.0
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
temperature_blocks = '1 2'
density_blocks = '1 2'
cell_level = 0
power = 100.0
skinner = moab
[Tallies]
[Cell]
type = CellTally
blocks = '1 2'
[]
[]
[]
[UserObjects]
[moab]
type = MoabSkinner
temperature_min = ${fparse T0 - dT}
temperature_max = ${fparse T0 + 2 * dT}
n_temperature_bins = 4
temperature = temp
build_graveyard = true
# Effectively no density skinning at all, because theres just one bin.
# Results should be the same as if there was no density skinning enabled.
density_min = 0.0
density_max = 15000.0
n_density_bins = 1
density = density
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
exodus = true
hide = 'density cell_instance'
[]
(test/tests/neutronics/filters/mesh_sum_gold.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
allow_renumbering = false
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
# Disable global normalization since we have a loosely fitting mesh tally.
normalize_by_global_tally = false
[Tallies]
[Heating]
type = CellTally
score = 'kappa_fission'
blocks = '100'
[]
[Flux]
type = MeshTally
score = 'flux'
mesh_template = ../meshes/sphere.e
mesh_translations = '0 0 0
0 0 4
0 0 8'
[]
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/fission_tally_relative_error/ratio.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
cell_level = 0
check_tally_sum = false
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '1'
score = 'heating kappa_fission'
output = 'unrelaxed_tally_std_dev'
[]
[]
[]
# the ratio of the std_dev variable and the output tally should give
# the relative error in the tallies.out
[AuxVariables]
[heating_rel_err]
family = MONOMIAL
order = CONSTANT
[]
[kappa_fission_rel_err]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[heating]
type = ParsedAux
variable = heating_rel_err
expression = 'heating_std_dev / heating'
coupled_variables = 'heating_std_dev heating'
[]
[kappa_fission]
type = ParsedAux
variable = kappa_fission_rel_err
expression = 'kappa_fission_std_dev / kappa_fission'
coupled_variables = 'kappa_fission_std_dev kappa_fission'
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[heating_max]
type = ElementExtremeValue
value_type = max
variable = heating_rel_err
[]
[heating_min]
type = ElementExtremeValue
value_type = min
variable = heating_rel_err
[]
[kf_max]
type = ElementExtremeValue
value_type = max
variable = kappa_fission_rel_err
[]
[kf_min]
type = ElementExtremeValue
value_type = min
variable = kappa_fission_rel_err
[]
[max_ht]
type = TallyRelativeError
value_type = max
tally_score = 'heating'
[]
[min_ht]
type = TallyRelativeError
value_type = min
tally_score = 'heating'
[]
[avg_ht]
type = TallyRelativeError
value_type = average
tally_score = 'heating'
[]
[max_kf]
type = TallyRelativeError
value_type = max
tally_score = 'kappa_fission'
[]
[min_kf]
type = TallyRelativeError
value_type = min
tally_score = 'kappa_fission'
[]
[avg_kf]
type = TallyRelativeError
value_type = average
tally_score = 'kappa_fission'
[]
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/heat_source/partial_overlap_openmc_union.i)
# In this input, OpenMCs domain includes the entire MOOSE domain, but some
# OpenMC cells are not mapped anywhere (we treat this by removing one sphere
# from the MOOSE mesh).
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100 200'
density_blocks = '200'
initial_properties = xml
# We are skipping some feedback with fissile regions, so we need to turn off the check
check_tally_sum = false
verbose = true
cell_level = 0
[Tallies]
[Cell]
type = CellTally
name = heat_source
blocks = '100 200'
[]
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
[]
[fluid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '200'
[]
[solid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
block = '100'
[]
[]
[Outputs]
exodus = true
csv = true
hide = 'density'
[]
(test/tests/neutronics/filters/polar/cell.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
allow_renumbering = false
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
[Tallies]
[Heating]
type = CellTally
score = 'kappa_fission'
blocks = '100 200'
[]
[Flux]
type = CellTally
score = 'flux'
blocks = '100 200'
filters = 'Polar'
[]
[]
[Filters]
[Polar]
type = PolarAngleFilter
[]
[]
[]
[Postprocessors]
[Pebble_1_Flux_Theta1]
type = PointValue
point = '0 0 0'
variable = flux_theta1
[]
[Pebble_2_Flux_Theta1]
type = PointValue
point = '0 0 4'
variable = flux_theta2
[]
[Pebble_3_Flux_Theta1]
type = PointValue
point = '0 0 8'
variable = flux_theta1
[]
[Pebble_1_Flux_Theta2]
type = PointValue
point = '0 0 0'
variable = flux_theta2
[]
[Pebble_2_Flux_Theta2]
type = PointValue
point = '0 0 4'
variable = flux_theta1
[]
[Pebble_3_Flux_Theta2]
type = PointValue
point = '0 0 8'
variable = flux_theta2
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/tally_system/multi_cell_relax.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[AuxKernels]
[temp]
type = FunctionAux
variable = temp
function = axial
execute_on = initial
[]
[]
[Functions]
[axial]
type = ParsedFunction
expression = '500 + z / 0.10 * 100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
relaxation = constant
relaxation_factor = 0.5
[Tallies]
[Cell_1]
type = CellTally
score = kappa_fission
blocks = '100 200'
[]
[Cell_2]
type = CellTally
score = flux
blocks = '100 200'
[]
[]
[]
[Postprocessors]
[Pebble_1_Heat]
type = PointValue
point = '0 0 0'
variable = kappa_fission
[]
[Pebble_2_Heat]
type = PointValue
point = '0 0 4'
variable = kappa_fission
[]
[Pebble_3_Heat]
type = PointValue
point = '0 0 8'
variable = kappa_fission
[]
[Pebble_1_Flux]
type = PointValue
point = '0 0 0'
variable = flux
[]
[Pebble_2_Flux]
type = PointValue
point = '0 0 4'
variable = flux
[]
[Pebble_3_Flux]
type = PointValue
point = '0 0 8'
variable = flux
[]
[]
[Executioner]
type = Transient
num_steps = 3
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/dagmc/density_skin/csg_step_2/openmc.i)
[Mesh]
type = FileMesh
file = ../../mesh_tallies/slab.e
[]
x0 = 12.5
x1 = 37.5
x2 = 62.5
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[material_id]
family = MONOMIAL
order = CONSTANT
[]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[material_id]
type = CellMaterialIDAux
variable = material_id
[]
[cell_density]
type = CellDensityAux
variable = cell_density
[]
[]
T0 = 600.0
dT = 50.0
[Functions]
[density]
type = ParsedFunction
expression = 'if (x <= ${x0}, ${fparse T0 - dT}, if (x <= ${x1}, ${T0}, if (x <= ${x2}, ${fparse T0 + dT}, ${fparse T0 + 2 * dT})))'
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temp
value = 500.0
[]
[]
[AuxKernels]
[density]
type = FunctionAux
variable = density
function = density
execute_on = timestep_begin
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
temperature_blocks = '1 2'
density_blocks = '1 2'
cell_level = 0
power = 100.0
[Tallies]
[Mesh]
type = CellTally
blocks = '1 2'
[]
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/tally_system/cell_with_unmapped.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
# We are intentionally excluding some blocks, so we need to disable global normalization.
normalize_by_global_tally = false
[Tallies]
[Cell_1]
type = CellTally
score = kappa_fission
blocks = '100'
[]
[]
[]
[Postprocessors]
[Pebble_1_ID]
type = PointValue
point = '0 0 0'
variable = cell_id
[]
[Pebble_2_ID]
type = PointValue
point = '0 0 4'
variable = cell_id
[]
[Pebble_3_ID]
type = PointValue
point = '0 0 8'
variable = cell_id
[]
[Light_ID]
type = PointValue
point = '0 0 10'
variable = cell_id
[]
[Pebble_1_Heat]
type = PointValue
point = '0 0 0'
variable = kappa_fission
[]
[Pebble_2_Heat]
type = PointValue
point = '0 0 4'
variable = kappa_fission
[]
[Pebble_3_Heat]
type = PointValue
point = '0 0 8'
variable = kappa_fission
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/dagmc/density_skin/disjoint_bins.i)
[Mesh]
type = FileMesh
file = ../mesh_tallies/slab.e
[]
x0 = 12.5
x1 = 37.5
x2 = 62.5
T0 = 600.0
dT = 50.0
[Functions]
[density]
type = ParsedFunction
expression = 'if (x <= ${x0}, ${fparse T0 - dT}, if (x <= ${x1}, ${T0}, if (x <= ${x2}, ${fparse T0 - dT}, ${fparse T0 + 2 * dT})))'
[]
[]
[AuxKernels]
[temp]
type = FunctionAux
variable = density
function = density
execute_on = timestep_begin
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temp
value = 500.0
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
temperature_blocks = '1 2'
density_blocks = '1 2'
cell_level = 0
power = 100.0
skinner = moab
[Tallies]
[Mesh]
type = CellTally
blocks = '1 2'
[]
[]
[]
[UserObjects]
[moab]
type = MoabSkinner
density_min = ${fparse T0 - dT}
density_max = ${fparse T0 + 2 * dT}
n_density_bins = 4
density = density
temperature = temp
n_temperature_bins = 1
temperature_min = 0.0
temperature_max = 1000.0
build_graveyard = true
output_skins = true
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
exodus = true
hide = 'temp density cell_instance cell_id'
[]
(test/tests/neutronics/filters/no_filter.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
allow_renumbering = false
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
[Tallies]
[Heating]
type = CellTally
score = 'kappa_fission'
blocks = '100 200'
[]
[Flux]
type = CellTally
score = 'flux'
blocks = '100 200'
filters = 'blank'
[]
[]
[Filters]
[Energy]
type = EnergyFilter
# CASMO 2 group structure for testing. May result in some missed particles
energy_boundaries = '0.0 6.25e-1 2.0e7'
[]
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/userobjects/openmc_nuclide_densities/openmc.i)
[Mesh]
[g]
type = GeneratedMeshGenerator
dim = 3
nx = 8
ny = 8
nz = 8
xmin = -12.5
xmax = 87.5
ymin = -12.5
ymax = 37.5
zmin = -12.5
zmax = 12.5
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temp
value = 500.0
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
temperature_blocks = '0'
cell_level = 0
power = 100.0
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '0'
[]
[]
[]
[UserObjects]
[mat1]
type = OpenMCNuclideDensities
material_id = 1
names = 'U235 U238'
densities = '0.01 0.02'
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/symmetry/triso/openmc.i)
[Mesh]
[solid]
type = FileMeshGenerator
file = solid_mesh_in.e
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[]
[ICs]
[temp]
type = FunctionIC
variable = temp
function = temp
block = 'graphite'
[]
[temp_fuel]
type = FunctionIC
variable = temp
function = temp_fuel
block = 'compacts'
[]
[]
# We set an initial temperature distribution that is NOT symmetry about the imposed
# symmmetry plane; by checking the cell temperature, we can ensure that the data
# mapping is done correctly (in addition to checking that the *extracted* heat source
# reflects the imposed symmetry)
[Functions]
[temp]
type = ParsedFunction
expression = '500+(exp(10*x)+exp(10*y))*50'
[]
[temp_fuel]
type = ParsedFunction
expression = '500+(exp(10*x)+exp(10*y))*50 + 100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
identical_cell_fills = 'compacts'
check_identical_cell_fills = true
power = 1000.0
scaling = 100.0
temperature_blocks = 'graphite compacts'
cell_level = 1
symmetry_mapper = sym
[Tallies]
[Cell]
type = CellTally
blocks = 'compacts'
check_equal_mapped_tally_volumes = true
[]
[]
[]
[UserObjects]
[sym]
type = SymmetryPointGenerator
normal = '-1.0 0.0 0.0'
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
[]
[]
[Outputs]
exodus = true
# it is hard to get parallel-reproducible results with high-scattering TRISO
# problems, so this input will only check on the mapping
hide = 'temp kappa_fission'
[]
(test/tests/neutronics/feedback/unmapped_moose/openmc.i)
[Mesh]
[pincell]
type = FileMeshGenerator
file = ../../meshes/pincell.e
[]
[combine]
type = CombinerGenerator
inputs = 'pincell'
positions = '0 0 0
5 0 0'
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[material_id]
family = MONOMIAL
order = CONSTANT
[]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[material_id]
type = CellMaterialIDAux
variable = material_id
[]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
execute_on = 'timestep_end'
[]
[cell_density]
type = CellDensityAux
variable = cell_density
execute_on = 'timestep_end'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 500.0
temperature_blocks = '1 2 3'
density_blocks = '2'
verbose = true
cell_level = 0
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Executioner]
type = Transient
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
[]
[fluid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
block = '2'
[]
[solid_heat_source]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
block = '1 3'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/feedback/triso/openmc.i)
[Mesh]
[solid]
type = FileMeshGenerator
file = solid.e
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[]
[ICs]
[temp]
type = FunctionIC
variable = temp
function = temp_ic
[]
[]
[Functions]
[temp_ic]
type = ParsedFunction
expression = '500.0'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
identical_cell_fills = '2'
check_identical_cell_fills = true
power = 100.0
scaling = 100.0
temperature_blocks = '1 2'
cell_level = 1
[Tallies]
[Cell]
type = CellTally
blocks = '2'
check_equal_mapped_tally_volumes = true
[]
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[max_tally_rel_err]
type = TallyRelativeError
value_type = max
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
# get a smaller gold file
hide = 'temp'
[]
(test/tests/neutronics/tallies/tritium/openmc.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
source_strength = 1e6
verbose = true
temperature_blocks = '100 200'
density_blocks = '200'
cell_level = 0
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
score = 'H3_production'
blocks = '100 200'
[]
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[total_H3]
type = ElementIntegralVariablePostprocessor
variable = H3_production
[]
[fluid_H3]
type = PointValue
variable = H3_production
point = '0.0 0.0 2.0'
[]
[pebble1_H3]
type = PointValue
variable = H3_production
point = '0.0 0.0 0.0'
[]
[pebble2_H3]
type = PointValue
variable = H3_production
point = '0.0 0.0 4.0'
[]
[pebble3_H3]
type = PointValue
variable = H3_production
point = '0.0 0.0 8.0'
[]
[vol_fluid]
type = VolumePostprocessor
block = '200'
[]
[vol_solid]
type = VolumePostprocessor
block = '100'
[]
[max_err]
type = TallyRelativeError
tally_score = 'H3_production'
[]
[]
[Outputs]
execute_on = final
csv = true
exodus = true
[]
(test/tests/userobjects/volume_calculation/openmc.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../../neutronics/heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[AuxVariables]
[cell_vol]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_vol]
type = CellVolumeAux
variable = cell_vol
volume_type = actual
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100 200'
density_blocks = '200'
verbose = true
cell_level = 0
initial_properties = xml
volume_calculation = vol
[Tallies]
[Cell]
type = CellTally
blocks = '100 200'
name = heat_source
[]
[]
[]
[UserObjects]
[vol]
type = OpenMCVolumeCalculation
n_samples = 10000
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[vol_1]
type = PointValue
variable = cell_vol
point = '0.0 0.0 0.0'
[]
[vol_2]
type = PointValue
variable = cell_vol
point = '0.0 0.0 4.0'
[]
[vol_3]
type = PointValue
variable = cell_vol
point = '0.0 0.0 8.0'
[]
[vol_4]
type = PointValue
variable = cell_vol
point = '0.0 0.0 2.0'
[]
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/fission_tally_relative_error/openmc.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 100.0
temperature_blocks = '100'
cell_level = 0
check_tally_sum = false
initial_properties = xml
[Tallies]
[Cell]
type = CellTally
blocks = '100'
# this outputs the fission tally standard deviation in space
output = 'unrelaxed_tally_std_dev'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[max_rel_err]
type = TallyRelativeError
value_type = max
[]
[min_rel_err]
type = TallyRelativeError
value_type = min
[]
[avg_rel_err]
type = TallyRelativeError
value_type = average
[]
[power_1]
type = PointValue
variable = kappa_fission
point = '0 0 0'
[]
[power_2]
type = PointValue
variable = kappa_fission
point = '0 0 4'
[]
[power_3]
type = PointValue
variable = kappa_fission
point = '0 0 8'
[]
[std_dev_1]
type = PointValue
variable = kappa_fission_std_dev
point = '0 0 0'
[]
[std_dev_2]
type = PointValue
variable = kappa_fission_std_dev
point = '0 0 4'
[]
[std_dev_3]
type = PointValue
variable = kappa_fission_std_dev
point = '0 0 8'
[]
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/symmetry/rotational/openmc.i)
[Mesh]
[solid]
type = FileMeshGenerator
file = solid_mesh_in.e
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[]
[ICs]
[temp]
type = FunctionIC
variable = temp
function = temp
block = 'graphite 200'
[]
[temp_fuel]
type = FunctionIC
variable = temp
function = temp_fuel
block = 'compacts'
[]
[]
# We set an initial temperature distribution that is NOT symmetry about the imposed
# symmmetry plane; by checking the cell temperature, we can ensure that the data
# mapping is done correctly (in addition to checking that the *extracted* heat source
# reflects the imposed symmetry)
[Functions]
[temp]
type = ParsedFunction
expression = '500+(exp(10*x)+exp(10*y))*50'
[]
[temp_fuel]
type = ParsedFunction
expression = '500+(exp(10*x)+exp(10*y))*50 + 100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 1000.0
scaling = 100.0
temperature_blocks = '1 2 200'
cell_level = 1
symmetry_mapper = sym
[Tallies]
[Cell]
type = CellTally
blocks = '2'
[]
[]
[]
[UserObjects]
[sym]
type = SymmetryPointGenerator
normal = '${fparse -sqrt(3.0) / 2.0} 0.5 0.0'
rotation_axis = '0.0 0.0 1.0'
rotation_angle = 60.0
[]
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
[]
# check a few of the pins to be sure that the reflected heat source matches
[pin]
type = PointValue
variable = kappa_fission
point = '0.097 0.097 4.0'
[]
[pin1]
type = PointValue
variable = kappa_fission
point = '0.036 0.13 4.0'
[]
[diff1]
type = DifferencePostprocessor
value1 = pin1
value2 = pin
[]
[pin2]
type = PointValue
variable = kappa_fission
point = '-0.13 0.0313 4.0'
[]
[diff2]
type = DifferencePostprocessor
value1 = pin2
value2 = pin
[]
[pin3]
type = PointValue
variable = kappa_fission
point = '-0.13 -0.032 4.0'
[]
[diff3]
type = DifferencePostprocessor
value1 = pin3
value2 = pin
[]
[pin4]
type = PointValue
variable = kappa_fission
point = '0.039 -0.13 4.0'
[]
[diff4]
type = DifferencePostprocessor
value1 = pin4
value2 = pin
[]
[pin5]
type = PointValue
variable = kappa_fission
point = '0.09 -0.1 4.0'
[]
[diff5]
type = DifferencePostprocessor
value1 = pin5
value2 = pin
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
csv = true
hide = 'temp pin pin1 pin2 pin3 pin4 pin5'
[]
(test/tests/neutronics/feedback/triso/different_fill_univs/openmc.i)
[Mesh]
[solid]
type = FileMeshGenerator
file = ../solid.e
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
# this input should error because the universes filling the tally cells
# dont match identically
identical_cell_fills = '2'
check_identical_cell_fills = true
power = 100.0
scaling = 100.0
temperature_blocks = '1 2'
cell_level = 1
[Tallies]
[Cell]
type = CellTally
blocks = '2'
check_equal_mapped_tally_volumes = true
[]
[]
[]
[Executioner]
type = Transient
[]
(test/tests/openmc_errors/block_mappings/nonexistent_block.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 70.0
cell_level = 0
[Tallies]
[Cell]
type = CellTally
blocks = '100 200 who'
[]
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/feedback/different_units/openmc.i)
[Mesh]
type = FileMesh
file = sphere_in_m.e
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[material_id]
family = MONOMIAL
order = CONSTANT
[]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[material_id]
type = CellMaterialIDAux
variable = material_id
[]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
execute_on = 'timestep_end'
[]
[cell_density]
type = CellDensityAux
variable = cell_density
execute_on = 'timestep_end'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e6
temperature_blocks = '1'
density_blocks = '1'
cell_level = 0
scaling = 100.0
[Tallies]
[Cell]
type = CellTally
blocks = '1'
[]
[]
[]
[Executioner]
type = Transient
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
[]
[]
[Outputs]
exodus = true
[]
(test/tests/openmc_errors/level/total_too_high/level_too_high.i)
[Mesh]
[sphere]
# Mesh of a single pebble with outer radius of 1.5 (cm)
type = FileMeshGenerator
file = ../../../neutronics/meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
power = 70.0
temperature_blocks = '100'
verbose = true
# skip the data transfer of temperature into OpenMC for the first time step
# so that we can just use the ICs set in OpenMCs XML files
initial_properties = xml
cell_level = 1
[Tallies]
[Cell]
type = CellTally
blocks = '100'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/filters/azimuthal/cell.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../meshes/sphere.e
[]
[solid]
type = CombinerGenerator
inputs = sphere
positions = '0 0 0
0 0 4
0 0 8'
[]
[solid_ids]
type = SubdomainIDGenerator
input = solid
subdomain_id = '100'
[]
[fluid]
type = FileMeshGenerator
file = ../../heat_source/stoplight.exo
[]
[fluid_ids]
type = SubdomainIDGenerator
input = fluid
subdomain_id = '200'
[]
[combine]
type = CombinerGenerator
inputs = 'solid_ids fluid_ids'
[]
allow_renumbering = false
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 1e4
temperature_blocks = '100'
cell_level = 0
initial_properties = xml
source_rate_normalization = 'kappa_fission'
[Tallies]
[Heating]
type = CellTally
score = 'kappa_fission'
blocks = '100 200'
[]
[Flux]
type = CellTally
score = 'flux'
blocks = '100 200'
filters = 'Azimuthal'
[]
[]
[Filters]
[Azimuthal]
type = AzimuthalAngleFilter
[]
[]
[]
[Postprocessors]
[Pebble_1_Flux_Omega1]
type = PointValue
point = '0 0 0'
variable = flux_omega1
[]
[Pebble_2_Flux_Omega2]
type = PointValue
point = '0 0 4'
variable = flux_omega2
[]
[Pebble_3_Flux_Omega1]
type = PointValue
point = '0 0 8'
variable = flux_omega1
[]
[Pebble_1_Flux_Omega2]
type = PointValue
point = '0 0 0'
variable = flux_omega2
[]
[Pebble_2_Flux_Omega1]
type = PointValue
point = '0 0 4'
variable = flux_omega1
[]
[Pebble_3_Flux_Omega2]
type = PointValue
point = '0 0 8'
variable = flux_omega2
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]