Step 1 - Thermal Contact with Node on Face

#
# Three shell thermo mechanical contact
# https://mooseframework.inl.gov/modules/combined/tutorials/introduction/step02.html
#

[GlobalParams<<<{"href": "../../../../syntax/GlobalParams/index.html"}>>>]
  displacements = 'disp_x disp_y'
  block = '0 1 2'
[]

[Problem<<<{"href": "../../../../syntax/Problem/index.html"}>>>]
  # switch to an axisymmetric coordinate system
  coord_type = RZ
[]

[Mesh<<<{"href": "../../../../syntax/Mesh/index.html"}>>>]
  # inner cylinder
  [inner]
    type = GeneratedMeshGenerator<<<{"description": "Create a line, square, or cube mesh with uniformly spaced or biased elements.", "href": "../../../../source/meshgenerators/GeneratedMeshGenerator.html"}>>>
    dim<<<{"description": "The dimension of the mesh to be generated"}>>> = 2
    nx<<<{"description": "Number of elements in the X direction"}>>> = 10
    ny<<<{"description": "Number of elements in the Y direction"}>>> = 40
    xmax<<<{"description": "Upper X Coordinate of the generated mesh"}>>> = 1
    ymin<<<{"description": "Lower Y Coordinate of the generated mesh"}>>> = -1.75
    ymax<<<{"description": "Upper Y Coordinate of the generated mesh"}>>> = 1.75
    boundary_name_prefix<<<{"description": "If provided, prefix the built in boundary names with this string"}>>> = inner
  []

  # middle shell with subdomain ID 1
  [middle_elements]
    type = GeneratedMeshGenerator<<<{"description": "Create a line, square, or cube mesh with uniformly spaced or biased elements.", "href": "../../../../source/meshgenerators/GeneratedMeshGenerator.html"}>>>
    dim<<<{"description": "The dimension of the mesh to be generated"}>>> = 2
    nx<<<{"description": "Number of elements in the X direction"}>>> = 10
    ny<<<{"description": "Number of elements in the Y direction"}>>> = 40
    xmin<<<{"description": "Lower X Coordinate of the generated mesh"}>>> = 1.1
    xmax<<<{"description": "Upper X Coordinate of the generated mesh"}>>> = 2.1
    ymin<<<{"description": "Lower Y Coordinate of the generated mesh"}>>> = -2.5
    ymax<<<{"description": "Upper Y Coordinate of the generated mesh"}>>> = 2.5
    boundary_name_prefix<<<{"description": "If provided, prefix the built in boundary names with this string"}>>> = middle
    boundary_id_offset<<<{"description": "This offset is added to the generated boundary IDs"}>>> = 4
  []
  [middle]
    type = SubdomainIDGenerator<<<{"description": "Sets all the elements of the input mesh to a unique subdomain ID.", "href": "../../../../source/meshgenerators/SubdomainIDGenerator.html"}>>>
    input<<<{"description": "The mesh we want to modify"}>>> = middle_elements
    subdomain_id<<<{"description": "New subdomain IDs of all elements"}>>> = 1
  []

  # outer shell with subdomain ID 2
  [outer_elements]
    type = GeneratedMeshGenerator<<<{"description": "Create a line, square, or cube mesh with uniformly spaced or biased elements.", "href": "../../../../source/meshgenerators/GeneratedMeshGenerator.html"}>>>
    dim<<<{"description": "The dimension of the mesh to be generated"}>>> = 2
    nx<<<{"description": "Number of elements in the X direction"}>>> = 10
    ny<<<{"description": "Number of elements in the Y direction"}>>> = 48
    xmin<<<{"description": "Lower X Coordinate of the generated mesh"}>>> = 2.2
    xmax<<<{"description": "Upper X Coordinate of the generated mesh"}>>> = 3.2
    ymin<<<{"description": "Lower Y Coordinate of the generated mesh"}>>> = -3
    ymax<<<{"description": "Upper Y Coordinate of the generated mesh"}>>> = 3
    boundary_name_prefix<<<{"description": "If provided, prefix the built in boundary names with this string"}>>> = outer
    boundary_id_offset<<<{"description": "This offset is added to the generated boundary IDs"}>>> = 8
  []
  [outer]
    type = SubdomainIDGenerator<<<{"description": "Sets all the elements of the input mesh to a unique subdomain ID.", "href": "../../../../source/meshgenerators/SubdomainIDGenerator.html"}>>>
    input<<<{"description": "The mesh we want to modify"}>>> = outer_elements
    subdomain_id<<<{"description": "New subdomain IDs of all elements"}>>> = 2
  []

  [collect_meshes]
    type = MeshCollectionGenerator<<<{"description": "Collects multiple meshes into a single (unconnected) mesh.", "href": "../../../../source/meshgenerators/MeshCollectionGenerator.html"}>>>
    inputs<<<{"description": "The input MeshGenerators."}>>> = 'inner middle outer'
  []

  # add set of 3 nodes to remove rigid body modes for y-translation in each block
  [pin]
    type = ExtraNodesetGenerator<<<{"description": "Creates a new node set and a new boundary made with the nodes the user provides.", "href": "../../../../source/meshgenerators/ExtraNodesetGenerator.html"}>>>
    input<<<{"description": "The mesh we want to modify"}>>> = collect_meshes
    new_boundary<<<{"description": "The names of the boundaries to create"}>>> = pin
    coord<<<{"description": "The nodes with coordinates you want to be in the nodeset. Separate multple coords with ';' (Either this parameter or \"nodes\" must be supplied)."}>>> = '0 0 0; 1.6 0 0; 2.7 0 0'
  []

  patch_update_strategy = iteration
