- T_infinityFunction describing far-field temperature
C++ Type:FunctionName
Unit:(no unit assumed)
Controllable:No
Description:Function describing far-field temperature
 - boundaryThe list of boundary IDs from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundary IDs from the mesh where this object applies
 - coefficientFunction describing heat transfer coefficient
C++ Type:FunctionName
Unit:(no unit assumed)
Controllable:No
Description:Function describing heat transfer coefficient
 - variableThe name of the variable that this residual object operates on
C++ Type:NonlinearVariableName
Unit:(no unit assumed)
Controllable:No
Description:The name of the variable that this residual object operates on
 
ConvectiveFluxFunction
Determines boundary value by fluid heat transfer coefficient and far-field temperature
Description
The ConvectiveFluxFunction boundary condition is used to prescribe the following convective flux  to a boundary of a thermal model:  where  is the heat transfer coefficient,  is the temperature at a location , where  is the location of a given quadrature point on the surface where this boundary condition is applied, and  is the far-field temperature of the fluid that the boundary is exposed to.
The far-field temperature is specified using the T_infinity parameter, which is a MOOSE Function. This can be provided as the name of a function, using a parsed function, or a constant value.  Likewise, the heat transfer coefficient is specified using the coefficient parameter, which is also a MOOSE Function, and the same options for how to prescribe T_infinity also apply for this parameter. By default, the heat transfer coefficient function is defined in terms of position and time (the standard usage of MOOSE Functions). If the optional coefficient_function_type parameter is set to TEMPERATURE, the coefficient is instead a function of the temperature. If a Function such as PiecewiseLinear were used to define this coefficient, the values on the x-axis of that function would be interpreted as temperature values. If a parsed function were used for this purpose, the t variable in a parsed equation would be used for the temperature, rather than for the time.
Input Parameters
- coefficient_function_typeTIME_AND_POSITIONType of function for heat transfer coefficient provided in 'coefficient' parameter
Default:TIME_AND_POSITION
C++ Type:MooseEnum
Options:TIME_AND_POSITION, TEMPERATURE
Controllable:No
Description:Type of function for heat transfer coefficient provided in 'coefficient' parameter
 - displacementsThe displacements
C++ Type:std::vector<VariableName>
Unit:(no unit assumed)
Controllable:No
Description:The displacements
 - matrix_onlyFalseWhether this object is only doing assembly to matrices (no vectors)
Default:False
C++ Type:bool
Controllable:No
Description:Whether this object is only doing assembly to matrices (no vectors)
 
Optional Parameters
- absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contribution
C++ Type:std::vector<TagName>
Controllable:No
Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution
 - extra_matrix_tagsThe extra tags for the matrices this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the matrices this Kernel should fill
 - extra_vector_tagsThe extra tags for the vectors this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the vectors this Kernel should fill
 - matrix_tagssystemThe tag for the matrices this Kernel should fill
Default:system
C++ Type:MultiMooseEnum
Options:nontime, system
Controllable:No
Description:The tag for the matrices this Kernel should fill
 - vector_tagsnontimeThe tag for the vectors this Kernel should fill
Default:nontime
C++ Type:MultiMooseEnum
Options:nontime, time
Controllable:No
Description:The tag for the vectors this Kernel should fill
 
Contribution To Tagged Field Data 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.
 - diag_save_inThe name of auxiliary variables to save this BC's diagonal jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
C++ Type:std::vector<AuxVariableName>
Unit:(no unit assumed)
Controllable:No
Description:The name of auxiliary variables to save this BC's diagonal jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
 - enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
 - implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
 - save_inThe name of auxiliary variables to save this BC's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
C++ Type:std::vector<AuxVariableName>
Unit:(no unit assumed)
Controllable:No
Description:The name of auxiliary variables to save this BC's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
 - search_methodnearest_node_connected_sidesChoice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes).
Default:nearest_node_connected_sides
C++ Type:MooseEnum
Options:nearest_node_connected_sides, all_proximate_sides
Controllable:No
Description:Choice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes).
 - 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
 - skip_execution_outside_variable_domainFalseWhether to skip execution of this boundary condition when the variable it applies to is not defined on the boundary. This can facilitate setups with moving variable domains and fixed boundaries. Note that the FEProblem boundary-restricted integrity checks will also need to be turned off if using this option
Default:False
C++ Type:bool
Controllable:No
Description:Whether to skip execution of this boundary condition when the variable it applies to is not defined on the boundary. This can facilitate setups with moving variable domains and fixed boundaries. Note that the FEProblem boundary-restricted integrity checks will also need to be turned off if using this option
 - 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
- 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
Unit:(no unit assumed)
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.
 
Material Property Retrieval Parameters
Input Files
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar_error.i)
 - (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder.i)
 - (modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_sphere.i)
 - (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D_mortar.i)
 - (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D_mortar.i)
 - (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D.i)
 - (modules/heat_transfer/test/tests/sideset_heat_transfer/cfem_gap.i)
 - (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder_mortar.i)
 - (modules/combined/test/tests/heat_convection/heat_convection_function.i)
 - (modules/combined/test/tests/optimization/invOpt_bc_convective/adjoint.i)
 - (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar.i)
 - (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere.i)
 - (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar_error.i)
 - (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar.i)
 - (modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_cylinder.i)
 - (modules/heat_transfer/test/tests/convective_flux_function/convective_flux_function.i)
 - (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder.i)
 - (modules/combined/test/tests/optimization/invOpt_bc_convective/forward.i)
 - (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D.i)
 - (modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_rz_cylinder.i)
 
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar_error.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = ${fparse 2 + rpv_core_gap_size}
rpv_outer_radius = ${fparse 2.5 + rpv_core_gap_size}
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
  [core_gap_rpv]
    type = ConcentricCircleMeshGenerator
    num_sectors = 10
    radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
    rings = '2 1 2'
    has_outer_square = false
    preserve_volumes = true
    portion = full
  []
  [rename_core_bdy]
    type = SideSetsBetweenSubdomainsGenerator
    input = core_gap_rpv
    primary_block = 1
    paired_block = 2
    new_boundary = 'core_outer'
  []
  [rename_inner_rpv_bdy]
    type = SideSetsBetweenSubdomainsGenerator
    input = rename_core_bdy
    primary_block = 3
    paired_block = 2
    new_boundary = 'rpv_inner'
  []
  [2d_mesh]
    type = BlockDeletionGenerator
    input = rename_inner_rpv_bdy
    block = 2
  []
  [secondary]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'rpv_inner'
    new_block_id = 10001
    new_block_name = 'secondary_lower'
    input = 2d_mesh
  []
  [primary]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'core_outer'
    new_block_id = 10000
    new_block_name = 'primary_lower'
    input = secondary
  []
  allow_renumbering = false
[]
[Variables]
  [Tsolid]
    initial_condition = 500
  []
  [lm]
    order = FIRST
    family = LAGRANGE
    block = 'secondary_lower'
  []
[]
[Kernels]
  [heat_source]
    type = CoupledForce
    variable = Tsolid
    block = '${core_blocks}'
    v = power_density
  []
  [heat_conduction]
    type = HeatConduction
    variable = Tsolid
  []
[]
[BCs]
  [RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
    type = ConvectiveFluxFunction # (Robin BC)
    variable = Tsolid
    boundary = 'outer' # outer RPV
    coefficient = ${rpv_outer_htc}
    T_infinity = ${rpv_outer_Tinf}
  []
[]
[UserObjects]
  [radiation]
    type = GapFluxModelRadiation
    temperature = Tsolid
    boundary = 'rpv_inner'
    primary_emissivity = 0.8
    secondary_emissivity = 0.8
  []
  [conduction]
    type = GapFluxModelConduction
    temperature = Tsolid
    boundary = 'rpv_inner'
    gap_conductivity = 0.1
  []
[]
[Constraints]
  [ced]
    type = ModularGapConductanceConstraint
    variable = lm
    secondary_variable = Tsolid
    primary_boundary = 'core_outer'
    primary_subdomain = 10000
    secondary_boundary = 'rpv_inner'
    secondary_subdomain = 10001
    gap_flux_models = 'radiation conduction'
    gap_geometry_type = 'CYLINDER'
    cylinder_axis_point_2 = '0 0 5'
  []
[]
[AuxVariables]
  [power_density]
    block = '${core_blocks}'
    initial_condition = 50e3
  []
[]
[Materials]
  [simple_mat]
    type = HeatConductionMaterial
    thermal_conductivity = 34.6 # W/m/K
  []
[]
[Postprocessors]
  [Tcore_avg]
    type = ElementAverageValue
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Tcore_max]
    type = ElementExtremeValue
    value_type = max
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Tcore_min]
    type = ElementExtremeValue
    value_type = min
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Trpv_avg]
    type = ElementAverageValue
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [Trpv_max]
    type = ElementExtremeValue
    value_type = max
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [Trpv_min]
    type = ElementExtremeValue
    value_type = min
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [ptot]
    type = ElementIntegralVariablePostprocessor
    variable = power_density
    block = '${core_blocks}'
  []
  [rpv_convective_out]
    type = ConvectiveHeatTransferSideIntegral
    T_solid = Tsolid
    boundary = 'outer' # outer RVP
    T_fluid = ${rpv_outer_Tinf}
    htc = ${rpv_outer_htc}
  []
  [heat_balance] # should be equal to 0 upon convergence
    type = ParsedPostprocessor
    expression = '(rpv_convective_out - ptot) / ptot'
    pp_names = 'rpv_convective_out ptot'
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [NodalTemperature]
    type = NodalValueSampler
    sort_by = id
    boundary = 'rpv_inner core_outer'
    variable = 'Tsolid'
  []
[]
[Executioner]
  type = Steady
  petsc_options = '-snes_converged_reason -pc_svd_monitor'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
                        '-pc_factor_shift_amount'
  petsc_options_value = ' lu       superlu_dist                  1e-5          NONZERO               '
                        '1e-15'
  snesmf_reuse_base = false
  nl_rel_tol = 1e-10
  nl_abs_tol = 1e-10
  l_max_its = 100
  line_search = none
[]
[Outputs]
  exodus = false
  csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
  [core_gap_rpv]
    type = ConcentricCircleMeshGenerator
    num_sectors = 10
    radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
    rings = '2 1 2'
    has_outer_square = false
    preserve_volumes = true
    portion = full
  []
  [rename_core_bdy]
    type = SideSetsBetweenSubdomainsGenerator
    input = core_gap_rpv
    primary_block = 1
    paired_block = 2
    new_boundary = 'core_outer'
  []
  [rename_inner_rpv_bdy]
    type = SideSetsBetweenSubdomainsGenerator
    input = rename_core_bdy
    primary_block = 3
    paired_block = 2
    new_boundary = 'rpv_inner'
  []
  [2d_mesh]
    type = BlockDeletionGenerator
    input = rename_inner_rpv_bdy
    block = 2
  []
  allow_renumbering = false
