- 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
 
InternalVolume
Computes the volume of an enclosed area by performing an integral over a user-supplied boundary.
Description
InternalVolume computes the volume of an enclosed space. The complete boundary of the enclosed  space must be represented by the user specified side set. The volume of the domain is calculated as  the integral over the surface of the domain, where the domain surface is specified by the boundary.
If the given side set points outward, InternalVolume will report a negative volume.
As an example, consider where is a field, is the normal of the surface, is the volume of the domain, and is the surface of the domain.
For simplicity in this example, we choose
such that the integral becomes
The volume of the domain is the integral over the surface of the domain of the x position of the surface times the x-component of the normal of the surface.
Example Input Syntax
  [./internalVolume]
    type = InternalVolume
    boundary = 100
    addition = addition
    execute_on = 'initial timestep_end'
  [../](modules/combined/test/tests/internal_volume/hex8.i)Input Parameters
- addition0An additional volume to be included in the internal volume calculation. A time-dependent function is expected.
Default:0
C++ Type:FunctionName
Unit:(no unit assumed)
Controllable:No
Description:An additional volume to be included in the internal volume calculation. A time-dependent function is expected.
 - component0The component to use in the integration
Default:0
C++ Type:unsigned int
Controllable:No
Description:The component to use in the integration
 - scale_factor1A scale factor to be applied to the internal volume calculation
Default:1
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:A scale factor to be applied to the internal volume calculation
 
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_meshTrueWhether 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:True
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/combined/test/tests/ad_cavity_pressure/multiple_postprocessors.i)
 - (modules/combined/test/tests/cavity_pressure/initial_temperature.i)
 - (modules/combined/test/tests/cavity_pressure/additional_volume.i)
 - (modules/combined/test/tests/internal_volume/rz.i)
 - (modules/combined/test/tests/ad_cavity_pressure/additional_volume.i)
 - (modules/combined/test/tests/cavity_pressure/rz_abs_ref.i)
 - (modules/combined/test/tests/internal_volume/hex8.i)
 - (modules/combined/test/tests/ad_cavity_pressure/initial_temperature.i)
 - (modules/combined/test/tests/ad_cavity_pressure/negative_volume.i)
 - (modules/combined/test/tests/cavity_pressure/multiple_postprocessors.i)
 - (modules/combined/test/tests/ad_cavity_pressure/rz.i)
 - (modules/combined/test/tests/internal_volume/rz_quad8.i)
 - (modules/combined/test/tests/internal_volume/hex20.i)
 - (modules/combined/test/tests/cavity_pressure/3d.i)
 - (modules/combined/test/tests/cavity_pressure/rz.i)
 - (modules/combined/test/tests/internal_volume/rz_displaced.i)
 - (modules/combined/test/tests/internal_volume/rspherical.i)
 - (modules/combined/test/tests/cavity_pressure/negative_volume.i)
 - (modules/combined/test/tests/ad_cavity_pressure/3d.i)
 - (modules/combined/test/tests/internal_volume/rz_displaced_quad8.i)
 - (modules/combined/test/tests/internal_volume/rz_cone.i)
 
(modules/combined/test/tests/internal_volume/hex8.i)
#
# Internal Volume Test
#
# This test is designed to compute the internal volume of a space considering
#   an embedded volume inside.
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
#   Block 2 sits in the cavity and has a volume of 1.  Thus, the total volume
#   is 7.
#
# The internal volume is then adjusted by a piecewise linear time varying
# function.  Thus, the total volume is 7 plus the addition at the particular
# time.
#
#  Time |  Addition  | Total volume
#   0   |    0.0     |     7.0
#   1   |    3.0     |    10.0
#   2   |    7.0     |    14.0
#   3   |   -3.0     |     4.0
#
[GlobalParams]
  displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
  file = meshes/hex8.e
[]
[Functions]
  [./step]
    type = PiecewiseLinear
    x = '0. 1. 2. 3.'
    y = '0. 0. 1e-2 0.'
    scale_factor = 0.5
  [../]
  [./addition]
    type = PiecewiseLinear
    x = '0. 1. 2. 3.'
    y = '0. 3. 7. -3.'
  [../]
[]
[Variables]
  [./disp_x]
    order = FIRST
    family = LAGRANGE
  [../]
  [./disp_y]
    order = FIRST
    family = LAGRANGE
  [../]
  [./disp_z]
    order = FIRST
    family = LAGRANGE
  [../]
[]
[Physics/SolidMechanics/QuasiStatic]
  [./all]
    volumetric_locking_correction = true
    incremental = true
    strain = FINITE
  [../]
[]
[BCs]
  [./no_x]
    type = DirichletBC
    variable = disp_x
    boundary = 100
    value = 0.0
  [../]
  [./no_y]
    type = DirichletBC
    variable = disp_y
    boundary = 100
    value = 0.0
  [../]
  [./prescribed_z]
    type = FunctionDirichletBC
    variable = disp_z
    boundary = 100
    function = step
  [../]
[]
[Materials]
  [./elasticity_tensor]
    type = ComputeIsotropicElasticityTensor
    block = '1 2'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  [../]
  [./stress]
    type = ComputeFiniteStrainElasticStress
    block = '1 2'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  start_time = 0.0
  dt = 1.0
  end_time = 3.0
[]
[Postprocessors]
  [./internalVolume]
    type = InternalVolume
    boundary = 100
    addition = addition
    execute_on = 'initial timestep_end'
  [../]
  [./dispZ]
    type = ElementAverageValue
    block = '1 2'
    variable = disp_z
  [../]
[]
[Outputs]
  csv = true
[]
(modules/combined/test/tests/ad_cavity_pressure/multiple_postprocessors.i)
#
# Cavity Pressure Test (Volume input as a vector of postprocessors)
#
# This test is designed to compute an internal pressure based on
#   p = n * R * T / V
# where
#   p is the pressure
#   n is the amount of material in the volume (moles)
#   R is the universal gas constant
#   T is the temperature
#   V is the volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
#   Block 2 sits in the cavity and has a volume of 1.  Thus, the total
#   initial volume is 7.
# The test adjusts n, T, and V in the following way:
#   n => n0 + alpha * t
#   T => T0 + beta * t
#   V => V0 + gamma * t
# with
#   alpha = n0
#   beta = T0 / 2
#   gamma = - (0.003322259...) * V0
#   T0 = 240.54443866068704
#   V0 = 7
#   n0 = f(p0)
#   p0 = 100
#   R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
#        = 0.35
#
# In this test the internal volume is calculated as the sum of two Postprocessors
# internalVolumeInterior and internalVolumeExterior.  This sum equals the value
# reported by the internalVolume postprocessor.
#
# The parameters combined at t = 1 gives p = 301.
#
[GlobalParams]
  displacements = 'disp_x disp_y disp_z'
  volumetric_locking_correction = true
[]
[Mesh]
  file = 3d.e
[]
[Functions]
  [displ_positive]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 0.0029069767441859684'
  []
  [displ_negative]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 -0.0029069767441859684'
  []
  [temp1]
    type = PiecewiseLinear
    x = '0 1'
    y = '1 1.5'
    scale_factor = 240.54443866068704
  []
  [material_input_function]
    type = PiecewiseLinear
    x = '0    1'
    y = '0 0.35'
  []
[]
[Variables]
  [disp_x]
  []
  [disp_y]
  []
  [disp_z]
  []
  [temp]
    initial_condition = 240.54443866068704
  []
  [material_input]
  []
[]
[AuxVariables]
  [pressure_residual_x]
  []
  [pressure_residual_y]
  []
  [pressure_residual_z]
  []
  [stress_xx]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_xy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zx]
    order = CONSTANT
    family = MONOMIAL
  []
[]
[Kernels]
  [TensorMechanics]
    use_displaced_mesh = true
    use_automatic_differentiation = true
  []
  [heat]
    type = ADDiffusion
    variable = temp
    use_displaced_mesh = true
  []
  [material_input_dummy]
    type = ADDiffusion
    variable = material_input
    use_displaced_mesh = true
  []
[]
[AuxKernels]
  [stress_xx]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 0
    index_j = 0
    variable = stress_xx
  []
  [stress_yy]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 1
    index_j = 1
    variable = stress_yy
  []
  [stress_zz]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 2
    index_j = 2
    variable = stress_zz
  []
  [stress_xy]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 0
    index_j = 1
    variable = stress_xy
  []
  [stress_yz]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 1
    index_j = 2
    variable = stress_yz
  []
  [stress_zx]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 2
    index_j = 0
    variable = stress_zx
  []
[]
[BCs]
  [no_x_exterior]
    type = DirichletBC
    variable = disp_x
    boundary = '7 8'
    value = 0.0
  []
  [no_y_exterior]
    type = DirichletBC
    variable = disp_y
    boundary = '9 10'
    value = 0.0
  []
  [no_z_exterior]
    type = DirichletBC
    variable = disp_z
    boundary = '11 12'
    value = 0.0
  []
  [prescribed_left]
    type = ADFunctionDirichletBC
    variable = disp_x
    boundary = 13
    function = displ_positive
  []
  [prescribed_right]
    type = ADFunctionDirichletBC
    variable = disp_x
    boundary = 14
    function = displ_negative
  []
  [no_y]
    type = DirichletBC
    variable = disp_y
    boundary = '15 16'
    value = 0.0
  []
  [no_z]
    type = DirichletBC
    variable = disp_z
    boundary = '17 18'
    value = 0.0
  []
  [no_x_interior]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [no_y_interior]
    type = DirichletBC
    variable = disp_y
    boundary = '3 4'
    value = 0.0
  []
  [no_z_interior]
    type = DirichletBC
    variable = disp_z
    boundary = '5 6'
    value = 0.0
  []
  [temperatureInterior]
    type = ADFunctionDirichletBC
    boundary = 100
    function = temp1
    variable = temp
  []
  [MaterialInput]
    type = ADFunctionDirichletBC
    boundary = '100 13 14 15 16'
    function = material_input_function
    variable = material_input
  []
  [CavityPressure]
    [1]
      boundary = 100
      initial_pressure = 100
      material_input = materialInput
      R = 8.314472
      temperature = aveTempInterior
      volume = 'internalVolumeInterior internalVolumeExterior'
      startup_time = 0.5
      output = ppress
      save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
      use_automatic_differentiation = true
    []
  []
[]
[Materials]
  [elast_tensor1]
    type = ADComputeIsotropicElasticityTensor
    youngs_modulus = 1e1
    poissons_ratio = 0
    block = 1
  []
  [strain1]
    type = ADComputeFiniteStrain
    block = 1
  []
  [stress1]
    type = ADComputeFiniteStrainElasticStress
    block = 1
  []
  [elast_tensor2]
    type = ADComputeIsotropicElasticityTensor
    youngs_modulus = 1e6
    poissons_ratio = 0
    block = 2
  []
  [strain2]
    type = ADComputeFiniteStrain
    block = 2
  []
  [stress2]
    type = ADComputeFiniteStrainElasticStress
    block = 2
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -sub_pc_type'
  petsc_options_value = 'asm       lu'
  nl_rel_tol = 1e-12
  l_tol = 1e-12
  l_max_its = 20
  dt = 0.5
  end_time = 1.0
  use_pre_SMO_residual = true
