- 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
 - variableThe name of the variable which this postprocessor integrates
C++ Type:std::vector<VariableName>
Unit:(no unit assumed)
Controllable:No
Description:The name of the variable which this postprocessor integrates
 
SideDiffusiveFluxAverage
Computes the average of the diffusive flux over the specified boundary
Object Description
This object computes the quantity
where:
represents the boundary,
represents the diffusivity,
represents the variable used in the calculation,
represents the outward-facing normal vector at the boundary, and
represents the area of the selected boundary across which the average is being taken.
The expression of the diffusive flux in this object is generic, as described, and may differ from the diffusive flux in your specific physics implementation. If so, you may not use this object to compute the diffusive flux.
Example Input Syntax
[Postprocessors<<<{"href": "../../syntax/Postprocessors/index.html"}>>>]
  [avg_flux_right]
    # Computes -\int(exp(y)+1) from 0 to 1 which is -2.718281828
    type = SideDiffusiveFluxAverage<<<{"description": "Computes the average of the diffusive flux over the specified boundary", "href": "SideDiffusiveFluxAverage.html"}>>>
    variable<<<{"description": "The name of the variable which this postprocessor integrates"}>>> = u
    boundary<<<{"description": "The list of boundary IDs from the mesh where this object applies"}>>> = right
    diffusivity<<<{"description": "The name of the diffusivity material property that will be used in the flux computation. This must be provided if the variable is of finite element type"}>>> = diffusivity
  []
[](test/tests/thewarehouse/test1.i)Input Parameters
- diffusivityThe name of the diffusivity material property that will be used in the flux computation. This must be provided if the variable is of finite element type
C++ Type:MaterialPropertyName
Unit:(no unit assumed)
Controllable:No
Description:The name of the diffusivity material property that will be used in the flux computation. This must be provided if the variable is of finite element type
 - functor_diffusivityThe name of the diffusivity functor that will be used in the flux computation. This must be provided if the variable is of finite volume type. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
C++ Type:MooseFunctorName
Unit:(no unit assumed)
Controllable:No
Description:The name of the diffusivity functor that will be used in the flux computation. This must be provided if the variable is of finite volume type. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
 
Optional Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
 - execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Options:XFEM_MARK, FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, LINEAR_CONVERGENCE, NONLINEAR, NONLINEAR_CONVERGENCE, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, MULTIAPP_FIXED_POINT_CONVERGENCE, FINAL, CUSTOM, TRANSFER
Controllable:No
Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
 - execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
 - force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
 - force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
 - force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
 
Execution Scheduling 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.
 - outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
 - use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
 
Advanced Parameters
- 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_radiation/cylinder.i)
 - (modules/stochastic_tools/examples/workshop/diffusion.i)
 - (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material.i)
 - (modules/stochastic_tools/examples/parameter_study/diffusion.i)
 - (modules/stochastic_tools/examples/sobol/diffusion.i)
 - (modules/heat_transfer/test/tests/radiative_bcs/ad_radiative_bc_cyl.i)
 - (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material_insulated.i)
 - (test/tests/postprocessors/side_diffusive_flux_integral/side_diffusive_flux_integral_linear_fv.i)
 - (modules/heat_transfer/test/tests/interface_heating_mortar/transient_joule_heating_constraint.i)
 - (test/tests/postprocessors/side_diffusive_flux_average/side_diffusive_flux_average_fv.i)
 - (test/tests/postprocessors/side_diffusive_flux_average/side_diffusive_flux_average.i)
 - (modules/heat_transfer/test/tests/ad_convective_heat_flux/coupled.i)
 - (modules/combined/test/tests/optimization/compliance_sensitivity/three_materials_thermal.i)
 - (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material.i)
 - (modules/combined/examples/optimization/thermomechanical/thermal_sub.i)
 - (modules/heat_transfer/test/tests/convective_heat_flux/coupled.i)
 - (test/tests/thewarehouse/test1.i)
 - (modules/heat_transfer/test/tests/gap_heat_transfer_radiation/sphere.i)
 - (test/tests/postprocessors/side_diffusive_flux_integral/side_diffusive_flux_integral_fv.i)
 - (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/closed_gap_prescribed_pressure.i)
 - (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/open_gap_pressure_dependent.i)
 - (modules/combined/test/tests/optimization/compliance_sensitivity/thermal_test.i)
 - (modules/heat_transfer/test/tests/ad_convective_heat_flux/equilibrium.i)
 - (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_offset_single_material_insulated.i)
 - (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/closed_gap_thermomechanical_mortar_contact.i)
 - (modules/heat_transfer/test/tests/radiative_bcs/radiative_bc_cyl.i)
 - (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material_insulated.i)
 - (modules/heat_transfer/test/tests/convective_heat_flux/equilibrium.i)
 - (modules/heat_transfer/test/tests/convective_heat_flux/flux.i)
 - (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/multi_component_mortar_thermal_conduction.i)
 - (modules/heat_transfer/test/tests/ad_convective_heat_flux/flux.i)
 - (modules/stochastic_tools/examples/parameter_study/diffusion_time.i)
 - (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/closed_gap_pressure_dependent_thermal_contact.i)
 - (modules/stochastic_tools/examples/parameter_study/diffusion_vector.i)
 - (modules/heat_transfer/test/tests/kokkos/kokkos_convective_heat_flux.i)
 - (modules/heat_transfer/test/tests/convective_heat_flux/t_inf.i)
 
(test/tests/thewarehouse/test1.i)
[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 100
    ny = 100
  []
  [manyblocks]
    input = gen
    type = ElemUniqueSubdomainsGenerator
  []
[]
[Variables]
  [./u]
  [../]
[]
[Kernels]
  [./diff]
    type = CoefDiffusion
    variable = u
    coef = 0.1
  [../]
  [./time]
    type = TimeDerivative
    variable = u
  [../]
[]
[Materials]
  [mat_props]
    type = GenericConstantMaterial
    prop_names = diffusivity
    prop_values = 2
  []
[]
[UserObjects]
[]
[Postprocessors]
  [avg_flux_right]
    # Computes -\int(exp(y)+1) from 0 to 1 which is -2.718281828
    type = SideDiffusiveFluxAverage
    variable = u
    boundary = right
    diffusivity = diffusivity
  []
  [u1_avg]
    type = ElementAverageValue
    variable = u
    execute_on = 'initial timestep_end'
  []
  [u2_avg]
    type = ElementAverageValue
    variable = u
    execute_on = 'initial timestep_end'
  []
  [diff]
    type = DifferencePostprocessor
    value1 = u1_avg
    value2 = u2_avg
    execute_on = 'initial timestep_end'
  []
[]
[BCs]
  [./left]
    type = DirichletBC
    variable = u
    boundary = left
    value = 0
  [../]
  [./right]
    type = DirichletBC
    variable = u
    boundary = right
    value = 1
  [../]
[]
[Executioner]
  type = Transient
  num_steps = 10
  dt = 0.1
  solve_type = PJFNK
  petsc_options_iname = '-pc_type -pc_hypre_type'
  petsc_options_value = 'hypre boomeramg'
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_radiation/cylinder.i)
#
# This problem is one of radiation boundary conditions between two
# cylindrical surfaces.
#
#            S(T1^4 - T2^4)                       R1
# flux1 = - ---------------- and flux2 = -flux1 * --
#           1    1 - e2   R1                      R2
#           -- + ------ * --
#           e1     e2     R2
#
# where S is the Stefan Boltzmann constant         5.67e-8 W/m^2/K^4
#       T1 is the temperature on the left surface  278 K
#       T2 is the temperature on the right surface 333 K
#       e1 is the emissivity for the left surface  0.8
#       e2 is the emissivity for the left surface  0.9
#       R1 is the radius of the inner surface      0.1 m
#       R2 is the radius of the outer surface      0.11 m
#
# Flux1:
# Exact           Code
# -------------   -------------
# -265.29 W/m^2   -265.26 W/m^2
#
# Flux2:
# Exact           Code
# -------------   -------------
#  241.26 W/m^2    241.15 W/m^2
#
thick = 0.01
R1 = 0.1
R2 = 0.11
[GlobalParams]
  order = second
  family = lagrange
[]
[Mesh]
  coord_type = RZ
  [mesh1]
    type = GeneratedMeshGenerator
    dim = 2
    elem_type = quad8
    nx = 4
    ny = 1
    xmin = '${fparse R1 - thick}'
    xmax = '${R1}'
    ymin = 0
    ymax = '${R1}'
    boundary_name_prefix = left
  []
  [mesh2]
    type = GeneratedMeshGenerator
    dim = 2
    elem_type = quad8
    nx = 4
    ny = 1
    xmin = '${R2}'
    xmax = '${fparse R2 + thick}'
    ymin = 0
    ymax = '${R1}'
    boundary_id_offset = 4
    boundary_name_prefix = right
  []
  [final]
    type = CombinerGenerator
    inputs = 'mesh1 mesh2'
  []
[]
[Variables]
  [temperature]
  []
[]
[Kernels]
  [heat_conduction]
    type = HeatConduction
    variable = temperature
  []
[]
[BCs]
  [left]
    type = DirichletBC
    variable = temperature
    boundary = left_left
    value = 278
  []
  [right]
    type = DirichletBC
    variable = temperature
    boundary = right_right
    value = 333
  []
[]
[Materials]
  [heat]
    type = HeatConductionMaterial
    thermal_conductivity = 200 # W/m/K
    specific_heat = 4.2e5
  []
[]
[ThermalContact]
  [thermal_contact]
    type = GapHeatTransfer
    variable = temperature
    primary = left_right
    secondary = right_left
    emissivity_primary = 0.8
    emissivity_secondary = 0.9
    quadrature = true
    gap_conductivity = 1e-40 # requires a positive value
    gap_geometry_type = cylinder
  []
[]
[Functions]
  [analytic_flux_1]
    type = ParsedFunction
    symbol_names = 'S        T1  T2  e1  e2  R1    R2'
    symbol_values = '5.67e-8 278 333 0.8 0.9 ${R1} ${R2}'
    expression = 'T14 := T1*T1*T1*T1;
                  T24 := T2*T2*T2*T2;
                  S*(T14-T24)/(1/e1+(1-e2)/e2*R1/R2)'
  []
  [analytic_flux_2]
    type = ParsedFunction
    symbol_names = 'S        T1  T2  e1  e2  R1    R2'
    symbol_values = '5.67e-8 278 333 0.8 0.9 ${R1} ${R2}'
    expression = 'T14 := T1*T1*T1*T1;
                  T24 := T2*T2*T2*T2;
                  -S*(T14-T24)/(1/e1+(1-e2)/e2*R1/R2)*R1/R2'
  []
[]
[Postprocessors]
  [code_flux_1]
    type = SideDiffusiveFluxAverage
    variable = temperature
    boundary = left_right
    diffusivity = thermal_conductivity
    execute_on = 'initial timestep_end'
  []
  [analytic_flux_1]
    type = FunctionValuePostprocessor
    function = analytic_flux_1
    execute_on = 'initial timestep_end'
  []
  [error_1]
    type = ParsedPostprocessor
    pp_names = 'code_flux_1 analytic_flux_1'
    expression = '(analytic_flux_1 - code_flux_1)/analytic_flux_1*100'
    execute_on = 'initial timestep_end'
  []
  [code_flux_2]
    type = SideDiffusiveFluxAverage
    variable = temperature
    boundary = right_left
    diffusivity = thermal_conductivity
    execute_on = 'initial timestep_end'
  []
  [analytic_flux_2]
    type = FunctionValuePostprocessor
    function = analytic_flux_2
    execute_on = 'initial timestep_end'
  []
  [error_2]
    type = ParsedPostprocessor
    pp_names = 'code_flux_2 analytic_flux_2'
    expression = '(analytic_flux_2 - code_flux_2)/analytic_flux_2*100'
    execute_on = 'initial timestep_end'
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  solve_type = newton
  num_steps = 1
  dt = 1
  end_time = 1
  nl_abs_tol = 1e-12
  nl_rel_tol = 1e-10
[]
[Outputs]
  csv = true