[]
[Variables]
  [Tsolid]
    initial_condition = 500
  []
[]
[Kernels]
  [heat_source]
    type = CoupledForce
    variable = Tsolid
    block = '${core_blocks}'
    v = power_density
  []
  [heat_conduction]
    type = HeatConduction
    variable = Tsolid
  []
[]
[BCs]
  [RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
    type = ConvectiveFluxFunction # (Robin BC)
    variable = Tsolid
    boundary = 'outer' # outer RPV
    coefficient = ${rpv_outer_htc}
    T_infinity = ${rpv_outer_Tinf}
  []
[]
[ThermalContact]
  [RPV_gap]
    type = GapHeatTransfer
    gap_geometry_type = 'CYLINDER'
    emissivity_primary = 0.8
    emissivity_secondary = 0.8
    variable = Tsolid
    primary = 'core_outer'
    secondary = 'rpv_inner'
    gap_conductivity = 0.1
    quadrature = true
    cylinder_axis_point_1 = '0 0 0'
    cylinder_axis_point_2 = '0 0 5'
  []
[]
[AuxVariables]
  [power_density]
    block = '${core_blocks}'
    initial_condition = 50e3
  []
[]
[Materials]
  [simple_mat]
    type = HeatConductionMaterial
    thermal_conductivity = 34.6 # W/m/K
  []
[]
[Postprocessors]
  [Tcore_avg]
    type = ElementAverageValue
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Tcore_max]
    type = ElementExtremeValue
    value_type = max
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Tcore_min]
    type = ElementExtremeValue
    value_type = min
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Trpv_avg]
    type = ElementAverageValue
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [Trpv_max]
    type = ElementExtremeValue
    value_type = max
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [Trpv_min]
    type = ElementExtremeValue
    value_type = min
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [ptot]
    type = ElementIntegralVariablePostprocessor
    variable = power_density
    block = '${core_blocks}'
  []
  [rpv_convective_out]
    type = ConvectiveHeatTransferSideIntegral
    T_solid = Tsolid
    boundary = 'outer' # outer RVP
    T_fluid = ${rpv_outer_Tinf}
    htc = ${rpv_outer_htc}
  []
  [heat_balance] # should be equal to 0 upon convergence
    type = ParsedPostprocessor
    expression = '(rpv_convective_out - ptot) / ptot'
    pp_names = 'rpv_convective_out ptot'
  []
[]
[VectorPostprocessors]
  [NodalTemperature]
    type = NodalValueSampler
    sort_by = id
    boundary = 'rpv_inner core_outer'
    variable = Tsolid
  []
[]
[Executioner]
  type = Steady
  automatic_scaling = true
  compute_scaling_once = false
  petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
  petsc_options_value = 'hypre boomeramg 100'
  nl_rel_tol = 1e-10
  nl_abs_tol = 1e-10
  l_max_its = 100
  [Quadrature]
    side_order = seventh
  []
  line_search = none
[]
[Outputs]
  exodus = false
  csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_sphere.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
  order = SECOND
  family = LAGRANGE
[]
[Mesh]
  [file]
    type = FileMeshGenerator
    file = cyl2D.e
  []
  coord_type = RZ
[]
[Functions]
  [temp]
    type = PiecewiseLinear
    x = '0   1'
    y = '100 200'
  []
[]
[Variables]
  [temp]
    initial_condition = 500
  []
[]
[AuxVariables]
  [gap_conductance]
    order = CONSTANT
    family = MONOMIAL
  []
  [power_density]
    block = 'fuel'
    initial_condition = 50e3
  []
[]
[Kernels]
  [heat_conduction]
    type = HeatConduction
    variable = temp
  []
  [heat_source]
    type = CoupledForce
    variable = temp
    block = 'fuel'
    v = power_density
  []
[]
[AuxKernels]
  [gap_cond]
    type = MaterialRealAux
    property = gap_conductance
    variable = gap_conductance
    boundary = 2
  []
[]
[Materials]
  [heat1]
    type = HeatConductionMaterial
    block = '1 2'
    specific_heat = 1.0
    thermal_conductivity = 34.6
  []
[]
[ThermalContact]
  [thermal_contact]
    type = GapHeatTransfer
    variable = temp
    primary = 3
    secondary = 2
    emissivity_primary = 0.8
    emissivity_secondary = 0.8
    gap_conductivity = 0.1
    quadrature = true
    gap_geometry_type = SPHERE
    sphere_origin = '0 0 0'
  []
[]
[BCs]
  [RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
    type = ConvectiveFluxFunction # (Robin BC)
    variable = temp
    boundary = '4' # outer RPV
    coefficient = ${sphere_outer_htc}
    T_infinity = ${sphere_outer_Tinf}
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
  petsc_options_value = 'lu       superlu_dist'
  dt = 1
  dtmin = 0.01
  end_time = 1
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-7
  [Quadrature]
    order = fifth
    side_order = seventh
  []
[]
[Outputs]
  exodus = false
  csv = true
  [Console]
    type = Console
  []
[]
[Postprocessors]
  [temp_left]
    type = SideAverageValue
    boundary = 2
    variable = temp
  []
  [temp_right]
    type = SideAverageValue
    boundary = 3
    variable = temp
  []
  [flux_left]
    type = SideDiffusiveFluxIntegral
    variable = temp
    boundary = 2
    diffusivity = thermal_conductivity
  []
  [flux_right]
    type = SideDiffusiveFluxIntegral
    variable = temp
    boundary = 3
    diffusivity = thermal_conductivity
  []
  [ptot]
    type = ElementIntegralVariablePostprocessor
    variable = power_density
    block = 'fuel'
  []
  [sphere_convective_out]
    type = ConvectiveHeatTransferSideIntegral
    T_solid = temp
    boundary = '4' # outer RVP
    T_fluid = ${sphere_outer_Tinf}
    htc = ${sphere_outer_htc}
  []
  [heat_balance] # should be equal to 0 upon convergence
    type = ParsedPostprocessor
    expression = '(sphere_convective_out - ptot) / ptot'
    pp_names = 'sphere_convective_out ptot'
  []
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D_mortar.i)
outer_htc = 10 # W/m^2/K
outer_Tinf = 300 # K
[GlobalParams]
  order = SECOND
  family = LAGRANGE
[]
[Problem]
  kernel_coverage_check = false
  material_coverage_check = false
[]
[Mesh]
  [left_block]
    type = GeneratedMeshGenerator
    dim = 3
    nx = 3
    ny = 6
    nz = 6
    xmin = -1
    xmax = -0.5
    ymin = -0.5
    ymax = 0.5
    zmin = -0.5
    zmax = 0.5
    elem_type = HEX27
  []
  [left_block_sidesets]
    type = RenameBoundaryGenerator
    input = left_block
    old_boundary = '0 1 2 3 4 5'
    new_boundary = 'left_bottom left_back left_right left_front left_left left_top'
  []
  [left_block_id]
    type = SubdomainIDGenerator
    input = left_block_sidesets
    subdomain_id = 1
  []
  [right_block]
    type = GeneratedMeshGenerator
    dim = 3
    nx = 4
    ny = 8
    nz = 8
    xmin = 0.5
    xmax = 1
    ymin = -0.5
    ymax = 0.5
    zmin = -0.5
    zmax = 0.5
    elem_type = HEX27
  []
  [right_block_sidesets]
    type = RenameBoundaryGenerator
    input = right_block
    old_boundary = '0 1 2 3 4 5'
    # new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
    new_boundary = '100 101 102 103 104 105'
  []
  [right_block_sidesets_rename]
    type = RenameBoundaryGenerator
    input = right_block_sidesets
    old_boundary = '100 101 102 103 104 105'
    new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
  []
  [right_block_id]
    type = SubdomainIDGenerator
    input = right_block_sidesets_rename
    subdomain_id = 2
  []
  [combined_mesh]
    type = MeshCollectionGenerator
    inputs = 'left_block_id right_block_id'
  []
  [left_lower]
    type = LowerDBlockFromSidesetGenerator
    input = combined_mesh
    sidesets = 'left_right'
    new_block_id = '10001'
    new_block_name = 'secondary_lower'
  []
  [right_lower]
    type = LowerDBlockFromSidesetGenerator
    input = left_lower
    sidesets = 'right_left'
    new_block_id = '10000'
    new_block_name = 'primary_lower'
  []
[]
[Functions]
  [temp]
    type = PiecewiseLinear
    x = '0   1'
    y = '100 200'
  []
[]
[Variables]
  [temp]
    initial_condition = 500
  []
  [lm]
    order = SECOND
    family = LAGRANGE
    block = 'secondary_lower'
  []
[]
[AuxVariables]
  [power_density]
    block = 1
    initial_condition = 50e3
  []
[]
[Kernels]
  [heat_conduction]
    type = HeatConduction
    variable = temp
    block = '1 2'
  []
  [heat_source]
    type = CoupledForce
    variable = temp
    block = '1'
    v = power_density
  []
[]
[Materials]
  [heat1]
    type = HeatConductionMaterial
    block = '1 2'
    specific_heat = 1.0
    thermal_conductivity = 34.6
  []
[]
[UserObjects]
  [radiation]
    type = GapFluxModelRadiation
    temperature = temp
    boundary = 'left_right'
    primary_emissivity = 0.0
    secondary_emissivity = 0.0
  []
  [conduction]
    type = GapFluxModelConduction
    temperature = temp
    boundary = 'left_right'
    gap_conductivity = 5.0
  []
[]
[Constraints]
  [ced]
    type = ModularGapConductanceConstraint
    variable = lm
    secondary_variable = temp
    primary_boundary = 'right_left'
    primary_subdomain = 'primary_lower'
    secondary_boundary = 'left_right'
    secondary_subdomain = 'secondary_lower'
    gap_flux_models = 'radiation conduction'
    gap_geometry_type = PLATE
  []