[]
[Postprocessors]
  [internalVolume]
    type = InternalVolume
    boundary = 100
    execute_on = 'initial linear'
  []
  [aveTempInterior]
    type = SideAverageValue
    boundary = 100
    variable = temp
    execute_on = 'initial linear'
  []
  [internalVolumeInterior]
    type = InternalVolume
    boundary = '1 2 3 4 5 6'
    execute_on = 'initial linear'
  []
  [internalVolumeExterior]
    type = InternalVolume
    boundary = '13 14 15 16 17 18'
    execute_on = 'initial linear'
  []
  [materialInput]
    type = SideAverageValue
    boundary = '7 8 9 10 11 12'
    variable = material_input
    execute_on = linear
  []
[]
[Outputs]
  exodus = true
[]
(modules/combined/test/tests/cavity_pressure/initial_temperature.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
#   p = n * R * T / V
# where
#   p is the pressure
#   n is the amount of material in the volume (moles)
#   R is the universal gas constant
#   T is the temperature
#   V is the volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
#   Block 2 sits in the cavity and has a volume of 1.  Thus, the total
#   initial volume is 7.
# The test adjusts n, T, and V in the following way:
#   n => n0 + alpha * t
#   T => T0 + beta * t
#   V => V0 + gamma * t
# with
#   alpha = n0
#   beta = T0 / 2
#   gamma = -(0.003322259...) * V0
#   T0 = 240.54443866068704
#   V0 = 7
#   n0 = f(p0)
#   p0 = 100
#   R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
#        = 0.35
#
# The parameters combined at t = 1 gives p = 301.
#
# This test sets the initial temperature to 500, but the CavityPressure
#   is told that that initial temperature is T0.  Thus, the final solution
#   is unchanged.
[GlobalParams]
  displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
  file = 3d.e
[]
[GlobalParams]
  volumetric_locking_correction = true
[]
[Functions]
  [displ_positive]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 0.0029069767441859684'
  []
  [displ_negative]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 -0.0029069767441859684'
  []
  [temp1]
    type = PiecewiseLinear
    x = '0 1'
    y = '1 1.5'
    scale_factor = 240.54443866068704
  []
  [material_input_function]
    type = PiecewiseLinear
    x = '0    1'
    y = '0 0.35'
  []
[]
[Variables]
  [disp_x]
  []
  [disp_y]
  []
  [disp_z]
  []
  [temp]
    initial_condition = 500
  []
  [material_input]
  []
[]
[AuxVariables]
  [pressure_residual_x]
  []
  [pressure_residual_y]
  []
  [pressure_residual_z]
  []
  [stress_xx]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_xy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zx]
    order = CONSTANT
    family = MONOMIAL
  []
[]
[Kernels]
  [TensorMechanics]
    use_displaced_mesh = true
  []
  [heat]
    type = Diffusion
    variable = temp
    use_displaced_mesh = true
  []
  [material_input_dummy]
    type = Diffusion
    variable = material_input
    use_displaced_mesh = true
  []
[]
[AuxKernels]
  [stress_xx]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 0
    index_j = 0
    variable = stress_xx
  []
  [stress_yy]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 1
    index_j = 1
    variable = stress_yy
  []
  [stress_zz]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 2
    index_j = 2
    variable = stress_zz
  []
  [stress_xy]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 0
    index_j = 1
    variable = stress_xy
  []
  [stress_yz]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 1
    index_j = 2
    variable = stress_yz
  []
  [stress_zx]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 2
    index_j = 0
    variable = stress_zx
  []
[]
[BCs]
  [no_x_exterior]
    type = DirichletBC
    variable = disp_x
    boundary = '7 8'
    value = 0.0
  []
  [no_y_exterior]
    type = DirichletBC
    variable = disp_y
    boundary = '9 10'
    value = 0.0
  []
  [no_z_exterior]
    type = DirichletBC
    variable = disp_z
    boundary = '11 12'
    value = 0.0
  []
  [prescribed_left]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 13
    function = displ_positive
  []
  [prescribed_right]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 14
    function = displ_negative
  []
  [no_y]
    type = DirichletBC
    variable = disp_y
    boundary = '15 16'
    value = 0.0
  []
  [no_z]
    type = DirichletBC
    variable = disp_z
    boundary = '17 18'
    value = 0.0
  []
  [no_x_interior]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [no_y_interior]
    type = DirichletBC
    variable = disp_y
    boundary = '3 4'
    value = 0.0
  []
  [no_z_interior]
    type = DirichletBC
    variable = disp_z
    boundary = '5 6'
    value = 0.0
  []
  [temperatureInterior]
    type = FunctionDirichletBC
    boundary = 100
    function = temp1
    variable = temp
  []
  [MaterialInput]
    type = FunctionDirichletBC
    boundary = '100 13 14 15 16'
    function = material_input_function
    variable = material_input
  []
  [CavityPressure]
    [1]
      boundary = 100
      initial_pressure = 100
      material_input = materialInput
      R = 8.314472
      temperature = aveTempInterior
      initial_temperature = 240.54443866068704
      volume = internalVolume
      startup_time = 0.5
      output = ppress
      save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
    []
  []
[]
[Materials]
  [elast_tensor1]
    type = ComputeElasticityTensor
    C_ijkl = '0 5'
    fill_method = symmetric_isotropic
    block = 1
  []
  [strain1]
    type = ComputeFiniteStrain
    block = 1
  []
  [stress1]
    type = ComputeFiniteStrainElasticStress
    block = 1
  []
  [elast_tensor2]
    type = ComputeElasticityTensor
    C_ijkl = '0 5'
    fill_method = symmetric_isotropic
    block = 2
  []
  [strain2]
    type = ComputeFiniteStrain
    block = 2
  []
  [stress2]
    type = ComputeFiniteStrainElasticStress
    block = 2
  []
[]
[Executioner]
  type = Transient
  petsc_options_iname = '-pc_type -sub_pc_type'
  petsc_options_value = 'asm       lu'
  nl_rel_tol = 1e-12
  l_tol = 1e-12
  l_max_its = 20
  dt = 0.5
  end_time = 1.0
  use_pre_SMO_residual = true
[]
[Postprocessors]
  [internalVolume]
    type = InternalVolume
    boundary = 100
    execute_on = 'initial linear'
  []
  [aveTempInterior]
    type = SideAverageValue
    boundary = 100
    variable = temp
    execute_on = 'initial linear'
  []
  [materialInput]
    type = SideAverageValue
    boundary = '7 8 9 10 11 12'
    variable = material_input
    execute_on = linear
  []
[]
[Outputs]
  exodus = true
[]
(modules/combined/test/tests/cavity_pressure/additional_volume.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
# p = n * R * / (V_cavity / T_cavity + V_add / T_add)
# where
#  p is the pressure
#  n is the amount of material in the volume (moles)
#  R is the universal gas constant
#  T_cavity is the temperature in the cavity
#  T_add is the temperature of the additional volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
#   Block 2 sits in the cavity and has a volume of 1.  Thus, the total
#   initial volume is 7. An additional volume of 2 is added.
#
# The test adjusts n, T, and V in the following way:
#   n => n0 + alpha * t
#   T => T0 + beta * t
#   V => V_cavity0 + gamma * t + V_add
# with
#   alpha = n0
#   beta = T0 / 2
#   gamma = -(0.003322259...) * V0
#   T0 = 240.54443866068704
#   V_cavity0 = 7
#   V_add = 2
#   T_add = 100
#   n0 = f(p0)
#   p0 = 100
#   R = 8.314472 J * K^(-1) * mol^(-1)
#
#  An additional volume of 2 with a temperature of 100.0 is included.
#
# So, n0 = p0 * (V_cavity / T_cavity + V_add / T_add) / R
#        = 100 * (7 / 240.544439 + 2 / 100) / 8.314472
#        = 0.59054
#
# The parameters combined at t = 1 gives p = 249.647.
#
# This test sets the initial temperature to 500, but the CavityPressure
#   is told that that initial temperature is T0.  Thus, the final solution
#   is unchanged.
[GlobalParams]
  displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
  file = 3d.e
[]
[GlobalParams]
  volumetric_locking_correction = true
[]
[Functions]
  [displ_positive]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 0.0029069767441859684'
  []
  [displ_negative]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 -0.0029069767441859684'
  []
  [temp1]
    type = PiecewiseLinear
    x = '0 1'
    y = '1 1.5'
    scale_factor = 240.54443866068704
  []
  [material_input_function]
    type = PiecewiseLinear
    x = '0    1'
    y = '0 0.59054'
  []
  [additional_volume]
    type = ConstantFunction
    value = 2
  []
  [temperature_of_additional_volume]
    type = ConstantFunction
    value = 100
  []
[]
[Variables]
  [disp_x]
  []
  [disp_y]
  []
  [disp_z]
  []
  [temp]
    initial_condition = 500
  []
  [material_input]
  []
[]
[AuxVariables]
  [pressure_residual_x]
  []
  [pressure_residual_y]
  []
  [pressure_residual_z]
  []
  [stress_xx]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_xy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zx]
    order = CONSTANT
    family = MONOMIAL
  []
[]
[Kernels]
  [TensorMechanics]
    use_displaced_mesh = true
  []
  [heat]
    type = Diffusion
    variable = temp
    use_displaced_mesh = true
  []
  [material_input_dummy]
    type = Diffusion
    variable = material_input
    use_displaced_mesh = true
  []
[]
[AuxKernels]
  [stress_xx]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 0
    index_j = 0
    variable = stress_xx
  []
  [stress_yy]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 1
    index_j = 1
    variable = stress_yy
  []
  [stress_zz]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 2
    index_j = 2
    variable = stress_zz
  []
  [stress_xy]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 0
    index_j = 1
    variable = stress_xy
  []
  [stress_yz]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 1
    index_j = 2
    variable = stress_yz
  []
  [stress_zx]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 2
    index_j = 0
    variable = stress_zx
  []
[]
[BCs]
  [no_x_exterior]
    type = DirichletBC
    variable = disp_x
    boundary = '7 8'
    value = 0.0
  []
  [no_y_exterior]
    type = DirichletBC
    variable = disp_y
    boundary = '9 10'
    value = 0.0
  []
  [no_z_exterior]
    type = DirichletBC
    variable = disp_z
    boundary = '11 12'
    value = 0.0
  []
  [prescribed_left]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 13
    function = displ_positive
  []
  [prescribed_right]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 14
    function = displ_negative
  []
  [no_y]
    type = DirichletBC
    variable = disp_y
    boundary = '15 16'
    value = 0.0
  []
  [no_z]
    type = DirichletBC
    variable = disp_z
    boundary = '17 18'
    value = 0.0
  []
  [no_x_interior]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [no_y_interior]
    type = DirichletBC
    variable = disp_y
    boundary = '3 4'
    value = 0.0
  []
  [no_z_interior]
    type = DirichletBC
    variable = disp_z
    boundary = '5 6'
    value = 0.0
  []
  [temperatureInterior]
    type = FunctionDirichletBC
    boundary = 100
    function = temp1
    variable = temp
  []
  [MaterialInput]
    type = FunctionDirichletBC
    boundary = '100 13 14 15 16'
    function = material_input_function
    variable = material_input
  []
  [CavityPressure]
    [1]
      boundary = 100
      initial_pressure = 100
      material_input = materialInput
      R = 8.314472
      temperature = aveTempInterior
      initial_temperature = 240.54443866068704
      volume = internalVolume
      startup_time = 0.5
      output = ppress
      save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
      additional_volumes = volume1
      temperature_of_additional_volumes = temperature1
    []
  []
