- variableThe name of the variable that this object applies to
C++ Type:AuxVariableName
Controllable:No
Description:The name of the variable that this object applies to
CellTemperatureAux
Display the OpenMC cell temperature (K) at each MOOSE element
Description
Displays the temperatures (K) set in the OpenMC model by MOOSE. If a MOOSE element is not providing temperature feedback or did not map at all to an OpenMC cell, then this auxiliary kernel returns .
Note that this temperature is not necessarily the temperature at which cross sections are evaluated at. For more information, see the temperature
-related elements in OpenMC's settings.
If a MOOSE element did not map at all to an OpenMC cell or if an element does not provide feedback, then this auxiliary kernel returns .
Example Input Syntax
As an example, the cell_temperature
auxiliary kernel will extract the OpenMC cell temperature and map it to the MOOSE elements corresponding to each OpenMC cell.
[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'
[]
[]
(test/tests/neutronics/feedback/lattice/openmc.i)Input Parameters
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- boundaryThe list of boundaries (ids or names) from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundaries (ids or names) from the mesh where this object applies
- check_boundary_restrictedTrueWhether to check for multiple element sides on the boundary in the case of a boundary restricted, element aux variable. Setting this to false will allow contribution to a single element's elemental value(s) from multiple boundary sides on the same element (example: when the restricted boundary exists on two or more sides of an element, such as at a corner of a mesh
Default:True
C++ Type:bool
Controllable:No
Description:Whether to check for multiple element sides on the boundary in the case of a boundary restricted, element aux variable. Setting this to false will allow contribution to a single element's elemental value(s) from multiple boundary sides on the same element (example: when the restricted boundary exists on two or more sides of an element, such as at a corner of a mesh
- execute_onLINEAR TIMESTEP_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, PRE_DISPLACE.
Default:LINEAR TIMESTEP_END
C++ Type:ExecFlagEnum
Options:NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, PRE_DISPLACE
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, PRE_DISPLACE.
- 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.
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- seed0The seed for the master random number generator
Default:0
C++ Type:unsigned int
Controllable:No
Description:The seed for the master random number generator
- 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/feedback/multi_component_temp/openmc.i)
- (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)
- (tutorials/csg_to_cad/openmc.i)
- (test/tests/neutronics/feedback/lattice/openmc.i)
- (tutorials/lwr_solid/openmc_um.i)
- (tutorials/gas_compact_multiphysics/openmc_nek.i)
- (test/tests/neutronics/feedback/multiple_levels/openmc.i)
- (test/tests/neutronics/density/openmc.i)
- (test/tests/neutronics/feedback/universes/fill_in_flat/openmc.i)
- (test/tests/neutronics/feedback/multi_component_temp/multi_vars.i)
- (test/tests/neutronics/feedback/temperature/two_one/openmc.i)
- (test/tests/neutronics/dagmc/cell_tallies/openmc.i)
- (tutorials/msfr/openmc.i)
- (test/tests/neutronics/dagmc/cell_tallies/null_density.i)
- (tutorials/gas_compact/openmc.i)
- (test/tests/neutronics/feedback/interchangeable/no_data_flow.i)
- (test/tests/neutronics/dagmc/density_skin/csg_step_2/openmc.i)
- (tutorials/tokamak/openmc.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/neutronics/symmetry/triso/openmc.i)
- (test/tests/neutronics/feedback/unmapped_moose/openmc.i)
- (test/tests/neutronics/feedback/triso/openmc.i)
- (tutorials/lwr_solid/openmc.i)
- (test/tests/neutronics/feedback/different_units/openmc_cm.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/symmetry/rotational/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/single_level/openmc.i)
- (test/tests/neutronics/dagmc/mesh_tallies/csg_step_1/openmc.i)
- (test/tests/neutronics/dagmc/mesh_tallies/one_bin.i)
- (test/tests/neutronics/feedback/different_units/openmc.i)
- (test/tests/neutronics/feedback/temperature/two_one/openmc_default.i)
(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/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/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
[]
(tutorials/csg_to_cad/openmc.i)
power = 3000
[Problem]
type = OpenMCCellAverageProblem
power = ${power}
temperature_blocks = '1'
cell_level = 1
skinner = skinner
normalize_by_global_tally = false
source_rate_normalization = 'kappa_fission'
[Tallies]
[mesh]
type = MeshTally
score = 'kappa_fission flux'
[]
[]
[]
[Mesh]
[fuel]
type = FileMeshGenerator
file = krusty_fuel.e
[]
[]
[UserObjects]
[skinner]
type = MoabSkinner
temperature = temp
n_temperature_bins = 4
temperature_min = 800
temperature_max = 1000
build_graveyard = true
[]
[]
[MultiApps]
[conduction]
type = TransientMultiApp
input_files = 'fuel.i'
execute_on = timestep_end
[]
[]
[Transfers]
[heat_source_from_openmc]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = conduction
source_variable = kappa_fission
variable = power
from_postprocessors_to_be_preserved = tally_integral
to_postprocessors_to_be_preserved = tally_integral
search_value_conflicts = false
[]
[temp_to_openmc]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = conduction
variable = temp
source_variable = T
search_value_conflicts = false
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temp
value = 800
[]
[power]
type = ConstantIC
variable = kappa_fission
value = ${fparse power/1.865e+03}
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[]
[Postprocessors]
[tally_integral]
type = ElementIntegralVariablePostprocessor
variable = kappa_fission
execute_on = 'initial transfer timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 3
[]
[Outputs]
exodus = true
[]
(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
[]
(tutorials/lwr_solid/openmc_um.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
power = ${fparse 3000e6 / 273 / (17 * 17)}
temperature_blocks = '1 2 3'
normalize_by_global_tally = false
cell_level = 0
particles = 20000
inactive_batches = 500
batches = 10000
[Tallies]
[heat_source]
type = MeshTally
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
[]
[max_heat_source]
type = ElementExtremeValue
variable = heat_source
[]
[]
(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/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/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/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
[]
(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'
[]
(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/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/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
[]
(tutorials/tokamak/openmc.i)
[Mesh]
[file]
type = FileMeshGenerator
file = tokamak.e
[]
[]
[AuxVariables]
[cell_temperature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[cell_temperature]
type = CellTemperatureAux
variable = cell_temperature
[]
[]
[Problem]
type = OpenMCCellAverageProblem
scaling = 100.0
source_strength = 2e18
cell_level = 0
temperature_blocks = 'plasma_facing multiplier breeder divertor vacuum_vessel'
# this is a low number of particles; you will want to increase in order to obtain
# high-quality results
first_iteration_particles = 1000
relaxation = dufek_gudowski
skinner = moab
[Tallies]
[tokamak]
type = MeshTally
mesh_template = tokamak.e
score = 'heating_local H3_production'
output = unrelaxed_tally_std_dev
[]
[]
[]
[UserObjects]
[moab]
type = MoabSkinner
temperature_min = 0
temperature_max = 2000
n_temperature_bins = 40
temperature = temp
build_graveyard = true
output_skins = true
[]
[]
[Postprocessors]
[heating]
type = ElementIntegralVariablePostprocessor
variable = heating_local
[]
[tritium_production]
type = ElementIntegralVariablePostprocessor
variable = H3_production
[]
[tritium_error]
type = TallyRelativeError
tally_score = H3_production
value_type = average
[]
[heating_error]
type = TallyRelativeError
tally_score = heating_local
value_type = average
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
exodus = true
csv = true
[]
(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/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'
[]
(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'
[]
(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/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'
[]
(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/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/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/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/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/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
[]