[]
[BCs]
  [RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
    type = ConvectiveFluxFunction # (Robin BC)
    variable = temp
    boundary = 'right_right' # outer RPV
    coefficient = ${outer_htc}
    T_infinity = ${outer_Tinf}
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
  petsc_options_value = 'lu       superlu_dist'
  dt = 1
  dtmin = 0.01
  end_time = 1
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-8
[]
[Outputs]
  exodus = true
  csv = true
  [Console]
    type = Console
  []
[]
[Postprocessors]
  [temp_left]
    type = SideAverageValue
    boundary = 'left_right'
    variable = temp
  []
  [temp_right]
    type = SideAverageValue
    boundary = 'right_left'
    variable = temp
  []
  [flux_left]
    type = SideDiffusiveFluxIntegral
    variable = temp
    boundary = 'left_right'
    diffusivity = thermal_conductivity
  []
  [flux_right]
    type = SideDiffusiveFluxIntegral
    variable = temp
    boundary = 'right_left'
    diffusivity = thermal_conductivity
  []
  [ptot]
    type = ElementIntegralVariablePostprocessor
    variable = power_density
    block = 1
  []
  [convective_out]
    type = ConvectiveHeatTransferSideIntegral
    T_solid = temp
    boundary = 'right_right' # outer RVP
    T_fluid = ${outer_Tinf}
    htc = ${outer_htc}
  []
  [heat_balance] # should be equal to 0 upon convergence
    type = ParsedPostprocessor
    expression = '(convective_out - ptot) / ptot'
    pp_names = 'convective_out ptot'
  []
[]
[VectorPostprocessors]
  [NodalTemperature]
    type = NodalValueSampler
    sort_by = id
    boundary = 'left_right right_left'
    variable = temp
  []
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D_mortar.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
  order = SECOND
  family = LAGRANGE
[]
[Problem]
  kernel_coverage_check = false
  material_coverage_check = false
[]
[Mesh]
  [file]
    type = FileMeshGenerator
    file = sphere3D.e
  []
  [secondary]
    type = LowerDBlockFromSidesetGenerator
    sidesets = '2'
    new_block_id = 10001
    new_block_name = 'secondary_lower'
    input = file
  []
  [primary]
    type = LowerDBlockFromSidesetGenerator
    sidesets = '3'
    new_block_id = 10000
    new_block_name = 'primary_lower'
    input = secondary
  []
[]
[Functions]
  [temp]
    type = PiecewiseLinear
    x = '0   1'
    y = '100 200'
  []
[]
[Variables]
  [temp]
    initial_condition = 500
  []
  [lm]
    order = FIRST
    family = LAGRANGE
    block = 'secondary_lower'
  []
[]
[AuxVariables]
  # [gap_conductance]
  #   order = CONSTANT
  #   family = MONOMIAL
  # []
  [power_density]
    block = 'fuel'
    initial_condition = 50e3
  []
[]
[Kernels]
  [heat_conduction]
    type = HeatConduction
    variable = temp
    block = '1 2'
  []
  [heat_source]
    type = CoupledForce
    variable = temp
    block = 'fuel'
    v = power_density
  []
[]
# [AuxKernels]
#   [gap_cond]
#     type = MaterialRealAux
#     property = gap_conductance
#     variable = gap_conductance
#     boundary = 2
#   []
# []
[Materials]
  [heat1]
    type = HeatConductionMaterial
    block = '1 2'
    specific_heat = 1.0
    thermal_conductivity = 34.6
  []
[]
[UserObjects]
  [radiation]
    type = GapFluxModelRadiation
    temperature = temp
    boundary = 2
    primary_emissivity = 0.0
    secondary_emissivity = 0.0
  []
  [conduction]
    type = GapFluxModelConduction
    temperature = temp
    boundary = 2
    gap_conductivity = 5.0
  []
[]
[Constraints]
  [ced]
    type = ModularGapConductanceConstraint
    variable = lm
    secondary_variable = temp
    primary_boundary = 3
    primary_subdomain = 10000
    secondary_boundary = 2
    secondary_subdomain = 10001
    gap_flux_models = 'radiation conduction'
    gap_geometry_type = SPHERE
    sphere_origin = '0 0 0'
  []
[]
[BCs]
  [RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
    type = ConvectiveFluxFunction # (Robin BC)
    variable = temp
    boundary = '4' # outer RPV
    coefficient = ${sphere_outer_htc}
    T_infinity = ${sphere_outer_Tinf}
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
  petsc_options_value = 'lu       superlu_dist'
  dt = 1
  dtmin = 0.01
  end_time = 1
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-7
[]
[Outputs]
  exodus = true
  csv = true
  [Console]
    type = Console
  []
[]
[Postprocessors]
  [temp_left]
    type = SideAverageValue
    boundary = 2
    variable = temp
  []
  [temp_right]
    type = SideAverageValue
    boundary = 3
    variable = temp
  []
  [flux_left]
    type = SideDiffusiveFluxIntegral
    variable = temp
    boundary = 2
    diffusivity = thermal_conductivity
  []
  [flux_right]
    type = SideDiffusiveFluxIntegral
    variable = temp
    boundary = 3
    diffusivity = thermal_conductivity
  []
  [ptot]
    type = ElementIntegralVariablePostprocessor
    variable = power_density
    block = 'fuel'
  []
  [sphere_convective_out]
    type = ConvectiveHeatTransferSideIntegral
    T_solid = temp
    boundary = '4' # outer RVP
    T_fluid = ${sphere_outer_Tinf}
    htc = ${sphere_outer_htc}
  []
  [heat_balance] # should be equal to 0 upon convergence
    type = ParsedPostprocessor
    expression = '(sphere_convective_out - ptot) / ptot'
    pp_names = 'sphere_convective_out ptot'
  []
[]
[VectorPostprocessors]
  [NodalTemperature]
    type = NodalValueSampler
    sort_by = id
    boundary = '2 3'
    variable = temp
  []
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
  order = SECOND
  family = LAGRANGE
[]
[Mesh]
  file = sphere3D.e
[]
[Functions]
  [temp]
    type = PiecewiseLinear
    x = '0   1'
    y = '100 200'
  []
[]
[Variables]
  [temp]
    initial_condition = 500
  []
[]
[AuxVariables]
  [gap_conductance]
    order = CONSTANT
    family = MONOMIAL
  []
  [power_density]
    block = 'fuel'
    initial_condition = 50e3
  []
[]
[Kernels]
  [heat_conduction]
    type = HeatConduction
    variable = temp
  []
  [heat_source]
    type = CoupledForce
    variable = temp
    block = 'fuel'
    v = power_density
  []
[]
[AuxKernels]
  [gap_cond]
    type = MaterialRealAux
    property = gap_conductance
    variable = gap_conductance
    boundary = 2
  []
[]
[Materials]
  [heat1]
    type = HeatConductionMaterial
    block = '1 2'
    specific_heat = 1.0
    thermal_conductivity = 34.6
  []
[]
[ThermalContact]
  [thermal_contact]
    type = GapHeatTransfer
    variable = temp
    primary = 3
    secondary = 2
    emissivity_primary = 0
    emissivity_secondary = 0
    gap_conductivity = 5
    gap_geometry_type = SPHERE
    sphere_origin = '0 0 0'
  []
[]
[BCs]
  [RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
    type = ConvectiveFluxFunction # (Robin BC)
    variable = temp
    boundary = '4' # outer RPV
    coefficient = ${sphere_outer_htc}
    T_infinity = ${sphere_outer_Tinf}
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
  petsc_options_value = 'lu       superlu_dist'
  dt = 1
  dtmin = 0.01
  end_time = 1
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-7
  [Quadrature]
    order = fifth
    side_order = seventh
  []
[]
[Outputs]
  exodus = true
  csv = true
  [Console]
    type = Console
  []
[]
[Postprocessors]
  [temp_left]
    type = SideAverageValue
    boundary = 2
    variable = temp
  []
  [temp_right]
    type = SideAverageValue
    boundary = 3
    variable = temp
  []
  [flux_left]
    type = SideDiffusiveFluxIntegral
    variable = temp
    boundary = 2
    diffusivity = thermal_conductivity
  []
  [flux_right]
    type = SideDiffusiveFluxIntegral
    variable = temp
    boundary = 3
    diffusivity = thermal_conductivity
  []
  [ptot]
    type = ElementIntegralVariablePostprocessor
    variable = power_density
    block = 'fuel'
  []
  [sphere_convective_out]
    type = ConvectiveHeatTransferSideIntegral
    T_solid = temp
    boundary = '4' # outer RVP
    T_fluid = ${sphere_outer_Tinf}
    htc = ${sphere_outer_htc}
  []
  [heat_balance] # should be equal to 0 upon convergence
    type = ParsedPostprocessor
    expression = '(sphere_convective_out - ptot) / ptot'
    pp_names = 'sphere_convective_out ptot'
  []
[]
[VectorPostprocessors]
  [NodalTemperature]
    type = NodalValueSampler
    sort_by = id
    boundary = '2 3'
    variable = temp
  []
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/cfem_gap.i)
[Mesh]
  # Build 2-by-2 mesh
  [mesh]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 2
    xmax = 2
    ny = 2
    ymax = 2
  []
  # Create blocs 0, 1, 2, 3
  [block_1]
    type = SubdomainBoundingBoxGenerator
    input = mesh
    block_id = 1
    bottom_left = '1 0 0'
    top_right = '2 1 0'
  []
  [block_2]
    type = SubdomainBoundingBoxGenerator
    input = block_1
    block_id = 2
    bottom_left = '0 1 0'
    top_right = '1 2 0'
  []
  [block_3]
    type = SubdomainBoundingBoxGenerator
    input = block_2
    block_id = 3
    bottom_left = '1 1 0'
    top_right = '2 2 0'
  []
  # Create inner sidesets
  [interface_01]
    type = SideSetsBetweenSubdomainsGenerator
    input = block_3
    primary_block = 0
    paired_block = 1
    new_boundary = 'interface_01'
  []
  [interface_13]
    type = SideSetsBetweenSubdomainsGenerator
    input = interface_01
    primary_block = 1
    paired_block = 3
    new_boundary = 'interface_13'
  []
  [interface_32]
    type = SideSetsBetweenSubdomainsGenerator
    input = interface_13
    primary_block = 3
    paired_block = 2
    new_boundary = 'interface_32'
  []
  [interface_20]
    type = SideSetsBetweenSubdomainsGenerator
    input = interface_32
    primary_block = 2
    paired_block = 0
    new_boundary = 'interface_20'
  []
  # Create outer boundaries
  [boundary_left_0]
    type = SideSetsAroundSubdomainGenerator
    input = interface_20
    block = 0
    normal = '-1 0 0'
    new_boundary = 'left_0'
  []
  [boundary_bot_0]
    type = SideSetsAroundSubdomainGenerator
    input = boundary_left_0
    block = 0
    normal = '0 -1 0'
    new_boundary = 'bot_0'
  []
  [boundary_bot_1]
    type = SideSetsAroundSubdomainGenerator
    input = boundary_bot_0
    block = 1
    normal = '0 -1 0'
    new_boundary = 'bot_1'
  []
  [boundary_right_1]
    type = SideSetsAroundSubdomainGenerator
    input = boundary_bot_1
    block = 1
    normal = '1 0 0'
    new_boundary = 'right_1'
  []
  [boundary_right_3]
    type = SideSetsAroundSubdomainGenerator
    input = boundary_right_1
    block = 3
    normal = '1 0 0'
    new_boundary = 'right_3'
  []
  [boundary_top_3]
    type = SideSetsAroundSubdomainGenerator
    input = boundary_right_3
    block = 3
    normal = '0 1 0'
    new_boundary = 'top_3'
  []
  [boundary_top_2]
    type = SideSetsAroundSubdomainGenerator
    input = boundary_top_3
    block = 2
    normal = '0 1 0'
    new_boundary = 'top_2'
  []
  [boundary_left_2]
    type = SideSetsAroundSubdomainGenerator
    input = boundary_top_2
    block = 2
    normal = '-1 0 0'
    new_boundary = 'left_2'
  []
  uniform_refine = 4
[]
[Variables]
  # Need to have variable for each block to allow discontinuity
  [T0]
    block = 0
  []
  [T1]
    block = 1
  []
  [T2]
    block = 2
  []
  [T3]
    block = 3
  []
[]
[Kernels]
  # Diffusion kernel for each block's variable
  [diff_0]
    type = MatDiffusion
    variable = T0
    diffusivity = conductivity
    block = 0
  []
  [diff_1]
    type = MatDiffusion
    variable = T1
    diffusivity = conductivity
    block = 1
  []
  [diff_2]
    type = MatDiffusion
    variable = T2
    diffusivity = conductivity
    block = 2
  []
  [diff_3]
    type = MatDiffusion
    variable = T3
    diffusivity = conductivity
    block = 3
  []
  # Source for two of the blocks
  [source_0]
    type = BodyForce
    variable = T0
    value = 5e5
    block = '0'
  []
  [source_3]
    type = BodyForce
    variable = T3
    value = 5e5
    block = '3'
  []
[]
[InterfaceKernels]
  # Side set kernel to represent heat transfer across blocks
  # Automatically uses the materials defined in SideSetHeatTransferMaterial
  [gap_01]
    type = SideSetHeatTransferKernel
    # This variable defined on a given block must match the primary_block given when the side set was generated
    variable = T0
    # This variable defined on a given block must match the paired_block given when the side set was generated
    neighbor_var = T1
    boundary = 'interface_01'
  []
  [gap_13]
    type = SideSetHeatTransferKernel
    variable = T1
    neighbor_var = T3
    boundary = 'interface_13'
  []
  [gap_32]
    type = SideSetHeatTransferKernel
    variable = T3
    neighbor_var = T2
    boundary = 'interface_32'
  []
  [gap_20]
    type = SideSetHeatTransferKernel
    variable = T2
    neighbor_var = T0
    boundary = 'interface_20'
  []
[]
# Creating auxiliary variable to combine block restricted solutions
# Ignores discontinuity though
[AuxVariables]
  [T]
  []
[]
[AuxKernels]
  [temp_0]
    type = NormalizationAux
    variable = T
    source_variable = T0
    block = 0
  []
  [temp_1]
    type = NormalizationAux
    variable = T
    source_variable = T1
    block = 1
  []
  [temp_2]
    type = NormalizationAux
    variable = T
    source_variable = T2
    block = 2
  []
  [temp_3]
    type = NormalizationAux
    variable = T
    source_variable = T3
    block = 3
  []
[]
[BCs]
  # Boundary condition for each block's outer surface
  [bc_left_2]
    type = DirichletBC
    boundary = 'left_2'
    variable = T2
    value = 300.0
  []
  [bc_left_0]
    type = DirichletBC
    boundary = 'left_0'
    variable = T0
    value = 300.0
  []
  [bc_bot_0]
    type = DirichletBC
    boundary = 'bot_0'
    variable = T0
    value = 300.0
  []
  [bc_bot_1]
    type = DirichletBC
    boundary = 'bot_1'
    variable = T1
    value = 300.0
  []
  [./bc_top_2]
    type = ConvectiveFluxFunction # (Robin BC)
    variable = T2
    boundary = 'top_2'
    coefficient = 1e3 # W/K/m^2
    T_infinity = 600.0
  [../]
  [./bc_top_3]
    type = ConvectiveFluxFunction # (Robin BC)
    variable = T3
    boundary = 'top_3'
    coefficient = 1e3 # W/K/m^2
    T_infinity = 600.0
  [../]
  [./bc_right_3]
    type = ConvectiveFluxFunction # (Robin BC)
    variable = T3
    boundary = 'right_3'
    coefficient = 1e3 # W/K/m^2
    T_infinity = 600.0
  [../]
  [./bc_right_1]
    type = ConvectiveFluxFunction # (Robin BC)
    variable = T1
    boundary = 'right_1'
    coefficient = 1e3 # W/K/m^2
    T_infinity = 600.0
  [../]
[]
[Materials]
  [fuel]
    type = GenericConstantMaterial
    prop_names = 'conductivity'
    prop_values = 75
    block = '0 3'
  []
  [mod]
    type = GenericConstantMaterial
    prop_names = 'conductivity'
    prop_values = 7.5
    block = '1 2'
  []
  # Interface material used for SideSetHeatTransferKernel
  # Heat transfer meachnisms ignored if certain properties are not supplied
  [gap_mat]
    type = SideSetHeatTransferMaterial
    boundary = 'interface_01 interface_13 interface_32 interface_20'
    conductivity = 0.41
    gap_length = 0.002
    Tbulk = 750
    h_primary = 3000
    h_neighbor = 3000
    emissivity_primary = 0.85
    emissivity_neighbor = 0.85
  []
[]
[Executioner]
  type = Steady
  nl_rel_tol = 1e-12
  l_tol = 1e-8
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -ksp_gmres_restart'
  petsc_options_value = 'lu       superlu_dist                  50'
[]
[Outputs]
  exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder_mortar.i)
rpv_core_gap_size = 0.2
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_width = '${fparse rpv_outer_radius - rpv_inner_radius}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
  [gmg]
    type = CartesianMeshGenerator
    dim = 2
    dx = '${core_outer_radius} ${rpv_core_gap_size} ${rpv_width}'
    ix = '400 1 100'
    dy = 1
    iy = '5'
  []
  [set_block_id1]
    type = SubdomainBoundingBoxGenerator
    input = gmg
    bottom_left = '0 0 0'
    top_right = '${core_outer_radius} 1 0'
    block_id = 1
    location = INSIDE
  []
  [rename_core_bdy]
    type = SideSetsBetweenSubdomainsGenerator
    input = set_block_id1
    primary_block = 1
    paired_block = 0
    new_boundary = 'core_outer'
  []
  [set_block_id3]
    type = SubdomainBoundingBoxGenerator
    input = rename_core_bdy
    bottom_left = '${rpv_inner_radius} 0 0'
    top_right = '${rpv_outer_radius} 1 0'
    block_id = 3
    location = INSIDE
  []
  [rename_inner_rpv_bdy]
    type = SideSetsBetweenSubdomainsGenerator
    input = set_block_id3
    primary_block = 3
    paired_block = 0
    new_boundary = 'rpv_inner'
  []
  # comment out for test without gap
  [2d_mesh]
    type = BlockDeletionGenerator
    input = rename_inner_rpv_bdy
    block = 0
  []
  [secondary]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'rpv_inner'
    new_block_id = 10001
    new_block_name = 'secondary_lower'
    input = 2d_mesh
  []
  [primary]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'core_outer'
    new_block_id = 10000
    new_block_name = 'primary_lower'
    input = secondary
  []
  allow_renumbering = false
  coord_type = RZ
[]
[Variables]
  [Tsolid]
    initial_condition = 500
  []
    [lm]
      order = FIRST
      family = LAGRANGE
      block = 'secondary_lower'
    []
[]
[Kernels]
  [heat_source]
    type = CoupledForce
    variable = Tsolid
    block = '${core_blocks}'
    v = power_density
  []
  [heat_conduction]
    type = HeatConduction
    variable = Tsolid
  []
[]
[BCs]
  [RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
    type = ConvectiveFluxFunction # (Robin BC)
    variable = Tsolid
    boundary = 'right' # outer RPV
    coefficient = ${rpv_outer_htc}
    T_infinity = ${rpv_outer_Tinf}
  []
[]
[UserObjects]
  [radiation]
    type = GapFluxModelRadiation
    temperature = Tsolid
    boundary = 'rpv_inner'
    primary_emissivity = 0.8
    secondary_emissivity = 0.8
  []
  [conduction]
    type = GapFluxModelConduction
    temperature = Tsolid
    boundary = 'rpv_inner'
    gap_conductivity = 0.1
  []
[]
[Constraints]
  [ced]
    type = ModularGapConductanceConstraint
    variable = lm
    secondary_variable = Tsolid
    primary_boundary = 'core_outer'
    primary_subdomain = 10000
    secondary_boundary = 'rpv_inner'
    secondary_subdomain = 10001
    gap_flux_models = 'radiation conduction'
    gap_geometry_type = 'CYLINDER'
  []
[]
[AuxVariables]
  [power_density]
    block = '${core_blocks}'
    initial_condition = 50e3
  []
[]
[Materials]
  [simple_mat]
    type = HeatConductionMaterial
    thermal_conductivity = 34.6 # W/m/K
  []
[]
[Postprocessors]
  [Tcore_avg]
    type = ElementAverageValue
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Tcore_max]
    type = ElementExtremeValue
    value_type = max
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Tcore_min]
    type = ElementExtremeValue
    value_type = min
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Trpv_avg]
    type = ElementAverageValue
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [Trpv_max]
    type = ElementExtremeValue
    value_type = max
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [Trpv_min]
    type = ElementExtremeValue
    value_type = min
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [ptot]
    type = ElementIntegralVariablePostprocessor
    variable = power_density
    block = '${core_blocks}'
  []
  [rpv_convective_out]
    type = ConvectiveHeatTransferSideIntegral
    T_solid = Tsolid
    boundary = 'right' # outer RVP
    T_fluid = ${rpv_outer_Tinf}
    htc = ${rpv_outer_htc}
  []
  [heat_balance] # should be equal to 0 upon convergence
    type = ParsedPostprocessor
    expression = '(rpv_convective_out - ptot) / ptot'
    pp_names = 'rpv_convective_out ptot'
  []
  [flux_from_core] # converges to ptot as the mesh is refined
    type = SideDiffusiveFluxIntegral
    variable = Tsolid
    boundary = core_outer
    diffusivity = thermal_conductivity
  []
  [flux_into_rpv] # converges to rpv_convective_out as the mesh is refined
    type = SideDiffusiveFluxIntegral
    variable = Tsolid
    boundary = rpv_inner
    diffusivity = thermal_conductivity
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [NodalTemperature]
    type = NodalValueSampler
    sort_by = id
    boundary = 'rpv_inner core_outer'
    variable = Tsolid
  []