[]
[Materials]
  [elast_tensor1]
    type = ComputeElasticityTensor
    C_ijkl = '0 5'
    fill_method = symmetric_isotropic
    block = 1
  []
  [strain1]
    type = ComputeFiniteStrain
    block = 1
  []
  [stress1]
    type = ComputeFiniteStrainElasticStress
    block = 1
  []
  [elast_tensor2]
    type = ComputeElasticityTensor
    C_ijkl = '0 5'
    fill_method = symmetric_isotropic
    block = 2
  []
  [strain2]
    type = ComputeFiniteStrain
    block = 2
  []
  [stress2]
    type = ComputeFiniteStrainElasticStress
    block = 2
  []
[]
[Executioner]
  type = Transient
  petsc_options_iname = '-pc_type -sub_pc_type'
  petsc_options_value = 'asm       lu'
  nl_rel_tol = 1e-12
  l_tol = 1e-12
  l_max_its = 20
  dt = 0.5
  end_time = 1.0
  snesmf_reuse_base = false
  use_pre_SMO_residual = true
[]
[Postprocessors]
  [internalVolume]
    type = InternalVolume
    boundary = 100
    execute_on = 'initial linear'
  []
  [aveTempInterior]
    type = SideAverageValue
    boundary = 100
    variable = temp
    execute_on = 'initial linear'
  []
  [materialInput]
    type = SideAverageValue
    boundary = '7 8 9 10 11 12'
    variable = material_input
    execute_on = linear
  []
  [volume1]
    type = FunctionValuePostprocessor
    function = additional_volume
    execute_on = 'initial linear'
  []
  [temperature1]
    type = FunctionValuePostprocessor
    function = temperature_of_additional_volume
    execute_on = 'initial linear'
  []
[]
[Outputs]
  exodus = true
[]
(modules/combined/test/tests/internal_volume/rz.i)
#
# Internal Volume Test
#
# This test is designed to compute the internal volume of a space considering
#   an embedded volume inside.
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
#   Block 2 sits in the cavity and has a volume of 1.  Thus, the total volume
#   is 7.
#
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Mesh]
  file = meshes/rz.e
  coord_type = RZ
[]
[Functions]
  [./pressure]
    type = PiecewiseLinear
    x = '0. 1.'
    y = '0. 1.'
    scale_factor = 1e4
  [../]
[]
[Variables]
  [./disp_x]
    order = FIRST
    family = LAGRANGE
  [../]
  [./disp_y]
    order = FIRST
    family = LAGRANGE
  [../]
[]
[Physics/SolidMechanics/QuasiStatic]
  [./all]
    volumetric_locking_correction = true
    incremental = true
    strain = FINITE
  [../]
[]
[BCs]
  [./no_x]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  [../]
  [./no_y]
    type = DirichletBC
    variable = disp_y
    boundary = '1 2'
    value = 0.0
  [../]
  [./Pressure]
    [./fred]
      boundary = 3
      function = pressure
    [../]
  [../]
[]
[Materials]
  [./elasticity_tensor]
    type = ComputeIsotropicElasticityTensor
    block = '1 2'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  [../]
  [./stress]
    type = ComputeFiniteStrainElasticStress
    block = '1 2'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  start_time = 0.0
  dt = 1.0
  end_time = 1.0
[]
[Postprocessors]
  [./internalVolume]
    type = InternalVolume
    boundary = 2
    execute_on = 'initial timestep_end'
  [../]
[]
[Outputs]
  csv = true
[]
(modules/combined/test/tests/ad_cavity_pressure/additional_volume.i)
#
# Cavity Pressure Test using using automatic differentiation
#
# This test is designed to compute an internal pressure based on
# p = n * R * / (V_cavity / T_cavity + V_add / T_add)
# where
#  p is the pressure
#  n is the amount of material in the volume (moles)
#  R is the universal gas constant
#  T_cavity is the temperature in the cavity
#  T_add is the temperature of the additional volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
#   Block 2 sits in the cavity and has a volume of 1.  Thus, the total
#   initial volume is 7. An additional volume of 2 is added.
#
# The test adjusts n, T, and V in the following way:
#   n => n0 + alpha * t
#   T => T0 + beta * t
#   V => V_cavity0 + gamma * t + V_add
# with
#   alpha = n0
#   beta = T0 / 2
#   gamma = -(0.003322259...) * V0
#   T0 = 240.54443866068704
#   V_cavity0 = 7
#   V_add = 2
#   T_add = 100
#   n0 = f(p0)
#   p0 = 100
#   R = 8.314472 J * K^(-1) * mol^(-1)
#
#  An additional volume of 2 with a temperature of 100.0 is included.
#
# So, n0 = p0 * (V_cavity / T_cavity + V_add / T_add) / R
#        = 100 * (7 / 240.544439 + 2 / 100) / 8.314472
#        = 0.59054
#
# The parameters combined at t = 1 gives p = 249.647.
#
# This test sets the initial temperature to 500, but the CavityPressure
#   is told that that initial temperature is T0.  Thus, the final solution
#   is unchanged.
[GlobalParams]
  displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
  file = 3d.e
[]
[GlobalParams]
  volumetric_locking_correction = true
[]
[Functions]
  [displ_positive]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 0.0029069767441859684'
  []
  [displ_negative]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 -0.0029069767441859684'
  []
  [temp1]
    type = PiecewiseLinear
    x = '0 1'
    y = '1 1.5'
    scale_factor = 240.54443866068704
  []
  [material_input_function]
    type = PiecewiseLinear
    x = '0    1'
    y = '0 0.59054'
  []
  [additional_volume]
    type = ConstantFunction
    value = 2
  []
  [temperature_of_additional_volume]
    type = ConstantFunction
    value = 100
  []
[]
[Variables]
  [disp_x]
  []
  [disp_y]
  []
  [disp_z]
  []
  [temp]
    initial_condition = 500
  []
  [material_input]
  []
[]
[AuxVariables]
  [pressure_residual_x]
  []
  [pressure_residual_y]
  []
  [pressure_residual_z]
  []
  [stress_xx]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_xy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zx]
    order = CONSTANT
    family = MONOMIAL
  []
[]
[Kernels]
  [TensorMechanics]
    use_displaced_mesh = true
    use_automatic_differentiation = true
  []
  [heat]
    type = ADDiffusion
    variable = temp
    use_displaced_mesh = true
  []
  [material_input_dummy]
    type = ADDiffusion
    variable = material_input
    use_displaced_mesh = true
  []
[]
[AuxKernels]
  [stress_xx]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 0
    index_j = 0
    variable = stress_xx
  []
  [stress_yy]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 1
    index_j = 1
    variable = stress_yy
  []
  [stress_zz]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 2
    index_j = 2
    variable = stress_zz
  []
  [stress_xy]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 0
    index_j = 1
    variable = stress_xy
  []
  [stress_yz]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 1
    index_j = 2
    variable = stress_yz
  []
  [stress_zx]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 2
    index_j = 0
    variable = stress_zx
  []
[]
[BCs]
  [no_x_exterior]
    type = DirichletBC
    variable = disp_x
    boundary = '7 8'
    value = 0.0
  []
  [no_y_exterior]
    type = DirichletBC
    variable = disp_y
    boundary = '9 10'
    value = 0.0
  []
  [no_z_exterior]
    type = DirichletBC
    variable = disp_z
    boundary = '11 12'
    value = 0.0
  []
  [prescribed_left]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 13
    function = displ_positive
  []
  [prescribed_right]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 14
    function = displ_negative
  []
  [no_y]
    type = DirichletBC
    variable = disp_y
    boundary = '15 16'
    value = 0.0
  []
  [no_z]
    type = DirichletBC
    variable = disp_z
    boundary = '17 18'
    value = 0.0
  []
  [no_x_interior]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [no_y_interior]
    type = DirichletBC
    variable = disp_y
    boundary = '3 4'
    value = 0.0
  []
  [no_z_interior]
    type = DirichletBC
    variable = disp_z
    boundary = '5 6'
    value = 0.0
  []
  [temperatureInterior]
    type = ADFunctionDirichletBC
    boundary = 100
    function = temp1
    variable = temp
  []
  [MaterialInput]
    type = ADFunctionDirichletBC
    boundary = '100 13 14 15 16'
    function = material_input_function
    variable = material_input
  []
  [CavityPressure]
    [1]
      boundary = 100
      initial_pressure = 100
      material_input = materialInput
      R = 8.314472
      temperature = aveTempInterior
      initial_temperature = 240.54443866068704
      volume = internalVolume
      startup_time = 0.5
      output = ppress
      save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
      additional_volumes = volume1
      temperature_of_additional_volumes = temperature1
      use_automatic_differentiation = true
    []
  []
[]
[Materials]
  [elast_tensor1]
    type = ADComputeElasticityTensor
    C_ijkl = '0 5'
    fill_method = symmetric_isotropic
    block = 1
  []
  [strain1]
    type = ADComputeFiniteStrain
    block = 1
  []
  [stress1]
    type = ADComputeFiniteStrainElasticStress
    block = 1
  []
  [elast_tensor2]
    type = ADComputeElasticityTensor
    C_ijkl = '0 5'
    fill_method = symmetric_isotropic
    block = 2
  []
  [strain2]
    type = ADComputeFiniteStrain
    block = 2
  []
  [stress2]
    type = ADComputeFiniteStrainElasticStress
    block = 2
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -sub_pc_type'
  petsc_options_value = 'asm       lu'
  nl_rel_tol = 1e-12
  l_tol = 1e-12
  l_max_its = 20
  dt = 0.5
  end_time = 1.0
  use_pre_SMO_residual = true
[]
[Postprocessors]
  [internalVolume]
    type = InternalVolume
    boundary = 100
    execute_on = 'initial linear'
  []
  [aveTempInterior]
    type = SideAverageValue
    boundary = 100
    variable = temp
    execute_on = 'initial linear'
  []
  [materialInput]
    type = SideAverageValue
    boundary = '7 8 9 10 11 12'
    variable = material_input
    execute_on = linear
  []
  [volume1]
    type = FunctionValuePostprocessor
    function = additional_volume
    execute_on = 'initial linear'
  []
  [temperature1]
    type = FunctionValuePostprocessor
    function = temperature_of_additional_volume
    execute_on = 'initial linear'
  []
[]
[Outputs]
  exodus = true