[]

[Variables<<<{"href": "../../../../syntax/Variables/index.html"}>>>]
  # temperature field variable (first order Lagrange by default)
  [T]
  []
  # temperature lagrange multipliers
  [Tlm1]
    block = 'inner_gap_secondary_subdomain'
  []
  [Tlm2]
    block = 'outer_gap_secondary_subdomain'
  []
[]

[Kernels<<<{"href": "../../../../syntax/Kernels/index.html"}>>>]
  [heat_conduction]
    type = HeatConduction<<<{"description": "Diffusive heat conduction term $-\\nabla\\cdot(k\\nabla T)$ of the thermal energy conservation equation", "href": "../../../../source/kernels/HeatConduction.html"}>>>
    variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = T
  []
  [dTdt]
    type = HeatConductionTimeDerivative<<<{"description": "Time derivative term $\\rho c_p \\frac{\\partial T}{\\partial t}$ of the thermal energy conservation equation.", "href": "../../../../source/kernels/HeatConductionTimeDerivative.html"}>>>
    variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = T
  []
[]

[Physics<<<{"href": "../../../../syntax/Physics/index.html"}>>>/SolidMechanics<<<{"href": "../../../../syntax/Physics/SolidMechanics/index.html"}>>>/QuasiStatic<<<{"href": "../../../../syntax/Physics/SolidMechanics/QuasiStatic/index.html"}>>>]
  [all]
    add_variables<<<{"description": "Add the displacement variables"}>>> = true
    strain<<<{"description": "Strain formulation"}>>> = FINITE
    eigenstrain_names<<<{"description": "List of eigenstrains to be applied in this strain calculation"}>>> = thermal
    generate_output<<<{"description": "Add scalar quantity output for stress and/or strain"}>>> = 'vonmises_stress stress_xx strain_xx stress_yy strain_yy'
    volumetric_locking_correction<<<{"description": "Flag to correct volumetric locking"}>>> = true
    temperature<<<{"description": "The temperature"}>>> = T
  []
[]