[]
[Executioner]
  type = Steady
  petsc_options = '-snes_converged_reason -pc_svd_monitor'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
                        '-pc_factor_shift_amount'
  petsc_options_value = ' lu       superlu_dist                  1e-5          NONZERO               '
                        '1e-15'
  snesmf_reuse_base = false
  nl_rel_tol = 1e-10
  nl_abs_tol = 1e-10
  l_max_its = 100
  line_search = none
[]
[Outputs]
  exodus = false
  csv = true
[]
(modules/combined/test/tests/heat_convection/heat_convection_function.i)
[Mesh]    # Mesh Start
  file = patch_3d.e
#
[]    # Mesh END
[Functions]
  [./t_infinity]
    type = ParsedFunction
    expression = '300'
  [../]
  [./htc]
    type = ParsedFunction
    expression = 10.0*5.7                 # convective heat transfer coefficient (w/m^2-K)[50 BTU/hr-ft^2-F]
  [../]
[]
[Variables]  # Variables Start
  [./temp]
    order = FIRST
    family = LAGRANGE
    initial_condition = 294.26
  [../]
[]    # Variables END
[Kernels]  # Kernels Start
  [./heat]
    type = HeatConduction
    variable = temp
  [../]
[]    # Kernels END
[BCs]    # Boundary Conditions Start
# Heat transfer coefficient on outer parallelpiped radius and ends
  [./convective_clad_surface]    # Convective Start
    type = ConvectiveFluxFunction  # Convective flux, e.g. q'' = h*(Tw - Tf)
    boundary = 12
    variable = temp
    coefficient = htc
    T_infinity = t_infinity
  [../]                                  # Convective End
  [./fixed]
    type = DirichletBC
    variable = temp
    boundary = 10
    value = 100
  [../]