[]
(modules/combined/test/tests/cavity_pressure/rz_abs_ref.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
#   p = n * R * T / V
# where
#   p is the pressure
#   n is the amount of material in the volume (moles)
#   R is the universal gas constant
#   T is the temperature
#   V is the volume
#
# The mesh is composed of one block (2) with an interior cavity of volume 8.
#   Block 1 sits in the cavity and has a volume of 1.  Thus, the total
#   initial volume is 7.
# The test adjusts T in the following way:
#   T => T0 + beta * t
# with
#   beta = T0
#   T0 = 240.54443866068704
#   V0 = 7
#   n0 = f(p0)
#   p0 = 100
#   R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
#        = 0.35
#
# At t = 1, p = 200.
[Problem]
  type = ReferenceResidualProblem
  reference_vector = ref
  extra_tag_vectors = ref
[]
[GlobalParams]
  displacements = 'disp_r disp_z'
  absolute_value_vector_tags = ref
[]
[Mesh]
  file = rz.e
  coord_type = RZ
[]
[Functions]
  [temperature]
    type = PiecewiseLinear
    x = '0 1'
    y = '1 2'
    scale_factor = 240.54443866068704
  []
[]
[Variables]
  [disp_r]
  []
  [disp_z]
  []
  [temp]
    initial_condition = 240.54443866068704
  []
[]
[Kernels]
  [TensorMechanics]
    use_displaced_mesh = true
  []
  [heat]
    type = Diffusion
    variable = temp
    use_displaced_mesh = true
  []
[]
[BCs]
  [no_x]
    type = DirichletBC
    variable = disp_r
    boundary = '1 2'
    value = 0.0
  []
  [no_y]
    type = DirichletBC
    variable = disp_z
    boundary = '1 2'
    value = 0.0
  []
  [temperatureInterior]
    type = FunctionDirichletBC
    boundary = 2
    function = temperature
    variable = temp
  []
  [CavityPressure]
    [1]
      boundary = 2
      initial_pressure = 100
      R = 8.314472
      temperature = aveTempInterior
      volume = internalVolume
      startup_time = 0.5
      output = ppress
    []
  []
[]
[Materials]
  [elastic_tensor1]
    type = ComputeIsotropicElasticityTensor
    youngs_modulus = 1e6
    poissons_ratio = 0.3
    block = 1
  []
  [strain1]
    type = ComputeAxisymmetricRZFiniteStrain
    block = 1
  []
  [stress1]
    type = ComputeFiniteStrainElasticStress
    block = 1
  []
  [elastic_tensor2]
    type = ComputeIsotropicElasticityTensor
    youngs_modulus = 1e6
    poissons_ratio = 0.3
    block = 2
  []
  [strain2]
    type = ComputeAxisymmetricRZFiniteStrain
    block = 2
  []
  [stress2]
    type = ComputeFiniteStrainElasticStress
    block = 2
  []
[]
[Executioner]
  type = Transient
  petsc_options_iname = '-pc_type -sub_pc_type'
  petsc_options_value = 'asm       lu'
  nl_abs_tol = 1e-10
  l_max_its = 20
  dt = 0.5
  end_time = 1.0
  use_pre_SMO_residual = true
[]
[Postprocessors]
  [internalVolume]
    type = InternalVolume
    boundary = 2
    execute_on = 'initial linear'
  []
  [aveTempInterior]
    type = SideAverageValue
    boundary = 2
    variable = temp
    execute_on = 'initial linear'
  []
[]
[Outputs]
  exodus = true
  [checkpoint]
    type = Checkpoint
    num_files = 1
  []
[]
(modules/combined/test/tests/internal_volume/hex8.i)
#
# Internal Volume Test
#
# This test is designed to compute the internal volume of a space considering
#   an embedded volume inside.
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
#   Block 2 sits in the cavity and has a volume of 1.  Thus, the total volume
#   is 7.
#
# The internal volume is then adjusted by a piecewise linear time varying
# function.  Thus, the total volume is 7 plus the addition at the particular
# time.
#
#  Time |  Addition  | Total volume
#   0   |    0.0     |     7.0
#   1   |    3.0     |    10.0
#   2   |    7.0     |    14.0
#   3   |   -3.0     |     4.0
#
[GlobalParams]
  displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
  file = meshes/hex8.e
[]
[Functions]
  [./step]
    type = PiecewiseLinear
    x = '0. 1. 2. 3.'
    y = '0. 0. 1e-2 0.'
    scale_factor = 0.5
  [../]
  [./addition]
    type = PiecewiseLinear
    x = '0. 1. 2. 3.'
    y = '0. 3. 7. -3.'
  [../]
[]
[Variables]
  [./disp_x]
    order = FIRST
    family = LAGRANGE
  [../]
  [./disp_y]
    order = FIRST
    family = LAGRANGE
  [../]
  [./disp_z]
    order = FIRST
    family = LAGRANGE
  [../]
[]
[Physics/SolidMechanics/QuasiStatic]
  [./all]
    volumetric_locking_correction = true
    incremental = true
    strain = FINITE
  [../]
[]
[BCs]
  [./no_x]
    type = DirichletBC
    variable = disp_x
    boundary = 100
    value = 0.0
  [../]
  [./no_y]
    type = DirichletBC
    variable = disp_y
    boundary = 100
    value = 0.0
  [../]
  [./prescribed_z]
    type = FunctionDirichletBC
    variable = disp_z
    boundary = 100
    function = step
  [../]
[]
[Materials]
  [./elasticity_tensor]
    type = ComputeIsotropicElasticityTensor
    block = '1 2'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  [../]
  [./stress]
    type = ComputeFiniteStrainElasticStress
    block = '1 2'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = 'PJFNK'
  start_time = 0.0
  dt = 1.0
  end_time = 3.0
[]
[Postprocessors]
  [./internalVolume]
    type = InternalVolume
    boundary = 100
    addition = addition
    execute_on = 'initial timestep_end'
  [../]
  [./dispZ]
    type = ElementAverageValue
    block = '1 2'
    variable = disp_z
  [../]
[]
[Outputs]
  csv = true
[]
(modules/combined/test/tests/ad_cavity_pressure/initial_temperature.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
#   p = n * R * T / V
# where
#   p is the pressure
#   n is the amount of material in the volume (moles)
#   R is the universal gas constant
#   T is the temperature
#   V is the volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
#   Block 2 sits in the cavity and has a volume of 1.  Thus, the total
#   initial volume is 7.
# The test adjusts n, T, and V in the following way:
#   n => n0 + alpha * t
#   T => T0 + beta * t
#   V => V0 + gamma * t
# with
#   alpha = n0
#   beta = T0 / 2
#   gamma = -(0.003322259...) * V0
#   T0 = 240.54443866068704
#   V0 = 7
#   n0 = f(p0)
#   p0 = 100
#   R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
#        = 0.35
#
# The parameters combined at t = 1 gives p = 301.
#
# This test sets the initial temperature to 500, but the CavityPressure
#   is told that that initial temperature is T0.  Thus, the final solution
#   is unchanged.
[GlobalParams]
  displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
  file = 3d.e
[]
[GlobalParams]
  volumetric_locking_correction = true
[]
[Functions]
  [displ_positive]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 0.0029069767441859684'
  []
  [displ_negative]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 -0.0029069767441859684'
  []
  [temp1]
    type = PiecewiseLinear
    x = '0 1'
    y = '1 1.5'
    scale_factor = 240.54443866068704
  []
  [material_input_function]
    type = PiecewiseLinear
    x = '0    1'
    y = '0 0.35'
  []
[]
[Variables]
  [disp_x]
  []
  [disp_y]
  []
  [disp_z]
  []
  [temp]
    initial_condition = 500
  []
  [material_input]
  []
[]
[AuxVariables]
  [pressure_residual_x]
  []
  [pressure_residual_y]
  []
  [pressure_residual_z]
  []
  [stress_xx]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_xy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zx]
    order = CONSTANT
    family = MONOMIAL
  []
[]
[Kernels]
  [TensorMechanics]
    use_displaced_mesh = true
    use_automatic_differentiation = true
  []
  [heat]
    type = ADDiffusion
    variable = temp
    use_displaced_mesh = true
  []
  [material_input_dummy]
    type = ADDiffusion
    variable = material_input
    use_displaced_mesh = true
  []
[]
[AuxKernels]
  [stress_xx]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 0
    index_j = 0
    variable = stress_xx
  []
  [stress_yy]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 1
    index_j = 1
    variable = stress_yy
  []
  [stress_zz]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 2
    index_j = 2
    variable = stress_zz
  []
  [stress_xy]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 0
    index_j = 1
    variable = stress_xy
  []
  [stress_yz]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 1
    index_j = 2
    variable = stress_yz
  []
  [stress_zx]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 2
    index_j = 0
    variable = stress_zx
  []
[]
[BCs]
  [no_x_exterior]
    type = DirichletBC
    variable = disp_x
    boundary = '7 8'
    value = 0.0
  []
  [no_y_exterior]
    type = DirichletBC
    variable = disp_y
    boundary = '9 10'
    value = 0.0
  []
  [no_z_exterior]
    type = DirichletBC
    variable = disp_z
    boundary = '11 12'
    value = 0.0
  []
  [prescribed_left]
    type = ADFunctionDirichletBC
    variable = disp_x
    boundary = 13
    function = displ_positive
  []
  [prescribed_right]
    type = ADFunctionDirichletBC
    variable = disp_x
    boundary = 14
    function = displ_negative
  []
  [no_y]
    type = DirichletBC
    variable = disp_y
    boundary = '15 16'
    value = 0.0
  []
  [no_z]
    type = DirichletBC
    variable = disp_z
    boundary = '17 18'
    value = 0.0
  []
  [no_x_interior]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [no_y_interior]
    type = DirichletBC
    variable = disp_y
    boundary = '3 4'
    value = 0.0
  []
  [no_z_interior]
    type = DirichletBC
    variable = disp_z
    boundary = '5 6'
    value = 0.0
  []
  [temperatureInterior]
    type = ADFunctionDirichletBC
    boundary = 100
    function = temp1
    variable = temp
  []
  [MaterialInput]
    type = ADFunctionDirichletBC
    boundary = '100 13 14 15 16'
    function = material_input_function
    variable = material_input
  []
  [CavityPressure]
    [1]
      boundary = 100
      initial_pressure = 100
      material_input = materialInput
      R = 8.314472
      temperature = aveTempInterior
      initial_temperature = 240.54443866068704
      volume = internalVolume
      startup_time = 0.5
      output = ppress
      save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
      use_automatic_differentiation = true
    []
  []
[]
[Materials]
  [elast_tensor1]
    type = ADComputeElasticityTensor
    C_ijkl = '0 5'
    fill_method = symmetric_isotropic
    block = 1
  []
  [strain1]
    type = ADComputeFiniteStrain
    block = 1
  []
  [stress1]
    type = ADComputeFiniteStrainElasticStress
    block = 1
  []
  [elast_tensor2]
    type = ADComputeElasticityTensor
    C_ijkl = '0 5'
    fill_method = symmetric_isotropic
    block = 2
  []
  [strain2]
    type = ADComputeFiniteStrain
    block = 2
  []
  [stress2]
    type = ADComputeFiniteStrainElasticStress
    block = 2
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -sub_pc_type'
  petsc_options_value = 'asm       lu'
  nl_rel_tol = 1e-12
  l_tol = 1e-12
  l_max_its = 20
  dt = 0.5
  end_time = 1.0
  use_pre_SMO_residual = true
[]
[Postprocessors]
  [internalVolume]
    type = InternalVolume
    boundary = 100
    execute_on = 'initial linear'
  []
  [aveTempInterior]
    type = SideAverageValue
    boundary = 100
    variable = temp
    execute_on = 'initial linear'
  []
  [materialInput]
    type = SideAverageValue
    boundary = '7 8 9 10 11 12'
    variable = material_input
    execute_on = linear
  []
[]
[Outputs]
  exodus = true
[]
(modules/combined/test/tests/ad_cavity_pressure/negative_volume.i)
#
# Cavity Pressure Test
#
# This test is designed to compute a negative number of moles
# to trigger an error check in the CavityPressureUserObject.
# The negative number of moles is achieved by supplying an
# open volume to the InternalVolume postprocessor, which
# calculates a negative volume.
[GlobalParams]
  displacements = 'disp_r disp_z'
[]
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 1
  ny = 2
  coord_type = RZ
[]
[Functions]
  [temperature]
    type = PiecewiseLinear
    x = '0 1'
    y = '1 2'
    scale_factor = 100
  []
[]
[Variables]
  [temperature]
    initial_condition = 100
  []
[]
[Physics/SolidMechanics/QuasiStatic]
  [block]
    strain = FINITE
    add_variables = true
    use_automatic_differentiation = true
  []
[]
[Kernels]
  [heat]
    type = Diffusion
    variable = temperature
    use_displaced_mesh = true
  []
[]
[BCs]
  [no_x]
    type = ADDirichletBC
    variable = disp_r
    boundary = left
    value = 0.0
  []
  [no_y]
    type = ADDirichletBC
    variable = disp_z
    boundary = bottom
    value = 0.0
  []
  [temperatureInterior]
    type = ADFunctionDirichletBC
    boundary = 2
    function = temperature
    variable = temperature
  []
  [CavityPressure]
    [pressure]
      boundary = 'top bottom right'
      initial_pressure = 10e5
      R = 8.3143
      output_initial_moles = initial_moles
      temperature = aveTempInterior
      volume = internalVolume
      startup_time = 0.5
      output = ppress
      use_automatic_differentiation = true
    []
  []
[]
[Materials]
  [elastic_tensor]
    type = ADComputeIsotropicElasticityTensor
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  []
  [stress1]
    type = ADComputeFiniteStrainElasticStress
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -sub_pc_type'
  petsc_options_value = 'asm       lu'
  nl_abs_tol = 1e-10
  l_max_its = 20
  dt = 0.5
  end_time = 1.0
  use_pre_SMO_residual = true
[]
[Postprocessors]
  [internalVolume]
    type = InternalVolume
    boundary = 'top bottom right'
    execute_on = 'initial linear'
  []
  [aveTempInterior]
    type = AxisymmetricCenterlineAverageValue
    boundary = left
    variable = temperature
    execute_on = 'initial linear'
  []
[]
[Outputs]
  exodus = false
[]
(modules/combined/test/tests/cavity_pressure/multiple_postprocessors.i)
#
# Cavity Pressure Test (Volume input as a vector of postprocessors)
#
# This test is designed to compute an internal pressure based on
#   p = n * R * T / V
# where
#   p is the pressure
#   n is the amount of material in the volume (moles)
#   R is the universal gas constant
#   T is the temperature
#   V is the volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
#   Block 2 sits in the cavity and has a volume of 1.  Thus, the total
#   initial volume is 7.
# The test adjusts n, T, and V in the following way:
#   n => n0 + alpha * t
#   T => T0 + beta * t
#   V => V0 + gamma * t
# with
#   alpha = n0
#   beta = T0 / 2
#   gamma = - (0.003322259...) * V0
#   T0 = 240.54443866068704
#   V0 = 7
#   n0 = f(p0)
#   p0 = 100
#   R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
#        = 0.35
#
# In this test the internal volume is calculated as the sum of two Postprocessors
# internalVolumeInterior and internalVolumeExterior.  This sum equals the value
# reported by the internalVolume postprocessor.
#
# The parameters combined at t = 1 gives p = 301.
#
[GlobalParams]
  displacements = 'disp_x disp_y disp_z'
  volumetric_locking_correction = true
[]
[Mesh]
  file = 3d.e
[]
[Functions]
  [displ_positive]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 0.0029069767441859684'
  []
  [displ_negative]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 -0.0029069767441859684'
  []
  [temp1]
    type = PiecewiseLinear
    x = '0 1'
    y = '1 1.5'
    scale_factor = 240.54443866068704
  []
  [material_input_function]
    type = PiecewiseLinear
    x = '0    1'
    y = '0 0.35'
  []
[]
[Variables]
  [disp_x]
  []
  [disp_y]
  []
  [disp_z]
  []
  [temp]
    initial_condition = 240.54443866068704
  []
  [material_input]
  []
[]
[AuxVariables]
  [pressure_residual_x]
  []
  [pressure_residual_y]
  []
  [pressure_residual_z]
  []
  [stress_xx]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_xy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zx]
    order = CONSTANT
    family = MONOMIAL
  []