[Contact<<<{"href": "../../../../syntax/Contact/index.html"}>>>]
  [inner_gap]
    primary<<<{"description": "The list of boundary IDs referring to primary sidesets"}>>> = middle_left
    secondary<<<{"description": "The list of boundary IDs referring to secondary sidesets"}>>> = inner_right
    model<<<{"description": "The contact model to use"}>>> = frictionless
    formulation<<<{"description": "The contact formulation"}>>> = mortar
    c_normal<<<{"description": "Parameter for balancing the size of the gap and contact pressure for a mortar formulation. This purely numerical parameter affects convergence behavior and, in general, should be larger for stiffer materials. It is recommended that the user tries out various orders of magnitude for this parameter if the default value generates poor contact convergence."}>>> = 1e+0
  []
  [outer_gap]
    primary<<<{"description": "The list of boundary IDs referring to primary sidesets"}>>> = outer_left
    secondary<<<{"description": "The list of boundary IDs referring to secondary sidesets"}>>> = middle_right
    model<<<{"description": "The contact model to use"}>>> = frictionless
    formulation<<<{"description": "The contact formulation"}>>> = mortar
    c_normal<<<{"description": "Parameter for balancing the size of the gap and contact pressure for a mortar formulation. This purely numerical parameter affects convergence behavior and, in general, should be larger for stiffer materials. It is recommended that the user tries out various orders of magnitude for this parameter if the default value generates poor contact convergence."}>>> = 1e+0
  []
[]

[Constraints<<<{"href": "../../../../syntax/Constraints/index.html"}>>>]
  # thermal contact constraint
  [Tlm1]
    type = GapConductanceConstraint<<<{"description": "Computes the residual and Jacobian contributions for the 'Lagrange Multiplier' implementation of the thermal contact problem. For more information, see the detailed description here: http://tinyurl.com/gmmhbe9", "href": "../../../../source/constraints/GapConductanceConstraint.html"}>>>
    variable<<<{"description": "The name of the lagrange multiplier variable that this constraint is applied to. This parameter may not be supplied in the case of using penalty methods for example"}>>> = Tlm1
    secondary_variable<<<{"description": "Primal variable on secondary surface."}>>> = T
    use_displaced_mesh<<<{"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."}>>> = true
    k<<<{"description": "Gap conductance"}>>> = 1e-1
    primary_boundary<<<{"description": "The name of the primary boundary sideset."}>>> = middle_left
    primary_subdomain<<<{"description": "The name of the primary subdomain."}>>> = inner_gap_secondary_subdomain
    secondary_boundary<<<{"description": "The name of the secondary boundary sideset."}>>> = inner_right
    secondary_subdomain<<<{"description": "The name of the secondary subdomain."}>>> = inner_gap_primary_subdomain
  []
  [Tlm2]
    type = GapConductanceConstraint<<<{"description": "Computes the residual and Jacobian contributions for the 'Lagrange Multiplier' implementation of the thermal contact problem. For more information, see the detailed description here: http://tinyurl.com/gmmhbe9", "href": "../../../../source/constraints/GapConductanceConstraint.html"}>>>
    variable<<<{"description": "The name of the lagrange multiplier variable that this constraint is applied to. This parameter may not be supplied in the case of using penalty methods for example"}>>> = Tlm2
    secondary_variable<<<{"description": "Primal variable on secondary surface."}>>> = T
    use_displaced_mesh<<<{"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."}>>> = true
    k<<<{"description": "Gap conductance"}>>> = 1e-1
    primary_boundary<<<{"description": "The name of the primary boundary sideset."}>>> = outer_left
    primary_subdomain<<<{"description": "The name of the primary subdomain."}>>> = outer_gap_secondary_subdomain
    secondary_boundary<<<{"description": "The name of the secondary boundary sideset."}>>> = middle_right
    secondary_subdomain<<<{"description": "The name of the secondary subdomain."}>>> = outer_gap_primary_subdomain
  []
[]