[]    # BCs END
[Materials]    # Materials Start
  [./thermal]
    type = HeatConductionMaterial
    block = '1 2 3 4 5 6 7'
    specific_heat = 826.4
    thermal_conductivity = 57
  [../]
  [./density]
    type = Density
    block = '1 2 3 4 5 6 7'
    density = 2405.28
  [../]
[]      # Materials END
[Executioner]    # Executioner Start
   type = Transient
  #Preconditioned JFNK (default)
  solve_type = 'PJFNK'
   petsc_options = '-snes_ksp_ew '
   petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type'
   petsc_options_value = '70 hypre boomeramg'
   l_max_its = 60
   nl_rel_tol = 1e-8
   nl_abs_tol = 1e-10
   l_tol = 1e-5
   start_time = 0.0
   dt = 1
   num_steps = 1
[]      # Executioner END
[Outputs]    # Output Start
  # Output Start
  exodus = true
[]      # Output END
#      # Input file END
(modules/combined/test/tests/optimization/invOpt_bc_convective/adjoint.i)
[Mesh]
  [gmg]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 10
    ny = 20
    xmax = 1
    ymax = 2
  []
[]
[AuxVariables]
  [temperature_forward]
  []
  [T2]
  []
[]
[AuxKernels]
  [TT]
    type = ParsedAux
    coupled_variables = 'temperature temperature_forward'
    variable = T2
    expression = 'temperature*(100-temperature_forward)'
  []
[]
[Variables]
  [temperature]
  []
[]
[Kernels]
  [heat_conduction]
    type = ADHeatConduction
    variable = temperature
  []
[]
[DiracKernels]
  [pt]
    type = ReporterPointSource
    variable = temperature
    x_coord_name = misfit/measurement_xcoord
    y_coord_name = misfit/measurement_ycoord
    z_coord_name = misfit/measurement_zcoord
    value_name = misfit/misfit_values
  []
[]
[Reporters]
  [misfit]
    type = OptimizationData
  []
  [params]
    type = ConstantReporter
    real_vector_names = 'vals'
    real_vector_values = '0' # Dummy value
  []
[]
[BCs]
  [left]
    type = ConvectiveFluxFunction
    variable = temperature
    boundary = 'left'
    T_infinity = 0.0
    coefficient = function1
  []
  [right]
    type = NeumannBC
    variable = temperature
    boundary = right
    value = 0
  []
  [bottom]
    type = DirichletBC
    variable = temperature
    boundary = bottom
    value = 0
  []
  [top]
    type = DirichletBC
    variable = temperature
    boundary = top
    value = 0
  []
[]
[Materials]
  [steel]
    type = ADGenericConstantMaterial
    prop_names = thermal_conductivity
    prop_values = 5
  []
[]
[Executioner]
  type = Steady
  solve_type = PJFNK
  nl_abs_tol = 1e-6
  nl_rel_tol = 1e-8
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
[]
[Functions]
  [function1]
    type = ParsedOptimizationFunction
    expression = 'a'
    param_symbol_names = 'a'
    param_vector_name = 'params/vals'
  []
[]
[VectorPostprocessors]
  [adjoint_pt]
    type = SideOptimizationNeumannFunctionInnerProduct
    variable = T2
    function = function1
    boundary = left
  []
[]
[Outputs]
  console = false
  exodus = false
  file_base = 'adjoint'
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
  order = SECOND
  family = LAGRANGE
[]
[Problem]
  kernel_coverage_check = false
  material_coverage_check = false
[]
[Mesh]
  [file]
    type = FileMeshGenerator
    file = cyl2D.e
  []
  [secondary]
    type = LowerDBlockFromSidesetGenerator
    sidesets = '2'
    new_block_id = 10001
    new_block_name = 'secondary_lower'
    input = file
  []
  [primary]
    type = LowerDBlockFromSidesetGenerator
    sidesets = '3'
    new_block_id = 10000
    new_block_name = 'primary_lower'
    input = secondary
  []
  allow_renumbering = false
  coord_type = RZ
[]
[Functions]
  [temp]
    type = PiecewiseLinear
    x = '0   1'
    y = '100 200'
  []
[]
[Variables]
  [temp]
    initial_condition = 500
  []
  [lm]
    order = SECOND
    family = LAGRANGE
    block = 'secondary_lower'
  []
[]
[AuxVariables]
  [power_density]
    block = 'fuel'
    initial_condition = 50e3
  []
[]
[Kernels]
  [heat_conduction]
    type = HeatConduction
    variable = temp
    block = '1 2'
  []
  [heat_source]
    type = CoupledForce
    variable = temp
    block = 'fuel'
    v = power_density
  []
[]
[Materials]
  [heat1]
    type = HeatConductionMaterial
    block = '1 2'
    specific_heat = 1.0
    thermal_conductivity = 34.6
  []
[]
[UserObjects]
  [radiation]
    type = GapFluxModelRadiation
    temperature = temp
    boundary = 2
    primary_emissivity = 0.0
    secondary_emissivity = 0.0
  []
  [conduction]
    type = GapFluxModelConduction
    temperature = temp
    boundary = 2
    gap_conductivity = 5.0
  []
[]
[Constraints]
  [ced]
    type = ModularGapConductanceConstraint
    variable = lm
    secondary_variable = temp
    primary_boundary = 3
    primary_subdomain = 10000
    secondary_boundary = 2
    secondary_subdomain = 10001
    gap_flux_models = 'radiation conduction'
    gap_geometry_type = SPHERE
    sphere_origin = '0 0 0'
  []