[]
[Kernels]
  [TensorMechanics]
    use_displaced_mesh = true
  []
  [heat]
    type = Diffusion
    variable = temp
    use_displaced_mesh = true
  []
  [material_input_dummy]
    type = Diffusion
    variable = material_input
    use_displaced_mesh = true
  []
[]
[AuxKernels]
  [stress_xx]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 0
    index_j = 0
    variable = stress_xx
  []
  [stress_yy]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 1
    index_j = 1
    variable = stress_yy
  []
  [stress_zz]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 2
    index_j = 2
    variable = stress_zz
  []
  [stress_xy]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 0
    index_j = 1
    variable = stress_xy
  []
  [stress_yz]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 1
    index_j = 2
    variable = stress_yz
  []
  [stress_zx]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 2
    index_j = 0
    variable = stress_zx
  []
[]
[BCs]
  [no_x_exterior]
    type = DirichletBC
    variable = disp_x
    boundary = '7 8'
    value = 0.0
  []
  [no_y_exterior]
    type = DirichletBC
    variable = disp_y
    boundary = '9 10'
    value = 0.0
  []
  [no_z_exterior]
    type = DirichletBC
    variable = disp_z
    boundary = '11 12'
    value = 0.0
  []
  [prescribed_left]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 13
    function = displ_positive
  []
  [prescribed_right]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 14
    function = displ_negative
  []
  [no_y]
    type = DirichletBC
    variable = disp_y
    boundary = '15 16'
    value = 0.0
  []
  [no_z]
    type = DirichletBC
    variable = disp_z
    boundary = '17 18'
    value = 0.0
  []
  [no_x_interior]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [no_y_interior]
    type = DirichletBC
    variable = disp_y
    boundary = '3 4'
    value = 0.0
  []
  [no_z_interior]
    type = DirichletBC
    variable = disp_z
    boundary = '5 6'
    value = 0.0
  []
  [temperatureInterior]
    type = FunctionDirichletBC
    boundary = 100
    function = temp1
    variable = temp
  []
  [MaterialInput]
    type = FunctionDirichletBC
    boundary = '100 13 14 15 16'
    function = material_input_function
    variable = material_input
  []
  [CavityPressure]
    [1]
      boundary = 100
      initial_pressure = 100
      material_input = materialInput
      R = 8.314472
      temperature = aveTempInterior
      volume = 'internalVolumeInterior internalVolumeExterior'
      startup_time = 0.5
      output = ppress
      save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
    []
  []
[]
[Materials]
  [elast_tensor1]
    type = ComputeIsotropicElasticityTensor
    youngs_modulus = 1e1
    poissons_ratio = 0
    block = 1
  []
  [strain1]
    type = ComputeFiniteStrain
    block = 1
  []
  [stress1]
    type = ComputeFiniteStrainElasticStress
    block = 1
  []
  [elast_tensor2]
    type = ComputeIsotropicElasticityTensor
    youngs_modulus = 1e6
    poissons_ratio = 0
    block = 2
  []
  [strain2]
    type = ComputeFiniteStrain
    block = 2
  []
  [stress2]
    type = ComputeFiniteStrainElasticStress
    block = 2
  []
[]
[Executioner]
  type = Transient
  petsc_options_iname = '-pc_type -sub_pc_type'
  petsc_options_value = 'asm       lu'
  nl_rel_tol = 1e-12
  l_tol = 1e-12
  l_max_its = 20
  dt = 0.5
  end_time = 1.0
  use_pre_SMO_residual = true
[]
[Postprocessors]
  [internalVolume]
    type = InternalVolume
    boundary = 100
    execute_on = 'initial linear'
  []
  [aveTempInterior]
    type = SideAverageValue
    boundary = 100
    variable = temp
    execute_on = 'initial linear'
  []
  [internalVolumeInterior]
    type = InternalVolume
    boundary = '1 2 3 4 5 6'
    execute_on = 'initial linear'
  []
  [internalVolumeExterior]
    type = InternalVolume
    boundary = '13 14 15 16 17 18'
    execute_on = 'initial linear'
  []
  [materialInput]
    type = SideAverageValue
    boundary = '7 8 9 10 11 12'
    variable = material_input
    execute_on = linear
  []
[]
[Outputs]
  exodus = true