[BCs<<<{"href": "../../../../syntax/BCs/index.html"}>>>]
  [center_axis_fix]
    type = DirichletBC<<<{"description": "Imposes the essential boundary condition $u=g$, where $g$ is a constant, controllable value.", "href": "../../../../source/bcs/DirichletBC.html"}>>>
    variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = disp_x
    boundary<<<{"description": "The list of boundary IDs from the mesh where this object applies"}>>> = 'inner_left'
    value<<<{"description": "Value of the BC"}>>> = 0
  []
  [y_translation_fix]
    type = DirichletBC<<<{"description": "Imposes the essential boundary condition $u=g$, where $g$ is a constant, controllable value.", "href": "../../../../source/bcs/DirichletBC.html"}>>>
    variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = disp_y
    boundary<<<{"description": "The list of boundary IDs from the mesh where this object applies"}>>> = 'pin'
    value<<<{"description": "Value of the BC"}>>> = 0
  []
  [heat_center]
    type = FunctionDirichletBC<<<{"description": "Imposes the essential boundary condition $u=g(t,\\vec{x})$, where $g$ is a (possibly) time and space-dependent MOOSE Function.", "href": "../../../../source/bcs/FunctionDirichletBC.html"}>>>
    variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = T
    boundary<<<{"description": "The list of boundary IDs from the mesh where this object applies"}>>> = 'inner_left'
    function<<<{"description": "The forcing function."}>>> = t*40
  []
  [cool_right]
    type = DirichletBC<<<{"description": "Imposes the essential boundary condition $u=g$, where $g$ is a constant, controllable value.", "href": "../../../../source/bcs/DirichletBC.html"}>>>
    variable<<<{"description": "The name of the variable that this residual object operates on"}>>> = T
    boundary<<<{"description": "The list of boundary IDs from the mesh where this object applies"}>>> = 'outer_right'
    value<<<{"description": "Value of the BC"}>>> = 0
  []
[]

[Materials<<<{"href": "../../../../syntax/Materials/index.html"}>>>]
  [eigen_strain_inner]
    type = ComputeThermalExpansionEigenstrain<<<{"description": "Computes eigenstrain due to thermal expansion with a constant coefficient", "href": "../../../../source/materials/ComputeThermalExpansionEigenstrain.html"}>>>
    eigenstrain_name<<<{"description": "Material property name for the eigenstrain tensor computed by this model. IMPORTANT: The name of this property must also be provided to the strain calculator."}>>> = thermal
    temperature<<<{"description": "Coupled temperature"}>>> = T
    thermal_expansion_coeff<<<{"description": "Thermal expansion coefficient"}>>> = 1e-3
    stress_free_temperature<<<{"description": "Reference temperature at which there is no thermal expansion for thermal eigenstrain calculation"}>>> = 0
    block<<<{"description": "The list of blocks (ids or names) that this object will be applied"}>>> = 0
  []
  [eigen_strain_middle]
    type = ComputeThermalExpansionEigenstrain<<<{"description": "Computes eigenstrain due to thermal expansion with a constant coefficient", "href": "../../../../source/materials/ComputeThermalExpansionEigenstrain.html"}>>>
    eigenstrain_name<<<{"description": "Material property name for the eigenstrain tensor computed by this model. IMPORTANT: The name of this property must also be provided to the strain calculator."}>>> = thermal
    temperature<<<{"description": "Coupled temperature"}>>> = T
    thermal_expansion_coeff<<<{"description": "Thermal expansion coefficient"}>>> = 2e-4
    stress_free_temperature<<<{"description": "Reference temperature at which there is no thermal expansion for thermal eigenstrain calculation"}>>> = 0
    block<<<{"description": "The list of blocks (ids or names) that this object will be applied"}>>> = 1
  []
  [eigen_strain_outer]
    type = ComputeThermalExpansionEigenstrain<<<{"description": "Computes eigenstrain due to thermal expansion with a constant coefficient", "href": "../../../../source/materials/ComputeThermalExpansionEigenstrain.html"}>>>
    eigenstrain_name<<<{"description": "Material property name for the eigenstrain tensor computed by this model. IMPORTANT: The name of this property must also be provided to the strain calculator."}>>> = thermal
    temperature<<<{"description": "Coupled temperature"}>>> = T
    thermal_expansion_coeff<<<{"description": "Thermal expansion coefficient"}>>> = 1e-5
    stress_free_temperature<<<{"description": "Reference temperature at which there is no thermal expansion for thermal eigenstrain calculation"}>>> = 0
    block<<<{"description": "The list of blocks (ids or names) that this object will be applied"}>>> = 2
  []

  [elasticity]
    type = ComputeIsotropicElasticityTensor<<<{"description": "Compute a constant isotropic elasticity tensor.", "href": "../../../../source/materials/ComputeIsotropicElasticityTensor.html"}>>>
    youngs_modulus<<<{"description": "Young's modulus of the material."}>>> = 1
    poissons_ratio<<<{"description": "Poisson's ratio for the material."}>>> = 0.3
  []
  [stress]
    type = ComputeFiniteStrainElasticStress<<<{"description": "Compute stress using elasticity for finite strains", "href": "../../../../source/materials/ComputeFiniteStrainElasticStress.html"}>>>
  []

  # thermal properties
  [thermal_conductivity_0]
    type = HeatConductionMaterial<<<{"description": "General-purpose material model for heat conduction", "href": "../../../../source/materials/HeatConductionMaterial.html"}>>>
    thermal_conductivity<<<{"description": "The thermal conductivity value"}>>> = 50
    specific_heat<<<{"description": "The specific heat value"}>>> = 1
    block<<<{"description": "The list of blocks (ids or names) that this object will be applied"}>>> = 0
  []
  [thermal_conductivity_1]
    type = HeatConductionMaterial<<<{"description": "General-purpose material model for heat conduction", "href": "../../../../source/materials/HeatConductionMaterial.html"}>>>
    thermal_conductivity<<<{"description": "The thermal conductivity value"}>>> = 5
    specific_heat<<<{"description": "The specific heat value"}>>> = 1
    block<<<{"description": "The list of blocks (ids or names) that this object will be applied"}>>> = 1
  []
  [thermal_conductivity_2]
    type = HeatConductionMaterial<<<{"description": "General-purpose material model for heat conduction", "href": "../../../../source/materials/HeatConductionMaterial.html"}>>>
    thermal_conductivity<<<{"description": "The thermal conductivity value"}>>> = 1
    specific_heat<<<{"description": "The specific heat value"}>>> = 1
    block<<<{"description": "The list of blocks (ids or names) that this object will be applied"}>>> = 2
  []
  [density]
    type = Density<<<{"description": "Creates density material property. This class is deprecated, and its functionalityis replaced by StrainAdjustedDensity for cases when the density should be adjustedto account for material deformation. If it is not desired to adjust the density fordeformation, a variety of general-purpose Materials, such as GenericConstantMaterialor ParsedMaterial can be used to define the density.", "href": "../../../../source/materials/Density.html"}>>>
    density<<<{"description": "Density"}>>> = 1
  []