[]
[BCs]
  [RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
    type = ConvectiveFluxFunction # (Robin BC)
    variable = temp
    boundary = '4' # outer RPV
    coefficient = ${sphere_outer_htc}
    T_infinity = ${sphere_outer_Tinf}
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
  petsc_options_value = 'lu       superlu_dist'
  dt = 1
  dtmin = 0.01
  end_time = 1
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-7
[]
[Outputs]
  exodus = true
  csv = true
  [Console]
    type = Console
  []
[]
[VectorPostprocessors]
  [NodalTemperature]
    type = NodalValueSampler
    sort_by = id
    boundary = '2 3'
    variable = temp
  []
[]
[Postprocessors]
  [temp_left]
    type = SideAverageValue
    boundary = 2
    variable = temp
  []
  [temp_right]
    type = SideAverageValue
    boundary = 3
    variable = temp
  []
  [flux_left]
    type = SideDiffusiveFluxIntegral
    variable = temp
    boundary = 2
    diffusivity = thermal_conductivity
  []
  [flux_right]
    type = SideDiffusiveFluxIntegral
    variable = temp
    boundary = 3
    diffusivity = thermal_conductivity
  []
  [ptot]
    type = ElementIntegralVariablePostprocessor
    variable = power_density
    block = 'fuel'
  []
  [sphere_convective_out]
    type = ConvectiveHeatTransferSideIntegral
    T_solid = temp
    boundary = '4' # outer RVP
    T_fluid = ${sphere_outer_Tinf}
    htc = ${sphere_outer_htc}
  []
  [heat_balance] # should be equal to 0 upon convergence
    type = ParsedPostprocessor
    expression = '(sphere_convective_out - ptot) / ptot'
    pp_names = 'sphere_convective_out ptot'
  []
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
  order = SECOND
  family = LAGRANGE
[]
[Mesh]
  [file]
    type = FileMeshGenerator
    file = cyl2D.e
  []
  allow_renumbering = false
  coord_type = RZ
[]
[Functions]
  [temp]
    type = PiecewiseLinear
    x = '0   1'
    y = '100 200'
  []
[]
[Variables]
  [temp]
    initial_condition = 500
  []
[]
[AuxVariables]
  [gap_conductance]
    order = CONSTANT
    family = MONOMIAL
  []
  [power_density]
    block = 'fuel'
    initial_condition = 50e3
  []
[]
[Kernels]
  [heat_conduction]
    type = HeatConduction
    variable = temp
  []
  [heat_source]
    type = CoupledForce
    variable = temp
    block = 'fuel'
    v = power_density
  []
[]
[AuxKernels]
  [gap_cond]
    type = MaterialRealAux
    property = gap_conductance
    variable = gap_conductance
    boundary = 2
  []
[]
[Materials]
  [heat1]
    type = HeatConductionMaterial
    block = '1 2'
    specific_heat = 1.0
    thermal_conductivity = 34.6
  []
[]
[ThermalContact]
  [thermal_contact]
    type = GapHeatTransfer
    variable = temp
    primary = 3
    secondary = 2
    emissivity_primary = 0.0
    emissivity_secondary = 0.0
    gap_conductivity = 5
  #  quadrature = true
    gap_geometry_type = SPHERE
    sphere_origin = '0 0 0'
  []
[]
[BCs]
  [RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
    type = ConvectiveFluxFunction # (Robin BC)
    variable = temp
    boundary = '4' # outer RPV
    coefficient = ${sphere_outer_htc}
    T_infinity = ${sphere_outer_Tinf}
  []
[]
[VectorPostprocessors]
  [NodalTemperature]
    type = NodalValueSampler
    sort_by = id
    boundary = '2 3'
    variable = temp
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
  petsc_options_value = 'lu       superlu_dist'
  dt = 1
  dtmin = 0.01
  end_time = 1
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-7
  [Quadrature]
    order = fifth
    side_order = seventh
  []
[]
[Outputs]
  exodus = true
  csv = true
  [Console]
    type = Console
  []
[]
[Postprocessors]
  [temp_left]
    type = SideAverageValue
    boundary = 2
    variable = temp
  []
  [temp_right]
    type = SideAverageValue
    boundary = 3
    variable = temp
  []
  [flux_left]
    type = SideDiffusiveFluxIntegral
    variable = temp
    boundary = 2
    diffusivity = thermal_conductivity
  []
  [flux_right]
    type = SideDiffusiveFluxIntegral
    variable = temp
    boundary = 3
    diffusivity = thermal_conductivity
  []
  [ptot]
    type = ElementIntegralVariablePostprocessor
    variable = power_density
    block = 'fuel'
  []
  [sphere_convective_out]
    type = ConvectiveHeatTransferSideIntegral
    T_solid = temp
    boundary = '4' # outer RVP
    T_fluid = ${sphere_outer_Tinf}
    htc = ${sphere_outer_htc}
  []
  [heat_balance] # should be equal to 0 upon convergence
    type = ParsedPostprocessor
    expression = '(sphere_convective_out - ptot) / ptot'
    pp_names = 'sphere_convective_out ptot'
  []
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar_error.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
  order = SECOND
  family = LAGRANGE
[]
[Problem]
  kernel_coverage_check = false
  material_coverage_check = false
[]
[Mesh]
  [file]
    type = FileMeshGenerator
    file = cyl2D.e
  []
  [secondary]
    type = LowerDBlockFromSidesetGenerator
    sidesets = '2'
    new_block_id = 10001
    new_block_name = 'secondary_lower'
    input = file
  []
  [primary]
    type = LowerDBlockFromSidesetGenerator
    sidesets = '3'
    new_block_id = 10000
    new_block_name = 'primary_lower'
    input = secondary
  []
  allow_renumbering = false
  coord_type = RZ
[]
[Functions]
  [temp]
    type = PiecewiseLinear
    x = '0   1'
    y = '100 200'
  []
[]
[Variables]
  [temp]
    initial_condition = 500
  []
  [lm]
    order = SECOND
    family = LAGRANGE
    block = 'secondary_lower'
  []
[]
[AuxVariables]
  [power_density]
    block = 'fuel'
    initial_condition = 50e3
  []
[]
[Kernels]
  [heat_conduction]
    type = HeatConduction
    variable = temp
    block = '1 2'
  []
  [heat_source]
    type = CoupledForce
    variable = temp
    block = 'fuel'
    v = power_density
  []
[]
[Materials]
  [heat1]
    type = HeatConductionMaterial
    block = '1 2'
    specific_heat = 1.0
    thermal_conductivity = 34.6
  []
[]
[UserObjects]
  [radiation]
    type = GapFluxModelRadiation
    temperature = temp
    boundary = 2
    primary_emissivity = 0.0
    secondary_emissivity = 0.0
  []
  [conduction]
    type = GapFluxModelConduction
    temperature = temp
    boundary = 2
    gap_conductivity = 5.0
  []
[]
[Constraints]
  [ced]
    type = ModularGapConductanceConstraint
    variable = lm
    secondary_variable = temp
    primary_boundary = 3
    primary_subdomain = 10000
    secondary_boundary = 2
    secondary_subdomain = 10001
    gap_flux_models = 'radiation conduction'
    gap_geometry_type = SPHERE
  []
[]
[BCs]
  [RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
    type = ConvectiveFluxFunction # (Robin BC)
    variable = temp
    boundary = '4' # outer RPV
    coefficient = ${sphere_outer_htc}
    T_infinity = ${sphere_outer_Tinf}
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
  petsc_options_value = 'lu       superlu_dist'
  dt = 1
  dtmin = 0.01
  end_time = 1
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-7
[]
[Outputs]
  exodus = true
  csv = true
  [Console]
    type = Console
  []
[]
[VectorPostprocessors]
  [NodalTemperature]
    type = NodalValueSampler
    sort_by = id
    boundary = '2 3'
    variable = temp
  []
[]
[Postprocessors]
  [temp_left]
    type = SideAverageValue
    boundary = 2
    variable = temp
  []
  [temp_right]
    type = SideAverageValue
    boundary = 3
    variable = temp
  []
  [flux_left]
    type = SideDiffusiveFluxIntegral
    variable = temp
    boundary = 2
    diffusivity = thermal_conductivity
  []
  [flux_right]
    type = SideDiffusiveFluxIntegral
    variable = temp
    boundary = 3
    diffusivity = thermal_conductivity
  []
  [ptot]
    type = ElementIntegralVariablePostprocessor
    variable = power_density
    block = 'fuel'
  []
  [sphere_convective_out]
    type = ConvectiveHeatTransferSideIntegral
    T_solid = temp
    boundary = '4' # outer RVP
    T_fluid = ${sphere_outer_Tinf}
    htc = ${sphere_outer_htc}
  []
  [heat_balance] # should be equal to 0 upon convergence
    type = ParsedPostprocessor
    expression = '(sphere_convective_out - ptot) / ptot'
    pp_names = 'sphere_convective_out ptot'
  []
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
  [core_gap_rpv]
    type = ConcentricCircleMeshGenerator
    num_sectors = 10
    radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
    rings = '2 1 2'
    has_outer_square = false
    preserve_volumes = true
    portion = full
  []
  [rename_core_bdy]
    type = SideSetsBetweenSubdomainsGenerator
    input = core_gap_rpv
    primary_block = 1
    paired_block = 2
    new_boundary = 'core_outer'
  []
  [rename_inner_rpv_bdy]
    type = SideSetsBetweenSubdomainsGenerator
    input = rename_core_bdy
    primary_block = 3
    paired_block = 2
    new_boundary = 'rpv_inner'
  []
  [2d_mesh]
    type = BlockDeletionGenerator
    input = rename_inner_rpv_bdy
    block = 2
  []
  [secondary]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'rpv_inner'
    new_block_id = 10001
    new_block_name = 'secondary_lower'
    input = 2d_mesh
  []
  [primary]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'core_outer'
    new_block_id = 10000
    new_block_name = 'primary_lower'
    input = secondary
  []
  allow_renumbering = false
[]
[Variables]
  [Tsolid]
    initial_condition = 500
  []
  [lm]
    order = FIRST
    family = LAGRANGE
    block = 'secondary_lower'
  []
[]
[Kernels]
  [heat_source]
    type = CoupledForce
    variable = Tsolid
    block = '${core_blocks}'
    v = power_density
  []
  [heat_conduction]
    type = HeatConduction
    variable = Tsolid
  []
[]
[BCs]
  [RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
    type = ConvectiveFluxFunction # (Robin BC)
    variable = Tsolid
    boundary = 'outer' # outer RPV
    coefficient = ${rpv_outer_htc}
    T_infinity = ${rpv_outer_Tinf}
  []
[]
[UserObjects]
  [radiation]
    type = GapFluxModelRadiation
    temperature = Tsolid
    boundary = 'rpv_inner'
    primary_emissivity = 0.8
    secondary_emissivity = 0.8
  []
  [conduction]
    type = GapFluxModelConduction
    temperature = Tsolid
    boundary = 'rpv_inner'
    gap_conductivity = 0.1
  []
[]
[Constraints]
  [ced]
    type = ModularGapConductanceConstraint
    variable = lm
    secondary_variable = Tsolid
    primary_boundary = 'core_outer'
    primary_subdomain = 10000
    secondary_boundary = 'rpv_inner'
    secondary_subdomain = 10001
    gap_flux_models = 'radiation conduction'
    gap_geometry_type = 'CYLINDER'
  []
[]
[AuxVariables]
  [power_density]
    block = '${core_blocks}'
    initial_condition = 50e3
  []
[]
[Materials]
  [simple_mat]
    type = HeatConductionMaterial
    thermal_conductivity = 34.6 # W/m/K
  []
[]
[Postprocessors]
  [Tcore_avg]
    type = ElementAverageValue
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Tcore_max]
    type = ElementExtremeValue
    value_type = max
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Tcore_min]
    type = ElementExtremeValue
    value_type = min
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Trpv_avg]
    type = ElementAverageValue
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [Trpv_max]
    type = ElementExtremeValue
    value_type = max
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [Trpv_min]
    type = ElementExtremeValue
    value_type = min
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [ptot]
    type = ElementIntegralVariablePostprocessor
    variable = power_density
    block = '${core_blocks}'
  []
  [rpv_convective_out]
    type = ConvectiveHeatTransferSideIntegral
    T_solid = Tsolid
    boundary = 'outer' # outer RVP
    T_fluid = ${rpv_outer_Tinf}
    htc = ${rpv_outer_htc}
  []
  [heat_balance] # should be equal to 0 upon convergence
    type = ParsedPostprocessor
    expression = '(rpv_convective_out - ptot) / ptot'
    pp_names = 'rpv_convective_out ptot'
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [NodalTemperature]
    type = NodalValueSampler
    sort_by = id
    boundary = 'rpv_inner core_outer'
    variable = 'Tsolid'
  []
[]
[Executioner]
  type = Steady
  petsc_options = '-snes_converged_reason -pc_svd_monitor'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
  petsc_options_value = ' lu       superlu_dist                  1e-5          NONZERO               1e-15'
  snesmf_reuse_base = false
  nl_rel_tol = 1e-10
  nl_abs_tol = 1e-10
  l_max_its = 100
  line_search = none
[]
[Outputs]
  exodus = false
  csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_cylinder.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = ${fparse 2 + rpv_core_gap_size}
rpv_outer_radius = ${fparse 2.5 + rpv_core_gap_size}
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
  [core_gap_rpv]
    type = ConcentricCircleMeshGenerator
    num_sectors = 10
    radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
    rings = '2 1 2'
    has_outer_square = false
    preserve_volumes = true
    portion = full
  []
  [rename_core_bdy]
    type = SideSetsBetweenSubdomainsGenerator
    input = core_gap_rpv
    primary_block = 1
    paired_block = 2
    new_boundary = 'core_outer'
  []
  [rename_inner_rpv_bdy]
    type = SideSetsBetweenSubdomainsGenerator
    input = rename_core_bdy
    primary_block = 3
    paired_block = 2
    new_boundary = 'rpv_inner'
  []
  [2d_mesh]
    type = BlockDeletionGenerator
    input = rename_inner_rpv_bdy
    block = 2
  []
[]
[Variables]
  [Tsolid]
    initial_condition = 500
  []
[]
[Kernels]
  [heat_source]
    type = CoupledForce
    variable = Tsolid
    block = '${core_blocks}'
    v = power_density
  []
  [heat_conduction]
    type = HeatConduction
    variable = Tsolid
  []
[]
[BCs]
  [RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
    type = ConvectiveFluxFunction # (Robin BC)
    variable = Tsolid
    boundary = 'outer' # outer RPV
    coefficient = ${rpv_outer_htc}
    T_infinity = ${rpv_outer_Tinf}
  []
[]
[ThermalContact]
  [RPV_gap]
    type = GapHeatTransfer
    gap_geometry_type = 'CYLINDER'
    emissivity_primary = 0.8
    emissivity_secondary = 0.8
    variable = Tsolid
    primary = 'core_outer'
    secondary = 'rpv_inner'
    gap_conductivity = 0.1
    quadrature = true
    cylinder_axis_point_1 = '0 0 0'
    cylinder_axis_point_2 = '0 0 5'
  []
[]
[AuxVariables]
  [power_density]
    block = '${core_blocks}'
    initial_condition = 50e3
  []
[]
[Materials]
  [simple_mat]
    type = HeatConductionMaterial
    thermal_conductivity = 34.6 # W/m/K
  []
[]
[Postprocessors]
  [Tcore_avg]
    type = ElementAverageValue
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Tcore_max]
    type = ElementExtremeValue
    value_type = max
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Tcore_min]
    type = ElementExtremeValue
    value_type = min
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Trpv_avg]
    type = ElementAverageValue
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [Trpv_max]
    type = ElementExtremeValue
    value_type = max
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [Trpv_min]
    type = ElementExtremeValue
    value_type = min
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [ptot]
    type = ElementIntegralVariablePostprocessor
    variable = power_density
    block = '${core_blocks}'
  []
  [rpv_convective_out]
    type = ConvectiveHeatTransferSideIntegral
    T_solid = Tsolid
    boundary = 'outer' # outer RVP
    T_fluid = ${rpv_outer_Tinf}
    htc = ${rpv_outer_htc}
  []
  [heat_balance] # should be equal to 0 upon convergence
    type = ParsedPostprocessor
    expression = '(rpv_convective_out - ptot) / ptot'
    pp_names = 'rpv_convective_out ptot'
  []