[]
(modules/combined/test/tests/ad_cavity_pressure/rz.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
#   p = n * R * T / V
# where
#   p is the pressure
#   n is the amount of material in the volume (moles)
#   R is the universal gas constant
#   T is the temperature
#   V is the volume
#
# The mesh is composed of one block (2) with an interior cavity of volume 8.
#   Block 1 sits in the cavity and has a volume of 1.  Thus, the total
#   initial volume is 7.
# The test adjusts T in the following way:
#   T => T0 + beta * t
# with
#   beta = T0
#   T0 = 240.54443866068704
#   V0 = 7
#   n0 = f(p0)
#   p0 = 100
#   R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
#        = 0.35
#
# At t = 1, p = 200.
[GlobalParams]
  displacements = 'disp_r disp_z'
[]
[Mesh]
  file = rz.e
  coord_type = RZ
[]
[Functions]
  [temperature]
    type = PiecewiseLinear
    x = '0 1'
    y = '1 2'
    scale_factor = 240.54443866068704
  []
[]
[Variables]
  [disp_r]
  []
  [disp_z]
  []
  [temp]
    initial_condition = 240.54443866068704
  []
[]
[Kernels]
  [TensorMechanics]
    use_displaced_mesh = true
    use_automatic_differentiation = true
  []
  [heat]
    type = ADDiffusion
    variable = temp
    use_displaced_mesh = true
  []
[]
[BCs]
  [no_x]
    type = DirichletBC
    variable = disp_r
    boundary = '1 2'
    value = 0.0
  []
  [no_y]
    type = DirichletBC
    variable = disp_z
    boundary = '1 2'
    value = 0.0
  []
  [temperatureInterior]
    type = ADFunctionDirichletBC
    preset = false
    boundary = 2
    function = temperature
    variable = temp
  []
  [CavityPressure]
    [1]
      boundary = 2
      initial_pressure = 100
      R = 8.314472
      temperature = aveTempInterior
      volume = internalVolume
      startup_time = 0.5
      output = ppress
      use_automatic_differentiation = true
    []
  []
[]
[Materials]
  [elastic_tensor1]
    type = ADComputeIsotropicElasticityTensor
    youngs_modulus = 1e6
    poissons_ratio = 0.3
    block = 1
  []
  [strain1]
    type = ADComputeAxisymmetricRZFiniteStrain
    block = 1
  []
  [stress1]
    type = ADComputeFiniteStrainElasticStress
    block = 1
  []
  [elastic_tensor2]
    type = ADComputeIsotropicElasticityTensor
    youngs_modulus = 1e6
    poissons_ratio = 0.3
    block = 2
  []
  [strain2]
    type = ADComputeAxisymmetricRZFiniteStrain
    block = 2
  []
  [stress2]
    type = ADComputeFiniteStrainElasticStress
    block = 2
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -sub_pc_type'
  petsc_options_value = 'asm       lu'
  nl_abs_tol = 1e-10
  l_max_its = 20
  dt = 0.5
  end_time = 1.0
  use_pre_SMO_residual = true
[]
[Postprocessors]
  [internalVolume]
    type = InternalVolume
    boundary = 2
    execute_on = 'initial linear'
  []
  [aveTempInterior]
    type = SideAverageValue
    boundary = 2
    variable = temp
    execute_on = 'initial linear'
  []
[]
[Outputs]
  exodus = true
  [checkpoint]
    type = Checkpoint
    num_files = 1
  []
[]
(modules/combined/test/tests/internal_volume/rz_quad8.i)
#
# Internal Volume Test
#
# This test is designed to compute the internal volume of a space considering
#   an embedded volume inside.
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
#   Block 2 sits in the cavity and has a volume of 1.  Thus, the total volume
#   is 7.
#
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Mesh]
  file = meshes/rz_quad8.e
  coord_type = RZ
[]
[Functions]
  [./pressure]
    type = PiecewiseLinear
    x = '0. 1.'
    y = '0. 1.'
    scale_factor = 1e4
  [../]
[]
[Variables]
  [./disp_x]
    order = SECOND
    family = LAGRANGE
  [../]
  [./disp_y]
    order = SECOND
    family = LAGRANGE
  [../]
[]
[Physics/SolidMechanics/QuasiStatic]
  [./all]
    incremental = true
    strain = FINITE
  [../]
[]
[BCs]
  [./no_x]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  [../]
  [./no_y]
    type = DirichletBC
    variable = disp_y
    boundary = '1 2'
    value = 0.0
  [../]
  [./Pressure]
    [./the_pressure]
      boundary = 3
      function = pressure
    [../]
  [../]
[]
[Materials]
  [./elasticity_tensor]
    type = ComputeIsotropicElasticityTensor
    block = '1 2'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  [../]
  [./stress]
    type = ComputeFiniteStrainElasticStress
    block = '1 2'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  start_time = 0.0
  dt = 1.0
  end_time = 1.0
  [./Quadrature]
    order = THIRD
  [../]
[]
[Postprocessors]
  [./internalVolume]
    type = InternalVolume
    boundary = 2
    execute_on = 'initial timestep_end'
  [../]
[]
[Outputs]
  csv = true
[]
(modules/combined/test/tests/internal_volume/hex20.i)
#
# Internal Volume Test
#
# This test is designed to compute the internal volume of a space considering
#   an embedded volume inside.
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
#   Block 2 sits in the cavity and has a volume of 1.  Thus, the total volume
#   is 7.
#
[GlobalParams]
  displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
  file = meshes/hex20.e
[]
[Functions]
  [./step]
    type = PiecewiseLinear
    x = '0. 1. 2. 3.'
    y = '0. 0. 1e-2 0.'
    scale_factor = 0.5
  [../]
[]
[Variables]
  [./disp_x]
    order = SECOND
    family = LAGRANGE
  [../]
  [./disp_y]
    order = SECOND
    family = LAGRANGE
  [../]
  [./disp_z]
    order = SECOND
    family = LAGRANGE
  [../]
[]
[Physics/SolidMechanics/QuasiStatic]
  [./all]
    incremental = true
    strain = FINITE
  [../]
[]
[BCs]
  [./no_x]
    type = DirichletBC
    variable = disp_x
    boundary = 100
    value = 0.0
  [../]
  [./no_y]
    type = DirichletBC
    variable = disp_y
    boundary = 100
    value = 0.0
  [../]
  [./prescribed_z]
    type = FunctionDirichletBC
    variable = disp_z
    boundary = 100
    function = step
  [../]
[]
[Materials]
  [./elasticity_tensor]
    type = ComputeIsotropicElasticityTensor
    block = '1 2'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  [../]
  [./stress]
    type = ComputeFiniteStrainElasticStress
    block = '1 2'
  [../]
[]
[Preconditioning]
  [./SMP]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  start_time = 0.0
  dt = 1.0
  end_time = 3.0
  [./Quadrature]
    order = THIRD
  [../]
[]
[Postprocessors]
  [./internalVolume]
    type = InternalVolume
    boundary = 100
    execute_on = 'initial timestep_end'
  [../]
  [./dispZ]
    type = ElementAverageValue
    block = '1 2'
    variable = disp_z
  [../]
[]
[Outputs]
  csv = true
[]
(modules/combined/test/tests/cavity_pressure/3d.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
#   p = n * R * T / V
# where
#   p is the pressure
#   n is the amount of material in the volume (moles)
#   R is the universal gas constant
#   T is the temperature
#   V is the volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
#   Block 2 sits in the cavity and has a volume of 1.  Thus, the total
#   initial volume is 7.
# The test adjusts n, T, and V in the following way:
#   n => n0 + alpha * t
#   T => T0 + beta * t
#   V => V0 + gamma * t
# with
#   alpha = n0
#   beta = T0 / 2
#   gamma = - (0.003322259...) * V0
#   T0 = 240.54443866068704
#   V0 = 7
#   n0 = f(p0)
#   p0 = 100
#   R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
#        = 0.35
#
# The parameters combined at t = 1 gives p = 301.
#
[GlobalParams]
  displacements = 'disp_x disp_y disp_z'
  volumetric_locking_correction = true
[]
[Mesh]
  file = 3d.e
[]
[Functions]
  [displ_positive]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 0.0029069767441859684'
  []
  [displ_negative]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 -0.0029069767441859684'
  []
  [temp1]
    type = PiecewiseLinear
    x = '0 1'
    y = '1 1.5'
    scale_factor = 240.54443866068704
  []
  [material_input_function]
    type = PiecewiseLinear
    x = '0    1'
    y = '0 0.35'
  []
[]
[Variables]
  [disp_x]
  []
  [disp_y]
  []
  [disp_z]
  []
  [temp]
    initial_condition = 240.54443866068704
  []
  [material_input]
  []
[]
[AuxVariables]
  [pressure_residual_x]
  []
  [pressure_residual_y]
  []
  [pressure_residual_z]
  []
  [stress_xx]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_xy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zx]
    order = CONSTANT
    family = MONOMIAL
  []
[]
[Kernels]
  [TensorMechanics]
    use_displaced_mesh = true
  []
  [heat]
    type = Diffusion
    variable = temp
    use_displaced_mesh = true
  []
  [material_input_dummy]
    type = Diffusion
    variable = material_input
    use_displaced_mesh = true
  []
[]
[AuxKernels]
  [stress_xx]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 0
    index_j = 0
    variable = stress_xx
  []
  [stress_yy]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 1
    index_j = 1
    variable = stress_yy
  []
  [stress_zz]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 2
    index_j = 2
    variable = stress_zz
  []
  [stress_xy]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 0
    index_j = 1
    variable = stress_xy
  []
  [stress_yz]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 1
    index_j = 2
    variable = stress_yz
  []
  [stress_zx]
    type = RankTwoAux
    rank_two_tensor = stress
    index_i = 2
    index_j = 0
    variable = stress_zx
  []
[]
[BCs]
  [no_x_exterior]
    type = DirichletBC
    variable = disp_x
    boundary = '7 8'
    value = 0.0
  []
  [no_y_exterior]
    type = DirichletBC
    variable = disp_y
    boundary = '9 10'
    value = 0.0
  []
  [no_z_exterior]
    type = DirichletBC
    variable = disp_z
    boundary = '11 12'
    value = 0.0
  []
  [prescribed_left]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 13
    function = displ_positive
  []
  [prescribed_right]
    type = FunctionDirichletBC
    variable = disp_x
    boundary = 14
    function = displ_negative
  []
  [no_y]
    type = DirichletBC
    variable = disp_y
    boundary = '15 16'
    value = 0.0
  []
  [no_z]
    type = DirichletBC
    variable = disp_z
    boundary = '17 18'
    value = 0.0
  []
  [no_x_interior]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [no_y_interior]
    type = DirichletBC
    variable = disp_y
    boundary = '3 4'
    value = 0.0
  []
  [no_z_interior]
    type = DirichletBC
    variable = disp_z
    boundary = '5 6'
    value = 0.0
  []
  [temperatureInterior]
    type = FunctionDirichletBC
    boundary = 100
    function = temp1
    variable = temp
  []
  [MaterialInput]
    type = FunctionDirichletBC
    boundary = '100 13 14 15 16'
    function = material_input_function
    variable = material_input
  []
  [CavityPressure]
    [1]
      boundary = 100
      initial_pressure = 100
      material_input = materialInput
      R = 8.314472
      temperature = aveTempInterior
      volume = internalVolume
      startup_time = 0.5
      output = ppress
      save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
    []
  []
[]
[Materials]
  [elast_tensor1]
    type = ComputeIsotropicElasticityTensor
    youngs_modulus = 1e1
    poissons_ratio = 0
    block = 1
  []
  [strain1]
    type = ComputeFiniteStrain
    block = 1
  []
  [stress1]
    type = ComputeFiniteStrainElasticStress
    block = 1
  []
  [elast_tensor2]
    type = ComputeIsotropicElasticityTensor
    youngs_modulus = 1e6
    poissons_ratio = 0
    block = 2
  []
  [strain2]
    type = ComputeFiniteStrain
    block = 2
  []
  [stress2]
    type = ComputeFiniteStrainElasticStress
    block = 2
  []
[]
[Executioner]
  type = Transient
  petsc_options_iname = '-pc_type -sub_pc_type'
  petsc_options_value = 'asm       lu'
  nl_rel_tol = 1e-12
  l_tol = 1e-12
  l_max_its = 20
  dt = 0.5
  end_time = 1.0
  use_pre_SMO_residual = true
