- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
- value_typecombinedType of eigenvalue global tally to report
Default:combined
C++ Type:MooseEnum
Controllable:No
Description:Type of eigenvalue global tally to report
KEigenvalue
Extract the k eigenvalue computed by OpenMC
Description
This postprocessor extracts the eigenvalue from the latest OpenMC eigenvalue calculation. OpenMC contains four different methods for evaluating the eigenvalue, each of which can be selected here by setting the value_type
parameter:
collision
: collision estimatorabsorption
: absorption estimatortracklength
: tracklength estimatorcombined
: (default) minimum variance estimate based on combining the collision, absorption, and tracklength estimates.
Example Input Syntax
Shown below is an example for each of the four available estimators.
[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'
[]
[]
(test/tests/postprocessors/eigenvalue/openmc.i)Input Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- 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:Yes
Description:Set the enabled status of the MooseObject.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
Input Files
- (test/tests/neutronics/dagmc/mesh_tallies/csg_step_2/openmc.i)
- (test/tests/neutronics/dagmc/mesh_tallies/direct_tally.i)
- (test/tests/neutronics/dagmc/mesh_tallies/with_scaling.i)
- (test/tests/neutronics/dagmc/cell_tallies/with_scaling.i)
- (test/tests/neutronics/feedback/triso/cache/openmc.i)
- (test/tests/neutronics/feedback/materials/openmc.i)
- (tutorials/gas_compact_multiphysics/openmc_nek.i)
- (test/tests/neutronics/density/openmc.i)
- (test/tests/neutronics/feedback/universes/fill_in_flat/openmc.i)
- (test/tests/neutronics/feedback/temperature/one_one/openmc.i)
- (test/tests/neutronics/feedback/temperature/two_one/openmc.i)
- (test/tests/neutronics/dagmc/cell_tallies/openmc.i)
- (test/tests/controls/openmc_nuclide_densities/openmc.i)
- (tutorials/msfr/openmc.i)
- (test/tests/neutronics/dagmc/cell_tallies/null_density.i)
- (test/tests/neutronics/dagmc/mesh_tallies/disjoint_bins.i)
- (test/tests/neutronics/feedback/interchangeable/no_data_flow.i)
- (test/tests/neutronics/feedback/temperature/two_one/openmc_default.i)
- (test/tests/neutronics/dagmc/density_skin/csg_step_2/openmc.i)
- (test/tests/neutronics/dagmc/density_skin/disjoint_bins.i)
- (test/tests/neutronics/feedback/temperature/one_two/openmc.i)
- (test/tests/neutronics/dagmc/cell_tallies/one_bin.i)
- (test/tests/neutronics/dagmc/cell_tallies/csg_step_2/openmc.i)
- (test/tests/neutronics/feedback/interchangeable/openmc.i)
- (test/tests/userobjects/openmc_nuclide_densities/openmc.i)
- (test/tests/userobjects/openmc_nuclide_densities/no_change.i)
- (test/tests/neutronics/feedback/triso/openmc.i)
- (tutorials/gas_assembly/openmc.i)
- (test/tests/neutronics/feedback/interchangeable/no_tally.i)
- (tutorials/pincell_multiphysics/openmc.i)
- (tutorials/pebbles/openmc_um.i)
- (test/tests/neutronics/openmc_xml/openmc.i)
- (tutorials/dagmc/openmc.i)
- (tutorials/gas_compact_multiphysics/openmc_thm.i)
- (test/tests/neutronics/feedback/temperature/two_one/openmc_multi_temp.i)
- (test/tests/neutronics/dagmc/mesh_tallies/openmc.i)
- (tutorials/pebbles/openmc.i)
- (test/tests/neutronics/dagmc/cell_tallies/csg_step_1/openmc.i)
- (test/tests/neutronics/feedback/multi_component_density/multi/multi_vars.i)
- (test/tests/userobjects/openmc_nuclide_densities/thermal_density.i)
- (test/tests/neutronics/dagmc/mesh_tallies/csg_step_1/openmc.i)
- (test/tests/openmc_errors/fixed_source/k.i)
- (test/tests/neutronics/feedback/multi_component_density/multi/openmc.i)
- (test/tests/neutronics/dagmc/density_skin/openmc.i)
- (test/tests/userobjects/openmc_nuclide_densities/wrong_problem.i)
- (test/tests/neutronics/dagmc/mesh_tallies/one_bin.i)
- (test/tests/postprocessors/eigenvalue/openmc.i)
- (test/tests/userobjects/openmc_nuclide_densities/only_density.i)
- (test/tests/neutronics/feedback/multi_component_density/multi/multi_vars_alt.i)
(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/dagmc/mesh_tallies/csg_step_2/openmc.i)
[Mesh]
type = FileMesh
file = ../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]
[Mesh]
type = MeshTally
mesh_template = ../slab.e
[]
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/dagmc/mesh_tallies/direct_tally.i)
[Mesh]
type = FileMesh
file = slab.e
allow_renumbering = false
parallel_type = replicated
[]
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]
[Mesh]
type = MeshTally
[]
[]
[]
[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/neutronics/dagmc/mesh_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]
[Mesh]
type = MeshTally
mesh_template = scale_in.e
[]
[]
[]
[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/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/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/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
[]
(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/density/openmc.i)
[Mesh]
[file]
type = FileMeshGenerator
file = ../dagmc/mesh_tallies/slab.e
[]
[split_right]
type = ParsedSubdomainMeshGenerator
input = file
combinatorial_geometry = 'x > 37.5'
block_id = 100
excluded_subdomains = '1'
[]
[split_left]
type = ParsedSubdomainMeshGenerator
input = split_right
combinatorial_geometry = 'x < 37.5'
block_id = 200
excluded_subdomains = '2'
[]
[scale]
type = TransformGenerator
input = split_left
transform = translate
vector_value = '0.0 0.0 0.0'
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[cell_material]
family = MONOMIAL
order = CONSTANT
[]
[]
x0 = 12.5
x1 = 37.5
x2 = 62.5
T0 = 600.0
dT = 50.0
drho = 100.0
rho0 = 1000.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})))'
[]
[rho]
type = ParsedFunction
expression = 'if (x <= ${x0}, ${fparse rho0 - drho}, if (x <= ${x1}, ${rho0}, if (x <= ${x2}, ${fparse rho0 + drho}, ${fparse rho0 + 2 * drho})))'
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[cell_density]
type = CellDensityAux
variable = cell_density
[]
[cell_material]
type = CellMaterialIDAux
variable = cell_material
[]
[]
[AuxKernels]
[temp]
type = FunctionAux
variable = temp
function = temp
execute_on = timestep_begin
[]
[rho]
type = FunctionAux
variable = density
function = rho
execute_on = timestep_begin
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
density_blocks = '2 1'
temperature_blocks = '200 1'
cell_level = 0
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[rho_2]
type = ElementAverageValue
variable = density
block = '2'
[]
[rho_1]
type = ElementAverageValue
variable = density
block = '1'
[]
[T_200]
type = ElementAverageValue
variable = temp
block = '200'
[]
[T_1]
type = ElementAverageValue
variable = temp
block = '1'
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/feedback/universes/fill_in_flat/openmc.i)
[Mesh]
[m]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 1
nz = 1
xmax = 10
ymax = 10
zmax = 10
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
temperature_blocks = '0'
cell_level = 0
[]
[ICs]
[temp]
type = FunctionIC
variable = temp
function = temp
[]
[]
[Functions]
[temp]
type = ParsedFunction
expression = '500+50*x'
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[tl]
type = PointValue
variable = cell_temperature
point = '2.5 5 5'
[]
[tr]
type = PointValue
variable = cell_temperature
point = '7.5 5 5'
[]
[k]
type = KEigenvalue
[]
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/feedback/temperature/one_one/openmc.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -50.0
xmax = 50.0
ymin = -25.0
ymax = 25.0
zmin = 0.0
zmax = 50.0
nx = 15
ny = 15
nz = 15
[]
[ICs]
[temp]
type = ConstantIC
variable = temp
value = 500.0
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
temperature_blocks = '0'
cell_level = 0
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/feedback/temperature/two_one/openmc.i)
[Mesh]
[initial]
type = GeneratedMeshGenerator
dim = 3
xmin = -50.0
xmax = 50.0
ymin = -25.0
ymax = 25.0
zmin = 0.0
zmax = 50.0
nx = 20
ny = 15
nz = 15
[]
[split]
type = ParsedSubdomainMeshGenerator
input = initial
combinatorial_geometry = 'x < 0.0'
block_id = '3'
[]
[]
[ICs]
[temp]
type = FunctionIC
variable = temp
function = temperature
[]
[]
[Functions]
[temperature]
type = ParsedFunction
expression = '1000 + 10*x'
[]
[]
[AuxVariables]
[cell_temp]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temp]
type = CellTemperatureAux
variable = cell_temp
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
power = 100.0
temperature_blocks = '0 3'
cell_level = 0
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[T_left]
type = PointValue
variable = cell_temp
point = '-25.0 0.0 0.0'
[]
[T_right]
type = PointValue
variable = cell_temp
point = '25.0 0.0 0.0'
[]
[]
[Outputs]
csv = 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/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
[]
(tutorials/msfr/openmc.i)
[Mesh]
[mesh]
type = FileMeshGenerator
file = msr.e
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temp
value = 948.0
[]
[density]
type = ConstantIC
variable = density
value = ${fparse -0.882*948+4983.6}
[]
[]
[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 = ParsedAux
variable = density
expression = '-0.882*temp+4983.6'
coupled_variables = temp
execute_on = timestep_begin
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
# this will start each Picard iteration from the fission source from the previous one
reuse_source = true
scaling = 100.0
density_blocks = '1'
temperature_blocks = '1'
cell_level = 0
power = 300.0e6
relaxation = dufek_gudowski
first_iteration_particles = 5000
skinner = moab
[Tallies]
[heat_source]
type = MeshTally
mesh_template = msr.e
output = unrelaxed_tally_std_dev
[]
[]
[]
nb = 15.0
tmin = 800.0
tmax = 1150.0
[UserObjects]
[moab]
type = MoabSkinner
temperature = temp
n_temperature_bins = ${nb}
temperature_min = ${tmin}
temperature_max = ${tmax}
density = density
n_density_bins = ${nb}
density_min = ${fparse -0.882*tmax+4983.6}
density_max = ${fparse -0.882*tmin+4983.6}
build_graveyard = true
output_skins = true
[]
[]
[MultiApps]
[nek]
type = TransientMultiApp
input_files = 'nek.i'
sub_cycling = true
execute_on = timestep_end
[]
[]
[Transfers]
[temp_to_openmc]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = nek
variable = temp
source_variable = temp
[]
[power_to_nek]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = nek
source_variable = kappa_fission
variable = heat_source
[]
[power_integral_to_nek]
type = MultiAppPostprocessorTransfer
to_postprocessor = source_integral
from_postprocessor = power
to_multi_app = nek
[]
[synchronize_in]
type = MultiAppPostprocessorTransfer
to_postprocessor = transfer_in
from_postprocessor = synchronize
to_multi_app = nek
[]
[]
[Postprocessors]
[power]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
[]
[k]
type = KEigenvalue
[]
[k_std_dev]
type = KStandardDeviation
[]
[max_tally_err]
type = TallyRelativeError
[]
[max_T]
type = ElementExtremeValue
variable = temp
[]
[avg_T]
type = ElementAverageValue
variable = temp
[]
[max_q]
type = ElementExtremeValue
variable = kappa_fission
[]
[synchronize]
type = Receiver
default = 1.0
[]
[]
t_nek = ${fparse 2e-4 * 7.669}
[Executioner]
type = Transient
dt = ${fparse 2000 * t_nek}
[]
[Outputs]
exodus = true
csv = true
hide = 'synchronize'
[]
(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/dagmc/mesh_tallies/disjoint_bins.i)
[Mesh]
type = FileMesh
file = slab.e
allow_renumbering = false
parallel_type = replicated
[]
x0 = 12.5
x1 = 37.5
x2 = 62.5
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]
[Mesh]
type = MeshTally
mesh_template = slab.e
[]
[]
[]
[UserObjects]
[moab]
type = MoabSkinner
temperature_min = ${fparse T0 - dT}
temperature_max = ${fparse T0 + 2 * dT}
n_temperature_bins = 4
temperature = temp
build_graveyard = true
output_skins = true
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/neutronics/feedback/interchangeable/no_data_flow.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_id]
family = MONOMIAL
order = CONSTANT
[]
[cell_instance]
family = MONOMIAL
order = CONSTANT
[]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[material_id]
family = MONOMIAL
order = CONSTANT
[]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_id]
type = CellIDAux
variable = cell_id
[]
[cell_instance]
type = CellInstanceAux
variable = cell_instance
[]
[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
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[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/feedback/temperature/two_one/openmc_default.i)
[Mesh]
[initial]
type = GeneratedMeshGenerator
dim = 3
xmin = -50.0
xmax = 50.0
ymin = -25.0
ymax = 25.0
zmin = 0.0
zmax = 50.0
nx = 20
ny = 15
nz = 15
[]
[split]
type = ParsedSubdomainMeshGenerator
input = initial
combinatorial_geometry = 'x < 0.0'
block_id = '3'
[]
[]
[ICs]
[temp]
type = FunctionIC
variable = temp
function = temperature
[]
[]
[Functions]
[temperature]
type = ParsedFunction
expression = '1000 + 10*x'
[]
[]
[AuxVariables]
[cell_temp]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temp]
type = CellTemperatureAux
variable = cell_temp
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
cell_level = 0
temperature_blocks = '3 0'
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[T_left]
type = PointValue
variable = cell_temp
point = '-25.0 0.0 0.0'
[]
[T_right]
type = PointValue
variable = cell_temp
point = '25.0 0.0 0.0'
[]
[]
[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/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/feedback/temperature/one_two/openmc.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -50.0
xmax = 50.0
ymin = -25.0
ymax = 25.0
zmin = 0.0
zmax = 50.0
nx = 20
ny = 15
nz = 15
[]
[ICs]
[temp]
type = FunctionIC
variable = temp
function = temperature
[]
[]
[Functions]
[temperature]
type = ParsedFunction
expression = '1000 + 10*x'
[]
[]
[AuxVariables]
[cell_temp]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temp]
type = CellTemperatureAux
variable = cell_temp
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
temperature_blocks = '0'
cell_level = 0
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[T_left]
type = PointValue
variable = cell_temp
point = '-25.0 0.0 0.0'
[]
[T_right]
type = PointValue
variable = cell_temp
point = '25.0 0.0 0.0'
[]
[]
[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/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/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/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/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'
[]
(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'
[]
(test/tests/neutronics/feedback/interchangeable/no_tally.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
[]
[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
[]
(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
[]
[]
(tutorials/pebbles/openmc_um.i)
[Mesh]
[pebble]
type = FileMeshGenerator
file = mesh_in.e
[]
[repeat]
type = CombinerGenerator
inputs = pebble
positions = '0 0 0.02
0 0 0.06
0 0 0.10'
[]
allow_renumbering = false
[]
[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'
normalize_by_global_tally = false
cell_level = 1
scaling = 100.0
[Tallies]
[heat_source]
type = MeshTally
mesh_translations = '0 0 0.02
0 0 0.06
0 0 0.10'
mesh_template = mesh_in.e
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/openmc_xml/openmc.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../meshes/sphere.e
[]
[]
[Problem]
type = OpenMCCellAverageProblem
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Outputs]
csv = true
[]
(tutorials/dagmc/openmc.i)
[Mesh]
[file]
type = FileMeshGenerator
file = mesh_in.e
[]
allow_renumbering = false
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
cell_level = 0
temperature_blocks = '2 3'
check_tally_sum = false
normalize_by_global_tally = false
power = 1000.0
volume_calculation = vol
[Tallies]
[heat_source]
type = MeshTally
mesh_template = mesh_in.e
name = heat_source
[]
[]
[]
[UserObjects]
[vol]
type = OpenMCVolumeCalculation
n_samples = 200000
[]
[]
[Postprocessors]
[heat_source]
type = ElementIntegralVariablePostprocessor
variable = heat_source
[]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
exodus = true
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/feedback/temperature/two_one/openmc_multi_temp.i)
[Mesh]
[initial]
type = GeneratedMeshGenerator
dim = 3
xmin = -50.0
xmax = 50.0
ymin = -25.0
ymax = 25.0
zmin = 0.0
zmax = 50.0
nx = 20
ny = 15
nz = 15
[]
[split]
type = ParsedSubdomainMeshGenerator
input = initial
combinatorial_geometry = 'x < 0.0'
block_id = '3'
[]
[]
[ICs]
[temp_left]
type = FunctionIC
variable = temp_left
function = temperature
[]
[temp_right]
type = FunctionIC
variable = temp_right
function = temperature
[]
[]
[Functions]
[temperature]
type = ParsedFunction
expression = '1000 + 10*x'
[]
[]
[AuxVariables]
[cell_temp]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temp]
type = CellTemperatureAux
variable = cell_temp
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
cell_level = 0
temperature_variables = 'temp_left; temp_right'
temperature_blocks = '3; 0'
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[T_left]
type = PointValue
variable = cell_temp
point = '-25.0 0.0 0.0'
[]
[T_right]
type = PointValue
variable = cell_temp
point = '25.0 0.0 0.0'
[]
[]
[Outputs]
csv = true
[]
(test/tests/neutronics/dagmc/mesh_tallies/openmc.i)
[Mesh]
type = FileMesh
file = 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]
[Mesh]
type = MeshTally
mesh_template = slab.e
[]
[]
[]
[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
[]
(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/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/neutronics/feedback/multi_component_density/multi/multi_vars.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
[]
[split_top]
type = ParsedSubdomainMeshGenerator
input = upper_block
combinatorial_geometry = 'x > 30.0 & y > 12.5'
block_id = 50
[]
[]
[AuxVariables]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[total_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_density]
type = CellDensityAux
variable = cell_density
[]
[]
[ICs]
[d1]
type = ConstantIC
variable = density1
value = 15e3
block = '0'
[]
[d2]
type = ConstantIC
variable = density2
value = 3000
block = '1'
[]
[d3]
type = ConstantIC
variable = density3
value = 7000
block = '50'
[]
[dd1]
type = ConstantIC
variable = total_density
value = 15e3
block = '0'
[]
[dd2]
type = ConstantIC
variable = total_density
value = 3000
block = '1'
[]
[dd3]
type = ConstantIC
variable = total_density
value = 7000
block = '50'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
cell_level = 0
density_variables = 'density1; density2; density3'
density_blocks = '0; 1; 50'
temperature_blocks = '0 1 50'
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[rho_0]
type = ElementAverageValue
variable = cell_density
block = '0'
[]
[rho_1]
type = ElementAverageValue
variable = cell_density
block = '1'
[]
[avg_cell0]
type = ElementAverageValue
variable = cell_density
block = '0'
[]
[avg_cell1]
type = ElementAverageValue
variable = cell_density
block = '1 50'
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
exodus = true
[]
(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/dagmc/mesh_tallies/csg_step_1/openmc.i)
[Mesh]
type = FileMesh
file = ../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]
[Mesh]
type = MeshTally
mesh_template = ../slab.e
[]
[]
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/openmc_errors/fixed_source/k.i)
[Mesh]
[sphere]
type = FileMeshGenerator
file = ../../neutronics/meshes/sphere.e
[]
[]
[Problem]
type = OpenMCCellAverageProblem
source_strength = 1e6
[]
[Executioner]
type = Transient
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[]
(test/tests/neutronics/feedback/multi_component_density/multi/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_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_density]
type = CellDensityAux
variable = cell_density
[]
[]
[ICs]
[d1]
type = ConstantIC
variable = density1
value = 15e3
block = '0'
[]
[d2]
type = ConstantIC
variable = density2
value = 3000
block = '1'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
cell_level = 0
density_variables = 'density1 ; density2'
density_blocks = '0; 1'
temperature_blocks = '0 1'
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[rho_0]
type = ElementAverageValue
variable = cell_density
block = '0'
[]
[rho_1]
type = ElementAverageValue
variable = cell_density
block = '1'
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
[]
(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/userobjects/openmc_nuclide_densities/wrong_problem.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
[]
[]
[Variables]
[u]
order = FIRST
[]
[]
[Kernels]
[d]
type = Diffusion
variable = u
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temp
value = 500.0
[]
[]
[Problem]
type = FEProblem
[]
[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/dagmc/mesh_tallies/one_bin.i)
[Mesh]
type = FileMesh
file = 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
temperature_blocks = '1 2'
cell_level = 0
power = 100.0
skinner = moab
[Tallies]
[Mesh]
type = MeshTally
mesh_template = slab.e
[]
[]
[]
[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/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/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_density/multi/multi_vars_alt.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
[]
[split_top]
type = ParsedSubdomainMeshGenerator
input = upper_block
combinatorial_geometry = 'x > 30.0 & y > 12.5'
block_id = 50
[]
[]
[AuxVariables]
[cell_density]
family = MONOMIAL
order = CONSTANT
[]
[total_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_density]
type = CellDensityAux
variable = cell_density
[]
[]
[ICs]
[d1]
type = ConstantIC
variable = density1
value = 15e3
block = '0'
[]
[d2]
type = ConstantIC
variable = density2
value = 3000
block = '1'
[]
[d3]
type = ConstantIC
variable = density2
value = 7000
block = '50'
[]
[dd1]
type = ConstantIC
variable = total_density
value = 15e3
block = '0'
[]
[dd2]
type = ConstantIC
variable = total_density
value = 3000
block = '1'
[]
[dd3]
type = ConstantIC
variable = total_density
value = 7000
block = '50'
[]
[]
[Problem]
type = OpenMCCellAverageProblem
verbose = true
cell_level = 0
density_variables = 'density1; density2'
density_blocks = '0; 1 50'
temperature_blocks = '0 1 50'
[]
[Postprocessors]
[k]
type = KEigenvalue
[]
[rho_0]
type = ElementAverageValue
variable = cell_density
block = '0'
[]
[rho_1]
type = ElementAverageValue
variable = cell_density
block = '1'
[]
[avg_cell0]
type = ElementAverageValue
variable = cell_density
block = '0'
[]
[avg_cell1]
type = ElementAverageValue
variable = cell_density
block = '1 50'
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
exodus = true
[]