[]
[Executioner]
  type = Steady
  automatic_scaling = true
  compute_scaling_once = false
  petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
  petsc_options_value = 'hypre boomeramg 100'
  nl_rel_tol = 1e-10
  nl_abs_tol = 1e-10
  l_max_its = 100
  [Quadrature]
    side_order = seventh
  []
  line_search = none
[]
[Outputs]
  exodus = false
  csv = true
[]
(modules/heat_transfer/test/tests/convective_flux_function/convective_flux_function.i)
# This is a test of the ConvectiveFluxFunction BC.
# There is a single 1x1 element with a prescribed temperature
# on the left side and a convective flux BC on the right side.
# The temperature on the left is 100, and the far-field temp is 200.
# The conductance of the body (conductivity * length) is 10
#
# If the conductance in the BC is also 10, the temperature on the
# right side of the solid element should be 150 because half of the
# temperature drop should occur over the body and half in the BC.
#
# The integrated flux is deltaT * conductance, or -50 * 10 = -500.
# The negative sign indicates that heat is going into the body.
#
# The conductance is defined multiple ways using this input, and
# as long as it evaluates to 10, the result described above will
# be obtained.
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 1
  ny = 1
[]
[Problem]
  extra_tag_vectors = 'bcs'
[]
[Variables]
  [temp]
    initial_condition = 100.0
  []
[]
[AuxVariables]
  [flux]
  []
[]
[AuxKernels]
  [flux]
    type = TagVectorAux
    variable = flux
    v = temp
    vector_tag = 'bcs'
  []
[]
[Kernels]
  [heat_conduction]
    type = HeatConduction
    variable = temp
  []
[]
[Materials]
  [thermal]
    type = HeatConductionMaterial
    thermal_conductivity = 10.0
  []
[]
[BCs]
  [left]
    type = DirichletBC
    variable = temp
    boundary = left
    value = 100.0
  []
  [right]
    type = ConvectiveFluxFunction
    variable = temp
    boundary = right
    T_infinity = 200.0
    coefficient = 10.0 #This will behave as described in the header of this file if this evaluates to 10
    extra_vector_tags = 'bcs'
  []
[]
[Postprocessors]
  [integrated_flux]
    type = NodalSum
    variable = flux
    boundary = right
  []
[]
[Executioner]
  type = Transient
  start_time = 0.0
  end_time = 1.0
  dt = 1.0
  nl_rel_tol=1e-12
[]
[Outputs]
  csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder.i)
rpv_core_gap_size = 0.2
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_width = '${fparse rpv_outer_radius - rpv_inner_radius}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
  [gmg]
    type = CartesianMeshGenerator
    dim = 2
    dx = '${core_outer_radius} ${rpv_core_gap_size} ${rpv_width}'
    ix = '400 1 100'
    dy = 1
    iy = '5'
  []
  [set_block_id1]
    type = SubdomainBoundingBoxGenerator
    input = gmg
    bottom_left = '0 0 0'
    top_right = '${core_outer_radius} 1 0'
    block_id = 1
    location = INSIDE
  []
  [rename_core_bdy]
    type = SideSetsBetweenSubdomainsGenerator
    input = set_block_id1
    primary_block = 1
    paired_block = 0
    new_boundary = 'core_outer'
  []
  [set_block_id3]
    type = SubdomainBoundingBoxGenerator
    input = rename_core_bdy
    bottom_left = '${rpv_inner_radius} 0 0'
    top_right = '${rpv_outer_radius} 1 0'
    block_id = 3
    location = INSIDE
  []
  [rename_inner_rpv_bdy]
    type = SideSetsBetweenSubdomainsGenerator
    input = set_block_id3
    primary_block = 3
    paired_block = 0
    new_boundary = 'rpv_inner'
  []
  # comment out for test without gap
  [2d_mesh]
    type = BlockDeletionGenerator
    input = rename_inner_rpv_bdy
    block = 0
  []
  allow_renumbering = false
  coord_type = RZ
[]
[Variables]
  [Tsolid]
    initial_condition = 500
  []
[]
[Kernels]
  [heat_source]
    type = CoupledForce
    variable = Tsolid
    block = '${core_blocks}'
    v = power_density
  []
  [heat_conduction]
    type = HeatConduction
    variable = Tsolid
  []
[]
[BCs]
  [RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
    type = ConvectiveFluxFunction # (Robin BC)
    variable = Tsolid
    boundary = 'right' # outer RPV
    coefficient = ${rpv_outer_htc}
    T_infinity = ${rpv_outer_Tinf}
  []
[]
[ThermalContact]
  [RPV_gap]
    type = GapHeatTransfer
    gap_geometry_type = 'CYLINDER'
    emissivity_primary = 0.8
    emissivity_secondary = 0.8
    variable = Tsolid
    primary = 'core_outer'
    secondary = 'rpv_inner'
    gap_conductivity = 0.1
    quadrature = true
  []
[]
[AuxVariables]
  [power_density]
    block = '${core_blocks}'
    initial_condition = 50e3
  []
[]
[Materials]
  [simple_mat]
    type = HeatConductionMaterial
    thermal_conductivity = 34.6 # W/m/K
  []
[]
[Postprocessors]
  [Tcore_avg]
    type = ElementAverageValue
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Tcore_max]
    type = ElementExtremeValue
    value_type = max
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Tcore_min]
    type = ElementExtremeValue
    value_type = min
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Trpv_avg]
    type = ElementAverageValue
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [Trpv_max]
    type = ElementExtremeValue
    value_type = max
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [Trpv_min]
    type = ElementExtremeValue
    value_type = min
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [ptot]
    type = ElementIntegralVariablePostprocessor
    variable = power_density
    block = '${core_blocks}'
  []
  [rpv_convective_out]
    type = ConvectiveHeatTransferSideIntegral
    T_solid = Tsolid
    boundary = 'right' # outer RVP
    T_fluid = ${rpv_outer_Tinf}
    htc = ${rpv_outer_htc}
  []
  [heat_balance] # should be equal to 0 upon convergence
    type = ParsedPostprocessor
    expression = '(rpv_convective_out - ptot) / ptot'
    pp_names = 'rpv_convective_out ptot'
  []
  [flux_from_core] # converges to ptot as the mesh is refined
    type = SideDiffusiveFluxIntegral
    variable = Tsolid
    boundary = core_outer
    diffusivity = thermal_conductivity
  []
  [flux_into_rpv] # converges to rpv_convective_out as the mesh is refined
    type = SideDiffusiveFluxIntegral
    variable = Tsolid
    boundary = rpv_inner
    diffusivity = thermal_conductivity
  []
[]
[VectorPostprocessors]
  [NodalTemperature]
    type = NodalValueSampler
    sort_by = id
    boundary = 'rpv_inner core_outer'
    variable = Tsolid
  []
[]
[Executioner]
  type = Steady
  automatic_scaling = true
  compute_scaling_once = false
  petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
  petsc_options_value = 'hypre boomeramg 100'
  nl_rel_tol = 1e-10
  nl_abs_tol = 1e-10
  l_max_its = 100
  [Quadrature]
    # order = fifth
    side_order = seventh
  []
  line_search = none
[]
[Outputs]
  exodus = false
  csv = true
[]
(modules/combined/test/tests/optimization/invOpt_bc_convective/forward.i)
[Mesh]
  [gmg]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 10
    ny = 20
    xmax = 1
    ymax = 2
  []
[]
[Variables]
  [temperature]
  []
[]
[Kernels]
  [heat_conduction]
    type = ADHeatConduction
    variable = temperature
  []
[]
[BCs]
  [left]
    type = ConvectiveFluxFunction
    variable = temperature
    boundary = 'left'
    T_infinity = 100.0
    coefficient = function1
  []
  [right]
    type = NeumannBC
    variable = temperature
    boundary = right
    value = -100
  []
  [bottom]
    type = DirichletBC
    variable = temperature
    boundary = bottom
    value = 500
  []
  [top]
    type = DirichletBC
    variable = temperature
    boundary = top
    value = 600
  []