[]

[Preconditioning<<<{"href": "../../../../syntax/Preconditioning/index.html"}>>>]
  [smp]
    type = SMP<<<{"description": "Single matrix preconditioner (SMP) builds a preconditioner using user defined off-diagonal parts of the Jacobian.", "href": "../../../../source/preconditioners/SingleMatrixPreconditioner.html"}>>>
    full<<<{"description": "Set to true if you want the full set of couplings between variables simply for convenience so you don't have to set every off_diag_row and off_diag_column combination."}>>> = true
  []
[]

# [Debug]
#   show_var_residual_norms = true
# []

[Executioner<<<{"href": "../../../../syntax/Executioner/index.html"}>>>]
  type = Transient
  solve_type = PJFNK
  line_search = none
  petsc_options_iname = '-pc_type -pc_factor_shift_type'
  petsc_options_value = 'lu       nonzero              '
  snesmf_reuse_base = false
  end_time = 7
  dt = 0.05

  nl_rel_tol = 1e-08
  nl_abs_tol = 1e-50

  [Predictor<<<{"href": "../../../../syntax/Executioner/Predictor/index.html"}>>>]
    type = SimplePredictor
    scale = 0.5
  []
[]

[Outputs<<<{"href": "../../../../syntax/Outputs/index.html"}>>>]
  exodus<<<{"description": "Output the results using the default settings for Exodus output."}>>> = true
  print_linear_residuals<<<{"description": "Enable printing of linear residuals to the screen (Console)"}>>> = false
  perf_graph<<<{"description": "Enable printing of the performance graph to the screen (Console)"}>>> = true
[]
(modules/combined/tutorials/introduction/thermal_mechanical_contact/thermomech_cont_step02.i)

Input file