[]
[Postprocessors]
  [internalVolume]
    type = InternalVolume
    boundary = 100
    execute_on = 'initial linear'
  []
  [aveTempInterior]
    type = SideAverageValue
    boundary = 100
    variable = temp
    execute_on = 'initial linear'
  []
  [materialInput]
    type = SideAverageValue
    boundary = '7 8 9 10 11 12'
    variable = material_input
    execute_on = linear
  []
[]
[Outputs]
  exodus = true
[]
(modules/combined/test/tests/cavity_pressure/rz.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
#   p = n * R * T / V
# where
#   p is the pressure
#   n is the amount of material in the volume (moles)
#   R is the universal gas constant
#   T is the temperature
#   V is the volume
#
# The mesh is composed of one block (2) with an interior cavity of volume 8.
#   Block 1 sits in the cavity and has a volume of 1.  Thus, the total
#   initial volume is 7.
# The test adjusts T in the following way:
#   T => T0 + beta * t
# with
#   beta = T0
#   T0 = 240.54443866068704
#   V0 = 7
#   n0 = f(p0)
#   p0 = 100
#   R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
#        = 0.35
#
# At t = 1, p = 200.
[GlobalParams]
  displacements = 'disp_r disp_z'
[]
[Mesh]
  file = rz.e
  coord_type = RZ
[]
[Functions]
  [temperature]
    type = PiecewiseLinear
    x = '0 1'
    y = '1 2'
    scale_factor = 240.54443866068704
  []
[]
[Variables]
  [disp_r]
  []
  [disp_z]
  []
  [temp]
    initial_condition = 240.54443866068704
  []
[]
[Kernels]
  [TensorMechanics]
    use_displaced_mesh = true
  []
  [heat]
    type = Diffusion
    variable = temp
    use_displaced_mesh = true
  []
[]
[BCs]
  [no_x]
    type = DirichletBC
    variable = disp_r
    boundary = '1 2'
    value = 0.0
  []
  [no_y]
    type = DirichletBC
    variable = disp_z
    boundary = '1 2'
    value = 0.0
  []
  [temperatureInterior]
    type = FunctionDirichletBC
    boundary = 2
    function = temperature
    variable = temp
  []
  [CavityPressure]
    [1]
      boundary = 2
      initial_pressure = 100
      R = 8.314472
      temperature = aveTempInterior
      volume = internalVolume
      startup_time = 0.5
      output = ppress
    []
  []
[]
[Materials]
  [elastic_tensor1]
    type = ComputeIsotropicElasticityTensor
    youngs_modulus = 1e6
    poissons_ratio = 0.3
    block = 1
  []
  [strain1]
    type = ComputeAxisymmetricRZFiniteStrain
    block = 1
  []
  [stress1]
    type = ComputeFiniteStrainElasticStress
    block = 1
  []
  [elastic_tensor2]
    type = ComputeIsotropicElasticityTensor
    youngs_modulus = 1e6
    poissons_ratio = 0.3
    block = 2
  []
  [strain2]
    type = ComputeAxisymmetricRZFiniteStrain
    block = 2
  []
  [stress2]
    type = ComputeFiniteStrainElasticStress
    block = 2
  []
[]
[Executioner]
  type = Transient
  petsc_options_iname = '-pc_type -sub_pc_type'
  petsc_options_value = 'asm       lu'
  nl_abs_tol = 1e-10
  l_max_its = 20
  dt = 0.5
  end_time = 1.0
  use_pre_SMO_residual = true
[]
[Postprocessors]
  [internalVolume]
    type = InternalVolume
    boundary = 2
    execute_on = 'initial linear'
  []
  [aveTempInterior]
    type = SideAverageValue
    boundary = 2
    variable = temp
    execute_on = 'initial linear'
  []
[]
[Outputs]
  exodus = true
  [checkpoint]
    type = Checkpoint
    num_files = 1
  []
[]
(modules/combined/test/tests/internal_volume/rz_displaced.i)
#
# Volume Test
#
# This test is designed to compute the volume of a space when displacements
#   are imposed.
#
# The mesh is composed of one block (1) with two elements.  The mesh is
#   such that the initial volume is 1.  One element face is displaced to
#   produce a final volume of 2.
#
#     r1
#   +----+   -
#   |    |   |
#   +----+   h    V1 = pi * h * r1^2
#   |    |   |
#   +----+   -
#
#   becomes
#
#   +----+
#   |     \
#   +------+      v2 = pi * h/2 * ( r2^2 + 1/3 * ( r2^2 + r2*r1 + r1^2 ) )
#   |      |
#   +------+
#      r2
#
#   r1 = 1
#   r2 = 1.5380168369562588
#   h  = 1/pi
#
#  Note:  Because the InternalVolume PP computes cavity volumes as positive,
#         the volumes reported are negative.
#
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Mesh]
  file = meshes/rz_displaced.e
  # This test uses ElementalVariableValue postprocessors on specific
  # elements, so element numbering needs to stay unchanged
  allow_renumbering = false
  coord_type = RZ
[]
[Functions]
  [./disp_x]
    type = PiecewiseLinear
    x = '0. 1.'
    y = '0. 0.5380168369562588'
  [../]
[]
[Variables]
  [./disp_x]
    order = FIRST
    family = LAGRANGE
  [../]
  [./disp_y]
    order = FIRST
    family = LAGRANGE
  [../]
[]
[AuxVariables]
  [./volumetric_strain]
    order = CONSTANT
    family = MONOMIAL
  [../]
[]
[Physics/SolidMechanics/QuasiStatic]
  [./all]
    volumetric_locking_correction = false
    decomposition_method = EigenSolution
    incremental = true
    strain = FINITE
  [../]
[]
[AuxKernels]
  [./fred]
    type = RankTwoScalarAux
    rank_two_tensor = total_strain
    variable = volumetric_strain
    scalar_type = VolumetricStrain
    execute_on = timestep_end
  [../]
[]
[BCs]
  [./no_x]
    type = DirichletBC
    variable = disp_x
    boundary = 1
    value = 0.0
  [../]
  [./no_y]
    type = DirichletBC
    variable = disp_y
    boundary = 2
    value = 0.0
  [../]
  [./x]
    type = FunctionDirichletBC
    boundary = 3
    variable = disp_x
    function = disp_x
  [../]
[]
[Materials]
  [./elasticity_tensor]
    type = ComputeIsotropicElasticityTensor
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  [../]
  [./stress]
    type = ComputeFiniteStrainElasticStress
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  start_time = 0.0
  dt = 1.0
  end_time = 1.0
[]
[Postprocessors]
  [./internalVolume]
    type = InternalVolume
    boundary = 2
    execute_on = 'initial timestep_end'
  [../]
  [./volStrain0]
    type = ElementalVariableValue
    elementid = 0
    variable = volumetric_strain
  [../]
  [./volStrain1]
    type = ElementalVariableValue
    elementid = 1
    variable = volumetric_strain
  [../]
[]
[Outputs]
  csv = true
[]
(modules/combined/test/tests/internal_volume/rspherical.i)
#
# Internal Volume Test
#
# This test is designed to compute the internal volume of a space considering
#   an embedded volume inside.
#
# The mesh is composed of two blocks with an interior cavity of volume 3.
#   The volume of each of the blocks is also 3.  The volume of the entire sphere
#   is 9.
#
[GlobalParams]
  displacements = 'disp_x'
[]
[Mesh]
  file = meshes/rspherical.e
  construct_side_list_from_node_list = true
  coord_type = RSPHERICAL
[]
[Functions]
  [./pressure]
    type = PiecewiseLinear
    x = '0. 1.'
    y = '0. 1.'
    scale_factor = 1e4
  [../]
[]
[Variables]
  [./disp_x]
    order = FIRST
    family = LAGRANGE
  [../]
[]
[Physics/SolidMechanics/QuasiStatic]
  [./all]
    incremental = true
    strain = FINITE
  [../]
[]
[BCs]
  [./no_x]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2 3 4'
    value = 0.0
  [../]
[]
[Materials]
  [./elasticity_tensor]
    type = ComputeIsotropicElasticityTensor
    block = '1 3'
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  [../]
  [./stress]
    type = ComputeFiniteStrainElasticStress
    block = '1 3'
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  start_time = 0.0
  dt = 1.0
  end_time = 1.0
[]
[Postprocessors]
  [./internalVolume]
    type = InternalVolume
    boundary = 10
    component = 0
    execute_on = 'initial timestep_end'
  [../]
  [./intVol1]
    type = InternalVolume
    boundary = 2
    component = 0
    execute_on = 'initial timestep_end'
  [../]
  [./intVol1Again]
    type = InternalVolume
    boundary = 9
    component = 0
    execute_on = 'initial timestep_end'
  [../]
  [./intVol2]
    type = InternalVolume
    boundary = 11
    component = 0
    execute_on = 'initial timestep_end'
  [../]
  [./intVolTotal]
    type = InternalVolume
    boundary = 4
    component = 0
    execute_on = 'initial timestep_end'
  [../]
[]
[Outputs]
  csv = true
[]
(modules/combined/test/tests/cavity_pressure/negative_volume.i)
#
# Cavity Pressure Test
#
# This test is designed to compute a negative number of moles
# to trigger an error check in the CavityPressureUserObject.
# The negative number of moles is achieved by supplying an
# open volume to the InternalVolume postprocessor, which
# calculates a negative volume.
[GlobalParams]
  displacements = 'disp_r disp_z'
[]
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 1
  ny = 2
  coord_type = RZ
[]
[Functions]
  [temperature]
    type = PiecewiseLinear
    x = '0 1'
    y = '1 2'
    scale_factor = 100
  []
[]
[Variables]
  [temperature]
    initial_condition = 100
  []
[]
[Physics/SolidMechanics/QuasiStatic]
  [block]
    strain = FINITE
    add_variables = true
  []
[]
[Kernels]
  [heat]
    type = Diffusion
    variable = temperature
    use_displaced_mesh = true
  []
[]
[BCs]
  [no_x]
    type = DirichletBC
    variable = disp_r
    boundary = left
    value = 0.0
  []
  [no_y]
    type = DirichletBC
    variable = disp_z
    boundary = bottom
    value = 0.0
  []
  [temperatureInterior]
    type = FunctionDirichletBC
    boundary = 2
    function = temperature
    variable = temperature
  []
  [CavityPressure]
    [pressure]
      boundary = 'top bottom right'
      initial_pressure = 10e5
      R = 8.3143
      output_initial_moles = initial_moles
      temperature = aveTempInterior
      volume = internalVolume
      startup_time = 0.5
      output = ppress
    []
  []
[]
[Materials]
  [elastic_tensor]
    type = ComputeIsotropicElasticityTensor
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  []
  [stress1]
    type = ComputeFiniteStrainElasticStress
  []
[]
[Executioner]
  type = Transient
  petsc_options_iname = '-pc_type -sub_pc_type'
  petsc_options_value = 'asm       lu'
  nl_abs_tol = 1e-10
  l_max_its = 20
  dt = 0.5
  end_time = 1.0
  use_pre_SMO_residual = true