[]
[Materials]
  [steel]
    type = ADGenericConstantMaterial
    prop_names = thermal_conductivity
    prop_values = 5
  []
[]
[Executioner]
  type = Steady
  solve_type = PJFNK
  nl_abs_tol = 1e-6
  nl_rel_tol = 1e-8
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
[]
[Functions]
  [function1]
    type = ParsedOptimizationFunction
    expression = 'a'
    param_symbol_names = 'a'
    param_vector_name = 'params/vals'
  []
[]
[VectorPostprocessors]
  [vertical]
    type = LineValueSampler
    variable = 'temperature'
    start_point = '0.1 0.0 0.0'
    end_point = '0.1 2.0 0.0'
    num_points = 21
    sort_by = id
  []
[]
[Reporters]
  [measure_data]
    type = OptimizationData
    objective_name = objective_value
    variable = temperature
  []
  [params]
    type = ConstantReporter
    real_vector_names = 'vals'
    real_vector_values = '0' # Dummy value
  []
[]
[Outputs]
  csv = true
  exodus = false
  console = false
  file_base = 'forward'
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D.i)
outer_htc = 10 # W/m^2/K
outer_Tinf = 300 # K
[GlobalParams]
  order = SECOND
  family = LAGRANGE
[]
[Mesh]
  [left_block]
    type = GeneratedMeshGenerator
    dim = 3
    nx = 3
    ny = 6
    nz = 6
    xmin = -1
    xmax = -0.5
    ymin = -0.5
    ymax = 0.5
    zmin = -0.5
    zmax = 0.5
    elem_type = HEX27
  []
  [left_block_sidesets]
    type = RenameBoundaryGenerator
    input = left_block
    old_boundary = '0 1 2 3 4 5'
    new_boundary = 'left_bottom left_back left_right left_front left_left left_top'
  []
  [left_block_id]
    type = SubdomainIDGenerator
    input = left_block_sidesets
    subdomain_id = 1
  []
  [right_block]
    type = GeneratedMeshGenerator
    dim = 3
    nx = 4
    ny = 8
    nz = 8
    xmin = 0.5
    xmax = 1
    ymin = -0.5
    ymax = 0.5
    zmin = -0.5
    zmax = 0.5
    elem_type = HEX27
  []
  [right_block_sidesets]
    type = RenameBoundaryGenerator
    input = right_block
    old_boundary = '0 1 2 3 4 5'
    # new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
    new_boundary = '100 101 102 103 104 105'
  []
  [right_block_sidesets_rename]
    type = RenameBoundaryGenerator
    input = right_block_sidesets
    old_boundary = '100 101 102 103 104 105'
    new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
  []
  [right_block_id]
    type = SubdomainIDGenerator
    input = right_block_sidesets_rename
    subdomain_id = 2
  []
  [combined_mesh]
    type = MeshCollectionGenerator
    inputs = 'left_block_id right_block_id'
  []
[]
[Functions]
  [temp]
    type = PiecewiseLinear
    x = '0   1'
    y = '100 200'
  []
[]
[Variables]
  [temp]
    initial_condition = 500
  []
[]
[AuxVariables]
  [gap_conductance]
    order = CONSTANT
    family = MONOMIAL
  []
  [power_density]
    block = 1
    initial_condition = 50e3
  []
[]
[Kernels]
  [heat_conduction]
    type = HeatConduction
    variable = temp
  []
  [heat_source]
    type = CoupledForce
    variable = temp
    block = 1
    v = power_density
  []
[]
[AuxKernels]
  [gap_cond]
    type = MaterialRealAux
    property = gap_conductance
    variable = gap_conductance
    boundary = 'left_right'
  []
[]
[Materials]
  [heat1]
    type = HeatConductionMaterial
    block = '1 2'
    specific_heat = 1.0
    thermal_conductivity = 34.6
  []
[]
[ThermalContact]
  [thermal_contact]
    type = GapHeatTransfer
    variable = temp
    primary = 'right_left'
    secondary = 'left_right'
    emissivity_primary = 0
    emissivity_secondary = 0
    gap_conductivity = 5
    gap_geometry_type = PLATE
  []
[]
[BCs]
  [RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
    type = ConvectiveFluxFunction # (Robin BC)
    variable = temp
    boundary = 'right_right' # outer RPV
    coefficient = ${outer_htc}
    T_infinity = ${outer_Tinf}
  []
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
  petsc_options_value = 'lu       superlu_dist'
  dt = 1
  dtmin = 0.01
  end_time = 1
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-8
  [Quadrature]
    order = fifth
    side_order = seventh
  []
[]
[Outputs]
  exodus = true
  csv = true
  [Console]
    type = Console
  []
[]
[Postprocessors]
  [temp_left]
    type = SideAverageValue
    boundary = 'left_right'
    variable = temp
  []
  [temp_right]
    type = SideAverageValue
    boundary = 'right_left'
    variable = temp
  []
  [flux_left]
    type = SideDiffusiveFluxIntegral
    variable = temp
    boundary = 'left_right'
    diffusivity = thermal_conductivity
  []
  [flux_right]
    type = SideDiffusiveFluxIntegral
    variable = temp
    boundary = 'right_left'
    diffusivity = thermal_conductivity
  []
  [ptot]
    type = ElementIntegralVariablePostprocessor
    variable = power_density
    block = 1
  []
  [convective_out]
    type = ConvectiveHeatTransferSideIntegral
    T_solid = temp
    boundary = 'right_right' # outer RVP
    T_fluid = ${outer_Tinf}
    htc = ${outer_htc}
  []
  [heat_balance] # should be equal to 0 upon convergence
    type = ParsedPostprocessor
    expression = '(convective_out - ptot) / ptot'
    pp_names = 'convective_out ptot'
  []
[]
[VectorPostprocessors]
  [NodalTemperature]
    type = NodalValueSampler
    sort_by = id
    boundary = 'left_right right_left'
    variable = temp
  []
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_rz_cylinder.i)
rpv_core_gap_size = 0.2
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_width = '${fparse rpv_outer_radius - rpv_inner_radius}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
  [gmg]
    type = CartesianMeshGenerator
    dim = 2
    dx = '${core_outer_radius} ${rpv_core_gap_size} ${rpv_width}'
    ix = '400 1 100'
    dy = 1
    iy = '5'
  []
  [set_block_id1]
    type = SubdomainBoundingBoxGenerator
    input = gmg
    bottom_left = '0 0 0'
    top_right = '${core_outer_radius} 1 0'
    block_id = 1
    location = INSIDE
  []
  [rename_core_bdy]
    type = SideSetsBetweenSubdomainsGenerator
    input = set_block_id1
    primary_block = 1
    paired_block = 0
    new_boundary = 'core_outer'
  []
  [set_block_id3]
    type = SubdomainBoundingBoxGenerator
    input = rename_core_bdy
    bottom_left = '${rpv_inner_radius} 0 0'
    top_right = '${rpv_outer_radius} 1 0'
    block_id = 3
    location = INSIDE
  []
  [rename_inner_rpv_bdy]
    type = SideSetsBetweenSubdomainsGenerator
    input = set_block_id3
    primary_block = 3
    paired_block = 0
    new_boundary = 'rpv_inner'
  []
  # comment out for test without gap
  [2d_mesh]
    type = BlockDeletionGenerator
    input = rename_inner_rpv_bdy
    block = 0
  []
  coord_type = RZ
[]
[Variables]
  [Tsolid]
    initial_condition = 500
  []
[]
[Kernels]
  [heat_source]
    type = CoupledForce
    variable = Tsolid
    block = '${core_blocks}'
    v = power_density
  []
  [heat_conduction]
    type = HeatConduction
    variable = Tsolid
  []
[]
[BCs]
  [RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
    type = ConvectiveFluxFunction # (Robin BC)
    variable = Tsolid
    boundary = 'right' # outer RPV
    coefficient = ${rpv_outer_htc}
    T_infinity = ${rpv_outer_Tinf}
  []
[]
[ThermalContact]
  [RPV_gap]
    type = GapHeatTransfer
    gap_geometry_type = 'CYLINDER'
    emissivity_primary = 0.8
    emissivity_secondary = 0.8
    variable = Tsolid
    primary = 'core_outer'
    secondary = 'rpv_inner'
    gap_conductivity = 0.1
    quadrature = true
  []
[]
[AuxVariables]
  [power_density]
    block = '${core_blocks}'
    initial_condition = 50e3
  []
[]
[Materials]
  [simple_mat]
    type = HeatConductionMaterial
    thermal_conductivity = 34.6 # W/m/K
  []
[]
[Postprocessors]
  [Tcore_avg]
    type = ElementAverageValue
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Tcore_max]
    type = ElementExtremeValue
    value_type = max
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Tcore_min]
    type = ElementExtremeValue
    value_type = min
    variable = Tsolid
    block = '${core_blocks}'
  []
  [Trpv_avg]
    type = ElementAverageValue
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [Trpv_max]
    type = ElementExtremeValue
    value_type = max
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [Trpv_min]
    type = ElementExtremeValue
    value_type = min
    variable = Tsolid
    block = '${rpv_blocks}'
  []
  [ptot]
    type = ElementIntegralVariablePostprocessor
    variable = power_density
    block = '${core_blocks}'
  []
  [rpv_convective_out]
    type = ConvectiveHeatTransferSideIntegral
    T_solid = Tsolid
    boundary = 'right' # outer RVP
    T_fluid = ${rpv_outer_Tinf}
    htc = ${rpv_outer_htc}
  []
  [heat_balance] # should be equal to 0 upon convergence
    type = ParsedPostprocessor
    expression = '(rpv_convective_out - ptot) / ptot'
    pp_names = 'rpv_convective_out ptot'
  []
  [flux_from_core] # converges to ptot as the mesh is refined
    type = SideDiffusiveFluxIntegral
    variable = Tsolid
    boundary = core_outer
    diffusivity = thermal_conductivity
  []
  [flux_into_rpv] # converges to rpv_convective_out as the mesh is refined
    type = SideDiffusiveFluxIntegral
    variable = Tsolid
    boundary = rpv_inner
    diffusivity = thermal_conductivity
  []
[]
[Executioner]
  type = Steady
  automatic_scaling = true
  compute_scaling_once = false
  petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
  petsc_options_value = 'hypre boomeramg 100'
  nl_rel_tol = 1e-10
  nl_abs_tol = 1e-10
  l_max_its = 100
  [Quadrature]
    # order = fifth
    side_order = seventh
  []
  line_search = none
[]
[Outputs]
  exodus = false
  csv = true
[]