[]
(modules/stochastic_tools/examples/workshop/diffusion.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
  ny = 10
[]
[Variables/T]
  initial_condition = 300
[]
[Kernels]
  [time]
    type = ADTimeDerivative
    variable = T
  []
  [diff]
    type = ADMatDiffusion
    variable = T
    diffusivity = diffusivity
  []
  [source]
    type = ADBodyForce
    variable = T
    value = 100
  []
[]
[BCs]
  [left]
    type = ADDirichletBC
    variable = T
    boundary = left
    value = 300
  []
  [right]
    type = ADNeumannBC
    variable = T
    boundary = right
    value = -100
  []
[]
[Materials/constant]
  type = ADGenericConstantMaterial
  prop_names = 'diffusivity'
  prop_values = 1
[]
[Executioner]
  type = Transient
  num_steps = 4
  dt = 0.25
[]
[Postprocessors]
  [T_avg]
    type = ElementAverageValue
    variable = T
    execute_on = 'initial timestep_end'
  []
  [q_left]
    type = ADSideDiffusiveFluxAverage
    variable = T
    boundary = left
    diffusivity = diffusivity
    execute_on = 'initial timestep_end'
  []
[]
[Controls/stochastic]
  type = SamplerReceiver
[]
[Outputs]
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
  [left_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 100
    ny = 10
    xmax = 0.1
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = moving_block
  []
  [left_block]
    type = SubdomainIDGenerator
    input = left_rectangle
    subdomain_id = 1
  []
  [right_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 100
    ny = 10
    xmin = 0.1
    xmax = 0.2
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = fixed_block
    boundary_id_offset = 4
  []
  [right_block]
    type = SubdomainIDGenerator
    input = right_rectangle
    subdomain_id = 2
  []
  [two_blocks]
    type = MeshCollectionGenerator
    inputs = 'left_block right_block'
  []
  [block_rename]
    type = RenameBlockGenerator
    input = two_blocks
    old_block = '1 2'
    new_block = 'left_block right_block'
  []
  [interface_secondary_subdomain]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'fixed_block_left'
    new_block_id = 3
    new_block_name = 'interface_secondary_subdomain'
    input = block_rename
  []
  [interface_primary_subdomain]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'moving_block_right'
    new_block_id = 4
    new_block_name = 'interface_primary_subdomain'
    input = interface_secondary_subdomain
  []
[]
[Problem]
  type = ReferenceResidualProblem
  reference_vector = 'ref'
  extra_tag_vectors = 'ref'
[]
[Variables]
  [temperature]
    initial_condition = 300.0
  []
  [temperature_interface_lm]
    block = 'interface_secondary_subdomain'
  []
  [potential]
  []
  [potential_interface_lm]
    block = 'interface_secondary_subdomain'
  []
[]
[AuxVariables]
  [interface_normal_lm]
    order = FIRST
    family = LAGRANGE
    block = 'interface_secondary_subdomain'
    initial_condition = 1.0
  []
[]
[Kernels]
  [HeatDiff_steel]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = steel_thermal_conductivity
    extra_vector_tags = 'ref'
    block = 'left_block'
  []
  [HeatDiff_aluminum]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = aluminum_thermal_conductivity
    extra_vector_tags = 'ref'
    block = 'right_block'
  []
  [electric_steel]
    type = ADMatDiffusion
    variable = potential
    diffusivity = steel_electrical_conductivity
    extra_vector_tags = 'ref'
    block = 'left_block'
  []
  [electric_aluminum]
    type = ADMatDiffusion
    variable = potential
    diffusivity = aluminum_electrical_conductivity
    extra_vector_tags = 'ref'
    block = 'right_block'
  []
[]
[BCs]
  [temperature_left]
    type = ADDirichletBC
    variable = temperature
    value = 300
    boundary = 'moving_block_left'
  []
  [temperature_right]
    type = ADDirichletBC
    variable = temperature
    value = 300
    boundary = 'fixed_block_right'
  []
  [electric_left]
    type = ADDirichletBC
    variable = potential
    value = 0.0
    boundary = moving_block_left
  []
  [electric_right]
    type = ADDirichletBC
    variable = potential
    value = 3.0e-1
    boundary = fixed_block_right
  []
[]
[Constraints]
  [thermal_contact]
    type = ModularGapConductanceConstraint
    variable = temperature_interface_lm
    secondary_variable = temperature
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
    gap_flux_models = 'closed_temperature'
  []
  [electrical_contact]
    type = ModularGapConductanceConstraint
    variable = potential_interface_lm
    secondary_variable = potential
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
    gap_flux_models = 'closed_electric'
  []
  [interface_heating]
    type = ADInterfaceJouleHeatingConstraint
    potential_lagrange_multiplier = potential_interface_lm
    secondary_variable = temperature
    primary_electrical_conductivity = steel_electrical_conductivity
    secondary_electrical_conductivity = aluminum_electrical_conductivity
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
  []
[]
[Materials]
  [steel_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_electrical_conductivity         steel_hardness'
    prop_values = '8e3            16.2                        500.0              1.39e6      1.0' ## for stainless steel 304
    block = 'left_block interface_secondary_subdomain'
  []
  [aluminum_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
    prop_values = ' 2.7e3           210                           900.0                   3.7e7                           1.0' #for 99% pure Al
    block = 'left_block right_block interface_secondary_subdomain'
  []
[]
[UserObjects]
  [closed_temperature]
    type = GapFluxModelPressureDependentConduction
    primary_conductivity = steel_thermal_conductivity
    secondary_conductivity = aluminum_thermal_conductivity
    temperature = temperature
    contact_pressure = interface_normal_lm
    primary_hardness = steel_hardness
    secondary_hardness = aluminum_hardness
    boundary = moving_block_right
  []
  [closed_electric]
    type = GapFluxModelPressureDependentConduction
    primary_conductivity = steel_electrical_conductivity
    secondary_conductivity = aluminum_electrical_conductivity
    temperature = potential
    contact_pressure = interface_normal_lm
    primary_hardness = steel_hardness
    secondary_hardness = aluminum_hardness
    boundary = moving_block_right
  []
[]
[Postprocessors]
  [steel_interface_temperature]
    type = AverageNodalVariableValue
    variable = temperature
    block = interface_primary_subdomain
  []
  [aluminum_interface_temperature]
    type = AverageNodalVariableValue
    variable = temperature
    block = interface_secondary_subdomain
  []
  [interface_heat_flux_steel]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = moving_block_right
    diffusivity = steel_thermal_conductivity
  []
  [interface_heat_flux_aluminum]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = fixed_block_left
    diffusivity = aluminum_thermal_conductivity
  []
  [interface_electrical_flux]
    type = ADSideDiffusiveFluxAverage
    variable = potential
    boundary = fixed_block_left
    diffusivity = aluminum_electrical_conductivity
  []
[]
[Executioner]
  type = Steady
  solve_type = NEWTON
  automatic_scaling = false
  line_search = 'none'
  nl_abs_tol = 1e-10
  nl_rel_tol = 1e-6
  nl_max_its = 100
  nl_forced_its = 1
[]
[Outputs]
  csv = true
  perf_graph = true
[]
(modules/stochastic_tools/examples/parameter_study/diffusion.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
  ny = 10
[]
[Variables/T]
  initial_condition = 300
[]
[Kernels]
  [time]
    type = ADTimeDerivative
    variable = T
  []
  [diff]
    type = ADMatDiffusion
    variable = T
    diffusivity = diffusivity
  []
  [source]
    type = ADBodyForce
    variable = T
    value = 100
    function = 1
  []
[]
[BCs]
  [left]
    type = ADDirichletBC
    variable = T
    boundary = left
    value = 300
  []
  [right]
    type = ADNeumannBC
    variable = T
    boundary = right
    value = -100
  []
[]
[Materials/constant]
  type = ADGenericConstantMaterial
  prop_names = 'diffusivity'
  prop_values = 1
[]
[Executioner]
  type = Transient
  num_steps = 4
  dt = 0.25
[]
[Postprocessors]
  [T_avg]
    type = ElementAverageValue
    variable = T
    execute_on = 'initial timestep_end'
  []
  [q_left]
    type = ADSideDiffusiveFluxAverage
    variable = T
    boundary = left
    diffusivity = diffusivity
    execute_on = 'initial timestep_end'
  []
[]
[Controls/stochastic]
  type = SamplerReceiver
[]
[Outputs]
[]
(modules/stochastic_tools/examples/sobol/diffusion.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
  ny = 10
[]
[Variables/T]
  initial_condition = 300
[]
[Kernels]
  [time]
    type = ADTimeDerivative
    variable = T
  []
  [diff]
    type = ADMatDiffusion
    variable = T
    diffusivity = diffusivity
  []
  [source]
    type = ADBodyForce
    variable = T
    value = 100
    function = 1
  []
[]
[BCs]
  [left]
    type = ADDirichletBC
    variable = T
    boundary = left
    value = 300
  []
  [right]
    type = ADNeumannBC
    variable = T
    boundary = right
    value = -100
  []
[]
[Materials/constant]
  type = ADGenericConstantMaterial
  prop_names = 'diffusivity'
  prop_values = 1
[]
[Executioner]
  type = Transient
  solve_type = NEWTON
  num_steps = 4
  dt = 0.25
[]
[Postprocessors]
  [T_avg]
    type = ElementAverageValue
    variable = T
    execute_on = 'initial timestep_end'
  []
  [q_left]
    type = ADSideDiffusiveFluxAverage
    variable = T
    boundary = left
    diffusivity = diffusivity
    execute_on = 'initial timestep_end'
  []
[]
[Controls/stochastic]
  type = SamplerReceiver
[]
[Outputs]
[]
(modules/heat_transfer/test/tests/radiative_bcs/ad_radiative_bc_cyl.i)
#
# Thin cylindrical shell with very high thermal conductivity
# so that temperature is almost uniform at 500 K. Radiative
# boundary conditions is applied. Heat flux out of boundary
# 'right' should be 3723.36; this is approached as the mesh
# is refined
#
[Mesh]
  type = MeshGeneratorMesh
  [cartesian]
    type = CartesianMeshGenerator
    dim = 2
    dx = '1 1'
    ix = '1 10'
    dy = '1 1'
    subdomain_id = '1 2 1 2'
  []
  [remove_1]
    type = BlockDeletionGenerator
    block = 1
    input = cartesian
  []
  [readd_left]
    type = ParsedGenerateSideset
    combinatorial_geometry = 'abs(x - 1) < 1e-4'
    new_sideset_name = left
    input = remove_1
  []
  coord_type = RZ
[]
[Variables]
  [temp]
    initial_condition = 800.0
  []
[]
[Kernels]
  [heat]
    type = ADHeatConduction
    variable = temp
  []
[]
[BCs]
  [lefttemp]
    type = ADDirichletBC
    boundary = left
    variable = temp
    value = 800
  []
  [radiative_bc]
    type = ADInfiniteCylinderRadiativeBC
    boundary = right
    variable = temp
    boundary_radius = 2
    boundary_emissivity = 0.2
    cylinder_radius = 3
    cylinder_emissivity = 0.7
    Tinfinity = 500
  []
[]
[Materials]
  [density]
    type = ADGenericConstantMaterial
    prop_names = 'density  thermal_conductivity'
    prop_values = '1 1.0e5'
  []
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Steady
  petsc_options = '-snes_converged_reason'
  line_search = none
  nl_rel_tol = 1e-6
  nl_abs_tol = 1e-7
[]
[Postprocessors]
  [right]
    type = ADSideDiffusiveFluxAverage
    variable = temp
    boundary = right
    diffusivity = thermal_conductivity
  []
  [min_temp]
    type = ElementExtremeValue
    variable = temp
    value_type = min
  []
  [max_temp]
    type = ElementExtremeValue
    variable = temp
    value_type = max
  []
[]
[Outputs]
  csv = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material_insulated.i)
## Units in the input file: m-Pa-s-K-V
# Using the steady-state Fourier's law, the temperature at the interface in each block,
# in the case where thermal contact between the two blocks at the interface is not
# considered, (steel block on left, aluminum on right) is calculated as:
#
#   T_{interface - steel} = 816.849K
#   T_{interface - aluminum} = 339.871K
# which matches the simulation results to the 6 decimal places shown.
# As expected, the heat flux resulting from the volumetric Joule heating source is
# equivalent on both sides of the interface.
[Mesh]
  [left_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 100
    ny = 10
    xmax = 0.1
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = moving_block
  []
  [left_block]
    type = SubdomainIDGenerator
    input = left_rectangle
    subdomain_id = 1
  []
  [right_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 100
    ny = 10
    xmin = 0.1
    xmax = 0.2
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = fixed_block
    boundary_id_offset = 4
  []
  [right_block]
    type = SubdomainIDGenerator
    input = right_rectangle
    subdomain_id = 2
  []
  [two_blocks]
    type = MeshCollectionGenerator
    inputs = 'left_block right_block'
  []
  [block_rename]
    type = RenameBlockGenerator
    input = two_blocks
    old_block = '1 2'
    new_block = 'left_block right_block'
  []
  [interface_secondary_subdomain]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'fixed_block_left'
    new_block_id = 3
    new_block_name = 'interface_secondary_subdomain'
    input = block_rename
  []
  [interface_primary_subdomain]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'moving_block_right'
    new_block_id = 4
    new_block_name = 'interface_primary_subdomain'
    input = interface_secondary_subdomain
  []
[]
[Problem]
  type = ReferenceResidualProblem
  reference_vector = 'ref'
  extra_tag_vectors = 'ref'
[]
[Variables]
  [temperature]
    initial_condition = 300.0
  []
  [potential]
  []
  [potential_interface_lm]
    block = 'interface_secondary_subdomain'
  []
[]
[AuxVariables]
  [interface_normal_lm]
    order = FIRST
    family = LAGRANGE
    block = 'interface_secondary_subdomain'
    initial_condition = 1.0
  []
[]
[Kernels]
  [HeatDiff_steel]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = steel_thermal_conductivity
    extra_vector_tags = 'ref'
    block = 'left_block'
  []
  [HeatDiff_aluminum]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = aluminum_thermal_conductivity
    extra_vector_tags = 'ref'
    block = 'right_block'
  []
  [electric_steel]
    type = ADMatDiffusion
    variable = potential
    diffusivity = steel_electrical_conductivity
    extra_vector_tags = 'ref'
    block = 'left_block'
  []
  [electric_aluminum]
    type = ADMatDiffusion
    variable = potential
    diffusivity = aluminum_electrical_conductivity
    extra_vector_tags = 'ref'
    block = 'right_block'
  []
[]
[BCs]
  [temperature_left]
    type = ADDirichletBC
    variable = temperature
    value = 300
    boundary = 'moving_block_left'
  []
  [temperature_right]
    type = ADDirichletBC
    variable = temperature
    value = 300
    boundary = 'fixed_block_right'
  []
  [electric_left]
    type = ADDirichletBC
    variable = potential
    value = 0.0
    boundary = moving_block_left
  []
  [electric_right]
    type = ADDirichletBC
    variable = potential
    value = 3.0e-1
    boundary = fixed_block_right
  []
[]
[Constraints]
  [electrical_contact]
    type = ModularGapConductanceConstraint
    variable = potential_interface_lm
    secondary_variable = potential
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
    gap_flux_models = 'closed_electric'
  []
  [interface_heating]
    type = ADInterfaceJouleHeatingConstraint
    potential_lagrange_multiplier = potential_interface_lm
    secondary_variable = temperature
    primary_electrical_conductivity = steel_electrical_conductivity
    secondary_electrical_conductivity = aluminum_electrical_conductivity
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
  []
[]
[Materials]
  [steel_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_electrical_conductivity         steel_hardness'
    prop_values = '8e3            16.2                        500.0              1.39e6      1.0' ## for stainless steel 304
    block = 'left_block interface_secondary_subdomain'
  []
  [aluminum_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
    prop_values = ' 2.7e3           210                           900.0                   3.7e7                           1.0' #for 99% pure Al
    block = 'left_block right_block interface_secondary_subdomain'
  []
[]
[UserObjects]
  [closed_electric]
    type = GapFluxModelPressureDependentConduction
    primary_conductivity = steel_electrical_conductivity
    secondary_conductivity = aluminum_electrical_conductivity
    temperature = potential
    contact_pressure = interface_normal_lm
    primary_hardness = steel_hardness
    secondary_hardness = aluminum_hardness
    boundary = moving_block_right
  []
[]
[Postprocessors]
  [steel_interface_temperature]
    type = AverageNodalVariableValue
    variable = temperature
    block = interface_primary_subdomain
  []
  [aluminum_interface_temperature]
    type = AverageNodalVariableValue
    variable = temperature
    block = interface_secondary_subdomain
  []
  [interface_heat_flux_steel]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = moving_block_right
    diffusivity = steel_thermal_conductivity
  []
  [interface_heat_flux_aluminum]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = fixed_block_left
    diffusivity = aluminum_thermal_conductivity
  []
  [interface_electrical_flux]
    type = ADSideDiffusiveFluxAverage
    variable = potential
    boundary = fixed_block_left
    diffusivity = aluminum_electrical_conductivity
  []
[]
[Executioner]
  type = Steady
  solve_type = NEWTON
  automatic_scaling = false
  line_search = 'none'
  nl_abs_tol = 1e-10
  nl_rel_tol = 1e-6
  nl_max_its = 100
  nl_forced_its = 1
[]
[Outputs]
  csv = true
  perf_graph = true
[]
(test/tests/postprocessors/side_diffusive_flux_integral/side_diffusive_flux_integral_linear_fv.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
  ny = 10
[]
[Problem]
  linear_sys_names = 'u_sys'
[]
[Variables]
  [u]
    solver_sys = 'u_sys'
    type = MooseLinearVariableFVReal
  []
[]
[LinearFVKernels]
  [diff]
    type = LinearFVDiffusion
    variable = u
    diffusion_coeff = diffusivity
  []
[]
[LinearFVBCs]
  [left]
    type = LinearFVAdvectionDiffusionFunctorDirichletBC
    variable = u
    boundary = left
    functor = 0
  []
  [right]
    type = LinearFVAdvectionDiffusionFunctorDirichletBC
    variable = u
    boundary = right
    functor = 1
  []
[]
[FunctorMaterials]
  [mat_props]
    type = GenericFunctorMaterial
    prop_names = diffusivity
    prop_values = 1
  []
[]
[AuxVariables]
  [grad]
    family = MONOMIAL_VEC
    order = CONSTANT
  []
[]
[AuxKernels]
  [grad]
    variable = grad
    functor = u
    type = FunctorElementalGradientAux
  []
[]
[Postprocessors]
  [avg_left]
    type = SideAverageValue
    variable = u
    boundary = left
  []
  [avg_right]
    type = SideAverageValue
    variable = u
    boundary = right
  []
  [avg_flux_left]
    type = SideDiffusiveFluxAverage
    variable = u
    boundary = left
    functor_diffusivity = diffusivity
  []
  [avg_flux_right]
    type = SideDiffusiveFluxAverage
    variable = u
    boundary = right
    functor_diffusivity = diffusivity
  []
[]
[Executioner]
  type = Steady
  system_names = u_sys
  l_tol = 1e-10
  petsc_options_iname = '-pc_type -pc_hypre_type'
  petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
  exodus = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/transient_joule_heating_constraint.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
  [left_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 100
    ny = 10
    xmax = 0.1
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = moving_block
  []
  [left_block]
    type = SubdomainIDGenerator
    input = left_rectangle
    subdomain_id = 1
  []
  [right_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 100
    ny = 10
    xmin = 0.1
    xmax = 0.2
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = fixed_block
    boundary_id_offset = 4
  []
  [right_block]
    type = SubdomainIDGenerator
    input = right_rectangle
    subdomain_id = 2
  []
  [two_blocks]
    type = MeshCollectionGenerator
    inputs = 'left_block right_block'
  []
  [block_rename]
    type = RenameBlockGenerator
    input = two_blocks
    old_block = '1 2'
    new_block = 'left_block right_block'
  []
  [interface_secondary_subdomain]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'fixed_block_left'
    new_block_id = 3
    new_block_name = 'interface_secondary_subdomain'
    input = block_rename
  []
  [interface_primary_subdomain]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'moving_block_right'
    new_block_id = 4
    new_block_name = 'interface_primary_subdomain'
    input = interface_secondary_subdomain
  []
[]
[Problem]
  type = ReferenceResidualProblem
  reference_vector = 'ref'
  extra_tag_vectors = 'ref'
[]
[Variables]
  [temperature]
    initial_condition = 300.0
  []
  [temperature_interface_lm]
    block = 'interface_secondary_subdomain'
  []
  [potential]
  []
  [potential_interface_lm]
    block = 'interface_secondary_subdomain'
  []
[]
[AuxVariables]
  [interface_normal_lm]
    order = FIRST
    family = LAGRANGE
    block = 'interface_secondary_subdomain'
    initial_condition = 1.0
  []
[]
[Kernels]
  [HeatDiff_steel]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = steel_thermal_conductivity
    extra_vector_tags = 'ref'
    block = 'left_block'
  []
  [HeatTdot_steel]
    type = ADHeatConductionTimeDerivative
    variable = temperature
    specific_heat = steel_heat_capacity #use parsed material property
    density_name = steel_density
    extra_vector_tags = 'ref'
    block = 'left_block'
  []
  [HeatDiff_aluminum]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = aluminum_thermal_conductivity
    extra_vector_tags = 'ref'
    block = 'right_block'
  []
  [HeatTdot_aluminum]
    type = ADHeatConductionTimeDerivative
    variable = temperature
    specific_heat = aluminum_heat_capacity #use parsed material property
    density_name = aluminum_density
    extra_vector_tags = 'ref'
    block = 'right_block'
  []
  [electric_steel]
    type = ADMatDiffusion
    variable = potential
    diffusivity = steel_electrical_conductivity
    extra_vector_tags = 'ref'
    block = 'left_block'
  []
  [electric_aluminum]
    type = ADMatDiffusion
    variable = potential
    diffusivity = aluminum_electrical_conductivity
    extra_vector_tags = 'ref'
    block = 'right_block'
  []
[]
[BCs]
  [temperature_left]
    type = ADDirichletBC
    variable = temperature
    value = 300
    boundary = 'moving_block_left'
  []
  [temperature_right]
    type = ADDirichletBC
    variable = temperature
    value = 300
    boundary = 'fixed_block_right'
  []
  [electric_left]
    type = ADDirichletBC
    variable = potential
    value = 0.0
    boundary = moving_block_left
  []
  [electric_right]
    type = ADDirichletBC
    variable = potential
    value = 3.0e-1
    boundary = fixed_block_right
  []
[]
[Constraints]
  [thermal_contact]
    type = ModularGapConductanceConstraint
    variable = temperature_interface_lm
    secondary_variable = temperature
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
    gap_flux_models = 'closed_temperature'
  []
  [electrical_contact]
    type = ModularGapConductanceConstraint
    variable = potential_interface_lm
    secondary_variable = potential
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
    gap_flux_models = 'closed_electric'
  []
  [interface_heating]
    type = ADInterfaceJouleHeatingConstraint
    potential_lagrange_multiplier = potential_interface_lm
    secondary_variable = temperature
    primary_electrical_conductivity = steel_electrical_conductivity
    secondary_electrical_conductivity = aluminum_electrical_conductivity
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
  []
[]
[Materials]
  [steel_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_electrical_conductivity         steel_hardness'
    prop_values = '8e3            16.2                        500.0              1.39e6      1.0' ## for stainless steel 304
    block = 'left_block interface_secondary_subdomain'
  []
  [aluminum_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
    prop_values = ' 2.7e3           210                           900.0                   3.7e7                           1.0' #for 99% pure Al
    block = 'left_block right_block interface_secondary_subdomain'
  []
[]
[UserObjects]
  [closed_temperature]
    type = GapFluxModelPressureDependentConduction
    primary_conductivity = steel_thermal_conductivity
    secondary_conductivity = aluminum_thermal_conductivity
    temperature = temperature
    contact_pressure = interface_normal_lm
    primary_hardness = steel_hardness
    secondary_hardness = aluminum_hardness
    boundary = moving_block_right
  []
  [closed_electric]
    type = GapFluxModelPressureDependentConduction
    primary_conductivity = steel_electrical_conductivity
    secondary_conductivity = aluminum_electrical_conductivity
    temperature = potential
    contact_pressure = interface_normal_lm
    primary_hardness = steel_hardness
    secondary_hardness = aluminum_hardness
    boundary = moving_block_right
  []
[]
[Postprocessors]
  [steel_interface_temperature]
    type = AverageNodalVariableValue
    variable = temperature
    block = interface_primary_subdomain
  []
  [aluminum_interface_temperature]
    type = AverageNodalVariableValue
    variable = temperature
    block = interface_secondary_subdomain
  []
  [interface_heat_flux_steel]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = moving_block_right
    diffusivity = steel_thermal_conductivity
  []
  [interface_heat_flux_aluminum]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = fixed_block_left
    diffusivity = aluminum_thermal_conductivity
  []
  [interface_electrical_flux]
    type = ADSideDiffusiveFluxAverage
    variable = potential
    boundary = fixed_block_left
    diffusivity = aluminum_electrical_conductivity
  []
[]
[Executioner]
  type = Transient
  solve_type = NEWTON
  automatic_scaling = false
  line_search = 'none'
  nl_abs_tol = 1e-8
  nl_rel_tol = 1e-4
  nl_max_its = 100
  nl_forced_its = 1
  dt = 1200.0
  dtmin = 1200.0
  num_steps = 8
[]
[Outputs]
  csv = true
  perf_graph = true
[]
(test/tests/postprocessors/side_diffusive_flux_average/side_diffusive_flux_average_fv.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
  ny = 10
[]
[Variables]
  [u]
    order = CONSTANT
    family = MONOMIAL
    fv = true
  []
[]
[FVKernels]
  [diff]
    type = FVDiffusion
    variable = u
    coeff = 1
  []
[]
[FVBCs]
  [left]
    type = FVDirichletBC
    variable = u
    boundary = left
    value = 0
  []
  [right]
    type = FVDirichletBC
    variable = u
    boundary = right
    value = 1
  []
[]
[Materials]
  [mat_props]
    type = GenericFunctorMaterial
    prop_names = diffusivity
    prop_values = 1
  []
[]
[Postprocessors]
  [avg_flux_right]
    # Computes flux integral on the boundary, which should be -1
    type = SideDiffusiveFluxAverage
    variable = u
    boundary = right
    functor_diffusivity = diffusivity
  []
[]
[Executioner]
  type = Steady
  solve_type = PJFNK
  petsc_options_iname = '-pc_type -pc_hypre_type'
  petsc_options_value = 'hypre boomeramg'
  nl_abs_tol = 1e-14
  nl_rel_tol = 1e-14
  l_abs_tol = 1e-14
  l_tol = 1e-6
[]
[Outputs]
  exodus = true
[]
(test/tests/postprocessors/side_diffusive_flux_average/side_diffusive_flux_average.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
  ny = 10
[]
[Variables]
  [./u]
  [../]
[]
[Functions]
  [./right_bc]
    # Flux BC for computing the analytical solution in the postprocessor
    type = ParsedFunction
    expression = exp(y)+1
  [../]
[]
[Kernels]
  [./diff]
    type = Diffusion
    variable = u
  [../]
[]
[BCs]
  [./left]
    type = DirichletBC
    variable = u
    boundary = left
    value = 0
  [../]
  [./right]
    type = FunctionNeumannBC
    variable = u
    boundary = right
    function = right_bc
  [../]
[]
[Materials]
  [./mat_props]
    type = GenericConstantMaterial
    block = 0
    prop_names = diffusivity
    prop_values = 2
  [../]
  [./mat_props_bnd]
    type = GenericConstantMaterial
    boundary = right
    prop_names = diffusivity
    prop_values = 1
  [../]
[]
[Postprocessors]
  [./avg_flux_right]
    # Computes -\int(exp(y)+1) from 0 to 1 which is -2.718281828
    type = SideDiffusiveFluxAverage
    variable = u
    boundary = right
    diffusivity = diffusivity
  [../]
[]
[Executioner]
  type = Steady
  solve_type = PJFNK
  petsc_options_iname = '-pc_type -pc_hypre_type'
  petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
  exodus = true
[]
(modules/heat_transfer/test/tests/ad_convective_heat_flux/coupled.i)
[Mesh]
  type = GeneratedMesh
  dim = 3
  nx = 10
[]
[Variables]
  [./temp]
    initial_condition = 200.0
  [../]
[]
[Kernels]
  [./heat_dt]
    type = ADTimeDerivative
    variable = temp
  [../]
  [./heat_conduction]
    type = Diffusion
    variable = temp
  [../]
  [./heat]
    type = ADBodyForce
    variable = temp
    value = 0
  [../]
[]
[BCs]
  [./right]
    type = ADConvectiveHeatFluxBC
    variable = temp
    boundary = 'right'
    T_infinity = T_inf
    heat_transfer_coefficient = htc
  [../]
[]
[Materials]
  [chf_mat]
    type = ADConvectiveHeatFluxTest
    temperature = temp
    boundary = 'right'
  []
[]
[Postprocessors]
  [./left_temp]
    type = SideAverageValue
    variable = temp
    boundary = left
    execute_on = 'TIMESTEP_END initial'
  [../]
  [./right_temp]
    type = SideAverageValue
    variable = temp
    boundary = right
  [../]
  [./right_flux]
    type = SideDiffusiveFluxAverage
    variable = temp
    boundary = right
    diffusivity = 1
  [../]
[]
[Executioner]
  type = Transient
  num_steps = 10
  dt = 1
  nl_abs_tol = 1e-12
[]
[Outputs]
  [./out]
    type = CSV
    time_step_interval = 10
  [../]
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/three_materials_thermal.i)
vol_frac = 0.4
cost_frac = 0.4
power = 4
# Stiffness (not optimized in this test)
E0 = 1.0e-6
E1 = 0.2
E2 = 0.6
E3 = 1.0
# Densities
rho0 = 1.0e-6
rho1 = 0.4
rho2 = 0.7
rho3 = 1.0
# Costs
C0 = 1.0e-6
C1 = 0.5
C2 = 0.8
C3 = 1.0
# Thermal conductivity
TC0 = 1.0e-6
TC1 = 0.2
TC2 = 0.6
TC3 = 1.0
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [MeshGenerator]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 40
    ny = 40
    xmin = 0
    xmax = 40
    ymin = 0
    ymax = 40
  []
  [node]
    type = ExtraNodesetGenerator
    input = MeshGenerator
    new_boundary = hold
    nodes = 0
  []
  [push_left]
    type = ExtraNodesetGenerator
    input = node
    new_boundary = push_left
    coord = '20 0 0'
  []
  [push_center]
    type = ExtraNodesetGenerator
    input = push_left
    new_boundary = push_center
    coord = '40 0 0'
  []
[]
[Variables]
  [disp_x]
  []
  [disp_y]
  []
  [temp]
    initial_condition = 100.0
  []
[]
[AuxVariables]
  [Dc]
    family = MONOMIAL
    order = CONSTANT
    initial_condition = -1.0
  []
  [Cc]
    family = MONOMIAL
    order = CONSTANT
    initial_condition = -1.0
  []
  [Tc]
    family = MONOMIAL
    order = CONSTANT
    initial_condition = -1.0
  []
  [Cost]
    family = MONOMIAL
    order = CONSTANT
    initial_condition = -1.0
  []
  [mat_den]
    family = MONOMIAL
    order = CONSTANT
    initial_condition = ${vol_frac}
  []
  [thermal_compliance]
    order = CONSTANT
    family = MONOMIAL
  []
[]
# [ICs]
#   [mat_den]
#     type = RandomIC
#     seed = 4
#     variable = mat_den
#     max = '${fparse vol_frac+0.25}'
#     min = '${fparse vol_frac-0.25}'
#   []
# []
[AuxKernels]
  [Cost]
    type = MaterialRealAux
    variable = Cost
    property = Cost_mat
  []
  [thermal_compliance]
    type = MaterialRealAux
    property = thermal_compliance
    variable = thermal_compliance
    execute_on = timestep_end
  []
[]
[Kernels]
  [heat_conduction]
    type = HeatConduction
    variable = temp
    diffusion_coefficient = thermal_cond
  []
  [heat_source]
    type = HeatSource
    value = 1e-2 # W/m^3
    variable = temp
  []
[]
[Physics/SolidMechanics/QuasiStatic]
  [all]
    strain = SMALL
    add_variables = true
    incremental = false
  []
[]
[BCs]
  [no_y]
    type = DirichletBC
    variable = disp_y
    boundary = hold
    value = 0.0
  []
  [no_x_symm]
    type = DirichletBC
    variable = disp_x
    boundary = right
    value = 0.0
  []
  [top]
    type = DirichletBC
    variable = temp
    boundary = top
    value = 0
  []
  [bottom]
    type = DirichletBC
    variable = temp
    boundary = bottom
    value = 0
  []
  [right]
    type = DirichletBC
    variable = temp
    boundary = right
    value = 0
  []
  [left]
    type = DirichletBC
    variable = temp
    boundary = left
    value = 0
  []
[]
[NodalKernels]
  [push_left]
    type = NodalGravity
    variable = disp_y
    boundary = push_left
    gravity_value = -1e-6 # -3
    mass = 1
  []
  [push_center]
    type = NodalGravity
    variable = disp_y
    boundary = push_center
    gravity_value = -1e-6 # -3
    mass = 1
  []
[]
[Materials]
  [thermal_cond]
    type = DerivativeParsedMaterial
    # ordered multimaterial simp
    expression = "A1:=(${TC0}-${TC1})/(${rho0}^${power}-${rho1}^${power}); "
                 "B1:=${TC0}-A1*${rho0}^${power}; TC1:=A1*mat_den^${power}+B1; "
                 "A2:=(${TC1}-${TC2})/(${rho1}^${power}-${rho2}^${power}); "
                 "B2:=${TC1}-A2*${rho1}^${power}; TC2:=A2*mat_den^${power}+B2; "
                 "A3:=(${TC2}-${TC3})/(${rho2}^${power}-${rho3}^${power}); "
                 "B3:=${TC2}-A3*${rho2}^${power}; TC3:=A3*mat_den^${power}+B3; "
                 "if(mat_den<${rho1},TC1,if(mat_den<${rho2},TC2,TC3))"
    coupled_variables = 'mat_den'
    property_name = thermal_cond
  []
  [thermal_compliance]
    type = ThermalCompliance
    temperature = temp
    thermal_conductivity = thermal_cond
  []
  [elasticity_tensor]
    type = ComputeVariableIsotropicElasticityTensor
    youngs_modulus = E_phys
    poissons_ratio = poissons_ratio
    args = 'mat_den'
  []
  [E_phys]
    type = DerivativeParsedMaterial
    # ordered multimaterial simp
    expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
                 "B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; "
                 "A2:=(${E1}-${E2})/(${rho1}^${power}-${rho2}^${power}); "
                 "B2:=${E1}-A2*${rho1}^${power}; E2:=A2*mat_den^${power}+B2; "
                 "A3:=(${E2}-${E3})/(${rho2}^${power}-${rho3}^${power}); "
                 "B3:=${E2}-A3*${rho2}^${power}; E3:=A3*mat_den^${power}+B3; "
                 "if(mat_den<${rho1},E1,if(mat_den<${rho2},E2,E3))"
    coupled_variables = 'mat_den'
    property_name = E_phys
  []
  [Cost_mat]
    type = DerivativeParsedMaterial
    # ordered multimaterial simp
    expression = "A1:=(${C0}-${C1})/(${rho0}^(1/${power})-${rho1}^(1/${power})); "
                 "B1:=${C0}-A1*${rho0}^(1/${power}); C1:=A1*mat_den^(1/${power})+B1; "
                 "A2:=(${C1}-${C2})/(${rho1}^(1/${power})-${rho2}^(1/${power})); "
                 "B2:=${C1}-A2*${rho1}^(1/${power}); C2:=A2*mat_den^(1/${power})+B2; "
                 "A3:=(${C2}-${C3})/(${rho2}^(1/${power})-${rho3}^(1/${power})); "
                 "B3:=${C2}-A3*${rho2}^(1/${power}); C3:=A3*mat_den^(1/${power})+B3; "
                 "if(mat_den<${rho1},C1,if(mat_den<${rho2},C2,C3))"
    coupled_variables = 'mat_den'
    property_name = Cost_mat
  []
  [CostDensity]
    type = ParsedMaterial
    property_name = CostDensity
    coupled_variables = 'mat_den Cost'
    expression = 'mat_den*Cost'
  []
  [poissons_ratio]
    type = GenericConstantMaterial
    prop_names = poissons_ratio
    prop_values = 0.3
  []
  [stress]
    type = ComputeLinearElasticStress
  []
  [dc]
    type = ComplianceSensitivity
    design_density = mat_den
    youngs_modulus = E_phys
  []
  [cc]
    type = CostSensitivity
    design_density = mat_den
    cost = Cost_mat
  []
  [tc]
    type = ThermalSensitivity
    design_density = mat_den
    thermal_conductivity = thermal_cond
    temperature = temp
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[UserObjects]
  [rad_avg]
    type = RadialAverage
    radius = 4
    weights = linear
    prop_name = sensitivity
    execute_on = TIMESTEP_END
    force_preaux = true
  []
  [rad_avg_cost]
    type = RadialAverage
    radius = 4
    weights = linear
    prop_name = cost_sensitivity
    execute_on = TIMESTEP_END
    force_preaux = true
  []
  [rad_avg_thermal]
    type = RadialAverage
    radius = 4
    weights = linear
    prop_name = thermal_sensitivity
    execute_on = TIMESTEP_END
    force_preaux = true
  []
  [update]
    type = DensityUpdateTwoConstraints
    density_sensitivity = Dc
    cost_density_sensitivity = Cc
    cost = Cost
    cost_fraction = ${cost_frac}
    design_density = mat_den
    volume_fraction = ${vol_frac}
    bisection_lower_bound = 0
    bisection_upper_bound = 1.0e12 # 100
    use_thermal_compliance = true
    thermal_sensitivity = Tc
    # Only account for thermal optimizxation
    weight_mechanical_thermal = '0 1'
    relative_tolerance = 1.0e-8
    bisection_move = 0.05
    adaptive_move = false
    execute_on = TIMESTEP_BEGIN
  []
  # Provides Dc
  [calc_sense]
    type = SensitivityFilter
    density_sensitivity = Dc
    design_density = mat_den
    filter_UO = rad_avg
    execute_on = TIMESTEP_END
    force_postaux = true
  []
  # Provides Cc
  [calc_sense_cost]
    type = SensitivityFilter
    density_sensitivity = Cc
    design_density = mat_den
    filter_UO = rad_avg_cost
    execute_on = TIMESTEP_END
    force_postaux = true
  []
  # Provides Tc
  [calc_sense_thermal]
    type = SensitivityFilter
    density_sensitivity = Tc
    design_density = mat_den
    filter_UO = rad_avg_thermal
    execute_on = TIMESTEP_END
    force_postaux = true
  []
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
  petsc_options_value = 'lu superlu_dist'
  nl_abs_tol = 1e-10
  dt = 1.0
  num_steps = 12
[]
[Outputs]
  [out]
    type = CSV
    execute_on = 'TIMESTEP_END'
  []
  print_linear_residuals = false
[]
[Postprocessors]
  [right_flux]
    type = SideDiffusiveFluxAverage
    variable = temp
    boundary = right
    diffusivity = 10
  []
  [mesh_volume]
    type = VolumePostprocessor
    execute_on = 'initial timestep_end'
  []
  [total_vol]
    type = ElementIntegralVariablePostprocessor
    variable = mat_den
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [vol_frac]
    type = ParsedPostprocessor
    expression = 'total_vol / mesh_volume'
    pp_names = 'total_vol mesh_volume'
  []
  [sensitivity]
    type = ElementIntegralMaterialProperty
    mat_prop = sensitivity
  []
  [cost_sensitivity]
    type = ElementIntegralMaterialProperty
    mat_prop = cost_sensitivity
  []
  [cost]
    type = ElementIntegralMaterialProperty
    mat_prop = CostDensity
  []
  [cost_frac]
    type = ParsedPostprocessor
    expression = 'cost / mesh_volume'
    pp_names = 'cost mesh_volume'
  []
  [objective]
    type = ElementIntegralMaterialProperty
    mat_prop = strain_energy_density
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [objective_thermal]
    type = ElementIntegralMaterialProperty
    mat_prop = thermal_compliance
    execute_on = 'INITIAL TIMESTEP_END'
  []
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
  [left_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 100
    ny = 10
    xmax = 0.1
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = moving_block
  []
  [left_block]
    type = SubdomainIDGenerator
    input = left_rectangle
    subdomain_id = 1
  []
  [right_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 100
    ny = 10
    xmin = 0.1
    xmax = 0.2
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = fixed_block
    boundary_id_offset = 4
  []
  [right_block]
    type = SubdomainIDGenerator
    input = right_rectangle
    subdomain_id = 2
  []
  [two_blocks]
    type = MeshCollectionGenerator
    inputs = 'left_block right_block'
  []
  [block_rename]
    type = RenameBlockGenerator
    input = two_blocks
    old_block = '1 2'
    new_block = 'left_block right_block'
  []
  [interface_secondary_subdomain]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'fixed_block_left'
    new_block_id = 3
    new_block_name = 'interface_secondary_subdomain'
    input = block_rename
  []
  [interface_primary_subdomain]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'moving_block_right'
    new_block_id = 4
    new_block_name = 'interface_primary_subdomain'
    input = interface_secondary_subdomain
  []
[]
[Problem]
  type = ReferenceResidualProblem
  reference_vector = 'ref'
  extra_tag_vectors = 'ref'
[]
[Variables]
  [temperature]
    initial_condition = 300.0
  []
  [potential]
  []
  [potential_interface_lm]
    block = 'interface_secondary_subdomain'
  []
  [temperature_interface_lm]
    block = 'interface_secondary_subdomain'
  []
[]
[AuxVariables]
  [interface_normal_lm]
    order = FIRST
    family = LAGRANGE
    block = 'interface_secondary_subdomain'
    initial_condition = 1.0
  []
[]
[Kernels]
  [HeatDiff_aluminum]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = aluminum_thermal_conductivity
    extra_vector_tags = 'ref'
    block = 'left_block right_block'
  []
  [electric_aluminum]
    type = ADMatDiffusion
    variable = potential
    diffusivity = aluminum_electrical_conductivity
    extra_vector_tags = 'ref'
    block = 'left_block right_block'
  []
[]
[BCs]
  [temperature_left]
    type = ADDirichletBC
    variable = temperature
    value = 300
    boundary = 'moving_block_left'
  []
  [temperature_right]
    type = ADDirichletBC
    variable = temperature
    value = 300
    boundary = 'fixed_block_right'
  []
  [electric_left]
    type = ADDirichletBC
    variable = potential
    value = 0.0
    boundary = moving_block_left
  []
  [electric_right]
    type = ADDirichletBC
    variable = potential
    value = 3.0e-1
    boundary = fixed_block_right
  []
[]
[Constraints]
  [thermal_contact]
    type = ModularGapConductanceConstraint
    variable = temperature_interface_lm
    secondary_variable = temperature
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
    gap_flux_models = 'closed_temperature'
  []
  [electrical_contact]
    type = ModularGapConductanceConstraint
    variable = potential_interface_lm
    secondary_variable = potential
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
    gap_flux_models = 'closed_electric'
  []
  [interface_heating]
    type = ADInterfaceJouleHeatingConstraint
    potential_lagrange_multiplier = potential_interface_lm
    secondary_variable = temperature
    primary_electrical_conductivity = aluminum_electrical_conductivity
    secondary_electrical_conductivity = aluminum_electrical_conductivity
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
  []
[]
[Materials]
  [aluminum_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
    prop_values = ' 2.7e3           210                           900.0                   3.7e7                           1.0' #for 99% pure Al
    block = 'left_block right_block interface_secondary_subdomain'
  []
[]
[UserObjects]
  [closed_temperature]
    type = GapFluxModelPressureDependentConduction
    primary_conductivity = aluminum_thermal_conductivity
    secondary_conductivity = aluminum_thermal_conductivity
    temperature = temperature
    contact_pressure = interface_normal_lm
    primary_hardness = aluminum_hardness
    secondary_hardness = aluminum_hardness
    boundary = moving_block_right
  []
  [closed_electric]
    type = GapFluxModelPressureDependentConduction
    primary_conductivity = aluminum_electrical_conductivity
    secondary_conductivity = aluminum_electrical_conductivity
    temperature = potential
    contact_pressure = interface_normal_lm
    primary_hardness = aluminum_hardness
    secondary_hardness = aluminum_hardness
    boundary = moving_block_right
  []
[]
[Postprocessors]
  [aluminum_interface_temperature]
    type = AverageNodalVariableValue
    variable = temperature
    block = interface_secondary_subdomain
  []
  [interface_heat_flux_aluminum]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = fixed_block_left
    diffusivity = aluminum_thermal_conductivity
  []
  [aluminum_interface_potential]
    type = AverageNodalVariableValue
    variable = potential
    block = interface_secondary_subdomain
  []
  [interface_electrical_flux_aluminum]
    type = ADSideDiffusiveFluxAverage
    variable = potential
    boundary = fixed_block_left
    diffusivity = aluminum_electrical_conductivity
  []
[]
[Executioner]
  type = Steady
  solve_type = NEWTON
  automatic_scaling = false
  line_search = 'none'
  nl_abs_tol = 1e-10
  nl_rel_tol = 1e-6
  nl_max_its = 50
  nl_forced_its = 1
[]
[Outputs]
  csv = true
  perf_graph = true
[]
(modules/combined/examples/optimization/thermomechanical/thermal_sub.i)
vol_frac = 0.4
power = 2.0
E0 = 1.0e-6
E1 = 1.0
rho0 = 0.0
rho1 = 1.0
C0 = 1.0e-6
C1 = 1.0
TC0 = 1.0e-16
TC1 = 1.0
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [MeshGenerator]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 40
    ny = 40
    xmin = 0
    xmax = 40
    ymin = 0
    ymax = 40
  []
  [node]
    type = ExtraNodesetGenerator
    input = MeshGenerator
    new_boundary = hold
    nodes = 0
  []
  [push_left]
    type = ExtraNodesetGenerator
    input = node
    new_boundary = push_left
    coord = '16 0 0'
  []
  [push_center]
    type = ExtraNodesetGenerator
    input = push_left
    new_boundary = push_center
    coord = '24 0 0'
  []
  [extra]
    type = SideSetsFromBoundingBoxGenerator
    input = push_center
    bottom_left = '-0.01 17.999  0'
    top_right = '5 22.001  0'
    boundary_new = n1
    included_boundaries = left
  []
  [dirichlet_bc]
    type = SideSetsFromNodeSetsGenerator
    input = extra
  []
[]
[Variables]
  [disp_x]
  []
  [disp_y]
  []
  [temp]
    initial_condition = 100.0
  []
[]
[AuxVariables]
  [Dc]
    family = MONOMIAL
    order = FIRST
    initial_condition = -1.0
  []
  [Cc]
    family = MONOMIAL
    order = FIRST
    initial_condition = -1.0
  []
  [Tc]
    family = MONOMIAL
    order = FIRST
    initial_condition = -1.0
  []
  [Cost]
    family = MONOMIAL
    order = FIRST
    initial_condition = -1.0
  []
  [mat_den]
    family = MONOMIAL
    order = FIRST
    initial_condition = ${vol_frac}
  []
[]
[AuxKernels]
  [Cost]
    type = MaterialRealAux
    variable = Cost
    property = Cost_mat
  []
[]
[Kernels]
  [heat_conduction]
    type = HeatConduction
    variable = temp
    diffusion_coefficient = thermal_cond
  []
  [heat_source]
    type = HeatSource
    value = 1e-2 # W/m^3
    variable = temp
  []
[]
[Physics/SolidMechanics/QuasiStatic]
  [all]
    strain = SMALL
    add_variables = true
    incremental = false
  []
[]
[BCs]
  [no_y]
    type = DirichletBC
    variable = disp_y
    boundary = hold
    value = 0.0
  []
  [no_x_symm]
    type = DirichletBC
    variable = disp_x
    boundary = right
    value = 0.0
  []
  [left_n1]
    type = DirichletBC
    variable = temp
    boundary = n1
    value = 0.0
  []
  [top]
    type = NeumannBC
    variable = temp
    boundary = top
    value = 0
  []
  [bottom]
    type = NeumannBC
    variable = temp
    boundary = bottom
    value = 0
  []
  [right]
    type = NeumannBC
    variable = temp
    boundary = right
    value = 0
  []
  [left]
    type = NeumannBC
    variable = temp
    boundary = left
    value = 0
  []
[]
[NodalKernels]
  [push_left]
    type = NodalGravity
    variable = disp_y
    boundary = push_left
    gravity_value = 0.0 # -1e-8
    mass = 1
  []
  [push_center]
    type = NodalGravity
    variable = disp_y
    boundary = push_center
    gravity_value = 0.0 # -1e-8
    mass = 1
  []
[]
[Materials]
  [thermal_cond]
    type = DerivativeParsedMaterial
    # ordered multimaterial simp
    expression = "A1:=(${TC0}-${TC1})/(${rho0}^${power}-${rho1}^${power}); "
                 "B1:=${TC0}-A1*${rho0}^${power}; TC1:=A1*mat_den^${power}+B1; TC1"
    coupled_variables = 'mat_den'
    property_name = thermal_cond
    outputs = 'exodus'
  []
  [thermal_compliance]
    type = ThermalCompliance
    temperature = temp
    thermal_conductivity = thermal_cond
    outputs = 'exodus'
  []
  [elasticity_tensor]
    type = ComputeVariableIsotropicElasticityTensor
    youngs_modulus = E_phys
    poissons_ratio = poissons_ratio
    args = 'mat_den'
  []
  [E_phys]
    type = DerivativeParsedMaterial
    # ordered multimaterial simp
    expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
                 "B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; E1"
    coupled_variables = 'mat_den'
    property_name = E_phys
  []
  [Cost_mat]
    type = DerivativeParsedMaterial
    # ordered multimaterial simp
    expression = "A1:=(${C0}-${C1})/(${rho0}^(1/${power})-${rho1}^(1/${power})); "
                 "B1:=${C0}-A1*${rho0}^(1/${power}); C1:=A1*mat_den^(1/${power})+B1; C1"
    coupled_variables = 'mat_den'
    property_name = Cost_mat
  []
  [CostDensity]
    type = ParsedMaterial
    property_name = CostDensity
    coupled_variables = 'mat_den Cost'
    expression = 'mat_den*Cost'
  []
  [poissons_ratio]
    type = GenericConstantMaterial
    prop_names = poissons_ratio
    prop_values = 0.3
  []
  [stress]
    type = ComputeLinearElasticStress
  []
  [dc]
    type = ComplianceSensitivity
    design_density = mat_den
    youngs_modulus = E_phys
  []
  [cc]
    type = CostSensitivity
    design_density = mat_den
    cost = Cost_mat
    outputs = 'exodus'
  []
  [tc]
    type = ThermalSensitivity
    design_density = mat_den
    thermal_conductivity = thermal_cond
    temperature = temp
    outputs = 'exodus'
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[UserObjects]
  [rad_avg]
    type = RadialAverage
    radius = 0.1
    weights = linear
    prop_name = sensitivity
    execute_on = TIMESTEP_END
    force_preaux = true
  []
  [rad_avg_cost]
    type = RadialAverage
    radius = 0.1
    weights = linear
    prop_name = cost_sensitivity
    execute_on = TIMESTEP_END
    force_preaux = true
  []
  [rad_avg_thermal]
    type = RadialAverage
    radius = 0.1
    weights = linear
    prop_name = thermal_sensitivity
    execute_on = TIMESTEP_END
    force_preaux = true
  []
  # Provides Dc
  [calc_sense]
    type = SensitivityFilter
    density_sensitivity = Dc
    design_density = mat_den
    filter_UO = rad_avg
    execute_on = TIMESTEP_END
    force_postaux = true
  []
  # Provides Cc
  [calc_sense_cost]
    type = SensitivityFilter
    density_sensitivity = Cc
    design_density = mat_den
    filter_UO = rad_avg_cost
    execute_on = TIMESTEP_END
    force_postaux = true
  []
  # Provides Tc
  [calc_sense_thermal]
    type = SensitivityFilter
    density_sensitivity = Tc
    design_density = mat_den
    filter_UO = rad_avg_thermal
    execute_on = TIMESTEP_END
    force_postaux = true
  []
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
  petsc_options_value = 'lu superlu_dist'
  nl_abs_tol = 1e-12
  dt = 1.0
  num_steps = 500
[]
[Outputs]
  exodus = true
  [out]
    type = CSV
    execute_on = 'TIMESTEP_END'
  []
  print_linear_residuals = false
[]
[Postprocessors]
  [right_flux]
    type = SideDiffusiveFluxAverage
    variable = temp
    boundary = right
    diffusivity = 10
  []
  [mesh_volume]
    type = VolumePostprocessor
    execute_on = 'initial timestep_end'
  []
  [total_vol]
    type = ElementIntegralVariablePostprocessor
    variable = mat_den
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [vol_frac]
    type = ParsedPostprocessor
    expression = 'total_vol / mesh_volume'
    pp_names = 'total_vol mesh_volume'
  []
  [sensitivity]
    type = ElementIntegralMaterialProperty
    mat_prop = sensitivity
  []
  [cost_sensitivity]
    type = ElementIntegralMaterialProperty
    mat_prop = cost_sensitivity
  []
  [cost]
    type = ElementIntegralMaterialProperty
    mat_prop = CostDensity
  []
  [cost_frac]
    type = ParsedPostprocessor
    expression = 'cost / mesh_volume'
    pp_names = 'cost mesh_volume'
  []
  [objective]
    type = ElementIntegralMaterialProperty
    mat_prop = strain_energy_density
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [objective_thermal]
    type = ElementIntegralMaterialProperty
    mat_prop = thermal_compliance
    execute_on = 'INITIAL TIMESTEP_END'
  []
[]
(modules/heat_transfer/test/tests/convective_heat_flux/coupled.i)
[Mesh]
  type = GeneratedMesh
  dim = 3
  nx = 10
[]
[Variables]
  [./temp]
    initial_condition = 200.0
  [../]
[]
[Kernels]
  [./heat_dt]
    type = TimeDerivative
    variable = temp
  [../]
  [./heat_conduction]
    type = Diffusion
    variable = temp
  [../]
  [./heat]
    type = BodyForce
    variable = temp
    value = 0
  [../]
[]
[BCs]
  [./right]
    type = ConvectiveHeatFluxBC
    variable = temp
    boundary = 'right'
    T_infinity = T_inf
    heat_transfer_coefficient = htc
    heat_transfer_coefficient_dT = dhtc_dT
  [../]
[]
[Materials]
  [./T_inf]
    type = ParsedMaterial
    property_name = T_inf
    coupled_variables = temp
    expression = 'temp + 1'
  [../]
  [./htc]
    type = ParsedMaterial
    property_name = htc
    coupled_variables = temp
    expression = 'temp / 100 + 1'
  [../]
  [./dhtc_dT]
    type = ParsedMaterial
    property_name = dhtc_dT
    coupled_variables = temp
    expression = '1 / 100'
  [../]
[]
[Postprocessors]
  [./left_temp]
    type = SideAverageValue
    variable = temp
    boundary = left
    execute_on = 'TIMESTEP_END initial'
  [../]
  [./right_temp]
    type = SideAverageValue
    variable = temp
    boundary = right
  [../]
  [./right_flux]
    type = SideDiffusiveFluxAverage
    variable = temp
    boundary = right
    diffusivity = 1
  [../]
[]
[Executioner]
  type = Transient
  num_steps = 10
  dt = 1
  nl_abs_tol = 1e-12
[]
[Outputs]
  [./out]
    type = CSV
    time_step_interval = 10
  [../]
[]
(test/tests/thewarehouse/test1.i)
[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 100
    ny = 100
  []
  [manyblocks]
    input = gen
    type = ElemUniqueSubdomainsGenerator
  []
[]
[Variables]
  [./u]
  [../]
[]
[Kernels]
  [./diff]
    type = CoefDiffusion
    variable = u
    coef = 0.1
  [../]
  [./time]
    type = TimeDerivative
    variable = u
  [../]
[]
[Materials]
  [mat_props]
    type = GenericConstantMaterial
    prop_names = diffusivity
    prop_values = 2
  []
[]
[UserObjects]
[]
[Postprocessors]
  [avg_flux_right]
    # Computes -\int(exp(y)+1) from 0 to 1 which is -2.718281828
    type = SideDiffusiveFluxAverage
    variable = u
    boundary = right
    diffusivity = diffusivity
  []
  [u1_avg]
    type = ElementAverageValue
    variable = u
    execute_on = 'initial timestep_end'
  []
  [u2_avg]
    type = ElementAverageValue
    variable = u
    execute_on = 'initial timestep_end'
  []
  [diff]
    type = DifferencePostprocessor
    value1 = u1_avg
    value2 = u2_avg
    execute_on = 'initial timestep_end'
  []
[]
[BCs]
  [./left]
    type = DirichletBC
    variable = u
    boundary = left
    value = 0
  [../]
  [./right]
    type = DirichletBC
    variable = u
    boundary = right
    value = 1
  [../]
[]
[Executioner]
  type = Transient
  num_steps = 10
  dt = 0.1
  solve_type = PJFNK
  petsc_options_iname = '-pc_type -pc_hypre_type'
  petsc_options_value = 'hypre boomeramg'
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_radiation/sphere.i)
#
# This problem is one of radiation boundary conditions between two
# spherical surfaces.
#
#            S(T1^4 - T2^4)                         R1^2
# flux1 = - ----------------   and flux2 = -flux1 * ----
#           1    1 - e2   R1^2                      R2^2
#           -- + ------ * ----
#           e1     e2     R2^2
#
# where S is the Stefan Boltzmann constant         5.67e-8 W/m^2/K^4
#       T1 is the temperature on the left surface  278 K
#       T2 is the temperature on the right surface 333 K
#       e1 is the emissivity for the left surface  0.8
#       e2 is the emissivity for the left surface  0.9
#       R1 is the radius of the inner surface      0.1 m
#       R2 is the radius of the outer surface      0.11 m
#
# Flux1:
# Exact           Code
# -------------   -------------
# -267.21 W/m^2   -267.02 W/m^2
#
# Flux2:
# Exact           Code
# -------------   -------------
#  220.83 W/m^2    220.70 W/m^2
#
thick = 0.01
R1 = 0.1
R2 = 0.11
[GlobalParams]
  order = second
  family = lagrange
[]
[Mesh]
  coord_type = RSPHERICAL
  [mesh1]
    type = GeneratedMeshGenerator
    dim = 1
    elem_type = edge3
    nx = 4
    xmin = '${fparse R1 - thick}'
    xmax = '${R1}'
    boundary_name_prefix = left
  []
  [mesh2]
    type = GeneratedMeshGenerator
    dim = 1
    elem_type = edge3
    nx = 4
    ny = 1
    xmin = '${R2}'
    xmax = '${fparse R2 + thick}'
    boundary_id_offset = 4
    boundary_name_prefix = right
  []
  [final]
    type = CombinerGenerator
    inputs = 'mesh1 mesh2'
  []
[]
[Variables]
  [temperature]
  []
[]
[Kernels]
  [heat_conduction]
    type = HeatConduction
    variable = temperature
  []
[]
[BCs]
  [left]
    type = DirichletBC
    variable = temperature
    boundary = left_left
    value = 278
  []
  [right]
    type = DirichletBC
    variable = temperature
    boundary = right_right
    value = 333
  []
[]
[Materials]
  [heat]
    type = HeatConductionMaterial
    thermal_conductivity = 200 # W/m/K
    specific_heat = 4.2e5
  []
[]
[ThermalContact]
  [thermal_contact]
    type = GapHeatTransfer
    variable = temperature
    primary = left_right
    secondary = right_left
    emissivity_primary = 0.8
    emissivity_secondary = 0.9
    quadrature = true
    gap_conductivity = 1e-40 # requires a positive value
    gap_geometry_type = sphere
  []
[]
[Functions]
  [analytic_flux_1]
    type = ParsedFunction
    symbol_names = 'S        T1  T2  e1  e2  R1    R2'
    symbol_values = '5.67e-8 278 333 0.8 0.9 ${R1} ${R2}'
    expression = 'T14 := T1*T1*T1*T1;
                  T24 := T2*T2*T2*T2;
                  S*(T14-T24)/(1/e1+(1-e2)/e2*R1*R1/R2/R2)'
  []
  [analytic_flux_2]
    type = ParsedFunction
    symbol_names = 'S        T1  T2  e1  e2  R1    R2'
    symbol_values = '5.67e-8 278 333 0.8 0.9 ${R1} ${R2}'
    expression = 'T14 := T1*T1*T1*T1;
                  T24 := T2*T2*T2*T2;
                  -S*(T14-T24)/(1/e1+(1-e2)/e2*R1*R1/R2/R2)*R1*R1/R2/R2'
  []
[]
[Postprocessors]
  [code_flux_1]
    type = SideDiffusiveFluxAverage
    variable = temperature
    boundary = left_right
    diffusivity = thermal_conductivity
    execute_on = 'initial timestep_end'
  []
  [analytic_flux_1]
    type = FunctionValuePostprocessor
    function = analytic_flux_1
    execute_on = 'initial timestep_end'
  []
  [error_1]
    type = ParsedPostprocessor
    pp_names = 'code_flux_1 analytic_flux_1'
    expression = '(analytic_flux_1 - code_flux_1)/analytic_flux_1*100'
    execute_on = 'initial timestep_end'
  []
  [code_flux_2]
    type = SideDiffusiveFluxAverage
    variable = temperature
    boundary = right_left
    diffusivity = thermal_conductivity
    execute_on = 'initial timestep_end'
  []
  [analytic_flux_2]
    type = FunctionValuePostprocessor
    function = analytic_flux_2
    execute_on = 'initial timestep_end'
  []
  [error_2]
    type = ParsedPostprocessor
    pp_names = 'code_flux_2 analytic_flux_2'
    expression = '(analytic_flux_2 - code_flux_2)/analytic_flux_2*100'
    execute_on = 'initial timestep_end'
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  solve_type = newton
  num_steps = 1
  dt = 1
  end_time = 1
  nl_abs_tol = 1e-12
  nl_rel_tol = 1e-10
[]
[Outputs]
  csv = true
[]
(test/tests/postprocessors/side_diffusive_flux_integral/side_diffusive_flux_integral_fv.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
  ny = 10
[]
[Variables]
  [u]
    order = CONSTANT
    family = MONOMIAL
    fv = true
  []
[]
[FVKernels]
  [diff]
    type = FVDiffusion
    variable = u
    coeff = 1
  []
[]
[FVBCs]
  [left]
    type = FVDirichletBC
    variable = u
    boundary = left
    value = 0
  []
  [right]
    type = FVDirichletBC
    variable = u
    boundary = right
    value = 1
  []
[]
[FunctorMaterials]
  [mat_props]
    type = GenericFunctorMaterial
    prop_names = diffusivity
    prop_values = 1
  []
  [mat_props_vector]
    type = GenericVectorFunctorMaterial
    prop_names = diffusivity_vec
    prop_values = '1 1.5 1'
  []
[]
[Postprocessors]
  inactive = 'avg_flux_top'
  [avg_flux_right]
    # Computes flux integral on the boundary, which should be -1
    type = SideDiffusiveFluxAverage
    variable = u
    boundary = right
    functor_diffusivity = diffusivity
  []
  [avg_flux_top]
    type = SideVectorDiffusivityFluxIntegral
    variable = u
    boundary = top
    functor_diffusivity = diffusivity_vec
  []
[]
[Executioner]
  type = Steady
  solve_type = PJFNK
  petsc_options_iname = '-pc_type -pc_hypre_type'
  petsc_options_value = 'hypre boomeramg'
  nl_abs_tol = 1e-14
  nl_rel_tol = 1e-14
  l_abs_tol = 1e-14
  l_tol = 1e-6
[]
[Outputs]
  exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/closed_gap_prescribed_pressure.i)
## Units in the input file: m-Pa-s-K
[Mesh]
  [left_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 40
    ny = 10
    xmax = 1
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = moving_block
  []
  [left_block]
    type = SubdomainIDGenerator
    input = left_rectangle
    subdomain_id = 1
  []
  [right_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 40
    ny = 10
    xmin = 1
    xmax = 2
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = fixed_block
    boundary_id_offset = 4
  []
  [right_block]
    type = SubdomainIDGenerator
    input = right_rectangle
    subdomain_id = 2
  []
  [two_blocks]
    type = MeshCollectionGenerator
    inputs = 'left_block right_block'
  []
  [block_rename]
    type = RenameBlockGenerator
    input = two_blocks
    old_block = '1 2'
    new_block = 'left_block right_block'
  []
  [interface_secondary_subdomain]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'fixed_block_left'
    new_block_id = 3
    new_block_name = 'interface_secondary_subdomain'
    input = block_rename
  []
  [interface_primary_subdomain]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'moving_block_right'
    new_block_id = 4
    new_block_name = 'interface_primary_subdomain'
    input = interface_secondary_subdomain
  []
[]
[Variables]
  [temperature]
    initial_condition = 525.0
  []
  [temperature_interface_lm]
    block = 'interface_secondary_subdomain'
  []
[]
[AuxVariables]
  [interface_normal_lm]
    order = FIRST
    family = LAGRANGE
    block = 'interface_secondary_subdomain'
    initial_condition = 100.0
  []
[]
[Kernels]
  [HeatDiff_steel]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = steel_thermal_conductivity
    block = 'left_block'
  []
  [HeatDiff_aluminum]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = aluminum_thermal_conductivity
    block = 'right_block'
  []
[]
[BCs]
  [temperature_left]
    type = ADDirichletBC
    variable = temperature
    value = 800
    boundary = 'moving_block_left'
  []
  [temperature_right]
    type = ADDirichletBC
    variable = temperature
    value = 250
    boundary = 'fixed_block_right'
  []
[]
[Constraints]
  [thermal_contact]
    type = ModularGapConductanceConstraint
    variable = temperature_interface_lm
    secondary_variable = temperature
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
    gap_flux_models = 'closed'
  []
[]
[Materials]
  [steel_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'steel_density steel_thermal_conductivity steel_hardness'
    prop_values = '8e3            16.2                       129' ## for stainless steel 304
    block = 'left_block'
  []
  [aluminum_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_hardness'
    prop_values = ' 2.7e3           210                             15' #for 99% pure Al
    block = 'right_block'
  []
[]
[UserObjects]
  [closed]
    type = GapFluxModelPressureDependentConduction
    primary_conductivity = steel_thermal_conductivity
    secondary_conductivity = aluminum_thermal_conductivity
    temperature = temperature
    contact_pressure = interface_normal_lm
    primary_hardness = steel_hardness
    secondary_hardness = aluminum_hardness
    boundary = moving_block_right
  []
[]
[Postprocessors]
  [steel_interface_temperature]
    type = AverageNodalVariableValue
    variable = temperature
    block = interface_primary_subdomain
  []
  [aluminum_interface_temperature]
    type = AverageNodalVariableValue
    variable = temperature
    block = interface_secondary_subdomain
  []
  [interface_heat_flux_steel]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = moving_block_right
    diffusivity = steel_thermal_conductivity
  []
  [interface_heat_flux_aluminum]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = fixed_block_left
    diffusivity = aluminum_thermal_conductivity
  []
[]
[Executioner]
  type = Steady
  solve_type = NEWTON
  automatic_scaling = false
  nl_rel_tol = 1e-14
  nl_max_its = 20
[]
[Outputs]
  csv = true
  perf_graph = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/open_gap_pressure_dependent.i)
## Units in the input file: m-Pa-s-K
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [left_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 40
    ny = 10
    xmax = 1
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = moving_block
  []
  [left_block]
    type = SubdomainIDGenerator
    input = left_rectangle
    subdomain_id = 1
  []
  [right_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 40
    ny = 10
    xmin = 1.0001
    xmax = 2.0001
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = fixed_block
    boundary_id_offset = 4
  []
  [right_block]
    type = SubdomainIDGenerator
    input = right_rectangle
    subdomain_id = 2
  []
  [two_blocks]
    type = MeshCollectionGenerator
    inputs = 'left_block right_block'
  []
  [block_rename]
    type = RenameBlockGenerator
    input = two_blocks
    old_block = '1 2'
    new_block = 'left_block right_block'
  []
[]
[Variables]
  [disp_x]
    block = 'left_block right_block'
  []
  [disp_y]
    block = 'left_block right_block'
  []
  [temperature]
    initial_condition = 525.0
  []
  [temperature_interface_lm]
    block = 'interface_secondary_subdomain'
  []
[]
[Physics]
  [SolidMechanics/QuasiStatic]
    [steel]
      strain = SMALL
      add_variables = false
      use_automatic_differentiation = true
      additional_generate_output = 'vonmises_stress'
      additional_material_output_family = 'MONOMIAL'
      additional_material_output_order = 'FIRST'
      block = 'left_block'
    []
    [aluminum]
      strain = SMALL
      add_variables = false
      use_automatic_differentiation = true
      additional_generate_output = 'vonmises_stress'
      additional_material_output_family = 'MONOMIAL'
      additional_material_output_order = 'FIRST'
      block = 'right_block'
    []
  []
[]
[Kernels]
  [HeatDiff_steel]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = steel_thermal_conductivity
    block = 'left_block'
  []
  [HeatDiff_aluminum]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = aluminum_thermal_conductivity
    block = 'right_block'
  []
[]
[BCs]
  [fixed_bottom_edge]
    type = ADDirichletBC
    variable = disp_y
    value = 0
    boundary = 'moving_block_bottom fixed_block_bottom'
  []
  [fixed_outer_edge]
    type = ADDirichletBC
    variable = disp_x
    value = 0
    boundary = 'fixed_block_right'
  []
  [pressure_left_block]
    type = ADPressure
    variable = disp_x
    boundary = 'moving_block_left'
    component = 0
    function = 1*t
  []
  [temperature_left]
    type = ADDirichletBC
    variable = temperature
    value = 800
    boundary = 'moving_block_left'
  []
  [temperature_right]
    type = ADDirichletBC
    variable = temperature
    value = 250
    boundary = 'fixed_block_right'
  []
[]
[Contact]
  [interface]
    primary = moving_block_right
    secondary = fixed_block_left
    model = frictionless
    formulation = mortar
    correct_edge_dropping = true
  []
[]
[Constraints]
  [thermal_contact]
    type = ModularGapConductanceConstraint
    variable = temperature_interface_lm
    secondary_variable = temperature
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
    gap_flux_models = 'closed'
    use_displaced_mesh = true
  []
[]
[Materials]
  [steel_elasticity_tensor]
    type = ADComputeIsotropicElasticityTensor
    youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
    poissons_ratio = 0.29
    block = 'left_block'
  []
  [steel_stress]
    type = ADComputeLinearElasticStress
    block = 'left_block'
  []
  [steel_density]
    type = ADGenericConstantMaterial
    prop_names = 'steel_density'
    prop_values = 8e3 #in kg/m^3, stainless steel 304
    block = 'left_block'
  []
  [steel_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'steel_thermal_conductivity steel_heat_capacity steel_emissivity'
    prop_values = '16.2 0.5 0.6' ## for stainless steel 304
    block = 'left_block'
  []
  [aluminum_elasticity_tensor]
    type = ADComputeIsotropicElasticityTensor
    youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
    poissons_ratio = 0.36
    block = 'right_block'
  []
  [aluminum_stress]
    type = ADComputeLinearElasticStress
    block = 'right_block'
  []
  [aluminum_density]
    type = ADGenericConstantMaterial
    prop_names = 'aluminum_density'
    prop_values = 2.7e3 #in kg/m^3, stainless steel 304
    block = 'right_block'
  []
  [aluminum_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'aluminum_thermal_conductivity aluminum_heat_capacity aluminum_emissivity'
    prop_values = '210 0.9 0.25'
    block = 'right_block'
  []
[]
[UserObjects]
  [closed]
    type = GapFluxModelPressureDependentConduction
    primary_conductivity = steel_thermal_conductivity
    secondary_conductivity = aluminum_thermal_conductivity
    temperature = temperature
    primary_hardness = 1.0
    secondary_hardness = 1.0
    boundary = moving_block_right
    contact_pressure = interface_normal_lm
  []
[]
[Postprocessors]
  [steel_pt_interface_temperature]
    type = NodalVariableValue
    nodeid = 245
    variable = temperature
  []
  [aluminum_pt_interface_temperature]
    type = NodalVariableValue
    nodeid = 657
    variable = temperature
  []
  [interface_heat_flux_steel]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = moving_block_right
    diffusivity = steel_thermal_conductivity
  []
  [interface_heat_flux_aluminum]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = fixed_block_left
    diffusivity = aluminum_thermal_conductivity
  []
  [steel_element_interface_stress]
    type = ElementalVariableValue
    variable = vonmises_stress
    elementid = 199
  []
  [aluminum_element_interface_stress]
    type = ElementalVariableValue
    variable = vonmises_stress
    elementid = 560
  []
[]
[Executioner]
  type = Steady
  solve_type = NEWTON
  automatic_scaling = false
  line_search = 'none'
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
[]
[Outputs]
  csv = true
  perf_graph = true
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/thermal_test.i)
vol_frac = 0.4
cost_frac = 10.0
power = 2.0
E0 = 1.0e-6
E1 = 1.0
rho0 = 0.0
rho1 = 1.0
C0 = 1.0e-6
C1 = 1.0
TC0 = 1.0e-16
TC1 = 1.0
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [MeshGenerator]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 10
    ny = 10
    xmin = 0
    xmax = 40
    ymin = 0
    ymax = 40
  []
  [node]
    type = ExtraNodesetGenerator
    input = MeshGenerator
    new_boundary = hold
    nodes = 0
  []
  [push_left]
    type = ExtraNodesetGenerator
    input = node
    new_boundary = push_left
    coord = '16 0 0'
  []
  [push_center]
    type = ExtraNodesetGenerator
    input = push_left
    new_boundary = push_center
    coord = '24 0 0'
  []
  [extra]
    type = SideSetsFromBoundingBoxGenerator
    input = push_center
    bottom_left = '-0.01 17.999  0'
    top_right = '5 22.001  0'
    boundary_new = n1
    included_boundaries = left
  []
  [dirichlet_bc]
    type = SideSetsFromNodeSetsGenerator
    input = extra
  []
[]
[Variables]
  [disp_x]
  []
  [disp_y]
  []
  [temp]
    initial_condition = 100.0
  []
[]
[AuxVariables]
  [Dc]
    family = MONOMIAL
    order = FIRST
    initial_condition = -1.0
  []
  [Cc]
    family = MONOMIAL
    order = FIRST
    initial_condition = -1.0
  []
  [Tc]
    family = MONOMIAL
    order = FIRST
    initial_condition = -1.0
  []
  [Cost]
    family = MONOMIAL
    order = FIRST
    initial_condition = -1.0
  []
  [mat_den]
    family = MONOMIAL
    order = FIRST
    initial_condition = ${vol_frac}
  []
[]
[AuxKernels]
  [Cost]
    type = MaterialRealAux
    variable = Cost
    property = Cost_mat
  []
[]
[Kernels]
  [heat_conduction]
    type = HeatConduction
    variable = temp
    diffusion_coefficient = thermal_cond
  []
  [heat_source]
    type = HeatSource
    value = 1e-2 # W/m^3
    variable = temp
  []
[]
[Physics/SolidMechanics/QuasiStatic]
  [all]
    strain = SMALL
    add_variables = true
    incremental = false
  []
[]
[BCs]
  [no_y]
    type = DirichletBC
    variable = disp_y
    boundary = hold
    value = 0.0
  []
  [no_x_symm]
    type = DirichletBC
    variable = disp_x
    boundary = right
    value = 0.0
  []
  [left_n1]
    type = DirichletBC
    variable = temp
    boundary = n1
    value = 0.0
  []
  [top]
    type = NeumannBC
    variable = temp
    boundary = top
    value = 0
  []
  [bottom]
    type = NeumannBC
    variable = temp
    boundary = bottom
    value = 0
  []
  [right]
    type = NeumannBC
    variable = temp
    boundary = right
    value = 0
  []
  [left]
    type = NeumannBC
    variable = temp
    boundary = left
    value = 0
  []
[]
[NodalKernels]
  [push_left]
    type = NodalGravity
    variable = disp_y
    boundary = push_left
    gravity_value = 0.0 # -1e-8
    mass = 1
  []
  [push_center]
    type = NodalGravity
    variable = disp_y
    boundary = push_center
    gravity_value = 0.0 # -1e-8
    mass = 1
  []
[]
[Materials]
  [thermal_cond]
    type = DerivativeParsedMaterial
    # ordered multimaterial simp
    expression = "A1:=(${TC0}-${TC1})/(${rho0}^${power}-${rho1}^${power}); "
                 "B1:=${TC0}-A1*${rho0}^${power}; TC1:=A1*mat_den^${power}+B1; TC1"
    coupled_variables = 'mat_den'
    property_name = thermal_cond
    outputs = 'exodus'
  []
  [thermal_compliance]
    type = ThermalCompliance
    temperature = temp
    thermal_conductivity = thermal_cond
    outputs = 'exodus'
  []
  [elasticity_tensor]
    type = ComputeVariableIsotropicElasticityTensor
    youngs_modulus = E_phys
    poissons_ratio = poissons_ratio
    args = 'mat_den'
  []
  [E_phys]
    type = DerivativeParsedMaterial
    # ordered multimaterial simp
    expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
                 "B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; E1"
    coupled_variables = 'mat_den'
    property_name = E_phys
  []
  [Cost_mat]
    type = DerivativeParsedMaterial
    # ordered multimaterial simp
    expression = "A1:=(${C0}-${C1})/(${rho0}^(1/${power})-${rho1}^(1/${power})); "
                 "B1:=${C0}-A1*${rho0}^(1/${power}); C1:=A1*mat_den^(1/${power})+B1; C1"
    coupled_variables = 'mat_den'
    property_name = Cost_mat
  []
  [CostDensity]
    type = ParsedMaterial
    property_name = CostDensity
    coupled_variables = 'mat_den Cost'
    expression = 'mat_den*Cost'
  []
  [poissons_ratio]
    type = GenericConstantMaterial
    prop_names = poissons_ratio
    prop_values = 0.3
  []
  [stress]
    type = ComputeLinearElasticStress
  []
  [dc]
    type = ComplianceSensitivity
    design_density = mat_den
    youngs_modulus = E_phys
  []
  [cc]
    type = CostSensitivity
    design_density = mat_den
    cost = Cost_mat
    outputs = 'exodus'
  []
  [tc]
    type = ThermalSensitivity
    design_density = mat_den
    thermal_conductivity = thermal_cond
    temperature = temp
    outputs = 'exodus'
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[UserObjects]
  [rad_avg]
    type = RadialAverage
    radius = 0.1
    weights = linear
    prop_name = sensitivity
    execute_on = TIMESTEP_END
    force_preaux = true
  []
  [rad_avg_cost]
    type = RadialAverage
    radius = 0.1
    weights = linear
    prop_name = cost_sensitivity
    execute_on = TIMESTEP_END
    force_preaux = true
  []
  [rad_avg_thermal]
    type = RadialAverage
    radius = 0.1
    weights = linear
    prop_name = thermal_sensitivity
    execute_on = TIMESTEP_END
    force_preaux = true
  []
  [update]
    type = DensityUpdateTwoConstraints
    density_sensitivity = Dc
    cost_density_sensitivity = Cc
    cost = Cost
    cost_fraction = ${cost_frac}
    design_density = mat_den
    volume_fraction = ${vol_frac}
    bisection_lower_bound = 0
    bisection_upper_bound = 1.0e12 # 100
    use_thermal_compliance = true
    thermal_sensitivity = Tc
    weight_mechanical_thermal = '0 1'
    relative_tolerance = 1.0e-12
    bisection_move = 0.015
    adaptive_move = false
    execute_on = TIMESTEP_BEGIN
  []
  # Provides Dc
  [calc_sense]
    type = SensitivityFilter
    density_sensitivity = Dc
    design_density = mat_den
    filter_UO = rad_avg
    execute_on = TIMESTEP_END
    force_postaux = true
  []
  # Provides Cc
  [calc_sense_cost]
    type = SensitivityFilter
    density_sensitivity = Cc
    design_density = mat_den
    filter_UO = rad_avg_cost
    execute_on = TIMESTEP_END
    force_postaux = true
  []
  # Provides Tc
  [calc_sense_thermal]
    type = SensitivityFilter
    density_sensitivity = Tc
    design_density = mat_den
    filter_UO = rad_avg_thermal
    execute_on = TIMESTEP_END
    force_postaux = true
  []
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
  petsc_options_value = 'lu superlu_dist'
  nl_abs_tol = 1e-12
  dt = 1.0
  num_steps = 5
[]
[Outputs]
  exodus = true
  [out]
    type = CSV
    execute_on = 'TIMESTEP_END'
  []
  print_linear_residuals = false
[]
[Postprocessors]
  [right_flux]
    type = SideDiffusiveFluxAverage
    variable = temp
    boundary = right
    diffusivity = 10
  []
  [mesh_volume]
    type = VolumePostprocessor
    execute_on = 'initial timestep_end'
  []
  [total_vol]
    type = ElementIntegralVariablePostprocessor
    variable = mat_den
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [vol_frac]
    type = ParsedPostprocessor
    expression = 'total_vol / mesh_volume'
    pp_names = 'total_vol mesh_volume'
  []
  [sensitivity]
    type = ElementIntegralMaterialProperty
    mat_prop = sensitivity
  []
  [cost_sensitivity]
    type = ElementIntegralMaterialProperty
    mat_prop = cost_sensitivity
  []
  [cost]
    type = ElementIntegralMaterialProperty
    mat_prop = CostDensity
  []
  [cost_frac]
    type = ParsedPostprocessor
    expression = 'cost / mesh_volume'
    pp_names = 'cost mesh_volume'
  []
  [objective]
    type = ElementIntegralMaterialProperty
    mat_prop = strain_energy_density
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [objective_thermal]
    type = ElementIntegralMaterialProperty
    mat_prop = thermal_compliance
    execute_on = 'INITIAL TIMESTEP_END'
  []
[]
(modules/heat_transfer/test/tests/ad_convective_heat_flux/equilibrium.i)
[Mesh]
  type = GeneratedMesh
  dim = 3
  nx = 10
[]
[Variables]
  [./temp]
    initial_condition = 200.0
  [../]
[]
[Kernels]
  [./heat_dt]
    type = ADTimeDerivative
    variable = temp
  [../]
  [./heat_conduction]
    type = ADDiffusion
    variable = temp
  [../]
[]
[BCs]
  [./right]
    type = ADConvectiveHeatFluxBC
    variable = temp
    boundary = 'right'
    T_infinity = 100.0
    heat_transfer_coefficient = 1
  [../]
[]
[Postprocessors]
  [./left_temp]
    type = SideAverageValue
    variable = temp
    boundary = left
    execute_on = 'TIMESTEP_END initial'
  [../]
  [./right_temp]
    type = SideAverageValue
    variable = temp
    boundary = right
  [../]
  [./right_flux]
    type = SideDiffusiveFluxAverage
    variable = temp
    boundary = right
    diffusivity = 1
  [../]
[]
[Executioner]
  type = Transient
  num_steps = 10
  dt = 1e1
  nl_abs_tol = 1e-12
[]
[Outputs]
  [./out]
    type = CSV
    time_step_interval = 10
  [../]
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_offset_single_material_insulated.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
  [left_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 100
    ny = 100
    xmax = 0.1
    ymin = 0.1
    ymax = 0.35
    boundary_name_prefix = moving_block
  []
  [left_block]
    type = SubdomainIDGenerator
    input = left_rectangle
    subdomain_id = 1
  []
  [right_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 100
    ny = 100
    xmin = 0.1
    xmax = 0.2
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = fixed_block
    boundary_id_offset = 4
  []
  [right_block]
    type = SubdomainIDGenerator
    input = right_rectangle
    subdomain_id = 2
  []
  [two_blocks]
    type = MeshCollectionGenerator
    inputs = 'left_block right_block'
  []
  [block_rename]
    type = RenameBlockGenerator
    input = two_blocks
    old_block = '1 2'
    new_block = 'left_block right_block'
  []
  [interface_secondary_subdomain]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'fixed_block_left'
    new_block_id = 3
    new_block_name = 'interface_secondary_subdomain'
    input = block_rename
  []
  [interface_primary_subdomain]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'moving_block_right'
    new_block_id = 4
    new_block_name = 'interface_primary_subdomain'
    input = interface_secondary_subdomain
  []
[]
[Problem]
  type = ReferenceResidualProblem
  reference_vector = 'ref'
  extra_tag_vectors = 'ref'
[]
[Variables]
  [temperature]
    initial_condition = 300.0
  []
  [potential]
  []
  [potential_interface_lm]
    block = 'interface_secondary_subdomain'
  []
[]
[AuxVariables]
  [interface_normal_lm]
    order = FIRST
    family = LAGRANGE
    block = 'interface_secondary_subdomain'
    initial_condition = 1.0
  []
[]
[Kernels]
  [HeatDiff_aluminum]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = aluminum_thermal_conductivity
    extra_vector_tags = 'ref'
    block = 'left_block right_block'
  []
  [electric_aluminum]
    type = ADMatDiffusion
    variable = potential
    diffusivity = aluminum_electrical_conductivity
    extra_vector_tags = 'ref'
    block = 'left_block right_block'
  []
[]
[BCs]
  [temperature_left]
    type = ADDirichletBC
    variable = temperature
    value = 300
    boundary = 'moving_block_left'
  []
  [temperature_right]
    type = ADDirichletBC
    variable = temperature
    value = 300
    boundary = 'fixed_block_right'
  []
  [electric_left]
    type = ADDirichletBC
    variable = potential
    value = 0.0
    boundary = moving_block_left
  []
  [electric_right]
    type = ADDirichletBC
    variable = potential
    value = 3.0e-1
    boundary = fixed_block_right
  []
[]
[Constraints]
  [electrical_contact]
    type = ModularGapConductanceConstraint
    variable = potential_interface_lm
    secondary_variable = potential
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
    gap_flux_models = 'closed_electric'
    correct_edge_dropping = true
  []
  [interface_heating]
    type = ADInterfaceJouleHeatingConstraint
    potential_lagrange_multiplier = potential_interface_lm
    secondary_variable = temperature
    primary_electrical_conductivity = aluminum_electrical_conductivity
    secondary_electrical_conductivity = aluminum_electrical_conductivity
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
  []
[]
[Materials]
  [aluminum_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
    prop_values = ' 2.7e3           210                           900.0                   3.7e7                           1.0' #for 99% pure Al
    block = 'left_block right_block interface_secondary_subdomain'
  []
[]
[UserObjects]
  [closed_electric]
    type = GapFluxModelPressureDependentConduction
    primary_conductivity = aluminum_electrical_conductivity
    secondary_conductivity = aluminum_electrical_conductivity
    temperature = potential
    contact_pressure = interface_normal_lm
    primary_hardness = aluminum_hardness
    secondary_hardness = aluminum_hardness
    boundary = moving_block_right
  []
[]
[Postprocessors]
  [interface_heat_flux_large_block]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = fixed_block_left
    diffusivity = aluminum_thermal_conductivity
  []
  [interface_heat_flux_small_block]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = moving_block_right
    diffusivity = aluminum_thermal_conductivity
  []
  [interface_electrical_flux_large_block]
    type = ADSideDiffusiveFluxAverage
    variable = potential
    boundary = fixed_block_left
    diffusivity = aluminum_electrical_conductivity
  []
  [interface_electrical_flux_small_block]
    type = ADSideDiffusiveFluxAverage
    variable = potential
    boundary = moving_block_right
    diffusivity = aluminum_electrical_conductivity
  []
[]
[Executioner]
  type = Steady
  solve_type = NEWTON
  automatic_scaling = false
  line_search = 'none'
  nl_abs_tol = 2e-10
  nl_rel_tol = 1e-6
  nl_max_its = 50
  nl_forced_its = 1
[]
[Outputs]
  csv = true
  perf_graph = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/closed_gap_thermomechanical_mortar_contact.i)
## Units in the input file: m-Pa-s-K
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [left_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 40
    ny = 10
    xmax = 1
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = moving_block
  []
  [left_block]
    type = SubdomainIDGenerator
    input = left_rectangle
    subdomain_id = 1
  []
  [right_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 40
    ny = 10
    xmin = 1
    xmax = 2
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = fixed_block
    boundary_id_offset = 4
  []
  [right_block]
    type = SubdomainIDGenerator
    input = right_rectangle
    subdomain_id = 2
  []
  [two_blocks]
    type = MeshCollectionGenerator
    inputs = 'left_block right_block'
  []
  [block_rename]
    type = RenameBlockGenerator
    input = two_blocks
    old_block = '1 2'
    new_block = 'left_block right_block'
  []
  patch_update_strategy = iteration
[]
[Variables]
  [disp_x]
    block = 'left_block right_block'
  []
  [disp_y]
    block = 'left_block right_block'
  []
  [temperature]
    initial_condition = 300.0
  []
  [temperature_interface_lm]
    block = 'interface_secondary_subdomain'
  []
[]
[Physics]
  [SolidMechanics/QuasiStatic]
    [steel]
      strain = FINITE
      add_variables = false
      use_automatic_differentiation = true
      generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy stress_yy'
      additional_generate_output = 'vonmises_stress'
      additional_material_output_family = 'MONOMIAL'
      additional_material_output_order = 'FIRST'
      eigenstrain_names = steel_thermal_expansion
      block = 'left_block'
    []
    [aluminum]
      strain = FINITE
      add_variables = false
      use_automatic_differentiation = true
      generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy stress_yy'
      additional_generate_output = 'vonmises_stress'
      additional_material_output_family = 'MONOMIAL'
      additional_material_output_order = 'FIRST'
      eigenstrain_names = aluminum_thermal_expansion
      block = 'right_block'
    []
  []
[]
[Kernels]
  [HeatDiff_steel]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = steel_thermal_conductivity
    block = 'left_block'
  []
  [HeatTdot_steel]
    type = ADHeatConductionTimeDerivative
    variable = temperature
    specific_heat = steel_heat_capacity
    density_name = steel_density
    block = 'left_block'
  []
  [HeatDiff_aluminum]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = aluminum_thermal_conductivity
    block = 'right_block'
  []
  [HeatTdot_aluminum]
    type = ADHeatConductionTimeDerivative
    variable = temperature
    specific_heat = aluminum_heat_capacity
    density_name = aluminum_density
    block = 'right_block'
  []
[]
[BCs]
  [fixed_bottom_edge]
    type = ADDirichletBC
    variable = disp_y
    value = 0
    boundary = 'moving_block_bottom fixed_block_bottom'
  []
  [fixed_outer_edge]
    type = ADDirichletBC
    variable = disp_x
    value = 0
    boundary = 'fixed_block_right'
  []
  [displacement_left_block]
    type = ADFunctionDirichletBC
    variable = disp_x
    function = '2.0e-7*t'
    boundary = 'moving_block_left'
  []
  [temperature_left]
    type = ADDirichletBC
    variable = temperature
    value = 300
    boundary = 'moving_block_left'
  []
  [temperature_right]
    type = ADDirichletBC
    variable = temperature
    value = 800
    boundary = 'fixed_block_right'
  []
[]
[Contact]
  [interface]
    primary = moving_block_right
    secondary = fixed_block_left
    model = frictionless
    formulation = mortar
    correct_edge_dropping = true
  []
[]
[Constraints]
  [thermal_contact]
    type = ModularGapConductanceConstraint
    variable = temperature_interface_lm
    secondary_variable = temperature
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
    gap_flux_models = 'closed'
    use_displaced_mesh = true
  []
[]
[Materials]
  [steel_elasticity_tensor]
    type = ADComputeIsotropicElasticityTensor
    youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
    poissons_ratio = 0.29
    block = 'left_block'
  []
  [steel_stress]
    type = ADComputeFiniteStrainElasticStress
    block = 'left_block'
  []
  [steel_thermal_expansion]
    type = ADComputeThermalExpansionEigenstrain
    thermal_expansion_coeff = 17.3e-6 # stainless steel 304
    stress_free_temperature = 300.0
    temperature = temperature
    eigenstrain_name = 'steel_thermal_expansion'
    block = 'left_block'
  []
  [steel_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_hardness'
    prop_values = ' 8e3            16.2                     0.5                 129' ## for stainless steel 304
    block = 'left_block'
  []
  [aluminum_elasticity_tensor]
    type = ADComputeIsotropicElasticityTensor
    youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
    poissons_ratio = 0.36
    block = 'right_block'
  []
  [aluminum_stress]
    type = ADComputeFiniteStrainElasticStress
    block = 'right_block'
  []
  [aluminum_thermal_expansion]
    type = ADComputeThermalExpansionEigenstrain
    thermal_expansion_coeff = 24.0e-6 # aluminum
    stress_free_temperature = 300.0
    temperature = temperature
    eigenstrain_name = 'aluminum_thermal_expansion'
    block = 'right_block'
  []
  [aluminum_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_hardness'
    prop_values = ' 2.7e3            210                           0.9                   15' #for 99% pure Al
    block = 'right_block'
  []
[]
[UserObjects]
  [closed]
    type = GapFluxModelPressureDependentConduction
    primary_conductivity = steel_thermal_conductivity
    secondary_conductivity = aluminum_thermal_conductivity
    temperature = temperature
    contact_pressure = interface_normal_lm
    primary_hardness = steel_hardness
    secondary_hardness = aluminum_hardness
    boundary = moving_block_right
  []
[]
[Postprocessors]
  [steel_pt_interface_temperature]
    type = NodalVariableValue
    nodeid = 245
    variable = temperature
  []
  [aluminum_pt_interface_temperature]
    type = NodalVariableValue
    nodeid = 657
    variable = temperature
  []
  [steel_element_interface_stress]
    type = ElementalVariableValue
    variable = vonmises_stress
    elementid = 199
  []
  [aluminum_element_interface_stress]
    type = ElementalVariableValue
    variable = vonmises_stress
    elementid = 560
  []
  [interface_heat_flux_steel]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = moving_block_right
    diffusivity = steel_thermal_conductivity
  []
  [interface_heat_flux_aluminum]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = fixed_block_left
    diffusivity = aluminum_thermal_conductivity
  []
[]
[Executioner]
  type = Transient
  solve_type = NEWTON
  automatic_scaling = false
  line_search = 'none'
  # mortar contact solver options
  petsc_options = '-snes_converged_reason -pc_svd_monitor'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
  petsc_options_value = ' lu       superlu_dist'
  snesmf_reuse_base = false
  nl_rel_tol = 1e-8
  nl_max_its = 20
  l_max_its = 50
  dt = 2
  end_time = 10
[]
[Outputs]
  csv = true
  perf_graph = true
[]
(modules/heat_transfer/test/tests/radiative_bcs/radiative_bc_cyl.i)
#
# Thin cylindrical shell with very high thermal conductivity
# so that temperature is almost uniform at 500 K. Radiative
# boundary conditions is applied. Heat flux out of boundary
# 'right' should be 3723.36; this is approached as the mesh
# is refined
#
[Mesh]
  type = MeshGeneratorMesh
  [./cartesian]
    type = CartesianMeshGenerator
    dim = 2
    dx = '1 1'
    ix = '1 10'
    dy = '1 1'
    subdomain_id = '1 2 1 2'
  [../]
  [./remove_1]
    type = BlockDeletionGenerator
    block = 1
    input = cartesian
  [../]
  [./readd_left]
    type = ParsedGenerateSideset
    combinatorial_geometry = 'abs(x - 1) < 1e-4'
    new_sideset_name = left
    input = remove_1
  [../]
  coord_type = RZ
[]
[Variables]
  [./temp]
    initial_condition = 800.0
  [../]
[]
[Kernels]
  [./heat]
    type = HeatConduction
    variable = temp
  [../]
[]
[BCs]
  [./lefttemp]
    type = DirichletBC
    boundary = left
    variable = temp
    value = 800
  [../]
  [./radiative_bc]
    type = InfiniteCylinderRadiativeBC
    boundary = right
    variable = temp
    boundary_radius = 2
    boundary_emissivity = 0.2
    cylinder_radius = 3
    cylinder_emissivity = 0.7
    Tinfinity = 500
  [../]
[]
[Materials]
  [./density]
    type = GenericConstantMaterial
    prop_names = 'density  thermal_conductivity'
    prop_values = '1 1.0e5'
  [../]
[]
[Preconditioning]
  [./SMP]
    type = SMP
    full = true
  [../]
[]
[Executioner]
  type = Steady
  petsc_options = '-snes_converged_reason'
  line_search = none
  nl_rel_tol = 1e-6
  nl_abs_tol = 1e-7
[]
[Postprocessors]
  [./right]
    type = SideDiffusiveFluxAverage
    variable = temp
    boundary = right
    diffusivity = thermal_conductivity
  [../]
  [./min_temp]
    type = ElementExtremeValue
    variable = temp
    value_type = min
  [../]
  [./max_temp]
    type = ElementExtremeValue
    variable = temp
    value_type = max
  [../]
[]
[Outputs]
  csv = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material_insulated.i)
## Units in the input file: m-Pa-s-K-V
# In this steady-state, symmetric simulation, the temperature at the interface between
# the two blocks of aluminum can be calculated through Fourier's law (see the documentation
# page for ADInterfaceJouleHeatingConstraint for the relevant formulas).
#
# With the prescribed 0.0 V (left) and 0.3V (right) potential boundary conditions, the
# electric potential drop is 9.25e6 [V * S / m^2]. From this current-density-like LM variable,
# the volumetric heat source at the interface is calculated as
#   q = 1.15625e6 [W/m^3}
# Because of the 2D nature of this problem, the volumetric heat source is equal to
# the negative of the heat flux at the interface.
#
# Finally, the temperature at the interface is computed as a function of the block width,
# thermal conductivity, and specified temperature boundary condition (300K on both the
# left and right edges):
#   T_{interface} = 850.5952K
# which matches the simulation result to the 6 decimal places shown.
[Mesh]
  [left_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 100
    ny = 10
    xmax = 0.1
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = moving_block
  []
  [left_block]
    type = SubdomainIDGenerator
    input = left_rectangle
    subdomain_id = 1
  []
  [right_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 100
    ny = 10
    xmin = 0.1
    xmax = 0.2
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = fixed_block
    boundary_id_offset = 4
  []
  [right_block]
    type = SubdomainIDGenerator
    input = right_rectangle
    subdomain_id = 2
  []
  [two_blocks]
    type = MeshCollectionGenerator
    inputs = 'left_block right_block'
  []
  [block_rename]
    type = RenameBlockGenerator
    input = two_blocks
    old_block = '1 2'
    new_block = 'left_block right_block'
  []
  [interface_secondary_subdomain]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'fixed_block_left'
    new_block_id = 3
    new_block_name = 'interface_secondary_subdomain'
    input = block_rename
  []
  [interface_primary_subdomain]
    type = LowerDBlockFromSidesetGenerator
    sidesets = 'moving_block_right'
    new_block_id = 4
    new_block_name = 'interface_primary_subdomain'
    input = interface_secondary_subdomain
  []
[]
[Problem]
  type = ReferenceResidualProblem
  reference_vector = 'ref'
  extra_tag_vectors = 'ref'
[]
[Variables]
  [temperature]
    initial_condition = 300.0
  []
  [potential]
  []
  [potential_interface_lm]
    block = 'interface_secondary_subdomain'
  []
[]
[AuxVariables]
  [interface_normal_lm]
    order = FIRST
    family = LAGRANGE
    block = 'interface_secondary_subdomain'
    initial_condition = 1.0
  []
[]
[Kernels]
  [HeatDiff_aluminum]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = aluminum_thermal_conductivity
    extra_vector_tags = 'ref'
    block = 'left_block right_block'
  []
  [electric_aluminum]
    type = ADMatDiffusion
    variable = potential
    diffusivity = aluminum_electrical_conductivity
    extra_vector_tags = 'ref'
    block = 'left_block right_block'
  []
[]
[BCs]
  [temperature_left]
    type = ADDirichletBC
    variable = temperature
    value = 300
    boundary = 'moving_block_left'
  []
  [temperature_right]
    type = ADDirichletBC
    variable = temperature
    value = 300
    boundary = 'fixed_block_right'
  []
  [electric_left]
    type = ADDirichletBC
    variable = potential
    value = 0.0
    boundary = moving_block_left
  []
  [electric_right]
    type = ADDirichletBC
    variable = potential
    value = 3.0e-1
    boundary = fixed_block_right
  []
[]
[Constraints]
  [electrical_contact]
    type = ModularGapConductanceConstraint
    variable = potential_interface_lm
    secondary_variable = potential
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
    gap_flux_models = 'closed_electric'
  []
  [interface_heating]
    type = ADInterfaceJouleHeatingConstraint
    potential_lagrange_multiplier = potential_interface_lm
    secondary_variable = temperature
    primary_electrical_conductivity = aluminum_electrical_conductivity
    secondary_electrical_conductivity = aluminum_electrical_conductivity
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
  []
[]
[Materials]
  [aluminum_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
    prop_values = ' 2.7e3           210                           900.0                   3.7e7                           1.0' #for 99% pure Al
    block = 'left_block right_block interface_secondary_subdomain'
  []
[]
[UserObjects]
  [closed_electric]
    type = GapFluxModelPressureDependentConduction
    primary_conductivity = aluminum_electrical_conductivity
    secondary_conductivity = aluminum_electrical_conductivity
    temperature = potential
    contact_pressure = interface_normal_lm
    primary_hardness = aluminum_hardness
    secondary_hardness = aluminum_hardness
    boundary = moving_block_right
  []
[]
[Postprocessors]
  [aluminum_interface_temperature]
    type = AverageNodalVariableValue
    variable = temperature
    block = interface_secondary_subdomain
  []
  [interface_heat_flux_aluminum]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = fixed_block_left
    diffusivity = aluminum_thermal_conductivity
  []
  [aluminum_interface_potential]
    type = AverageNodalVariableValue
    variable = potential
    block = interface_secondary_subdomain
  []
  [interface_electrical_flux_aluminum]
    type = ADSideDiffusiveFluxAverage
    variable = potential
    boundary = fixed_block_left
    diffusivity = aluminum_electrical_conductivity
  []
[]
[Executioner]
  type = Steady
  solve_type = NEWTON
  automatic_scaling = false
  line_search = 'none'
  nl_abs_tol = 2e-10
  nl_rel_tol = 1e-6
  nl_max_its = 50
  nl_forced_its = 1
[]
[Outputs]
  csv = true
  perf_graph = true
[]
(modules/heat_transfer/test/tests/convective_heat_flux/equilibrium.i)
[Mesh]
  type = GeneratedMesh
  dim = 3
  nx = 10
[]
[Variables]
  [./temp]
    initial_condition = 200.0
  [../]
[]
[Kernels]
  [./heat_dt]
    type = TimeDerivative
    variable = temp
  [../]
  [./heat_conduction]
    type = Diffusion
    variable = temp
  [../]
[]
[BCs]
  [./right]
    type = ConvectiveHeatFluxBC
    variable = temp
    boundary = 'right'
    T_infinity = 100.0
    heat_transfer_coefficient = 1
    heat_transfer_coefficient_dT = 0
  [../]
[]
[Postprocessors]
  [./left_temp]
    type = SideAverageValue
    variable = temp
    boundary = left
    execute_on = 'TIMESTEP_END initial'
  [../]
  [./right_temp]
    type = SideAverageValue
    variable = temp
    boundary = right
  [../]
  [./right_flux]
    type = SideDiffusiveFluxAverage
    variable = temp
    boundary = right
    diffusivity = 1
  [../]
[]
[Executioner]
  type = Transient
  num_steps = 10
  dt = 1e1
  nl_abs_tol = 1e-12
[]
[Outputs]
  [./out]
    type = CSV
    time_step_interval = 10
  [../]
[]
(modules/heat_transfer/test/tests/convective_heat_flux/flux.i)
# This is a test of the ConvectiveHeatFluxBC.
# 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.
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[Problem]
  extra_tag_vectors = 'bcs'
[]
[Variables]
  [./temp]
    initial_condition = 100.0
  [../]
[]
[Kernels]
  [./heat_conduction]
    type = HeatConduction
    variable = temp
    diffusion_coefficient = 10
  [../]
[]
[BCs]
  [./left]
    type = DirichletBC
    variable = temp
    boundary = left
    value = 100.0
  [../]
  [./right]
    type = ConvectiveHeatFluxBC
    variable = temp
    boundary = right
    T_infinity = 200.0
    heat_transfer_coefficient = 10
    heat_transfer_coefficient_dT = 0
  [../]
[]
[Postprocessors]
  [./right_flux]
    type = SideDiffusiveFluxAverage
    variable = temp
    boundary = right
    diffusivity = 10
  [../]
[]
[Executioner]
  type = Transient
  num_steps = 1.0
  nl_rel_tol = 1e-12
[]
[Outputs]
  csv = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/multi_component_mortar_thermal_conduction.i)
## Units in the input file: m-Pa-s-K
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [left_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 40
    ny = 10
    xmax = 1
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = moving_block
  []
  [left_block]
    type = SubdomainIDGenerator
    input = left_rectangle
    subdomain_id = 1
  []
  [right_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 40
    ny = 10
    xmin = 1.
    xmax = 2.
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = fixed_block
    boundary_id_offset = 4
  []
  [right_block]
    type = SubdomainIDGenerator
    input = right_rectangle
    subdomain_id = 2
  []
  [two_blocks]
    type = MeshCollectionGenerator
    inputs = 'left_block right_block'
  []
  [block_rename]
    type = RenameBlockGenerator
    input = two_blocks
    old_block = '1 2'
    new_block = 'left_block right_block'
  []
  patch_update_strategy = iteration
[]
[Variables]
  [disp_x]
    block = 'left_block right_block'
  []
  [disp_y]
    block = 'left_block right_block'
  []
  [temperature]
    initial_condition = 525.0
  []
  [temperature_interface_lm]
    block = 'interface_secondary_subdomain'
  []
[]
[Physics]
  [SolidMechanics/QuasiStatic]
    [steel]
      strain = SMALL
      add_variables = false
      use_automatic_differentiation = true
      additional_generate_output = 'vonmises_stress'
      additional_material_output_family = 'MONOMIAL'
      additional_material_output_order = 'FIRST'
      block = 'left_block'
    []
    [aluminum]
      strain = SMALL
      add_variables = false
      use_automatic_differentiation = true
      additional_generate_output = 'vonmises_stress'
      additional_material_output_family = 'MONOMIAL'
      additional_material_output_order = 'FIRST'
      block = 'right_block'
    []
  []
[]
[Kernels]
  [HeatDiff_steel]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = steel_thermal_conductivity
    block = 'left_block'
  []
  [HeatTdot_steel]
    type = ADHeatConductionTimeDerivative
    variable = temperature
    specific_heat = steel_heat_capacity
    density_name = steel_density
    block = 'left_block'
  []
  [HeatDiff_aluminum]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = aluminum_thermal_conductivity
    block = 'right_block'
  []
  [HeatTdot_aluminum]
    type = ADHeatConductionTimeDerivative
    variable = temperature
    specific_heat = aluminum_heat_capacity
    density_name = aluminum_density
    block = 'right_block'
  []
[]
[BCs]
  [fixed_bottom_edge]
    type = ADDirichletBC
    variable = disp_y
    value = 0
    boundary = 'moving_block_bottom fixed_block_bottom'
  []
  [fixed_outer_edge]
    type = ADDirichletBC
    variable = disp_x
    value = 0
    boundary = 'fixed_block_right'
  []
  [displacement_left_block]
    type = ADFunctionDirichletBC
    variable = disp_x
    function = 'if(t<61, 2.0e-7, -2.0e-8*(t-60))'
    boundary = 'moving_block_left'
  []
  [temperature_left]
    type = ADDirichletBC
    variable = temperature
    value = 800
    boundary = 'moving_block_left'
  []
  [temperature_right]
    type = ADDirichletBC
    variable = temperature
    value = 250
    boundary = 'fixed_block_right'
  []
[]
[Contact]
  [interface]
    primary = moving_block_right
    secondary = fixed_block_left
    model = frictionless
    formulation = mortar
    correct_edge_dropping = true
  []
[]
[Constraints]
  [thermal_contact]
    type = ModularGapConductanceConstraint
    variable = temperature_interface_lm
    secondary_variable = temperature
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
    gap_flux_models = 'radiation closed'
    use_displaced_mesh = true
  []
[]
[Materials]
  [steel_elasticity_tensor]
    type = ADComputeIsotropicElasticityTensor
    youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
    poissons_ratio = 0.29
    block = 'left_block'
  []
  [steel_stress]
    type = ADComputeLinearElasticStress
    block = 'left_block'
  []
  [steel_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity'
    prop_values = '  8e3          16.2                       0.5' ## for stainless steel 304
    block = 'left_block'
  []
  [aluminum_elasticity_tensor]
    type = ADComputeIsotropicElasticityTensor
    youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
    poissons_ratio = 0.36
    block = 'right_block'
  []
  [aluminum_stress]
    type = ADComputeLinearElasticStress
    block = 'right_block'
  []
  [aluminum_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity'
    prop_values = ' 2.7e3            210                          0.9'
    block = 'right_block'
  []
[]
[UserObjects]
  [radiation]
    type = GapFluxModelRadiation
    secondary_emissivity = 0.25
    primary_emissivity = 0.6
    temperature = temperature
    boundary = moving_block_right
  []
  [closed]
    type = GapFluxModelPressureDependentConduction
    primary_conductivity = steel_thermal_conductivity
    secondary_conductivity = aluminum_thermal_conductivity
    temperature = temperature
    contact_pressure = interface_normal_lm
    primary_hardness = 1.0
    secondary_hardness = 1.0
    boundary = moving_block_right
  []
[]
[Postprocessors]
  [steel_pt_interface_temperature]
    type = NodalVariableValue
    nodeid = 245
    variable = temperature
  []
  [aluminum_pt_interface_temperature]
    type = NodalVariableValue
    nodeid = 657
    variable = temperature
  []
  [aluminum_element_interface_stress]
    type = ElementalVariableValue
    variable = vonmises_stress
    elementid = 560
  []
  [interface_heat_flux_steel]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = moving_block_right
    diffusivity = steel_thermal_conductivity
  []
  [interface_heat_flux_aluminum]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = fixed_block_left
    diffusivity = aluminum_thermal_conductivity
  []
[]
[Executioner]
  type = Transient
  solve_type = NEWTON
  automatic_scaling = false
  line_search = 'none'
  # mortar contact solver options
  petsc_options = '-snes_converged_reason -pc_svd_monitor'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
  petsc_options_value = ' lu       superlu_dist'
  snesmf_reuse_base = false
  nl_rel_tol = 1e-10
  nl_max_its = 20
  l_max_its = 50
  dt = 60
  end_time = 120
[]
[Outputs]
  csv = true
  perf_graph = true
[]
(modules/heat_transfer/test/tests/ad_convective_heat_flux/flux.i)
# This is a test of the ConvectiveHeatFluxBC.
# 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.
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[Problem]
  extra_tag_vectors = 'bcs'
[]
[Variables]
  [./temp]
    initial_condition = 100.0
  [../]
[]
[Kernels]
  [./heat_conduction]
    type = ADHeatConduction
    variable = temp
    thermal_conductivity = 10
  [../]
[]
[BCs]
  [./left]
    type = ADDirichletBC
    variable = temp
    boundary = left
    value = 100.0
  [../]
  [./right]
    type = ADConvectiveHeatFluxBC
    variable = temp
    boundary = right
    T_infinity = 200.0
    heat_transfer_coefficient = 10
  [../]
[]
[Postprocessors]
  [./right_flux]
    type = SideDiffusiveFluxAverage
    variable = temp
    boundary = right
    diffusivity = 10
  [../]
[]
[Executioner]
  type = Transient
  num_steps = 1.0
  nl_rel_tol = 1e-12
[]
[Outputs]
  csv = true
[]
(modules/stochastic_tools/examples/parameter_study/diffusion_time.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
  ny = 10
[]
[Variables/T]
  initial_condition = 300
[]
[Kernels]
  [time]
    type = ADTimeDerivative
    variable = T
  []
  [diff]
    type = ADMatDiffusion
    variable = T
    diffusivity = diffusivity
  []
  [source]
    type = ADBodyForce
    variable = T
    value = 100
    function = 1
  []
[]
[BCs]
  [left]
    type = ADDirichletBC
    variable = T
    boundary = left
    value = 300
  []
  [right]
    type = ADNeumannBC
    variable = T
    boundary = right
    value = -100
  []
[]
[Materials/constant]
  type = ADGenericConstantMaterial
  prop_names = 'diffusivity'
  prop_values = 1
[]
[Executioner]
  type = Transient
  num_steps = 4
  dt = 0.25
[]
[Postprocessors]
  [T_avg]
    type = ElementAverageValue
    variable = T
    execute_on = 'initial timestep_end'
  []
  [q_left]
    type = ADSideDiffusiveFluxAverage
    variable = T
    boundary = left
    diffusivity = diffusivity
    execute_on = 'initial timestep_end'
  []
[]
[VectorPostprocessors]
  [T_vec]
    type = LineValueSampler
    variable = T
    start_point = '0 0.5 0'
    end_point = '1 0.5 0'
    num_points = 11
    sort_by = x
    execute_on = 'initial timestep_end'
  []
[]
[Controls/stochastic]
  type = SamplerReceiver
[]
[Outputs]
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/closed_gap_pressure_dependent_thermal_contact.i)
## Units in the input file: m-Pa-s-K
# The analytical solution for a steady state thermal contact and a mechanical
# contact pressure of 1Pa, the temperature of the steel block at the interface
# is calcaluated as
#
# T^s_{int} = \frac{T^a_{BC}C_T k_a + T^s_{BC} k_s \left(k_a +C_T \right)}{k_s (k_a + C_T) + k_a C_T}
# T^s_{int} = 460K
#
# with the boundary conditions and thermal conductivity values specified in the
# input file below. Similarly, the temperature of the aluminum block (cold block)
# is calculated as
#
# T^a_{int} = \frac{T^s_{int} C_T + T^a_{BC} k_a}{k_a + C_T}
# T^a_{int} = 276K
#
# The values predicted by the simulation at the interface converge towards these
# temperature values, and are within a few degrees by 240s. A smaller timestep
# than is practical for the regression test application further reduces the difference
# between the analytical solution and the simulation result.
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [left_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 40
    ny = 10
    xmax = 1
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = moving_block
  []
  [left_block]
    type = SubdomainIDGenerator
    input = left_rectangle
    subdomain_id = 1
  []
  [right_rectangle]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 40
    ny = 10
    xmin = 1
    xmax = 2
    ymin = 0
    ymax = 0.5
    boundary_name_prefix = fixed_block
    boundary_id_offset = 4
  []
  [right_block]
    type = SubdomainIDGenerator
    input = right_rectangle
    subdomain_id = 2
  []
  [two_blocks]
    type = MeshCollectionGenerator
    inputs = 'left_block right_block'
  []
  [block_rename]
    type = RenameBlockGenerator
    input = two_blocks
    old_block = '1 2'
    new_block = 'left_block right_block'
  []
[]
[Variables]
  [disp_x]
    block = 'left_block right_block'
  []
  [disp_y]
    block = 'left_block right_block'
  []
  [temperature]
    initial_condition = 525.0
  []
  [temperature_interface_lm]
    block = 'interface_secondary_subdomain'
  []
[]
[Physics]
  [SolidMechanics/QuasiStatic]
    [steel]
      strain = SMALL
      add_variables = false
      use_automatic_differentiation = true
      additional_generate_output = 'vonmises_stress'
      additional_material_output_family = 'MONOMIAL'
      additional_material_output_order = 'FIRST'
      block = 'left_block'
    []
    [aluminum]
      strain = SMALL
      add_variables = false
      use_automatic_differentiation = true
      additional_generate_output = 'vonmises_stress'
      additional_material_output_family = 'MONOMIAL'
      additional_material_output_order = 'FIRST'
      block = 'right_block'
    []
  []
[]
[Kernels]
  [HeatDiff_steel]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = steel_thermal_conductivity
    block = 'left_block'
  []
  [HeatTdot_steel]
    type = ADHeatConductionTimeDerivative
    variable = temperature
    specific_heat = steel_heat_capacity
    density_name = steel_density
    block = 'left_block'
  []
  [HeatDiff_aluminum]
    type = ADHeatConduction
    variable = temperature
    thermal_conductivity = aluminum_thermal_conductivity
    block = 'right_block'
  []
  [HeatTdot_aluminum]
    type = ADHeatConductionTimeDerivative
    variable = temperature
    specific_heat = aluminum_heat_capacity
    density_name = aluminum_density
    block = 'right_block'
  []
[]
[BCs]
  [fixed_bottom_edge]
    type = ADDirichletBC
    variable = disp_y
    value = 0
    boundary = 'moving_block_bottom fixed_block_bottom'
  []
  [fixed_outer_edge]
    type = ADDirichletBC
    variable = disp_x
    value = 0
    boundary = 'fixed_block_right'
  []
  [displacement_left_block]
    type = ADDirichletBC
    variable = disp_x
    value = 1.8e-11
    boundary = 'moving_block_left'
  []
  [temperature_left]
    type = ADDirichletBC
    variable = temperature
    value = 800
    boundary = 'moving_block_left'
  []
  [temperature_right]
    type = ADDirichletBC
    variable = temperature
    value = 250
    boundary = 'fixed_block_right'
  []
[]
[Contact]
  [interface]
    primary = moving_block_right
    secondary = fixed_block_left
    model = frictionless
    formulation = mortar
    correct_edge_dropping = true
  []
[]
[Constraints]
  [thermal_contact]
    type = ModularGapConductanceConstraint
    variable = temperature_interface_lm
    secondary_variable = temperature
    primary_boundary = moving_block_right
    primary_subdomain = interface_primary_subdomain
    secondary_boundary = fixed_block_left
    secondary_subdomain = interface_secondary_subdomain
    gap_flux_models = 'closed'
    use_displaced_mesh = true
  []
[]
[Materials]
  [steel_elasticity_tensor]
    type = ADComputeIsotropicElasticityTensor
    youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
    poissons_ratio = 0.29
    block = 'left_block'
  []
  [steel_stress]
    type = ADComputeLinearElasticStress
    block = 'left_block'
  []
  [steel_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity'
    prop_values = '8e3            16.2                        0.5' ## for stainless steel 304
    block = 'left_block'
  []
  [aluminum_elasticity_tensor]
    type = ADComputeIsotropicElasticityTensor
    youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
    poissons_ratio = 0.36
    block = 'right_block'
  []
  [aluminum_stress]
    type = ADComputeLinearElasticStress
    block = 'right_block'
  []
  [aluminum_thermal_properties]
    type = ADGenericConstantMaterial
    prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity'
    prop_values = ' 2.7e3           210                             0.9'
    block = 'right_block'
  []
[]
[UserObjects]
  [closed]
    type = GapFluxModelPressureDependentConduction
    primary_conductivity = steel_thermal_conductivity
    secondary_conductivity = aluminum_thermal_conductivity
    temperature = temperature
    contact_pressure = interface_normal_lm
    primary_hardness = 1.0
    secondary_hardness = 1.0
    boundary = moving_block_right
  []
[]
[Postprocessors]
  [steel_pt_interface_temperature]
    type = NodalVariableValue
    nodeid = 245
    variable = temperature
  []
  [aluminum_pt_interface_temperature]
    type = NodalVariableValue
    nodeid = 657
    variable = temperature
  []
  [interface_heat_flux_steel]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = moving_block_right
    diffusivity = steel_thermal_conductivity
  []
  [interface_heat_flux_aluminum]
    type = ADSideDiffusiveFluxAverage
    variable = temperature
    boundary = fixed_block_left
    diffusivity = aluminum_thermal_conductivity
  []
[]
[Executioner]
  type = Transient
  solve_type = NEWTON
  automatic_scaling = false
  line_search = 'none'
  # mortar contact solver options
  petsc_options = '-snes_converged_reason -pc_svd_monitor'
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
  petsc_options_value = ' lu       superlu_dist'
  snesmf_reuse_base = false
  nl_rel_tol = 1e-10
  nl_max_its = 20
  l_max_its = 50
  dt = 60
  end_time = 240
[]
[Outputs]
  csv = true
  perf_graph = true
[]
(modules/stochastic_tools/examples/parameter_study/diffusion_vector.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
  ny = 10
[]
[Variables/T]
  initial_condition = 300
[]
[Kernels]
  [time]
    type = ADTimeDerivative
    variable = T
  []
  [diff]
    type = ADMatDiffusion
    variable = T
    diffusivity = diffusivity
  []
  [source]
    type = ADBodyForce
    variable = T
    value = 100
    function = 1
  []
[]
[BCs]
  [left]
    type = ADDirichletBC
    variable = T
    boundary = left
    value = 300
  []
  [right]
    type = ADNeumannBC
    variable = T
    boundary = right
    value = -100
  []
[]
[Materials/constant]
  type = ADGenericConstantMaterial
  prop_names = 'diffusivity'
  prop_values = 1
[]
[Executioner]
  type = Transient
  num_steps = 4
  dt = 0.25
[]
[Postprocessors]
  [T_avg]
    type = ElementAverageValue
    variable = T
    execute_on = 'initial timestep_end'
  []
  [q_left]
    type = ADSideDiffusiveFluxAverage
    variable = T
    boundary = left
    diffusivity = diffusivity
    execute_on = 'initial timestep_end'
  []
[]
[Reporters]
  [acc]
    type = AccumulateReporter
    reporters = 'T_avg/value q_left/value'
  []
[]
[Controls/stochastic]
  type = SamplerReceiver
[]
[Outputs]
[]
(modules/heat_transfer/test/tests/kokkos/kokkos_convective_heat_flux.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 10
  ny = 10
[]
[Variables]
  [temp]
    initial_condition = 100.0
  []
[]
[KokkosKernels]
  [heat_conduction]
    type = KokkosHeatConduction
    variable = temp
  []
[]
[KokkosBCs]
  [left]
    type = KokkosDirichletBC
    variable = temp
    boundary = left
    value = 100.0
  []
  [right]
    type = KokkosConvectiveHeatFluxBC
    variable = temp
    boundary = right
    T_infinity = 200.0
    heat_transfer_coefficient = 10
  []
[]
[KokkosMaterials]
  [conduction]
    type = KokkosHeatConductionMaterial
    thermal_conductivity = 10
  []
  [bc]
    type = KokkosGenericConstantMaterial
    prop_names = 'Tinf htc'
    prop_values = '200 10'
  []
[]
[Postprocessors]
  [right_flux]
    type = SideDiffusiveFluxAverage
    variable = temp
    boundary = right
    diffusivity = 10
  []
[]
[Executioner]
  type = Steady
  nl_rel_tol = 1e-12
[]
[Outputs]
  exodus = true
[]
(modules/heat_transfer/test/tests/convective_heat_flux/t_inf.i)
[Mesh]
  type = GeneratedMesh
  dim = 3
  nx = 10
[]
[Variables]
  [./temp]
    initial_condition = 200.0
  [../]
[]
[Kernels]
  [./heat_dt]
    type = TimeDerivative
    variable = temp
  [../]
  [./heat_conduction]
    type = HeatConduction
    variable = temp
    diffusion_coefficient = 1
  [../]
  [./heat]
    type = BodyForce
    variable = temp
    value = 0
  [../]
[]
[BCs]
  [./right]
    type = ConvectiveHeatFluxBC
    variable = temp
    boundary = 'right'
    T_infinity = 100.0
    heat_transfer_coefficient = 1
    heat_transfer_coefficient_dT = 0
  [../]
[]
[Postprocessors]
  [./left_temp]
    type = SideAverageValue
    variable = temp
    boundary = left
    execute_on = 'TIMESTEP_END initial'
  [../]
  [./right_temp]
    type = SideAverageValue
    variable = temp
    boundary = right
  [../]
  [./right_flux]
    type = SideDiffusiveFluxAverage
    variable = temp
    boundary = right
    diffusivity = 1
  [../]
[]
[Executioner]
  type = Transient
  num_steps = 10
  dt = 1e1
  nl_abs_tol = 1e-12
[]
[Outputs]
  # csv = true
[]