[]
[Postprocessors]
  [internalVolume]
    type = InternalVolume
    boundary = 'top bottom right'
    execute_on = 'initial linear'
  []
  [aveTempInterior]
    type = AxisymmetricCenterlineAverageValue
    boundary = left
    variable = temperature
    execute_on = 'initial linear'
  []
[]
[Outputs]
  exodus = false
[]
(modules/combined/test/tests/ad_cavity_pressure/3d.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
#   p = n * R * T / V
# where
#   p is the pressure
#   n is the amount of material in the volume (moles)
#   R is the universal gas constant
#   T is the temperature
#   V is the volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
#   Block 2 sits in the cavity and has a volume of 1.  Thus, the total
#   initial volume is 7.
# The test adjusts n, T, and V in the following way:
#   n => n0 + alpha * t
#   T => T0 + beta * t
#   V => V0 + gamma * t
# with
#   alpha = n0
#   beta = T0 / 2
#   gamma = - (0.003322259...) * V0
#   T0 = 240.54443866068704
#   V0 = 7
#   n0 = f(p0)
#   p0 = 100
#   R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
#        = 0.35
#
# The parameters combined at t = 1 gives p = 301.
#
[GlobalParams]
  displacements = 'disp_x disp_y disp_z'
  volumetric_locking_correction = true
[]
[Mesh]
  file = 3d.e
[]
[Functions]
  [displ_positive]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 0.0029069767441859684'
  []
  [displ_negative]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 -0.0029069767441859684'
  []
  [temp1]
    type = PiecewiseLinear
    x = '0 1'
    y = '1 1.5'
    scale_factor = 240.54443866068704
  []
  [material_input_function]
    type = PiecewiseLinear
    x = '0    1'
    y = '0 0.35'
  []
[]
[Variables]
  [disp_x]
  []
  [disp_y]
  []
  [disp_z]
  []
  [temp]
    initial_condition = 240.54443866068704
  []
  [material_input]
  []
[]
[AuxVariables]
  [pressure_residual_x]
  []
  [pressure_residual_y]
  []
  [pressure_residual_z]
  []
  [stress_xx]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_xy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zx]
    order = CONSTANT
    family = MONOMIAL
  []
[]
[Kernels]
  [TensorMechanics]
    use_displaced_mesh = true
    use_automatic_differentiation = true
  []
  [heat]
    type = ADDiffusion
    variable = temp
    use_displaced_mesh = true
  []
  [material_input_dummy]
    type = ADDiffusion
    variable = material_input
    use_displaced_mesh = true
  []
[]
[AuxKernels]
  [stress_xx]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 0
    index_j = 0
    variable = stress_xx
  []
  [stress_yy]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 1
    index_j = 1
    variable = stress_yy
  []
  [stress_zz]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 2
    index_j = 2
    variable = stress_zz
  []
  [stress_xy]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 0
    index_j = 1
    variable = stress_xy
  []
  [stress_yz]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 1
    index_j = 2
    variable = stress_yz
  []
  [stress_zx]
    type = ADRankTwoAux
    rank_two_tensor = stress
    index_i = 2
    index_j = 0
    variable = stress_zx
  []
[]
[BCs]
  [no_x_exterior]
    type = DirichletBC
    variable = disp_x
    boundary = '7 8'
    value = 0.0
  []
  [no_y_exterior]
    type = DirichletBC
    variable = disp_y
    boundary = '9 10'
    value = 0.0
  []
  [no_z_exterior]
    type = DirichletBC
    variable = disp_z
    boundary = '11 12'
    value = 0.0
  []
  [prescribed_left]
    type = ADFunctionDirichletBC
    variable = disp_x
    boundary = 13
    function = displ_positive
  []
  [prescribed_right]
    type = ADFunctionDirichletBC
    variable = disp_x
    boundary = 14
    function = displ_negative
  []
  [no_y]
    type = DirichletBC
    variable = disp_y
    boundary = '15 16'
    value = 0.0
  []
  [no_z]
    type = DirichletBC
    variable = disp_z
    boundary = '17 18'
    value = 0.0
  []
  [no_x_interior]
    type = DirichletBC
    variable = disp_x
    boundary = '1 2'
    value = 0.0
  []
  [no_y_interior]
    type = DirichletBC
    variable = disp_y
    boundary = '3 4'
    value = 0.0
  []
  [no_z_interior]
    type = DirichletBC
    variable = disp_z
    boundary = '5 6'
    value = 0.0
  []
  [temperatureInterior]
    type = ADFunctionDirichletBC
    boundary = 100
    function = temp1
    variable = temp
  []
  [MaterialInput]
    type = ADFunctionDirichletBC
    boundary = '100 13 14 15 16'
    function = material_input_function
    variable = material_input
  []
  [CavityPressure]
    [1]
      boundary = 100
      initial_pressure = 100
      material_input = materialInput
      R = 8.314472
      temperature = aveTempInterior
      volume = internalVolume
      startup_time = 0.5
      output = ppress
      save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
      use_automatic_differentiation = true
    []
  []
[]
[Materials]
  [elast_tensor1]
    type = ADComputeIsotropicElasticityTensor
    youngs_modulus = 1e1
    poissons_ratio = 0
    block = 1
  []
  [strain1]
    type = ADComputeFiniteStrain
    block = 1
  []
  [stress1]
    type = ADComputeFiniteStrainElasticStress
    block = 1
  []
  [elast_tensor2]
    type = ADComputeIsotropicElasticityTensor
    youngs_modulus = 1e6
    poissons_ratio = 0
    block = 2
  []
  [strain2]
    type = ADComputeFiniteStrain
    block = 2
  []
  [stress2]
    type = ADComputeFiniteStrainElasticStress
    block = 2
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -sub_pc_type'
  petsc_options_value = 'asm       lu'
  nl_rel_tol = 1e-12
  l_tol = 1e-12
  l_max_its = 20
  dt = 0.5
  end_time = 1.0
  use_pre_SMO_residual = true
[]
[Postprocessors]
  [internalVolume]
    type = InternalVolume
    boundary = 100
    execute_on = 'initial linear'
  []
  [aveTempInterior]
    type = SideAverageValue
    boundary = 100
    variable = temp
    execute_on = 'initial linear'
  []
  [materialInput]
    type = SideAverageValue
    boundary = '7 8 9 10 11 12'
    variable = material_input
    execute_on = linear
  []
[]
[Outputs]
  exodus = true
[]
(modules/combined/test/tests/internal_volume/rz_displaced_quad8.i)
#
# Volume Test
#
# This test is designed to compute the volume of a space when displacements
#   are imposed.
#
# The mesh is composed of one block (1) with two elements.  The mesh is
#   such that the initial volume is 1.  One element face is displaced to
#   produce a final volume of 2.
#
#     r1
#   +----+   -
#   |    |   |
#   +----+   h    V1 = pi * h * r1^2
#   |    |   |
#   +----+   -
#
#   becomes
#
#   +----+
#   |     \
#   +------+      v2 = pi * h/2 * ( r2^2 + 1/3 * ( r2^2 + r2*r1 + r1^2 ) )
#   |      |
#   +------+
#      r2
#
#   r1 = 1
#   r2 = 1.5380168369562588
#   h  = 1/pi
#
#  Note:  Because the InternalVolume PP computes cavity volumes as positive,
#         the volumes reported are negative.
#
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Mesh]
  file = meshes/rz_displaced_quad8.e
  displacements = 'disp_x disp_y'
  coord_type = RZ
[]
[Functions]
  [./disp_x]
    type = PiecewiseLinear
    x = '0. 1.'
    y = '0. 0.5380168369562588'
  [../]
  [./disp_x2]
    type = PiecewiseLinear
    scale_factor = 0.5
    x = '0. 1.'
    y = '0. 0.5380168369562588'
  [../]
[]
[Variables]
  [./disp_x]
    order = SECOND
    family = LAGRANGE
  [../]
  [./disp_y]
    order = SECOND
    family = LAGRANGE
  [../]
[]
[Physics/SolidMechanics/QuasiStatic]
  [./all]
    volumetric_locking_correction = false
    decomposition_method = EigenSolution
    incremental = true
    strain = FINITE
  [../]
[]
[BCs]
  [./no_x]
    type = DirichletBC
    variable = disp_x
    boundary = 1
    value = 0.0
  [../]
  [./no_y]
    type = DirichletBC
    variable = disp_y
    boundary = 2
    value = 0.0
  [../]
  [./x]
    type = FunctionDirichletBC
    boundary = 3
    variable = disp_x
    function = disp_x
  [../]
  [./x2]
    type = FunctionDirichletBC
    boundary = 4
    variable = disp_x
    function = disp_x2
  [../]
[]
[Materials]
  [./elasticity_tensor]
    type = ComputeIsotropicElasticityTensor
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  [../]
  [./stress]
    type = ComputeFiniteStrainElasticStress
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  start_time = 0.0
  dt = 1.0
  end_time = 1.0
  [./Quadrature]
    order = THIRD
  [../]
[]
[Postprocessors]
  [./internalVolume]
    type = InternalVolume
    boundary = 2
    execute_on = 'initial timestep_end'
  [../]
[]
[Outputs]
  csv = true
[]
(modules/combined/test/tests/internal_volume/rz_cone.i)
#
# Internal Volume Test
#
# This test is designed to compute the internal volume of a cone.
#
# The mesh is composed of one block (1).  The height is 3/pi, and the radius
#   is 1.  Thus, the volume is 1/3*pi*r^2*h = 1.
#
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Mesh]
  file = meshes/rz_cone.e
  coord_type = RZ
[]
[Functions]
  [./pressure]
    type = PiecewiseLinear
    x = '0. 1.'
    y = '0. 1.'
    scale_factor = 1e4
  [../]
[]
[Variables]
  [./disp_x]
    order = FIRST
    family = LAGRANGE
  [../]
  [./disp_y]
    order = FIRST
    family = LAGRANGE
  [../]
[]
[Physics/SolidMechanics/QuasiStatic]
  [./all]
    volumetric_locking_correction = true
    incremental = true
    strain = FINITE
  [../]
[]
[BCs]
  [./no_x]
    type = DirichletBC
    variable = disp_x
    boundary = 1
    value = 0.0
  [../]
  [./no_y]
    type = DirichletBC
    variable = disp_y
    boundary = 1
    value = 0.0
  [../]
  [./Pressure]
    [./fred]
      boundary = 1
      function = pressure
    [../]
  [../]
[]
[Materials]
  [./elasticity_tensor]
    type = ComputeIsotropicElasticityTensor
    youngs_modulus = 1e6
    poissons_ratio = 0.3
  [../]
  [./stress]
    type = ComputeFiniteStrainElasticStress
  [../]
[]
[Executioner]
  type = Transient
  solve_type = PJFNK
  nl_abs_tol = 1e-9
  start_time = 0.0
  dt = 1.0
  end_time = 1.0
[]
[Postprocessors]
  [./internalVolume]
    type = InternalVolume
    boundary = 1
    execute_on = 'initial timestep_end'
  [../]
[]
[Outputs]
  csv = true
[]